=============================================================================== 0004aae4 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 4aae4: 7007 moveq #7,%d0 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4aae6: 4e56 0000 linkw %fp,#0 4aaea: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4aaee: 2268 0010 moveal %a0@(16),%a1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4aaf2: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4aaf4: 2469 0034 moveal %a1@(52),%a2 switch( node->type ) { 4aaf8: 2250 moveal %a0@,%a1 4aafa: b0a9 0048 cmpl %a1@(72),%d0 4aafe: 6526 bcss 4ab26 <== NEVER TAKEN 4ab00: 2029 0048 movel %a1@(72),%d0 4ab04: d080 addl %d0,%d0 4ab06: 303b 0808 movew %pc@(4ab10 ,%d0:l),%d0 4ab0a: 48c0 extl %d0 4ab0c: 4efb 0802 jmp %pc@(4ab10 ,%d0:l) 4ab10: 0016 026 <== NOT EXECUTED 4ab12: 0010 020 <== NOT EXECUTED 4ab14: 0050 0120 <== NOT EXECUTED 4ab16: 002c 054 <== NOT EXECUTED 4ab18: 002c 054 <== NOT EXECUTED 4ab1a: 001e 036 <== NOT EXECUTED 4ab1c: 001e 036 <== NOT EXECUTED 4ab1e: 003e 076 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 4ab20: 216a 000c 0008 movel %a2@(12),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4ab26: 245f moveal %sp@+,%a2 4ab28: 4280 clrl %d0 4ab2a: 4e5e unlk %fp 4ab2c: 4e75 rts 4ab2e: 4280 clrl %d0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 4ab30: 216a 0008 0008 movel %a2@(8),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4ab36: 245f moveal %sp@+,%a2 4ab38: 4e5e unlk %fp 4ab3a: 4e75 rts 4ab3c: 245f moveal %sp@+,%a2 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 4ab3e: 203c 0005 d90a movel #383242,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4ab44: 4e5e unlk %fp case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 4ab46: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4ab4a: 4280 clrl %d0 4ab4c: 4e75 rts 4ab4e: 245f moveal %sp@+,%a2 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 4ab50: 203c 0005 d7f2 movel #382962,%d0 break; } return 0; } 4ab56: 4e5e unlk %fp break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 4ab58: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 4ab5c: 4280 clrl %d0 4ab5e: 4e75 rts 4ab60: 245f moveal %sp@+,%a2 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4ab62: 203c 0005 d89a movel #383130,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4ab68: 4e5e unlk %fp switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4ab6a: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4ab6e: 4280 clrl %d0 <== NOT EXECUTED =============================================================================== 0004a830 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4a830: 4e56 fff8 linkw %fp,#-8 4a834: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4a836: 4878 0060 pea 60 4a83a: 4878 0001 pea 1 4a83e: 4eb9 0004 2918 jsr 42918 if ( !node ) 4a844: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4a846: 2440 moveal %d0,%a2 if ( !node ) 4a848: 4a80 tstl %d0 4a84a: 674e beqs 4a89a <== NEVER TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4a84c: 4878 0020 pea 20 4a850: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4a854: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 4a85a: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4a85e: 7001 moveq #1,%d0 4a860: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4a864: 4eb9 0005 05fc jsr 505fc /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 4a86a: 256e 0010 002e movel %fp@(16),%a2@(46) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4a870: 42a7 clrl %sp@- 4a872: 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; 4a876: 4240 clrw %d0 4a878: 3540 0038 movew %d0,%a2@(56) node->st_gid = 0; 4a87c: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4a880: 4eb9 0004 2e6c jsr 42e6c node->stat_atime = (time_t) tv.tv_sec; 4a886: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 4a88a: 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; 4a88e: 2540 0044 movel %d0,%a2@(68) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4a892: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 4a896: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; return node; } 4a89a: 200a movel %a2,%d0 4a89c: 246e fff4 moveal %fp@(-12),%a2 4a8a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a8de : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4a8de: 4e56 fffc linkw %fp,#-4 4a8e2: 2f0a movel %a2,%sp@- 4a8e4: 246e 0008 moveal %fp@(8),%a2 4a8e8: 2f02 movel %d2,%sp@- 4a8ea: 242e 000c movel %fp@(12),%d2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4a8ee: 4a8a tstl %a2 4a8f0: 660e bnes 4a900 <== ALWAYS TAKEN 4a8f2: 4280 clrl %d0 <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4a8f4: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4a8f8: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4a8fc: 4e5e unlk %fp <== NOT EXECUTED 4a8fe: 4e75 rts <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4a900: 2079 0005 e710 moveal 5e710 ,%a0 4a906: 2028 002c movel %a0@(44),%d0 4a90a: 4680 notl %d0 4a90c: c0ae 0014 andl %fp@(20),%d0 4a910: 2f00 movel %d0,%sp@- 4a912: 2f2e 0010 movel %fp@(16),%sp@- 4a916: 2f02 movel %d2,%sp@- 4a918: 4eb9 0004 a830 jsr 4a830 if ( !node ) 4a91e: 4fef 000c lea %sp@(12),%sp 4a922: 4a80 tstl %d0 4a924: 67ce beqs 4a8f4 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 4a926: 7207 moveq #7,%d1 4a928: b282 cmpl %d2,%d1 4a92a: 641c bccs 4a948 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4a92c: 4879 0005 d736 pea 5d736 <== NOT EXECUTED 4a932: 4879 0005 d785 pea 5d785 <__FUNCTION__.5866> <== NOT EXECUTED 4a938: 4878 005c pea 5c <== NOT EXECUTED 4a93c: 4879 0005 d738 pea 5d738 <== NOT EXECUTED 4a942: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4a948: 323b 2a08 movew %pc@(4a952 ,%d2:l:2),%d1 4a94c: 48c1 extl %d1 4a94e: 4efb 1802 jmp %pc@(4a952 ,%d1:l) 4a952: ffda 0177732 <== NOT EXECUTED 4a954: 0144 bchg %d0,%d4 <== NOT EXECUTED 4a956: 00fc 0374 <== NOT EXECUTED 4a958: 0010 020 <== NOT EXECUTED 4a95a: 0010 020 <== NOT EXECUTED 4a95c: 006c 0154 <== NOT EXECUTED 4a95e: 005a 0132 <== NOT EXECUTED 4a960: 00be 226e 0018 oril #577634328,%d6 <== NOT EXECUTED 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; 4a966: 2040 moveal %d0,%a0 4a968: 2151 004c movel %a1@,%a0@(76) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a96c: 2240 moveal %d0,%a1 /* * 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; 4a96e: 206a 0010 moveal %a2@(16),%a0 4a972: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a976: 2228 0004 movel %a0@(4),%d1 4a97a: 5281 addql #1,%d1 4a97c: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4a980: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a982: 2341 0034 movel %d1,%a1@(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; 4a986: 2348 0008 movel %a0,%a1@(8) 4a98a: 2f00 movel %d0,%sp@- 4a98c: 4868 004c pea %a0@(76) 4a990: 2d40 fffc movel %d0,%fp@(-4) 4a994: 4eb9 0004 7114 jsr 47114 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a99a: 202e fffc movel %fp@(-4),%d0 4a99e: 508f addql #8,%sp } 4a9a0: 242e fff4 movel %fp@(-12),%d2 4a9a4: 246e fff8 moveal %fp@(-8),%a2 4a9a8: 4e5e unlk %fp 4a9aa: 4e75 rts node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4a9ac: 2040 moveal %d0,%a0 <== 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; 4a9ae: 4281 clrl %d1 <== NOT EXECUTED 4a9b0: 4282 clrl %d2 <== NOT EXECUTED node->info.linearfile.direct = 0; 4a9b2: 42a8 0054 clrl %a0@(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; 4a9b6: 2141 004c movel %d1,%a0@(76) <== NOT EXECUTED 4a9ba: 2142 0050 movel %d2,%a0@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4a9be: 2040 moveal %d0,%a0 node->info.file.indirect = 0; 4a9c0: 2240 moveal %d0,%a1 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4a9c2: 4281 clrl %d1 4a9c4: 4282 clrl %d2 node->info.file.indirect = 0; 4a9c6: 42a9 0054 clrl %a1@(84) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4a9ca: 2141 004c movel %d1,%a0@(76) 4a9ce: 2142 0050 movel %d2,%a0@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4a9d2: 42a9 0058 clrl %a1@(88) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a9d6: 2240 moveal %d0,%a1 case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4a9d8: 42a8 005c clrl %a0@(92) /* * 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; 4a9dc: 206a 0010 moveal %a2@(16),%a0 4a9e0: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a9e4: 2228 0004 movel %a0@(4),%d1 4a9e8: 5281 addql #1,%d1 4a9ea: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4a9ee: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a9f0: 2341 0034 movel %d1,%a1@(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; 4a9f4: 2348 0008 movel %a0,%a1@(8) 4a9f8: 2f00 movel %d0,%sp@- 4a9fa: 4868 004c pea %a0@(76) 4a9fe: 2d40 fffc movel %d0,%fp@(-4) 4aa02: 4eb9 0004 7114 jsr 47114 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4aa08: 202e fffc movel %fp@(-4),%d0 4aa0c: 508f addql #8,%sp 4aa0e: 6090 bras 4a9a0 node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; case IMFS_FIFO: node->info.fifo.pipe = NULL; 4aa10: 2240 moveal %d0,%a1 4aa12: 42a9 004c clrl %a1@(76) /* * 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; 4aa16: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aa1a: 2240 moveal %d0,%a1 /* * 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; 4aa1c: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aa20: 2228 0004 movel %a0@(4),%d1 4aa24: 5281 addql #1,%d1 4aa26: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4aa2a: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aa2c: 2341 0034 movel %d1,%a1@(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; 4aa30: 2348 0008 movel %a0,%a1@(8) 4aa34: 2f00 movel %d0,%sp@- 4aa36: 4868 004c pea %a0@(76) 4aa3a: 2d40 fffc movel %d0,%fp@(-4) 4aa3e: 4eb9 0004 7114 jsr 47114 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4aa44: 202e fffc movel %fp@(-4),%d0 4aa48: 508f addql #8,%sp 4aa4a: 6000 ff54 braw 4a9a0 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4aa4e: 226e 0018 moveal %fp@(24),%a1 4aa52: 2040 moveal %d0,%a0 4aa54: 2151 004c movel %a1@,%a0@(76) node->info.device.minor = info->device.minor; 4aa58: 5889 addql #4,%a1 4aa5a: 2151 0050 movel %a1@,%a0@(80) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aa5e: 2240 moveal %d0,%a1 /* * 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; 4aa60: 206a 0010 moveal %a2@(16),%a0 4aa64: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aa68: 2228 0004 movel %a0@(4),%d1 4aa6c: 5281 addql #1,%d1 4aa6e: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4aa72: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aa74: 2341 0034 movel %d1,%a1@(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; 4aa78: 2348 0008 movel %a0,%a1@(8) 4aa7c: 2f00 movel %d0,%sp@- 4aa7e: 4868 004c pea %a0@(76) 4aa82: 2d40 fffc movel %d0,%fp@(-4) 4aa86: 4eb9 0004 7114 jsr 47114 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4aa8c: 202e fffc movel %fp@(-4),%d0 4aa90: 508f addql #8,%sp 4aa92: 6000 ff0c braw 4a9a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4aa96: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4aa98: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4aa9a: 43e9 0050 lea %a1@(80),%a1 4aa9e: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4aaa2: 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; 4aaa4: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4aaa8: 2149 0054 movel %a1,%a0@(84) /* * 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; 4aaac: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aab0: 2240 moveal %d0,%a1 /* * 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; 4aab2: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aab6: 2228 0004 movel %a0@(4),%d1 4aaba: 5281 addql #1,%d1 4aabc: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4aac0: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4aac2: 2341 0034 movel %d1,%a1@(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; 4aac6: 2348 0008 movel %a0,%a1@(8) 4aaca: 2f00 movel %d0,%sp@- 4aacc: 4868 004c pea %a0@(76) 4aad0: 2d40 fffc movel %d0,%fp@(-4) 4aad4: 4eb9 0004 7114 jsr 47114 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4aada: 202e fffc movel %fp@(-4),%d0 4aade: 508f addql #8,%sp 4aae0: 6000 febe braw 4a9a0 =============================================================================== 0004a8a4 : IMFS_jnode_t *IMFS_create_root_node(void) { 4a8a4: 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) ); 4a8a8: 4878 41ed pea 41ed 4a8ac: 4879 0005 d564 pea 5d564 4a8b2: 4878 0001 pea 1 4a8b6: 4eb9 0004 a830 jsr 4a830 if ( !node ) 4a8bc: 4fef 000c lea %sp@(12),%sp 4a8c0: 4a80 tstl %d0 4a8c2: 6716 beqs 4a8da <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4a8c4: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4a8c6: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4a8c8: 43e9 0050 lea %a1@(80),%a1 4a8cc: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4a8d0: 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; 4a8d2: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4a8d6: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4a8da: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044642 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 44642: 4e56 ffe0 linkw %fp,#-32 44646: 206e 0008 moveal %fp@(8),%a0 4464a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4464e: 262e 000c movel %fp@(12),%d3 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 44652: 4a88 tstl %a0 44654: 6700 008c beqw 446e2 assert( level >= 0 ); 44658: 4a83 tstl %d3 4465a: 6d00 00be bltw 4471a assert( the_directory->type == IMFS_DIRECTORY ); 4465e: 7001 moveq #1,%d0 44660: b0a8 0048 cmpl %a0@(72),%d0 44664: 6600 0098 bnew 446fe */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 44668: 2808 movel %a0,%d4 4466a: 0684 0000 0050 addil #80,%d4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 44670: 2668 004c moveal %a0@(76),%a3 44674: b88b cmpl %a3,%d4 44676: 6750 beqs 446c8 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 ); 44678: 2a03 movel %d3,%d5 4467a: 45f9 0005 3eb4 lea 53eb4 ,%a2 44680: 49f9 0004 442a lea 4442a ,%a4 44686: 5285 addql #1,%d5 44688: 4bf9 0004 4642 lea 44642 ,%a5 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 4468e: 4282 clrl %d2 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 44690: 2079 0006 4154 moveal 64154 <_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++ ) 44696: 5282 addql #1,%d2 fprintf(stdout, "...." ); 44698: 2f28 0008 movel %a0@(8),%sp@- 4469c: 4878 0004 pea 4 446a0: 4878 0001 pea 1 446a4: 4879 0006 27bf pea 627bf 446aa: 4e92 jsr %a2@ !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 446ac: 4fef 0010 lea %sp@(16),%sp 446b0: b483 cmpl %d3,%d2 446b2: 6fdc bles 44690 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 446b4: 2f0b movel %a3,%sp@- 446b6: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 446b8: 588f addql #4,%sp 446ba: 7001 moveq #1,%d0 446bc: b0ab 0048 cmpl %a3@(72),%d0 446c0: 6710 beqs 446d2 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 ) { 446c2: 2653 moveal %a3@,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 446c4: b88b cmpl %a3,%d4 446c6: 66c6 bnes 4468e fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 446c8: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 446ce: 4e5e unlk %fp 446d0: 4e75 rts for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 446d2: 2f05 movel %d5,%sp@- 446d4: 2f0b movel %a3,%sp@- 446d6: 4e95 jsr %a5@ 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 ) { 446d8: 2653 moveal %a3@,%a3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 446da: 508f addql #8,%sp assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 446dc: b88b cmpl %a3,%d4 446de: 66ae bnes 4468e 446e0: 60e6 bras 446c8 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 446e2: 4879 0006 2780 pea 62780 <== NOT EXECUTED 446e8: 4879 0006 284e pea 6284e <__FUNCTION__.6617> <== NOT EXECUTED 446ee: 4878 0084 pea 84 <== NOT EXECUTED 446f2: 4879 0006 26d0 pea 626d0 <== NOT EXECUTED 446f8: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 446fe: 4879 0006 2799 pea 62799 <== NOT EXECUTED 44704: 4879 0006 284e pea 6284e <__FUNCTION__.6617> <== NOT EXECUTED 4470a: 4878 0088 pea 88 <== NOT EXECUTED 4470e: 4879 0006 26d0 pea 626d0 <== NOT EXECUTED 44714: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 4471a: 4879 0006 278e pea 6278e <== NOT EXECUTED 44720: 4879 0006 284e pea 6284e <__FUNCTION__.6617> <== NOT EXECUTED 44726: 4878 0086 pea 86 <== NOT EXECUTED 4472a: 4879 0006 26d0 pea 626d0 <== NOT EXECUTED 44730: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED =============================================================================== 0004acba : 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 ) ) { 4acba: 70f8 moveq #-8,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4acbc: 4e56 ffb0 linkw %fp,#-80 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 ) ) { 4acc0: c0ae 0010 andl %fp@(16),%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4acc4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4acc8: 2a6e 0008 moveal %fp@(8),%a5 4accc: 246e 000c moveal %fp@(12),%a2 4acd0: 286e 0014 moveal %fp@(20),%a4 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 ) ) { 4acd4: 4a80 tstl %d0 4acd6: 6600 025e bnew 4af36 4acda: 2c0e movel %fp,%d6 4acdc: 280e movel %fp,%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4acde: 4282 clrl %d2 4ace0: 5986 subql #4,%d6 4ace2: 0684 ffff ffdb addil #-37,%d4 4ace8: 2a3c 0004 b694 movel #308884,%d5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4acee: 2e3c 0004 b5ec movel #308716,%d7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4acf4: 2654 moveal %a4@,%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 ); 4acf6: 2f06 movel %d6,%sp@- 4acf8: 2045 moveal %d5,%a0 4acfa: 2f04 movel %d4,%sp@- 4acfc: 2f0a movel %a2,%sp@- 4acfe: 4875 2800 pea %a5@(00000000,%d2:l) 4ad02: 4e90 jsr %a0@ pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4ad04: 2054 moveal %a4@,%a0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 4ad06: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4ad08: 4fef 0010 lea %sp@(16),%sp */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4ad0c: 202e fffc movel %fp@(-4),%d0 i += len; if ( !pathloc->node_access ) 4ad10: 4a88 tstl %a0 4ad12: 6700 00f8 beqw 4ae0c while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 4ad16: d480 addl %d0,%d2 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4ad18: 95c0 subal %d0,%a2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4ad1a: 4a83 tstl %d3 4ad1c: 6662 bnes 4ad80 * 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 ) { 4ad1e: 7201 moveq #1,%d1 4ad20: b2a8 0048 cmpl %a0@(72),%d1 4ad24: 6600 0132 bnew 4ae58 if ( node->info.directory.mt_fs != NULL ) { 4ad28: 2068 0058 moveal %a0@(88),%a0 4ad2c: 4a88 tstl %a0 4ad2e: 6700 0128 beqw 4ae58 newloc = node->info.directory.mt_fs->mt_fs_root; 4ad32: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 4ad36: 2968 002c 0010 movel %a0@(44),%a4@(16) * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4ad3c: 2628 0024 movel %a0@(36),%d3 4ad40: 2228 0020 movel %a0@(32),%d1 4ad44: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4ad48: 2f0c movel %a4,%sp@- 4ad4a: 206e fffc moveal %fp@(-4),%a0 4ad4e: 9488 subl %a0,%d2 4ad50: 2f2e 0010 movel %fp@(16),%sp@- 4ad54: 4872 8800 pea %a2@(00000000,%a0:l) 4ad58: 4875 2800 pea %a5@(00000000,%d2:l) 4ad5c: 2051 moveal %a1@,%a0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4ad5e: 2943 0008 movel %d3,%a4@(8) 4ad62: 2941 0004 movel %d1,%a4@(4) 4ad66: 2880 movel %d0,%a4@ 4ad68: 2949 000c movel %a1,%a4@(12) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4ad6c: 4e90 jsr %a0@ 4ad6e: 4fef 0010 lea %sp@(16),%sp 4ad72: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ad74: 2003 movel %d3,%d0 4ad76: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4ad7c: 4e5e unlk %fp 4ad7e: 4e75 rts /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4ad80: 7001 moveq #1,%d0 4ad82: b0ab 0048 cmpl %a3@(72),%d0 4ad86: 6700 00b8 beqw 4ae40 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 4ad8a: 2648 moveal %a0,%a3 switch( type ) { 4ad8c: 7003 moveq #3,%d0 4ad8e: b083 cmpl %d3,%d0 4ad90: 671c beqs 4adae 4ad92: 7204 moveq #4,%d1 4ad94: b283 cmpl %d3,%d1 4ad96: 6700 008e beqw 4ae26 4ad9a: 103c 0002 moveb #2,%d0 4ad9e: b083 cmpl %d3,%d0 4ada0: 6748 beqs 4adea /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4ada2: 7004 moveq #4,%d0 4ada4: b083 cmpl %d3,%d0 4ada6: 6600 ff4e bnew 4acf6 4adaa: 6000 ff72 braw 4ad1e <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4adae: 2028 0048 movel %a0@(72),%d0 4adb2: 7203 moveq #3,%d1 4adb4: b280 cmpl %d0,%d1 4adb6: 6700 00d8 beqw 4ae90 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4adba: 7204 moveq #4,%d1 4adbc: b280 cmpl %d0,%d1 4adbe: 6700 00ea beqw 4aeaa /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4adc2: 7201 moveq #1,%d1 4adc4: b280 cmpl %d0,%d1 4adc6: 6600 0104 bnew 4aecc /* * 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 ) { 4adca: 206b 0058 moveal %a3@(88),%a0 4adce: 4a88 tstl %a0 4add0: 6600 ff60 bnew 4ad32 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4add4: 2f04 movel %d4,%sp@- 4add6: 2047 moveal %d7,%a0 4add8: 2f0b movel %a3,%sp@- 4adda: 4e90 jsr %a0@ if ( !node ) 4addc: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4adde: 2640 moveal %d0,%a3 if ( !node ) 4ade0: 4a80 tstl %d0 4ade2: 6728 beqs 4ae0c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4ade4: 288b movel %a3,%a4@ break; 4ade6: 6000 ff0e braw 4acf6 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4adea: 2279 0005 e710 moveal 5e710 ,%a1 4adf0: b1e9 0018 cmpal %a1@(24),%a0 4adf4: 6700 ff00 beqw 4acf6 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 4adf8: 226c 0010 moveal %a4@(16),%a1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4adfc: b1e9 001c cmpal %a1@(28),%a0 4ae00: 6700 00e4 beqw 4aee6 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4ae04: 2668 0008 moveal %a0@(8),%a3 4ae08: 4a8b tstl %a3 4ae0a: 66d8 bnes 4ade4 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 4ae0c: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4ae12: 76ff moveq #-1,%d3 4ae14: 7c02 moveq #2,%d6 4ae16: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ae18: 2003 movel %d3,%d0 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 4ae1a: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ae1c: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4ae22: 4e5e unlk %fp 4ae24: 4e75 rts case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4ae26: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4ae2c: 76ff moveq #-1,%d3 4ae2e: 7a5b moveq #91,%d5 4ae30: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ae32: 2003 movel %d3,%d0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4ae34: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ae36: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4ae3c: 4e5e unlk %fp 4ae3e: 4e75 rts /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4ae40: 4878 0001 pea 1 4ae44: 2f0c movel %a4,%sp@- 4ae46: 4eb9 0004 ab72 jsr 4ab72 4ae4c: 508f addql #8,%sp 4ae4e: 4a80 tstl %d0 4ae50: 6724 beqs 4ae76 4ae52: 2054 moveal %a4@,%a0 4ae54: 6000 ff34 braw 4ad8a flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4ae58: 2f0c movel %a4,%sp@- 4ae5a: 4eb9 0004 aae4 jsr 4aae4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4ae60: 2eae 0010 movel %fp@(16),%sp@ flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4ae64: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4ae66: 2f0c movel %a4,%sp@- 4ae68: 4eb9 0004 ab72 jsr 4ab72 4ae6e: 508f addql #8,%sp 4ae70: 4a80 tstl %d0 4ae72: 6600 ff00 bnew 4ad74 rtems_set_errno_and_return_minus_one( EACCES ); 4ae76: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4ae7c: 76ff moveq #-1,%d3 4ae7e: 780d moveq #13,%d4 4ae80: 2040 moveal %d0,%a0 return result; } 4ae82: 2003 movel %d3,%d0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4ae84: 2084 movel %d4,%a0@ return result; } 4ae86: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4ae8c: 4e5e unlk %fp 4ae8e: 4e75 rts * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 4ae90: 42a7 clrl %sp@- 4ae92: 2f0c movel %a4,%sp@- 4ae94: 4eb9 0004 abac jsr 4abac node = pathloc->node_access; 4ae9a: 2654 moveal %a4@,%a3 if ( !node ) 4ae9c: 508f addql #8,%sp 4ae9e: 4a8b tstl %a3 4aea0: 672a beqs 4aecc <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4aea2: 202b 0048 movel %a3@(72),%d0 4aea6: 6000 ff1a braw 4adc2 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4aeaa: 42a7 clrl %sp@- 4aeac: 2f0c movel %a4,%sp@- 4aeae: 4eb9 0004 ac0c jsr 4ac0c node = pathloc->node_access; 4aeb4: 2654 moveal %a4@,%a3 if ( result == -1 ) 4aeb6: 508f addql #8,%sp 4aeb8: 72ff moveq #-1,%d1 4aeba: b280 cmpl %d0,%d1 4aebc: 66e4 bnes 4aea2 <== ALWAYS TAKEN 4aebe: 2600 movel %d0,%d3 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aec0: 2003 movel %d3,%d0 <== NOT EXECUTED 4aec2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4aec8: 4e5e unlk %fp <== NOT EXECUTED 4aeca: 4e75 rts <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4aecc: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4aed2: 76ff moveq #-1,%d3 4aed4: 7e14 moveq #20,%d7 4aed6: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aed8: 2003 movel %d3,%d0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4aeda: 2087 movel %d7,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aedc: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4aee2: 4e5e unlk %fp 4aee4: 4e75 rts */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4aee6: 2069 0014 moveal %a1@(20),%a0 *pathloc = newloc; 4aeea: 2969 0018 0010 movel %a1@(24),%a4@(16) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4aef0: 2829 0010 movel %a1@(16),%d4 4aef4: 2629 000c movel %a1@(12),%d3 4aef8: 2229 0008 movel %a1@(8),%d1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4aefc: 2f0c movel %a4,%sp@- 4aefe: 226e fffc moveal %fp@(-4),%a1 4af02: 9489 subl %a1,%d2 4af04: 2f2e 0010 movel %fp@(16),%sp@- 4af08: 4872 9800 pea %a2@(00000000,%a1:l) 4af0c: 4875 2800 pea %a5@(00000000,%d2:l) 4af10: 2010 movel %a0@,%d0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4af12: 2943 0004 movel %d3,%a4@(4) 4af16: 2948 000c movel %a0,%a4@(12) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4af1a: 2040 moveal %d0,%a0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4af1c: 2944 0008 movel %d4,%a4@(8) 4af20: 2881 movel %d1,%a4@ return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4af22: 4e90 jsr %a0@ 4af24: 4fef 0010 lea %sp@(16),%sp 4af28: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4af2a: 2003 movel %d3,%d0 4af2c: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4af32: 4e5e unlk %fp 4af34: 4e75 rts rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); 4af36: 4879 0005 d736 pea 5d736 <== NOT EXECUTED 4af3c: 4879 0005 d7e2 pea 5d7e2 <__FUNCTION__.6107> <== NOT EXECUTED 4af42: 4878 01f6 pea 1f6 <== NOT EXECUTED 4af46: 4879 0005 d796 pea 5d796 <__FUNCTION__.5866+0x11> <== NOT EXECUTED 4af4c: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 0004b00c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4b00c: 4e56 ffb0 linkw %fp,#-80 4b010: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b014: 286e 0008 moveal %fp@(8),%a4 4b018: 2e0e movel %fp,%d7 4b01a: 2c0e movel %fp,%d6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4b01c: 4284 clrl %d4 4b01e: 5987 subql #4,%d7 4b020: 0686 ffff ffdb addil #-37,%d6 4b026: 4bf9 0004 b694 lea 4b694 ,%a5 4b02c: 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 */ ) { 4b02e: 266e 000c moveal %fp@(12),%a3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4b032: 4eb9 0005 05e4 jsr 505e4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4b038: 2453 moveal %a3@,%a2 /* * Get the path length. */ pathlen = strlen( path ); 4b03a: 588f addql #4,%sp 4b03c: 2400 movel %d0,%d2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4b03e: 2f07 movel %d7,%sp@- 4b040: 2f06 movel %d6,%sp@- 4b042: 2f02 movel %d2,%sp@- 4b044: 4874 4800 pea %a4@(00000000,%d4:l) 4b048: 4e95 jsr %a5@ pathlen -= len; 4b04a: 2a2e fffc movel %fp@(-4),%d5 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4b04e: 2600 movel %d0,%d3 pathlen -= len; i += len; if ( !pathloc->node_access ) 4b050: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 4b054: 9485 subl %d5,%d2 i += len; if ( !pathloc->node_access ) 4b056: 2053 moveal %a3@,%a0 4b058: 4a88 tstl %a0 4b05a: 6700 00ca beqw 4b126 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4b05e: 4a80 tstl %d0 4b060: 6742 beqs 4b0a4 if ( node->type == IMFS_DIRECTORY ) 4b062: 7001 moveq #1,%d0 4b064: b0aa 0048 cmpl %a2@(72),%d0 4b068: 6700 00d6 beqw 4b140 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 4b06c: d885 addl %d5,%d4 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 4b06e: 2448 moveal %a0,%a2 switch( type ) { 4b070: 7002 moveq #2,%d0 4b072: b083 cmpl %d3,%d0 4b074: 6700 008e beqw 4b104 4b078: 6426 bccs 4b0a0 4b07a: 7203 moveq #3,%d1 4b07c: b283 cmpl %d3,%d1 4b07e: 673e beqs 4b0be 4b080: 7004 moveq #4,%d0 4b082: b083 cmpl %d3,%d0 4b084: 66b8 bnes 4b03e <== NEVER TAKEN case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4b086: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4b08c: 7c5b moveq #91,%d6 4b08e: 76ff moveq #-1,%d3 4b090: 2040 moveal %d0,%a0 4b092: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b094: 2003 movel %d3,%d0 4b096: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b09c: 4e5e unlk %fp 4b09e: 4e75 rts if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4b0a0: 4a83 tstl %d3 4b0a2: 669a bnes 4b03e <== ALWAYS TAKEN pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4b0a4: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4b0aa: 76ff moveq #-1,%d3 4b0ac: 7e11 moveq #17,%d7 4b0ae: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b0b0: 2003 movel %d3,%d0 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4b0b2: 2087 movel %d7,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b0b4: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b0ba: 4e5e unlk %fp 4b0bc: 4e75 rts pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4b0be: 2028 0048 movel %a0@(72),%d0 4b0c2: 7203 moveq #3,%d1 4b0c4: b280 cmpl %d0,%d1 4b0c6: 6700 0102 beqw 4b1ca result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 4b0ca: 7204 moveq #4,%d1 4b0cc: b280 cmpl %d0,%d1 4b0ce: 6700 00fa beqw 4b1ca if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 4b0d2: 4a8a tstl %a2 4b0d4: 6700 0110 beqw 4b1e6 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4b0d8: 7001 moveq #1,%d0 4b0da: b0aa 0048 cmpl %a2@(72),%d0 4b0de: 6600 0106 bnew 4b1e6 /* * 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 ) { 4b0e2: 206a 0058 moveal %a2@(88),%a0 4b0e6: 4a88 tstl %a0 4b0e8: 6600 0116 bnew 4b200 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4b0ec: 2f06 movel %d6,%sp@- 4b0ee: 2f0a movel %a2,%sp@- 4b0f0: 4eb9 0004 b5ec jsr 4b5ec /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4b0f6: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4b0f8: 2440 moveal %d0,%a2 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4b0fa: 4a80 tstl %d0 4b0fc: 675a beqs 4b158 done = true; else pathloc->node_access = node; 4b0fe: 268a movel %a2,%a3@ 4b100: 6000 ff3c braw 4b03e case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4b104: 2279 0005 e710 moveal 5e710 ,%a1 4b10a: b1e9 0018 cmpal %a1@(24),%a0 4b10e: 6700 ff2e beqw 4b03e /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 4b112: 226b 0010 moveal %a3@(16),%a1 4b116: b1e9 001c cmpal %a1@(28),%a0 4b11a: 6700 012e beqw 4b24a *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4b11e: 2468 0008 moveal %a0@(8),%a2 4b122: 4a8a tstl %a2 4b124: 66d8 bnes 4b0fe * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 4b126: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4b12c: 76ff moveq #-1,%d3 4b12e: 7a02 moveq #2,%d5 4b130: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b132: 2003 movel %d3,%d0 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 4b134: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b136: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b13c: 4e5e unlk %fp 4b13e: 4e75 rts * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4b140: 4878 0001 pea 1 4b144: 2f0b movel %a3,%sp@- 4b146: 4eb9 0004 ab72 jsr 4ab72 4b14c: 508f addql #8,%sp 4b14e: 4a80 tstl %d0 4b150: 675e beqs 4b1b0 4b152: 2053 moveal %a3@,%a0 4b154: 6000 ff16 braw 4b06c case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4b158: 2004 movel %d4,%d0 4b15a: 90ae fffc subl %fp@(-4),%d0 4b15e: d08c addl %a4,%d0 4b160: 206e 0010 moveal %fp@(16),%a0 4b164: 2080 movel %d0,%a0@ /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 4b166: 1034 4800 moveb %a4@(00000000,%d4:l),%d0 4b16a: 671a beqs 4b186 4b16c: 4bf9 0004 3d74 lea 43d74 ,%a5 4b172: 45f4 4801 lea %a4@(00000001,%d4:l),%a2 if ( !IMFS_is_separator( path[ i ] ) ) 4b176: 49c0 extbl %d0 4b178: 2f00 movel %d0,%sp@- 4b17a: 4e95 jsr %a5@ 4b17c: 588f addql #4,%sp 4b17e: 4a80 tstl %d0 4b180: 67a4 beqs 4b126 /* * 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++) { 4b182: 101a moveb %a2@+,%d0 4b184: 66f0 bnes 4b176 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4b186: 2f0b movel %a3,%sp@- 4b188: 4eb9 0004 aae4 jsr 4aae4 /* * The returned node must be a directory */ node = pathloc->node_access; 4b18e: 2053 moveal %a3@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4b190: 2600 movel %d0,%d3 /* * The returned node must be a directory */ node = pathloc->node_access; 4b192: 588f addql #4,%sp 4b194: 7001 moveq #1,%d0 4b196: b0a8 0048 cmpl %a0@(72),%d0 4b19a: 664a bnes 4b1e6 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 4b19c: 4878 0003 pea 3 4b1a0: 2f0b movel %a3,%sp@- 4b1a2: 4eb9 0004 ab72 jsr 4ab72 4b1a8: 508f addql #8,%sp 4b1aa: 4a80 tstl %d0 4b1ac: 6600 fee6 bnew 4b094 rtems_set_errno_and_return_minus_one( EACCES ); 4b1b0: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4b1b6: 76ff moveq #-1,%d3 4b1b8: 740d moveq #13,%d2 4b1ba: 2040 moveal %d0,%a0 return result; } 4b1bc: 2003 movel %d3,%d0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4b1be: 2082 movel %d2,%a0@ return result; } 4b1c0: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b1c6: 4e5e unlk %fp 4b1c8: 4e75 rts if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4b1ca: 42a7 clrl %sp@- 4b1cc: 2f0b movel %a3,%sp@- 4b1ce: 4eb9 0004 af52 jsr 4af52 if ( result == -1 ) 4b1d4: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4b1d6: 2600 movel %d0,%d3 if ( result == -1 ) 4b1d8: 70ff moveq #-1,%d0 4b1da: b083 cmpl %d3,%d0 4b1dc: 6700 feb6 beqw 4b094 4b1e0: 2453 moveal %a3@,%a2 4b1e2: 6000 feee braw 4b0d2 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4b1e6: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4b1ec: 76ff moveq #-1,%d3 4b1ee: 7814 moveq #20,%d4 4b1f0: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b1f2: 2003 movel %d3,%d0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4b1f4: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b1f6: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b1fc: 4e5e unlk %fp 4b1fe: 4e75 rts */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4b200: 98ae fffc subl %fp@(-4),%d4 * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4b204: 2428 0024 movel %a0@(36),%d2 4b208: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 4b20c: 2768 002c 0010 movel %a0@(44),%a3@(16) * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4b212: 2228 0020 movel %a0@(32),%d1 4b216: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4b21a: 2f2e 0010 movel %fp@(16),%sp@- 4b21e: 2f0b movel %a3,%sp@- 4b220: 4874 4800 pea %a4@(00000000,%d4:l) 4b224: 2069 0004 moveal %a1@(4),%a0 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4b228: 2742 0008 movel %d2,%a3@(8) 4b22c: 2741 0004 movel %d1,%a3@(4) 4b230: 2680 movel %d0,%a3@ 4b232: 2749 000c movel %a1,%a3@(12) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4b236: 4e90 jsr %a0@ 4b238: 4fef 000c lea %sp@(12),%sp 4b23c: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b23e: 2003 movel %d3,%d0 4b240: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b246: 4e5e unlk %fp 4b248: 4e75 rts break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4b24a: 98ae fffc subl %fp@(-4),%d4 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4b24e: 2069 0014 moveal %a1@(20),%a0 4b252: 2629 0010 movel %a1@(16),%d3 4b256: 2429 000c movel %a1@(12),%d2 *pathloc = newloc; 4b25a: 2769 0018 0010 movel %a1@(24),%a3@(16) if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4b260: 2229 0008 movel %a1@(8),%d1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4b264: 2f2e 0010 movel %fp@(16),%sp@- 4b268: 2f0b movel %a3,%sp@- 4b26a: 4874 4800 pea %a4@(00000000,%d4:l) 4b26e: 2028 0004 movel %a0@(4),%d0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4b272: 2743 0008 movel %d3,%a3@(8) 4b276: 2748 000c movel %a0,%a3@(12) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4b27a: 2040 moveal %d0,%a0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4b27c: 2742 0004 movel %d2,%a3@(4) 4b280: 2681 movel %d1,%a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4b282: 4e90 jsr %a0@ 4b284: 4fef 000c lea %sp@(12),%sp 4b288: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b28a: 2003 movel %d3,%d0 4b28c: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b292: 4e5e unlk %fp ... =============================================================================== 0004abac : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4abac: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4abae: 4e56 0000 linkw %fp,#0 4abb2: 2f0a movel %a2,%sp@- 4abb4: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 4abb8: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4abba: b0a8 0048 cmpl %a0@(72),%d0 4abbe: 6640 bnes 4ac00 <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 4abc0: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 4abc4: 2f0a movel %a2,%sp@- 4abc6: 4eb9 0004 aae4 jsr 4aae4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4abcc: 2f2e 000c movel %fp@(12),%sp@- 4abd0: 2f0a movel %a2,%sp@- 4abd2: 4eb9 0004 ab72 jsr 4ab72 4abd8: 4fef 000c lea %sp@(12),%sp 4abdc: 4a80 tstl %d0 4abde: 670a beqs 4abea <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4abe0: 246e fffc moveal %fp@(-4),%a2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4abe4: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4abe6: 4e5e unlk %fp 4abe8: 4e75 rts /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4abea: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED return result; } 4abf0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4abf4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4abf6: 720d moveq #13,%d1 <== NOT EXECUTED 4abf8: 70ff moveq #-1,%d0 <== NOT EXECUTED return result; } 4abfa: 4e5e unlk %fp <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4abfc: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 4abfe: 4e75 rts <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 4ac00: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4ac06: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED =============================================================================== 0004af52 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4af52: 4e56 ffec linkw %fp,#-20 4af56: 2079 0005 e710 moveal 5e710 ,%a0 4af5c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4af60: 266e 0008 moveal %fp@(8),%a3 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4af64: 4bf9 0004 ac0c lea 4ac0c ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4af6a: 49f9 0004 abac lea 4abac ,%a4 int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4af70: 242e 000c movel %fp@(12),%d2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4af74: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4af76: 3028 0030 movew %a0@(48),%d0 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4af7a: 2453 moveal %a3@,%a2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4af7c: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4af7e: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4af80: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4af84: 7005 moveq #5,%d0 4af86: b081 cmpl %d1,%d0 4af88: 6564 bcss 4afee /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4af8a: 202a 0048 movel %a2@(72),%d0 4af8e: 7203 moveq #3,%d1 4af90: b280 cmpl %d0,%d1 4af92: 6740 beqs 4afd4 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4af94: 7204 moveq #4,%d1 4af96: b280 cmpl %d0,%d1 4af98: 671a beqs 4afb4 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4af9a: 5780 subql #3,%d0 4af9c: 7201 moveq #1,%d1 4af9e: b280 cmpl %d0,%d1 4afa0: 64d2 bccs 4af74 <== NEVER TAKEN 4afa2: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4afa4: 4241 clrw %d1 4afa6: 3141 0030 movew %d1,%a0@(48) return result; } 4afaa: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4afb0: 4e5e unlk %fp 4afb2: 4e75 rts if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4afb4: 2f02 movel %d2,%sp@- 4afb6: 2f0b movel %a3,%sp@- 4afb8: 4e95 jsr %a5@ 4afba: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4afbc: 4a80 tstl %d0 4afbe: 6620 bnes 4afe0 4afc0: 202a 0048 movel %a2@(72),%d0 4afc4: 7201 moveq #1,%d1 4afc6: 5780 subql #3,%d0 4afc8: 2079 0005 e710 moveal 5e710 ,%a0 4afce: b280 cmpl %d0,%d1 4afd0: 64a2 bccs 4af74 <== ALWAYS TAKEN 4afd2: 60ce bras 4afa2 <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4afd4: 2f02 movel %d2,%sp@- 4afd6: 2f0b movel %a3,%sp@- 4afd8: 4e94 jsr %a4@ 4afda: 508f addql #8,%sp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4afdc: 4a80 tstl %d0 4afde: 67e0 beqs 4afc0 <== ALWAYS TAKEN 4afe0: 2079 0005 e710 moveal 5e710 ,%a0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4afe6: 4241 clrw %d1 4afe8: 3141 0030 movew %d1,%a0@(48) 4afec: 60bc bras 4afaa * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 4afee: 4241 clrw %d1 4aff0: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 4aff4: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4affa: 725c moveq #92,%d1 4affc: 2040 moveal %d0,%a0 4affe: 70ff moveq #-1,%d0 */ rtems_filesystem_link_counts = 0; return result; } 4b000: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4b006: 2081 movel %d1,%a0@ */ rtems_filesystem_link_counts = 0; return result; } 4b008: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ab72 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 4ab72: 72f8 moveq #-8,%d1 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4ab74: 4e56 0000 linkw %fp,#0 4ab78: 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 ) ) 4ab7c: c280 andl %d0,%d1 4ab7e: 661a bnes 4ab9a <== NEVER TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4ab80: 206e 0008 moveal %fp@(8),%a0 return 1; return 0; } 4ab84: 4e5e unlk %fp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4ab86: ed88 lsll #6,%d0 4ab88: 2050 moveal %a0@,%a0 4ab8a: 2200 movel %d0,%d1 4ab8c: c2a8 002e andl %a0@(46),%d1 4ab90: b280 cmpl %d0,%d1 4ab92: 57c0 seq %d0 4ab94: 49c0 extbl %d0 4ab96: 4480 negl %d0 return 1; return 0; } 4ab98: 4e75 rts gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4ab9a: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4aba0: 7201 moveq #1,%d1 <== NOT EXECUTED 4aba2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4aba4: 70ff moveq #-1,%d0 <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4aba6: 4e5e unlk %fp <== NOT EXECUTED gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4aba8: 2081 movel %d1,%a0@ <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } =============================================================================== 0004ac0c : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4ac0c: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4ac0e: 4e56 ffec linkw %fp,#-20 4ac12: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4ac16: 246e 0008 moveal %fp@(8),%a2 4ac1a: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 4ac1e: 2652 moveal %a2@,%a3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4ac20: b0ab 0048 cmpl %a3@(72),%d0 4ac24: 6600 0088 bnew 4acae rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4ac28: 202b 0008 movel %a3@(8),%d0 4ac2c: 6774 beqs 4aca2 <== NEVER TAKEN * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 4ac2e: 2f0a movel %a2,%sp@- 4ac30: 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; 4ac34: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 4ac36: 2f2b 004c movel %a3@(76),%sp@- 4ac3a: 4eb9 0004 c17c jsr 4c17c /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4ac40: 262b 004c movel %a3@(76),%d3 4ac44: d6ae fffc addl %fp@(-4),%d3 4ac48: 2f03 movel %d3,%sp@- 4ac4a: 4eb9 0005 05e4 jsr 505e4 4ac50: 2e8a movel %a2,%sp@ 4ac52: 2f02 movel %d2,%sp@- 4ac54: 2f00 movel %d0,%sp@- 4ac56: 2f03 movel %d3,%sp@- 4ac58: 4eb9 0004 acba jsr 4acba 4ac5e: 2600 movel %d0,%d3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 4ac60: 2f0a movel %a2,%sp@- 4ac62: 4eb9 0004 aae4 jsr 4aae4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4ac68: 4fef 001c lea %sp@(28),%sp 4ac6c: 2e82 movel %d2,%sp@ 4ac6e: 2f0a movel %a2,%sp@- 4ac70: 4eb9 0004 ab72 jsr 4ab72 4ac76: 508f addql #8,%sp 4ac78: 4a80 tstl %d0 4ac7a: 670c beqs 4ac88 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ac7c: 2003 movel %d3,%d0 4ac7e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ac84: 4e5e unlk %fp 4ac86: 4e75 rts /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4ac88: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4ac8e: 76ff moveq #-1,%d3 <== NOT EXECUTED 4ac90: 740d moveq #13,%d2 <== NOT EXECUTED 4ac92: 2040 moveal %d0,%a0 <== NOT EXECUTED return result; } 4ac94: 2003 movel %d3,%d0 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4ac96: 2082 movel %d2,%a0@ <== NOT EXECUTED return result; } 4ac98: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4ac9e: 4e5e unlk %fp <== NOT EXECUTED 4aca0: 4e75 rts <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 4aca2: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 4aca8: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 4acae: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4acb4: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED =============================================================================== 0004b46c : } int IMFS_fifo_close( rtems_libio_t *iop ) { 4b46c: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 4b470: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4b474: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4b478: 266a 0038 moveal %a2@(56),%a3 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 4b47c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b47e: 486b 004c pea %a3@(76) <== NOT EXECUTED 4b482: 4eb9 0004 a2da jsr 4a2da <== NOT EXECUTED if (! err) { 4b488: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 4b48a: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 4b48c: 670e beqs 4b49c <== 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) free(jnode); } IMFS_FIFO_RETURN(err); 4b48e: 6d40 blts 4b4d0 <== NOT EXECUTED } 4b490: 2002 movel %d2,%d0 <== NOT EXECUTED 4b492: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4b498: 4e5e unlk %fp <== NOT EXECUTED 4b49a: 4e75 rts <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 4b49c: 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) 4b4a2: 2f0b movel %a3,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 4b4a4: c1aa 0014 andl %d0,%a2@(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) 4b4a8: 4eb9 0004 bc52 jsr 4bc52 <== NOT EXECUTED 4b4ae: 588f addql #4,%sp <== NOT EXECUTED 4b4b0: 4a80 tstl %d0 <== NOT EXECUTED 4b4b2: 66dc bnes 4b490 <== NOT EXECUTED 4b4b4: 4a6b 0032 tstw %a3@(50) <== NOT EXECUTED 4b4b8: 66d6 bnes 4b490 <== NOT EXECUTED free(jnode); 4b4ba: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4b4bc: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED 4b4c2: 588f addql #4,%sp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 4b4c4: 2002 movel %d2,%d0 <== NOT EXECUTED 4b4c6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4b4cc: 4e5e unlk %fp <== NOT EXECUTED 4b4ce: 4e75 rts <== 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) free(jnode); } IMFS_FIFO_RETURN(err); 4b4d0: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4b4d6: 4482 negl %d2 <== NOT EXECUTED 4b4d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b4da: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b4dc: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4b4de: 2002 movel %d2,%d0 <== NOT EXECUTED 4b4e0: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4b4e6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b2fc : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4b2fc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4b300: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4b304: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 4b308: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 4b30c: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 4b30e: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 4b314: 6724 beqs 4b33a <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 4b316: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4b318: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 4b31c: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4b31e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b320: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 4b324: 4eb9 0004 9ea6 jsr 49ea6 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4b32a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b32e: 4a80 tstl %d0 <== NOT EXECUTED 4b330: 6d46 blts 4b378 <== NOT EXECUTED } 4b332: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b336: 4e5e unlk %fp <== NOT EXECUTED 4b338: 4e75 rts <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 4b33a: 4a89 tstl %a1 <== NOT EXECUTED 4b33c: 6724 beqs 4b362 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 4b33e: 4a91 tstl %a1@ <== NOT EXECUTED 4b340: 6710 beqs 4b352 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 4b342: 7201 moveq #1,%d1 <== NOT EXECUTED 4b344: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 4b346: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b34a: 4e5e unlk %fp <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 4b34c: 83a8 0014 orl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 4b350: 4e75 rts <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4b352: 72fe moveq #-2,%d1 <== NOT EXECUTED 4b354: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 4b356: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b35a: 4e5e unlk %fp <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4b35c: c3a8 0014 andl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 4b360: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4b362: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 4b368: 740e moveq #14,%d2 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4b36a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b36c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b36e: 2082 movel %d2,%a0@ <== NOT EXECUTED } 4b370: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b374: 4e5e unlk %fp <== NOT EXECUTED 4b376: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4b378: 2400 movel %d0,%d2 <== NOT EXECUTED 4b37a: 4482 negl %d2 <== NOT EXECUTED 4b37c: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4b382: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b384: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b386: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b388: 60e6 bras 4b370 <== NOT EXECUTED =============================================================================== 0004b298 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4b298: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 4b29c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4b2a0: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4b2a4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4b2a6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 4b2aa: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 4b2ae: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4b2b2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4b2b6: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 4b2ba: 4eb9 0004 9e48 jsr 49e48 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4b2c0: 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); 4b2c4: 2800 movel %d0,%d4 <== NOT EXECUTED 4b2c6: 2600 movel %d0,%d3 <== NOT EXECUTED 4b2c8: 5bc2 smi %d2 <== NOT EXECUTED 4b2ca: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4b2cc: 4a82 tstl %d2 <== NOT EXECUTED 4b2ce: 6b0e bmis 4b2de <== NOT EXECUTED } 4b2d0: 2203 movel %d3,%d1 <== NOT EXECUTED 4b2d2: 2002 movel %d2,%d0 <== NOT EXECUTED 4b2d4: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4b2da: 4e5e unlk %fp <== NOT EXECUTED 4b2dc: 4e75 rts <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 4b2de: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4b2e4: 4484 negl %d4 <== NOT EXECUTED 4b2e6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b2e8: 74ff moveq #-1,%d2 <== NOT EXECUTED 4b2ea: 76ff moveq #-1,%d3 <== NOT EXECUTED 4b2ec: 2084 movel %d4,%a0@ <== NOT EXECUTED } 4b2ee: 2203 movel %d3,%d1 <== NOT EXECUTED 4b2f0: 2002 movel %d2,%d0 <== NOT EXECUTED 4b2f2: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4b2f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b4ea : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4b4ea: 4e56 0000 linkw %fp,#0 4b4ee: 206e 0008 moveal %fp@(8),%a0 4b4f2: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4b4f4: 2f08 movel %a0,%sp@- 4b4f6: 2068 0038 moveal %a0@(56),%a0 4b4fa: 41e8 004c lea %a0@(76),%a0 4b4fe: 2f08 movel %a0,%sp@- 4b500: 4eb9 0004 a3fa jsr 4a3fa IMFS_FIFO_RETURN(err); 4b506: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4b508: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 4b50a: 6d0a blts 4b516 <== ALWAYS TAKEN } 4b50c: 2002 movel %d2,%d0 <== NOT EXECUTED 4b50e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b512: 4e5e unlk %fp <== NOT EXECUTED 4b514: 4e75 rts <== NOT EXECUTED ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 4b516: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4b51c: 4482 negl %d2 4b51e: 2040 moveal %d0,%a0 4b520: 2082 movel %d2,%a0@ 4b522: 74ff moveq #-1,%d2 } 4b524: 2002 movel %d2,%d0 4b526: 242e fffc movel %fp@(-4),%d2 4b52a: 4e5e unlk %fp ... =============================================================================== 0004b3fe : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4b3fe: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 4b402: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4b406: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b408: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 4b40a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4b40c: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4b410: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 4b414: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 4b418: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 4b41c: 4eb9 0004 a0e4 jsr 4a0e4 <== NOT EXECUTED if (err > 0) 4b422: 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); 4b426: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 4b428: 6f22 bles 4b44c <== NOT EXECUTED IMFS_update_atime(jnode); 4b42a: 42a7 clrl %sp@- <== NOT EXECUTED 4b42c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4b430: 4eb9 0004 2e6c jsr 42e6c <== NOT EXECUTED 4b436: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 4b43c: 508f addql #8,%sp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 4b43e: 2002 movel %d2,%d0 <== NOT EXECUTED 4b440: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4b444: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4b448: 4e5e unlk %fp <== NOT EXECUTED 4b44a: 4e75 rts <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 4b44c: 4a80 tstl %d0 <== NOT EXECUTED 4b44e: 67ee beqs 4b43e <== NOT EXECUTED 4b450: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4b456: 4482 negl %d2 <== NOT EXECUTED 4b458: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b45a: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b45c: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4b45e: 2002 movel %d2,%d0 <== NOT EXECUTED 4b460: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4b464: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4b468: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b38a : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4b38a: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 4b38e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4b392: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b394: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 4b396: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4b398: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4b39c: 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; 4b3a0: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 4b3a4: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 4b3a8: 4eb9 0004 9f06 jsr 49f06 <== NOT EXECUTED if (err > 0) { 4b3ae: 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); 4b3b2: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 4b3b4: 6f28 bles 4b3de <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 4b3b6: 42a7 clrl %sp@- <== NOT EXECUTED 4b3b8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4b3bc: 4eb9 0004 2e6c jsr 42e6c <== NOT EXECUTED 4b3c2: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 4b3c6: 508f addql #8,%sp <== NOT EXECUTED 4b3c8: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 4b3cc: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 4b3d0: 2002 movel %d2,%d0 <== NOT EXECUTED 4b3d2: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4b3d6: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4b3da: 4e5e unlk %fp <== NOT EXECUTED 4b3dc: 4e75 rts <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 4b3de: 4a80 tstl %d0 <== NOT EXECUTED 4b3e0: 67ee beqs 4b3d0 <== NOT EXECUTED 4b3e2: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4b3e8: 4482 negl %d2 <== NOT EXECUTED 4b3ea: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b3ec: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b3ee: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4b3f0: 2002 movel %d2,%d0 <== NOT EXECUTED 4b3f2: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4b3f6: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4b3fa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b5ec : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4b5ec: 4e56 fff0 linkw %fp,#-16 4b5f0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4b5f4: 246e 0008 moveal %fp@(8),%a2 4b5f8: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4b5fc: 4a8a tstl %a2 4b5fe: 6776 beqs 4b676 <== NEVER TAKEN if ( !name ) 4b600: 4a82 tstl %d2 4b602: 6756 beqs 4b65a <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4b604: 4879 0005 d87a pea 5d87a 4b60a: 47f9 0005 00c0 lea 500c0 ,%a3 4b610: 2f02 movel %d2,%sp@- 4b612: 4e93 jsr %a3@ 4b614: 508f addql #8,%sp 4b616: 4a80 tstl %d0 4b618: 6714 beqs 4b62e <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 4b61a: 4879 0005 d87c pea 5d87c 4b620: 2f02 movel %d2,%sp@- 4b622: 4e93 jsr %a3@ 4b624: 508f addql #8,%sp 4b626: 4a80 tstl %d0 4b628: 6610 bnes 4b63a <== ALWAYS TAKEN return directory->Parent; 4b62a: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4b62e: 200a movel %a2,%d0 <== NOT EXECUTED 4b630: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 4b636: 4e5e unlk %fp <== NOT EXECUTED 4b638: 4e75 rts <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 4b63a: 286a 004c moveal %a2@(76),%a4 4b63e: 45ea 0050 lea %a2@(80),%a2 4b642: b5cc cmpal %a4,%a2 4b644: 6714 beqs 4b65a !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 ) ) 4b646: 486c 000c pea %a4@(12) 4b64a: 2f02 movel %d2,%sp@- 4b64c: 4e93 jsr %a3@ 4b64e: 508f addql #8,%sp 4b650: 4a80 tstl %d0 4b652: 6714 beqs 4b668 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 ) { 4b654: 2854 moveal %a4@,%a4 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 4b656: b5cc cmpal %a4,%a2 4b658: 66ec bnes 4b646 4b65a: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4b65c: 200a movel %a2,%d0 4b65e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b664: 4e5e unlk %fp 4b666: 4e75 rts !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 ) ) 4b668: 244c moveal %a4,%a2 return the_jnode; } return 0; } 4b66a: 200a movel %a2,%d0 4b66c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b672: 4e5e unlk %fp 4b674: 4e75 rts /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4b676: 4879 0005 df9d pea 5df9d <_global_impure_ptr+0x1b1> <== NOT EXECUTED 4b67c: 4879 0005 d87f pea 5d87f <__FUNCTION__.5393> <== NOT EXECUTED 4b682: 4878 002a pea 2a <== NOT EXECUTED 4b686: 4879 0005 d82a pea 5d82a <== NOT EXECUTED 4b68c: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED ... =============================================================================== 0004b53c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4b53c: 4e56 ffd8 linkw %fp,#-40 4b540: 206e 0008 moveal %fp@(8),%a0 4b544: 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; 4b548: 47ee ffec lea %fp@(-20),%a3 4b54c: 49f9 0004 aae4 lea 4aae4 ,%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4b552: 4bf9 0004 2598 lea 42598 ,%a5 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4b558: 26a8 001c movel %a0@(28),%a3@ /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 4b55c: 2468 001c moveal %a0@(28),%a2 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4b560: 42a8 001c clrl %a0@(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; loc = temp_mt_entry->mt_fs_root; 4b564: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4b56a: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4b570: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4b576: 2d68 002c fffc movel %a0@(44),%fp@(-4) */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4b57c: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4b580: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4b584: 2f0b movel %a3,%sp@- 4b586: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4b588: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b58a: 200a movel %a2,%d0 4b58c: 0680 0000 0050 addil #80,%d0 4b592: 7201 moveq #1,%d1 4b594: b2aa 0048 cmpl %a2@(72),%d1 4b598: 6634 bnes 4b5ce 4b59a: b0aa 004c cmpl %a2@(76),%d0 4b59e: 672e beqs 4b5ce result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4b5a0: 4a8a tstl %a2 4b5a2: 671e beqs 4b5c2 if ( jnode->type == IMFS_DIRECTORY ) { 4b5a4: 7001 moveq #1,%d0 4b5a6: b0aa 0048 cmpl %a2@(72),%d0 4b5aa: 66d0 bnes 4b57c <== NEVER TAKEN 4b5ac: 200a movel %a2,%d0 4b5ae: 0680 0000 0050 addil #80,%d0 4b5b4: b0aa 004c cmpl %a2@(76),%d0 4b5b8: 67c2 beqs 4b57c if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4b5ba: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4b5be: 4a8a tstl %a2 4b5c0: 66ba bnes 4b57c <== ALWAYS TAKEN 4b5c2: 4280 clrl %d0 return 0; } 4b5c4: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4b5ca: 4e5e unlk %fp 4b5cc: 4e75 rts result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4b5ce: 2f0b movel %a3,%sp@- 4b5d0: 42a7 clrl %sp@- 4b5d2: 4e95 jsr %a5@ if (result != 0) 4b5d4: 508f addql #8,%sp 4b5d6: 4a80 tstl %d0 4b5d8: 6604 bnes 4b5de <== NEVER TAKEN 4b5da: 2442 moveal %d2,%a2 4b5dc: 60c2 bras 4b5a0 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4b5de: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4b5e0: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4b5e6: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004b694 : const char *path, int pathlen, char *token, int *token_len ) { 4b694: 4e56 ffe4 linkw %fp,#-28 4b698: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4b69c: 286e 0008 moveal %fp@(8),%a4 4b6a0: 47f9 0004 3d74 lea 43d74 ,%a3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4b6a6: 4282 clrl %d2 4b6a8: 1614 moveb %a4@,%d3 const char *path, int pathlen, char *token, int *token_len ) { 4b6aa: 282e 000c movel %fp@(12),%d4 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4b6ae: 1003 moveb %d3,%d0 const char *path, int pathlen, char *token, int *token_len ) { 4b6b0: 246e 0010 moveal %fp@(16),%a2 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4b6b4: 49c0 extbl %d0 const char *path, int pathlen, char *token, int *token_len ) { 4b6b6: 2a6e 0014 moveal %fp@(20),%a5 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4b6ba: 2f00 movel %d0,%sp@- 4b6bc: 4e93 jsr %a3@ 4b6be: 588f addql #4,%sp 4b6c0: 4a80 tstl %d0 4b6c2: 6622 bnes 4b6e6 4b6c4: b882 cmpl %d2,%d4 4b6c6: 6f1e bles 4b6e6 token[i] = c; if ( i == IMFS_NAME_MAX ) 4b6c8: 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; 4b6ca: 1583 2800 moveb %d3,%a2@(00000000,%d2:l) if ( i == IMFS_NAME_MAX ) 4b6ce: b082 cmpl %d2,%d0 4b6d0: 6770 beqs 4b742 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4b6d2: 5282 addql #1,%d2 4b6d4: 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) ) { 4b6d8: 1003 moveb %d3,%d0 4b6da: 49c0 extbl %d0 4b6dc: 2f00 movel %d0,%sp@- 4b6de: 4e93 jsr %a3@ 4b6e0: 588f addql #4,%sp 4b6e2: 4a80 tstl %d0 4b6e4: 67de beqs 4b6c4 /* * Copy a seperator into token. */ if ( i == 0 ) { 4b6e6: 4a82 tstl %d2 4b6e8: 6616 bnes 4b700 token[i] = c; 4b6ea: 1483 moveb %d3,%a2@ if ( (token[i] != '\0') && pathlen ) { 4b6ec: 6704 beqs 4b6f2 4b6ee: 4a84 tstl %d4 4b6f0: 666c bnes 4b75e type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4b6f2: 4280 clrl %d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b6f4: 2a82 movel %d2,%a5@ else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b6f6: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b6fc: 4e5e unlk %fp 4b6fe: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4b700: 4a32 28ff tstb %a2@(ffffffff,%d2:l) 4b704: 6706 beqs 4b70c <== NEVER TAKEN token[i] = '\0'; 4b706: 4200 clrb %d0 4b708: 1580 2800 moveb %d0,%a2@(00000000,%d2:l) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4b70c: 4879 0005 d896 pea 5d896 <__FUNCTION__.5393+0x17> 4b712: 47f9 0005 00c0 lea 500c0 ,%a3 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b718: 2a82 movel %d2,%a5@ * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4b71a: 2f0a movel %a2,%sp@- 4b71c: 4e93 jsr %a3@ 4b71e: 508f addql #8,%sp 4b720: 4a80 tstl %d0 4b722: 672c beqs 4b750 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4b724: 4879 0005 d897 pea 5d897 <__FUNCTION__.5393+0x18> 4b72a: 2f0a movel %a2,%sp@- 4b72c: 4e93 jsr %a3@ 4b72e: 508f addql #8,%sp 4b730: 4a80 tstl %d0 4b732: 6634 bnes 4b768 4b734: 103c 0001 moveb #1,%d0 type = IMFS_CURRENT_DIR; } return type; } 4b738: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b73e: 4e5e unlk %fp 4b740: 4e75 rts c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) 4b742: 103c 0004 moveb #4,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b746: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b74c: 4e5e unlk %fp 4b74e: 4e75 rts * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4b750: 103c 0002 moveb #2,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b754: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b75a: 4e5e unlk %fp 4b75c: 4e75 rts */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 4b75e: 143c 0001 moveb #1,%d2 4b762: 7001 moveq #1,%d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b764: 2a82 movel %d2,%a5@ 4b766: 608e bras 4b6f6 */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4b768: 7003 moveq #3,%d0 type = IMFS_CURRENT_DIR; } return type; } 4b76a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b770: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000420d8 : int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 420d8: 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 ) { 420da: 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, 420de: 2079 0005 e5f8 moveal 5e5f8 ,%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 ) { 420e4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 420e8: 246e 0008 moveal %fp@(8),%a2 420ec: 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) { 420f0: b088 cmpl %a0,%d0 420f2: 6716 beqs 4210a <== NEVER TAKEN 420f4: 4200 clrb %d0 420f6: 7220 moveq #32,%d1 420f8: 5280 addql #1,%d0 420fa: b288 cmpl %a0,%d1 420fc: 670c beqs 4210a 420fe: 7605 moveq #5,%d3 42100: d281 addl %d1,%d1 42102: b680 cmpl %d0,%d3 42104: 66f2 bnes 420f8 <== ALWAYS TAKEN 42106: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4210a: 23c8 0005 f498 movel %a0,5f498 /* * 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(); 42110: 4eb9 0004 a8a4 jsr 4a8a4 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 ) ); 42116: 4878 0010 pea 10 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4211a: 41f9 0005 d706 lea 5d706 ,%a0 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 42120: 4878 0001 pea 1 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 42124: 2550 0038 movel %a0@,%a2@(56) 42128: 41f9 0005 d70a lea 5d70a ,%a0 4212e: 2550 003c movel %a0@,%a2@(60) 42132: 41f9 0005 d70e lea 5d70e ,%a0 42138: 2550 0040 movel %a0@,%a2@(64) 4213c: 41f9 0005 d712 lea 5d712 ,%a0 42142: 2550 0044 movel %a0@,%a2@(68) 42146: 41f9 0005 d716 lea 5d716 ,%a0 4214c: 2550 0048 movel %a0@,%a2@(72) 42150: 41f9 0005 d71a lea 5d71a ,%a0 42156: 2550 004c movel %a0@,%a2@(76) 4215a: 41f9 0005 d71e lea 5d71e ,%a0 42160: 2550 0050 movel %a0@,%a2@(80) 42164: 41f9 0005 d722 lea 5d722 ,%a0 4216a: 2550 0054 movel %a0@,%a2@(84) 4216e: 41f9 0005 d726 lea 5d726 ,%a0 42174: 2550 0058 movel %a0@,%a2@(88) 42178: 41f9 0005 d72a lea 5d72a ,%a0 4217e: 2550 005c movel %a0@,%a2@(92) 42182: 41f9 0005 d72e lea 5d72e ,%a0 42188: 2550 0060 movel %a0@,%a2@(96) 4218c: 41f9 0005 d732 lea 5d732 ,%a0 * * 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; 42192: 256e 000c 0028 movel %fp@(12),%a2@(40) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 42198: 2550 0064 movel %a0@,%a2@(100) /* * 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(); 4219c: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 421a0: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 421a4: 4eb9 0004 2918 jsr 42918 if ( !fs_info ) { 421aa: 508f addql #8,%sp temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 421ac: 2040 moveal %d0,%a0 if ( !fs_info ) { 421ae: 4a80 tstl %d0 421b0: 6742 beqs 421f4 <== NEVER TAKEN /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 421b2: 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; 421b4: 7601 moveq #1,%d3 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 421b6: 2140 0004 movel %d0,%a0@(4) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 421ba: 2039 0005 f49c movel 5f49c ,%d0 421c0: 2200 movel %d0,%d1 421c2: 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; 421c4: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 421c8: 23c1 0005 f49c movel %d1,5f49c fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 421ce: 216e 0010 0008 movel %fp@(16),%a0@(8) fs_info->directory_handlers = directory_handlers; 421d4: 2142 000c movel %d2,%a0@(12) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 421d8: 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; 421dc: 2548 0034 movel %a0,%a2@(52) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 421e0: 2080 movel %d0,%a0@ jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 421e2: 4eb9 0004 9e52 jsr 49e52 return 0; } 421e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 421ee: 4280 clrl %d0 return 0; } 421f0: 4e5e unlk %fp 421f2: 4e75 rts /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 421f4: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 421f8: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 421fe: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42204: 588f addql #4,%sp <== NOT EXECUTED 42206: 720c moveq #12,%d1 <== NOT EXECUTED 42208: 2040 moveal %d0,%a0 <== NOT EXECUTED 4220a: 70ff moveq #-1,%d0 <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4220c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); 42212: 2081 movel %d1,%a0@ <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 42214: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042218 : /* * 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 ) 42218: 4280 clrl %d0 4221a: 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 */ ) { 4221c: 4e56 ffbc linkw %fp,#-68 42220: 206e 0008 moveal %fp@(8),%a0 42224: 2f03 movel %d3,%sp@- int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42226: 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 */ ) { 42228: 2f02 movel %d2,%sp@- 4222a: 242e 0010 movel %fp@(16),%d2 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 4222e: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 42232: 3028 0032 movew %a0@(50),%d0 42236: b280 cmpl %d0,%d1 42238: 6578 bcss 422b2 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 4223a: 2f02 movel %d2,%sp@- 4223c: 260e movel %fp,%d3 4223e: 0683 ffff ffbf addil #-65,%d3 42244: 4eb9 0005 05e4 jsr 505e4 4224a: 588f addql #4,%sp 4224c: 486e fffc pea %fp@(-4) 42250: 2f03 movel %d3,%sp@- 42252: 2f00 movel %d0,%sp@- 42254: 2f02 movel %d2,%sp@- 42256: 4eb9 0004 b694 jsr 4b694 * 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( 4225c: 486e ffe0 pea %fp@(-32) 42260: 2f3c 0000 a1ff movel #41471,%sp@- 42266: 2f03 movel %d3,%sp@- 42268: 4878 0003 pea 3 4226c: 2f2e 000c movel %fp@(12),%sp@- 42270: 4eb9 0004 a8de jsr 4a8de new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 42276: 4fef 0024 lea %sp@(36),%sp 4227a: 4a80 tstl %d0 4227c: 674e beqs 422cc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 4227e: 206e ffe0 moveal %fp@(-32),%a0 42282: 3028 0032 movew %a0@(50),%d0 42286: 5280 addql #1,%d0 42288: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 4228c: 42a7 clrl %sp@- 4228e: 486e fff4 pea %fp@(-12) 42292: 4eb9 0004 2e6c jsr 42e6c 42298: 206e ffe0 moveal %fp@(-32),%a0 return 0; 4229c: 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 ); 4229e: 4280 clrl %d0 422a0: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 422a6: 242e ffb4 movel %fp@(-76),%d2 422aa: 262e ffb8 movel %fp@(-72),%d3 422ae: 4e5e unlk %fp 422b0: 4e75 rts /* * 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 ) rtems_set_errno_and_return_minus_one( EMLINK ); 422b2: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 422b8: 741f moveq #31,%d2 422ba: 2040 moveal %d0,%a0 422bc: 70ff moveq #-1,%d0 422be: 2082 movel %d2,%a0@ */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 422c0: 242e ffb4 movel %fp@(-76),%d2 422c4: 262e ffb8 movel %fp@(-72),%d3 422c8: 4e5e unlk %fp 422ca: 4e75 rts ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 422cc: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 422d2: 242e ffb4 movel %fp@(-76),%d2 <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 422d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 422d8: 720c moveq #12,%d1 <== NOT EXECUTED 422da: 70ff moveq #-1,%d0 <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 422dc: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 422e0: 4e5e unlk %fp <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 422e2: 2081 movel %d1,%a0@ <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } ... =============================================================================== 0004d88a : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4d88a: 4e56 0000 linkw %fp,#0 4d88e: 206e 0008 moveal %fp@(8),%a0 4d892: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4d894: 4a88 tstl %a0 4d896: 6764 beqs 4d8fc <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4d898: 7005 moveq #5,%d0 4d89a: b0a8 0048 cmpl %a0@(72),%d0 4d89e: 6640 bnes 4d8e0 <== NEVER TAKEN 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 ); 4d8a0: 4878 0001 pea 1 4d8a4: 2f2e 000c movel %fp@(12),%sp@- 4d8a8: 2f08 movel %a0,%sp@- 4d8aa: 4eb9 0004 d3d8 jsr 4d3d8 if ( *block_entry_ptr ) 4d8b0: 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 ); 4d8b4: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4d8b6: 4a92 tstl %a2@ 4d8b8: 670a beqs 4d8c4 #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 4d8ba: 4280 clrl %d0 return 0; } 4d8bc: 246e fffc moveal %fp@(-4),%a2 4d8c0: 4e5e unlk %fp 4d8c2: 4e75 rts #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4d8c4: 4eb9 0004 d3b4 jsr 4d3b4 if ( !memory ) 4d8ca: 4a80 tstl %d0 4d8cc: 6706 beqs 4d8d4 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 4d8ce: 2480 movel %d0,%a2@ 4d8d0: 4280 clrl %d0 4d8d2: 60e8 bras 4d8bc return 0; } 4d8d4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 4d8d8: 103c 0001 moveb #1,%d0 <== NOT EXECUTED return 1; *block_entry_ptr = memory; return 0; } 4d8dc: 4e5e unlk %fp <== NOT EXECUTED 4d8de: 4e75 rts <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4d8e0: 4879 0005 daac pea 5daac <== NOT EXECUTED 4d8e6: 4879 0005 dbc5 pea 5dbc5 <__FUNCTION__.6037> <== NOT EXECUTED 4d8ec: 4878 016d pea 16d <== NOT EXECUTED 4d8f0: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4d8f6: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4d8fc: 4879 0005 da58 pea 5da58 <== NOT EXECUTED 4d902: 4879 0005 dbc5 pea 5dbc5 <__FUNCTION__.6037> <== NOT EXECUTED 4d908: 4878 0169 pea 169 <== NOT EXECUTED 4d90c: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4d912: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 0004d918 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4d918: 4e56 ffdc linkw %fp,#-36 4d91c: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4d920: 246e 0008 moveal %fp@(8),%a2 4d924: 262e 000c movel %fp@(12),%d3 4d928: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 4d92c: 4a8a tstl %a2 4d92e: 6700 0102 beqw 4da32 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4d932: 7005 moveq #5,%d0 4d934: b0aa 0048 cmpl %a2@(72),%d0 4d938: 6600 0114 bnew 4da4e if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4d93c: 2439 0005 f498 movel 5f498 ,%d2 4d942: 2202 movel %d2,%d1 4d944: e489 lsrl #2,%d1 4d946: 2001 movel %d1,%d0 4d948: 5280 addql #1,%d0 4d94a: 4c01 0800 mulsl %d1,%d0 4d94e: 4285 clrl %d5 4d950: 5280 addql #1,%d0 4d952: 4c01 0800 mulsl %d1,%d0 4d956: 5380 subql #1,%d0 4d958: 4c02 0800 mulsl %d2,%d0 4d95c: 2c00 movel %d0,%d6 4d95e: 2005 movel %d5,%d0 4d960: 2206 movel %d6,%d1 4d962: 9284 subl %d4,%d1 4d964: 9183 subxl %d3,%d0 4d966: 6f00 00b2 blew 4da1a rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 4d96a: 2a2a 004c movel %a2@(76),%d5 4d96e: 2c2a 0050 movel %a2@(80),%d6 4d972: 2003 movel %d3,%d0 4d974: 2204 movel %d4,%d1 4d976: 9286 subl %d6,%d1 4d978: 9185 subxl %d5,%d0 4d97a: 6f62 bles 4d9de /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d97c: 47f9 0005 ad88 lea 5ad88 <__divdi3>,%a3 4d982: 2202 movel %d2,%d1 4d984: 5bc0 smi %d0 4d986: 49c0 extbl %d0 4d988: 2840 moveal %d0,%a4 4d98a: 2a41 moveal %d1,%a5 4d98c: 2f0d movel %a5,%sp@- 4d98e: 2f00 movel %d0,%sp@- 4d990: 2f04 movel %d4,%sp@- 4d992: 2f03 movel %d3,%sp@- 4d994: 4e93 jsr %a3@ 4d996: 4fef 0010 lea %sp@(16),%sp 4d99a: 2401 movel %d1,%d2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d99c: 2f0d movel %a5,%sp@- 4d99e: 2f0c movel %a4,%sp@- 4d9a0: 2f06 movel %d6,%sp@- 4d9a2: 2f05 movel %d5,%sp@- 4d9a4: 4e93 jsr %a3@ 4d9a6: 4fef 0010 lea %sp@(16),%sp 4d9aa: 2841 moveal %d1,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4d9ac: b282 cmpl %d2,%d1 4d9ae: 621a bhis 4d9ca <== NEVER TAKEN 4d9b0: 2a01 movel %d1,%d5 4d9b2: 47f9 0004 d88a lea 4d88a ,%a3 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4d9b8: 2f05 movel %d5,%sp@- 4d9ba: 2f0a movel %a2,%sp@- 4d9bc: 4e93 jsr %a3@ 4d9be: 508f addql #8,%sp 4d9c0: 4a80 tstl %d0 4d9c2: 6626 bnes 4d9ea <== NEVER TAKEN /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4d9c4: 5285 addql #1,%d5 4d9c6: ba82 cmpl %d2,%d5 4d9c8: 63ee blss 4d9b8 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4d9ca: 4280 clrl %d0 4d9cc: 2543 004c movel %d3,%a2@(76) 4d9d0: 2544 0050 movel %d4,%a2@(80) return 0; } 4d9d4: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4d9da: 4e5e unlk %fp 4d9dc: 4e75 rts rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 4d9de: 4280 clrl %d0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 4d9e0: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4d9e6: 4e5e unlk %fp 4d9e8: 4e75 rts * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4d9ea: ba8c cmpl %a4,%d5 <== NOT EXECUTED 4d9ec: 6514 bcss 4da02 <== NOT EXECUTED 4d9ee: 47f9 0004 d60a lea 4d60a ,%a3 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4d9f4: 2f05 movel %d5,%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-- ) { 4d9f6: 5385 subql #1,%d5 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4d9f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d9fa: 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-- ) { 4d9fc: 508f addql #8,%sp <== NOT EXECUTED 4d9fe: ba8c cmpl %a4,%d5 <== NOT EXECUTED 4da00: 64f2 bccs 4d9f4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4da02: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4da08: 721c moveq #28,%d1 <== NOT EXECUTED 4da0a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4da0c: 70ff moveq #-1,%d0 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 4da0e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4da14: 2081 movel %d1,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 4da16: 4e5e unlk %fp <== NOT EXECUTED 4da18: 4e75 rts <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 4da1a: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4da20: 7416 moveq #22,%d2 <== NOT EXECUTED 4da22: 2040 moveal %d0,%a0 <== NOT EXECUTED 4da24: 70ff moveq #-1,%d0 <== NOT EXECUTED 4da26: 2082 movel %d2,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 4da28: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4da2e: 4e5e unlk %fp <== NOT EXECUTED 4da30: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4da32: 4879 0005 da58 pea 5da58 <== NOT EXECUTED 4da38: 4879 0005 dbdb pea 5dbdb <__FUNCTION__.5988> <== NOT EXECUTED 4da3e: 4878 0131 pea 131 <== NOT EXECUTED 4da42: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4da48: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4da4e: 4879 0005 daac pea 5daac <== NOT EXECUTED 4da54: 4879 0005 dbdb pea 5dbdb <__FUNCTION__.5988> <== NOT EXECUTED 4da5a: 4878 0135 pea 135 <== NOT EXECUTED 4da5e: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4da64: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 0004d3d8 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4d3d8: 4e56 fff0 linkw %fp,#-16 4d3dc: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4d3e0: 246e 0008 moveal %fp@(8),%a2 4d3e4: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4d3e8: 4a8a tstl %a2 4d3ea: 6700 0180 beqw 4d56c if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4d3ee: 7005 moveq #5,%d0 4d3f0: b0aa 0048 cmpl %a2@(72),%d0 4d3f4: 6600 0192 bnew 4d588 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4d3f8: 2239 0005 f498 movel 5f498 ,%d1 4d3fe: e489 lsrl #2,%d1 4d400: 2001 movel %d1,%d0 4d402: 5380 subql #1,%d0 4d404: b082 cmpl %d2,%d0 4d406: 6448 bccs 4d450 <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4d408: 2001 movel %d1,%d0 <== NOT EXECUTED 4d40a: 5280 addql #1,%d0 <== NOT EXECUTED 4d40c: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 4d410: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d412: 5388 subql #1,%a0 <== NOT EXECUTED 4d414: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 4d416: 6572 bcss 4d48a <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4d418: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4d41a: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4d41e: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4d422: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4d426: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4d42a: 6700 00fa beqw 4d526 <== NOT EXECUTED if ( !p ) { 4d42e: 4a88 tstl %a0 <== NOT EXECUTED 4d430: 6700 00d6 beqw 4d508 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 4d434: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4d438: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 4d43a: 4a88 tstl %a0 <== NOT EXECUTED 4d43c: 6700 00b2 beqw 4d4f0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 4d440: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4d444: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4d446: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4d44c: 4e5e unlk %fp <== NOT EXECUTED 4d44e: 4e75 rts <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 4d450: 206a 0054 moveal %a2@(84),%a0 if ( malloc_it ) { 4d454: 4aae 0010 tstl %fp@(16) 4d458: 6700 00e6 beqw 4d540 if ( !p ) { 4d45c: 4a88 tstl %a0 4d45e: 6710 beqs 4d470 } if ( !p ) return 0; return &info->indirect[ my_block ]; 4d460: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4d464: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4d466: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d46c: 4e5e unlk %fp 4d46e: 4e75 rts p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4d470: 4eb9 0004 d3b4 jsr 4d3b4 4d476: 2040 moveal %d0,%a0 if ( !p ) 4d478: 4a80 tstl %d0 4d47a: 6700 00b8 beqw 4d534 return 0; info->indirect = p; 4d47e: 2540 0054 movel %d0,%a2@(84) } if ( !p ) return 0; return &info->indirect[ my_block ]; 4d482: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4d486: 2008 movel %a0,%d0 4d488: 60dc bras 4d466 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4d48a: 2600 movel %d0,%d3 <== NOT EXECUTED 4d48c: 5283 addql #1,%d3 <== NOT EXECUTED 4d48e: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 4d492: 5383 subql #1,%d3 <== NOT EXECUTED 4d494: b682 cmpl %d2,%d3 <== NOT EXECUTED 4d496: 6500 009c bcsw 4d534 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 4d49a: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4d49c: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4d4a0: 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; 4d4a4: 206a 005c moveal %a2@(92),%a0 <== 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; 4d4a8: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 4d4ac: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4d4b0: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4d4b4: 6700 0098 beqw 4d54e <== NOT EXECUTED if ( !p ) { 4d4b8: 4a88 tstl %a0 <== NOT EXECUTED 4d4ba: 6610 bnes 4d4cc <== NOT EXECUTED p = memfile_alloc_block(); 4d4bc: 4eb9 0004 d3b4 jsr 4d3b4 <== NOT EXECUTED 4d4c2: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 4d4c4: 4a80 tstl %d0 <== NOT EXECUTED 4d4c6: 676c beqs 4d534 <== NOT EXECUTED return 0; info->triply_indirect = p; 4d4c8: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 4d4cc: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4d4d0: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 4d4d2: 4a88 tstl %a0 <== NOT EXECUTED 4d4d4: 660e bnes 4d4e4 <== NOT EXECUTED p1 = memfile_alloc_block(); 4d4d6: 4eb9 0004 d3b4 jsr 4d3b4 <== NOT EXECUTED 4d4dc: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 4d4de: 4a80 tstl %d0 <== NOT EXECUTED 4d4e0: 6752 beqs 4d534 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 4d4e2: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 4d4e4: 45f0 4c00 lea %a0@(00000000,%d4:l:4),%a2 <== NOT EXECUTED 4d4e8: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 4d4ea: 4a88 tstl %a0 <== NOT EXECUTED 4d4ec: 6600 ff52 bnew 4d440 <== NOT EXECUTED p2 = memfile_alloc_block(); 4d4f0: 4eb9 0004 d3b4 jsr 4d3b4 <== NOT EXECUTED 4d4f6: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p2 ) 4d4f8: 4a80 tstl %d0 <== NOT EXECUTED 4d4fa: 6738 beqs 4d534 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4d4fc: 2480 movel %d0,%a2@ <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 4d4fe: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4d502: 2008 movel %a0,%d0 <== NOT EXECUTED 4d504: 6000 ff40 braw 4d446 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4d508: 4eb9 0004 d3b4 jsr 4d3b4 <== NOT EXECUTED 4d50e: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 4d510: 4a80 tstl %d0 <== NOT EXECUTED 4d512: 6720 beqs 4d534 <== NOT EXECUTED return 0; info->doubly_indirect = p; 4d514: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 4d518: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4d51c: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 4d51e: 4a88 tstl %a0 <== NOT EXECUTED 4d520: 6600 ff1e bnew 4d440 <== NOT EXECUTED 4d524: 60ca bras 4d4f0 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 4d526: 4a88 tstl %a0 <== NOT EXECUTED 4d528: 670a beqs 4d534 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4d52a: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 4d52e: 4a88 tstl %a0 <== NOT EXECUTED 4d530: 6600 ff0e bnew 4d440 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 4d534: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4d536: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4d53c: 4e5e unlk %fp <== NOT EXECUTED 4d53e: 4e75 rts <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 4d540: 4a88 tstl %a0 4d542: 67f0 beqs 4d534 <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; 4d544: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4d548: 2008 movel %a0,%d0 4d54a: 6000 ff1a braw 4d466 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 4d54e: 4a88 tstl %a0 <== NOT EXECUTED 4d550: 67e2 beqs 4d534 <== 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 ]; 4d552: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p1 ) 4d556: 4a88 tstl %a0 <== NOT EXECUTED 4d558: 67da beqs 4d534 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 4d55a: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED if ( !p2 ) 4d55e: 4a88 tstl %a0 <== NOT EXECUTED 4d560: 67d2 beqs 4d534 <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; 4d562: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4d566: 2008 movel %a0,%d0 <== NOT EXECUTED 4d568: 6000 fedc braw 4d446 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4d56c: 4879 0005 da58 pea 5da58 <== NOT EXECUTED 4d572: 4879 0005 db36 pea 5db36 <__FUNCTION__.6347> <== NOT EXECUTED 4d578: 4878 0388 pea 388 <== NOT EXECUTED 4d57c: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4d582: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4d588: 4879 0005 daac pea 5daac <== NOT EXECUTED 4d58e: 4879 0005 db36 pea 5db36 <__FUNCTION__.6347> <== NOT EXECUTED 4d594: 4878 038c pea 38c <== NOT EXECUTED 4d598: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4d59e: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 0004df22 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4df22: 4e56 ffc0 linkw %fp,#-64 4df26: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4df2a: 246e 0008 moveal %fp@(8),%a2 4df2e: 2a6e 0014 moveal %fp@(20),%a5 4df32: 262e 0018 movel %fp@(24),%d3 4df36: 282e 000c movel %fp@(12),%d4 4df3a: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 4df3e: 4a8a tstl %a2 4df40: 6700 0266 beqw 4e1a8 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4df44: 202a 0048 movel %a2@(72),%d0 4df48: 2040 moveal %d0,%a0 4df4a: 5b88 subql #5,%a0 4df4c: 7c01 moveq #1,%d6 4df4e: bc88 cmpl %a0,%d6 4df50: 6500 023a bcsw 4e18c /* * Error checks on arguments */ assert( dest ); 4df54: 4a8d tstl %a5 4df56: 6700 01fc beqw 4e154 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4df5a: 4a83 tstl %d3 4df5c: 6700 01c2 beqw 4e120 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 4df60: 7e06 moveq #6,%d7 4df62: be80 cmpl %d0,%d7 4df64: 6700 0136 beqw 4e09c * 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 ) 4df68: 2043 moveal %d3,%a0 4df6a: d1c5 addal %d5,%a0 4df6c: 2408 movel %a0,%d2 4df6e: 4281 clrl %d1 4df70: 206a 004c moveal %a2@(76),%a0 4df74: 226a 0050 moveal %a2@(80),%a1 4df78: 2c08 movel %a0,%d6 4df7a: 2e09 movel %a1,%d7 4df7c: 9e82 subl %d2,%d7 4df7e: 9d81 subxl %d1,%d6 4df80: 6c04 bges 4df86 <== NEVER TAKEN my_length = the_jnode->info.file.size - start; 4df82: 2609 movel %a1,%d3 4df84: 9685 subl %d5,%d3 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4df86: 2439 0005 f498 movel 5f498 ,%d2 4df8c: 2202 movel %d2,%d1 4df8e: 5bc0 smi %d0 4df90: 49c0 extbl %d0 4df92: 2640 moveal %d0,%a3 4df94: 2841 moveal %d1,%a4 4df96: 2f0c movel %a4,%sp@- 4df98: 2f00 movel %d0,%sp@- 4df9a: 2f05 movel %d5,%sp@- 4df9c: 2f04 movel %d4,%sp@- 4df9e: 4eb9 0005 b140 jsr 5b140 <__moddi3> 4dfa4: 4fef 0010 lea %sp@(16),%sp 4dfa8: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4dfaa: 2f0c movel %a4,%sp@- 4dfac: 2f0b movel %a3,%sp@- 4dfae: 2f05 movel %d5,%sp@- 4dfb0: 2f04 movel %d4,%sp@- 4dfb2: 4eb9 0005 ad88 jsr 5ad88 <__divdi3> 4dfb8: 4fef 0010 lea %sp@(16),%sp 4dfbc: 2801 movel %d1,%d4 if ( start_offset ) { 4dfbe: 4a87 tstl %d7 4dfc0: 6700 00d2 beqw 4e094 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 ); 4dfc4: 42a7 clrl %sp@- 4dfc6: 2f01 movel %d1,%sp@- 4dfc8: 2f0a movel %a2,%sp@- 4dfca: 4eb9 0004 d3d8 jsr 4d3d8 assert( block_ptr ); 4dfd0: 4fef 000c lea %sp@(12),%sp 4dfd4: 4a80 tstl %d0 4dfd6: 6700 01ec beqw 4e1c4 */ 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; 4dfda: 9487 subl %d7,%d2 4dfdc: 2643 moveal %d3,%a3 4dfde: b483 cmpl %d3,%d2 4dfe0: 6500 0116 bcsw 4e0f8 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 ); 4dfe4: 2f0b movel %a3,%sp@- 4dfe6: 2040 moveal %d0,%a0 4dfe8: de90 addl %a0@,%d7 dest += to_copy; block++; 4dfea: 5284 addql #1,%d4 my_length -= to_copy; 4dfec: 968b subl %a3,%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 ); 4dfee: 2f07 movel %d7,%sp@- dest += to_copy; 4dff0: 2e0d movel %a5,%d7 4dff2: de8b addl %a3,%d7 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 ); 4dff4: 2f0d movel %a5,%sp@- 4dff6: 4eb9 0004 f9d8 jsr 4f9d8 dest += to_copy; block++; my_length -= to_copy; 4dffc: 2439 0005 f498 movel 5f498 ,%d2 4e002: 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 ) { 4e006: b483 cmpl %d3,%d2 4e008: 623c bhis 4e046 4e00a: 49f9 0004 d3d8 lea 4d3d8 ,%a4 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 ); 4e010: 4bf9 0004 f9d8 lea 4f9d8 ,%a5 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4e016: 42a7 clrl %sp@- 4e018: 2f04 movel %d4,%sp@- 4e01a: 2f0a movel %a2,%sp@- 4e01c: 4e94 jsr %a4@ assert( block_ptr ); 4e01e: 4fef 000c lea %sp@(12),%sp 4e022: 4a80 tstl %d0 4e024: 6700 0112 beqw 4e138 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4e028: 2040 moveal %d0,%a0 dest += to_copy; block++; 4e02a: 5284 addql #1,%d4 my_length -= to_copy; 4e02c: 9682 subl %d2,%d3 copied += to_copy; 4e02e: d7c2 addal %d2,%a3 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 ); 4e030: 2f02 movel %d2,%sp@- 4e032: 2f10 movel %a0@,%sp@- 4e034: 2f07 movel %d7,%sp@- dest += to_copy; 4e036: de82 addl %d2,%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 ); 4e038: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4e03a: 4fef 000c lea %sp@(12),%sp 4e03e: b6b9 0005 f498 cmpl 5f498 ,%d3 4e044: 64d0 bccs 4e016 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4e046: 4a83 tstl %d3 4e048: 672a beqs 4e074 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4e04a: 42a7 clrl %sp@- 4e04c: 2f04 movel %d4,%sp@- 4e04e: 2f0a movel %a2,%sp@- 4e050: 4eb9 0004 d3d8 jsr 4d3d8 assert( block_ptr ); 4e056: 4fef 000c lea %sp@(12),%sp 4e05a: 4a80 tstl %d0 4e05c: 6700 0112 beqw 4e170 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4e060: 2040 moveal %d0,%a0 copied += my_length; 4e062: d7c3 addal %d3,%a3 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 ); 4e064: 2f03 movel %d3,%sp@- 4e066: 2f10 movel %a0@,%sp@- 4e068: 2f07 movel %d7,%sp@- 4e06a: 4eb9 0004 f9d8 jsr 4f9d8 copied += my_length; 4e070: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4e074: 42a7 clrl %sp@- 4e076: 486e fff8 pea %fp@(-8) 4e07a: 4eb9 0004 2e6c jsr 42e6c 4e080: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4e086: 200b movel %a3,%d0 4e088: 508f addql #8,%sp } 4e08a: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 4e090: 4e5e unlk %fp 4e092: 4e75 rts * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 4e094: 2e0d movel %a5,%d7 4e096: 97cb subal %a3,%a3 4e098: 6000 ff6c braw 4e006 if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4e09c: 2843 moveal %d3,%a4 <== NOT EXECUTED 4e09e: 97cb subal %a3,%a3 <== NOT EXECUTED 4e0a0: 202a 004c movel %a2@(76),%d0 <== NOT EXECUTED 4e0a4: 222a 0050 movel %a2@(80),%d1 <== NOT EXECUTED 4e0a8: 2c0b movel %a3,%d6 <== NOT EXECUTED 4e0aa: 2e0c movel %a4,%d7 <== NOT EXECUTED 4e0ac: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4e0b0: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED 4e0b4: 9285 subl %d5,%d1 <== NOT EXECUTED 4e0b6: 9184 subxl %d4,%d0 <== 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; 4e0b8: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 4e0bc: 9e81 subl %d1,%d7 <== NOT EXECUTED 4e0be: 9d80 subxl %d0,%d6 <== NOT EXECUTED 4e0c0: 6f06 bles 4e0c8 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 4e0c2: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 4e0c6: 9685 subl %d5,%d3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 4e0c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4e0ca: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4e0ce: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4e0d0: 4eb9 0004 f9d8 jsr 4f9d8 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4e0d6: 42a7 clrl %sp@- <== NOT EXECUTED 4e0d8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4e0dc: 4eb9 0004 2e6c jsr 42e6c <== NOT EXECUTED 4e0e2: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 4e0e8: 2003 movel %d3,%d0 <== NOT EXECUTED 4e0ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4e0ee: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4e0f4: 4e5e unlk %fp <== NOT EXECUTED 4e0f6: 4e75 rts <== 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; 4e0f8: 2642 moveal %d2,%a3 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 ); 4e0fa: 2040 moveal %d0,%a0 dest += to_copy; block++; 4e0fc: 5284 addql #1,%d4 my_length -= to_copy; 4e0fe: 968b subl %a3,%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 ); 4e100: 2f0b movel %a3,%sp@- 4e102: de90 addl %a0@,%d7 4e104: 2f07 movel %d7,%sp@- dest += to_copy; 4e106: 2e0d movel %a5,%d7 4e108: de8b addl %a3,%d7 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 ); 4e10a: 2f0d movel %a5,%sp@- 4e10c: 4eb9 0004 f9d8 jsr 4f9d8 dest += to_copy; block++; my_length -= to_copy; 4e112: 2439 0005 f498 movel 5f498 ,%d2 4e118: 4fef 000c lea %sp@(12),%sp 4e11c: 6000 fee8 braw 4e006 * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 4e120: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4e126: 7e16 moveq #22,%d7 <== NOT EXECUTED 4e128: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e12a: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e12c: 2087 movel %d7,%a0@ <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4e12e: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4e134: 4e5e unlk %fp <== NOT EXECUTED 4e136: 4e75 rts <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4e138: 4879 0005 dadc pea 5dadc <== NOT EXECUTED 4e13e: 4879 0005 db68 pea 5db68 <__FUNCTION__.6174> <== NOT EXECUTED 4e144: 4878 02a7 pea 2a7 <== NOT EXECUTED 4e148: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4e14e: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4e154: 4879 0005 db31 pea 5db31 <== NOT EXECUTED 4e15a: 4879 0005 db68 pea 5db68 <__FUNCTION__.6174> <== NOT EXECUTED 4e160: 4878 025a pea 25a <== NOT EXECUTED 4e164: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4e16a: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4e170: 4879 0005 dadc pea 5dadc <== NOT EXECUTED 4e176: 4879 0005 db68 pea 5db68 <__FUNCTION__.6174> <== NOT EXECUTED 4e17c: 4878 02b9 pea 2b9 <== NOT EXECUTED 4e180: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4e186: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4e18c: 4879 0005 dae6 pea 5dae6 <== NOT EXECUTED 4e192: 4879 0005 db68 pea 5db68 <__FUNCTION__.6174> <== NOT EXECUTED 4e198: 4878 0251 pea 251 <== NOT EXECUTED 4e19c: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4e1a2: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4e1a8: 4879 0005 da58 pea 5da58 <== NOT EXECUTED 4e1ae: 4879 0005 db68 pea 5db68 <__FUNCTION__.6174> <== NOT EXECUTED 4e1b4: 4878 024c pea 24c <== NOT EXECUTED 4e1b8: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4e1be: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED if ( start_offset ) { 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 ); assert( block_ptr ); 4e1c4: 4879 0005 dadc pea 5dadc <== NOT EXECUTED 4e1ca: 4879 0005 db68 pea 5db68 <__FUNCTION__.6174> <== NOT EXECUTED 4e1d0: 4878 0296 pea 296 <== NOT EXECUTED 4e1d4: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4e1da: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 0004d656 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4d656: 4e56 ffe0 linkw %fp,#-32 4d65a: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4d65e: 286e 0008 moveal %fp@(8),%a4 /* * Perform internal consistency checks */ assert( the_jnode ); 4d662: 4a8c tstl %a4 4d664: 6700 010c beqw 4d772 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4d668: 7005 moveq #5,%d0 4d66a: b0ac 0048 cmpl %a4@(72),%d0 4d66e: 6600 011e bnew 4d78e /* * 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; 4d672: 2839 0005 f498 movel 5f498 ,%d4 4d678: e48c lsrl #2,%d4 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4d67a: 4aac 0054 tstl %a4@(84) 4d67e: 670e beqs 4d68e if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 4d680: 2f04 movel %d4,%sp@- 4d682: 486c 0054 pea %a4@(84) 4d686: 4eb9 0004 d5a4 jsr 4d5a4 4d68c: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4d68e: 206c 0058 moveal %a4@(88),%a0 4d692: 4a88 tstl %a0 4d694: 674a beqs 4d6e0 <== ALWAYS TAKEN for ( i=0 ; i,%d1<== NOT EXECUTED 4d69c: 2001 movel %d1,%d0 <== NOT EXECUTED 4d69e: 47f9 0004 d5a4 lea 4d5a4 ,%a3<== NOT EXECUTED 4d6a4: e488 lsrl #2,%d0 <== NOT EXECUTED 4d6a6: 672e beqs 4d6d6 <== NOT EXECUTED 4d6a8: 4280 clrl %d0 <== NOT EXECUTED 4d6aa: 4282 clrl %d2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 4d6ac: e588 lsll #2,%d0 <== NOT EXECUTED 4d6ae: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4d6b2: 6710 beqs 4d6c4 <== NOT EXECUTED memfile_free_blocks_in_table( 4d6b4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d6b6: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4d6ba: 4e93 jsr %a3@ <== NOT EXECUTED 4d6bc: 2239 0005 f498 movel 5f498 ,%d1<== NOT EXECUTED 4d6c2: 508f addql #8,%sp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 4d6d0: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 4d6d4: 60d6 bras 4d6ac <== 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 ); 4d6d6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d6d8: 486c 0058 pea %a4@(88) <== NOT EXECUTED 4d6dc: 4e93 jsr %a3@ <== NOT EXECUTED 4d6de: 508f addql #8,%sp <== NOT EXECUTED } if ( info->triply_indirect ) { 4d6e0: 206c 005c moveal %a4@(92),%a0 4d6e4: 4a88 tstl %a0 4d6e6: 677e beqs 4d766 <== ALWAYS TAKEN for ( i=0 ; i,%d1<== NOT EXECUTED 4d6ee: 2001 movel %d1,%d0 <== NOT EXECUTED 4d6f0: 47f9 0004 d5a4 lea 4d5a4 ,%a3<== NOT EXECUTED 4d6f6: e488 lsrl #2,%d0 <== NOT EXECUTED 4d6f8: 6762 beqs 4d75c <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 4d6fa: 2450 moveal %a0@,%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4d6fc: 4a8a tstl %a2 <== NOT EXECUTED 4d6fe: 675c beqs 4d75c <== NOT EXECUTED 4d700: 4286 clrl %d6 <== NOT EXECUTED 4d702: 4285 clrl %d5 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 4d708: 4280 clrl %d0 <== NOT EXECUTED 4d70a: 4282 clrl %d2 <== NOT EXECUTED if ( p[j] ) { 4d70c: e588 lsll #2,%d0 <== NOT EXECUTED 4d70e: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 4d712: 6710 beqs 4d724 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4d714: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d716: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 4d71a: 4e93 jsr %a3@ <== NOT EXECUTED 4d71c: 2239 0005 f498 movel 5f498 ,%d1<== NOT EXECUTED 4d722: 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 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4d730: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d732: dcac 005c addl %a4@(92),%d6 <== 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,%d1<== NOT EXECUTED 4d742: 2001 movel %d1,%d0 <== NOT EXECUTED 4d744: 508f addql #8,%sp <== NOT EXECUTED 4d746: e488 lsrl #2,%d0 <== NOT EXECUTED 4d748: ba80 cmpl %d0,%d5 <== NOT EXECUTED 4d74a: 6410 bccs 4d75c <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 4d74c: 2c05 movel %d5,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4d74e: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4d752: e58e lsll #2,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4d754: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4d758: 4a8a tstl %a2 <== NOT EXECUTED 4d75a: 66a8 bnes 4d704 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4d75c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d75e: 486c 005c pea %a4@(92) <== NOT EXECUTED 4d762: 4e93 jsr %a3@ <== NOT EXECUTED 4d764: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4d766: 4280 clrl %d0 4d768: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 4d76e: 4e5e unlk %fp 4d770: 4e75 rts /* * Perform internal consistency checks */ assert( the_jnode ); 4d772: 4879 0005 da58 pea 5da58 <== NOT EXECUTED 4d778: 4879 0005 db7a pea 5db7a <__FUNCTION__.6099> <== NOT EXECUTED 4d77e: 4878 01ee pea 1ee <== NOT EXECUTED 4d782: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4d788: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4d78e: 4879 0005 daac pea 5daac <== NOT EXECUTED 4d794: 4879 0005 db7a pea 5db7a <__FUNCTION__.6099> <== NOT EXECUTED 4d79a: 4878 01f2 pea 1f2 <== NOT EXECUTED 4d79e: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4d7a4: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 0004d60a : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4d60a: 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 ); 4d60e: 42a7 clrl %sp@- <== NOT EXECUTED 4d610: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4d614: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d618: 4eb9 0004 d3d8 jsr 4d3d8 <== NOT EXECUTED assert( block_ptr ); 4d61e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d622: 4a80 tstl %d0 <== NOT EXECUTED 4d624: 6714 beqs 4d63a <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 4d626: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d628: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4d62a: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4d62c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4d62e: 4eb9 0004 d39a jsr 4d39a <== NOT EXECUTED } return 1; } 4d634: 7001 moveq #1,%d0 <== NOT EXECUTED 4d636: 4e5e unlk %fp <== NOT EXECUTED 4d638: 4e75 rts <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4d63a: 4879 0005 dadc pea 5dadc <== NOT EXECUTED 4d640: 4879 0005 dbab pea 5dbab <__FUNCTION__.6063> <== NOT EXECUTED 4d646: 4878 0196 pea 196 <== NOT EXECUTED 4d64a: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4d650: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 0004db90 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4db90: 4e56 ffd0 linkw %fp,#-48 4db94: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4db98: 246e 0008 moveal %fp@(8),%a2 4db9c: 2a6e 0014 moveal %fp@(20),%a5 4dba0: 262e 0018 movel %fp@(24),%d3 4dba4: 282e 000c movel %fp@(12),%d4 4dba8: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 4dbac: 4a8a tstl %a2 4dbae: 6700 01f8 beqw 4dda8 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4dbb2: 7405 moveq #5,%d2 4dbb4: b4aa 0048 cmpl %a2@(72),%d2 4dbb8: 6600 01d2 bnew 4dd8c /* * Error check arguments */ assert( source ); 4dbbc: 4a8d tstl %a5 4dbbe: 6700 0204 beqw 4ddc4 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4dbc2: 4a83 tstl %d3 4dbc4: 6700 0190 beqw 4dd56 * 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 ) { 4dbc8: 2043 moveal %d3,%a0 4dbca: d1c5 addal %d5,%a0 4dbcc: 2208 movel %a0,%d1 4dbce: 4280 clrl %d0 4dbd0: 2c2a 004c movel %a2@(76),%d6 4dbd4: 2e2a 0050 movel %a2@(80),%d7 4dbd8: 9e81 subl %d1,%d7 4dbda: 9d80 subxl %d0,%d6 4dbdc: 6d00 011e bltw 4dcfc /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4dbe0: 2439 0005 f498 movel 5f498 ,%d2 4dbe6: 2202 movel %d2,%d1 4dbe8: 5bc0 smi %d0 4dbea: 49c0 extbl %d0 4dbec: 2640 moveal %d0,%a3 4dbee: 2841 moveal %d1,%a4 4dbf0: 2f0c movel %a4,%sp@- 4dbf2: 2f00 movel %d0,%sp@- 4dbf4: 2f05 movel %d5,%sp@- 4dbf6: 2f04 movel %d4,%sp@- 4dbf8: 4eb9 0005 b140 jsr 5b140 <__moddi3> 4dbfe: 4fef 0010 lea %sp@(16),%sp 4dc02: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4dc04: 2f0c movel %a4,%sp@- 4dc06: 2f0b movel %a3,%sp@- 4dc08: 2f05 movel %d5,%sp@- 4dc0a: 2f04 movel %d4,%sp@- 4dc0c: 4eb9 0005 ad88 jsr 5ad88 <__divdi3> 4dc12: 4fef 0010 lea %sp@(16),%sp 4dc16: 2801 movel %d1,%d4 if ( start_offset ) { 4dc18: 4a87 tstl %d7 4dc1a: 6700 00d8 beqw 4dcf4 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 ); 4dc1e: 42a7 clrl %sp@- 4dc20: 2f01 movel %d1,%sp@- 4dc22: 2f0a movel %a2,%sp@- 4dc24: 4eb9 0004 d3d8 jsr 4d3d8 assert( block_ptr ); 4dc2a: 4fef 000c lea %sp@(12),%sp 4dc2e: 4a80 tstl %d0 4dc30: 6700 01ca beqw 4ddfc */ 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; 4dc34: 9487 subl %d7,%d2 4dc36: b682 cmpl %d2,%d3 4dc38: 6500 00f2 bcsw 4dd2c 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 ); 4dc3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4dc3e: 2040 moveal %d0,%a0 <== NOT EXECUTED src += to_copy; 4dc40: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 <== NOT EXECUTED block++; my_length -= to_copy; 4dc44: 9682 subl %d2,%d3 <== NOT EXECUTED copied += to_copy; 4dc46: 2a02 movel %d2,%d5 <== NOT EXECUTED #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 ); src += to_copy; block++; 4dc48: 5284 addql #1,%d4 <== NOT EXECUTED 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 ); 4dc4a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4dc4c: de90 addl %a0@,%d7 <== NOT EXECUTED 4dc4e: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4dc50: 4eb9 0004 f9d8 jsr 4f9d8 <== NOT EXECUTED src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4dc56: 2439 0005 f498 movel 5f498 ,%d2<== NOT EXECUTED 4dc5c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4dc60: b483 cmpl %d3,%d2 4dc62: 623c bhis 4dca0 4dc64: 49f9 0004 d3d8 lea 4d3d8 ,%a4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4dc6a: 4bf9 0004 f9d8 lea 4f9d8 ,%a5 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dc70: 42a7 clrl %sp@- 4dc72: 2f04 movel %d4,%sp@- 4dc74: 2f0a movel %a2,%sp@- 4dc76: 4e94 jsr %a4@ assert( block_ptr ); 4dc78: 4fef 000c lea %sp@(12),%sp 4dc7c: 4a80 tstl %d0 4dc7e: 6700 00f0 beqw 4dd70 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 ); 4dc82: 2f02 movel %d2,%sp@- 4dc84: 2040 moveal %d0,%a0 src += to_copy; block++; 4dc86: 5284 addql #1,%d4 my_length -= to_copy; 4dc88: 9682 subl %d2,%d3 * * 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( 4dc8a: da82 addl %d2,%d5 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 ); 4dc8c: 2f0b movel %a3,%sp@- 4dc8e: 2f10 movel %a0@,%sp@- src += to_copy; 4dc90: d7c2 addal %d2,%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 ); 4dc92: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4dc94: 4fef 000c lea %sp@(12),%sp 4dc98: b6b9 0005 f498 cmpl 5f498 ,%d3 4dc9e: 64d0 bccs 4dc70 <== NEVER TAKEN */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4dca0: 4a83 tstl %d3 4dca2: 672a beqs 4dcce block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4dca4: 42a7 clrl %sp@- 4dca6: 2f04 movel %d4,%sp@- 4dca8: 2f0a movel %a2,%sp@- 4dcaa: 4eb9 0004 d3d8 jsr 4d3d8 assert( block_ptr ); 4dcb0: 4fef 000c lea %sp@(12),%sp 4dcb4: 4a80 tstl %d0 4dcb6: 6700 0128 beqw 4dde0 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 ); 4dcba: 2f03 movel %d3,%sp@- 4dcbc: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4dcbe: da83 addl %d3,%d5 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 ); 4dcc0: 2f0b movel %a3,%sp@- 4dcc2: 2f10 movel %a0@,%sp@- 4dcc4: 4eb9 0004 f9d8 jsr 4f9d8 my_length = 0; copied += to_copy; 4dcca: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4dcce: 42a7 clrl %sp@- 4dcd0: 486e fff8 pea %fp@(-8) 4dcd4: 4eb9 0004 2e6c jsr 42e6c 4dcda: 202e fff8 movel %fp@(-8),%d0 return copied; 4dcde: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4dce0: 2540 0044 movel %d0,%a2@(68) 4dce4: 2540 0040 movel %d0,%a2@(64) return copied; } 4dce8: 2005 movel %d5,%d0 4dcea: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4dcf0: 4e5e unlk %fp 4dcf2: 4e75 rts * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 4dcf4: 264d moveal %a5,%a3 4dcf6: 4285 clrl %d5 4dcf8: 6000 ff66 braw 4dc60 * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 4dcfc: 2f08 movel %a0,%sp@- 4dcfe: 2f00 movel %d0,%sp@- 4dd00: 2f0a movel %a2,%sp@- 4dd02: 4eb9 0004 d918 jsr 4d918 if ( status ) 4dd08: 4fef 000c lea %sp@(12),%sp 4dd0c: 4a80 tstl %d0 4dd0e: 6700 fed0 beqw 4dbe0 rtems_set_errno_and_return_minus_one( ENOSPC ); 4dd12: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4dd18: 7aff moveq #-1,%d5 <== NOT EXECUTED 4dd1a: 781c moveq #28,%d4 <== NOT EXECUTED 4dd1c: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4dd1e: 2005 movel %d5,%d0 <== NOT EXECUTED last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); 4dd20: 2084 movel %d4,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4dd22: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4dd28: 4e5e unlk %fp <== NOT EXECUTED 4dd2a: 4e75 rts <== 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; 4dd2c: 2403 movel %d3,%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 ); 4dd2e: 2040 moveal %d0,%a0 src += to_copy; 4dd30: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 block++; my_length -= to_copy; 4dd34: 9682 subl %d2,%d3 copied += to_copy; 4dd36: 2a02 movel %d2,%d5 #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 ); src += to_copy; block++; 4dd38: 5284 addql #1,%d4 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 ); 4dd3a: 2f02 movel %d2,%sp@- 4dd3c: 2f0d movel %a5,%sp@- 4dd3e: de90 addl %a0@,%d7 4dd40: 2f07 movel %d7,%sp@- 4dd42: 4eb9 0004 f9d8 jsr 4f9d8 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4dd48: 2439 0005 f498 movel 5f498 ,%d2 4dd4e: 4fef 000c lea %sp@(12),%sp 4dd52: 6000 ff0c braw 4dc60 * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 4dd56: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4dd5c: 7aff moveq #-1,%d5 <== NOT EXECUTED 4dd5e: 7c16 moveq #22,%d6 <== NOT EXECUTED 4dd60: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4dd62: 2005 movel %d5,%d0 <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 4dd64: 2086 movel %d6,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4dd66: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4dd6c: 4e5e unlk %fp <== NOT EXECUTED 4dd6e: 4e75 rts <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4dd70: 4879 0005 dadc pea 5dadc <== NOT EXECUTED 4dd76: 4879 0005 db55 pea 5db55 <__FUNCTION__.6266> <== NOT EXECUTED 4dd7c: 4878 0330 pea 330 <== NOT EXECUTED 4dd80: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4dd86: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4dd8c: 4879 0005 daac pea 5daac <== NOT EXECUTED 4dd92: 4879 0005 db55 pea 5db55 <__FUNCTION__.6266> <== NOT EXECUTED 4dd98: 4878 02e7 pea 2e7 <== NOT EXECUTED 4dd9c: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4dda2: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4dda8: 4879 0005 da58 pea 5da58 <== NOT EXECUTED 4ddae: 4879 0005 db55 pea 5db55 <__FUNCTION__.6266> <== NOT EXECUTED 4ddb4: 4878 02e3 pea 2e3 <== NOT EXECUTED 4ddb8: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4ddbe: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4ddc4: 4879 0005 d2fb pea 5d2fb <== NOT EXECUTED 4ddca: 4879 0005 db55 pea 5db55 <__FUNCTION__.6266> <== NOT EXECUTED 4ddd0: 4878 02ef pea 2ef <== NOT EXECUTED 4ddd4: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4ddda: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4dde0: 4879 0005 dadc pea 5dadc <== NOT EXECUTED 4dde6: 4879 0005 db55 pea 5db55 <__FUNCTION__.6266> <== NOT EXECUTED 4ddec: 4878 0346 pea 346 <== NOT EXECUTED 4ddf0: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4ddf6: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED if ( start_offset ) { 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 ); assert( block_ptr ); 4ddfc: 4879 0005 dadc pea 5dadc <== NOT EXECUTED 4de02: 4879 0005 db55 pea 5db55 <__FUNCTION__.6266> <== NOT EXECUTED 4de08: 4878 031c pea 31c <== NOT EXECUTED 4de0c: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4de12: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 000422e8 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 422e8: 4e56 ffb0 linkw %fp,#-80 422ec: 48d7 007c moveml %d2-%d6,%sp@ 422f0: 242e 0008 movel %fp@(8),%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 ); 422f4: 260e movel %fp,%d3 422f6: 0683 ffff ffc7 addil #-57,%d3 422fc: 2f02 movel %d2,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 422fe: 282e 000c movel %fp@(12),%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 ); 42302: 4eb9 0005 05e4 jsr 505e4 42308: 588f addql #4,%sp 4230a: 486e fffc pea %fp@(-4) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4230e: 2c2e 0010 movel %fp@(16),%d6 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 ); 42312: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 42314: 2a2e 0014 movel %fp@(20),%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 ); 42318: 2f00 movel %d0,%sp@- 4231a: 2f02 movel %d2,%sp@- 4231c: 4eb9 0004 b694 jsr 4b694 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 42322: 4fef 0010 lea %sp@(16),%sp 42326: 2004 movel %d4,%d0 42328: 0280 0000 f000 andil #61440,%d0 4232e: 0c80 0000 4000 cmpil #16384,%d0 42334: 675e beqs 42394 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 42336: 0c80 0000 8000 cmpil #32768,%d0 4233c: 6750 beqs 4238e type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4233e: 0c80 0000 6000 cmpil #24576,%d0 42344: 673c beqs 42382 42346: 0c80 0000 2000 cmpil #8192,%d0 4234c: 6734 beqs 42382 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 4234e: 0c80 0000 1000 cmpil #4096,%d0 42354: 6642 bnes 42398 <== NEVER TAKEN 42356: 303c 0007 movew #7,%d0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 4235a: 486e ffe8 pea %fp@(-24) 4235e: 2f04 movel %d4,%sp@- 42360: 2f03 movel %d3,%sp@- 42362: 2f00 movel %d0,%sp@- 42364: 2f2e 0018 movel %fp@(24),%sp@- 42368: 4eb9 0004 a8de jsr 4a8de new_name, mode, &info ); if ( !new_node ) 4236e: 4fef 0014 lea %sp@(20),%sp 42372: 4a80 tstl %d0 42374: 673a beqs 423b0 <== NEVER TAKEN 42376: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 42378: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 4237e: 4e5e unlk %fp 42380: 4e75 rts type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 42382: 2d46 ffe8 movel %d6,%fp@(-24) 42386: 7002 moveq #2,%d0 42388: 2d45 ffec movel %d5,%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) ) { 4238c: 60cc bras 4235a /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4238e: 303c 0005 movew #5,%d0 42392: 60c6 bras 4235a rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 42394: 7001 moveq #1,%d0 42396: 60c2 bras 4235a 42398: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4239e: 7416 moveq #22,%d2 <== NOT EXECUTED 423a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 423a2: 70ff moveq #-1,%d0 <== NOT EXECUTED 423a4: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 423a6: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 423ac: 4e5e unlk %fp <== NOT EXECUTED 423ae: 4e75 rts <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 423b0: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 423b6: 720c moveq #12,%d1 <== NOT EXECUTED 423b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 423ba: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 423bc: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 423c2: 2081 movel %d1,%a0@ <== NOT EXECUTED return 0; } 423c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000423c8 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 423c8: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 423ca: 4e56 0000 linkw %fp,#0 423ce: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 423d2: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 423d6: b0a8 0048 cmpl %a0@(72),%d0 423da: 660a bnes 423e6 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 423dc: 2149 0058 movel %a1,%a0@(88) 423e0: 4280 clrl %d0 return 0; } 423e2: 4e5e unlk %fp 423e4: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 423e6: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 423ec: 7214 moveq #20,%d1 <== NOT EXECUTED 423ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 423f0: 70ff moveq #-1,%d0 <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 423f2: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 423f4: 2081 movel %d1,%a0@ <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } =============================================================================== 0004442a : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 4442a: 4e56 0000 linkw %fp,#0 4442e: 2f0a movel %a2,%sp@- 44430: 246e 0008 moveal %fp@(8),%a2 assert( the_jnode ); 44434: 4a8a tstl %a2 44436: 6700 01ee beqw 44626 fprintf(stdout, "%s", the_jnode->name ); 4443a: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 44440: 2f28 0008 movel %a0@(8),%sp@- 44444: 486a 000c pea %a2@(12) 44448: 4eb9 0005 32ec jsr 532ec switch( the_jnode->type ) { 4444e: 202a 0048 movel %a2@(72),%d0 44452: 508f addql #8,%sp 44454: 7207 moveq #7,%d1 44456: b280 cmpl %d0,%d1 44458: 6434 bccs 4448e <== ALWAYS TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 4445a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4445c: 4879 0006 2772 pea 62772 <== NOT EXECUTED 44462: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 <== NOT EXECUTED 44468: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4446c: 4eb9 0005 3180 jsr 53180 <== NOT EXECUTED assert(0); 44472: 4879 0006 17f3 pea 617f3 <== NOT EXECUTED 44478: 4879 0006 2862 pea 62862 <__FUNCTION__.6586> <== NOT EXECUTED 4447e: 4878 006c pea 6c <== NOT EXECUTED 44482: 4879 0006 26d0 pea 626d0 <== NOT EXECUTED 44488: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 4448e: 323b 0a08 movew %pc@(44498 ,%d0:l:2),%d1 44492: 48c1 extl %d1 44494: 4efb 1802 jmp %pc@(44498 ,%d1:l) 44498: ffc2 0177702 <== NOT EXECUTED 4449a: 0162 bchg %d0,%a2@- <== NOT EXECUTED 4449c: 012a 00f0 btst %d0,%a2@(240) <== NOT EXECUTED 444a0: 00b6 0082 004a oril #8519754,%d6 <== NOT EXECUTED 444a6: 0010 020 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 444a8: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 <== NOT EXECUTED 444ae: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 444b2: 4878 0012 pea 12 <== NOT EXECUTED 444b6: 4878 0001 pea 1 <== NOT EXECUTED 444ba: 4879 0006 275f pea 6275f <== NOT EXECUTED 444c0: 4eb9 0005 3eb4 jsr 53eb4 <== NOT EXECUTED assert(0); 444c6: 4879 0006 17f3 pea 617f3 <== NOT EXECUTED 444cc: 4879 0006 2862 pea 62862 <__FUNCTION__.6586> <== NOT EXECUTED 444d2: 4878 0067 pea 67 <== NOT EXECUTED 444d6: 4879 0006 26d0 pea 626d0 <== NOT EXECUTED 444dc: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 444e2: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 444e6: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 444ea: 4879 0006 2730 pea 62730 <== NOT EXECUTED 444f0: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 <== NOT EXECUTED 444f6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 444fa: 4eb9 0005 3180 jsr 53180 <== NOT EXECUTED fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 44500: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44504: 203c 0006 2edc movel #405212,%d0 <== NOT EXECUTED case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 4450a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 4450e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 44512: 4e5e unlk %fp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44514: 4ef9 0005 4be4 jmp 54be4 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 4451a: 2f2a 0050 movel %a2@(80),%sp@- 4451e: 4879 0006 273f pea 6273f 44524: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 4452a: 2f28 0008 movel %a0@(8),%sp@- 4452e: 4eb9 0005 3180 jsr 53180 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 44534: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44538: 203c 0006 2edc movel #405212,%d0 ); #else fprintf(stdout, " (file %" PRId32 ")", (uint32_t)the_jnode->info.file.size ); #endif break; 4453e: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44542: 2d40 0008 movel %d0,%fp@(8) } 44546: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44548: 4ef9 0005 4be4 jmp 54be4 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 4454e: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 <== NOT EXECUTED 44554: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44558: 4878 0013 pea 13 <== NOT EXECUTED 4455c: 4878 0001 pea 1 <== NOT EXECUTED 44560: 4879 0006 274b pea 6274b <== NOT EXECUTED 44566: 4eb9 0005 3eb4 jsr 53eb4 <== NOT EXECUTED assert(0); 4456c: 4879 0006 17f3 pea 617f3 <== NOT EXECUTED 44572: 4879 0006 2862 pea 62862 <__FUNCTION__.6586> <== NOT EXECUTED 44578: 4878 0062 pea 62 <== NOT EXECUTED 4457c: 4879 0006 26d0 pea 626d0 <== NOT EXECUTED 44582: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 44588: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 <== NOT EXECUTED 4458e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44592: 4878 0013 pea 13 <== NOT EXECUTED 44596: 4878 0001 pea 1 <== NOT EXECUTED 4459a: 4879 0006 274b pea 6274b <== NOT EXECUTED 445a0: 4eb9 0005 3eb4 jsr 53eb4 <== NOT EXECUTED assert(0); 445a6: 4879 0006 17f3 pea 617f3 <== NOT EXECUTED 445ac: 4879 0006 2862 pea 62862 <__FUNCTION__.6586> <== NOT EXECUTED 445b2: 4878 005d pea 5d <== NOT EXECUTED 445b6: 4879 0006 26d0 pea 626d0 <== NOT EXECUTED 445bc: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 445c2: 2f2a 0050 movel %a2@(80),%sp@- 445c6: 2f2a 004c movel %a2@(76),%sp@- 445ca: 4879 0006 271d pea 6271d 445d0: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 445d6: 2f28 0008 movel %a0@(8),%sp@- 445da: 4eb9 0005 3180 jsr 53180 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 445e0: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445e4: 203c 0006 2edc movel #405212,%d0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; 445ea: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445ee: 2d40 0008 movel %d0,%fp@(8) } 445f2: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445f4: 4ef9 0005 4be4 jmp 54be4 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 445fa: 2079 0006 4154 moveal 64154 <_impure_ptr>,%a0 44600: 2f28 0008 movel %a0@(8),%sp@- 44604: 4878 002f pea 2f 44608: 4eb9 0005 31c0 jsr 531c0 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 4460e: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44612: 203c 0006 2edc movel #405212,%d0 fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; 44618: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 4461a: 2d40 0008 movel %d0,%fp@(8) } 4461e: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44620: 4ef9 0005 4be4 jmp 54be4 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 44626: 4879 0006 26c6 pea 626c6 <== NOT EXECUTED 4462c: 4879 0006 2862 pea 62862 <__FUNCTION__.6586> <== NOT EXECUTED 44632: 4878 0038 pea 38 <== NOT EXECUTED 44636: 4879 0006 26d0 pea 626d0 <== NOT EXECUTED 4463c: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED =============================================================================== 0004240c : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 4240c: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4240e: 4e56 fff4 linkw %fp,#-12 42412: 206e 0008 moveal %fp@(8),%a0 42416: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ IMFS_jnode_t *node; int i; node = loc->node_access; 4241a: 2450 moveal %a0@,%a2 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4241c: 266e 000c moveal %fp@(12),%a3 42420: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42424: b0aa 0048 cmpl %a2@(72),%d0 42428: 663c bnes 42466 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 4242a: 4a82 tstl %d2 4242c: 672c beqs 4245a <== NEVER TAKEN 4242e: 206a 004c moveal %a2@(76),%a0 42432: 1210 moveb %a0@,%d1 42434: 6724 beqs 4245a <== NEVER TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 42436: 91c8 subal %a0,%a0 42438: 4280 clrl %d0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 4243a: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 4243c: 1781 8800 moveb %d1,%a3@(00000000,%a0: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++ ) 42440: 2040 moveal %d0,%a0 42442: b082 cmpl %d2,%d0 42444: 640a bccs 42450 42446: 226a 004c moveal %a2@(76),%a1 4244a: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 4244e: 66ea bnes 4243a buf[i] = node->info.sym_link.name[i]; return i; } 42450: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 42456: 4e5e unlk %fp 42458: 4e75 rts 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++ ) 4245a: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 4245c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 42462: 4e5e unlk %fp <== NOT EXECUTED 42464: 4e75 rts <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 42466: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4246c: 7216 moveq #22,%d1 <== NOT EXECUTED 4246e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42470: 70ff moveq #-1,%d0 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; return i; } 42472: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 42478: 2081 movel %d1,%a0@ <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; return i; } 4247a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042480 : 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 */ ) { 42480: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42484: 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 */ ) { 42488: 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 ); 4248a: 4878 0020 pea 20 4248e: 2f2e 0014 movel %fp@(20),%sp@- ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42492: 2450 moveal %a0@,%a2 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42494: 486a 000c pea %a2@(12) 42498: 4eb9 0005 05fc jsr 505fc if ( the_jnode->Parent != NULL ) 4249e: 4fef 000c lea %sp@(12),%sp 424a2: 4aaa 0008 tstl %a2@(8) 424a6: 670a beqs 424b2 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 424a8: 2f0a movel %a2,%sp@- 424aa: 4eb9 0004 714c jsr 4714c <_Chain_Extract> 424b0: 588f addql #4,%sp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 424b2: 206e 0010 moveal %fp@(16),%a0 424b6: 2050 moveal %a0@,%a0 the_jnode->Parent = new_parent; 424b8: 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 ); 424bc: 2f0a movel %a2,%sp@- 424be: 4868 004c pea %a0@(76) 424c2: 4eb9 0004 7114 jsr 47114 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 424c8: 42a7 clrl %sp@- 424ca: 486e fff8 pea %fp@(-8) 424ce: 4eb9 0004 2e6c jsr 42e6c 424d4: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 424da: 4280 clrl %d0 424dc: 246e fff4 moveal %fp@(-12),%a2 424e0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b774 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4b774: 4e56 fff8 linkw %fp,#-8 4b778: 2f0b movel %a3,%sp@- 4b77a: 266e 000c moveal %fp@(12),%a3 4b77e: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4b780: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4b782: 4aaa 0008 tstl %a2@(8) 4b786: 670e beqs 4b796 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4b788: 2f0a movel %a2,%sp@- 4b78a: 4eb9 0004 714c jsr 4714c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4b790: 588f addql #4,%sp 4b792: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4b796: 302a 0032 movew %a2@(50),%d0 4b79a: 5380 subql #1,%d0 4b79c: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4b7a0: 42a7 clrl %sp@- 4b7a2: 486e fff8 pea %fp@(-8) 4b7a6: 4eb9 0004 2e6c jsr 42e6c 4b7ac: 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) ) { 4b7b2: 2f0a movel %a2,%sp@- 4b7b4: 4eb9 0004 bc52 jsr 4bc52 4b7ba: 4fef 000c lea %sp@(12),%sp 4b7be: 4a80 tstl %d0 4b7c0: 6628 bnes 4b7ea <== NEVER TAKEN 4b7c2: 4a6a 0032 tstw %a2@(50) 4b7c6: 6622 bnes 4b7ea <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4b7c8: 2079 0005 e710 moveal 5e710 ,%a0 4b7ce: 2653 moveal %a3@,%a3 4b7d0: b7e8 0004 cmpal %a0@(4),%a3 4b7d4: 6736 beqs 4b80c <== NEVER TAKEN 4b7d6: 47f9 0004 2ddc lea 42ddc ,%a3 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4b7dc: 7004 moveq #4,%d0 4b7de: b0aa 0048 cmpl %a2@(72),%d0 4b7e2: 6714 beqs 4b7f8 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 4b7e4: 2f0a movel %a2,%sp@- 4b7e6: 4e93 jsr %a3@ 4b7e8: 588f addql #4,%sp } return 0; } 4b7ea: 246e fff0 moveal %fp@(-16),%a2 4b7ee: 4280 clrl %d0 4b7f0: 266e fff4 moveal %fp@(-12),%a3 4b7f4: 4e5e unlk %fp 4b7f6: 4e75 rts /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4b7f8: 202a 004c movel %a2@(76),%d0 4b7fc: 67e6 beqs 4b7e4 <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 4b7fe: 2f00 movel %d0,%sp@- 4b800: 4e93 jsr %a3@ 4b802: 588f addql #4,%sp } free( the_jnode ); 4b804: 2f0a movel %a2,%sp@- 4b806: 4e93 jsr %a3@ 4b808: 588f addql #4,%sp 4b80a: 60de bras 4b7ea /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 4b80c: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED 4b810: 47f9 0004 2ddc lea 42ddc ,%a3 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4b816: 7004 moveq #4,%d0 <== NOT EXECUTED 4b818: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4b81c: 66c6 bnes 4b7e4 <== NOT EXECUTED 4b81e: 60d8 bras 4b7f8 <== NOT EXECUTED =============================================================================== 0004b820 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4b820: 7007 moveq #7,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b822: 4e56 0000 linkw %fp,#0 4b826: 206e 000c moveal %fp@(12),%a0 4b82a: 2f0a movel %a2,%sp@- 4b82c: 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; 4b830: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 4b832: b0a9 0048 cmpl %a1@(72),%d0 4b836: 6418 bccs 4b850 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b838: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4b83e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b842: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b844: 70ff moveq #-1,%d0 <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4b846: 4e5e unlk %fp <== NOT EXECUTED case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b848: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4b84e: 4e75 rts <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4b850: 2029 0048 movel %a1@(72),%d0 4b854: d080 addl %d0,%d0 4b856: 303b 0808 movew %pc@(4b860 ,%d0:l),%d0 4b85a: 48c0 extl %d0 4b85c: 4efb 0802 jmp %pc@(4b860 ,%d0:l) 4b860: ffd8 0177730 <== NOT EXECUTED 4b862: ffd8 0177730 <== NOT EXECUTED 4b864: 00c2 bitrev %d2 <== NOT EXECUTED 4b866: ffd8 0177730 <== NOT EXECUTED 4b868: 0010 020 <== NOT EXECUTED 4b86a: 006a 0152 <== NOT EXECUTED 4b86c: 006a 0152 <== NOT EXECUTED 4b86e: 0010 020 <== 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 ); 4b870: 246a 0010 moveal %a2@(16),%a2 <== NOT EXECUTED buf->st_mode = the_jnode->st_mode; 4b874: 2169 002e 000c movel %a1@(46),%a0@(12) <== NOT EXECUTED buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4b87a: 2169 0034 0008 movel %a1@(52),%a0@(8) <== 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 ); 4b880: 246a 0034 moveal %a2@(52),%a2 <== NOT EXECUTED buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4b884: 3169 0032 0010 movew %a1@(50),%a0@(16) <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4b88a: 4280 clrl %d0 <== NOT EXECUTED 4b88c: 4281 clrl %d1 <== NOT EXECUTED 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; buf->st_atime = the_jnode->stat_atime; 4b88e: 2169 003c 0026 movel %a1@(60),%a0@(38) <== NOT EXECUTED buf->st_mtime = the_jnode->stat_mtime; 4b894: 2169 0040 002e movel %a1@(64),%a0@(46) <== NOT EXECUTED buf->st_ctime = the_jnode->stat_ctime; 4b89a: 2169 0044 0036 movel %a1@(68),%a0@(54) <== NOT EXECUTED rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 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; 4b8a0: 3169 0038 0012 movew %a1@(56),%a0@(18) <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4b8a6: 2140 001e movel %d0,%a0@(30) <== NOT EXECUTED 4b8aa: 2141 0022 movel %d1,%a0@(34) <== 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 ); 4b8ae: 2212 movel %a2@,%d1 <== NOT EXECUTED 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; 4b8b0: 4280 clrl %d0 <== NOT EXECUTED 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; 4b8b2: 3169 003a 0014 movew %a1@(58),%a0@(20) <== 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 = 4b8b8: 2141 0004 movel %d1,%a0@(4) <== NOT EXECUTED 4b8bc: 20bc 0000 fffe movel #65534,%a0@ <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4b8c2: 246e fffc moveal %fp@(-4),%a2 4b8c6: 4e5e unlk %fp 4b8c8: 4e75 rts * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b8ca: 246a 0010 moveal %a2@(16),%a2 buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4b8ce: 2029 004c movel %a1@(76),%d0 4b8d2: 2229 0050 movel %a1@(80),%d1 */ 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; 4b8d6: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4b8dc: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4b8e2: 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 ); 4b8e8: 246a 0034 moveal %a2@(52),%a2 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; buf->st_mtime = the_jnode->stat_mtime; 4b8ec: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4b8f2: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4b8f8: 2140 001e movel %d0,%a0@(30) 4b8fc: 2141 0022 movel %d1,%a0@(34) 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; buf->st_nlink = the_jnode->st_nlink; 4b900: 3169 0032 0010 movew %a1@(50),%a0@(16) * 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 ); 4b906: 2212 movel %a2@,%d1 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; 4b908: 4280 clrl %d0 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 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; 4b90a: 3169 0038 0012 movew %a1@(56),%a0@(18) /* * 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 = 4b910: 2141 0004 movel %d1,%a0@(4) 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; 4b914: 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 = 4b91a: 20bc 0000 fffe movel #65534,%a0@ 4b920: 60a0 bras 4b8c2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b922: 2029 0050 movel %a1@(80),%d0 4b926: 2169 004c 0016 movel %a1@(76),%a0@(22) */ 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; 4b92c: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4b932: 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 ); 4b938: 246a 0010 moveal %a2@(16),%a2 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; buf->st_atime = the_jnode->stat_atime; 4b93c: 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 ); 4b942: 246a 0034 moveal %a2@(52),%a2 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; buf->st_mtime = the_jnode->stat_mtime; 4b946: 2169 0040 002e movel %a1@(64),%a0@(46) * 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 ); 4b94c: 2212 movel %a2@,%d1 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4b94e: 3169 0032 0010 movew %a1@(50),%a0@(16) 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; 4b954: 2169 0044 0036 movel %a1@(68),%a0@(54) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 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; 4b95a: 3169 0038 0012 movew %a1@(56),%a0@(18) switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b960: 2140 001a movel %d0,%a0@(26) 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; 4b964: 4280 clrl %d0 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 4b966: 2141 0004 movel %d1,%a0@(4) 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; 4b96a: 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 = 4b970: 20bc 0000 fffe movel #65534,%a0@ 4b976: 6000 ff4a braw 4b8c2 ... =============================================================================== 000424e4 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 424e4: 4e56 ffc4 linkw %fp,#-60 424e8: 2f03 movel %d3,%sp@- int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 424ea: 260e movel %fp,%d3 424ec: 0683 ffff ffc7 addil #-57,%d3 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 424f2: 2f02 movel %d2,%sp@- 424f4: 242e 0010 movel %fp@(16),%d2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 424f8: 2f02 movel %d2,%sp@- 424fa: 4eb9 0005 05e4 jsr 505e4 42500: 588f addql #4,%sp 42502: 486e fffc pea %fp@(-4) 42506: 2f03 movel %d3,%sp@- 42508: 2f00 movel %d0,%sp@- 4250a: 2f02 movel %d2,%sp@- 4250c: 4eb9 0004 b694 jsr 4b694 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 42512: 2f2e 000c movel %fp@(12),%sp@- 42516: 4eb9 0005 0154 jsr 50154 if (info.sym_link.name == NULL) { 4251c: 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); 42520: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 42524: 6730 beqs 42556 <== NEVER TAKEN * 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( 42526: 486e ffe8 pea %fp@(-24) 4252a: 2f3c 0000 a1ff movel #41471,%sp@- 42530: 2f03 movel %d3,%sp@- 42532: 4878 0004 pea 4 42536: 2f2e 0008 movel %fp@(8),%sp@- 4253a: 4eb9 0004 a8de jsr 4a8de new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 42540: 4fef 0014 lea %sp@(20),%sp 42544: 4a80 tstl %d0 42546: 6728 beqs 42570 <== NEVER TAKEN free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 42548: 242e ffbc movel %fp@(-68),%d2 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 4254c: 4280 clrl %d0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 4254e: 262e ffc0 movel %fp@(-64),%d3 42552: 4e5e unlk %fp 42554: 4e75 rts /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 42556: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4255c: 740c moveq #12,%d2 <== NOT EXECUTED 4255e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42560: 70ff moveq #-1,%d0 <== NOT EXECUTED 42562: 2082 movel %d2,%a0@ <== NOT EXECUTED free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 42564: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 42568: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 4256c: 4e5e unlk %fp <== NOT EXECUTED 4256e: 4e75 rts <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 42570: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 42574: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4257a: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED } return 0; } 42580: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED &info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); 42584: 2040 moveal %d0,%a0 <== NOT EXECUTED 42586: 720c moveq #12,%d1 <== NOT EXECUTED 42588: 588f addql #4,%sp <== NOT EXECUTED 4258a: 70ff moveq #-1,%d0 <== NOT EXECUTED } return 0; } 4258c: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 42590: 4e5e unlk %fp <== NOT EXECUTED &info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); 42592: 2081 movel %d1,%a0@ <== NOT EXECUTED } return 0; } ... =============================================================================== 00042598 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42598: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 4259a: 4e56 ffd0 linkw %fp,#-48 4259e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 425a2: 246e 000c moveal %fp@(12),%a2 425a6: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 425aa: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 425ac: b0ab 0048 cmpl %a3@(72),%d0 425b0: 671a beqs 425cc /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 425b2: 2f0a movel %a2,%sp@- 425b4: 206a 0008 moveal %a2@(8),%a0 425b8: 2f02 movel %d2,%sp@- 425ba: 2068 0034 moveal %a0@(52),%a0 425be: 4e90 jsr %a0@ return result; 425c0: 508f addql #8,%sp } 425c2: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 425c8: 4e5e unlk %fp 425ca: 4e75 rts * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 425cc: 202b 004c movel %a3@(76),%d0 425d0: 6700 0090 beqw 42662 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 425d4: 41ea 0004 lea %a2@(4),%a0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 425d8: 260e movel %fp,%d3 425da: 0683 ffff ffe4 addil #-28,%d3 /* * 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) 425e0: 7801 moveq #1,%d4 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 425e2: 2d58 ffe8 movel %a0@+,%fp@(-24) 425e6: 2d58 ffec movel %a0@+,%fp@(-20) 425ea: 2d58 fff0 movel %a0@+,%fp@(-16) 425ee: 2d50 fff4 movel %a0@,%fp@(-12) the_link.node_access = node->info.hard_link.link_node; 425f2: 2d40 ffe4 movel %d0,%fp@(-28) IMFS_Set_handlers( &the_link ); 425f6: 2f03 movel %d3,%sp@- 425f8: 4eb9 0004 aae4 jsr 4aae4 /* * 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) 425fe: 206b 004c moveal %a3@(76),%a0 42602: 4281 clrl %d1 42604: 588f addql #4,%sp 42606: 3028 0032 movew %a0@(50),%d0 4260a: 3200 movew %d0,%d1 4260c: b881 cmpl %d1,%d4 4260e: 6730 beqs 42640 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 42610: 5380 subql #1,%d0 42612: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 42616: 42a7 clrl %sp@- 42618: 486e fff8 pea %fp@(-8) 4261c: 4eb9 0004 2e6c jsr 42e6c 42622: 206b 004c moveal %a3@(76),%a0 42626: 508f addql #8,%sp 42628: 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 ); 4262e: 2f0a movel %a2,%sp@- 42630: 206a 0008 moveal %a2@(8),%a0 42634: 2f02 movel %d2,%sp@- 42636: 2068 0034 moveal %a0@(52),%a0 4263a: 4e90 jsr %a0@ return result; 4263c: 508f addql #8,%sp 4263e: 6082 bras 425c2 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 42640: 2f03 movel %d3,%sp@- 42642: 2f02 movel %d2,%sp@- 42644: 206e ffec moveal %fp@(-20),%a0 42648: 2068 0034 moveal %a0@(52),%a0 4264c: 4e90 jsr %a0@ if ( result != 0 ) 4264e: 508f addql #8,%sp 42650: 4a80 tstl %d0 42652: 6700 ff5e beqw 425b2 42656: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42658: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 4265e: 4e5e unlk %fp 42660: 4e75 rts */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 42662: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42668: 7216 moveq #22,%d1 <== NOT EXECUTED 4266a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4266c: 70ff moveq #-1,%d0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 4266e: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 <== NOT EXECUTED */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 42674: 2081 movel %d1,%a0@ <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42676: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004267c : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4267c: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 4267e: 4e56 0000 linkw %fp,#0 42682: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42686: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4268a: b0a8 0048 cmpl %a0@(72),%d0 4268e: 6610 bnes 426a0 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 42690: 4aa8 0058 tstl %a0@(88) 42694: 671c beqs 426b2 <== NEVER TAKEN /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 42696: 42a8 0058 clrl %a0@(88) 4269a: 4280 clrl %d0 return 0; } 4269c: 4e5e unlk %fp 4269e: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 426a0: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 426a6: 7214 moveq #20,%d1 <== NOT EXECUTED 426a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 426aa: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 426ac: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 426ae: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 426b0: 4e75 rts <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 426b2: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 426b8: 7216 moveq #22,%d1 <== NOT EXECUTED 426ba: 2040 moveal %d0,%a0 <== NOT EXECUTED 426bc: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 426be: 4e5e unlk %fp <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 426c0: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } =============================================================================== 00043034 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 43034: 4e56 0000 linkw %fp,#0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 43038: 2079 0005 ec66 moveal 5ec66 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 4303e: 2f03 movel %d3,%sp@- 43040: 262e 0008 movel %fp@(8),%d3 43044: 2f02 movel %d2,%sp@- 43046: 242e 000c movel %fp@(12),%d2 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 4304a: 4a88 tstl %a0 4304c: 6704 beqs 43052 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 4304e: 2050 moveal %a0@,%a0 <== NOT EXECUTED 43050: 4e90 jsr %a0@ <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 43052: 4eb9 0004 2fb8 jsr 42fb8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 43058: 2079 0005 ec6a moveal 5ec6a ,%a0 4305e: 4a88 tstl %a0 43060: 6712 beqs 43074 <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 43062: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 43066: 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)( 43068: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4306a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4306c: 4e90 jsr %a0@ <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 4306e: 508f addql #8,%sp <== NOT EXECUTED 43070: 9480 subl %d0,%d2 <== NOT EXECUTED 43072: 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 ( 43074: 4a39 0005 ec65 tstb 5ec65 4307a: 6624 bnes 430a0 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 4307c: 4a39 0005 e6cc tstb 5e6cc 43082: 6644 bnes 430c8 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 43084: 4878 0004 pea 4 43088: 2f02 movel %d2,%sp@- 4308a: 2f03 movel %d3,%sp@- 4308c: 2f39 0005 e600 movel 5e600 ,%sp@- 43092: 4eb9 0004 76dc jsr 476dc <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 43098: 4fef 0010 lea %sp@(16),%sp 4309c: 4a80 tstl %d0 4309e: 675c beqs 430fc <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 430a0: 2f39 0005 e600 movel 5e600 ,%sp@- 430a6: 2439 0005 fcb8 movel 5fcb8 ,%d2 430ac: 4eb9 0004 82f4 jsr 482f4 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 430b2: 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) ); 430b6: d082 addl %d2,%d0 430b8: 588f addql #4,%sp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 430ba: 242e fff8 movel %fp@(-8),%d2 430be: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 430c0: 23c0 0005 fcb8 movel %d0,5fcb8 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 430c6: 4e75 rts if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 430c8: 2f02 movel %d2,%sp@- 430ca: 42a7 clrl %sp@- 430cc: 2f03 movel %d3,%sp@- 430ce: 4eb9 0004 fa48 jsr 4fa48 * 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 ) { 430d4: 4fef 000c lea %sp@(12),%sp 430d8: 4a39 0005 ec65 tstb 5ec65 430de: 66c0 bnes 430a0 <== NEVER TAKEN 430e0: 4878 0004 pea 4 430e4: 2f02 movel %d2,%sp@- 430e6: 2f03 movel %d3,%sp@- 430e8: 2f39 0005 e600 movel 5e600 ,%sp@- 430ee: 4eb9 0004 76dc jsr 476dc <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 430f4: 4fef 0010 lea %sp@(16),%sp 430f8: 4a80 tstl %d0 430fa: 66a4 bnes 430a0 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 430fc: 4878 001a pea 1a <== NOT EXECUTED 43100: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED ... =============================================================================== 00042102 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 42102: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42106: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4210a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 4210e: 4a8a tstl %a2 <== NOT EXECUTED 42110: 6700 00c2 beqw 421d4 <== NOT EXECUTED return; if ( !print_handler ) 42114: 2879 0005 fb40 moveal 5fb40 ,%a4 <== NOT EXECUTED 4211a: 4a8c tstl %a4 <== NOT EXECUTED 4211c: 6700 00b6 beqw 421d4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 42120: 70ff moveq #-1,%d0 <== NOT EXECUTED 42122: b08a cmpl %a2,%d0 <== NOT EXECUTED 42124: 6700 00d8 beqw 421fe <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 42128: 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); 4212c: 2413 movel %a3@,%d2 <== NOT EXECUTED 4212e: 0682 ffff fff0 addil #-16,%d2 <== 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); 42134: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 42138: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 4213e: 282a 00fc movel %a2@(252),%d4 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 42142: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42144: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42146: 4eb9 0004 20ce jsr 420ce <== NOT EXECUTED if ( high_water_mark ) 4214c: 508f addql #8,%sp <== NOT EXECUTED 4214e: 4a80 tstl %d0 <== NOT EXECUTED 42150: 6700 00e2 beqw 42234 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 42154: d682 addl %d2,%d3 <== NOT EXECUTED 42156: 9680 subl %d0,%d3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 42158: 4a8a tstl %a2 <== NOT EXECUTED 4215a: 6700 00e0 beqw 4223c <== NOT EXECUTED (*print_handler)( 4215e: 486e fffb pea %fp@(-5) <== NOT EXECUTED 42162: 4878 0005 pea 5 <== NOT EXECUTED 42166: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4216a: 4eb9 0004 692c jsr 4692c <== NOT EXECUTED 42170: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42172: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42176: 4879 0005 d540 pea 5d540 <== NOT EXECUTED 4217c: 2f39 0005 fb3c movel 5fb3c ,%sp@- <== NOT EXECUTED 42182: 4e94 jsr %a4@ <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 42184: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { (*print_handler)( 42188: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 4218c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4218e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42190: 2013 movel %a3@,%d0 <== NOT EXECUTED 42192: 5380 subql #1,%d0 <== NOT EXECUTED 42194: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42198: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4219a: 4879 0005 d55b pea 5d55b <== NOT EXECUTED 421a0: 2f39 0005 fb3c movel 5fb3c ,%sp@- <== NOT EXECUTED 421a6: 2079 0005 fb40 moveal 5fb40 ,%a0 <== NOT EXECUTED 421ac: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 421ae: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 421b2: 4ab9 0005 fb38 tstl 5fb38 <== NOT EXECUTED 421b8: 6724 beqs 421de <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 421ba: 2f03 movel %d3,%sp@- <== NOT EXECUTED 421bc: 4879 0005 d586 pea 5d586 <== NOT EXECUTED 421c2: 2f39 0005 fb3c movel 5fb3c ,%sp@- <== NOT EXECUTED 421c8: 2079 0005 fb40 moveal 5fb40 ,%a0 <== NOT EXECUTED 421ce: 4e90 jsr %a0@ <== NOT EXECUTED 421d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 421d4: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 421da: 4e5e unlk %fp <== NOT EXECUTED 421dc: 4e75 rts <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 421de: 4879 0005 d579 pea 5d579 <== NOT EXECUTED 421e4: 2f39 0005 fb3c movel 5fb3c ,%sp@- <== NOT EXECUTED 421ea: 2079 0005 fb40 moveal 5fb40 ,%a0 <== NOT EXECUTED 421f0: 4e90 jsr %a0@ <== NOT EXECUTED 421f2: 508f addql #8,%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 421f4: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 421fa: 4e5e unlk %fp <== NOT EXECUTED 421fc: 4e75 rts <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 421fe: 4ab9 0006 035c tstl 6035c <== NOT EXECUTED 42204: 67ce beqs 421d4 <== NOT EXECUTED 42206: 47f9 0006 0358 lea 60358 ,%a3 <== NOT EXECUTED 4220c: 4284 clrl %d4 <== NOT EXECUTED 4220e: 95ca subal %a2,%a2 <== NOT EXECUTED stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 42210: 2413 movel %a3@,%d2 <== NOT EXECUTED 42212: 0682 ffff fff0 addil #-16,%d2 <== 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); 42218: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 4221c: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 42222: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42224: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42226: 4eb9 0004 20ce jsr 420ce <== NOT EXECUTED if ( high_water_mark ) 4222c: 508f addql #8,%sp <== NOT EXECUTED 4222e: 4a80 tstl %d0 <== NOT EXECUTED 42230: 6600 ff22 bnew 42154 <== NOT EXECUTED 42234: 4283 clrl %d3 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 42236: 4a8a tstl %a2 <== NOT EXECUTED 42238: 6600 ff24 bnew 4215e <== 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 ); 4223c: 4878 ffff pea ffffffff <== NOT EXECUTED 42240: 4879 0005 d54d pea 5d54d <== NOT EXECUTED 42246: 2f39 0005 fb3c movel 5fb3c ,%sp@- <== NOT EXECUTED 4224c: 4e94 jsr %a4@ <== NOT EXECUTED } (*print_handler)( 4224e: 206b 0004 moveal %a3@(4),%a0 <== 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 ); 42252: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 42256: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42258: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4225a: 2013 movel %a3@,%d0 <== NOT EXECUTED 4225c: 5380 subql #1,%d0 <== NOT EXECUTED 4225e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42262: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42264: 4879 0005 d55b pea 5d55b <== NOT EXECUTED 4226a: 2f39 0005 fb3c movel 5fb3c ,%sp@- <== NOT EXECUTED 42270: 2079 0005 fb40 moveal 5fb40 ,%a0 <== NOT EXECUTED 42276: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 42278: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4227c: 4ab9 0005 fb38 tstl 5fb38 <== NOT EXECUTED 42282: 6600 ff36 bnew 421ba <== NOT EXECUTED 42286: 6000 ff56 braw 421de <== NOT EXECUTED =============================================================================== 000424c8 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 424c8: 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) 424cc: 4ab9 0005 fb38 tstl 5fb38 424d2: 6656 bnes 4252a 424d4: 41f9 0006 0348 lea 60348 ,%a0 424da: 4280 clrl %d0 424dc: 43f9 0005 d6be lea 5d6be ,%a1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 424e2: 7203 moveq #3,%d1 424e4: c280 andl %d0,%d1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 424e6: 5280 addql #1,%d0 p[i] = pattern[ i%4 ]; 424e8: 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++ ) { 424ec: 7204 moveq #4,%d1 424ee: b280 cmpl %d0,%d1 424f0: 66f0 bnes 424e2 /* * 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) { 424f2: 2039 0006 04d0 movel 604d0 <_CPU_Interrupt_stack_low>,%d0 424f8: 6728 beqs 42522 <== NEVER TAKEN 424fa: 2239 0006 0474 movel 60474 <_CPU_Interrupt_stack_high>,%d1 42500: 6720 beqs 42522 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 42502: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42504: 2f01 movel %d1,%sp@- 42506: 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; 4250a: 23c0 0006 035c movel %d0,6035c Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42510: 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 - 42512: 23c1 0006 0358 movel %d1,60358 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42518: 4eb9 0005 0014 jsr 50014 4251e: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 42522: 7001 moveq #1,%d0 42524: 23c0 0005 fb38 movel %d0,5fb38 } 4252a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000420ce : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 420ce: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 420d0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 420d4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 420d8: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 420dc: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 420e0: d088 addl %a0,%d0 <== NOT EXECUTED 420e2: b088 cmpl %a0,%d0 <== NOT EXECUTED 420e4: 6310 blss 420f6 <== NOT EXECUTED if (*base != U32_PATTERN) 420e6: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 420ec: b290 cmpl %a0@,%d1 <== NOT EXECUTED 420ee: 660c bnes 420fc <== 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++) 420f0: 5888 addql #4,%a0 <== NOT EXECUTED 420f2: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 420f4: 65f0 bcss 420e6 <== NOT EXECUTED 420f6: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 420f8: 4e5e unlk %fp <== NOT EXECUTED 420fa: 4e75 rts <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 420fc: 2008 movel %a0,%d0 <== NOT EXECUTED #endif return (void *)0; } 420fe: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042304 : * * 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) { 42304: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 42308: 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"); 4230c: 4879 0005 d5ed pea 5d5ed <== NOT EXECUTED 42312: 47f9 0004 4198 lea 44198 ,%a3 <== 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) { 42318: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4231c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 42320: 286a 00c0 moveal %a2@(192),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 42324: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 42326: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42328: 4879 0005 d5fd pea 5d5fd <== NOT EXECUTED 4232e: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 42330: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42334: 4879 0005 d61a pea 5d61a <== NOT EXECUTED 4233a: 4e93 jsr %a3@ <== NOT EXECUTED printk( 4233c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 42340: 4879 0005 d62c pea 5d62c <== NOT EXECUTED 42346: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 42348: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 4234c: 4878 0020 pea 20 <== NOT EXECUTED 42350: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42354: 4eb9 0004 692c jsr 4692c <== NOT EXECUTED 4235a: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 4235e: 2e80 movel %d0,%sp@ <== NOT EXECUTED 42360: 4879 0005 d640 pea 5d640 <== NOT EXECUTED 42366: 4e93 jsr %a3@ <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 42368: 202a 00bc movel %a2@(188),%d0 <== NOT EXECUTED 4236c: 206a 00c0 moveal %a2@(192),%a0 <== NOT EXECUTED 42370: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42374: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42376: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42378: 4879 0005 d656 pea 5d656 <== NOT EXECUTED 4237e: 4e93 jsr %a3@ <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 42380: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42384: 4a02 tstb %d2 <== NOT EXECUTED 42386: 670a beqs 42392 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 42388: 4878 0081 pea 81 <== NOT EXECUTED 4238c: 4eb9 0004 72ac jsr 472ac <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 42392: 486c 0018 pea %a4@(24) <== NOT EXECUTED 42396: 486c 0008 pea %a4@(8) <== NOT EXECUTED 4239a: 4878 0010 pea 10 <== NOT EXECUTED 4239e: 4879 0005 d687 pea 5d687 <== NOT EXECUTED 423a4: 4e93 jsr %a3@ <== NOT EXECUTED 423a6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 423aa: 4878 0081 pea 81 <== NOT EXECUTED 423ae: 4eb9 0004 72ac jsr 472ac <== NOT EXECUTED =============================================================================== 000470e0 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 470e0: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 470e4: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 470ea: 5280 addql #1,%d0 470ec: 206e 0008 moveal %fp@(8),%a0 470f0: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 470f6: 42a7 clrl %sp@- 470f8: 2f28 0008 movel %a0@(8),%sp@- 470fc: 4868 0010 pea %a0@(16) 47100: 4eb9 0004 73e8 jsr 473e8 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 47106: 4fef 000c lea %sp@(12),%sp } 4710a: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4710c: 4ef9 0004 888c jmp 4888c <_Thread_Enable_dispatch> ... =============================================================================== 00046fa0 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 46fa0: 4e56 0000 linkw %fp,#0 46fa4: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46fa6: 2479 0005 ff96 moveal 5ff96 <_API_extensions_List>,%a2 46fac: b5fc 0005 ff9a cmpal #393114,%a2 46fb2: 6710 beqs 46fc4 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 46fb4: 206a 0008 moveal %a2@(8),%a0 46fb8: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 46fba: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46fbc: b5fc 0005 ff9a cmpal #393114,%a2 46fc2: 66f0 bnes 46fb4 <_API_extensions_Run_postdriver+0x14><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 46fc4: 246e fffc moveal %fp@(-4),%a2 46fc8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046fcc <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 46fcc: 4e56 0000 linkw %fp,#0 46fd0: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46fd2: 2479 0005 ff96 moveal 5ff96 <_API_extensions_List>,%a2 46fd8: b5fc 0005 ff9a cmpal #393114,%a2 46fde: 6718 beqs 46ff8 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 46fe0: 2f39 0005 feb6 movel 5feb6 <_Thread_Executing>,%sp@- 46fe6: 206a 000c moveal %a2@(12),%a0 46fea: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 46fec: 2452 moveal %a2@,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46fee: 588f addql #4,%sp 46ff0: b5fc 0005 ff9a cmpal #393114,%a2 46ff6: 66e8 bnes 46fe0 <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 46ff8: 246e fffc moveal %fp@(-4),%a2 46ffc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c970 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4c970: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4c976: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4c97a: 2279 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4c980: 48d7 001c moveml %d2-%d4,%sp@ 4c984: 242e 000c movel %fp@(12),%d2 4c988: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4c98c: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4c990: 206e 0008 moveal %fp@(8),%a0 4c994: 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 ); 4c998: 40c1 movew %sr,%d1 4c99a: 8081 orl %d1,%d0 4c99c: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4c99e: 2028 0048 movel %a0@(72),%d0 4c9a2: 5280 addql #1,%d0 4c9a4: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4c9a8: 4aa8 0040 tstl %a0@(64) 4c9ac: 6606 bnes 4c9b4 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4c9ae: b0a8 0044 cmpl %a0@(68),%d0 4c9b2: 672e beqs 4c9e2 <_CORE_barrier_Wait+0x72> 4c9b4: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4c9b6: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4c9ba: 2348 0044 movel %a0,%a1@(68) 4c9be: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4c9c2: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4c9c4: 2d43 000c movel %d3,%fp@(12) 4c9c8: 203c 0004 90c0 movel #299200,%d0 4c9ce: 2d48 0008 movel %a0,%fp@(8) 4c9d2: 2d40 0010 movel %d0,%fp@(16) } 4c9d6: 4cd7 001c moveml %sp@,%d2-%d4 4c9da: 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 ); 4c9dc: 4ef9 0004 8d60 jmp 48d60 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4c9e2: 7001 moveq #1,%d0 4c9e4: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4c9e8: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4c9ea: 2d44 0010 movel %d4,%fp@(16) 4c9ee: 2d42 000c movel %d2,%fp@(12) 4c9f2: 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 ); } 4c9f6: 4cd7 001c moveml %sp@,%d2-%d4 4c9fa: 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 ); 4c9fc: 4ef9 0004 c934 jmp 4c934 <_CORE_barrier_Release> ... =============================================================================== 0005a930 <_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 ) { 5a930: 4e56 ffe0 linkw %fp,#-32 5a934: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5a938: 266e 0008 moveal %fp@(8),%a3 5a93c: 282e 000c movel %fp@(12),%d4 5a940: 242e 0010 movel %fp@(16),%d2 5a944: 2a2e 001c movel %fp@(28),%d5 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 5a948: b4ab 004c cmpl %a3@(76),%d2 5a94c: 6262 bhis 5a9b0 <_CORE_message_queue_Broadcast+0x80><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 5a94e: 4aab 0048 tstl %a3@(72) 5a952: 664c bnes 5a9a0 <_CORE_message_queue_Broadcast+0x70> * 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))) { 5a954: 2f0b movel %a3,%sp@- 5a956: 49f9 0005 cf80 lea 5cf80 <_Thread_queue_Dequeue>,%a4 5a95c: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5a95e: 4bf9 0006 3ac0 lea 63ac0 ,%a5 5a964: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a966: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5a968: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a96a: 4a80 tstl %d0 5a96c: 6722 beqs 5a990 <_CORE_message_queue_Broadcast+0x60> 5a96e: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5a970: 5283 addql #1,%d3 5a972: 2f04 movel %d4,%sp@- 5a974: 2f2a 002c movel %a2@(44),%sp@- 5a978: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 5a97a: 206a 0028 moveal %a2@(40),%a0 5a97e: 4fef 000c lea %sp@(12),%sp 5a982: 2082 movel %d2,%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))) { 5a984: 2f0b movel %a3,%sp@- 5a986: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a988: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5a98a: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a98c: 4a80 tstl %d0 5a98e: 66de bnes 5a96e <_CORE_message_queue_Broadcast+0x3e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 5a990: 2045 moveal %d5,%a0 5a992: 4280 clrl %d0 5a994: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a996: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5a99c: 4e5e unlk %fp 5a99e: 4e75 rts * 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; 5a9a0: 2045 moveal %d5,%a0 5a9a2: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a9a4: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 * 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; 5a9aa: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a9ac: 4e5e unlk %fp 5a9ae: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 5a9b0: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a9b2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5a9b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a9bc <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 5a9bc: 4e56 0000 linkw %fp,#0 5a9c0: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 5a9c2: 2f2e 0010 movel %fp@(16),%sp@- 5a9c6: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 5a9ca: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 5a9ce: 2f0a movel %a2,%sp@- 5a9d0: 4eb9 0005 d320 jsr 5d320 <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 5a9d6: 4fef 000c lea %sp@(12),%sp 5a9da: 4aaa 0048 tstl %a2@(72) 5a9de: 6612 bnes 5a9f2 <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 5a9e0: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 5a9e6: 246e fffc moveal %fp@(-4),%a2 5a9ea: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 5a9ec: 4ef9 0005 e2ac jmp 5e2ac <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 5a9f2: 2f0a movel %a2,%sp@- 5a9f4: 4eb9 0005 aa30 jsr 5aa30 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 5a9fa: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 5aa00: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 5aa02: 246e fffc moveal %fp@(-4),%a2 5aa06: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 5aa08: 4ef9 0005 e2ac jmp 5e2ac <_Workspace_Free> ... =============================================================================== 00050570 <_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)) { 50570: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 50572: 4e56 fff4 linkw %fp,#-12 50576: 202e 0014 movel %fp@(20),%d0 5057a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5057e: 246e 0008 moveal %fp@(8),%a2 50582: 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)) { 50586: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 50588: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 5058c: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 50590: 2540 004c movel %d0,%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)) { 50594: 4a81 tstl %d1 50596: 6620 bnes 505b8 <_CORE_message_queue_Initialize+0x48> 50598: 2200 movel %d0,%d1 /* * 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)); 5059a: 2601 movel %d1,%d3 5059c: 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 * 505a2: 2003 movel %d3,%d0 505a4: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 505a8: b280 cmpl %d0,%d1 505aa: 631c blss 505c8 <_CORE_message_queue_Initialize+0x58><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 505ac: 4200 clrb %d0 } 505ae: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 505b4: 4e5e unlk %fp 505b6: 4e75 rts * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 505b8: 2200 movel %d0,%d1 505ba: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 505bc: 76fc moveq #-4,%d3 505be: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 505c0: b280 cmpl %d0,%d1 505c2: 64d6 bccs 5059a <_CORE_message_queue_Initialize+0x2a><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 505c4: 4200 clrb %d0 <== NOT EXECUTED 505c6: 60e6 bras 505ae <_CORE_message_queue_Initialize+0x3e><== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 505c8: 2f00 movel %d0,%sp@- 505ca: 4eb9 0005 32e4 jsr 532e4 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 505d0: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 505d2: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 505d6: 67d4 beqs 505ac <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 505d8: 2f03 movel %d3,%sp@- 505da: 2f02 movel %d2,%sp@- 505dc: 2f00 movel %d0,%sp@- 505de: 486a 0060 pea %a2@(96) 505e2: 4eb9 0005 5fa4 jsr 55fa4 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 505e8: 4878 0006 pea 6 505ec: 7001 moveq #1,%d0 505ee: 206e 000c moveal %fp@(12),%a0 505f2: b090 cmpl %a0@,%d0 505f4: 57c0 seq %d0 505f6: 4878 0080 pea 80 505fa: 49c0 extbl %d0 505fc: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 505fe: 41ea 0054 lea %a2@(84),%a0 50602: 2f00 movel %d0,%sp@- 50604: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 50608: 41ea 0050 lea %a2@(80),%a0 5060c: 2548 0058 movel %a0,%a2@(88) 50610: 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; 50612: 42aa 0054 clrl %a2@(84) 50616: 4eb9 0005 26bc jsr 526bc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 5061c: 4fef 0020 lea %sp@(32),%sp } 50620: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 50626: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 50628: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005062c <_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 ); 5062c: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 50632: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 50636: 2079 0006 9d5e moveal 69d5e <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 5063c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 50640: 2a2e 000c movel %fp@(12),%d5 50644: 282e 001c movel %fp@(28),%d4 50648: 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; 5064c: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 50650: 242e 0010 movel %fp@(16),%d2 50654: 226e 0014 moveal %fp@(20),%a1 50658: 262e 0018 movel %fp@(24),%d3 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 ); 5065c: 40c1 movew %sr,%d1 5065e: 8081 orl %d1,%d0 50660: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 50662: 200a movel %a2,%d0 50664: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5066a: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5066e: b08b cmpl %a3,%d0 50670: 674e beqs 506c0 <_CORE_message_queue_Seize+0x94> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 50672: 2053 moveal %a3@,%a0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 50674: 53aa 0048 subql #1,%a2@(72) the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 50678: 49ea 0050 lea %a2@(80),%a4 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 5067c: 2548 0050 movel %a0,%a2@(80) new_first->previous = _Chain_Head(the_chain); 50680: 214c 0004 movel %a4,%a0@(4) _ISR_Enable( level ); 50684: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; 50686: 22ab 0008 movel %a3@(8),%a1@ 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 ); 5068a: 45ea 0060 lea %a2@(96),%a2 _Thread_Executing->Wait.count = 5068e: 2079 0006 9d5e moveal 69d5e <_Thread_Executing>,%a0 50694: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50698: 2f11 movel %a1@,%sp@- 5069a: 486b 000c pea %a3@(12) 5069e: 2f02 movel %d2,%sp@- 506a0: 4eb9 0005 8e94 jsr 58e94 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 ); 506a6: 4fef 000c lea %sp@(12),%sp 506aa: 2d4a 0008 movel %a2,%fp@(8) 506ae: 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 ); } 506b2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 506b8: 4e5e unlk %fp 506ba: 4ef9 0005 04a4 jmp 504a4 <_Chain_Append> return; } #endif } if ( !wait ) { 506c0: 4a03 tstb %d3 506c2: 6612 bnes 506d6 <_CORE_message_queue_Seize+0xaa> _ISR_Enable( level ); 506c4: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 506c6: 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 ); } 506c8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 506ce: 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 ); } 506d2: 4e5e unlk %fp 506d4: 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; 506d6: 7001 moveq #1,%d0 506d8: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 506dc: 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; 506e0: 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; 506e4: 2145 0020 movel %d5,%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; 506e8: 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 ); 506ec: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 506ee: 49f9 0005 27a0 lea 527a0 <_Thread_queue_Timeout>,%a4 506f4: 2d44 000c movel %d4,%fp@(12) 506f8: 2d4c 0010 movel %a4,%fp@(16) 506fc: 2d4a 0008 movel %a2,%fp@(8) } 50700: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 50706: 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 ); 50708: 4ef9 0005 2440 jmp 52440 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00050710 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 50710: 4e56 fff4 linkw %fp,#-12 50714: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50718: 246e 0008 moveal %fp@(8),%a2 5071c: 242e 0010 movel %fp@(16),%d2 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 50720: b4aa 004c cmpl %a2@(76),%d2 50724: 6256 bhis 5077c <_CORE_message_queue_Submit+0x6c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 50726: 202a 0048 movel %a2@(72),%d0 5072a: 675c beqs 50788 <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 5072c: b0aa 0044 cmpl %a2@(68),%d0 50730: 650c bcss 5073e <_CORE_message_queue_Submit+0x2e> 50732: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50734: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5073a: 4e5e unlk %fp 5073c: 4e75 rts RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 5073e: 486a 0060 pea %a2@(96) 50742: 4eb9 0005 0504 jsr 50504 <_Chain_Get> 50748: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5074a: 2f02 movel %d2,%sp@- 5074c: 2f2e 000c movel %fp@(12),%sp@- 50750: 486b 000c pea %a3@(12) 50754: 4eb9 0005 8e94 jsr 58e94 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 5075a: 2742 0008 movel %d2,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 5075e: 2f2e 001c movel %fp@(28),%sp@- 50762: 2f0b movel %a3,%sp@- 50764: 2f0a movel %a2,%sp@- 50766: 4eb9 0005 60f8 jsr 560f8 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5076c: 4fef 001c lea %sp@(28),%sp size ); the_message->Contents.size = size; _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 50770: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50772: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50778: 4e5e unlk %fp 5077a: 4e75 rts ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 5077c: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5077e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50784: 4e5e unlk %fp 50786: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50788: 2f0a movel %a2,%sp@- 5078a: 4eb9 0005 22e0 jsr 522e0 <_Thread_queue_Dequeue> if ( the_thread ) { 50790: 588f addql #4,%sp /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50792: 2640 moveal %d0,%a3 if ( the_thread ) { 50794: 4a80 tstl %d0 50796: 672e beqs 507c6 <_CORE_message_queue_Submit+0xb6> 50798: 2f02 movel %d2,%sp@- 5079a: 2f2e 000c movel %fp@(12),%sp@- 5079e: 2f2b 002c movel %a3@(44),%sp@- 507a2: 4eb9 0005 8e94 jsr 58e94 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 507a8: 206b 0028 moveal %a3@(40),%a0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 507ac: 4fef 000c lea %sp@(12),%sp buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; the_thread->Wait.count = (uint32_t) submit_type; 507b0: 4280 clrl %d0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 507b2: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 507b4: 222e 001c movel %fp@(28),%d1 507b8: 2741 0024 movel %d1,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 507bc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 507c2: 4e5e unlk %fp 507c4: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 507c6: 202a 0048 movel %a2@(72),%d0 /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 507ca: b0aa 0044 cmpl %a2@(68),%d0 507ce: 6400 ff62 bccw 50732 <_CORE_message_queue_Submit+0x22> 507d2: 6000 ff6a braw 5073e <_CORE_message_queue_Submit+0x2e> ... =============================================================================== 000471bc <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 471bc: 4e56 0000 linkw %fp,#0 471c0: 206e 0008 moveal %fp@(8),%a0 471c4: 2f0a movel %a2,%sp@- 471c6: 246e 000c moveal %fp@(12),%a2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 471ca: 224a moveal %a2,%a1 471cc: 2159 0040 movel %a1@+,%a0@(64) 471d0: 2159 0044 movel %a1@+,%a0@(68) 471d4: 2159 0048 movel %a1@+,%a0@(72) CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 471d8: 202e 0010 movel %fp@(16),%d0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 471dc: 3151 004c movew %a1@,%a0@(76) the_mutex->lock = initial_lock; 471e0: 2140 004e movel %d0,%a0@(78) the_mutex->blocked_count = 0; 471e4: 42a8 0056 clrl %a0@(86) if ( initial_lock == CORE_MUTEX_LOCKED ) { 471e8: 4a80 tstl %d0 471ea: 6654 bnes 47240 <_CORE_mutex_Initialize+0x84> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 471ec: 2279 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a1 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 471f2: 103c 0001 moveb #1,%d0 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 471f6: 7202 moveq #2,%d1 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 471f8: 2140 0052 movel %d0,%a0@(82) the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 471fc: 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; 47202: 2028 0046 movel %a0@(70),%d0 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 47206: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4720a: b280 cmpl %d0,%d1 4720c: 6762 beqs 47270 <_CORE_mutex_Initialize+0xb4> <== NEVER TAKEN 4720e: 123c 0003 moveb #3,%d1 47212: b280 cmpl %d0,%d1 47214: 675a beqs 47270 <_CORE_mutex_Initialize+0xb4> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 47216: 4aaa 0006 tstl %a2@(6) 4721a: 56c0 sne %d0 4721c: 4878 0005 pea 5 47220: 49c0 extbl %d0 47222: 4878 0400 pea 400 47226: 4480 negl %d0 47228: 2f00 movel %d0,%sp@- 4722a: 2f08 movel %a0,%sp@- 4722c: 4eb9 0004 8fdc jsr 48fdc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 47232: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 47236: 4280 clrl %d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 47238: 246e fffc moveal %fp@(-4),%a2 4723c: 4e5e unlk %fp 4723e: 4e75 rts the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 47240: 4aaa 0006 tstl %a2@(6) 47244: 56c0 sne %d0 #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 47246: 42a8 0052 clrl %a0@(82) the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4724a: 49c0 extbl %d0 4724c: 4480 negl %d0 _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 4724e: 42a8 005a clrl %a0@(90) the_mutex->holder_id = 0; 47252: 42a8 005e clrl %a0@(94) } _Thread_queue_Initialize( 47256: 4878 0005 pea 5 4725a: 4878 0400 pea 400 4725e: 2f00 movel %d0,%sp@- 47260: 2f08 movel %a0,%sp@- 47262: 4eb9 0004 8fdc jsr 48fdc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 47268: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4726c: 4280 clrl %d0 4726e: 60c8 bras 47238 <_CORE_mutex_Initialize+0x7c> the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 47270: 2028 004a movel %a0@(74),%d0 47274: b0a9 0014 cmpl %a1@(20),%d0 47278: 6228 bhis 472a2 <_CORE_mutex_Initialize+0xe6> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 4727a: 52a9 001c addql #1,%a1@(28) the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4727e: 4aaa 0006 tstl %a2@(6) 47282: 56c0 sne %d0 47284: 4878 0005 pea 5 47288: 49c0 extbl %d0 4728a: 4878 0400 pea 400 4728e: 4480 negl %d0 47290: 2f00 movel %d0,%sp@- 47292: 2f08 movel %a0,%sp@- 47294: 4eb9 0004 8fdc jsr 48fdc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 4729a: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4729e: 4280 clrl %d0 472a0: 6096 bras 47238 <_CORE_mutex_Initialize+0x7c> STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 472a2: 246e fffc moveal %fp@(-4),%a2 the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 472a6: 7006 moveq #6,%d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 472a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047338 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 47338: 4e56 0000 linkw %fp,#0 4733c: 202e 0010 movel %fp@(16),%d0 47340: 2f0a movel %a2,%sp@- 47342: 246e 0008 moveal %fp@(8),%a2 47346: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 47348: 2239 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 4734e: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 47350: 4a81 tstl %d1 47352: 6704 beqs 47358 <_CORE_mutex_Seize+0x20> 47354: 4a00 tstb %d0 47356: 6634 bnes 4738c <_CORE_mutex_Seize+0x54> <== ALWAYS TAKEN 47358: 486e 0018 pea %fp@(24) 4735c: 2f0a movel %a2,%sp@- 4735e: 4eb9 0004 ca04 jsr 4ca04 <_CORE_mutex_Seize_interrupt_trylock> 47364: 508f addql #8,%sp 47366: 4a80 tstl %d0 47368: 6716 beqs 47380 <_CORE_mutex_Seize+0x48> 4736a: 4a02 tstb %d2 4736c: 6636 bnes 473a4 <_CORE_mutex_Seize+0x6c> 4736e: 202e 0018 movel %fp@(24),%d0 47372: 46c0 movew %d0,%sr 47374: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 4737a: 7001 moveq #1,%d0 4737c: 2140 0034 movel %d0,%a0@(52) } 47380: 242e fff8 movel %fp@(-8),%d2 47384: 246e fffc moveal %fp@(-4),%a2 47388: 4e5e unlk %fp 4738a: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 4738c: 7001 moveq #1,%d0 4738e: b0b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d0 47394: 64c2 bccs 47358 <_CORE_mutex_Seize+0x20> 47396: 4878 0013 pea 13 4739a: 42a7 clrl %sp@- 4739c: 42a7 clrl %sp@- 4739e: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> 473a4: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 473aa: 5280 addql #1,%d0 473ac: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 473b2: 216e 000c 0020 movel %fp@(12),%a0@(32) 473b8: 23c0 0005 fdfc movel %d0,5fdfc <_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; 473be: 7001 moveq #1,%d0 473c0: 214a 0044 movel %a2,%a0@(68) 473c4: 2540 0030 movel %d0,%a2@(48) 473c8: 202e 0018 movel %fp@(24),%d0 473cc: 46c0 movew %d0,%sr 473ce: 2f2e 0014 movel %fp@(20),%sp@- 473d2: 2f0a movel %a2,%sp@- 473d4: 4eb9 0004 72ac jsr 472ac <_CORE_mutex_Seize_interrupt_blocking> } 473da: 242e fff8 movel %fp@(-8),%d2 bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 473de: 508f addql #8,%sp } 473e0: 246e fffc moveal %fp@(-4),%a2 473e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ca04 <_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 ) { 4ca04: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4ca08: 2279 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a1 4ca0e: 2f0a movel %a2,%sp@- 4ca10: 206e 0008 moveal %fp@(8),%a0 4ca14: 246e 000c moveal %fp@(12),%a2 4ca18: 2f02 movel %d2,%sp@- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4ca1a: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4ca1e: 4aa8 004e tstl %a0@(78) 4ca22: 673a beqs 4ca5e <_CORE_mutex_Seize_interrupt_trylock+0x5a> the_mutex->lock = CORE_MUTEX_LOCKED; 4ca24: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4ca28: 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; 4ca2a: 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; 4ca30: 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; 4ca34: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4ca38: 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; 4ca3c: 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 ) || 4ca40: b280 cmpl %d0,%d1 4ca42: 672e beqs 4ca72 <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4ca44: 123c 0003 moveb #3,%d1 4ca48: b280 cmpl %d0,%d1 4ca4a: 674e beqs 4ca9a <_CORE_mutex_Seize_interrupt_trylock+0x96> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4ca4c: 2012 movel %a2@,%d0 4ca4e: 46c0 movew %d0,%sr 4ca50: 4280 clrl %d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4ca52: 242e fff8 movel %fp@(-8),%d2 4ca56: 246e fffc moveal %fp@(-4),%a2 4ca5a: 4e5e unlk %fp 4ca5c: 4e75 rts /* * 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 ) ) { 4ca5e: b3e8 005a cmpal %a0@(90),%a1 4ca62: 671a beqs 4ca7e <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4ca64: 242e fff8 movel %fp@(-8),%d2 the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4ca68: 7001 moveq #1,%d0 4ca6a: 246e fffc moveal %fp@(-4),%a2 4ca6e: 4e5e unlk %fp 4ca70: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4ca72: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4ca76: 2012 movel %a2@,%d0 4ca78: 46c0 movew %d0,%sr 4ca7a: 4280 clrl %d0 4ca7c: 60d4 bras 4ca52 <_CORE_mutex_Seize_interrupt_trylock+0x4e> * 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4ca7e: 2028 0040 movel %a0@(64),%d0 4ca82: 6658 bnes 4cadc <_CORE_mutex_Seize_interrupt_trylock+0xd8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4ca84: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4ca88: 2012 movel %a2@,%d0 4ca8a: 46c0 movew %d0,%sr 4ca8c: 242e fff8 movel %fp@(-8),%d2 4ca90: 4280 clrl %d0 4ca92: 246e fffc moveal %fp@(-4),%a2 4ca96: 4e5e unlk %fp 4ca98: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4ca9a: 2429 001c movel %a1@(28),%d2 4ca9e: 2002 movel %d2,%d0 4caa0: 5280 addql #1,%d0 4caa2: 2340 001c movel %d0,%a1@(28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4caa6: 2029 0014 movel %a1@(20),%d0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4caaa: 2228 004a movel %a0@(74),%d1 current = executing->current_priority; if ( current == ceiling ) { 4caae: b081 cmpl %d1,%d0 4cab0: 6700 0082 beqw 4cb34 <_CORE_mutex_Seize_interrupt_trylock+0x130> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4cab4: 6244 bhis 4cafa <_CORE_mutex_Seize_interrupt_trylock+0xf6> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4cab6: 7206 moveq #6,%d1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4cab8: 7001 moveq #1,%d0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4caba: 2341 0034 movel %d1,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4cabe: 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; 4cac2: 2140 004e movel %d0,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4cac6: 2342 001c movel %d2,%a1@(28) _ISR_Enable( *level_p ); 4caca: 2012 movel %a2@,%d0 4cacc: 46c0 movew %d0,%sr 4cace: 242e fff8 movel %fp@(-8),%d2 4cad2: 4280 clrl %d0 4cad4: 246e fffc moveal %fp@(-4),%a2 4cad8: 4e5e unlk %fp 4cada: 4e75 rts * 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4cadc: 7201 moveq #1,%d1 4cade: b280 cmpl %d0,%d1 4cae0: 6682 bnes 4ca64 <_CORE_mutex_Seize_interrupt_trylock+0x60><== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4cae2: 7002 moveq #2,%d0 <== NOT EXECUTED 4cae4: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 4cae8: 2012 movel %a2@,%d0 <== NOT EXECUTED 4caea: 46c0 movew %d0,%sr <== NOT EXECUTED 4caec: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4caf0: 4280 clrl %d0 <== NOT EXECUTED 4caf2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4caf6: 4e5e unlk %fp <== NOT EXECUTED 4caf8: 4e75 rts <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4cafa: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 4cb00: 5280 addql #1,%d0 4cb02: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4cb08: 2012 movel %a2@,%d0 4cb0a: 46c0 movew %d0,%sr _Thread_Change_priority( 4cb0c: 42a7 clrl %sp@- 4cb0e: 2f28 004a movel %a0@(74),%sp@- 4cb12: 2f28 005a movel %a0@(90),%sp@- 4cb16: 4eb9 0004 836c jsr 4836c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4cb1c: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> 4cb22: 242e fff8 movel %fp@(-8),%d2 4cb26: 4fef 000c lea %sp@(12),%sp 4cb2a: 4280 clrl %d0 4cb2c: 246e fffc moveal %fp@(-4),%a2 4cb30: 4e5e unlk %fp 4cb32: 4e75 rts Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4cb34: 2012 movel %a2@,%d0 4cb36: 46c0 movew %d0,%sr 4cb38: 242e fff8 movel %fp@(-8),%d2 4cb3c: 4280 clrl %d0 4cb3e: 246e fffc moveal %fp@(-4),%a2 4cb42: 4e5e unlk %fp ... =============================================================================== 0004754c <_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 ) { 4754c: 4e56 0000 linkw %fp,#0 47550: 2f0a movel %a2,%sp@- 47552: 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)) ) { 47556: 2f0a movel %a2,%sp@- 47558: 4eb9 0004 8c00 jsr 48c00 <_Thread_queue_Dequeue> 4755e: 588f addql #4,%sp 47560: 4a80 tstl %d0 47562: 670a beqs 4756e <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 47564: 246e fffc moveal %fp@(-4),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 47568: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 4756a: 4e5e unlk %fp 4756c: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 4756e: 203c 0000 0700 movel #1792,%d0 47574: 40c1 movew %sr,%d1 47576: 8081 orl %d1,%d0 47578: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 4757a: 202a 0048 movel %a2@(72),%d0 4757e: b0aa 0040 cmpl %a2@(64),%d0 47582: 6412 bccs 47596 <_CORE_semaphore_Surrender+0x4a> <== NEVER TAKEN the_semaphore->count += 1; 47584: 5280 addql #1,%d0 47586: 2540 0048 movel %d0,%a2@(72) 4758a: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 4758c: 46c1 movew %d1,%sr } return status; } 4758e: 246e fffc moveal %fp@(-4),%a2 47592: 4e5e unlk %fp 47594: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 47596: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 47598: 46c1 movew %d1,%sr <== NOT EXECUTED 4759a: 60f2 bras 4758e <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED =============================================================================== 0004c8b0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4c8b0: 4e56 0000 linkw %fp,#0 4c8b4: 202e 0010 movel %fp@(16),%d0 4c8b8: 2f0a movel %a2,%sp@- 4c8ba: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4c8be: 224a moveal %a2,%a1 4c8c0: 2f02 movel %d2,%sp@- 4c8c2: 242e 0014 movel %fp@(20),%d2 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 4c8c6: 42aa 0004 clrl %a2@(4) next = starting_address; while ( count-- ) { 4c8ca: 4a80 tstl %d0 4c8cc: 6718 beqs 4c8e6 <_Chain_Initialize+0x36> <== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 4c8ce: 206e 000c moveal %fp@(12),%a0 while ( count-- ) { current->next = next; next->previous = current; 4c8d2: 2149 0004 movel %a1,%a0@(4) 4c8d6: 2208 movel %a0,%d1 4c8d8: d282 addl %d2,%d1 current = next; next = (Chain_Node *) 4c8da: 5380 subql #1,%d0 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 4c8dc: 2288 movel %a0,%a1@ next->previous = current; current = next; next = (Chain_Node *) 4c8de: 2248 moveal %a0,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4c8e0: 2041 moveal %d1,%a0 4c8e2: 4a80 tstl %d0 4c8e4: 66ec bnes 4c8d2 <_Chain_Initialize+0x22> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 4c8e6: 200a movel %a2,%d0 4c8e8: 5880 addql #4,%d0 4c8ea: 2280 movel %d0,%a1@ the_chain->last = current; } 4c8ec: 241f movel %sp@+,%d2 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 4c8ee: 2549 0008 movel %a1,%a2@(8) } 4c8f2: 245f moveal %sp@+,%a2 4c8f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000460a8 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 460a8: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 460ae: 4e56 ffec linkw %fp,#-20 460b2: 222e 0008 movel %fp@(8),%d1 460b6: 48d7 043c moveml %d2-%d5/%a2,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 460ba: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 460c0: 242e 000c movel %fp@(12),%d2 460c4: 2a2e 0010 movel %fp@(16),%d5 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 460c8: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 460cc: 226e 0014 moveal %fp@(20),%a1 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 460d0: 206a 0108 moveal %a2@(264),%a0 _ISR_Disable( level ); 460d4: 40c4 movew %sr,%d4 460d6: 8084 orl %d4,%d0 460d8: 46c0 movew %d0,%sr pending_events = api->pending_events; 460da: 2610 movel %a0@,%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 ); 460dc: 2001 movel %d1,%d0 460de: c083 andl %d3,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 460e0: 670c beqs 460ee <_Event_Seize+0x46> 460e2: b081 cmpl %d1,%d0 460e4: 6700 0084 beqw 4616a <_Event_Seize+0xc2> 460e8: 0802 0001 btst #1,%d2 460ec: 667c bnes 4616a <_Event_Seize+0xc2> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 460ee: 0802 0000 btst #0,%d2 460f2: 6662 bnes 46156 <_Event_Seize+0xae> * 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; 460f4: 2542 0030 movel %d2,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 460f8: 7401 moveq #1,%d2 * * 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; 460fa: 2541 0024 movel %d1,%a2@(36) executing->Wait.return_argument = event_out; 460fe: 2549 0028 movel %a1,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 46102: 23c2 0006 0006 movel %d2,60006 <_Event_Sync_state> _ISR_Enable( level ); 46108: 46c4 movew %d4,%sr if ( ticks ) { 4610a: 4a85 tstl %d5 4610c: 6672 bnes 46180 <_Event_Seize+0xd8> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 4610e: 4878 0100 pea 100 46112: 2f0a movel %a2,%sp@- 46114: 4eb9 0004 9168 jsr 49168 <_Thread_Set_state> _ISR_Disable( level ); 4611a: 203c 0000 0700 movel #1792,%d0 46120: 40c1 movew %sr,%d1 46122: 8081 orl %d1,%d0 46124: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 46126: 7401 moveq #1,%d2 46128: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 4612a: 2039 0006 0006 movel 60006 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 46130: 42b9 0006 0006 clrl 60006 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 46136: b480 cmpl %d0,%d2 46138: 6700 00a4 beqw 461de <_Event_Seize+0x136> * 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 ); 4613c: 2d4a 000c movel %a2,%fp@(12) 46140: 2d41 0010 movel %d1,%fp@(16) } 46144: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 * 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 ); 4614a: 2d40 0008 movel %d0,%fp@(8) } 4614e: 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 ); 46150: 4ef9 0004 8304 jmp 48304 <_Thread_blocking_operation_Cancel> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 46156: 46c4 movew %d4,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 46158: 720d moveq #13,%d1 4615a: 2541 0034 movel %d1,%a2@(52) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4615e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; 46164: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 46166: 4e5e unlk %fp 46168: 4e75 rts pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 4616a: 2200 movel %d0,%d1 4616c: 4681 notl %d1 4616e: c283 andl %d3,%d1 46170: 2081 movel %d1,%a0@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 46172: 46c4 movew %d4,%sr *event_out = seized_events; 46174: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 46176: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4617c: 4e5e unlk %fp 4617e: 4e75 rts _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 46180: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46184: 223c 0004 6374 movel #287604,%d1 the_watchdog->id = id; 4618a: 2540 0068 movel %d0,%a2@(104) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4618e: 2541 0064 movel %d1,%a2@(100) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46192: 2545 0054 movel %d5,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46196: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4619a: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4619e: 486a 0048 pea %a2@(72) 461a2: 4879 0005 fed4 pea 5fed4 <_Watchdog_Ticks_chain> 461a8: 4eb9 0004 996c jsr 4996c <_Watchdog_Insert> 461ae: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 461b0: 4878 0100 pea 100 461b4: 2f0a movel %a2,%sp@- 461b6: 4eb9 0004 9168 jsr 49168 <_Thread_Set_state> _ISR_Disable( level ); 461bc: 203c 0000 0700 movel #1792,%d0 461c2: 40c1 movew %sr,%d1 461c4: 8081 orl %d1,%d0 461c6: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 461c8: 7401 moveq #1,%d2 461ca: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 461cc: 2039 0006 0006 movel 60006 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 461d2: 42b9 0006 0006 clrl 60006 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 461d8: b480 cmpl %d0,%d2 461da: 6600 ff60 bnew 4613c <_Event_Seize+0x94> _ISR_Enable( level ); 461de: 46c1 movew %d1,%sr * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 461e0: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 461e6: 4e5e unlk %fp ... =============================================================================== 00046248 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 46248: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 4624e: 4e56 ffec linkw %fp,#-20 46252: 48d7 043c moveml %d2-%d5/%a2,%sp@ 46256: 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 ]; 4625a: 206a 0108 moveal %a2@(264),%a0 option_set = (rtems_option) the_thread->Wait.option; 4625e: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 46262: 40c3 movew %sr,%d3 46264: 8083 orl %d3,%d0 46266: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 46268: 222a 0024 movel %a2@(36),%d1 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 4626c: 2001 movel %d1,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 4626e: 2410 movel %a0@,%d2 46270: 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 ) ) { 46272: 6778 beqs 462ec <_Event_Surrender+0xa4> /* * 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() && 46274: 2279 0005 fe96 moveal 5fe96 <_ISR_Nest_level>,%a1 4627a: 4a89 tstl %a1 4627c: 670a beqs 46288 <_Event_Surrender+0x40> 4627e: b5f9 0005 feb6 cmpal 5feb6 <_Thread_Executing>,%a2 46284: 6700 00a0 beqw 46326 <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 46288: 2a2a 0010 movel %a2@(16),%d5 4628c: 0285 0000 0100 andil #256,%d5 46292: 674c beqs 462e0 <_Event_Surrender+0x98> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 46294: b081 cmpl %d1,%d0 46296: 6706 beqs 4629e <_Event_Surrender+0x56> 46298: 0804 0001 btst #1,%d4 4629c: 6742 beqs 462e0 <_Event_Surrender+0x98> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 4629e: 2200 movel %d0,%d1 462a0: 4681 notl %d1 462a2: c282 andl %d2,%d1 462a4: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 462a6: 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; 462aa: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 462ae: 2080 movel %d0,%a0@ _ISR_Flash( level ); 462b0: 203c 0000 0700 movel #1792,%d0 462b6: 46c3 movew %d3,%sr 462b8: 8083 orl %d3,%d0 462ba: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 462bc: 7a02 moveq #2,%d5 462be: baaa 0050 cmpl %a2@(80),%d5 462c2: 6734 beqs 462f8 <_Event_Surrender+0xb0> _ISR_Enable( level ); 462c4: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 462c6: 2f3c 1003 fff8 movel #268697592,%sp@- 462cc: 2f0a movel %a2,%sp@- 462ce: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state> 462d4: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 462d6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462dc: 4e5e unlk %fp 462de: 4e75 rts _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 462e0: 46c3 movew %d3,%sr } 462e2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462e8: 4e5e unlk %fp 462ea: 4e75 rts /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 462ec: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 462ee: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462f4: 4e5e unlk %fp 462f6: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 462f8: 7003 moveq #3,%d0 462fa: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 462fe: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 46300: 486a 0048 pea %a2@(72) 46304: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4630a: 2f3c 1003 fff8 movel #268697592,%sp@- 46310: 2f0a movel %a2,%sp@- 46312: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state> 46318: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 4631c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46322: 4e5e unlk %fp 46324: 4e75 rts * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 46326: 2279 0006 0006 moveal 60006 <_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() && 4632c: 7a02 moveq #2,%d5 4632e: ba89 cmpl %a1,%d5 46330: 6710 beqs 46342 <_Event_Surrender+0xfa> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 46332: 2279 0006 0006 moveal 60006 <_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() && 46338: 1a3c 0001 moveb #1,%d5 4633c: ba89 cmpl %a1,%d5 4633e: 6600 ff48 bnew 46288 <_Event_Surrender+0x40> _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) ) { 46342: b081 cmpl %d1,%d0 46344: 6706 beqs 4634c <_Event_Surrender+0x104> 46346: 0804 0001 btst #1,%d4 4634a: 671a beqs 46366 <_Event_Surrender+0x11e> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 4634c: 2200 movel %d0,%d1 4634e: 4681 notl %d1 46350: c282 andl %d2,%d1 46352: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 46354: 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; 46358: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4635c: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4635e: 7003 moveq #3,%d0 46360: 23c0 0006 0006 movel %d0,60006 <_Event_Sync_state> } _ISR_Enable( level ); 46366: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 46368: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4636e: 4e5e unlk %fp ... =============================================================================== 00046374 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 46374: 4e56 fffc linkw %fp,#-4 46378: 2f03 movel %d3,%sp@- 4637a: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 4637c: 486e fffc pea %fp@(-4) 46380: 2f2e 0008 movel %fp@(8),%sp@- 46384: 4eb9 0004 88b4 jsr 488b4 <_Thread_Get> switch ( location ) { 4638a: 508f addql #8,%sp 4638c: 4aae fffc tstl %fp@(-4) 46390: 6642 bnes 463d4 <_Event_Timeout+0x60> <== 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 ); 46392: 223c 0000 0700 movel #1792,%d1 46398: 40c2 movew %sr,%d2 4639a: 8282 orl %d2,%d1 4639c: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 4639e: 2040 moveal %d0,%a0 463a0: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 463a4: b0b9 0005 feb6 cmpl 5feb6 <_Thread_Executing>,%d0 463aa: 6734 beqs 463e0 <_Event_Timeout+0x6c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 463ac: 7606 moveq #6,%d3 463ae: 2040 moveal %d0,%a0 463b0: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 463b4: 46c2 movew %d2,%sr 463b6: 2f3c 1003 fff8 movel #268697592,%sp@- 463bc: 2f00 movel %d0,%sp@- 463be: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 463c4: 508f addql #8,%sp 463c6: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 463cc: 5380 subql #1,%d0 463ce: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 463d4: 242e fff4 movel %fp@(-12),%d2 463d8: 262e fff8 movel %fp@(-8),%d3 463dc: 4e5e unlk %fp 463de: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 463e0: 2239 0006 0006 movel 60006 <_Event_Sync_state>,%d1 463e6: 7601 moveq #1,%d3 463e8: b681 cmpl %d1,%d3 463ea: 66c0 bnes 463ac <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 463ec: 7606 moveq #6,%d3 463ee: 2040 moveal %d0,%a0 #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 463f0: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 463f2: 2143 0034 movel %d3,%a0@(52) #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 463f6: 23c1 0006 0006 movel %d1,60006 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 463fc: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 463fe: 2f3c 1003 fff8 movel #268697592,%sp@- 46404: 2f00 movel %d0,%sp@- 46406: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4640c: 508f addql #8,%sp 4640e: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 46414: 5380 subql #1,%d0 46416: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> 4641c: 60b6 bras 463d4 <_Event_Timeout+0x60> ... =============================================================================== 0004cbe4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4cbe4: 4e56 ffcc linkw %fp,#-52 4cbe8: 226e 000c moveal %fp@(12),%a1 4cbec: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cbf0: 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; 4cbf4: 2c09 movel %a1,%d6 4cbf6: 5886 addql #4,%d6 uintptr_t const page_size = heap->page_size; 4cbf8: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4cbfc: 222e 0010 movel %fp@(16),%d1 4cc00: 282e 0014 movel %fp@(20),%d4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4cc04: 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; 4cc08: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4cc0c: bc89 cmpl %a1,%d6 4cc0e: 6500 0146 bcsw 4cd56 <_Heap_Allocate_aligned_with_boundary+0x172> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4cc12: 4a84 tstl %d4 4cc14: 6600 013c bnew 4cd52 <_Heap_Allocate_aligned_with_boundary+0x16e> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4cc18: b1ca cmpal %a2,%a0 4cc1a: 6700 0152 beqw 4cd6e <_Heap_Allocate_aligned_with_boundary+0x18a> 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; 4cc1e: 242e fffc movel %fp@(-4),%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4cc22: 7a04 moveq #4,%d5 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; 4cc24: 5e82 addql #7,%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4cc26: 9a89 subl %a1,%d5 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4cc28: 4283 clrl %d3 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; 4cc2a: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4cc2e: 2d45 fff4 movel %d5,%fp@(-12) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4cc32: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4cc36: 5283 addql #1,%d3 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4cc38: b086 cmpl %d6,%d0 4cc3a: 630e blss 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4cc3c: 4a81 tstl %d1 4cc3e: 6628 bnes 4cc68 <_Heap_Allocate_aligned_with_boundary+0x84> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4cc40: 2408 movel %a0,%d2 4cc42: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4cc44: 4a82 tstl %d2 4cc46: 6600 00ee bnew 4cd36 <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4cc4a: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4cc4e: b1ca cmpal %a2,%a0 4cc50: 66e0 bnes 4cc32 <_Heap_Allocate_aligned_with_boundary+0x4e> 4cc52: 4280 clrl %d0 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4cc54: b6aa 0044 cmpl %a2@(68),%d3 4cc58: 6304 blss 4cc5e <_Heap_Allocate_aligned_with_boundary+0x7a> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4cc5a: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4cc5e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4cc64: 4e5e unlk %fp 4cc66: 4e75 rts 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; 4cc68: 7efe moveq #-2,%d7 4cc6a: 4be8 0008 lea %a0@(8),%a5 4cc6e: c087 andl %d7,%d0 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4cc70: 286a 0014 moveal %a2@(20),%a4 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; 4cc74: d088 addl %a0,%d0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4cc76: 2a2e fff8 movel %fp@(-8),%d5 4cc7a: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4cc7c: 242e fff4 movel %fp@(-12),%d2 4cc80: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4cc82: 2e02 movel %d2,%d7 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; 4cc84: d085 addl %d5,%d0 4cc86: 4c41 7005 remul %d1,%d5,%d7 4cc8a: 9485 subl %d5,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4cc8c: b480 cmpl %d0,%d2 4cc8e: 630a blss 4cc9a <_Heap_Allocate_aligned_with_boundary+0xb6> 4cc90: 2a00 movel %d0,%d5 4cc92: 4c41 5002 remul %d1,%d2,%d5 4cc96: 9082 subl %d2,%d0 4cc98: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4cc9a: 4a84 tstl %d4 4cc9c: 676c beqs 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4cc9e: 2002 movel %d2,%d0 4cca0: d089 addl %a1,%d0 4cca2: 2e00 movel %d0,%d7 4cca4: 4c44 7005 remul %d4,%d5,%d7 4cca8: 2e00 movel %d0,%d7 4ccaa: 9e85 subl %d5,%d7 4ccac: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4ccae: be82 cmpl %d2,%d7 4ccb0: 6358 blss 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126> 4ccb2: be80 cmpl %d0,%d7 4ccb4: 6454 bccs 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4ccb6: 2e0d movel %a5,%d7 4ccb8: de89 addl %a1,%d7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4ccba: ba87 cmpl %d7,%d5 4ccbc: 658c bcss 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4ccbe: 9a89 subl %a1,%d5 4ccc0: 2005 movel %d5,%d0 4ccc2: 2647 moveal %d7,%a3 4ccc4: 4c41 0002 remul %d1,%d2,%d0 4ccc8: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4ccca: 2005 movel %d5,%d0 4cccc: d089 addl %a1,%d0 4ccce: 2405 movel %d5,%d2 4ccd0: 2e00 movel %d0,%d7 4ccd2: 4c44 7005 remul %d4,%d5,%d7 4ccd6: 2e00 movel %d0,%d7 4ccd8: 9e85 subl %d5,%d7 4ccda: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4ccdc: be82 cmpl %d2,%d7 4ccde: 632a blss 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126> 4cce0: be80 cmpl %d0,%d7 4cce2: 6426 bccs 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4cce4: ba8b cmpl %a3,%d5 4cce6: 6500 ff62 bcsw 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4ccea: 9a89 subl %a1,%d5 4ccec: 2005 movel %d5,%d0 4ccee: 4c41 0002 remul %d1,%d2,%d0 4ccf2: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4ccf4: 2005 movel %d5,%d0 4ccf6: d089 addl %a1,%d0 4ccf8: 2405 movel %d5,%d2 4ccfa: 2e00 movel %d0,%d7 4ccfc: 4c44 7005 remul %d4,%d5,%d7 4cd00: 2e00 movel %d0,%d7 4cd02: 9e85 subl %d5,%d7 4cd04: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4cd06: be82 cmpl %d2,%d7 4cd08: 62d6 bhis 4cce0 <_Heap_Allocate_aligned_with_boundary+0xfc><== ALWAYS TAKEN 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 ) { 4cd0a: b48d cmpl %a5,%d2 4cd0c: 6500 ff3c bcsw 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66> 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; 4cd10: 70f8 moveq #-8,%d0 4cd12: 9088 subl %a0,%d0 4cd14: 2a40 moveal %d0,%a5 4cd16: 2e02 movel %d2,%d7 4cd18: dbc2 addal %d2,%a5 4cd1a: 202e fffc movel %fp@(-4),%d0 4cd1e: 4c40 7005 remul %d0,%d5,%d7 4cd22: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4cd24: bbcc cmpal %a4,%a5 4cd26: 6400 ff1c bccw 4cc44 <_Heap_Allocate_aligned_with_boundary+0x60> 4cd2a: 4a8d tstl %a5 4cd2c: 6600 ff1c bnew 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66> boundary ); } } if ( alloc_begin != 0 ) { 4cd30: 4a82 tstl %d2 4cd32: 6700 ff16 beqw 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66> if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4cd36: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4cd38: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4cd3c: 2f02 movel %d2,%sp@- 4cd3e: 2f08 movel %a0,%sp@- 4cd40: 2f0a movel %a2,%sp@- 4cd42: 4eb9 0004 7910 jsr 47910 <_Heap_Block_allocate> 4cd48: 4fef 0010 lea %sp@(16),%sp 4cd4c: 2002 movel %d2,%d0 4cd4e: 6000 ff04 braw 4cc54 <_Heap_Allocate_aligned_with_boundary+0x70> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4cd52: b889 cmpl %a1,%d4 4cd54: 640c bccs 4cd62 <_Heap_Allocate_aligned_with_boundary+0x17e> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4cd56: 4280 clrl %d0 } return (void *) alloc_begin; } 4cd58: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4cd5e: 4e5e unlk %fp 4cd60: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4cd62: 4a81 tstl %d1 4cd64: 6600 feb2 bnew 4cc18 <_Heap_Allocate_aligned_with_boundary+0x34> 4cd68: 2200 movel %d0,%d1 4cd6a: 6000 feac braw 4cc18 <_Heap_Allocate_aligned_with_boundary+0x34> alignment = page_size; } } while ( block != free_list_tail ) { 4cd6e: 4283 clrl %d3 4cd70: 4280 clrl %d0 4cd72: 6000 fee0 braw 4cc54 <_Heap_Allocate_aligned_with_boundary+0x70> ... =============================================================================== 00047910 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 47910: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 47912: 4e56 ffe0 linkw %fp,#-32 47916: 222e 0010 movel %fp@(16),%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4791a: 2041 moveal %d1,%a0 4791c: 5188 subql #8,%a0 4791e: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 47922: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 47926: 7601 moveq #1,%d3 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 47928: 2848 moveal %a0,%a4 4792a: 240a movel %a2,%d2 4792c: 99ca subal %a2,%a4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 4792e: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 47932: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 47936: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 4793a: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 4793e: 4a03 tstb %d3 47940: 6600 00aa bnew 479ec <_Heap_Block_allocate+0xdc> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 47944: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 47948: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 4794a: 52ab 0040 addql #1,%a3@(64) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4794e: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 47952: 2a40 moveal %d0,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 47954: 226a 000c moveal %a2@(12),%a1 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 47958: c6aa 0004 andl %a2@(4),%d3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4795c: 2340 0008 movel %d0,%a1@(8) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 47960: 202b 0010 movel %a3@(16),%d0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 47964: 97ab 0030 subl %d3,%a3@(48) next->prev = prev; 47968: 2b49 000c movel %a1,%a5@(12) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 4796c: b08c cmpl %a4,%d0 4796e: 6200 0088 bhiw 479f8 <_Heap_Block_allocate+0xe8> - 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; 47972: 262a 0004 movel %a2@(4),%d3 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 ) 47976: 4c40 1004 remul %d0,%d4,%d1 _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; if ( _Heap_Is_prev_used( block ) ) { 4797a: 7201 moveq #1,%d1 4797c: 91c4 subal %d4,%a0 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 4797e: 2008 movel %a0,%d0 47980: 908a subl %a2,%d0 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 47982: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 47986: c2aa 0004 andl %a2@(4),%d1 4798a: 6700 0082 beqw 47a0e <_Heap_Block_allocate+0xfe> } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 4798e: 78fe moveq #-2,%d4 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 47990: 52ab 0038 addql #1,%a3@(56) 47994: 220a movel %a2,%d1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 47996: 2869 0008 moveal %a1@(8),%a4 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 4799a: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4799c: 7801 moveq #1,%d4 4799e: 8880 orl %d0,%d4 new_block->next = next; 479a0: 254c 0008 movel %a4,%a2@(8) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 479a4: d483 addl %d3,%d2 479a6: 9488 subl %a0,%d2 new_block->prev = block_before; 479a8: 2549 000c movel %a1,%a2@(12) block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 479ac: 2544 0004 movel %d4,%a2@(4) block_before->next = new_block; 479b0: 234a 0008 movel %a2,%a1@(8) next->prev = new_block; 479b4: 294a 000c movel %a2,%a4@(12) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 479b8: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 479ba: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 479bc: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 479c0: 2f05 movel %d5,%sp@- 479c2: 2f01 movel %d1,%sp@- 479c4: 2f08 movel %a0,%sp@- 479c6: 2f0b movel %a3,%sp@- 479c8: 4eb9 0004 781c jsr 4781c <_Heap_Block_split> 479ce: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 479d2: 202b 0030 movel %a3@(48),%d0 Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 479d6: b0ab 0034 cmpl %a3@(52),%d0 479da: 6404 bccs 479e0 <_Heap_Block_allocate+0xd0> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 479dc: 2740 0034 movel %d0,%a3@(52) } return block; } 479e0: 200a movel %a2,%d0 479e2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 479e8: 4e5e unlk %fp 479ea: 4e75 rts stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 479ec: 202b 0010 movel %a3@(16),%d0 /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 479f0: 224b moveal %a3,%a1 } if ( alloc_area_offset < heap->page_size ) { 479f2: b08c cmpl %a4,%d0 479f4: 6300 ff7c blsw 47972 <_Heap_Block_allocate+0x62> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 479f8: 4874 5800 pea %a4@(00000000,%d5:l) 479fc: 2f09 movel %a1,%sp@- 479fe: 2f0a movel %a2,%sp@- 47a00: 2f0b movel %a3,%sp@- 47a02: 4eb9 0004 781c jsr 4781c <_Heap_Block_split> 47a08: 4fef 0010 lea %sp@(16),%sp 47a0c: 60c4 bras 479d2 <_Heap_Block_allocate+0xc2> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 47a0e: 95d2 subal %a2@,%a2 Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 47a10: 78fe moveq #-2,%d4 47a12: 2209 movel %a1,%d1 47a14: c8aa 0004 andl %a2@(4),%d4 47a18: d084 addl %d4,%d0 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 47a1a: 78fe moveq #-2,%d4 47a1c: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47a1e: 7801 moveq #1,%d4 47a20: 8880 orl %d0,%d4 new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 47a22: d483 addl %d3,%d2 47a24: 9488 subl %a0,%d2 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47a26: 2544 0004 movel %d4,%a2@(4) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 47a2a: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 47a2c: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 47a2e: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 47a32: 2f05 movel %d5,%sp@- 47a34: 2f01 movel %d1,%sp@- 47a36: 2f08 movel %a0,%sp@- 47a38: 2f0b movel %a3,%sp@- 47a3a: 4eb9 0004 781c jsr 4781c <_Heap_Block_split> 47a40: 4fef 0010 lea %sp@(16),%sp 47a44: 608c bras 479d2 <_Heap_Block_allocate+0xc2> ... =============================================================================== 00051c70 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 51c70: 4e56 fff4 linkw %fp,#-12 51c74: 206e 0008 moveal %fp@(8),%a0 51c78: 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; 51c7c: 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; 51c80: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 51c84: 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; 51c88: b0a8 0018 cmpl %a0@(24),%d0 51c8c: 6410 bccs 51c9e <_Heap_Extend+0x2e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 51c8e: b280 cmpl %d0,%d1 51c90: 671c beqs 51cae <_Heap_Extend+0x3e> 51c92: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 51c94: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 51c9a: 4e5e unlk %fp 51c9c: 4e75 rts * 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 ) { 51c9e: b280 cmpl %d0,%d1 51ca0: 63ec blss 51c8e <_Heap_Extend+0x1e> 51ca2: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 51ca4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 51caa: 4e5e unlk %fp 51cac: 4e75 rts { 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; 51cae: 2200 movel %d0,%d1 51cb0: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 51cb4: 70f8 moveq #-8,%d0 51cb6: 9089 subl %a1,%d0 51cb8: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 51cba: 2600 movel %d0,%d3 51cbc: 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; 51cc2: 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; 51cc6: 246e 0014 moveal %fp@(20),%a2 51cca: 9082 subl %d2,%d0 51ccc: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 51cce: b0a8 0014 cmpl %a0@(20),%d0 51cd2: 640c bccs 51ce0 <_Heap_Extend+0x70> <== ALWAYS TAKEN /* 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 )); 51cd4: 4280 clrl %d0 } return HEAP_EXTEND_SUCCESSFUL; } 51cd6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 51cdc: 4e5e unlk %fp 51cde: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 51ce0: 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); 51ce2: 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; 51ce6: c4a9 0004 andl %a1@(4),%d2 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 = 51cea: 2228 0020 movel %a0@(32),%d1 51cee: 928a subl %a2,%d1 51cf0: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 51cf2: 214a 0024 movel %a2,%a0@(36) 51cf6: 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 = 51cfa: 7401 moveq #1,%d2 51cfc: 8481 orl %d1,%d2 51cfe: 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 )); 51d02: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 51d06: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 51d0a: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 51d0e: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 51d12: 2f08 movel %a0,%sp@- 51d14: 4eb9 0004 bd8c jsr 4bd8c <_Heap_Free> 51d1a: 508f addql #8,%sp 51d1c: 4280 clrl %d0 51d1e: 60b6 bras 51cd6 <_Heap_Extend+0x66> =============================================================================== 0004cd78 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4cd78: 4e56 ffe4 linkw %fp,#-28 4cd7c: 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 ) 4cd80: 2040 moveal %d0,%a0 4cd82: 5188 subql #8,%a0 4cd84: 226e 0008 moveal %fp@(8),%a1 4cd88: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4cd8e: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 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; 4cd92: 2029 0020 movel %a1@(32),%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 ) 4cd96: 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 4cd98: b088 cmpl %a0,%d0 4cd9a: 6200 00a0 bhiw 4ce3c <_Heap_Free+0xc4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 4cd9e: 2229 0024 movel %a1@(36),%d1 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 4cda2: b288 cmpl %a0,%d1 4cda4: 6500 0096 bcsw 4ce3c <_Heap_Free+0xc4> - 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; 4cda8: 2628 0004 movel %a0@(4),%d3 4cdac: 74fe moveq #-2,%d2 4cdae: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cdb0: 45f0 2800 lea %a0@(00000000,%d2:l),%a2 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 4cdb4: b5c0 cmpal %d0,%a2 4cdb6: 6500 0084 bcsw 4ce3c <_Heap_Free+0xc4> 4cdba: b5c1 cmpal %d1,%a2 4cdbc: 627e bhis 4ce3c <_Heap_Free+0xc4> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4cdbe: 282a 0004 movel %a2@(4),%d4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4cdc2: 7a01 moveq #1,%d5 4cdc4: ca84 andl %d4,%d5 4cdc6: 4a05 tstb %d5 4cdc8: 6772 beqs 4ce3c <_Heap_Free+0xc4> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cdca: 7afe moveq #-2,%d5 4cdcc: c885 andl %d5,%d4 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4cdce: b5c1 cmpal %d1,%a2 4cdd0: 6700 00fa beqw 4cecc <_Heap_Free+0x154> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4cdd4: 7a01 moveq #1,%d5 4cdd6: 7c01 moveq #1,%d6 4cdd8: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4cddc: bd85 eorl %d6,%d5 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4cdde: 7c01 moveq #1,%d6 4cde0: c686 andl %d6,%d3 4cde2: 4a03 tstb %d3 4cde4: 6660 bnes 4ce46 <_Heap_Free+0xce> uintptr_t const prev_size = block->prev_size; 4cde6: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cde8: 91c3 subal %d3,%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 4cdea: b1c0 cmpal %d0,%a0 4cdec: 654e bcss 4ce3c <_Heap_Free+0xc4> <== NEVER TAKEN 4cdee: b1c1 cmpal %d1,%a0 4cdf0: 624a bhis 4ce3c <_Heap_Free+0xc4> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 4cdf2: 7001 moveq #1,%d0 4cdf4: c0a8 0004 andl %a0@(4),%d0 4cdf8: 4a00 tstb %d0 4cdfa: 6740 beqs 4ce3c <_Heap_Free+0xc4> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4cdfc: 4a05 tstb %d5 4cdfe: 6700 00d2 beqw 4ced2 <_Heap_Free+0x15a> } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4ce02: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4ce06: 53a9 0038 subql #1,%a1@(56) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4ce0a: d882 addl %d2,%d4 4ce0c: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ce0e: 7001 moveq #1,%d0 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4ce10: 246a 0008 moveal %a2@(8),%a2 4ce14: 8083 orl %d3,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4ce16: 2183 3800 movel %d3,%a0@(00000000,%d3:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ce1a: 2140 0004 movel %d0,%a0@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4ce1e: 254b 000c movel %a3,%a2@(12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4ce22: 274a 0008 movel %a2,%a3@(8) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4ce26: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4ce2a: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4ce2e: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4ce32: 7001 moveq #1,%d0 return( true ); } 4ce34: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4ce38: 4e5e unlk %fp 4ce3a: 4e75 rts 4ce3c: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4ce40: 4200 clrb %d0 } 4ce42: 4e5e unlk %fp 4ce44: 4e75 rts uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4ce46: 4a05 tstb %d5 4ce48: 6736 beqs 4ce80 <_Heap_Free+0x108> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4ce4a: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4ce4e: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ce50: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4ce52: 246a 0008 moveal %a2@(8),%a2 4ce56: 8084 orl %d4,%d0 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4ce58: 2184 4800 movel %d4,%a0@(00000000,%d4:l) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4ce5c: 214b 000c movel %a3,%a0@(12) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4ce60: 214a 0008 movel %a2,%a0@(8) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ce64: 2140 0004 movel %d0,%a0@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4ce68: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4ce6c: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4ce70: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4ce74: 7001 moveq #1,%d0 new_block->prev = prev; next->prev = new_block; 4ce76: 2548 000c movel %a0,%a2@(12) prev->next = new_block; 4ce7a: 2748 0008 movel %a0,%a3@(8) 4ce7e: 60b4 bras 4ce34 <_Heap_Free+0xbc> next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4ce80: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ce82: 7cfe moveq #-2,%d6 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4ce84: 8a82 orl %d2,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4ce86: 2669 0008 moveal %a1@(8),%a3 4ce8a: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ce8e: cdaa 0004 andl %d6,%a2@(4) next_block->prev_size = block_size; 4ce92: 2482 movel %d2,%a2@ /* Statistics */ ++stats->free_blocks; 4ce94: 2029 0038 movel %a1@(56),%d0 4ce98: 5280 addql #1,%d0 new_block->next = next; 4ce9a: 214b 0008 movel %a3,%a0@(8) new_block->prev = block_before; 4ce9e: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4cea2: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 4cea6: 2748 000c movel %a0,%a3@(12) 4ceaa: 2340 0038 movel %d0,%a1@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4ceae: b0a9 003c cmpl %a1@(60),%d0 4ceb2: 6300 ff72 blsw 4ce26 <_Heap_Free+0xae> } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4ceb6: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4ceba: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4cebe: 52a9 0050 addql #1,%a1@(80) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4cec2: 2340 003c movel %d0,%a1@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4cec6: 7001 moveq #1,%d0 4cec8: 6000 ff6a braw 4ce34 <_Heap_Free+0xbc> _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4cecc: 4205 clrb %d5 4cece: 6000 ff0e braw 4cdde <_Heap_Free+0x66> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4ced2: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ced4: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ced6: 7cfe moveq #-2,%d6 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ced8: 8a83 orl %d3,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4ceda: 2483 movel %d3,%a2@ } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4cedc: 7001 moveq #1,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4cede: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4cee2: cdaa 0004 andl %d6,%a2@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4cee6: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4ceea: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4ceee: 52a9 0050 addql #1,%a1@(80) 4cef2: 6000 ff40 braw 4ce34 <_Heap_Free+0xbc> ... =============================================================================== 00051d20 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 51d20: 4e56 fff4 linkw %fp,#-12 51d24: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 51d28: 266e 0008 moveal %fp@(8),%a3 51d2c: 246e 000c moveal %fp@(12),%a2 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 51d30: 206b 0008 moveal %a3@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 51d34: 4292 clrl %a2@ info->largest = 0; 51d36: 42aa 0004 clrl %a2@(4) info->total = 0; 51d3a: 42aa 0008 clrl %a2@(8) for(the_block = _Heap_Free_list_first(the_heap); 51d3e: b1cb cmpal %a3,%a0 51d40: 672e beqs 51d70 <_Heap_Get_free_information+0x50><== NEVER TAKEN 51d42: 327c 0001 moveaw #1,%a1 51d46: 4281 clrl %d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 51d48: 70fe moveq #-2,%d0 the_block != tail; the_block = the_block->next) 51d4a: 2409 movel %a1,%d2 51d4c: 5282 addql #1,%d2 51d4e: c0a8 0004 andl %a0@(4),%d0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 51d52: d280 addl %d0,%d1 if ( info->largest < the_size ) 51d54: b0aa 0004 cmpl %a2@(4),%d0 51d58: 6304 blss 51d5e <_Heap_Get_free_information+0x3e> info->largest = the_size; 51d5a: 2540 0004 movel %d0,%a2@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 51d5e: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 51d62: b1cb cmpal %a3,%a0 51d64: 6704 beqs 51d6a <_Heap_Get_free_information+0x4a> 51d66: 2242 moveal %d2,%a1 51d68: 60de bras 51d48 <_Heap_Get_free_information+0x28> 51d6a: 2541 0008 movel %d1,%a2@(8) 51d6e: 2489 movel %a1,%a2@ info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 51d70: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 51d74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051d78 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 51d78: 4e56 fff4 linkw %fp,#-12 51d7c: 206e 0008 moveal %fp@(8),%a0 51d80: 48d7 040c moveml %d2-%d3/%a2,%sp@ 51d84: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 51d88: 2428 0024 movel %a0@(36),%d2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 51d8c: 2268 0020 moveal %a0@(32),%a1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 51d90: 4292 clrl %a2@ the_info->Free.total = 0; 51d92: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 51d96: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 51d9a: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 51d9e: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 51da2: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 51da6: b489 cmpl %a1,%d2 51da8: 6746 beqs 51df0 <_Heap_Get_information+0x78> <== NEVER TAKEN uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 51daa: 260a movel %a2,%d3 51dac: 0683 0000 000c addil #12,%d3 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 51db2: 2229 0004 movel %a1@(4),%d1 51db6: 70fe moveq #-2,%d0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 51db8: 204a moveal %a2,%a0 51dba: 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); 51dbc: d3c0 addal %d0,%a1 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; 51dbe: 2229 0004 movel %a1@(4),%d1 51dc2: 0801 0000 btst #0,%d1 51dc6: 6702 beqs 51dca <_Heap_Get_information+0x52> 51dc8: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 51dca: 5290 addql #1,%a0@ info->total += the_size; 51dcc: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 51dd0: b0a8 0004 cmpl %a0@(4),%d0 51dd4: 6304 blss 51dda <_Heap_Get_information+0x62> info->largest = the_size; 51dd6: 2140 0004 movel %d0,%a0@(4) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 51dda: b3c2 cmpal %d2,%a1 51ddc: 66d8 bnes 51db6 <_Heap_Get_information+0x3e> 51dde: 202a 0014 movel %a2@(20),%d0 51de2: 5080 addql #8,%d0 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 51de4: 2540 0014 movel %d0,%a2@(20) } 51de8: 4cd7 040c moveml %sp@,%d2-%d3/%a2 51dec: 4e5e unlk %fp 51dee: 4e75 rts the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 51df0: 7008 moveq #8,%d0 <== NOT EXECUTED /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 51df2: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 51df6: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 51dfa: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 000476dc <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 476dc: 4e56 ffe8 linkw %fp,#-24 476e0: 206e 0008 moveal %fp@(8),%a0 476e4: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 476e8: 226e 000c moveal %fp@(12),%a1 476ec: 242e 0010 movel %fp@(16),%d2 476f0: 222e 0014 movel %fp@(20),%d1 uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 476f4: 6600 00ce bnew 477c4 <_Heap_Initialize+0xe8> ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 476f8: 2009 movel %a1,%d0 476fa: 5080 addql #8,%d0 uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 476fc: 123c 0004 moveb #4,%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 47700: 2a00 movel %d0,%d5 47702: 7610 moveq #16,%d3 47704: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 47708: 4a84 tstl %d4 4770a: 6704 beqs 47710 <_Heap_Initialize+0x34> <== ALWAYS TAKEN return value - remainder + alignment; 4770c: d081 addl %d1,%d0 4770e: 9084 subl %d4,%d0 uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 47710: 2809 movel %a1,%d4 47712: d882 addl %d2,%d4 overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 47714: b889 cmpl %a1,%d4 47716: 6500 00bc bcsw 477d4 <_Heap_Initialize+0xf8> } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 4771a: 2a00 movel %d0,%d5 4771c: 2440 moveal %d0,%a2 4771e: 9a89 subl %a1,%d5 47720: 518a subql #8,%a2 first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 47722: ba82 cmpl %d2,%d5 47724: 6400 00ae bccw 477d4 <_Heap_Initialize+0xf8> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; 47728: 9485 subl %d5,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4772a: 2a02 movel %d2,%d5 4772c: 4c41 5000 remul %d1,%d0,%d5 47730: 9480 subl %d0,%d2 first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 47732: b483 cmpl %d3,%d2 47734: 6500 009e bcsw 477d4 <_Heap_Initialize+0xf8> } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 47738: 7a01 moveq #1,%d5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4773a: 47f2 2800 lea %a2@(00000000,%d2:l),%a3 alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; 4773e: 2002 movel %d2,%d0 47740: 5180 subql #8,%d0 } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 47742: 8a82 orl %d2,%d5 return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 47744: 2481 movel %d1,%a2@ first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 47746: 2545 0004 movel %d5,%a2@(4) * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 4774a: 2a0a movel %a2,%d5 4774c: 9a8b subl %a3,%d5 4774e: 2745 0004 movel %d5,%a3@(4) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 47752: 2a39 0005 f5a0 movel 5f5a0 ,%d5 * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; 47758: 2682 movel %d2,%a3@ last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; 4775a: 2141 0010 movel %d1,%a0@(16) /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; 4775e: 7201 moveq #1,%d1 /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; first_block->next = _Heap_Free_list_tail( heap ); 47760: 2548 0008 movel %a0,%a2@(8) first_block->prev = _Heap_Free_list_head( heap ); 47764: 2548 000c movel %a0,%a2@(12) last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; 47768: 2143 0014 movel %d3,%a0@(20) heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; 4776c: 2144 001c movel %d4,%a0@(28) _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; 47770: 2142 0034 movel %d2,%a0@(52) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 47774: 2145 0028 movel %d5,%a0@(40) 47778: 5285 addql #1,%d5 heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; 4777a: 2142 002c movel %d2,%a0@(44) stats->free_size = first_block_size; 4777e: 2142 0030 movel %d2,%a0@(48) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; 47782: 2149 0018 movel %a1,%a0@(24) /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; 47786: 2141 0038 movel %d1,%a0@(56) stats->max_free_blocks = 1; 4778a: 2141 003c movel %d1,%a0@(60) stats->used_blocks = 0; 4778e: 42a8 0040 clrl %a0@(64) stats->max_search = 0; 47792: 42a8 0044 clrl %a0@(68) stats->allocs = 0; 47796: 42a8 0048 clrl %a0@(72) stats->searches = 0; 4779a: 42a8 004c clrl %a0@(76) stats->frees = 0; 4779e: 42a8 0050 clrl %a0@(80) stats->resizes = 0; 477a2: 42a8 0054 clrl %a0@(84) heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; 477a6: 214b 0024 movel %a3,%a0@(36) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 477aa: 23c5 0005 f5a0 movel %d5,5f5a0 heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; 477b0: 214a 000c movel %a2,%a0@(12) /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; 477b4: 214a 0020 movel %a2,%a0@(32) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 477b8: 214a 0008 movel %a2,%a0@(8) _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 477bc: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 477c0: 4e5e unlk %fp 477c2: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 477c4: 7003 moveq #3,%d0 477c6: c081 andl %d1,%d0 if ( remainder != 0 ) { 477c8: 6704 beqs 477ce <_Heap_Initialize+0xf2> return value - remainder + alignment; 477ca: 5881 addql #4,%d1 477cc: 9280 subl %d0,%d1 if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 477ce: 7003 moveq #3,%d0 477d0: b081 cmpl %d1,%d0 477d2: 650a bcss 477de <_Heap_Initialize+0x102> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 477d4: 4280 clrl %d0 } 477d6: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 477da: 4e5e unlk %fp 477dc: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 477de: 7610 moveq #16,%d3 477e0: 4c41 3000 remul %d1,%d0,%d3 if ( remainder != 0 ) { 477e4: 4a80 tstl %d0 477e6: 671e beqs 47806 <_Heap_Initialize+0x12a> return value - remainder + alignment; 477e8: 2601 movel %d1,%d3 477ea: 0683 0000 0010 addil #16,%d3 477f0: 9680 subl %d0,%d3 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 477f2: 2009 movel %a1,%d0 477f4: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 477f6: 2a00 movel %d0,%d5 477f8: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 477fc: 4a84 tstl %d4 477fe: 6700 ff10 beqw 47710 <_Heap_Initialize+0x34> 47802: 6000 ff08 braw 4770c <_Heap_Initialize+0x30> 47806: 2009 movel %a1,%d0 47808: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4780a: 2a00 movel %d0,%d5 if ( remainder != 0 ) { 4780c: 7610 moveq #16,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4780e: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 47812: 4a84 tstl %d4 47814: 6700 fefa beqw 47710 <_Heap_Initialize+0x34> 47818: 6000 fef2 braw 4770c <_Heap_Initialize+0x30> =============================================================================== 0005c910 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5c910: 4e56 0000 linkw %fp,#0 5c914: 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 ) 5c918: 2040 moveal %d0,%a0 5c91a: 5188 subql #8,%a0 5c91c: 226e 0008 moveal %fp@(8),%a1 5c920: 2f02 movel %d2,%sp@- 5c922: 2400 movel %d0,%d2 5c924: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5c92a: 91c1 subal %d1,%a0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 5c92c: 2229 0020 movel %a1@(32),%d1 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 5c930: b288 cmpl %a0,%d1 5c932: 6238 bhis 5c96c <_Heap_Size_of_alloc_area+0x5c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 5c934: 2269 0024 moveal %a1@(36),%a1 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 5c938: b3c8 cmpal %a0,%a1 5c93a: 6530 bcss 5c96c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5c93c: 74fe moveq #-2,%d2 5c93e: c4a8 0004 andl %a0@(4),%d2 5c942: d1c2 addal %d2,%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 5c944: b1c1 cmpal %d1,%a0 5c946: 6524 bcss 5c96c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 5c948: b1c9 cmpal %a1,%a0 5c94a: 6220 bhis 5c96c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5c94c: 7201 moveq #1,%d1 5c94e: c2a8 0004 andl %a0@(4),%d1 5c952: 4a01 tstb %d1 5c954: 6716 beqs 5c96c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5c956: 7204 moveq #4,%d1 5c958: 9280 subl %d0,%d1 5c95a: 2001 movel %d1,%d0 5c95c: d088 addl %a0,%d0 5c95e: 226e 0010 moveal %fp@(16),%a1 return true; } 5c962: 241f movel %sp@+,%d2 5c964: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5c966: 2280 movel %d0,%a1@ 5c968: 7001 moveq #1,%d0 return true; } 5c96a: 4e75 rts 5c96c: 241f movel %sp@+,%d2 5c96e: 4e5e unlk %fp return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 5c970: 4200 clrb %d0 <== NOT EXECUTED } =============================================================================== 00048438 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 48438: 4e56 ffc4 linkw %fp,#-60 4843c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48440: 246e 0008 moveal %fp@(8),%a2 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; 48444: 4bfa 049c lea %pc@(488e2 <_Heap_Walk_print>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 48448: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 4844c: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 48450: 282a 0014 movel %a2@(20),%d4 Heap_Block *const last_block = heap->last_block; 48454: 2a2a 0024 movel %a2@(36),%d5 Heap_Block *block = heap->first_block; 48458: 266a 0020 moveal %a2@(32),%a3 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 4845c: 4a2e 0013 tstb %fp@(19) 48460: 6604 bnes 48466 <_Heap_Walk+0x2e> 48462: 4bfa ffcc lea %pc@(48430 <_Heap_Walk_print_nothing>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 48466: 7003 moveq #3,%d0 48468: b0b9 0006 2486 cmpl 62486 <_System_state_Current>,%d0 4846e: 670c beqs 4847c <_Heap_Walk+0x44> block = next_block; } return true; } 48470: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 48476: 7001 moveq #1,%d0 block = next_block; } return true; } 48478: 4e5e unlk %fp 4847a: 4e75 rts Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 4847c: 2f2a 000c movel %a2@(12),%sp@- 48480: 2f2a 0008 movel %a2@(8),%sp@- 48484: 2f05 movel %d5,%sp@- 48486: 2f0b movel %a3,%sp@- 48488: 2f2a 001c movel %a2@(28),%sp@- 4848c: 2f2a 0018 movel %a2@(24),%sp@- 48490: 2f04 movel %d4,%sp@- 48492: 2f03 movel %d3,%sp@- 48494: 4879 0005 e66e pea 5e66e <_Status_Object_name_errors_to_status+0x14> 4849a: 42a7 clrl %sp@- 4849c: 2f02 movel %d2,%sp@- 4849e: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 484a0: 4fef 002c lea %sp@(44),%sp 484a4: 4a83 tstl %d3 484a6: 6700 0158 beqw 48600 <_Heap_Walk+0x1c8> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 484aa: 7003 moveq #3,%d0 484ac: c083 andl %d3,%d0 484ae: 6600 016e bnew 4861e <_Heap_Walk+0x1e6> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 484b2: 2204 movel %d4,%d1 484b4: 4c43 1000 remul %d3,%d0,%d1 484b8: 4a80 tstl %d0 484ba: 6600 017a bnew 48636 <_Heap_Walk+0x1fe> ); return false; } if ( 484be: 200b movel %a3,%d0 484c0: 5080 addql #8,%d0 484c2: 4c43 0001 remul %d3,%d1,%d0 484c6: 4a81 tstl %d1 484c8: 6600 0184 bnew 4864e <_Heap_Walk+0x216> 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; 484cc: 2c2b 0004 movel %a3@(4),%d6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 484d0: 7201 moveq #1,%d1 484d2: c286 andl %d6,%d1 484d4: 2d46 ffec movel %d6,%fp@(-20) 484d8: 4a01 tstb %d1 484da: 6700 018a beqw 48666 <_Heap_Walk+0x22e> ); return false; } if ( first_block->prev_size != page_size ) { 484de: 2053 moveal %a3@,%a0 484e0: b1c3 cmpal %d3,%a0 484e2: 6600 00e2 bnew 485c6 <_Heap_Walk+0x18e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 484e6: 2045 moveal %d5,%a0 484e8: 7cfe moveq #-2,%d6 484ea: 7001 moveq #1,%d0 484ec: cca8 0004 andl %a0@(4),%d6 484f0: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 484f4: 4a00 tstb %d0 484f6: 6700 0184 beqw 4867c <_Heap_Walk+0x244> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 484fa: 2c2a 0010 movel %a2@(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; 484fe: 206a 0008 moveal %a2@(8),%a0 48502: 2d46 fffc movel %d6,%fp@(-4) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 48506: b1ca cmpal %a2,%a0 48508: 6700 0198 beqw 486a2 <_Heap_Walk+0x26a> 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; 4850c: 286a 0020 moveal %a2@(32),%a4 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 48510: b1cc cmpal %a4,%a0 48512: 6500 00cc bcsw 485e0 <_Heap_Walk+0x1a8> && (uintptr_t) block <= (uintptr_t) heap->last_block; 48516: 2e2a 0024 movel %a2@(36),%d7 4851a: 2d47 fff8 movel %d7,%fp@(-8) 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 4851e: be88 cmpl %a0,%d7 48520: 6500 00be bcsw 485e0 <_Heap_Walk+0x1a8> ); return false; } if ( 48524: 2248 moveal %a0,%a1 48526: 5089 addql #8,%a1 48528: 2009 movel %a1,%d0 4852a: 4c46 0007 remul %d6,%d7,%d0 4852e: 2d49 fff4 movel %a1,%fp@(-12) 48532: 4a87 tstl %d7 48534: 6600 0378 bnew 488ae <_Heap_Walk+0x476> ); return false; } if ( _Heap_Is_used( free_block ) ) { 48538: 7cfe moveq #-2,%d6 4853a: 7001 moveq #1,%d0 4853c: cca8 0004 andl %a0@(4),%d6 48540: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 48544: 6600 0382 bnew 488c8 <_Heap_Walk+0x490> ); return false; } if ( free_block->prev != prev_block ) { 48548: 2c28 000c movel %a0@(12),%d6 4854c: b5c6 cmpal %d6,%a2 4854e: 6654 bnes 485a4 <_Heap_Walk+0x16c> <== NEVER TAKEN 48550: 2e2e ffec movel %fp@(-20),%d7 48554: 2243 moveal %d3,%a1 48556: 2d47 fff4 movel %d7,%fp@(-12) 4855a: 2e0c movel %a4,%d7 4855c: 2841 moveal %d1,%a4 4855e: 2d44 fff0 movel %d4,%fp@(-16) (*printer)( 48562: 2008 movel %a0,%d0 return false; } prev_block = free_block; free_block = free_block->next; 48564: 2068 0008 moveal %a0@(8),%a0 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 48568: b1c6 cmpal %d6,%a0 4856a: 6700 0126 beqw 48692 <_Heap_Walk+0x25a> 4856e: b1c7 cmpal %d7,%a0 48570: 656e bcss 485e0 <_Heap_Walk+0x1a8> ); return false; } if ( 48572: 2208 movel %a0,%d1 48574: 5081 addql #8,%d1 48576: b1ee fff8 cmpal %fp@(-8),%a0 4857a: 6264 bhis 485e0 <_Heap_Walk+0x1a8> <== NEVER TAKEN 4857c: 282e fffc movel %fp@(-4),%d4 48580: 4c44 1003 remul %d4,%d3,%d1 48584: 4a83 tstl %d3 48586: 6600 0326 bnew 488ae <_Heap_Walk+0x476> ); return false; } if ( _Heap_Is_used( free_block ) ) { 4858a: 72fe moveq #-2,%d1 4858c: 7601 moveq #1,%d3 4858e: c2a8 0004 andl %a0@(4),%d1 48592: c6b0 1804 andl %a0@(00000004,%d1:l),%d3 48596: 6600 0330 bnew 488c8 <_Heap_Walk+0x490> ); return false; } if ( free_block->prev != prev_block ) { 4859a: 2228 000c movel %a0@(12),%d1 4859e: b081 cmpl %d1,%d0 485a0: 67c0 beqs 48562 <_Heap_Walk+0x12a> 485a2: 2c01 movel %d1,%d6 (*printer)( 485a4: 2f06 movel %d6,%sp@- 485a6: 2f08 movel %a0,%sp@- 485a8: 4879 0005 e85f pea 5e85f <_Status_Object_name_errors_to_status+0x205> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 485ae: 4878 0001 pea 1 485b2: 2f02 movel %d2,%sp@- 485b4: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 485b6: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 485ba: 4200 clrb %d0 block = next_block; } return true; } 485bc: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 485c2: 4e5e unlk %fp 485c4: 4e75 rts return false; } if ( first_block->prev_size != page_size ) { (*printer)( 485c6: 2f03 movel %d3,%sp@- 485c8: 2f08 movel %a0,%sp@- 485ca: 4879 0005 e7b3 pea 5e7b3 <_Status_Object_name_errors_to_status+0x159> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 485d0: 4878 0001 pea 1 485d4: 2f02 movel %d2,%sp@- 485d6: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 485d8: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 485dc: 4200 clrb %d0 485de: 60dc bras 485bc <_Heap_Walk+0x184> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 485e0: 2f08 movel %a0,%sp@- 485e2: 4879 0005 e7f3 pea 5e7f3 <_Status_Object_name_errors_to_status+0x199> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 485e8: 4878 0001 pea 1 485ec: 2f02 movel %d2,%sp@- 485ee: 4e95 jsr %a5@ 485f0: 4fef 0010 lea %sp@(16),%sp 485f4: 4200 clrb %d0 block = next_block; } return true; } 485f6: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 485fc: 4e5e unlk %fp 485fe: 4e75 rts first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 48600: 4879 0005 e6ff pea 5e6ff <_Status_Object_name_errors_to_status+0xa5> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 48606: 4878 0001 pea 1 4860a: 2f02 movel %d2,%sp@- 4860c: 4e95 jsr %a5@ 4860e: 4fef 000c lea %sp@(12),%sp 48612: 4200 clrb %d0 block = next_block; } return true; } 48614: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4861a: 4e5e unlk %fp 4861c: 4e75 rts return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 4861e: 2f03 movel %d3,%sp@- 48620: 4879 0005 e712 pea 5e712 <_Status_Object_name_errors_to_status+0xb8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48626: 4878 0001 pea 1 4862a: 2f02 movel %d2,%sp@- 4862c: 4e95 jsr %a5@ 4862e: 4fef 0010 lea %sp@(16),%sp 48632: 4200 clrb %d0 48634: 60c0 bras 485f6 <_Heap_Walk+0x1be> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 48636: 2f04 movel %d4,%sp@- 48638: 4879 0005 e730 pea 5e730 <_Status_Object_name_errors_to_status+0xd6> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4863e: 4878 0001 pea 1 48642: 2f02 movel %d2,%sp@- 48644: 4e95 jsr %a5@ 48646: 4fef 0010 lea %sp@(16),%sp 4864a: 4200 clrb %d0 4864c: 60a8 bras 485f6 <_Heap_Walk+0x1be> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 4864e: 2f0b movel %a3,%sp@- 48650: 4879 0005 e754 pea 5e754 <_Status_Object_name_errors_to_status+0xfa> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48656: 4878 0001 pea 1 4865a: 2f02 movel %d2,%sp@- 4865c: 4e95 jsr %a5@ 4865e: 4fef 0010 lea %sp@(16),%sp 48662: 4200 clrb %d0 48664: 6090 bras 485f6 <_Heap_Walk+0x1be> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 48666: 4879 0005 e785 pea 5e785 <_Status_Object_name_errors_to_status+0x12b> 4866c: 4878 0001 pea 1 48670: 2f02 movel %d2,%sp@- 48672: 4e95 jsr %a5@ 48674: 4fef 000c lea %sp@(12),%sp 48678: 4200 clrb %d0 4867a: 6098 bras 48614 <_Heap_Walk+0x1dc> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 4867c: 4879 0005 e7de pea 5e7de <_Status_Object_name_errors_to_status+0x184> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 48682: 4878 0001 pea 1 48686: 2f02 movel %d2,%sp@- 48688: 4e95 jsr %a5@ 4868a: 4fef 000c lea %sp@(12),%sp 4868e: 4200 clrb %d0 48690: 6082 bras 48614 <_Heap_Walk+0x1dc> 48692: 202e fff4 movel %fp@(-12),%d0 48696: 2609 movel %a1,%d3 48698: 220c movel %a4,%d1 4869a: 282e fff0 movel %fp@(-16),%d4 4869e: 2d40 ffec movel %d0,%fp@(-20) if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 486a2: b7c5 cmpal %d5,%a3 486a4: 6700 fdca beqw 48470 <_Heap_Walk+0x38> 486a8: 2c2e ffec movel %fp@(-20),%d6 486ac: 2d43 fff8 movel %d3,%fp@(-8) - 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; 486b0: 76fe moveq #-2,%d3 486b2: cc83 andl %d3,%d6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 486b4: 49f3 6800 lea %a3@(00000000,%d6:l),%a4 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 ) { 486b8: 4a01 tstb %d1 486ba: 6700 0126 beqw 487e2 <_Heap_Walk+0x3aa> (*printer)( 486be: 2f06 movel %d6,%sp@- 486c0: 2f0b movel %a3,%sp@- 486c2: 4879 0005 e891 pea 5e891 <_Status_Object_name_errors_to_status+0x237> 486c8: 42a7 clrl %sp@- 486ca: 2f02 movel %d2,%sp@- 486cc: 4e95 jsr %a5@ 486ce: 4fef 0014 lea %sp@(20),%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 486d2: b9ea 0020 cmpal %a2@(32),%a4 486d6: 6500 00d0 bcsw 487a8 <_Heap_Walk+0x370> 486da: b9ea 0024 cmpal %a2@(36),%a4 486de: 6200 00c8 bhiw 487a8 <_Heap_Walk+0x370> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 486e2: 2e2e fff8 movel %fp@(-8),%d7 486e6: 2206 movel %d6,%d1 486e8: 4c47 1000 remul %d7,%d0,%d1 486ec: 4a80 tstl %d0 486ee: 6600 0162 bnew 48852 <_Heap_Walk+0x41a> ); return false; } if ( block_size < min_block_size ) { 486f2: bc84 cmpl %d4,%d6 486f4: 6500 0178 bcsw 4886e <_Heap_Walk+0x436> ); return false; } if ( next_block_begin <= block_begin ) { 486f8: b9cb cmpal %a3,%a4 486fa: 6300 0196 blsw 48892 <_Heap_Walk+0x45a> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 486fe: 7001 moveq #1,%d0 48700: c0ac 0004 andl %a4@(4),%d0 48704: 4a00 tstb %d0 48706: 6600 00bc bnew 487c4 <_Heap_Walk+0x38c> 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; 4870a: 262b 0004 movel %a3@(4),%d3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4870e: 7cfe moveq #-2,%d6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 48710: 2e0b movel %a3,%d7 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; 48712: 43f9 0005 e987 lea 5e987 <_Status_Object_name_errors_to_status+0x32d>,%a1 - 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; 48718: cc83 andl %d3,%d6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4871a: 206a 0008 moveal %a2@(8),%a0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4871e: de86 addl %d6,%d7 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 48720: 222b 0008 movel %a3@(8),%d1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 48724: 2d48 fffc movel %a0,%fp@(-4) } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 48728: b2aa 000c cmpl %a2@(12),%d1 4872c: 6710 beqs 4873e <_Heap_Walk+0x306> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 4872e: 43f9 0005 e991 lea 5e991 <_Status_Object_name_errors_to_status+0x337>,%a1 48734: b5c1 cmpal %d1,%a2 48736: 6706 beqs 4873e <_Heap_Walk+0x306> 48738: 43f9 0005 e5cc lea 5e5cc ,%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)( 4873e: 202b 000c movel %a3@(12),%d0 48742: 41f9 0005 e99b lea 5e99b <_Status_Object_name_errors_to_status+0x341>,%a0 48748: b0ae fffc cmpl %fp@(-4),%d0 4874c: 6710 beqs 4875e <_Heap_Walk+0x326> "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)" : ""), 4874e: 41f9 0005 e9a6 lea 5e9a6 <_Status_Object_name_errors_to_status+0x34c>,%a0 48754: b5c0 cmpal %d0,%a2 48756: 6706 beqs 4875e <_Heap_Walk+0x326> 48758: 41f9 0005 e5cc lea 5e5cc ,%a0 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)( 4875e: 2f09 movel %a1,%sp@- 48760: 2f01 movel %d1,%sp@- 48762: 2f08 movel %a0,%sp@- 48764: 2f00 movel %d0,%sp@- 48766: 2f0b movel %a3,%sp@- 48768: 4879 0005 e9b0 pea 5e9b0 <_Status_Object_name_errors_to_status+0x356> 4876e: 42a7 clrl %sp@- 48770: 2f02 movel %d2,%sp@- 48772: 4e95 jsr %a5@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 48774: 4fef 0020 lea %sp@(32),%sp 48778: 2247 moveal %d7,%a1 4877a: 2011 movel %a1@,%d0 4877c: b086 cmpl %d6,%d0 4877e: 6700 0082 beqw 48802 <_Heap_Walk+0x3ca> (*printer)( 48782: 2f07 movel %d7,%sp@- 48784: 2f00 movel %d0,%sp@- 48786: 2f06 movel %d6,%sp@- 48788: 2f0b movel %a3,%sp@- 4878a: 4879 0005 e9dc pea 5e9dc <_Status_Object_name_errors_to_status+0x382> 48790: 4878 0001 pea 1 48794: 2f02 movel %d2,%sp@- 48796: 4e95 jsr %a5@ 48798: 4fef 001c lea %sp@(28),%sp block = next_block; } return true; } 4879c: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 487a2: 4200 clrb %d0 block = next_block; } return true; } 487a4: 4e5e unlk %fp 487a6: 4e75 rts block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 487a8: 2f0c movel %a4,%sp@- 487aa: 2f0b movel %a3,%sp@- 487ac: 4879 0005 e8cd pea 5e8cd <_Status_Object_name_errors_to_status+0x273> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 487b2: 4878 0001 pea 1 487b6: 2f02 movel %d2,%sp@- 487b8: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 487ba: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 487be: 4200 clrb %d0 487c0: 6000 fdfa braw 485bc <_Heap_Walk+0x184> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 487c4: b9c5 cmpal %d5,%a4 487c6: 6700 fca8 beqw 48470 <_Heap_Walk+0x38> 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 ) { 487ca: 2c2c 0004 movel %a4@(4),%d6 487ce: 7201 moveq #1,%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 487d0: 76fe moveq #-2,%d3 487d2: 264c moveal %a4,%a3 487d4: c286 andl %d6,%d1 487d6: cc83 andl %d3,%d6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 487d8: 49f3 6800 lea %a3@(00000000,%d6:l),%a4 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 ) { 487dc: 4a01 tstb %d1 487de: 6600 fede bnew 486be <_Heap_Walk+0x286> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 487e2: 2f13 movel %a3@,%sp@- 487e4: 2f06 movel %d6,%sp@- 487e6: 2f0b movel %a3,%sp@- 487e8: 4879 0005 e8a8 pea 5e8a8 <_Status_Object_name_errors_to_status+0x24e> 487ee: 42a7 clrl %sp@- 487f0: 2f02 movel %d2,%sp@- 487f2: 4e95 jsr %a5@ 487f4: 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 487f8: b9ea 0020 cmpal %a2@(32),%a4 487fc: 65aa bcss 487a8 <_Heap_Walk+0x370> <== NEVER TAKEN 487fe: 6000 feda braw 486da <_Heap_Walk+0x2a2> ); return false; } if ( !prev_used ) { 48802: 7001 moveq #1,%d0 48804: c680 andl %d0,%d3 48806: 4a03 tstb %d3 48808: 672e beqs 48838 <_Heap_Walk+0x400> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4880a: 206a 0008 moveal %a2@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 4880e: b5c8 cmpal %a0,%a2 48810: 670c beqs 4881e <_Heap_Walk+0x3e6> <== NEVER TAKEN if ( free_block == block ) { 48812: b7c8 cmpal %a0,%a3 48814: 67ae beqs 487c4 <_Heap_Walk+0x38c> return true; } free_block = free_block->next; 48816: 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 ) { 4881a: b5c8 cmpal %a0,%a2 4881c: 66f4 bnes 48812 <_Heap_Walk+0x3da> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4881e: 2f0b movel %a3,%sp@- 48820: 4879 0005 ea44 pea 5ea44 <_Status_Object_name_errors_to_status+0x3ea> 48826: 4878 0001 pea 1 4882a: 2f02 movel %d2,%sp@- 4882c: 4e95 jsr %a5@ 4882e: 4fef 0010 lea %sp@(16),%sp 48832: 4200 clrb %d0 48834: 6000 fdc0 braw 485f6 <_Heap_Walk+0x1be> return false; } if ( !prev_used ) { (*printer)( 48838: 2f0b movel %a3,%sp@- 4883a: 4879 0005 ea15 pea 5ea15 <_Status_Object_name_errors_to_status+0x3bb> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48840: 4878 0001 pea 1 48844: 2f02 movel %d2,%sp@- 48846: 4e95 jsr %a5@ 48848: 4fef 0010 lea %sp@(16),%sp 4884c: 4200 clrb %d0 4884e: 6000 fda6 braw 485f6 <_Heap_Walk+0x1be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 48852: 2f06 movel %d6,%sp@- 48854: 2f0b movel %a3,%sp@- 48856: 4879 0005 e8fa pea 5e8fa <_Status_Object_name_errors_to_status+0x2a0> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 4885c: 4878 0001 pea 1 48860: 2f02 movel %d2,%sp@- 48862: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48864: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 48868: 4200 clrb %d0 4886a: 6000 fd50 braw 485bc <_Heap_Walk+0x184> return false; } if ( block_size < min_block_size ) { (*printer)( 4886e: 2f04 movel %d4,%sp@- 48870: 2f06 movel %d6,%sp@- 48872: 2f0b movel %a3,%sp@- 48874: 4879 0005 e928 pea 5e928 <_Status_Object_name_errors_to_status+0x2ce> 4887a: 4878 0001 pea 1 4887e: 2f02 movel %d2,%sp@- 48880: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 48882: 4fef 0018 lea %sp@(24),%sp block = next_block; } return true; } 48886: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 return false; } if ( block_size < min_block_size ) { (*printer)( 4888c: 4200 clrb %d0 block = next_block; } return true; } 4888e: 4e5e unlk %fp 48890: 4e75 rts return false; } if ( next_block_begin <= block_begin ) { (*printer)( 48892: 2f0c movel %a4,%sp@- 48894: 2f0b movel %a3,%sp@- 48896: 4879 0005 e953 pea 5e953 <_Status_Object_name_errors_to_status+0x2f9> 4889c: 4878 0001 pea 1 488a0: 2f02 movel %d2,%sp@- 488a2: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 488a4: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 488a8: 4200 clrb %d0 488aa: 6000 fd10 braw 485bc <_Heap_Walk+0x184> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 488ae: 2f08 movel %a0,%sp@- 488b0: 4879 0005 e813 pea 5e813 <_Status_Object_name_errors_to_status+0x1b9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 488b6: 4878 0001 pea 1 488ba: 2f02 movel %d2,%sp@- 488bc: 4e95 jsr %a5@ 488be: 4fef 0010 lea %sp@(16),%sp 488c2: 4200 clrb %d0 488c4: 6000 fd30 braw 485f6 <_Heap_Walk+0x1be> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 488c8: 2f08 movel %a0,%sp@- 488ca: 4879 0005 e843 pea 5e843 <_Status_Object_name_errors_to_status+0x1e9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 488d0: 4878 0001 pea 1 488d4: 2f02 movel %d2,%sp@- 488d6: 4e95 jsr %a5@ 488d8: 4fef 0010 lea %sp@(16),%sp 488dc: 4200 clrb %d0 488de: 6000 fd16 braw 485f6 <_Heap_Walk+0x1be> =============================================================================== 00046e3c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 46e3c: 4e56 0000 linkw %fp,#0 46e40: 2f0a movel %a2,%sp@- 46e42: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46e44: 4ab9 0006 0042 tstl 60042 <_IO_Number_of_drivers> 46e4a: 671e beqs 46e6a <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 46e4c: 4282 clrl %d2 46e4e: 45f9 0004 c854 lea 4c854 ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 46e54: 42a7 clrl %sp@- 46e56: 42a7 clrl %sp@- 46e58: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46e5a: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 46e5c: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46e5e: 4fef 000c lea %sp@(12),%sp 46e62: b4b9 0006 0042 cmpl 60042 <_IO_Number_of_drivers>,%d2 46e68: 65ea bcss 46e54 <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 46e6a: 242e fff8 movel %fp@(-8),%d2 46e6e: 246e fffc moveal %fp@(-4),%a2 46e72: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046e76 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 46e76: 4e56 fff0 linkw %fp,#-16 46e7a: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 46e7e: 2639 0005 e6d6 movel 5e6d6 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 46e84: 2439 0005 e6d2 movel 5e6d2 ,%d2 number_of_drivers = Configuration.maximum_drivers; 46e8a: 2839 0005 e6ce movel 5e6ce ,%d4 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 46e90: b882 cmpl %d2,%d4 46e92: 6216 bhis 46eaa <_IO_Manager_initialization+0x34> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 46e94: 23c3 0006 0046 movel %d3,60046 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 46e9a: 23c2 0006 0042 movel %d2,60042 <_IO_Number_of_drivers> ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 46ea0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46ea6: 4e5e unlk %fp 46ea8: 4e75 rts /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 46eaa: 2004 movel %d4,%d0 46eac: 2a04 movel %d4,%d5 46eae: e788 lsll #3,%d0 46eb0: eb8d lsll #5,%d5 46eb2: 9a80 subl %d0,%d5 46eb4: 2f05 movel %d5,%sp@- 46eb6: 4eb9 0004 9bd0 jsr 49bd0 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 46ebc: 2f05 movel %d5,%sp@- 46ebe: 42a7 clrl %sp@- _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 46ec0: 23c4 0006 0042 movel %d4,60042 <_IO_Number_of_drivers> memset( 46ec6: 2f00 movel %d0,%sp@- /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 46ec8: 23c0 0006 0046 movel %d0,60046 <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 46ece: 4eb9 0004 fa48 jsr 4fa48 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46ed4: 4fef 0010 lea %sp@(16),%sp 46ed8: 4a82 tstl %d2 46eda: 67c4 beqs 46ea0 <_IO_Manager_initialization+0x2a><== NEVER TAKEN 46edc: 2839 0006 0046 movel 60046 <_IO_Driver_address_table>,%d4 46ee2: 4280 clrl %d0 46ee4: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 46ee6: 2243 moveal %d3,%a1 46ee8: 2044 moveal %d4,%a0 46eea: d3c0 addal %d0,%a1 46eec: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46eee: 5281 addql #1,%d1 46ef0: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46ef6: 20d9 movel %a1@+,%a0@+ 46ef8: 20d9 movel %a1@+,%a0@+ 46efa: 20d9 movel %a1@+,%a0@+ 46efc: 20d9 movel %a1@+,%a0@+ 46efe: 20d9 movel %a1@+,%a0@+ 46f00: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46f02: b282 cmpl %d2,%d1 46f04: 649a bccs 46ea0 <_IO_Manager_initialization+0x2a> _IO_Driver_address_table[index] = driver_table[index]; 46f06: 2243 moveal %d3,%a1 46f08: 2044 moveal %d4,%a0 46f0a: d3c0 addal %d0,%a1 46f0c: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46f0e: 5281 addql #1,%d1 46f10: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46f16: 20d9 movel %a1@+,%a0@+ 46f18: 20d9 movel %a1@+,%a0@+ 46f1a: 20d9 movel %a1@+,%a0@+ 46f1c: 20d9 movel %a1@+,%a0@+ 46f1e: 20d9 movel %a1@+,%a0@+ 46f20: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46f22: b282 cmpl %d2,%d1 46f24: 65c0 bcss 46ee6 <_IO_Manager_initialization+0x70><== NEVER TAKEN 46f26: 6000 ff78 braw 46ea0 <_IO_Manager_initialization+0x2a> ... =============================================================================== 00047a48 <_Internal_error_Occurred>: _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 ); 47a48: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47a4a: 4e56 0000 linkw %fp,#0 47a4e: 222e 000c movel %fp@(12),%d1 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47a52: 1001 moveb %d1,%d0 47a54: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47a56: 2f03 movel %d3,%sp@- 47a58: 202e 0008 movel %fp@(8),%d0 47a5c: 2f02 movel %d2,%sp@- 47a5e: 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 ); 47a62: 2f02 movel %d2,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 47a64: 13c1 0005 fea6 moveb %d1,5fea6 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47a6a: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 47a6c: 23c0 0005 fea2 movel %d0,5fea2 <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47a72: 2f00 movel %d0,%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; 47a74: 23c2 0005 fea8 movel %d2,5fea8 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 47a7a: 4eb9 0004 9802 jsr 49802 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47a80: 307c 0700 moveaw #1792,%a0 47a84: 2608 movel %a0,%d3 47a86: 40c0 movew %sr,%d0 47a88: 8083 orl %d3,%d0 47a8a: 46c0 movew %d0,%sr 47a8c: 2002 movel %d2,%d0 <== NOT EXECUTED 47a8e: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47a94: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 47a96: 7005 moveq #5,%d0 47a98: 4fef 000c lea %sp@(12),%sp 47a9c: 23c0 0005 ff7e movel %d0,5ff7e <_System_state_Current> 47aa2: 60fe bras 47aa2 <_Internal_error_Occurred+0x5a> =============================================================================== 00047b0c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47b0c: 4e56 fff0 linkw %fp,#-16 47b10: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47b14: 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 ) 47b18: 4aaa 0014 tstl %a2@(20) 47b1c: 660c bnes 47b2a <_Objects_Allocate+0x1e> <== ALWAYS TAKEN 47b1e: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 47b20: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b26: 4e5e unlk %fp 47b28: 4e75 rts /* * 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 ); 47b2a: 240a movel %a2,%d2 47b2c: 0682 0000 001c addil #28,%d2 47b32: 47f9 0004 7174 lea 47174 <_Chain_Get>,%a3 47b38: 2f02 movel %d2,%sp@- 47b3a: 4e93 jsr %a3@ if ( information->auto_extend ) { 47b3c: 588f addql #4,%sp 47b3e: 4a2a 0010 tstb %a2@(16) 47b42: 67dc beqs 47b20 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 47b44: 4a80 tstl %d0 47b46: 6738 beqs 47b80 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47b48: 2040 moveal %d0,%a0 47b4a: 4281 clrl %d1 47b4c: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47b4e: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47b50: 362a 0008 movew %a2@(8),%d3 47b54: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 47b58: 306a 0028 moveaw %a2@(40),%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 ]--; 47b5c: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47b60: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 47b62: 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 ]--; 47b64: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 47b68: 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 ]--; 47b6c: 206a 002a moveal %a2@(42),%a0 47b70: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 47b72: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b78: 4e5e unlk %fp block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47b7a: d1c1 addal %d1,%a0 47b7c: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 47b7e: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 47b80: 2f0a movel %a2,%sp@- 47b82: 4eb9 0004 7bc8 jsr 47bc8 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47b88: 2f02 movel %d2,%sp@- 47b8a: 4e93 jsr %a3@ } if ( the_object ) { 47b8c: 508f addql #8,%sp 47b8e: 4a80 tstl %d0 47b90: 66b6 bnes 47b48 <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 47b92: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b98: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047b9c <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47b9c: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 47b9e: 4e56 0000 linkw %fp,#0 47ba2: 226e 000c moveal %fp@(12),%a1 47ba6: 206e 0008 moveal %fp@(8),%a0 47baa: 2f0a movel %a2,%sp@- 47bac: 2468 0018 moveal %a0@(24),%a2 47bb0: 3029 000a movew %a1@(10),%d0 47bb4: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47bb8: 2d49 000c movel %a1,%fp@(12) } 47bbc: 245f moveal %sp@+,%a2 47bbe: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47bc0: 4ef9 0004 8120 jmp 48120 <_Objects_Namespace_remove> ... =============================================================================== 00047bc8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 47bc8: 4e56 ffcc linkw %fp,#-52 47bcc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47bd0: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 47bd4: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47bd6: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 47bda: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47bde: 4a88 tstl %a0 47be0: 6700 022c beqw 47e0e <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 47be4: 322a 000e movew %a2@(14),%d1 47be8: 302a 0012 movew %a2@(18),%d0 47bec: 3801 movew %d1,%d4 47bee: 0284 0000 ffff andil #65535,%d4 47bf4: 88c0 divuw %d0,%d4 47bf6: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47bfc: 6700 0224 beqw 47e22 <_Objects_Extend_information+0x25a> if ( information->object_blocks[ block ] == NULL ) 47c00: 4a90 tstl %a0@ 47c02: 6700 021e beqw 47e22 <_Objects_Extend_information+0x25a> 47c06: 5888 addql #4,%a0 47c08: 2605 movel %d5,%d3 47c0a: 4282 clrl %d2 47c0c: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 47c12: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 47c14: 5282 addql #1,%d2 47c16: b484 cmpl %d4,%d2 47c18: 6404 bccs 47c1e <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 47c1a: 4a98 tstl %a0@+ 47c1c: 66f4 bnes 47c12 <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 47c1e: 0281 0000 ffff andil #65535,%d1 47c24: 2641 moveal %d1,%a3 47c26: d7c0 addal %d0,%a3 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 47c28: b7fc 0000 ffff cmpal #65535,%a3 47c2e: 6200 0186 bhiw 47db6 <_Objects_Extend_information+0x1ee> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 47c32: 41ea 0014 lea %a2@(20),%a0 47c36: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 47c3a: 4a2a 0010 tstb %a2@(16) 47c3e: 6700 0180 beqw 47dc0 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 47c42: 2f00 movel %d0,%sp@- 47c44: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate> if ( !new_object_block ) 47c4a: 588f addql #4,%sp * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 47c4c: 2c00 movel %d0,%d6 if ( !new_object_block ) 47c4e: 6700 0166 beqw 47db6 <_Objects_Extend_information+0x1ee> } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 47c52: 4280 clrl %d0 47c54: 302a 000e movew %a2@(14),%d0 47c58: b083 cmpl %d3,%d0 47c5a: 6200 00c4 bhiw 47d20 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 47c5e: 2a44 moveal %d4,%a5 47c60: 528d addql #1,%a5 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 47c62: 200b movel %a3,%d0 47c64: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47c68: d088 addl %a0,%d0 47c6a: d085 addl %d5,%d0 47c6c: e588 lsll #2,%d0 47c6e: 2f00 movel %d0,%sp@- 47c70: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate> if ( !object_blocks ) { 47c76: 588f addql #4,%sp * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 47c78: 2840 moveal %d0,%a4 if ( !object_blocks ) { 47c7a: 4a80 tstl %d0 47c7c: 6700 01b2 beqw 47e30 <_Objects_Extend_information+0x268> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47c80: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 47c82: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47c84: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 47c86: 302a 000e movew %a2@(14),%d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 47c8a: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47c8e: de8d addl %a5,%d7 47c90: b085 cmpl %d5,%d0 47c92: 6200 013c bhiw 47dd0 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47c96: 4a85 tstl %d5 47c98: 670c beqs 47ca6 <_Objects_Extend_information+0xde><== NEVER TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47c9a: 2047 moveal %d7,%a0 47c9c: 4280 clrl %d0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 47c9e: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47ca0: 5280 addql #1,%d0 47ca2: b085 cmpl %d5,%d0 47ca4: 65f8 bcss 47c9e <_Objects_Extend_information+0xd6><== NEVER TAKEN 47ca6: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 47ca8: 4281 clrl %d1 47caa: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 47cae: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 47cb2: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 47cb4: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 47cb8: b283 cmpl %d3,%d1 47cba: 6310 blss 47ccc <_Objects_Extend_information+0x104><== NEVER TAKEN 47cbc: 2247 moveal %d7,%a1 47cbe: 2003 movel %d3,%d0 47cc0: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 47cc4: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 47cc6: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 47cc8: b081 cmpl %d1,%d0 47cca: 65f8 bcss 47cc4 <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 47ccc: 203c 0000 0700 movel #1792,%d0 47cd2: 40c4 movew %sr,%d4 47cd4: 8084 orl %d4,%d0 47cd6: 46c0 movew %d0,%sr information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47cd8: 2012 movel %a2@,%d0 47cda: 7218 moveq #24,%d1 47cdc: 4285 clrl %d5 47cde: e3a8 lsll %d1,%d0 47ce0: 3a0b movew %a3,%d5 47ce2: 4281 clrl %d1 47ce4: 2245 moveal %d5,%a1 47ce6: 7a1b moveq #27,%d5 47ce8: 322a 0004 movew %a2@(4),%d1 47cec: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47cf0: 206a 002e moveal %a2@(46),%a0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47cf4: eba9 lsll %d5,%d1 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 47cf6: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 47cfa: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47cfe: 8081 orl %d1,%d0 47d00: 2209 movel %a1,%d1 47d02: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 47d04: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47d08: 2541 000a movel %d1,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 47d0c: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47d10: 46c4 movew %d4,%sr if ( old_tables ) 47d12: 4a88 tstl %a0 47d14: 670a beqs 47d20 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 47d16: 2f08 movel %a0,%sp@- 47d18: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 47d1e: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47d20: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47d24: 4280 clrl %d0 47d26: 280e movel %fp,%d4 47d28: 0684 ffff fff4 addil #-12,%d4 47d2e: 47f9 0004 7174 lea 47174 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 47d34: 2a0a movel %a2,%d5 47d36: 0685 0000 001c addil #28,%d5 47d3c: 49f9 0004 7114 lea 47114 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47d42: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47d44: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47d48: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47d4c: 2f2a 0014 movel %a2@(20),%sp@- 47d50: 2f00 movel %d0,%sp@- 47d52: 2f06 movel %d6,%sp@- 47d54: 2f04 movel %d4,%sp@- 47d56: 4eb9 0004 c8b0 jsr 4c8b0 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47d5c: 4fef 0010 lea %sp@(16),%sp 47d60: 2f04 movel %d4,%sp@- 47d62: 4e93 jsr %a3@ 47d64: 588f addql #4,%sp 47d66: 4a80 tstl %d0 47d68: 6732 beqs 47d9c <_Objects_Extend_information+0x1d4><== NEVER TAKEN the_object->id = _Objects_Build_id( 47d6a: 2212 movel %a2@,%d1 47d6c: 7c18 moveq #24,%d6 47d6e: 7e1b moveq #27,%d7 47d70: 2040 moveal %d0,%a0 47d72: eda9 lsll %d6,%d1 47d74: 4286 clrl %d6 47d76: 3c2a 0004 movew %a2@(4),%d6 47d7a: 08c1 0010 bset #16,%d1 47d7e: efae lsll %d7,%d6 47d80: 8286 orl %d6,%d1 47d82: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 47d84: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 47d86: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 47d8a: 2f00 movel %d0,%sp@- 47d8c: 2f05 movel %d5,%sp@- 47d8e: 4e94 jsr %a4@ index++; 47d90: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47d92: 2f04 movel %d4,%sp@- 47d94: 4e93 jsr %a3@ 47d96: 588f addql #4,%sp 47d98: 4a80 tstl %d0 47d9a: 66ce bnes 47d6a <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47d9c: 4280 clrl %d0 information->inactive = 47d9e: 322a 0028 movew %a2@(40),%d1 47da2: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47da6: 206a 002a moveal %a2@(42),%a0 information->inactive = 47daa: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47dac: 3009 movew %a1,%d0 information->inactive = 47dae: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47db2: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47db6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47dbc: 4e5e unlk %fp 47dbe: 4e75 rts if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 47dc0: 2f00 movel %d0,%sp@- 47dc2: 4eb9 0004 9bd0 jsr 49bd0 <_Workspace_Allocate_or_fatal_error> 47dc8: 588f addql #4,%sp 47dca: 2c00 movel %d0,%d6 47dcc: 6000 fe84 braw 47c52 <_Objects_Extend_information+0x8a> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 47dd0: e58c lsll #2,%d4 47dd2: 2f04 movel %d4,%sp@- 47dd4: 2f2a 002e movel %a2@(46),%sp@- 47dd8: 2f0c movel %a4,%sp@- 47dda: 4eb9 0004 f9d8 jsr 4f9d8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47de0: 2f04 movel %d4,%sp@- 47de2: 2f2a 002a movel %a2@(42),%sp@- 47de6: 2f0d movel %a5,%sp@- 47de8: 4eb9 0004 f9d8 jsr 4f9d8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47dee: 4280 clrl %d0 47df0: 302a 000e movew %a2@(14),%d0 47df4: da80 addl %d0,%d5 47df6: e58d lsll #2,%d5 47df8: 2f05 movel %d5,%sp@- 47dfa: 2f2a 0018 movel %a2@(24),%sp@- 47dfe: 2f07 movel %d7,%sp@- 47e00: 4eb9 0004 f9d8 jsr 4f9d8 47e06: 4fef 0024 lea %sp@(36),%sp 47e0a: 6000 fe9c braw 47ca8 <_Objects_Extend_information+0xe0> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47e0e: 4280 clrl %d0 47e10: 2605 movel %d5,%d3 47e12: 4282 clrl %d2 47e14: 4284 clrl %d4 47e16: 322a 000e movew %a2@(14),%d1 47e1a: 302a 0012 movew %a2@(18),%d0 47e1e: 6000 fdfe braw 47c1e <_Objects_Extend_information+0x56> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 47e22: 2605 movel %d5,%d3 <== NOT EXECUTED 47e24: 4282 clrl %d2 <== NOT EXECUTED 47e26: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47e2c: 6000 fdf0 braw 47c1e <_Objects_Extend_information+0x56><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 47e30: 2f06 movel %d6,%sp@- 47e32: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> return; 47e38: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47e3a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47e40: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047ef4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 47ef4: 4e56 0000 linkw %fp,#0 47ef8: 2f02 movel %d2,%sp@- 47efa: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47efe: 660a bnes 47f0a <_Objects_Get_information+0x16> * 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 ) 47f00: 4280 clrl %d0 return NULL; #endif return info; } 47f02: 242e fffc movel %fp@(-4),%d2 47f06: 4e5e unlk %fp 47f08: 4e75 rts /* * 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 ); 47f0a: 2f2e 0008 movel %fp@(8),%sp@- 47f0e: 4eb9 0004 cef8 jsr 4cef8 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 47f14: 588f addql #4,%sp 47f16: 4a80 tstl %d0 47f18: 67e6 beqs 47f00 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 47f1a: b082 cmpl %d2,%d0 47f1c: 65e2 bcss 47f00 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 47f1e: 202e 0008 movel %fp@(8),%d0 47f22: 41f9 0005 fdb4 lea 5fdb4 <_Objects_Information_table>,%a0 47f28: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47f2c: 4a88 tstl %a0 47f2e: 67d0 beqs 47f00 <_Objects_Get_information+0xc> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 47f30: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 47f34: 67cc beqs 47f02 <_Objects_Get_information+0xe> <== 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 ) 47f36: 2040 moveal %d0,%a0 47f38: 4a68 000e tstw %a0@(14) 47f3c: 67c2 beqs 47f00 <_Objects_Get_information+0xc> return NULL; #endif return info; } 47f3e: 242e fffc movel %fp@(-4),%d2 47f42: 4e5e unlk %fp ... =============================================================================== 000499dc <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 499dc: 4e56 ffe0 linkw %fp,#-32 499e0: 48d7 043c moveml %d2-%d5/%a2,%sp@ 499e4: 262e 000c movel %fp@(12),%d3 499e8: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 499ec: 4a83 tstl %d3 499ee: 660e bnes 499fe <_Objects_Get_name_as_string+0x22> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 499f0: 4282 clrl %d2 } return NULL; /* unreachable path */ } 499f2: 2002 movel %d2,%d0 499f4: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 499fa: 4e5e unlk %fp 499fc: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 499fe: 4a82 tstl %d2 49a00: 67f0 beqs 499f2 <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49a02: 4aae 0008 tstl %fp@(8) 49a06: 6700 00a8 beqw 49ab0 <_Objects_Get_name_as_string+0xd4> 49a0a: 282e 0008 movel %fp@(8),%d4 information = _Objects_Get_information_id( tmpId ); 49a0e: 2f04 movel %d4,%sp@- 49a10: 4eb9 0004 98fc jsr 498fc <_Objects_Get_information_id> if ( !information ) 49a16: 588f addql #4,%sp 49a18: 4a80 tstl %d0 49a1a: 67d4 beqs 499f0 <_Objects_Get_name_as_string+0x14> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 49a1c: 486e fffc pea %fp@(-4) 49a20: 2f04 movel %d4,%sp@- 49a22: 2f00 movel %d0,%sp@- 49a24: 4eb9 0004 9acc jsr 49acc <_Objects_Get> switch ( location ) { 49a2a: 4fef 000c lea %sp@(12),%sp 49a2e: 4aae fffc tstl %fp@(-4) 49a32: 66bc bnes 499f0 <_Objects_Get_name_as_string+0x14> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 49a34: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49a36: 7818 moveq #24,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a38: 5383 subql #1,%d3 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 49a3a: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49a3e: 2200 movel %d0,%d1 49a40: e8a9 lsrl %d4,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 49a42: 2a00 movel %d0,%d5 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49a44: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 49a46: e08d lsrl #8,%d5 lname[ 3 ] = (u32_name >> 0) & 0xff; 49a48: 1d40 fffa moveb %d0,%fp@(-6) lname[ 4 ] = '\0'; 49a4c: 4200 clrb %d0 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49a4e: 4244 clrw %d4 49a50: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 49a52: 1d45 fff9 moveb %d5,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49a56: 1d40 fffb moveb %d0,%fp@(-5) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49a5a: 1d44 fff8 moveb %d4,%fp@(-8) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 49a5e: 1d41 fff7 moveb %d1,%fp@(-9) 49a62: 1001 moveb %d1,%d0 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a64: 4a83 tstl %d3 49a66: 6756 beqs 49abe <_Objects_Get_name_as_string+0xe2><== NEVER TAKEN 49a68: 4a01 tstb %d1 49a6a: 6752 beqs 49abe <_Objects_Get_name_as_string+0xe2> 49a6c: 2042 moveal %d2,%a0 49a6e: 4281 clrl %d1 49a70: 45ee fff7 lea %fp@(-9),%a2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 49a74: 4284 clrl %d4 49a76: 1800 moveb %d0,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a78: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 49a7a: 2279 0006 1010 moveal 61010 <__ctype_ptr__>,%a1 49a80: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 49a84: 49c4 extbl %d4 49a86: 0284 0000 0097 andil #151,%d4 49a8c: 6602 bnes 49a90 <_Objects_Get_name_as_string+0xb4> 49a8e: 702a moveq #42,%d0 49a90: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49a92: b681 cmpl %d1,%d3 49a94: 6306 blss 49a9c <_Objects_Get_name_as_string+0xc0> 49a96: 1032 1800 moveb %a2@(00000000,%d1:l),%d0 49a9a: 66d8 bnes 49a74 <_Objects_Get_name_as_string+0x98> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49a9c: 4210 clrb %a0@ _Thread_Enable_dispatch(); 49a9e: 4eb9 0004 a330 jsr 4a330 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 49aa4: 2002 movel %d2,%d0 49aa6: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49aac: 4e5e unlk %fp 49aae: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49ab0: 2079 0006 2ae6 moveal 62ae6 <_Thread_Executing>,%a0 49ab6: 2828 0008 movel %a0@(8),%d4 49aba: 6000 ff52 braw 49a0e <_Objects_Get_name_as_string+0x32> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49abe: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49ac0: 4210 clrb %a0@ _Thread_Enable_dispatch(); 49ac2: 4eb9 0004 a330 jsr 4a330 <_Thread_Enable_dispatch> 49ac8: 60da bras 49aa4 <_Objects_Get_name_as_string+0xc8> ... =============================================================================== 0005c238 <_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; 5c238: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5c23a: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5c23c: 4e56 0000 linkw %fp,#0 5c240: 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; 5c244: 90a8 0006 subl %a0@(6),%d0 5c248: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5c24c: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5c250: 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 ) { 5c254: b280 cmpl %d0,%d1 5c256: 6510 bcss 5c268 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5c258: 2068 0018 moveal %a0@(24),%a0 5c25c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5c260: 6706 beqs 5c268 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 5c262: 4291 clrl %a1@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5c264: 4e5e unlk %fp 5c266: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5c268: 7001 moveq #1,%d0 return NULL; } 5c26a: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5c26c: 2280 movel %d0,%a1@ 5c26e: 4280 clrl %d0 return NULL; } ... =============================================================================== 00049748 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 49748: 4e56 fffc linkw %fp,#-4 4974c: 222e 0008 movel %fp@(8),%d1 49750: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49752: 4a81 tstl %d1 49754: 660a bnes 49760 <_Objects_Id_to_name+0x18> 49756: 2079 0006 1bee moveal 61bee <_Thread_Executing>,%a0 4975c: 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); 49760: 7418 moveq #24,%d2 49762: 2001 movel %d1,%d0 49764: e4a8 lsrl %d2,%d0 49766: 143c 0007 moveb #7,%d2 4976a: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4976c: 143c 0003 moveb #3,%d2 49770: 2040 moveal %d0,%a0 49772: 5388 subql #1,%a0 49774: b488 cmpl %a0,%d2 49776: 654a bcss 497c2 <_Objects_Id_to_name+0x7a> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 49778: 41f9 0006 1aec lea 61aec <_Objects_Information_table>,%a0 4977e: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 49782: 4a88 tstl %a0 49784: 673c beqs 497c2 <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 49786: 2001 movel %d1,%d0 49788: 741b moveq #27,%d2 4978a: e4a8 lsrl %d2,%d0 4978c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 49790: 6730 beqs 497c2 <_Objects_Id_to_name+0x7a> <== 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 ); 49792: 486e fffc pea %fp@(-4) 49796: 2f01 movel %d1,%sp@- 49798: 2f00 movel %d0,%sp@- 4979a: 4eb9 0004 96dc jsr 496dc <_Objects_Get> if ( !the_object ) 497a0: 4fef 000c lea %sp@(12),%sp 497a4: 4a80 tstl %d0 497a6: 671a beqs 497c2 <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; *name = the_object->name; 497a8: 206e 000c moveal %fp@(12),%a0 497ac: 2240 moveal %d0,%a1 497ae: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 497b2: 4eb9 0004 a044 jsr 4a044 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 497b8: 242e fff8 movel %fp@(-8),%d2 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); 497bc: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 497be: 4e5e unlk %fp 497c0: 4e75 rts 497c2: 242e fff8 movel %fp@(-8),%d2 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 497c6: 7003 moveq #3,%d0 } 497c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048014 <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 48014: 41f9 0005 fdb4 lea 5fdb4 <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4801a: 4e56 fff0 linkw %fp,#-16 4801e: 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; 48022: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 48026: 48d7 003c moveml %d2-%d5,%sp@ 4802a: 222e 0014 movel %fp@(20),%d1 4802e: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 48030: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 48032: 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; 48036: 4244 clrw %d4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 48038: 3a2e 001a movew %fp@(26),%d5 4803c: 242e 0010 movel %fp@(16),%d2 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 48040: d683 addl %d3,%d3 48042: 9783 subxl %d3,%d3 48044: 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; 48046: 3144 0028 movew %d4,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 4804a: 3144 000e movew %d4,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4804e: 282e 0020 movel %fp@(32),%d4 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 48052: 3142 0004 movew %d2,%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 = 48056: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 4805a: 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; 4805e: 2388 2c00 movel %a0,%a1@(00000000,%d2: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; 48062: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 48066: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 48068: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 4806c: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 48070: 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) { 48074: 4a03 tstb %d3 48076: 6706 beqs 4807e <_Objects_Initialize_information+0x6a> 48078: 4a81 tstl %d1 4807a: 6700 0092 beqw 4810e <_Objects_Initialize_information+0xfa> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 4807e: 7a18 moveq #24,%d5 48080: 4a81 tstl %d1 48082: 56c3 sne %d3 48084: eba8 lsll %d5,%d0 48086: 1a3c 001b moveb #27,%d5 4808a: 49c3 extbl %d3 4808c: 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; 4808e: 43f9 0005 f5a4 lea 5f5a4 ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 48094: ebaa lsll %d5,%d2 48096: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 4809a: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 4809e: 8082 orl %d2,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 480a0: ca84 andl %d4,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 480a2: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 480a6: 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; 480a8: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 480ac: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 480b0: 4a85 tstl %d5 480b2: 6626 bnes 480da <_Objects_Initialize_information+0xc6><== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 480b4: 43e8 0020 lea %a0@(32),%a1 480b8: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 480bc: 43e8 001c lea %a0@(28),%a1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 480c0: 3144 0032 movew %d4,%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; 480c4: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 480c8: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 480cc: 4a81 tstl %d1 480ce: 662c bnes 480fc <_Objects_Initialize_information+0xe8> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 480d0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 480d6: 4e5e unlk %fp 480d8: 4e75 rts * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 480da: 5884 addql #4,%d4 <== NOT EXECUTED 480dc: 70fc moveq #-4,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 480de: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 480e2: c880 andl %d0,%d4 <== NOT EXECUTED 480e4: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 480e8: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 480ec: 3144 0032 movew %d4,%a0@(50) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 480f0: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 480f4: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 480f8: 4a81 tstl %d1 <== NOT EXECUTED 480fa: 67d4 beqs 480d0 <_Objects_Initialize_information+0xbc><== NOT EXECUTED /* * 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 ); 480fc: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 48100: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 48106: 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 ); 48108: 4ef9 0004 7bc8 jmp 47bc8 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 4810e: 4878 0014 pea 14 48112: 4878 0001 pea 1 48116: 42a7 clrl %sp@- 48118: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> ... =============================================================================== 000481b0 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 481b0: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 481b2: 4e56 ffec linkw %fp,#-20 481b6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 481ba: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 481be: 4283 clrl %d3 block_count = (information->maximum - index_base) / 481c0: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 481c2: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 481c6: 382a 000e movew %a2@(14),%d4 481ca: 322a 0012 movew %a2@(18),%d1 481ce: 9883 subl %d3,%d4 481d0: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 481d4: 672c beqs 48202 <_Objects_Shrink_information+0x52><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 481d6: 226a 002a moveal %a2@(42),%a1 481da: b291 cmpl %a1@,%d1 481dc: 672e beqs 4820c <_Objects_Shrink_information+0x5c><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 481de: 7404 moveq #4,%d2 481e0: 4280 clrl %d0 } index_base += information->allocation_size; 481e2: 2042 moveal %d2,%a0 481e4: d681 addl %d1,%d3 481e6: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 481e8: 5280 addql #1,%d0 481ea: b084 cmpl %d4,%d0 481ec: 6414 bccs 48202 <_Objects_Shrink_information+0x52><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 481ee: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 481f2: 671a beqs 4820e <_Objects_Shrink_information+0x5e> 481f4: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 481f6: 2042 moveal %d2,%a0 481f8: d681 addl %d1,%d3 481fa: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 481fc: 5280 addql #1,%d0 481fe: b084 cmpl %d4,%d0 48200: 65ec bcss 481ee <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 48202: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48208: 4e5e unlk %fp 4820a: 4e75 rts index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 4820c: 4282 clrl %d2 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 4820e: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 48212: 47f9 0004 714c lea 4714c <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 48218: 4280 clrl %d0 4821a: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 4821e: 2810 movel %a0@,%d4 if ((index >= index_base) && 48220: b680 cmpl %d0,%d3 48222: 620c bhis 48230 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 48224: 4281 clrl %d1 48226: 322a 0012 movew %a2@(18),%d1 4822a: d283 addl %d3,%d1 4822c: b280 cmpl %d0,%d1 4822e: 623e bhis 4826e <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 48230: 2044 moveal %d4,%a0 48232: 4a84 tstl %d4 48234: 66e2 bnes 48218 <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 48236: 206a 002e moveal %a2@(46),%a0 4823a: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 4823e: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> information->object_blocks[ block ] = NULL; 48244: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 48248: 588f addql #4,%sp _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 4824a: 302a 0028 movew %a2@(40),%d0 4824e: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 48252: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 48256: 9081 subl %d1,%d0 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 48258: 42b1 2800 clrl %a1@(00000000,%d2:l) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 4825c: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 48260: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 48264: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4826a: 4e5e unlk %fp 4826c: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 4826e: 2f08 movel %a0,%sp@- 48270: 4e93 jsr %a3@ 48272: 588f addql #4,%sp } } while ( the_object ); 48274: 2044 moveal %d4,%a0 48276: 4a84 tstl %d4 48278: 669e bnes 48218 <_Objects_Shrink_information+0x68> 4827a: 60ba bras 48236 <_Objects_Shrink_information+0x86> =============================================================================== 0004c73a <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4c73a: 4e56 0000 linkw %fp,#0 4c73e: 2f0a movel %a2,%sp@- 4c740: 246e 000c moveal %fp@(12),%a2 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4c744: 4a39 0005 e674 tstb 5e674 4c74a: 665c bnes 4c7a8 <_RTEMS_tasks_Create_extension+0x6e> 4c74c: 701e moveq #30,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c74e: 2f00 movel %d0,%sp@- 4c750: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate> if ( !api ) 4c756: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c758: 2040 moveal %d0,%a0 if ( !api ) 4c75a: 4a80 tstl %d0 4c75c: 675c beqs 4c7ba <_RTEMS_tasks_Create_extension+0x80><== NEVER TAKEN created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4c75e: 42aa 0118 clrl %a2@(280) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4c762: 4200 clrb %d0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4c764: 2548 0108 movel %a0,%a2@(264) 4c768: 1140 0008 moveb %d0,%a0@(8) api->pending_events = EVENT_SETS_NONE_PENDING; 4c76c: 4290 clrl %a0@ api->event_condition = 0; 4c76e: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4c772: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4c776: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4c77a: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4c77e: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4c782: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 4c786: 4a39 0005 e674 tstb 5e674 4c78c: 6710 beqs 4c79e <_RTEMS_tasks_Create_extension+0x64> 4c78e: 41e8 001e lea %a0@(30),%a0 4c792: 4280 clrl %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4c794: 4298 clrl %a0@+ api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4c796: 5280 addql #1,%d0 4c798: 7210 moveq #16,%d1 4c79a: b280 cmpl %d0,%d1 4c79c: 66f6 bnes 4c794 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4c79e: 246e fffc moveal %fp@(-4),%a2 4c7a2: 4e5e unlk %fp api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4c7a4: 7001 moveq #1,%d0 api->Notepads[i] = 0; } return true; } 4c7a6: 4e75 rts /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4c7a8: 705e moveq #94,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c7aa: 2f00 movel %d0,%sp@- 4c7ac: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate> if ( !api ) 4c7b2: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c7b4: 2040 moveal %d0,%a0 if ( !api ) 4c7b6: 4a80 tstl %d0 4c7b8: 66a4 bnes 4c75e <_RTEMS_tasks_Create_extension+0x24> for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4c7ba: 246e fffc moveal %fp@(-4),%a2 4c7be: 4e5e unlk %fp if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) 4c7c0: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 00046b28 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46b28: 4e56 ffe4 linkw %fp,#-28 46b2c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 46b30: 2479 0005 e69a moveal 5e69a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 46b36: 2639 0005 e696 movel 5e696 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46b3c: 4a8a tstl %a2 46b3e: 6754 beqs 46b94 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46b40: 4a83 tstl %d3 46b42: 6750 beqs 46b94 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 46b44: 280e movel %fp,%d4 46b46: 4282 clrl %d2 46b48: 5984 subql #4,%d4 46b4a: 47f9 0004 68fc lea 468fc ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46b50: 49f9 0004 6bb0 lea 46bb0 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 46b56: 2f04 movel %d4,%sp@- 46b58: 2f2a 000c movel %a2@(12),%sp@- 46b5c: 2f2a 0014 movel %a2@(20),%sp@- 46b60: 2f2a 0004 movel %a2@(4),%sp@- 46b64: 2f2a 0008 movel %a2@(8),%sp@- 46b68: 2f12 movel %a2@,%sp@- 46b6a: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 46b6c: 4fef 0018 lea %sp@(24),%sp 46b70: 4a80 tstl %d0 46b72: 662a bnes 46b9e <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46b74: 2f2a 0018 movel %a2@(24),%sp@- 46b78: 2f2a 0010 movel %a2@(16),%sp@- 46b7c: 2f2e fffc movel %fp@(-4),%sp@- 46b80: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 46b82: 4fef 000c lea %sp@(12),%sp 46b86: 4a80 tstl %d0 46b88: 6614 bnes 46b9e <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46b8a: 5282 addql #1,%d2 46b8c: 45ea 001c lea %a2@(28),%a2 46b90: b483 cmpl %d3,%d2 46b92: 65c2 bcss 46b56 <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 46b94: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46b9a: 4e5e unlk %fp 46b9c: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 46b9e: 2f00 movel %d0,%sp@- 46ba0: 4878 0001 pea 1 46ba4: 4878 0001 pea 1 46ba8: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> ... =============================================================================== 0004c676 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4c676: 4e56 ffec linkw %fp,#-20 4c67a: 206e 0008 moveal %fp@(8),%a0 4c67e: 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 ]; 4c682: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 4c686: 4a8a tstl %a2 4c688: 671a beqs 4c6a4 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4c68a: 203c 0000 0700 movel #1792,%d0 4c690: 40c1 movew %sr,%d1 4c692: 8081 orl %d1,%d0 4c694: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4c696: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4c69a: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4c69e: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4c6a0: 4a82 tstl %d2 4c6a2: 660a bnes 4c6ae <_RTEMS_tasks_Post_switch_extension+0x38><== ALWAYS TAKEN (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4c6a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4c6aa: 4e5e unlk %fp <== NOT EXECUTED 4c6ac: 4e75 rts <== NOT EXECUTED if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4c6ae: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4c6b2: 260e movel %fp,%d3 4c6b4: 5983 subql #4,%d3 4c6b6: 47f9 0004 ec68 lea 4ec68 ,%a3 4c6bc: 2f03 movel %d3,%sp@- 4c6be: 2f3c 0000 ffff movel #65535,%sp@- 4c6c4: 2f2a 000e movel %a2@(14),%sp@- 4c6c8: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4c6ca: 2f02 movel %d2,%sp@- 4c6cc: 206a 000a moveal %a2@(10),%a0 4c6d0: 4e90 jsr %a0@ asr->nest_level -= 1; 4c6d2: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4c6d6: 2f03 movel %d3,%sp@- 4c6d8: 2f3c 0000 ffff movel #65535,%sp@- 4c6de: 2f2e fffc movel %fp@(-4),%sp@- 4c6e2: 4e93 jsr %a3@ 4c6e4: 4fef 001c lea %sp@(28),%sp } 4c6e8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4c6ee: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c5d2 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4c5d2: 4e56 0000 linkw %fp,#0 4c5d6: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4c5da: 2068 0118 moveal %a0@(280),%a0 while (tvp) { 4c5de: 4a88 tstl %a0 4c5e0: 6712 beqs 4c5f4 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4c5e2: 2268 0004 moveal %a0@(4),%a1 4c5e6: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4c5ea: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c5ee: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4c5f0: 4a88 tstl %a0 4c5f2: 66ee bnes 4c5e2 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4c5f4: 206e 000c moveal %fp@(12),%a0 4c5f8: 2068 0118 moveal %a0@(280),%a0 while (tvp) { 4c5fc: 4a88 tstl %a0 4c5fe: 6712 beqs 4c612 <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4c600: 2268 0004 moveal %a0@(4),%a1 4c604: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4c608: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c60c: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4c60e: 4a88 tstl %a0 4c610: 66ee bnes 4c600 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4c612: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047bfc <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 47bfc: 4e56 fffc linkw %fp,#-4 47c00: 2f0a movel %a2,%sp@- 47c02: 486e fffc pea %fp@(-4) 47c06: 2f2e 0008 movel %fp@(8),%sp@- 47c0a: 4879 0006 1e48 pea 61e48 <_Rate_monotonic_Information> 47c10: 4eb9 0004 9ae0 jsr 49ae0 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 47c16: 4fef 000c lea %sp@(12),%sp 47c1a: 2440 moveal %d0,%a2 47c1c: 4aae fffc tstl %fp@(-4) 47c20: 6636 bnes 47c58 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 47c22: 206a 0040 moveal %a2@(64),%a0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 47c26: 2028 0010 movel %a0@(16),%d0 47c2a: 0280 0000 4000 andil #16384,%d0 47c30: 670a beqs 47c3c <_Rate_monotonic_Timeout+0x40> the_thread->Wait.id == the_period->Object.id ) { 47c32: 202a 0008 movel %a2@(8),%d0 47c36: b0a8 0020 cmpl %a0@(32),%d0 47c3a: 675e beqs 47c9a <_Rate_monotonic_Timeout+0x9e> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 47c3c: 7001 moveq #1,%d0 47c3e: b0aa 0038 cmpl %a2@(56),%d0 47c42: 671c beqs 47c60 <_Rate_monotonic_Timeout+0x64> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 47c44: 7004 moveq #4,%d0 47c46: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47c4a: 2039 0006 1f44 movel 61f44 <_Thread_Dispatch_disable_level>,%d0 47c50: 5380 subql #1,%d0 47c52: 23c0 0006 1f44 movel %d0,61f44 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 47c58: 246e fff8 moveal %fp@(-8),%a2 47c5c: 4e5e unlk %fp 47c5e: 4e75 rts _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 47c60: 103c 0003 moveb #3,%d0 47c64: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 47c68: 2f0a movel %a2,%sp@- 47c6a: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47c70: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47c76: 486a 0010 pea %a2@(16) 47c7a: 4879 0006 201c pea 6201c <_Watchdog_Ticks_chain> 47c80: 4eb9 0004 b5cc jsr 4b5cc <_Watchdog_Insert> 47c86: 4fef 000c lea %sp@(12),%sp 47c8a: 2039 0006 1f44 movel 61f44 <_Thread_Dispatch_disable_level>,%d0 47c90: 5380 subql #1,%d0 47c92: 23c0 0006 1f44 movel %d0,61f44 <_Thread_Dispatch_disable_level> 47c98: 60be bras 47c58 <_Rate_monotonic_Timeout+0x5c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47c9a: 2f3c 1003 fff8 movel #268697592,%sp@- 47ca0: 2f08 movel %a0,%sp@- 47ca2: 4eb9 0004 9ff0 jsr 49ff0 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 47ca8: 2f0a movel %a2,%sp@- 47caa: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47cb0: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47cb6: 486a 0010 pea %a2@(16) 47cba: 4879 0006 201c pea 6201c <_Watchdog_Ticks_chain> 47cc0: 4eb9 0004 b5cc jsr 4b5cc <_Watchdog_Insert> the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 47cc6: 4fef 0014 lea %sp@(20),%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47cca: 2039 0006 1f44 movel 61f44 <_Thread_Dispatch_disable_level>,%d0 47cd0: 5380 subql #1,%d0 47cd2: 23c0 0006 1f44 movel %d0,61f44 <_Thread_Dispatch_disable_level> 47cd8: 6000 ff7e braw 47c58 <_Rate_monotonic_Timeout+0x5c> =============================================================================== 00048fa4 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 48fa4: 4e56 0000 linkw %fp,#0 48fa8: 2039 0006 2a2c movel 62a2c <_Thread_Dispatch_disable_level>,%d0 48fae: 5280 addql #1,%d0 48fb0: 2f0a movel %a2,%sp@- 48fb2: 246e 0008 moveal %fp@(8),%a2 48fb6: 23c0 0006 2a2c movel %d0,62a2c <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 48fbc: 2039 0006 2abe movel 62abe <_TOD_Now>,%d0 if ( time->tv_sec < seconds ) 48fc2: 2212 movel %a2@,%d1 48fc4: b280 cmpl %d0,%d1 48fc6: 6d38 blts 49000 <_TOD_Set+0x5c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 48fc8: 9280 subl %d0,%d1 48fca: 2f01 movel %d1,%sp@- 48fcc: 42a7 clrl %sp@- 48fce: 4879 0006 2af8 pea 62af8 <_Watchdog_Seconds_chain> 48fd4: 4eb9 0004 b61c jsr 4b61c <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 48fda: 23d2 0006 2abe movel %a2@,62abe <_TOD_Now> 48fe0: 588a addql #4,%a2 48fe2: 4fef 000c lea %sp@(12),%sp 48fe6: 23d2 0006 2ac2 movel %a2@,62ac2 <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 48fec: 246e fffc moveal %fp@(-4),%a2 48ff0: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 48ff2: 7001 moveq #1,%d0 48ff4: 13c0 0006 2a40 moveb %d0,62a40 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 48ffa: 4ef9 0004 a330 jmp 4a330 <_Thread_Enable_dispatch> 49000: 9081 subl %d1,%d0 49002: 2f00 movel %d0,%sp@- 49004: 4878 0001 pea 1 49008: 4879 0006 2af8 pea 62af8 <_Watchdog_Seconds_chain> 4900e: 4eb9 0004 b61c jsr 4b61c <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 49014: 23d2 0006 2abe movel %a2@,62abe <_TOD_Now> 4901a: 588a addql #4,%a2 4901c: 4fef 000c lea %sp@(12),%sp 49020: 23d2 0006 2ac2 movel %a2@,62ac2 <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 49026: 246e fffc moveal %fp@(-4),%a2 4902a: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 4902c: 7001 moveq #1,%d0 4902e: 13c0 0006 2a40 moveb %d0,62a40 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 49034: 4ef9 0004 a330 jmp 4a330 <_Thread_Enable_dispatch> ... =============================================================================== 00047668 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 47668: 4e56 ffec linkw %fp,#-20 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 4766c: 2239 0005 e6b0 movel 5e6b0 ,%d1 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 47672: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47676: 240e movel %fp,%d2 47678: 5182 subql #8,%d2 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 4767a: 263c 0000 03e8 movel #1000,%d3 47680: 4c03 1800 mulsl %d3,%d1 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47684: 45f9 0004 9624 lea 49624 <_Timespec_Add_to>,%a2 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 4768a: 2039 0005 ff3c movel 5ff3c <_Watchdog_Ticks_since_boot>,%d0 47690: 5280 addql #1,%d0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47692: 2f02 movel %d2,%sp@- 47694: 4879 0005 fe7a pea 5fe7a <_TOD_Uptime> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 4769a: 2d41 fffc movel %d1,%fp@(-4) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 4769e: 23c0 0005 ff3c movel %d0,5ff3c <_Watchdog_Ticks_since_boot> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 476a4: 42ae fff8 clrl %fp@(-8) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 476a8: 4e92 jsr %a2@ /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 476aa: 2f02 movel %d2,%sp@- 476ac: 4879 0005 fe8e pea 5fe8e <_TOD_Now> 476b2: 4e92 jsr %a2@ while ( seconds ) { 476b4: 4fef 0010 lea %sp@(16),%sp /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 476b8: 2400 movel %d0,%d2 while ( seconds ) { 476ba: 6716 beqs 476d2 <_TOD_Tickle_ticks+0x6a> 476bc: 45f9 0004 9b54 lea 49b54 <_Watchdog_Tickle>,%a2 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 476c2: 4879 0005 fec8 pea 5fec8 <_Watchdog_Seconds_chain> _Watchdog_Tickle_seconds(); seconds--; 476c8: 5382 subql #1,%d2 476ca: 4e92 jsr %a2@ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 476cc: 588f addql #4,%sp 476ce: 4a82 tstl %d2 476d0: 66f0 bnes 476c2 <_TOD_Tickle_ticks+0x5a> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 476d2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 476d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047610 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 47610: 4e56 0000 linkw %fp,#0 47614: 206e 0008 moveal %fp@(8),%a0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 47618: 2039 0006 0f00 movel 60f00 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 4761e: 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) || 47620: 4a88 tstl %a0 47622: 6762 beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN 47624: 243c 000f 4240 movel #1000000,%d2 4762a: 4c40 2002 remul %d0,%d2,%d2 (the_tod->ticks >= ticks_per_second) || 4762e: b4a8 0018 cmpl %a0@(24),%d2 47632: 6352 blss 47686 <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 47634: 703b moveq #59,%d0 47636: b0a8 0014 cmpl %a0@(20),%d0 4763a: 654a bcss 47686 <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 4763c: b0a8 0010 cmpl %a0@(16),%d0 47640: 6544 bcss 47686 <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || 47642: 7217 moveq #23,%d1 47644: b2a8 000c cmpl %a0@(12),%d1 47648: 653c bcss 47686 <_TOD_Validate+0x76> (the_tod->month == 0) || 4764a: 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) || 4764e: 6736 beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN 47650: 740c moveq #12,%d2 47652: b480 cmpl %d0,%d2 47654: 6530 bcss 47686 <_TOD_Validate+0x76> (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) || 47656: 2210 movel %a0@,%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) || 47658: 0c81 0000 07c3 cmpil #1987,%d1 4765e: 6326 blss 47686 <_TOD_Validate+0x76> (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) ) 47660: 2068 0008 moveal %a0@(8),%a0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 47664: 4a88 tstl %a0 47666: 671e beqs 47686 <_TOD_Validate+0x76> <== 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 ) 47668: 143c 0003 moveb #3,%d2 4766c: c282 andl %d2,%d1 4766e: 661e bnes 4768e <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 47670: 43f9 0005 fcf2 lea 5fcf2 <_TOD_Days_per_month>,%a1 47676: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 4767a: b1c0 cmpal %d0,%a0 4767c: 53c0 sls %d0 4767e: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 47680: 241f movel %sp@+,%d2 47682: 4e5e unlk %fp 47684: 4e75 rts 47686: 241f movel %sp@+,%d2 47688: 4e5e unlk %fp * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 4768a: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 4768c: 4e75 rts return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 4768e: 43f9 0005 fcf2 lea 5fcf2 <_TOD_Days_per_month>,%a1 47694: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 47698: b1c0 cmpal %d0,%a0 4769a: 53c0 sls %d0 4769c: 4480 negl %d0 4769e: 60e0 bras 47680 <_TOD_Validate+0x70> =============================================================================== 0004836c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4836c: 4e56 fff0 linkw %fp,#-16 48370: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48374: 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 ); 48378: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4837a: 242e 000c movel %fp@(12),%d2 */ /* * Save original state */ original_state = the_thread->current_state; 4837e: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48382: 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 ); 48386: 4eb9 0004 927c jsr 4927c <_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 ) 4838c: 588f addql #4,%sp 4838e: b4aa 0014 cmpl %a2@(20),%d2 48392: 670c beqs 483a0 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 48394: 2f02 movel %d2,%sp@- 48396: 2f0a movel %a2,%sp@- 48398: 4eb9 0004 90f8 jsr 490f8 <_Thread_Set_priority> 4839e: 508f addql #8,%sp _ISR_Disable( level ); 483a0: 203c 0000 0700 movel #1792,%d0 483a6: 40c1 movew %sr,%d1 483a8: 8081 orl %d1,%d0 483aa: 46c0 movew %d0,%sr /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 483ac: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 483b0: 7404 moveq #4,%d2 483b2: b480 cmpl %d0,%d2 483b4: 6738 beqs 483ee <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 483b6: 44c3 movew %d3,%ccr 483b8: 6708 beqs 483c2 <_Thread_Change_priority+0x56> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 483ba: 74fb moveq #-5,%d2 483bc: c480 andl %d0,%d2 483be: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 483c2: 46c1 movew %d1,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 483c4: 0280 0003 bee0 andil #245472,%d0 483ca: 660a bnes 483d6 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 483cc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 483d2: 4e5e unlk %fp 483d4: 4e75 rts /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 483d6: 2d4a 000c movel %a2,%fp@(12) 483da: 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 ); } 483e0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 483e6: 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 ); 483e8: 4ef9 0004 904c jmp 4904c <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 483ee: 44c3 movew %d3,%ccr 483f0: 673c beqs 4842e <_Thread_Change_priority+0xc2> <== 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; 483f2: 206a 008e moveal %a2@(142),%a0 483f6: 302a 0094 movew %a2@(148),%d0 483fa: 3410 movew %a0@,%d2 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 483fc: 42aa 0010 clrl %a2@(16) 48400: 8082 orl %d2,%d0 48402: 3080 movew %d0,%a0@ _Priority_Major_bit_map |= the_priority_map->ready_major; 48404: 3439 0005 feac movew 5feac <_Priority_Major_bit_map>,%d2 4840a: 302a 0092 movew %a2@(146),%d0 4840e: 8082 orl %d2,%d0 48410: 33c0 0005 feac movew %d0,5feac <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 48416: 4a04 tstb %d4 48418: 6700 0082 beqw 4849c <_Thread_Change_priority+0x130> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4841c: 206a 008a moveal %a2@(138),%a0 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48420: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48422: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 48426: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 48428: 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; 4842c: 2489 movel %a1,%a2@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 4842e: 203c 0000 0700 movel #1792,%d0 48434: 46c1 movew %d1,%sr 48436: 8081 orl %d1,%d0 48438: 46c0 movew %d0,%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 ); 4843a: 3039 0005 feac movew 5feac <_Priority_Major_bit_map>,%d0 48440: 4840 swap %d0 48442: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 48444: 4282 clrl %d2 48446: 41f9 0005 ff18 lea 5ff18 <_Priority_Bit_map>,%a0 4844c: 3400 movew %d0,%d2 4844e: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 48452: 4840 swap %d0 48454: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 48456: 4283 clrl %d3 48458: e98a lsll #4,%d2 4845a: 3600 movew %d0,%d3 4845c: 2279 0005 fda8 moveal 5fda8 <_Thread_Ready_chain>,%a1 48462: 2002 movel %d2,%d0 48464: d083 addl %d3,%d0 48466: 2400 movel %d0,%d2 48468: e58a lsll #2,%d2 4846a: e988 lsll #4,%d0 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 4846c: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 48472: 93c2 subal %d2,%a1 48474: 2031 0800 movel %a1@(00000000,%d0:l),%d0 48478: 23c0 0005 fe8a movel %d0,5fe8a <_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() && 4847e: b1c0 cmpal %d0,%a0 48480: 670e beqs 48490 <_Thread_Change_priority+0x124> _Thread_Executing->is_preemptible ) 48482: 4a28 0075 tstb %a0@(117) 48486: 6708 beqs 48490 <_Thread_Change_priority+0x124> _Context_Switch_necessary = true; 48488: 7401 moveq #1,%d2 4848a: 13c2 0005 fec6 moveb %d2,5fec6 <_Context_Switch_necessary> _ISR_Enable( level ); 48490: 46c1 movew %d1,%sr } 48492: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48498: 4e5e unlk %fp 4849a: 4e75 rts _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 4849c: 206a 008a moveal %a2@(138),%a0 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 484a0: 2008 movel %a0,%d0 484a2: 5880 addql #4,%d0 484a4: 2480 movel %d0,%a2@ old_last_node = the_chain->last; 484a6: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 484aa: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 484ae: 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; 484b2: 228a movel %a2,%a1@ 484b4: 6000 ff78 braw 4842e <_Thread_Change_priority+0xc2> =============================================================================== 000484b8 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 484b8: 327c 0700 moveaw #1792,%a1 484bc: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 484be: 4e56 ffec linkw %fp,#-20 484c2: 206e 0008 moveal %fp@(8),%a0 484c6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 484ca: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 484ce: 40c3 movew %sr,%d3 484d0: 8083 orl %d3,%d0 484d2: 46c0 movew %d0,%sr current_state = the_thread->current_state; 484d4: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 484d8: 2002 movel %d2,%d0 484da: c081 andl %d1,%d0 484dc: 6776 beqs 48554 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 484de: 2002 movel %d2,%d0 484e0: 4680 notl %d0 484e2: c081 andl %d1,%d0 current_state = 484e4: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 484e8: 666a bnes 48554 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 484ea: 2868 008e moveal %a0@(142),%a4 484ee: 3028 0094 movew %a0@(148),%d0 484f2: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 484f4: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 484f8: 240a movel %a2,%d2 484fa: 5882 addql #4,%d2 484fc: 8081 orl %d1,%d0 484fe: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 48500: 266a 0008 moveal %a2@(8),%a3 48504: 3880 movew %d0,%a4@ the_chain->last = the_node; 48506: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4850a: 3239 0005 feac movew 5feac <_Priority_Major_bit_map>,%d1 48510: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 48514: 214b 0004 movel %a3,%a0@(4) 48518: 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; 4851a: 2688 movel %a0,%a3@ 4851c: 33c0 0005 feac movew %d0,5feac <_Priority_Major_bit_map> _ISR_Flash( level ); 48522: 2009 movel %a1,%d0 48524: 46c3 movew %d3,%sr 48526: 8083 orl %d3,%d0 48528: 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 ) { 4852a: 2028 0014 movel %a0@(20),%d0 4852e: 2279 0005 fe8a moveal 5fe8a <_Thread_Heir>,%a1 48534: b0a9 0014 cmpl %a1@(20),%d0 48538: 641a bccs 48554 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 4853a: 23c8 0005 fe8a movel %a0,5fe8a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 48540: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 48546: 4a28 0075 tstb %a0@(117) 4854a: 6712 beqs 4855e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4854c: 7001 moveq #1,%d0 4854e: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 48554: 46c3 movew %d3,%sr } 48556: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4855a: 4e5e unlk %fp 4855c: 4e75 rts * 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 ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4855e: 4a80 tstl %d0 48560: 66f2 bnes 48554 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 48562: 7001 moveq #1,%d0 <== NOT EXECUTED 48564: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> <== NOT EXECUTED 4856a: 60e8 bras 48554 <_Thread_Clear_state+0x9c> <== NOT EXECUTED =============================================================================== 0004856c <_Thread_Close>: 4856c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 4856e: 4e56 0000 linkw %fp,#0 48572: 2f0b movel %a3,%sp@- 48574: 266e 0008 moveal %fp@(8),%a3 48578: 2f0a movel %a2,%sp@- 4857a: 246e 000c moveal %fp@(12),%a2 4857e: 206b 0018 moveal %a3@(24),%a0 48582: 302a 000a movew %a2@(10),%d0 48586: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4858a: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 48590: 5380 subql #1,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 48592: 2f0a movel %a2,%sp@- 48594: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> 4859a: 4eb9 0004 98a0 jsr 498a0 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 485a0: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 485a6: 5280 addql #1,%d0 485a8: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 485ae: 2f0a movel %a2,%sp@- 485b0: 2f0b movel %a3,%sp@- 485b2: 4eb9 0004 7b9c jsr 47b9c <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 485b8: 4878 0001 pea 1 485bc: 2f0a movel %a2,%sp@- 485be: 4eb9 0004 9168 jsr 49168 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 485c4: 2f0a movel %a2,%sp@- 485c6: 4eb9 0004 8f74 jsr 48f74 <_Thread_queue_Extract_with_proxy> 485cc: 4fef 0018 lea %sp@(24),%sp 485d0: 4a00 tstb %d0 485d2: 6608 bnes 485dc <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 485d4: 7002 moveq #2,%d0 485d6: b0aa 0050 cmpl %a2@(80),%d0 485da: 6756 beqs 48632 <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 485dc: b5f9 0005 fe82 cmpal 5fe82 <_Thread_Allocated_fp>,%a2 485e2: 6746 beqs 4862a <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 485e4: 202a 00c4 movel %a2@(196),%d0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 485e8: 42aa 0100 clrl %a2@(256) if ( the_thread->Start.fp_context ) 485ec: 4a80 tstl %d0 485ee: 670a beqs 485fa <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 485f0: 2f00 movel %d0,%sp@- 485f2: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 485f8: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 485fa: 2f0a movel %a2,%sp@- 485fc: 4eb9 0004 9364 jsr 49364 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 48602: 202a 0114 movel %a2@(276),%d0 48606: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 48608: 42aa 00c8 clrl %a2@(200) if ( the_thread->extensions ) 4860c: 4a80 tstl %d0 4860e: 670a beqs 4861a <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 48610: 2f00 movel %d0,%sp@- 48612: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48618: 588f addql #4,%sp the_thread->extensions = NULL; 4861a: 42aa 0114 clrl %a2@(276) } 4861e: 246e fff8 moveal %fp@(-8),%a2 48622: 266e fffc moveal %fp@(-4),%a3 48626: 4e5e unlk %fp 48628: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 4862a: 42b9 0005 fe82 clrl 5fe82 <_Thread_Allocated_fp> 48630: 60b2 bras 485e4 <_Thread_Close+0x78> */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 48632: 486a 0048 pea %a2@(72) 48636: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4863c: 588f addql #4,%sp /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 4863e: b5f9 0005 fe82 cmpal 5fe82 <_Thread_Allocated_fp>,%a2 48644: 669e bnes 485e4 <_Thread_Close+0x78> <== ALWAYS TAKEN 48646: 60e2 bras 4862a <_Thread_Close+0xbe> <== NOT EXECUTED =============================================================================== 000486f8 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 486f8: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 486fc: 486e fffc pea %fp@(-4) 48700: 2f2e 0008 movel %fp@(8),%sp@- 48704: 4eb9 0004 88b4 jsr 488b4 <_Thread_Get> switch ( location ) { 4870a: 508f addql #8,%sp 4870c: 4aae fffc tstl %fp@(-4) 48710: 661e bnes 48730 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 48712: 2f3c 1000 0018 movel #268435480,%sp@- 48718: 2f00 movel %d0,%sp@- 4871a: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state> 48720: 508f addql #8,%sp 48722: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 48728: 5380 subql #1,%d0 4872a: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 48730: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048734 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 48734: 4e56 ffc8 linkw %fp,#-56 48738: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 4873c: 2e3c 0000 0700 movel #1792,%d7 48742: 2007 movel %d7,%d0 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 48744: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2 _ISR_Disable( level ); 4874a: 40c1 movew %sr,%d1 4874c: 8081 orl %d1,%d0 4874e: 46c0 movew %d0,%sr while ( _Context_Switch_necessary == true ) { 48750: 1039 0005 fec6 moveb 5fec6 <_Context_Switch_necessary>,%d0 48756: 6700 00fa beqw 48852 <_Thread_Dispatch+0x11e> 4875a: 260e movel %fp,%d3 4875c: 240e movel %fp,%d2 4875e: 5183 subql #8,%d3 48760: 2c3c 0004 cb48 movel #314184,%d6 48766: 0682 ffff fff0 addil #-16,%d2 4876c: 2a3c 0004 966c movel #300652,%d5 48772: 283c 0004 9624 movel #300580,%d4 48778: 4bf9 0004 992c lea 4992c <_User_extensions_Thread_switch>,%a5 4877e: 49f9 0004 9ca0 lea 49ca0 <_CPU_Context_switch>,%a4 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 48784: 7001 moveq #1,%d0 48786: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 4878c: 2679 0005 fe8a moveal 5fe8a <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 48792: 4200 clrb %d0 _Thread_Executing = heir; 48794: 23cb 0005 feb6 movel %a3,5feb6 <_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; 4879a: 13c0 0005 fec6 moveb %d0,5fec6 <_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 ) 487a0: 7001 moveq #1,%d0 487a2: b0ab 007a cmpl %a3@(122),%d0 487a6: 6700 00d6 beqw 4887e <_Thread_Dispatch+0x14a> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 487aa: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 487ac: 2f03 movel %d3,%sp@- 487ae: 2046 moveal %d6,%a0 487b0: 4e90 jsr %a0@ _Timestamp_Subtract( 487b2: 2045 moveal %d5,%a0 487b4: 2f02 movel %d2,%sp@- 487b6: 2f03 movel %d3,%sp@- 487b8: 4879 0005 febe pea 5febe <_Thread_Time_of_last_context_switch> 487be: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 487c0: 2044 moveal %d4,%a0 487c2: 2f02 movel %d2,%sp@- 487c4: 486a 0082 pea %a2@(130) 487c8: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 487ca: 2079 0005 fe86 moveal 5fe86 <_Thread_libc_reent>,%a0 487d0: 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; 487d4: 202e fff8 movel %fp@(-8),%d0 487d8: 222e fffc movel %fp@(-4),%d1 487dc: 23c0 0005 febe movel %d0,5febe <_Thread_Time_of_last_context_switch> 487e2: 23c1 0005 fec2 movel %d1,5fec2 <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 487e8: 4a88 tstl %a0 487ea: 6708 beqs 487f4 <_Thread_Dispatch+0xc0> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 487ec: 2550 0104 movel %a0@,%a2@(260) *_Thread_libc_reent = heir->libc_reent; 487f0: 20ab 0104 movel %a3@(260),%a0@ } _User_extensions_Thread_switch( executing, heir ); 487f4: 2f0b movel %a3,%sp@- 487f6: 2f0a movel %a2,%sp@- 487f8: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 487fa: 486b 00cc pea %a3@(204) 487fe: 486a 00cc pea %a2@(204) 48802: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 48804: 4fef 0010 lea %sp@(16),%sp 48808: 4aaa 0100 tstl %a2@(256) 4880c: 672c beqs 4883a <_Thread_Dispatch+0x106> #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 ); 4880e: 2079 0005 fe82 moveal 5fe82 <_Thread_Allocated_fp>,%a0 48814: b1ca cmpal %a2,%a0 48816: 6722 beqs 4883a <_Thread_Dispatch+0x106> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 48818: 4a88 tstl %a0 4881a: 670c beqs 48828 <_Thread_Dispatch+0xf4> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4881c: 4868 0100 pea %a0@(256) 48820: 4eb9 0004 9dd6 jsr 49dd6 <_CPU_Context_save_fp> 48826: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 48828: 486a 0100 pea %a2@(256) 4882c: 4eb9 0004 9e0e jsr 49e0e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 48832: 588f addql #4,%sp 48834: 23ca 0005 fe82 movel %a2,5fe82 <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 4883a: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2 _ISR_Disable( level ); 48840: 2007 movel %d7,%d0 48842: 40c1 movew %sr,%d1 48844: 8081 orl %d1,%d0 48846: 46c0 movew %d0,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 48848: 1039 0005 fec6 moveb 5fec6 <_Context_Switch_necessary>,%d0 4884e: 6600 ff34 bnew 48784 <_Thread_Dispatch+0x50> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 48852: 42b9 0005 fdfc clrl 5fdfc <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 48858: 46c1 movew %d1,%sr if ( _Thread_Do_post_task_switch_extension || 4885a: 4ab9 0005 fe9e tstl 5fe9e <_Thread_Do_post_task_switch_extension> 48860: 6606 bnes 48868 <_Thread_Dispatch+0x134> <== NEVER TAKEN executing->do_post_task_switch_extension ) { 48862: 4a2a 0074 tstb %a2@(116) 48866: 670c beqs 48874 <_Thread_Dispatch+0x140> executing->do_post_task_switch_extension = false; 48868: 4201 clrb %d1 4886a: 1541 0074 moveb %d1,%a2@(116) _API_extensions_Run_postswitch(); 4886e: 4eb9 0004 6fcc jsr 46fcc <_API_extensions_Run_postswitch> } } 48874: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4887a: 4e5e unlk %fp 4887c: 4e75 rts #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 4887e: 41f9 0005 fdac lea 5fdac <_Thread_Ticks_per_timeslice>,%a0 48884: 2750 0076 movel %a0@,%a3@(118) 48888: 6000 ff20 braw 487aa <_Thread_Dispatch+0x76> =============================================================================== 0004888c <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { 4888c: 4e56 0000 linkw %fp,#0 if ( --_Thread_Dispatch_disable_level ) 48890: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 48896: 5380 subql #1,%d0 48898: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> 4889e: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 488a4: 6704 beqs 488aa <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 488a6: 4e5e unlk %fp 488a8: 4e75 rts 488aa: 4e5e unlk %fp (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 488ac: 4ef9 0004 8734 jmp 48734 <_Thread_Dispatch> ... =============================================================================== 0004efac <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4efac: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4efb0: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4efb6: 4aa8 0010 tstl %a0@(16) 4efba: 660e bnes 4efca <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN 4efbc: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0 4efc2: 6712 beqs 4efd6 <_Thread_Evaluate_mode+0x2a> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4efc4: 4a28 0075 tstb %a0@(117) 4efc8: 670c beqs 4efd6 <_Thread_Evaluate_mode+0x2a> <== NEVER TAKEN _Context_Switch_necessary = true; return true; } return false; } 4efca: 4e5e unlk %fp executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; 4efcc: 7001 moveq #1,%d0 4efce: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> return true; } return false; } 4efd4: 4e75 rts 4efd6: 4e5e unlk %fp executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 4efd8: 4200 clrb %d0 <== NOT EXECUTED } return false; } =============================================================================== 0004efdc <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4efdc: 4e56 0000 linkw %fp,#0 4efe0: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4efe2: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4efe8: 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; 4efea: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4efee: 40c0 movew %sr,%d0 4eff0: e189 lsll #8,%d1 4eff2: 0280 0000 f8ff andil #63743,%d0 4eff8: 8081 orl %d1,%d0 4effa: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4effc: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4effe: 1439 0005 f5b4 moveb 5f5b4 ,%d2 doneConstructors = 1; 4f004: 13c0 0005 f5b4 moveb %d0,5f5b4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4f00a: 4aaa 0100 tstl %a2@(256) 4f00e: 6720 beqs 4f030 <_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 ); 4f010: 2079 0005 fe82 moveal 5fe82 <_Thread_Allocated_fp>,%a0 4f016: b1ca cmpal %a2,%a0 4f018: 6716 beqs 4f030 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4f01a: 4a88 tstl %a0 4f01c: 670c beqs 4f02a <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4f01e: 4868 0100 pea %a0@(256) 4f022: 4eb9 0004 9dd6 jsr 49dd6 <_CPU_Context_save_fp> 4f028: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4f02a: 23ca 0005 fe82 movel %a2,5fe82 <_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 ); 4f030: 2f0a movel %a2,%sp@- 4f032: 4eb9 0004 9784 jsr 49784 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4f038: 4eb9 0004 888c jsr 4888c <_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) */ { 4f03e: 588f addql #4,%sp 4f040: 4a02 tstb %d2 4f042: 6746 beqs 4f08a <_Thread_Handler+0xae> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4f044: 4aaa 009e tstl %a2@(158) 4f048: 6718 beqs 4f062 <_Thread_Handler+0x86> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4f04a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f04c: 4eb9 0004 97c2 jsr 497c2 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4f052: 4878 0006 pea 6 <== NOT EXECUTED 4f056: 4878 0001 pea 1 <== NOT EXECUTED 4f05a: 42a7 clrl %sp@- <== NOT EXECUTED 4f05c: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4f062: 2f2a 00a6 movel %a2@(166),%sp@- 4f066: 206a 009a moveal %a2@(154),%a0 4f06a: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4f06c: 588f addql #4,%sp 4f06e: 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 ); 4f072: 2f0a movel %a2,%sp@- 4f074: 4eb9 0004 97c2 jsr 497c2 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4f07a: 4878 0006 pea 6 4f07e: 4878 0001 pea 1 4f082: 42a7 clrl %sp@- 4f084: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> * _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) */ { INIT_NAME (); 4f08a: 4eb9 0005 ca0c jsr 5ca0c <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4f090: 4aaa 009e tstl %a2@(158) 4f094: 66b4 bnes 4f04a <_Thread_Handler+0x6e> <== NEVER TAKEN 4f096: 60ca bras 4f062 <_Thread_Handler+0x86> =============================================================================== 00048b20 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 48b20: 4e56 0000 linkw %fp,#0 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 48b24: 4ab9 0005 e6c8 tstl 5e6c8 48b2a: 57c0 seq %d0 48b2c: 4ab9 0005 e6c4 tstl 5e6c4 48b32: 57c1 seq %d1 48b34: 4480 negl %d0 48b36: 4481 negl %d1 48b38: b380 eorl %d1,%d0 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 48b3a: 2239 0005 e6b4 movel 5e6b4 ,%d1 maximum_extensions = Configuration.maximum_extensions; 48b40: 2079 0005 e6ac moveal 5e6ac ,%a0 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 48b46: 2f02 movel %d2,%sp@- #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 48b48: 4a00 tstb %d0 48b4a: 6600 00a2 bnew 48bee <_Thread_Handler_initialization+0xce> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48b4e: 4280 clrl %d0 48b50: 1039 0005 e6a2 moveb 5e6a2 ,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48b56: 4282 clrl %d2 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48b58: 5280 addql #1,%d0 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 48b5a: 23c1 0005 fdac movel %d1,5fdac <_Thread_Ticks_per_timeslice> _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48b60: 2200 movel %d0,%d1 48b62: e588 lsll #2,%d0 48b64: e989 lsll #4,%d1 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 48b66: 23c8 0005 fe9a movel %a0,5fe9a <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48b6c: 9280 subl %d0,%d1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 48b6e: 4200 clrb %d0 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48b70: 2f01 movel %d1,%sp@- INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 48b72: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> _Thread_Executing = NULL; 48b78: 42b9 0005 feb6 clrl 5feb6 <_Thread_Executing> _Thread_Heir = NULL; 48b7e: 42b9 0005 fe8a clrl 5fe8a <_Thread_Heir> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 48b84: 42b9 0005 fe82 clrl 5fe82 <_Thread_Allocated_fp> #endif _Thread_Do_post_task_switch_extension = 0; 48b8a: 42b9 0005 fe9e clrl 5fe9e <_Thread_Do_post_task_switch_extension> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48b90: 4eb9 0004 9bd0 jsr 49bd0 <_Workspace_Allocate_or_fatal_error> (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48b96: 588f addql #4,%sp 48b98: 1439 0005 e6a2 moveb 5e6a2 ,%d2 48b9e: 2040 moveal %d0,%a0 48ba0: 4281 clrl %d1 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48ba2: 23c0 0005 fda8 movel %d0,5fda8 <_Thread_Ready_chain> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48ba8: 2008 movel %a0,%d0 48baa: 5880 addql #4,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48bac: 5281 addql #1,%d1 48bae: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 48bb0: 42a8 0004 clrl %a0@(4) the_chain->last = _Chain_Head(the_chain); 48bb4: 2148 0008 movel %a0,%a0@(8) 48bb8: 41e8 000c lea %a0@(12),%a0 48bbc: b481 cmpl %d1,%d2 48bbe: 64e8 bccs 48ba8 <_Thread_Handler_initialization+0x88> /* * Initialize this class of objects. */ _Objects_Initialize_information( 48bc0: 4878 0008 pea 8 48bc4: 42a7 clrl %sp@- 48bc6: 4878 011c pea 11c 48bca: 4878 0001 pea 1 48bce: 4878 0001 pea 1 48bd2: 4878 0001 pea 1 48bd6: 4879 0005 ff46 pea 5ff46 <_Thread_Internal_information> 48bdc: 4eb9 0004 8014 jsr 48014 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 48be2: 242e fffc movel %fp@(-4),%d2 /* * Initialize this class of objects. */ _Objects_Initialize_information( 48be6: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 48bea: 4e5e unlk %fp 48bec: 4e75 rts * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 48bee: 4878 000f pea f 48bf2: 4878 0001 pea 1 48bf6: 42a7 clrl %sp@- 48bf8: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> ... =============================================================================== 00048950 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 48950: 4e56 ffec linkw %fp,#-20 48954: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48958: 242e 0014 movel %fp@(20),%d2 /* * 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 ); 4895c: 2f02 movel %d2,%sp@- Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 4895e: 246e 000c moveal %fp@(12),%a2 48962: 282e 0018 movel %fp@(24),%d4 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 48966: 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 ) { 4896a: 262e 001c movel %fp@(28),%d3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 4896e: 42aa 010c clrl %a2@(268) 48972: 42aa 0110 clrl %a2@(272) extensions_area = NULL; the_thread->libc_reent = NULL; 48976: 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 ); 4897a: 2f0a movel %a2,%sp@- Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 4897c: 1a2e 0023 moveb %fp@(35),%d5 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 48980: 4eb9 0004 9300 jsr 49300 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 48986: 508f addql #8,%sp 48988: 4a80 tstl %d0 4898a: 6700 011e beqw 48aaa <_Thread_Initialize+0x15a> 4898e: b082 cmpl %d2,%d0 48990: 6500 0118 bcsw 48aaa <_Thread_Initialize+0x15a> void *starting_address, size_t size ) { the_stack->area = starting_address; the_stack->size = size; 48994: 2540 00bc movel %d0,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 48998: 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 ) { 4899e: 4a04 tstb %d4 489a0: 6600 0120 bnew 48ac2 <_Thread_Initialize+0x172> 489a4: 4280 clrl %d0 489a6: 4284 clrl %d4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 489a8: 2239 0005 fe9a movel 5fe9a <_Thread_Maximum_extensions>,%d1 if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 489ae: 2540 00c4 movel %d0,%a2@(196) 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; 489b2: 2540 0100 movel %d0,%a2@(256) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 489b6: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 489ba: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 489be: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 489c2: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 489c6: 4a81 tstl %d1 489c8: 6600 011a bnew 48ae4 <_Thread_Initialize+0x194> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 489cc: 42aa 0114 clrl %a2@(276) 489d0: 4282 clrl %d2 #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 ); 489d2: 2f03 movel %d3,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 489d4: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 489da: 7001 moveq #1,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 489dc: 256e 0024 00ac movel %fp@(36),%a2@(172) the_thread->Start.budget_callout = budget_callout; 489e2: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 489e8: 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 ); 489ec: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 489ee: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 489f2: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 489f6: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 489fa: 2543 0018 movel %d3,%a2@(24) the_thread->Start.initial_priority = priority; 489fe: 2543 00b8 movel %d3,%a2@(184) _Thread_Set_priority( the_thread, priority ); 48a02: 4eb9 0004 90f8 jsr 490f8 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48a08: 206e 0008 moveal %fp@(8),%a0 48a0c: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 48a0e: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48a14: 2068 0018 moveal %a0@(24),%a0 48a18: 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 ); 48a1c: 42aa 0082 clrl %a2@(130) 48a20: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 48a24: 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 ); 48a28: 2f0a movel %a2,%sp@- 48a2a: 4eb9 0004 9854 jsr 49854 <_User_extensions_Thread_create> if ( extension_status ) 48a30: 4fef 000c lea %sp@(12),%sp 48a34: 4a00 tstb %d0 48a36: 667e bnes 48ab6 <_Thread_Initialize+0x166> return true; failed: if ( the_thread->libc_reent ) 48a38: 202a 0104 movel %a2@(260),%d0 48a3c: 670a beqs 48a48 <_Thread_Initialize+0xf8> _Workspace_Free( the_thread->libc_reent ); 48a3e: 2f00 movel %d0,%sp@- 48a40: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48a46: 588f addql #4,%sp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 48a48: 202a 0108 movel %a2@(264),%d0 48a4c: 670a beqs 48a58 <_Thread_Initialize+0x108> _Workspace_Free( the_thread->API_Extensions[i] ); 48a4e: 2f00 movel %d0,%sp@- 48a50: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48a56: 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] ) 48a58: 202a 010c movel %a2@(268),%d0 48a5c: 670a beqs 48a68 <_Thread_Initialize+0x118> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 48a5e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48a60: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> <== NOT EXECUTED 48a66: 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] ) 48a68: 202a 0110 movel %a2@(272),%d0 48a6c: 670a beqs 48a78 <_Thread_Initialize+0x128> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 48a6e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48a70: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> <== NOT EXECUTED 48a76: 588f addql #4,%sp <== NOT EXECUTED if ( extensions_area ) 48a78: 4a82 tstl %d2 48a7a: 670a beqs 48a86 <_Thread_Initialize+0x136> (void) _Workspace_Free( extensions_area ); 48a7c: 2f02 movel %d2,%sp@- 48a7e: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48a84: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 48a86: 4a84 tstl %d4 48a88: 670a beqs 48a94 <_Thread_Initialize+0x144> (void) _Workspace_Free( fp_area ); 48a8a: 2f04 movel %d4,%sp@- 48a8c: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48a92: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 48a94: 2f0a movel %a2,%sp@- 48a96: 4eb9 0004 9364 jsr 49364 <_Thread_Stack_Free> return false; 48a9c: 588f addql #4,%sp } 48a9e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 48aa4: 4200 clrb %d0 return false; } 48aa6: 4e5e unlk %fp 48aa8: 4e75 rts 48aaa: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 48ab0: 4200 clrb %d0 } 48ab2: 4e5e unlk %fp 48ab4: 4e75 rts 48ab6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 * 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 ); if ( extension_status ) 48abc: 7001 moveq #1,%d0 _Thread_Stack_Free( the_thread ); return false; } 48abe: 4e5e unlk %fp 48ac0: 4e75 rts /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 48ac2: 4878 001c pea 1c 48ac6: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate> if ( !fp_area ) 48acc: 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 ); 48ace: 2800 movel %d0,%d4 if ( !fp_area ) 48ad0: 6600 fed6 bnew 489a8 <_Thread_Initialize+0x58> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 48ad4: 202a 0104 movel %a2@(260),%d0 * 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 ); if ( !fp_area ) 48ad8: 4282 clrl %d2 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 48ada: 4a80 tstl %d0 48adc: 6600 ff60 bnew 48a3e <_Thread_Initialize+0xee> 48ae0: 6000 ff66 braw 48a48 <_Thread_Initialize+0xf8> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 48ae4: e589 lsll #2,%d1 48ae6: 2041 moveal %d1,%a0 48ae8: 4868 0004 pea %a0@(4) 48aec: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 48af2: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 48af4: 2400 movel %d0,%d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 48af6: 6700 ff40 beqw 48a38 <_Thread_Initialize+0xe8> goto failed; } the_thread->extensions = (void **) extensions_area; 48afa: 2040 moveal %d0,%a0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 48afc: 4281 clrl %d1 48afe: 4280 clrl %d0 48b00: 2279 0005 fe9a moveal 5fe9a <_Thread_Maximum_extensions>,%a1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 48b06: 2542 0114 movel %d2,%a2@(276) * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 48b0a: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 48b0e: 5280 addql #1,%d0 48b10: 2200 movel %d0,%d1 48b12: b089 cmpl %a1,%d0 48b14: 6200 febc bhiw 489d2 <_Thread_Initialize+0x82> 48b18: 206a 0114 moveal %a2@(276),%a0 48b1c: 60ec bras 48b0a <_Thread_Initialize+0x1ba> ... =============================================================================== 0004dfac <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4dfac: 4e56 0000 linkw %fp,#0 4dfb0: 2f0a movel %a2,%sp@- 4dfb2: 246e 0008 moveal %fp@(8),%a2 the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; 4dfb6: 256e 0010 00a6 movel %fp@(16),%a2@(166) the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4dfbc: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4dfc2: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4dfc8: 256e 000c 00a2 movel %fp@(12),%a2@(162) { the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 4dfce: 156a 00aa 0075 moveb %a2@(170),%a2@(117) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4dfd4: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4dfd8: 2f0a movel %a2,%sp@- 4dfda: 4eb9 0004 9b88 jsr 49b88 <_Thread_queue_Extract_with_proxy> 4dfe0: 588f addql #4,%sp 4dfe2: 4a00 tstb %d0 4dfe4: 6608 bnes 4dfee <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4dfe6: 7002 moveq #2,%d0 4dfe8: b0aa 0050 cmpl %a2@(80),%d0 4dfec: 672a beqs 4e018 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4dfee: 202a 00b8 movel %a2@(184),%d0 4dff2: b0aa 0014 cmpl %a2@(20),%d0 4dff6: 6718 beqs 4e010 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4dff8: 2d4a 0008 movel %a2,%fp@(8) 4dffc: 2d40 000c movel %d0,%fp@(12) if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; 4e000: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 4e004: 246e fffc moveal %fp@(-4),%a2 4e008: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4e00a: 4ef9 0004 9d98 jmp 49d98 <_Thread_Set_priority> } } 4e010: 246e fffc moveal %fp@(-4),%a2 4e014: 4e5e unlk %fp 4e016: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4e018: 486a 0048 pea %a2@(72) 4e01c: 4eb9 0004 a798 jsr 4a798 <_Watchdog_Remove> 4e022: 588f addql #4,%sp 4e024: 60c8 bras 4dfee <_Thread_Reset+0x42> ... =============================================================================== 0004d2c8 <_Thread_Reset_timeslice>: Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4d2c8: 223c 0000 0700 movel #1792,%d1 4d2ce: 2001 movel %d1,%d0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4d2d0: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4d2d4: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4d2da: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4d2de: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4d2e2: 40c2 movew %sr,%d2 4d2e4: 8082 orl %d2,%d0 4d2e6: 46c0 movew %d0,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4d2e8: 2029 0008 movel %a1@(8),%d0 4d2ec: b091 cmpl %a1@,%d0 4d2ee: 6752 beqs 4d342 <_Thread_Reset_timeslice+0x7a> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4d2f0: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4d2f2: 2009 movel %a1,%d0 4d2f4: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4d2f6: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4d2fa: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4d2fc: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4d300: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4d302: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4d306: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4d30a: 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; 4d30e: 2488 movel %a0,%a2@ return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4d310: 46c2 movew %d2,%sr 4d312: 8282 orl %d2,%d1 4d314: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4d316: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0 4d31c: 6712 beqs 4d330 <_Thread_Reset_timeslice+0x68> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4d31e: 7001 moveq #1,%d0 <== NOT EXECUTED 4d320: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4d326: 46c2 movew %d2,%sr <== NOT EXECUTED } 4d328: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4d32c: 4e5e unlk %fp 4d32e: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4d330: 23d1 0005 fe8a movel %a1@,5fe8a <_Thread_Heir> _Context_Switch_necessary = true; 4d336: 7001 moveq #1,%d0 4d338: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> _ISR_Enable( level ); 4d33e: 46c2 movew %d2,%sr 4d340: 60e6 bras 4d328 <_Thread_Reset_timeslice+0x60> executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4d342: 46c2 movew %d2,%sr _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 4d344: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4d348: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049d0c <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 49d0c: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 49d0e: 4e56 0000 linkw %fp,#0 49d12: 2f0a movel %a2,%sp@- 49d14: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 49d18: c0aa 0010 andl %a2@(16),%d0 49d1c: 4a00 tstb %d0 49d1e: 670a beqs 49d2a <_Thread_Restart+0x1e> return true; } return false; } 49d20: 246e fffc moveal %fp@(-4),%a2 49d24: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 49d26: 4200 clrb %d0 return true; } return false; } 49d28: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 49d2a: 2f0a movel %a2,%sp@- 49d2c: 4eb9 0004 9f1c jsr 49f1c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 49d32: 2f2e 0010 movel %fp@(16),%sp@- 49d36: 2f2e 000c movel %fp@(12),%sp@- 49d3a: 2f0a movel %a2,%sp@- 49d3c: 4eb9 0004 dfac jsr 4dfac <_Thread_Reset> _Thread_Load_environment( the_thread ); 49d42: 2f0a movel %a2,%sp@- 49d44: 4eb9 0004 dc00 jsr 4dc00 <_Thread_Load_environment> _Thread_Ready( the_thread ); 49d4a: 2f0a movel %a2,%sp@- 49d4c: 4eb9 0004 deec jsr 4deec <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 49d52: 2f0a movel %a2,%sp@- 49d54: 4eb9 0004 a588 jsr 4a588 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 49d5a: 4fef 001c lea %sp@(28),%sp 49d5e: b5f9 0006 0e5e cmpal 60e5e <_Thread_Executing>,%a2 49d64: 670a beqs 49d70 <_Thread_Restart+0x64> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49d66: 7001 moveq #1,%d0 return true; } return false; } 49d68: 246e fffc moveal %fp@(-4),%a2 49d6c: 4e5e unlk %fp 49d6e: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 49d70: 4aaa 0100 tstl %a2@(256) 49d74: 6712 beqs 49d88 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 49d76: 486a 0100 pea %a2@(256) 49d7a: 4eb9 0004 aaf2 jsr 4aaf2 <_CPU_Context_restore_fp> 49d80: 2479 0006 0e5e moveal 60e5e <_Thread_Executing>,%a2 49d86: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49d88: 486a 00cc pea %a2@(204) 49d8c: 4eb9 0004 a99a jsr 4a99a <_CPU_Context_Restart_self> 49d92: 588f addql #4,%sp <== NOT EXECUTED 49d94: 7001 moveq #1,%d0 <== NOT EXECUTED 49d96: 60d0 bras 49d68 <_Thread_Restart+0x5c> <== NOT EXECUTED =============================================================================== 0004c79c <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c79c: 327c 0700 moveaw #1792,%a1 4c7a0: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c7a2: 4e56 ffec linkw %fp,#-20 4c7a6: 206e 0008 moveal %fp@(8),%a0 4c7aa: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c7ae: 40c1 movew %sr,%d1 4c7b0: 8081 orl %d1,%d0 4c7b2: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c7b4: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c7b8: 0800 0001 btst #1,%d0 4c7bc: 6774 beqs 4c832 <_Thread_Resume+0x96> <== NEVER TAKEN 4c7be: 74fd moveq #-3,%d2 4c7c0: c082 andl %d2,%d0 current_state = 4c7c2: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c7c6: 666a bnes 4c832 <_Thread_Resume+0x96> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4c7c8: 2868 008e moveal %a0@(142),%a4 4c7cc: 3028 0094 movew %a0@(148),%d0 4c7d0: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c7d2: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c7d6: 260a movel %a2,%d3 4c7d8: 5883 addql #4,%d3 4c7da: 8082 orl %d2,%d0 4c7dc: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c7de: 266a 0008 moveal %a2@(8),%a3 4c7e2: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c7e4: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c7e8: 3439 0006 3a04 movew 63a04 <_Priority_Major_bit_map>,%d2 4c7ee: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c7f2: 214b 0004 movel %a3,%a0@(4) 4c7f6: 8082 orl %d2,%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; 4c7f8: 2688 movel %a0,%a3@ 4c7fa: 33c0 0006 3a04 movew %d0,63a04 <_Priority_Major_bit_map> _ISR_Flash( level ); 4c800: 2009 movel %a1,%d0 4c802: 46c1 movew %d1,%sr 4c804: 8081 orl %d1,%d0 4c806: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c808: 2028 0014 movel %a0@(20),%d0 4c80c: 2279 0006 39e2 moveal 639e2 <_Thread_Heir>,%a1 4c812: b0a9 0014 cmpl %a1@(20),%d0 4c816: 641a bccs 4c832 <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c818: 23c8 0006 39e2 movel %a0,639e2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c81e: 2079 0006 3a0e moveal 63a0e <_Thread_Executing>,%a0 4c824: 4a28 0075 tstb %a0@(117) 4c828: 6712 beqs 4c83c <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c82a: 7001 moveq #1,%d0 4c82c: 13c0 0006 3a1e moveb %d0,63a1e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c832: 46c1 movew %d1,%sr } 4c834: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c838: 4e5e unlk %fp 4c83a: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c83c: 4a80 tstl %d0 4c83e: 66f2 bnes 4c832 <_Thread_Resume+0x96> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c840: 7001 moveq #1,%d0 4c842: 13c0 0006 3a1e moveb %d0,63a1e <_Context_Switch_necessary> <== NOT EXECUTED 4c848: 60e8 bras 4c832 <_Thread_Resume+0x96> <== NOT EXECUTED ... =============================================================================== 00049364 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 49364: 4e56 0000 linkw %fp,#0 49368: 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 ) 4936c: 2279 0005 e6c8 moveal 5e6c8 ,%a1 49372: 4a89 tstl %a1 49374: 670a beqs 49380 <_Thread_Stack_Free+0x1c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 49376: 2d68 00c0 0008 movel %a0@(192),%fp@(8) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 4937c: 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 ); 4937e: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); 49380: 2d68 00c0 0008 movel %a0@(192),%fp@(8) } 49386: 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 ); 49388: 4ef9 0004 9c20 jmp 49c20 <_Workspace_Free> ... =============================================================================== 00049438 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 49438: 203c 0000 0700 movel #1792,%d0 */ void _Thread_Suspend( Thread_Control *the_thread ) { 4943e: 4e56 fff4 linkw %fp,#-12 49442: 206e 0008 moveal %fp@(8),%a0 49446: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 4944a: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4944e: 40c1 movew %sr,%d1 49450: 8081 orl %d1,%d0 49452: 46c0 movew %d0,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 49454: 2028 0010 movel %a0@(16),%d0 49458: 6642 bnes 4949c <_Thread_Suspend+0x64> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 4945a: 7002 moveq #2,%d0 if ( _Chain_Has_only_one_node( ready ) ) { 4945c: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 49460: 2140 0010 movel %d0,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 49464: b491 cmpl %a1@,%d2 49466: 6700 0098 beqw 49500 <_Thread_Suspend+0xc8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4946a: 2250 moveal %a0@,%a1 previous = the_node->previous; 4946c: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 49470: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 49472: 234a 0004 movel %a2,%a1@(4) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 49476: 203c 0000 0700 movel #1792,%d0 4947c: 46c1 movew %d1,%sr 4947e: 8081 orl %d1,%d0 49480: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 49482: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0 49488: 6730 beqs 494ba <_Thread_Suspend+0x82> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 4948a: b1f9 0005 feb6 cmpal 5feb6 <_Thread_Executing>,%a0 49490: 671c beqs 494ae <_Thread_Suspend+0x76> <== NEVER TAKEN _Context_Switch_necessary = true; _ISR_Enable( level ); 49492: 46c1 movew %d1,%sr } 49494: 4cd7 040c moveml %sp@,%d2-%d3/%a2 49498: 4e5e unlk %fp 4949a: 4e75 rts _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 4949c: 7402 moveq #2,%d2 4949e: 8480 orl %d0,%d2 494a0: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 494a4: 46c1 movew %d1,%sr if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 494a6: 4cd7 040c moveml %sp@,%d2-%d3/%a2 494aa: 4e5e unlk %fp 494ac: 4e75 rts if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 494ae: 7401 moveq #1,%d2 494b0: 13c2 0005 fec6 moveb %d2,5fec6 <_Context_Switch_necessary> _ISR_Enable( level ); 494b6: 46c1 movew %d1,%sr 494b8: 60da bras 49494 <_Thread_Suspend+0x5c> 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 ); 494ba: 3039 0005 feac movew 5feac <_Priority_Major_bit_map>,%d0 494c0: 4840 swap %d0 494c2: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 494c4: 4282 clrl %d2 494c6: 43f9 0005 ff18 lea 5ff18 <_Priority_Bit_map>,%a1 494cc: 3400 movew %d0,%d2 494ce: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 494d2: 4840 swap %d0 494d4: 04c0 ff1 %d0 494d6: 4283 clrl %d3 494d8: e98a lsll #4,%d2 494da: 3600 movew %d0,%d3 494dc: 2279 0005 fda8 moveal 5fda8 <_Thread_Ready_chain>,%a1 494e2: 2002 movel %d2,%d0 494e4: d083 addl %d3,%d0 494e6: 2400 movel %d0,%d2 494e8: e58a lsll #2,%d2 494ea: e988 lsll #4,%d0 494ec: 93c2 subal %d2,%a1 494ee: d3c0 addal %d0,%a1 494f0: 23d1 0005 fe8a movel %a1@,5fe8a <_Thread_Heir> _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 494f6: b1f9 0005 feb6 cmpal 5feb6 <_Thread_Executing>,%a0 494fc: 6694 bnes 49492 <_Thread_Suspend+0x5a> <== NEVER TAKEN 494fe: 60ae bras 494ae <_Thread_Suspend+0x76> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49500: 2009 movel %a1,%d0 49502: 5880 addql #4,%d0 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 49504: 2468 008e moveal %a0@(142),%a2 49508: 2280 movel %d0,%a1@ 4950a: 3412 movew %a2@,%d2 4950c: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 49510: 2349 0008 movel %a1,%a1@(8) 49514: c082 andl %d2,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 49516: 42a9 0004 clrl %a1@(4) 4951a: 3480 movew %d0,%a2@ the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 4951c: 6600 ff58 bnew 49476 <_Thread_Suspend+0x3e> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 49520: 3439 0005 feac movew 5feac <_Priority_Major_bit_map>,%d2 49526: 3028 0096 movew %a0@(150),%d0 4952a: c082 andl %d2,%d0 4952c: 33c0 0005 feac movew %d0,5feac <_Priority_Major_bit_map> } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 49532: 203c 0000 0700 movel #1792,%d0 49538: 46c1 movew %d1,%sr 4953a: 8081 orl %d1,%d0 4953c: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 4953e: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0 49544: 6600 ff44 bnew 4948a <_Thread_Suspend+0x52> 49548: 6000 ff70 braw 494ba <_Thread_Suspend+0x82> =============================================================================== 00049598 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 49598: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4959c: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 495a2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 495a6: 243c 0000 0700 movel #1792,%d2 495ac: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 495ae: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 495b2: 40c1 movew %sr,%d1 495b4: 8081 orl %d1,%d0 495b6: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 495b8: 2029 0008 movel %a1@(8),%d0 495bc: b091 cmpl %a1@,%d0 495be: 6750 beqs 49610 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 495c0: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 495c2: 2009 movel %a1,%d0 495c4: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 495c6: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 495ca: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 495cc: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 495d0: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 495d2: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 495d6: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 495da: 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; 495de: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 495e0: 46c1 movew %d1,%sr 495e2: 8481 orl %d1,%d2 495e4: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 495e6: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0 495ec: 6712 beqs 49600 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 495ee: 7001 moveq #1,%d0 <== NOT EXECUTED 495f0: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 495f6: 46c1 movew %d1,%sr } 495f8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 495fc: 4e5e unlk %fp 495fe: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 49600: 23d1 0005 fe8a movel %a1@,5fe8a <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 49606: 7001 moveq #1,%d0 49608: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> 4960e: 60e6 bras 495f6 <_Thread_Yield_processor+0x5e> if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 49610: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0 49616: 67de beqs 495f6 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN _Context_Switch_necessary = true; 49618: 7001 moveq #1,%d0 <== NOT EXECUTED 4961a: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> <== NOT EXECUTED 49620: 60d4 bras 495f6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... =============================================================================== 00048304 <_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 ) ) { 48304: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 48306: 4e56 0000 linkw %fp,#0 4830a: 202e 0010 movel %fp@(16),%d0 4830e: 2f0a movel %a2,%sp@- 48310: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 48314: 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 ) ) { 48318: b2aa 0050 cmpl %a2@(80),%d1 4831c: 671c beqs 4833a <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4831e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 48320: 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 } 48324: 246e fffc moveal %fp@(-4),%a2 48328: 203c 1003 fff8 movel #268697592,%d0 4832e: 2d40 000c movel %d0,%fp@(12) 48332: 4e5e unlk %fp 48334: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4833a: 123c 0003 moveb #3,%d1 4833e: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 48342: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 48344: 486a 0048 pea %a2@(72) 48348: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4834e: 588f addql #4,%sp 48350: 203c 1003 fff8 movel #268697592,%d0 48356: 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 } 4835a: 246e fffc moveal %fp@(-4),%a2 4835e: 2d40 000c movel %d0,%fp@(12) 48362: 4e5e unlk %fp 48364: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state> ... =============================================================================== 00048dfc <_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 ) { 48dfc: 4e56 ffe4 linkw %fp,#-28 48e00: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 48e04: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48e08: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 48e0c: 263c 0000 0700 movel #1792,%d3 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 48e12: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 48e16: 2401 movel %d1,%d2 48e18: ec8a lsrl #6,%d2 48e1a: 2002 movel %d2,%d0 48e1c: e58a lsll #2,%d2 48e1e: e988 lsll #4,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 48e20: 286e 0008 moveal %fp@(8),%a4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 48e24: 9082 subl %d2,%d0 48e26: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 48e2a: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48e2e: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 48e32: 242c 0038 movel %a4@(56),%d2 48e36: 2748 0040 movel %a0,%a3@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48e3a: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 48e3e: 0801 0005 btst #5,%d1 48e42: 6656 bnes 48e9a <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 48e44: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 48e46: 2803 movel %d3,%d4 48e48: 5885 addql #4,%d5 48e4a: 2004 movel %d4,%d0 48e4c: 40c3 movew %sr,%d3 48e4e: 8083 orl %d3,%d0 48e50: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 48e52: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48e54: ba88 cmpl %a0,%d5 48e56: 6700 010a beqw 48f62 <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 48e5a: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 48e5e: b3c1 cmpal %d1,%a1 48e60: 6418 bccs 48e7a <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 48e62: 2004 movel %d4,%d0 48e64: 46c3 movew %d3,%sr 48e66: 8083 orl %d3,%d0 48e68: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48e6a: 2002 movel %d2,%d0 48e6c: c0a8 0010 andl %a0@(16),%d0 48e70: 6700 0092 beqw 48f04 <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 48e74: 2050 moveal %a0@,%a0 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 ) ) { 48e76: ba88 cmpl %a0,%d5 48e78: 66e0 bnes 48e5a <_Thread_queue_Enqueue_priority+0x5e> 48e7a: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48e7c: 7001 moveq #1,%d0 48e7e: b0ac 0030 cmpl %a4@(48),%d0 48e82: 6700 0094 beqw 48f18 <_Thread_queue_Enqueue_priority+0x11c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 48e86: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 48e8a: 202c 0030 movel %a4@(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; 48e8e: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48e90: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48e94: 4e5e unlk %fp 48e96: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48e98: 46c4 movew %d4,%sr the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48e9a: 4284 clrl %d4 48e9c: 1839 0005 e6a2 moveb 5e6a2 ,%d4 _ISR_Disable( level ); 48ea2: 2003 movel %d3,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48ea4: 2244 moveal %d4,%a1 48ea6: 5289 addql #1,%a1 _ISR_Disable( level ); 48ea8: 40c4 movew %sr,%d4 48eaa: 8084 orl %d4,%d0 48eac: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 48eae: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48eb2: b5c8 cmpal %a0,%a2 48eb4: 6720 beqs 48ed6 <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 48eb6: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 48eba: b3c1 cmpal %d1,%a1 48ebc: 6318 blss 48ed6 <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 48ebe: 2003 movel %d3,%d0 48ec0: 46c4 movew %d4,%sr 48ec2: 8084 orl %d4,%d0 48ec4: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48ec6: 2002 movel %d2,%d0 48ec8: c0a8 0010 andl %a0@(16),%d0 48ecc: 67ca beqs 48e98 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 48ece: 2068 0004 moveal %a0@(4),%a0 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 ) ) { 48ed2: b5c8 cmpal %a0,%a2 48ed4: 66e0 bnes 48eb6 <_Thread_queue_Enqueue_priority+0xba> 48ed6: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48ed8: 7001 moveq #1,%d0 48eda: b0ac 0030 cmpl %a4@(48),%d0 48ede: 66a6 bnes 48e86 <_Thread_queue_Enqueue_priority+0x8a><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48ee0: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 48ee4: b3c1 cmpal %d1,%a1 48ee6: 6756 beqs 48f3e <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48ee8: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 48eea: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 48eee: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48ef0: 274c 0044 movel %a4,%a3@(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; 48ef4: 208b movel %a3,%a0@ next_node->previous = the_node; 48ef6: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 48efa: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 48efc: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48f00: 4e5e unlk %fp 48f02: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48f04: 46c3 movew %d3,%sr <== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 48f06: 2004 movel %d4,%d0 <== NOT EXECUTED 48f08: 40c3 movew %sr,%d3 <== NOT EXECUTED 48f0a: 8083 orl %d3,%d0 <== NOT EXECUTED 48f0c: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 48f0e: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48f10: ba88 cmpl %a0,%d5 <== NOT EXECUTED 48f12: 6600 ff46 bnew 48e5a <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 48f16: 604a bras 48f62 <_Thread_queue_Enqueue_priority+0x166><== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48f18: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 48f1c: b3c1 cmpal %d1,%a1 48f1e: 671e beqs 48f3e <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 48f20: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 48f24: 2688 movel %a0,%a3@ the_node->previous = previous_node; 48f26: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48f2a: 274c 0044 movel %a4,%a3@(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; 48f2e: 228b movel %a3,%a1@ search_node->previous = the_node; 48f30: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 48f34: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 48f36: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48f3a: 4e5e unlk %fp 48f3c: 4e75 rts 48f3e: 41e8 003c lea %a0@(60),%a0 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 48f42: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 48f46: 2688 movel %a0,%a3@ the_node->previous = previous_node; 48f48: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48f4c: 274c 0044 movel %a4,%a3@(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; 48f50: 228b movel %a3,%a1@ search_node->previous = the_node; 48f52: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 48f56: 46c2 movew %d2,%sr 48f58: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 48f5a: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48f5e: 4e5e unlk %fp 48f60: 4e75 rts 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 ) ) { 48f62: 2403 movel %d3,%d2 48f64: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48f68: 7001 moveq #1,%d0 48f6a: b0ac 0030 cmpl %a4@(48),%d0 48f6e: 6600 ff16 bnew 48e86 <_Thread_queue_Enqueue_priority+0x8a> 48f72: 60a4 bras 48f18 <_Thread_queue_Enqueue_priority+0x11c> =============================================================================== 00048d60 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48d60: 4e56 fff0 linkw %fp,#-16 48d64: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48d68: 266e 0008 moveal %fp@(8),%a3 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 48d6c: 2f2b 0038 movel %a3@(56),%sp@- Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 48d70: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48d76: 242e 000c movel %fp@(12),%d2 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 48d7a: 2f0a movel %a2,%sp@- 48d7c: 4eb9 0004 9168 jsr 49168 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 48d82: 508f addql #8,%sp 48d84: 4a82 tstl %d2 48d86: 6644 bnes 48dcc <_Thread_queue_Enqueue_with_handler+0x6c> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 48d88: 41f9 0004 8dfc lea 48dfc <_Thread_queue_Enqueue_priority>,%a0 48d8e: 7001 moveq #1,%d0 48d90: b0ab 0034 cmpl %a3@(52),%d0 48d94: 6706 beqs 48d9c <_Thread_queue_Enqueue_with_handler+0x3c> 48d96: 41f9 0004 d03c lea 4d03c <_Thread_queue_Enqueue_fifo>,%a0 enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 48d9c: 486e fffc pea %fp@(-4) 48da0: 2f0a movel %a2,%sp@- 48da2: 2f0b movel %a3,%sp@- 48da4: 4e90 jsr %a0@ if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 48da6: 4fef 000c lea %sp@(12),%sp 48daa: 7201 moveq #1,%d1 48dac: b280 cmpl %d0,%d1 48dae: 6712 beqs 48dc2 <_Thread_queue_Enqueue_with_handler+0x62> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 48db0: 2f2e fffc movel %fp@(-4),%sp@- 48db4: 2f0a movel %a2,%sp@- 48db6: 2f00 movel %d0,%sp@- 48db8: 4eb9 0004 8304 jsr 48304 <_Thread_blocking_operation_Cancel> 48dbe: 4fef 000c lea %sp@(12),%sp } 48dc2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48dc8: 4e5e unlk %fp 48dca: 4e75 rts /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 48dcc: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 48dd0: 256e 0010 0064 movel %fp@(16),%a2@(100) the_watchdog->id = id; 48dd6: 2540 0068 movel %d0,%a2@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 48dda: 2542 0054 movel %d2,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 48dde: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 48de2: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 48de6: 486a 0048 pea %a2@(72) 48dea: 4879 0005 fed4 pea 5fed4 <_Watchdog_Ticks_chain> 48df0: 4eb9 0004 996c jsr 4996c <_Watchdog_Insert> 48df6: 508f addql #8,%sp 48df8: 608e bras 48d88 <_Thread_queue_Enqueue_with_handler+0x28> ... =============================================================================== 0004f098 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4f098: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4f09e: 4e56 0000 linkw %fp,#0 4f0a2: 2f0a movel %a2,%sp@- 4f0a4: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4f0a8: 40c1 movew %sr,%d1 4f0aa: 8081 orl %d1,%d0 4f0ac: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4f0ae: 202a 0010 movel %a2@(16),%d0 4f0b2: 0280 0003 bee0 andil #245472,%d0 4f0b8: 6734 beqs 4f0ee <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4f0ba: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4f0bc: 7002 moveq #2,%d0 previous = the_node->previous; 4f0be: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4f0c2: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4f0c6: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4f0c8: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4f0cc: b0aa 0050 cmpl %a2@(80),%d0 4f0d0: 6726 beqs 4f0f8 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4f0d2: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4f0d4: 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 } 4f0d8: 246e fffc moveal %fp@(-4),%a2 4f0dc: 203c 1003 fff8 movel #268697592,%d0 4f0e2: 2d40 000c movel %d0,%fp@(12) 4f0e6: 4e5e unlk %fp 4f0e8: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4f0ee: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4f0f0: 246e fffc moveal %fp@(-4),%a2 4f0f4: 4e5e unlk %fp 4f0f6: 4e75 rts 4f0f8: 7003 moveq #3,%d0 4f0fa: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4f0fe: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4f100: 486a 0048 pea %a2@(72) 4f104: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4f10a: 588f addql #4,%sp 4f10c: 203c 1003 fff8 movel #268697592,%d0 4f112: 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 } 4f116: 246e fffc moveal %fp@(-4),%a2 4f11a: 2d40 000c movel %d0,%fp@(12) 4f11e: 4e5e unlk %fp 4f120: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state> ... =============================================================================== 0004d0d0 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4d0d0: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4d0d6: 4e56 ffec linkw %fp,#-20 4d0da: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d0de: 246e 000c moveal %fp@(12),%a2 4d0e2: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4d0e6: 40c1 movew %sr,%d1 4d0e8: 8081 orl %d1,%d0 4d0ea: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4d0ec: 202a 0010 movel %a2@(16),%d0 4d0f0: 0280 0003 bee0 andil #245472,%d0 4d0f6: 677e beqs 4d176 <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d0f8: 200a movel %a2,%d0 4d0fa: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4d100: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4d102: 226a 0004 moveal %a2@(4),%a1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4d106: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d10a: b088 cmpl %a0,%d0 4d10c: 6774 beqs 4d182 <_Thread_queue_Extract_priority_helper+0xb2> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4d10e: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4d112: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4d114: 2748 0004 movel %a0,%a3@(4) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4d118: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4d11a: 2149 0004 movel %a1,%a0@(4) last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4d11e: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4d120: 202a 0040 movel %a2@(64),%d0 4d124: b0aa 0038 cmpl %a2@(56),%d0 4d128: 6716 beqs 4d140 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 4d12a: 43e8 0038 lea %a0@(56),%a1 4d12e: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4d132: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4d136: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4d13a: 41e8 003c lea %a0@(60),%a0 4d13e: 2888 movel %a0,%a4@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4d140: 4a02 tstb %d2 4d142: 6626 bnes 4d16a <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d144: 7002 moveq #2,%d0 4d146: b0aa 0050 cmpl %a2@(80),%d0 4d14a: 6742 beqs 4d18e <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4d14c: 46c1 movew %d1,%sr 4d14e: 2d4a 0008 movel %a2,%fp@(8) 4d152: 227c 1003 fff8 moveal #268697592,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d158: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d15e: 2d49 000c movel %a1,%fp@(12) 4d162: 4e5e unlk %fp 4d164: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4d16a: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d16c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d172: 4e5e unlk %fp 4d174: 4e75 rts Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4d176: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d178: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d17e: 4e5e unlk %fp 4d180: 4e75 rts new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4d182: 2749 0004 movel %a1,%a3@(4) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4d186: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4d188: 4a02 tstb %d2 4d18a: 67b8 beqs 4d144 <_Thread_queue_Extract_priority_helper+0x74> 4d18c: 60dc bras 4d16a <_Thread_queue_Extract_priority_helper+0x9a> 4d18e: 7003 moveq #3,%d0 4d190: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4d194: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4d196: 486a 0048 pea %a2@(72) 4d19a: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4d1a0: 588f addql #4,%sp 4d1a2: 227c 1003 fff8 moveal #268697592,%a1 4d1a8: 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 } 4d1ac: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d1b2: 2d49 000c movel %a1,%fp@(12) 4d1b6: 4e5e unlk %fp 4d1b8: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state> ... =============================================================================== 00048fdc <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 48fdc: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 48fde: 4e56 0000 linkw %fp,#0 48fe2: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 48fe6: 216e 0010 0038 movel %fp@(16),%a0@(56) Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 48fec: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 48ff0: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 48ff6: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48ffa: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 48ffe: b280 cmpl %d0,%d1 49000: 6712 beqs 49014 <_Thread_queue_Initialize+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49002: 2008 movel %a0,%d0 49004: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 49006: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4900a: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 4900c: 42a8 0004 clrl %a0@(4) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 49010: 4e5e unlk %fp 49012: 4e75 rts * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 49014: 2008 movel %a0,%d0 49016: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4901c: 2208 movel %a0,%d1 4901e: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 49020: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49024: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 49026: 2148 0008 movel %a0,%a0@(8) 4902a: 41e8 000c lea %a0@(12),%a0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 4902e: b088 cmpl %a0,%d0 49030: 67de beqs 49010 <_Thread_queue_Initialize+0x34> <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49032: 2208 movel %a0,%d1 49034: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 49036: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4903a: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4903c: 2148 0008 movel %a0,%a0@(8) 49040: 41e8 000c lea %a0@(12),%a0 49044: b088 cmpl %a0,%d0 49046: 66d4 bnes 4901c <_Thread_queue_Initialize+0x40> 49048: 60c6 bras 49010 <_Thread_queue_Initialize+0x34> ... =============================================================================== 0004d1c0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4d1c0: 4e56 0000 linkw %fp,#0 4d1c4: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4d1c8: 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 && 4d1cc: 2029 0030 movel %a1@(48),%d0 4d1d0: 6708 beqs 4d1da <_Thread_queue_Process_timeout+0x1a> 4d1d2: b1f9 0005 feb6 cmpal 5feb6 <_Thread_Executing>,%a0 4d1d8: 6718 beqs 4d1f2 <_Thread_queue_Process_timeout+0x32><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4d1da: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4d1e0: 2f08 movel %a0,%sp@- 4d1e2: 2f28 0044 movel %a0@(68),%sp@- 4d1e6: 4eb9 0004 d098 jsr 4d098 <_Thread_queue_Extract> 4d1ec: 508f addql #8,%sp } } 4d1ee: 4e5e unlk %fp 4d1f0: 4e75 rts * a timeout is not allowed to occur. */ 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 ) { 4d1f2: 7203 moveq #3,%d1 4d1f4: b280 cmpl %d0,%d1 4d1f6: 67f6 beqs 4d1ee <_Thread_queue_Process_timeout+0x2e> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4d1f8: 7002 moveq #2,%d0 } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 4d1fa: 4e5e unlk %fp */ 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; 4d1fc: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4d202: 2340 0030 movel %d0,%a1@(48) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } =============================================================================== 0004904c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4904c: 4e56 fff0 linkw %fp,#-16 49050: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49054: 246e 0008 moveal %fp@(8),%a2 49058: 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 ) 4905c: 4a8a tstl %a2 4905e: 6708 beqs 49068 <_Thread_queue_Requeue+0x1c> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 49060: 7001 moveq #1,%d0 49062: b0aa 0034 cmpl %a2@(52),%d0 49066: 670a beqs 49072 <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 49068: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4906e: 4e5e unlk %fp <== NOT EXECUTED 49070: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 49072: 303c 0700 movew #1792,%d0 49076: 40c2 movew %sr,%d2 49078: 8082 orl %d2,%d0 4907a: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4907c: 202b 0010 movel %a3@(16),%d0 49080: 0280 0003 bee0 andil #245472,%d0 49086: 660c bnes 49094 <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 49088: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4908a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49090: 4e5e unlk %fp 49092: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 49094: 4878 0001 pea 1 49098: 7001 moveq #1,%d0 4909a: 2f0b movel %a3,%sp@- 4909c: 2540 0030 movel %d0,%a2@(48) 490a0: 2f0a movel %a2,%sp@- 490a2: 4eb9 0004 d0d0 jsr 4d0d0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 490a8: 486e fffc pea %fp@(-4) 490ac: 2f0b movel %a3,%sp@- 490ae: 2f0a movel %a2,%sp@- 490b0: 4eb9 0004 8dfc jsr 48dfc <_Thread_queue_Enqueue_priority> 490b6: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 490ba: 46c2 movew %d2,%sr 490bc: 60cc bras 4908a <_Thread_queue_Requeue+0x3e> ... =============================================================================== 000490c0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 490c0: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 490c4: 486e fffc pea %fp@(-4) 490c8: 2f2e 0008 movel %fp@(8),%sp@- 490cc: 4eb9 0004 88b4 jsr 488b4 <_Thread_Get> switch ( location ) { 490d2: 508f addql #8,%sp 490d4: 4aae fffc tstl %fp@(-4) 490d8: 6618 bnes 490f2 <_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 ); 490da: 2f00 movel %d0,%sp@- 490dc: 4eb9 0004 d1c0 jsr 4d1c0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 490e2: 588f addql #4,%sp 490e4: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 490ea: 5380 subql #1,%d0 490ec: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 490f2: 4e5e unlk %fp ... =============================================================================== 00059e24 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 59e24: 4e56 ffb0 linkw %fp,#-80 59e28: 41ee ffec lea %fp@(-20),%a0 59e2c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59e30: 246e 0008 moveal %fp@(8),%a2 59e34: 2c0e movel %fp,%d6 59e36: 260e movel %fp,%d3 59e38: 5186 subql #8,%d6 59e3a: 0683 ffff ffe8 addil #-24,%d3 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59e40: 240a movel %a2,%d2 /* * 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 ); 59e42: 2a0a movel %a2,%d5 59e44: 4bf9 0005 df68 lea 5df68 <_Watchdog_Adjust_to_chain>,%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59e4a: 0682 0000 0030 addil #48,%d2 /* * 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 ); 59e50: 0685 0000 0068 addil #104,%d5 59e56: 47f9 0005 a8ac lea 5a8ac <_Chain_Get>,%a3 59e5c: 49f9 0005 dff8 lea 5dff8 <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 59e62: 283c 0000 0700 movel #1792,%d4 59e68: 2d48 ffd8 movel %a0,%fp@(-40) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 59e6c: 41ea 0008 lea %a2@(8),%a0 59e70: 2d48 ffe0 movel %a0,%fp@(-32) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 59e74: 41ea 0040 lea %a2@(64),%a0 59e78: 2d48 ffe4 movel %a0,%fp@(-28) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 59e7c: 41ee fff4 lea %fp@(-12),%a0 59e80: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 59e84: 41ee ffec lea %fp@(-20),%a0 59e88: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 59e8c: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 59e90: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 59e94: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 59e98: 2d43 fff0 movel %d3,%fp@(-16) { /* * 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; 59e9c: 41ee fff4 lea %fp@(-12),%a0 59ea0: 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; 59ea4: 2039 0007 f678 movel 7f678 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 59eaa: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 59eae: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59eb2: 9081 subl %d1,%d0 59eb4: 2f03 movel %d3,%sp@- 59eb6: 2f00 movel %d0,%sp@- 59eb8: 2f02 movel %d2,%sp@- 59eba: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59ebc: 2039 0007 f5ca movel 7f5ca <_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 ) { 59ec2: 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; 59ec6: 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 ) { 59eca: b280 cmpl %d0,%d1 59ecc: 6500 0086 bcsw 59f54 <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 59ed0: b280 cmpl %d0,%d1 59ed2: 6200 00a4 bhiw 59f78 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 59ed6: 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 ); 59eda: 202a 0078 movel %a2@(120),%d0 59ede: 2f00 movel %d0,%sp@- 59ee0: 4e93 jsr %a3@ if ( timer == NULL ) { 59ee2: 588f addql #4,%sp 59ee4: 4a80 tstl %d0 59ee6: 672e beqs 59f16 <_Timer_server_Body+0xf2> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 59ee8: 2040 moveal %d0,%a0 <== NOT EXECUTED 59eea: 7e01 moveq #1,%d7 <== NOT EXECUTED 59eec: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59ef0: be81 cmpl %d1,%d7 <== NOT EXECUTED 59ef2: 6700 00a8 beqw 59f9c <_Timer_server_Body+0x178> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 59ef6: 7e03 moveq #3,%d7 <== NOT EXECUTED 59ef8: be81 cmpl %d1,%d7 <== NOT EXECUTED 59efa: 66de bnes 59eda <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59efc: 2040 moveal %d0,%a0 <== NOT EXECUTED 59efe: 4868 0010 pea %a0@(16) <== NOT EXECUTED 59f02: 2f05 movel %d5,%sp@- <== NOT EXECUTED 59f04: 4e94 jsr %a4@ <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 59f06: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59f0a: 508f addql #8,%sp <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 59f0c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59f0e: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 59f10: 588f addql #4,%sp <== NOT EXECUTED 59f12: 4a80 tstl %d0 <== NOT EXECUTED 59f14: 66d2 bnes 59ee8 <_Timer_server_Body+0xc4> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 59f16: 2004 movel %d4,%d0 59f18: 40c1 movew %sr,%d1 59f1a: 8081 orl %d1,%d0 59f1c: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 59f1e: bcae fff4 cmpl %fp@(-12),%d6 59f22: 6700 0086 beqw 59faa <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 59f26: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 59f28: 2039 0007 f678 movel 7f678 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 59f2e: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 59f32: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59f36: 9081 subl %d1,%d0 <== NOT EXECUTED 59f38: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59f3a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59f3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59f3e: 4e95 jsr %a5@ <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59f40: 2039 0007 f5ca movel 7f5ca <_TOD_Now>,%d0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 59f46: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 59f4a: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 59f4e: b280 cmpl %d0,%d1 <== NOT EXECUTED 59f50: 6400 ff7e bccw 59ed0 <_Timer_server_Body+0xac> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59f54: 2f03 movel %d3,%sp@- 59f56: 2e00 movel %d0,%d7 59f58: 9e81 subl %d1,%d7 59f5a: 2f07 movel %d7,%sp@- 59f5c: 2d40 ffdc movel %d0,%fp@(-36) 59f60: 2f05 movel %d5,%sp@- 59f62: 4eb9 0005 df68 jsr 5df68 <_Watchdog_Adjust_to_chain> 59f68: 202e ffdc movel %fp@(-36),%d0 59f6c: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 59f70: 2540 0074 movel %d0,%a2@(116) 59f74: 6000 ff64 braw 59eda <_Timer_server_Body+0xb6> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 59f78: 9280 subl %d0,%d1 59f7a: 2f01 movel %d1,%sp@- 59f7c: 4878 0001 pea 1 59f80: 2d40 ffdc movel %d0,%fp@(-36) 59f84: 2f05 movel %d5,%sp@- 59f86: 4eb9 0005 ded4 jsr 5ded4 <_Watchdog_Adjust> 59f8c: 202e ffdc movel %fp@(-36),%d0 59f90: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 59f94: 2540 0074 movel %d0,%a2@(116) 59f98: 6000 ff40 braw 59eda <_Timer_server_Body+0xb6> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59f9c: 4868 0010 pea %a0@(16) <== NOT EXECUTED 59fa0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59fa2: 4e94 jsr %a4@ <== NOT EXECUTED 59fa4: 508f addql #8,%sp <== NOT EXECUTED 59fa6: 6000 ff32 braw 59eda <_Timer_server_Body+0xb6> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 59faa: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 59fae: 46c1 movew %d1,%sr _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 59fb0: 202e ffd8 movel %fp@(-40),%d0 59fb4: b0ae ffe8 cmpl %fp@(-24),%d0 59fb8: 6752 beqs 5a00c <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 59fba: 2204 movel %d4,%d1 59fbc: 40c0 movew %sr,%d0 59fbe: 8280 orl %d0,%d1 59fc0: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59fc2: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 59fc6: b1ee ffd8 cmpal %fp@(-40),%a0 59fca: 6732 beqs 59ffe <_Timer_server_Body+0x1da> <== NEVER TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 59fcc: 2250 moveal %a0@,%a1 the_chain->first = new_first; 59fce: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 59fd2: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 59fd6: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 59fda: 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 ); 59fdc: 2f28 0024 movel %a0@(36),%sp@- 59fe0: 2f28 0020 movel %a0@(32),%sp@- 59fe4: 2068 001c moveal %a0@(28),%a0 59fe8: 4e90 jsr %a0@ } 59fea: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 59fec: 2204 movel %d4,%d1 59fee: 40c0 movew %sr,%d0 59ff0: 8280 orl %d0,%d1 59ff2: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59ff4: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 59ff8: b1ee ffd8 cmpal %fp@(-40),%a0 59ffc: 66ce bnes 59fcc <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 59ffe: 46c0 movew %d0,%sr { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 5a000: 41ee fff4 lea %fp@(-12),%a0 5a004: 2548 0078 movel %a0,%a2@(120) 5a008: 6000 fe9a braw 59ea4 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 5a00c: 4207 clrb %d7 5a00e: 1547 007c moveb %d7,%a2@(124) 5a012: 2039 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d0 5a018: 5280 addql #1,%d0 5a01a: 23c0 0007 f538 movel %d0,7f538 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 5a020: 4878 0008 pea 8 5a024: 2f12 movel %a2@,%sp@- 5a026: 4eb9 0005 d624 jsr 5d624 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 5a02c: 2f0a movel %a2,%sp@- 5a02e: 4eba fd1c jsr %pc@(59d4c <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5a032: 2f0a movel %a2,%sp@- 5a034: 4eba fd80 jsr %pc@(59db6 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 5a038: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> ts->active = true; 5a03e: 7001 moveq #1,%d0 5a040: 1540 007c moveb %d0,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5a044: 2f2e ffe0 movel %fp@(-32),%sp@- 5a048: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 5a04e: 2f2e ffe4 movel %fp@(-28),%sp@- 5a052: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> 5a058: 4fef 0018 lea %sp@(24),%sp 5a05c: 6000 fe3e braw 59e9c <_Timer_server_Body+0x78> =============================================================================== 0005a060 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 5a060: 4e56 fff0 linkw %fp,#-16 5a064: 206e 000c moveal %fp@(12),%a0 5a068: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5a06c: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 5a070: 202a 0078 movel %a2@(120),%d0 5a074: 671a beqs 5a090 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 5a076: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 5a07a: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 5a07e: 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 ); 5a084: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 5a088: 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 ); 5a08a: 4ef9 0005 a84c jmp 5a84c <_Chain_Append> <== NOT EXECUTED 5a090: 2039 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d0 5a096: 5280 addql #1,%d0 5a098: 23c0 0007 f538 movel %d0,7f538 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 5a09e: 2028 0038 movel %a0@(56),%d0 5a0a2: 7201 moveq #1,%d1 5a0a4: b280 cmpl %d0,%d1 5a0a6: 6700 0088 beqw 5a130 <_Timer_server_Schedule_operation_method+0xd0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5a0aa: 7203 moveq #3,%d1 5a0ac: b280 cmpl %d0,%d1 5a0ae: 670e beqs 5a0be <_Timer_server_Schedule_operation_method+0x5e> * 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 ); } } 5a0b0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a0b6: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5a0b8: 4ef9 0005 cbdc jmp 5cbdc <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5a0be: 203c 0000 0700 movel #1792,%d0 5a0c4: 40c2 movew %sr,%d2 5a0c6: 8082 orl %d2,%d0 5a0c8: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5a0ca: 260a movel %a2,%d3 5a0cc: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5a0d2: 2039 0007 f5ca movel 7f5ca <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 5a0d8: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5a0dc: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5a0e0: b689 cmpl %a1,%d3 5a0e2: 671a beqs 5a0fe <_Timer_server_Schedule_operation_method+0x9e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 5a0e4: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 5a0e8: b280 cmpl %d0,%d1 5a0ea: 6400 00b8 bccw 5a1a4 <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 5a0ee: 2800 movel %d0,%d4 5a0f0: 9881 subl %d1,%d4 if (delta_interval > delta) { 5a0f2: b883 cmpl %d3,%d4 5a0f4: 6500 00ba bcsw 5a1b0 <_Timer_server_Schedule_operation_method+0x150> 5a0f8: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 5a0fa: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 5a0fe: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 5a102: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5a104: 4868 0010 pea %a0@(16) 5a108: 486a 0068 pea %a2@(104) 5a10c: 4eb9 0005 dff8 jsr 5dff8 <_Watchdog_Insert> if ( !ts->active ) { 5a112: 508f addql #8,%sp 5a114: 102a 007c moveb %a2@(124),%d0 5a118: 6696 bnes 5a0b0 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 5a11a: 2f0a movel %a2,%sp@- 5a11c: 4eba fc98 jsr %pc@(59db6 <_Timer_server_Reset_tod_system_watchdog>) 5a120: 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 ); } } 5a122: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a128: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5a12a: 4ef9 0005 cbdc jmp 5cbdc <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5a130: 203c 0000 0700 movel #1792,%d0 5a136: 40c3 movew %sr,%d3 5a138: 8083 orl %d3,%d0 5a13a: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 5a13c: 2039 0007 f678 movel 7f678 <_Watchdog_Ticks_since_boot>,%d0 5a142: 240a movel %a2,%d2 5a144: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 5a14a: 222a 003c movel %a2@(60),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5a14e: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5a152: b489 cmpl %a1,%d2 5a154: 6712 beqs 5a168 <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5a156: 2800 movel %d0,%d4 5a158: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 5a15a: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 5a15e: b484 cmpl %d4,%d2 5a160: 623a bhis 5a19c <_Timer_server_Schedule_operation_method+0x13c> 5a162: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5a164: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 5a168: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 5a16c: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5a16e: 4868 0010 pea %a0@(16) 5a172: 486a 0030 pea %a2@(48) 5a176: 4eb9 0005 dff8 jsr 5dff8 <_Watchdog_Insert> if ( !ts->active ) { 5a17c: 508f addql #8,%sp 5a17e: 102a 007c moveb %a2@(124),%d0 5a182: 6600 ff2c bnew 5a0b0 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 5a186: 2f0a movel %a2,%sp@- 5a188: 4eba fbc2 jsr %pc@(59d4c <_Timer_server_Reset_interval_system_watchdog>) 5a18c: 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 ); } } 5a18e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a194: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5a196: 4ef9 0005 cbdc jmp 5cbdc <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 5a19c: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5a19e: 2342 0010 movel %d2,%a1@(16) 5a1a2: 60c4 bras 5a168 <_Timer_server_Schedule_operation_method+0x108> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 5a1a4: d283 addl %d3,%d1 delta_interval += delta; 5a1a6: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 5a1a8: 2341 0010 movel %d1,%a1@(16) 5a1ac: 6000 ff50 braw 5a0fe <_Timer_server_Schedule_operation_method+0x9e> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 5a1b0: 9684 subl %d4,%d3 5a1b2: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 5a1b4: 2341 0010 movel %d1,%a1@(16) 5a1b8: 6000 ff44 braw 5a0fe <_Timer_server_Schedule_operation_method+0x9e> =============================================================================== 00049624 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 49624: 4e56 0000 linkw %fp,#0 49628: 226e 0008 moveal %fp@(8),%a1 4962c: 2f0a movel %a2,%sp@- 4962e: 246e 000c moveal %fp@(12),%a2 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 49632: 206a 0004 moveal %a2@(4),%a0 49636: d1e9 0004 addal %a1@(4),%a0 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4963a: 2208 movel %a0,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 4963c: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 4963e: d191 addl %d0,%a1@ time->tv_nsec += add->tv_nsec; 49640: 2348 0004 movel %a0,%a1@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 49644: b1fc 3b9a c9ff cmpal #999999999,%a0 4964a: 631a blss 49666 <_Timespec_Add_to+0x42> 4964c: 2051 moveal %a1@,%a0 * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 4964e: 5288 addql #1,%a0 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 49650: 0681 c465 3600 addil #-1000000000,%d1 time->tv_sec++; seconds++; 49656: 5280 addql #1,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 49658: 0c81 3b9a c9ff cmpil #999999999,%d1 4965e: 62ee bhis 4964e <_Timespec_Add_to+0x2a> <== NEVER TAKEN 49660: 2288 movel %a0,%a1@ 49662: 2341 0004 movel %d1,%a1@(4) time->tv_sec++; seconds++; } return seconds; } 49666: 245f moveal %sp@+,%a2 49668: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b264 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 4b264: 4e56 0000 linkw %fp,#0 4b268: 226e 0008 moveal %fp@(8),%a1 4b26c: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 4b270: 2211 movel %a1@,%d1 4b272: 2010 movel %a0@,%d0 4b274: b081 cmpl %d1,%d0 4b276: 6d18 blts 4b290 <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 4b278: 6e10 bgts 4b28a <_Timespec_Greater_than+0x26> <== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 4b27a: 2068 0004 moveal %a0@(4),%a0 4b27e: b1e9 0004 cmpal %a1@(4),%a0 4b282: 5dc0 slt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4b284: 4e5e unlk %fp #include #include #include bool _Timespec_Greater_than( 4b286: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4b288: 4e75 rts 4b28a: 4e5e unlk %fp <== NOT EXECUTED ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 4b28c: 4200 clrb %d0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4b28e: 4e75 rts <== NOT EXECUTED 4b290: 4e5e unlk %fp bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 4b292: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } ... =============================================================================== 00049802 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49802: 4e56 fff0 linkw %fp,#-16 49806: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4980a: 242e 0008 movel %fp@(8),%d2 4980e: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 49812: 2479 0005 ff92 moveal 5ff92 <_User_extensions_List+0x8>,%a2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49818: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 4981c: b5fc 0005 ff8a cmpal #393098,%a2 49822: 6726 beqs 4984a <_User_extensions_Fatal+0x48> <== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49824: 0284 0000 00ff andil #255,%d4 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 4982a: 206a 0030 moveal %a2@(48),%a0 4982e: 4a88 tstl %a0 49830: 670c beqs 4983e <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49832: 2f03 movel %d3,%sp@- 49834: 2f04 movel %d4,%sp@- 49836: 2f02 movel %d2,%sp@- 49838: 4e90 jsr %a0@ 4983a: 4fef 000c lea %sp@(12),%sp 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 ) { 4983e: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 49842: b5fc 0005 ff8a cmpal #393098,%a2 49848: 66e0 bnes 4982a <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 4984a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 49850: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000496c0 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 496c0: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 496c4: 203c 0005 ff8e movel #393102,%d0 496ca: 23c0 0005 ff8a movel %d0,5ff8a <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 496d0: 203c 0005 ff8a movel #393098,%d0 496d6: 23c0 0005 ff92 movel %d0,5ff92 <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 496dc: 203c 0005 fe04 movel #392708,%d0 496e2: 23c0 0005 fe00 movel %d0,5fe00 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 496e8: 203c 0005 fe00 movel #392704,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 496ee: 42b9 0005 ff8e clrl 5ff8e <_User_extensions_List+0x4> 496f4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 496f8: 2439 0005 e6da movel 5e6da ,%d2 initial_extensions = Configuration.User_extension_table; 496fe: 2639 0005 e6de movel 5e6de ,%d3 49704: 42b9 0005 fe04 clrl 5fe04 <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 4970a: 23c0 0005 fe08 movel %d0,5fe08 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 49710: 4a83 tstl %d3 49712: 6764 beqs 49778 <_User_extensions_Handler_initialization+0xb8> extension = (User_extensions_Control *) 49714: 7834 moveq #52,%d4 49716: 4c02 4800 mulsl %d2,%d4 4971a: 2f04 movel %d4,%sp@- 4971c: 4eb9 0004 9bd0 jsr 49bd0 <_Workspace_Allocate_or_fatal_error> 49722: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 49724: 2f04 movel %d4,%sp@- 49726: 42a7 clrl %sp@- 49728: 2f00 movel %d0,%sp@- 4972a: 4eb9 0004 fa48 jsr 4fa48 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49730: 4fef 0010 lea %sp@(16),%sp 49734: 4a82 tstl %d2 49736: 6740 beqs 49778 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN 49738: 4284 clrl %d4 4973a: 47f9 0004 d34c lea 4d34c <_User_extensions_Add_set>,%a3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 49740: 2043 moveal %d3,%a0 49742: 5284 addql #1,%d4 49744: 0683 0000 0020 addil #32,%d3 4974a: 2558 0014 movel %a0@+,%a2@(20) 4974e: 2558 0018 movel %a0@+,%a2@(24) 49752: 2558 001c movel %a0@+,%a2@(28) 49756: 2558 0020 movel %a0@+,%a2@(32) 4975a: 2558 0024 movel %a0@+,%a2@(36) 4975e: 2558 0028 movel %a0@+,%a2@(40) 49762: 2558 002c movel %a0@+,%a2@(44) 49766: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 4976a: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 4976c: 45ea 0034 lea %a2@(52),%a2 49770: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49772: 588f addql #4,%sp 49774: b882 cmpl %d2,%d4 49776: 65c8 bcss 49740 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 49778: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4977e: 4e5e unlk %fp ... =============================================================================== 00049784 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 49784: 4e56 0000 linkw %fp,#0 49788: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4978a: 2479 0005 ff8a moveal 5ff8a <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 49790: 2f02 movel %d2,%sp@- 49792: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49796: b5fc 0005 ff8e cmpal #393102,%a2 4979c: 6718 beqs 497b6 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 4979e: 206a 0028 moveal %a2@(40),%a0 497a2: 4a88 tstl %a0 497a4: 6706 beqs 497ac <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 497a6: 2f02 movel %d2,%sp@- 497a8: 4e90 jsr %a0@ 497aa: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 497ac: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 497ae: b5fc 0005 ff8e cmpal #393102,%a2 497b4: 66e8 bnes 4979e <_User_extensions_Thread_begin+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 497b6: 242e fff8 movel %fp@(-8),%d2 497ba: 246e fffc moveal %fp@(-4),%a2 497be: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049854 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 49854: 4e56 0000 linkw %fp,#0 49858: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 4985a: 2479 0005 ff8a moveal 5ff8a <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 49860: 2f02 movel %d2,%sp@- 49862: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 49866: b5fc 0005 ff8e cmpal #393102,%a2 4986c: 6722 beqs 49890 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 4986e: 206a 0014 moveal %a2@(20),%a0 49872: 4a88 tstl %a0 49874: 6710 beqs 49886 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 49876: 2f02 movel %d2,%sp@- 49878: 2f39 0005 feb6 movel 5feb6 <_Thread_Executing>,%sp@- 4987e: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 49880: 508f addql #8,%sp 49882: 4a00 tstb %d0 49884: 670c beqs 49892 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49886: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 49888: b5fc 0005 ff8e cmpal #393102,%a2 4988e: 66de bnes 4986e <_User_extensions_Thread_create+0x1a> 49890: 7001 moveq #1,%d0 return false; } } return true; } 49892: 242e fff8 movel %fp@(-8),%d2 49896: 246e fffc moveal %fp@(-4),%a2 4989a: 4e5e unlk %fp ... =============================================================================== 000498a0 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 498a0: 4e56 0000 linkw %fp,#0 498a4: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 498a6: 2479 0005 ff92 moveal 5ff92 <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 498ac: 2f02 movel %d2,%sp@- 498ae: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 498b2: b5fc 0005 ff8a cmpal #393098,%a2 498b8: 6720 beqs 498da <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 498ba: 206a 0020 moveal %a2@(32),%a0 498be: 4a88 tstl %a0 498c0: 670c beqs 498ce <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 498c2: 2f02 movel %d2,%sp@- 498c4: 2f39 0005 feb6 movel 5feb6 <_Thread_Executing>,%sp@- 498ca: 4e90 jsr %a0@ 498cc: 508f addql #8,%sp 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 ) { 498ce: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 498d2: b5fc 0005 ff8a cmpal #393098,%a2 498d8: 66e0 bnes 498ba <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 498da: 242e fff8 movel %fp@(-8),%d2 498de: 246e fffc moveal %fp@(-4),%a2 498e2: 4e5e unlk %fp ... =============================================================================== 000497c2 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 497c2: 4e56 0000 linkw %fp,#0 497c6: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 497c8: 2479 0005 ff92 moveal 5ff92 <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 497ce: 2f02 movel %d2,%sp@- 497d0: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 497d4: b5fc 0005 ff8a cmpal #393098,%a2 497da: 671a beqs 497f6 <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 497dc: 206a 002c moveal %a2@(44),%a0 497e0: 4a88 tstl %a0 497e2: 6706 beqs 497ea <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 497e4: 2f02 movel %d2,%sp@- 497e6: 4e90 jsr %a0@ 497e8: 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 ) { 497ea: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 497ee: b5fc 0005 ff8a cmpal #393098,%a2 497f4: 66e6 bnes 497dc <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 497f6: 242e fff8 movel %fp@(-8),%d2 497fa: 246e fffc moveal %fp@(-4),%a2 497fe: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a588 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a588: 4e56 0000 linkw %fp,#0 4a58c: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4a58e: 2479 0006 0f32 moveal 60f32 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a594: 2f02 movel %d2,%sp@- 4a596: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4a59a: b5fc 0006 0f36 cmpal #397110,%a2 4a5a0: 671e beqs 4a5c0 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 4a5a2: 206a 001c moveal %a2@(28),%a0 4a5a6: 4a88 tstl %a0 4a5a8: 670c beqs 4a5b6 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 4a5aa: 2f02 movel %d2,%sp@- 4a5ac: 2f39 0006 0e5e movel 60e5e <_Thread_Executing>,%sp@- 4a5b2: 4e90 jsr %a0@ 4a5b4: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 4a5b6: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4a5b8: b5fc 0006 0f36 cmpal #397110,%a2 4a5be: 66e2 bnes 4a5a2 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 4a5c0: 242e fff8 movel %fp@(-8),%d2 4a5c4: 246e fffc moveal %fp@(-4),%a2 4a5c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000498e8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 498e8: 4e56 0000 linkw %fp,#0 498ec: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 498ee: 2479 0005 ff8a moveal 5ff8a <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 498f4: 2f02 movel %d2,%sp@- 498f6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 498fa: b5fc 0005 ff8e cmpal #393102,%a2 49900: 671e beqs 49920 <_User_extensions_Thread_start+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 49902: 206a 0018 moveal %a2@(24),%a0 49906: 4a88 tstl %a0 49908: 670c beqs 49916 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 4990a: 2f02 movel %d2,%sp@- 4990c: 2f39 0005 feb6 movel 5feb6 <_Thread_Executing>,%sp@- 49912: 4e90 jsr %a0@ 49914: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49916: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49918: b5fc 0005 ff8e cmpal #393102,%a2 4991e: 66e2 bnes 49902 <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 49920: 242e fff8 movel %fp@(-8),%d2 49924: 246e fffc moveal %fp@(-4),%a2 49928: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004992c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 4992c: 4e56 fff4 linkw %fp,#-12 49930: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49934: 262e 0008 movel %fp@(8),%d3 49938: 242e 000c movel %fp@(12),%d2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 4993c: 2479 0005 fe00 moveal 5fe00 <_User_extensions_Switches_list>,%a2 49942: b5fc 0005 fe04 cmpal #392708,%a2 49948: 6716 beqs 49960 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 4994a: 2f02 movel %d2,%sp@- 4994c: 2f03 movel %d3,%sp@- 4994e: 206a 0008 moveal %a2@(8),%a0 49952: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 49954: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 49956: 508f addql #8,%sp 49958: b5fc 0005 fe04 cmpal #392708,%a2 4995e: 66ea bnes 4994a <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 49960: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49966: 4e5e unlk %fp ... =============================================================================== 0004b61c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b61c: 4e56 ffe8 linkw %fp,#-24 4b620: 226e 000c moveal %fp@(12),%a1 4b624: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4b628: 283c 0000 0700 movel #1792,%d4 4b62e: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b630: 266e 0008 moveal %fp@(8),%a3 4b634: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4b638: 40c1 movew %sr,%d1 4b63a: 8081 orl %d1,%d0 4b63c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b63e: 244b moveal %a3,%a2 4b640: 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 ) ) { 4b642: b5c8 cmpal %a0,%a2 4b644: 6748 beqs 4b68e <_Watchdog_Adjust+0x72> switch ( direction ) { 4b646: 4a89 tstl %a1 4b648: 6650 bnes 4b69a <_Watchdog_Adjust+0x7e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b64a: 4a82 tstl %d2 4b64c: 6740 beqs 4b68e <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b64e: 2628 0010 movel %a0@(16),%d3 4b652: 49f9 0004 b898 lea 4b898 <_Watchdog_Tickle>,%a4 4b658: b682 cmpl %d2,%d3 4b65a: 622c bhis 4b688 <_Watchdog_Adjust+0x6c> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4b65c: 7001 moveq #1,%d0 4b65e: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4b662: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4b664: 2f0b movel %a3,%sp@- 4b666: 4e94 jsr %a4@ _ISR_Disable( level ); 4b668: 2004 movel %d4,%d0 4b66a: 40c1 movew %sr,%d1 4b66c: 8081 orl %d1,%d0 4b66e: 46c0 movew %d0,%sr while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4b670: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4b672: 588f addql #4,%sp 4b674: 2013 movel %a3@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 4b676: 2040 moveal %d0,%a0 4b678: b08a cmpl %a2,%d0 4b67a: 6712 beqs 4b68e <_Watchdog_Adjust+0x72> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b67c: 4a82 tstl %d2 4b67e: 670e beqs 4b68e <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b680: 2628 0010 movel %a0@(16),%d3 4b684: b483 cmpl %d3,%d2 4b686: 64d4 bccs 4b65c <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4b688: 9682 subl %d2,%d3 4b68a: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4b68e: 46c1 movew %d1,%sr } 4b690: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b696: 4e5e unlk %fp 4b698: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4b69a: 7001 moveq #1,%d0 4b69c: b089 cmpl %a1,%d0 4b69e: 66ee bnes 4b68e <_Watchdog_Adjust+0x72> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4b6a0: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4b6a4: 46c1 movew %d1,%sr } 4b6a6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b6ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005df68 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5df68: 4e56 ffe4 linkw %fp,#-28 5df6c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5df70: 2a6e 0008 moveal %fp@(8),%a5 5df74: 282e 000c movel %fp@(12),%d4 5df78: 266e 0010 moveal %fp@(16),%a3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 5df7c: 675e beqs 5dfdc <_Watchdog_Adjust_to_chain+0x74> return; } _ISR_Disable( level ); 5df7e: 263c 0000 0700 movel #1792,%d3 5df84: 2003 movel %d3,%d0 5df86: 40c1 movew %sr,%d1 5df88: 8081 orl %d1,%d0 5df8a: 46c0 movew %d0,%sr 5df8c: 284d moveal %a5,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5df8e: 240b movel %a3,%d2 5df90: 5882 addql #4,%d2 5df92: 205c moveal %a4@+,%a0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 5df94: b1cc cmpal %a4,%a0 5df96: 6742 beqs 5dfda <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 5df98: 2028 0010 movel %a0@(16),%d0 5df9c: b880 cmpl %d0,%d4 5df9e: 654c bcss 5dfec <_Watchdog_Adjust_to_chain+0x84> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 5dfa0: 9880 subl %d0,%d4 first->delta_interval = 0; 5dfa2: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5dfa6: 2250 moveal %a0@,%a1 previous = the_node->previous; 5dfa8: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 5dfac: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 5dfae: 234a 0004 movel %a2,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5dfb2: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 5dfb4: 226b 0008 moveal %a3@(8),%a1 the_chain->last = the_node; 5dfb8: 2748 0008 movel %a0,%a3@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 5dfbc: 2149 0004 movel %a1,%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; 5dfc0: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5dfc2: 2003 movel %d3,%d0 5dfc4: 46c1 movew %d1,%sr 5dfc6: 8081 orl %d1,%d0 5dfc8: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5dfca: 2055 moveal %a5@,%a0 if ( _Chain_Is_empty( header ) ) 5dfcc: b1cc cmpal %a4,%a0 5dfce: 6714 beqs 5dfe4 <_Watchdog_Adjust_to_chain+0x7c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5dfd0: 4aa8 0010 tstl %a0@(16) 5dfd4: 67d0 beqs 5dfa6 <_Watchdog_Adjust_to_chain+0x3e> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5dfd6: 4a84 tstl %d4 5dfd8: 66ba bnes 5df94 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5dfda: 46c1 movew %d1,%sr } 5dfdc: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5dfe0: 4e5e unlk %fp 5dfe2: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5dfe4: 204c moveal %a4,%a0 } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5dfe6: 4a84 tstl %d4 5dfe8: 66aa bnes 5df94 <_Watchdog_Adjust_to_chain+0x2c> 5dfea: 60ee bras 5dfda <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 5dfec: 9084 subl %d4,%d0 5dfee: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5dff2: 46c1 movew %d1,%sr 5dff4: 60e6 bras 5dfdc <_Watchdog_Adjust_to_chain+0x74> ... =============================================================================== 0004996c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4996c: 4e56 ffec linkw %fp,#-20 49970: 226e 000c moveal %fp@(12),%a1 49974: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49978: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 4997c: 2a3c 0000 0700 movel #1792,%d5 49982: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 49984: 2839 0005 fe96 movel 5fe96 <_ISR_Nest_level>,%d4 _ISR_Disable( level ); 4998a: 40c3 movew %sr,%d3 4998c: 8083 orl %d3,%d0 4998e: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 49990: 4aa9 0008 tstl %a1@(8) 49994: 6600 00c6 bnew 49a5c <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 49998: 2039 0005 ff38 movel 5ff38 <_Watchdog_Sync_count>,%d0 4999e: 5280 addql #1,%d0 499a0: 23c0 0005 ff38 movel %d0,5ff38 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 499a6: 7001 moveq #1,%d0 499a8: 2340 0008 movel %d0,%a1@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 499ac: 2029 000c movel %a1@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 499b0: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 499b2: 6764 beqs 49a18 <_Watchdog_Insert+0xac> 499b4: 4a90 tstl %a0@ 499b6: 6760 beqs 49a18 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 499b8: 2228 0010 movel %a0@(16),%d1 499bc: b280 cmpl %d0,%d1 499be: 6252 bhis 49a12 <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 499c0: 2405 movel %d5,%d2 499c2: 46c3 movew %d3,%sr 499c4: 8483 orl %d3,%d2 499c6: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 499c8: 7401 moveq #1,%d2 499ca: b4a9 0008 cmpl %a1@(8),%d2 499ce: 666e bnes 49a3e <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 499d0: 2439 0005 feb2 movel 5feb2 <_Watchdog_Sync_level>,%d2 499d6: b484 cmpl %d4,%d2 499d8: 6230 bhis 49a0a <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 499da: 9081 subl %d1,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 499dc: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 499de: 4a80 tstl %d0 499e0: 6736 beqs 49a18 <_Watchdog_Insert+0xac> 499e2: 4a90 tstl %a0@ 499e4: 6732 beqs 49a18 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 499e6: 2228 0010 movel %a0@(16),%d1 499ea: b081 cmpl %d1,%d0 499ec: 6524 bcss 49a12 <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 499ee: 2405 movel %d5,%d2 499f0: 46c3 movew %d3,%sr 499f2: 8483 orl %d3,%d2 499f4: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 499f6: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 499f8: 7201 moveq #1,%d1 499fa: b2a9 0008 cmpl %a1@(8),%d1 499fe: 663e bnes 49a3e <_Watchdog_Insert+0xd2> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49a00: 2239 0005 feb2 movel 5feb2 <_Watchdog_Sync_level>,%d1 49a06: b284 cmpl %d4,%d1 49a08: 63d2 blss 499dc <_Watchdog_Insert+0x70> _Watchdog_Sync_level = insert_isr_nest_level; 49a0a: 23c4 0005 feb2 movel %d4,5feb2 <_Watchdog_Sync_level> goto restart; 49a10: 609a bras 499ac <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 49a12: 9280 subl %d0,%d1 49a14: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 49a18: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 49a1c: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 49a1e: 2450 moveal %a0@,%a2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 49a20: 2239 0005 ff3c movel 5ff3c <_Watchdog_Ticks_since_boot>,%d1 after_node->next = the_node; 49a26: 2089 movel %a1,%a0@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 49a28: 2348 0004 movel %a0,%a1@(4) 49a2c: 2341 0014 movel %d1,%a1@(20) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 49a30: 2340 0010 movel %d0,%a1@(16) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 49a34: 2549 0004 movel %a1,%a2@(4) 49a38: 2342 0008 movel %d2,%a1@(8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 49a3c: 228a movel %a2,%a1@ _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 49a3e: 23c4 0005 feb2 movel %d4,5feb2 <_Watchdog_Sync_level> _Watchdog_Sync_count--; 49a44: 2039 0005 ff38 movel 5ff38 <_Watchdog_Sync_count>,%d0 49a4a: 5380 subql #1,%d0 49a4c: 23c0 0005 ff38 movel %d0,5ff38 <_Watchdog_Sync_count> _ISR_Enable( level ); 49a52: 46c3 movew %d3,%sr } 49a54: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49a58: 4e5e unlk %fp 49a5a: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 49a5c: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 49a5e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49a62: 4e5e unlk %fp ... =============================================================================== 00049ab4 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 49ab4: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 49aba: 4e56 0000 linkw %fp,#0 49abe: 206e 0008 moveal %fp@(8),%a0 49ac2: 2f0a movel %a2,%sp@- 49ac4: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 49ac6: 40c1 movew %sr,%d1 49ac8: 8081 orl %d1,%d0 49aca: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 49acc: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 49ad0: 7401 moveq #1,%d2 49ad2: b480 cmpl %d0,%d2 49ad4: 6764 beqs 49b3a <_Watchdog_Remove+0x86> 49ad6: 6314 blss 49aec <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49ad8: 2279 0005 ff3c moveal 5ff3c <_Watchdog_Ticks_since_boot>,%a1 49ade: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49ae2: 46c1 movew %d1,%sr return( previous_state ); } 49ae4: 241f movel %sp@+,%d2 49ae6: 245f moveal %sp@+,%a2 49ae8: 4e5e unlk %fp 49aea: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 49aec: 143c 0003 moveb #3,%d2 49af0: b480 cmpl %d0,%d2 49af2: 65e4 bcss 49ad8 <_Watchdog_Remove+0x24> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 49af4: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 49af6: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 49afa: 4a91 tstl %a1@ 49afc: 6708 beqs 49b06 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 49afe: 2428 0010 movel %a0@(16),%d2 49b02: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 49b06: 2479 0005 ff38 moveal 5ff38 <_Watchdog_Sync_count>,%a2 49b0c: 4a8a tstl %a2 49b0e: 670c beqs 49b1c <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 49b10: 2479 0005 fe96 moveal 5fe96 <_ISR_Nest_level>,%a2 49b16: 23ca 0005 feb2 movel %a2,5feb2 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 49b1c: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 49b20: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 49b22: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49b26: 2279 0005 ff3c moveal 5ff3c <_Watchdog_Ticks_since_boot>,%a1 49b2c: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49b30: 46c1 movew %d1,%sr return( previous_state ); } 49b32: 241f movel %sp@+,%d2 49b34: 245f moveal %sp@+,%a2 49b36: 4e5e unlk %fp 49b38: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49b3a: 2279 0005 ff3c moveal 5ff3c <_Watchdog_Ticks_since_boot>,%a1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 49b40: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49b44: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49b48: 46c1 movew %d1,%sr return( previous_state ); } 49b4a: 241f movel %sp@+,%d2 49b4c: 245f moveal %sp@+,%a2 49b4e: 4e5e unlk %fp ... =============================================================================== 0004afc0 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4afc0: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4afc6: 4e56 ffe8 linkw %fp,#-24 4afca: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4afce: 242e 0008 movel %fp@(8),%d2 4afd2: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4afd6: 40c3 movew %sr,%d3 4afd8: 8083 orl %d3,%d0 4afda: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4afdc: 2f0b movel %a3,%sp@- 4afde: 4bf9 0004 49c0 lea 449c0 ,%a5 4afe4: 2f02 movel %d2,%sp@- 4afe6: 4879 0005 f6a8 pea 5f6a8 <_Status_Object_name_errors_to_status+0x14> 4afec: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4afee: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4aff0: 4fef 000c lea %sp@(12),%sp 4aff4: b7ca cmpal %a2,%a3 4aff6: 672c beqs 4b024 <_Watchdog_Report_chain+0x64> <== NEVER TAKEN 4aff8: 49f9 0004 b03c lea 4b03c <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4affe: 2f0a movel %a2,%sp@- 4b000: 42a7 clrl %sp@- 4b002: 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 ) 4b004: 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 ; 4b006: 508f addql #8,%sp 4b008: b7ca cmpal %a2,%a3 4b00a: 66f2 bnes 4affe <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4b00c: 2f02 movel %d2,%sp@- 4b00e: 4879 0005 f6bf pea 5f6bf <_Status_Object_name_errors_to_status+0x2b> 4b014: 4e95 jsr %a5@ 4b016: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4b018: 46c3 movew %d3,%sr } 4b01a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b020: 4e5e unlk %fp 4b022: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4b024: 4879 0005 f6ce pea 5f6ce <_Status_Object_name_errors_to_status+0x3a> 4b02a: 4e95 jsr %a5@ 4b02c: 588f addql #4,%sp } _ISR_Enable( level ); 4b02e: 46c3 movew %d3,%sr } 4b030: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b036: 4e5e unlk %fp ... =============================================================================== 00049b54 <_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 ); 49b54: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 49b5a: 4e56 ffe8 linkw %fp,#-24 49b5e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49b62: 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 ); 49b66: 40c2 movew %sr,%d2 49b68: 8082 orl %d2,%d0 49b6a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 49b6c: 264c moveal %a4,%a3 49b6e: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 49b70: b7ca cmpal %a2,%a3 49b72: 673e beqs 49bb2 <_Watchdog_Tickle+0x5e> * 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) { 49b74: 202a 0010 movel %a2@(16),%d0 49b78: 4bf9 0004 9ab4 lea 49ab4 <_Watchdog_Remove>,%a5 49b7e: 6708 beqs 49b88 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 49b80: 5380 subql #1,%d0 49b82: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 49b86: 662a bnes 49bb2 <_Watchdog_Tickle+0x5e> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49b88: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 49b8e: 2f0a movel %a2,%sp@- 49b90: 4e95 jsr %a5@ _ISR_Enable( level ); 49b92: 46c2 movew %d2,%sr switch( watchdog_state ) { 49b94: 7202 moveq #2,%d1 49b96: 588f addql #4,%sp 49b98: b280 cmpl %d0,%d1 49b9a: 6722 beqs 49bbe <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49b9c: 2003 movel %d3,%d0 49b9e: 40c2 movew %sr,%d2 49ba0: 8082 orl %d2,%d0 49ba2: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49ba4: 2014 movel %a4@,%d0 49ba6: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 49ba8: b08b cmpl %a3,%d0 49baa: 6706 beqs 49bb2 <_Watchdog_Tickle+0x5e> 49bac: 4aaa 0010 tstl %a2@(16) 49bb0: 67dc beqs 49b8e <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 49bb2: 46c2 movew %d2,%sr } 49bb4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49bba: 4e5e unlk %fp 49bbc: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 49bbe: 2f2a 0024 movel %a2@(36),%sp@- 49bc2: 2f2a 0020 movel %a2@(32),%sp@- 49bc6: 206a 001c moveal %a2@(28),%a0 49bca: 4e90 jsr %a0@ 49bcc: 508f addql #8,%sp 49bce: 60cc bras 49b9c <_Watchdog_Tickle+0x48> =============================================================================== 00049c38 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 49c38: 4e56 0000 linkw %fp,#0 49c3c: 2f03 movel %d3,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; 49c3e: 2639 0005 e6a8 movel 5e6a8 ,%d3 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 49c44: 2f02 movel %d2,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 49c46: 2439 0005 e6a4 movel 5e6a4 ,%d2 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) 49c4c: 4a39 0005 e6cc tstb 5e6cc 49c52: 6628 bnes 49c7c <_Workspace_Handler_initialization+0x44> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 49c54: 4878 0004 pea 4 49c58: 2f03 movel %d3,%sp@- 49c5a: 2f02 movel %d2,%sp@- 49c5c: 4879 0005 fe1e pea 5fe1e <_Workspace_Area> 49c62: 4eb9 0004 76dc jsr 476dc <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 49c68: 4fef 0010 lea %sp@(16),%sp 49c6c: 4a80 tstl %d0 49c6e: 671e beqs 49c8e <_Workspace_Handler_initialization+0x56> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 49c70: 242e fff8 movel %fp@(-8),%d2 49c74: 262e fffc movel %fp@(-4),%d3 49c78: 4e5e unlk %fp 49c7a: 4e75 rts uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 49c7c: 2f03 movel %d3,%sp@- 49c7e: 42a7 clrl %sp@- 49c80: 2f02 movel %d2,%sp@- 49c82: 4eb9 0004 fa48 jsr 4fa48 49c88: 4fef 000c lea %sp@(12),%sp 49c8c: 60c6 bras 49c54 <_Workspace_Handler_initialization+0x1c> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 49c8e: 4878 0003 pea 3 49c92: 4878 0001 pea 1 49c96: 42a7 clrl %sp@- 49c98: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> ... =============================================================================== 0005c2c4 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 5c2c4: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 5c2c6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5c2ca: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0005c17c <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5c17c: 4e56 0000 linkw %fp,#0 5c180: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5c184: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5c18a: 2d40 0008 movel %d0,%fp@(8) } 5c18e: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 5c190: 4ef9 0004 2918 jmp 42918 ... =============================================================================== 00043746 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 43746: 4e56 0000 linkw %fp,#0 4374a: 4eb9 0005 ca20 jsr 5ca20 <_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(); 43750: 4eb9 0004 36e0 jsr 436e0 rtems_shutdown_executive(status); 43756: 2f2e 0008 movel %fp@(8),%sp@- 4375a: 4eb9 0004 6dcc jsr 46dcc 43760: 588f addql #4,%sp <== NOT EXECUTED 43762: 60fe bras 43762 <_exit+0x1c> <== NOT EXECUTED =============================================================================== 00043a7c <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 43a7c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43a80: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 43a84: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 43a88: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 43a8e: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 43a92: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43a96: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 43a98: 4ef9 0004 3858 jmp 43858 <== NOT EXECUTED ... =============================================================================== 0005c198 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5c198: 4e56 0000 linkw %fp,#0 free( ptr ); 5c19c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5c1a2: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5c1a4: 4ef9 0004 2ddc jmp 42ddc ... =============================================================================== 0005c292 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 5c292: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 5c294: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 5c298: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ed0 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 42ed0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 42ed4: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 42ed6: 4ef9 0004 2e6c jmp 42e6c <== NOT EXECUTED =============================================================================== 00042edc <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 42edc: 4e56 0000 linkw %fp,#0 42ee0: 202e 000c movel %fp@(12),%d0 return gettimeofday( tp, tzp ); 42ee4: 2d6e 0010 000c movel %fp@(16),%fp@(12) 42eea: 2d40 0008 movel %d0,%fp@(8) } 42eee: 4e5e unlk %fp struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 42ef0: 4ef9 0004 2e6c jmp 42e6c ... =============================================================================== 0005c29c <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5c29c: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5c2a0: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5c2a6: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5c2a8: 4ef9 0005 c974 jmp 5c974 ... =============================================================================== 0005c2ba <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 5c2ba: 4280 clrl %d0 <== NOT EXECUTED #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5c2bc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5c2c0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044584 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 44584: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44588: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 4458c: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 44592: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 44596: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 44598: 4ef9 0004 43b4 jmp 443b4 <== NOT EXECUTED ... =============================================================================== 0005c474 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5c474: 4e56 0000 linkw %fp,#0 return malloc( size ); 5c478: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5c47e: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5c480: 4ef9 0004 3108 jmp 43108 ... =============================================================================== 0005c578 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5c578: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5c57c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 5c580: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5c586: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 5c58a: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5c58c: 4ef9 0005 c5b8 jmp 5c5b8 <== NOT EXECUTED ... =============================================================================== 00046fa4 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 46fa4: 4e56 ffa4 linkw %fp,#-92 46fa8: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 46fac: 262e 000c movel %fp@(12),%d3 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 46fb0: 2f03 movel %d3,%sp@- int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 46fb2: 282e 0010 movel %fp@(16),%d4 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 46fb6: 4eb9 0004 5674 jsr 45674 if ( old_parent_pathlen == 0 ) 46fbc: 588f addql #4,%sp 46fbe: 4a80 tstl %d0 46fc0: 6600 01d0 bnew 47192 <_rename_r+0x1ee> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 46fc4: 45ee ffd0 lea %fp@(-48),%a2 46fc8: 4282 clrl %d2 46fca: 2f0a movel %a2,%sp@- 46fcc: 486e fffc pea %fp@(-4) 46fd0: 4205 clrb %d5 46fd2: 2f03 movel %d3,%sp@- 46fd4: 4eb9 0004 756c jsr 4756c 46fda: 4fef 000c lea %sp@(12),%sp /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 46fde: 2d52 ffe4 movel %a2@,%fp@(-28) name = old + old_parent_pathlen; 46fe2: d483 addl %d3,%d2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46fe4: 47f9 0005 58c8 lea 558c8 ,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 46fea: 260e movel %fp,%d3 46fec: 0683 ffff ffe4 addil #-28,%d3 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 46ff2: 2d6e ffd4 ffe8 movel %fp@(-44),%fp@(-24) 46ff8: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20) 46ffe: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16) 47004: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12) name = old + old_parent_pathlen; 4700a: 2d42 fff8 movel %d2,%fp@(-8) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4700e: 2f02 movel %d2,%sp@- 47010: 4e93 jsr %a3@ 47012: 2e80 movel %d0,%sp@ 47014: 2f02 movel %d2,%sp@- 47016: 4eb9 0004 5620 jsr 45620 4701c: d480 addl %d0,%d2 4701e: 2d42 fff8 movel %d2,%fp@(-8) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 47022: 2f02 movel %d2,%sp@- 47024: 4e93 jsr %a3@ 47026: 4297 clrl %sp@ 47028: 2f03 movel %d3,%sp@- 4702a: 42a7 clrl %sp@- 4702c: 2f00 movel %d0,%sp@- 4702e: 2f02 movel %d2,%sp@- 47030: 4eb9 0004 56ba jsr 456ba 0, &old_loc, false ); if ( result != 0 ) { 47036: 4fef 001c lea %sp@(28),%sp 4703a: 4a80 tstl %d0 4703c: 6600 011e bnew 4715c <_rename_r+0x1b8> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 47040: 240e movel %fp,%d2 47042: 0682 ffff ffbc addil #-68,%d2 47048: 2f02 movel %d2,%sp@- 4704a: 486e fffc pea %fp@(-4) 4704e: 2f04 movel %d4,%sp@- 47050: 4eb9 0004 756c jsr 4756c if ( !new_parent_loc.ops->evalformake_h ) { 47056: 206e ffc8 moveal %fp@(-56),%a0 4705a: 4fef 000c lea %sp@(12),%sp 4705e: 2068 0004 moveal %a0@(4),%a0 47062: 4a88 tstl %a0 47064: 6700 01b8 beqw 4721e <_rename_r+0x27a> rtems_filesystem_freenode( &old_parent_loc ); 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 ); 47068: 486e fff8 pea %fp@(-8) 4706c: 2f02 movel %d2,%sp@- 4706e: d8ae fffc addl %fp@(-4),%d4 47072: 2f04 movel %d4,%sp@- 47074: 4e90 jsr %a0@ if ( result != 0 ) { 47076: 4fef 000c lea %sp@(12),%sp 4707a: 4a80 tstl %d0 4707c: 6600 013a bnew 471b8 <_rename_r+0x214> /* * 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 ) { 47080: 202e ffcc movel %fp@(-52),%d0 47084: b0ae ffe0 cmpl %fp@(-32),%d0 47088: 6672 bnes 470fc <_rename_r+0x158> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 4708a: 226e ffc8 moveal %fp@(-56),%a1 4708e: 2069 0040 moveal %a1@(64),%a0 47092: 4a88 tstl %a0 47094: 6700 017a beqw 47210 <_rename_r+0x26c> 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 ); 47098: 2f2e fff8 movel %fp@(-8),%sp@- 4709c: 2f02 movel %d2,%sp@- 4709e: 2f03 movel %d3,%sp@- 470a0: 2f0a movel %a2,%sp@- 470a2: 4e90 jsr %a0@ rtems_filesystem_freenode( &new_parent_loc ); 470a4: 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 ); 470a8: 2800 movel %d0,%d4 rtems_filesystem_freenode( &new_parent_loc ); 470aa: 4fef 0010 lea %sp@(16),%sp 470ae: 4a88 tstl %a0 470b0: 670e beqs 470c0 <_rename_r+0x11c> <== NEVER TAKEN 470b2: 2068 001c moveal %a0@(28),%a0 470b6: 4a88 tstl %a0 470b8: 6706 beqs 470c0 <_rename_r+0x11c> <== NEVER TAKEN 470ba: 2f02 movel %d2,%sp@- 470bc: 4e90 jsr %a0@ 470be: 588f addql #4,%sp if ( free_old_parentloc ) 470c0: 4a05 tstb %d5 470c2: 6716 beqs 470da <_rename_r+0x136> rtems_filesystem_freenode( &old_parent_loc ); 470c4: 206e ffdc moveal %fp@(-36),%a0 470c8: 4a88 tstl %a0 470ca: 670e beqs 470da <_rename_r+0x136> <== NEVER TAKEN 470cc: 2068 001c moveal %a0@(28),%a0 470d0: 4a88 tstl %a0 470d2: 6706 beqs 470da <_rename_r+0x136> <== NEVER TAKEN 470d4: 2f0a movel %a2,%sp@- 470d6: 4e90 jsr %a0@ 470d8: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 470da: 206e fff0 moveal %fp@(-16),%a0 470de: 4a88 tstl %a0 470e0: 670e beqs 470f0 <_rename_r+0x14c> <== NEVER TAKEN 470e2: 2068 001c moveal %a0@(28),%a0 470e6: 4a88 tstl %a0 470e8: 6706 beqs 470f0 <_rename_r+0x14c> <== NEVER TAKEN 470ea: 2f03 movel %d3,%sp@- 470ec: 4e90 jsr %a0@ 470ee: 588f addql #4,%sp return result; } 470f0: 2004 movel %d4,%d0 470f2: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 470f8: 4e5e unlk %fp 470fa: 4e75 rts * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 470fc: 206e ffc8 moveal %fp@(-56),%a0 47100: 4a88 tstl %a0 47102: 670e beqs 47112 <_rename_r+0x16e> <== NEVER TAKEN 47104: 2068 001c moveal %a0@(28),%a0 47108: 4a88 tstl %a0 4710a: 6706 beqs 47112 <_rename_r+0x16e> <== NEVER TAKEN 4710c: 2f02 movel %d2,%sp@- 4710e: 4e90 jsr %a0@ 47110: 588f addql #4,%sp if ( free_old_parentloc ) 47112: 4a05 tstb %d5 47114: 6716 beqs 4712c <_rename_r+0x188> rtems_filesystem_freenode( &old_parent_loc ); 47116: 206e ffdc moveal %fp@(-36),%a0 4711a: 4a88 tstl %a0 4711c: 670e beqs 4712c <_rename_r+0x188> <== NEVER TAKEN 4711e: 2068 001c moveal %a0@(28),%a0 47122: 4a88 tstl %a0 47124: 6706 beqs 4712c <_rename_r+0x188> <== NEVER TAKEN 47126: 2f0a movel %a2,%sp@- 47128: 4e90 jsr %a0@ 4712a: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 4712c: 206e fff0 moveal %fp@(-16),%a0 47130: 4a88 tstl %a0 47132: 670e beqs 47142 <_rename_r+0x19e> <== NEVER TAKEN 47134: 2068 001c moveal %a0@(28),%a0 47138: 4a88 tstl %a0 4713a: 6706 beqs 47142 <_rename_r+0x19e> <== NEVER TAKEN 4713c: 2f03 movel %d3,%sp@- 4713e: 4e90 jsr %a0@ 47140: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 47142: 4eb9 0005 2860 jsr 52860 <__errno> 47148: 78ff moveq #-1,%d4 4714a: 2040 moveal %d0,%a0 4714c: 7012 moveq #18,%d0 4714e: 2080 movel %d0,%a0@ if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 47150: 2004 movel %d4,%d0 47152: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 47158: 4e5e unlk %fp 4715a: 4e75 rts name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 4715c: 4a05 tstb %d5 4715e: 660e bnes 4716e <_rename_r+0x1ca> <== ALWAYS TAKEN result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 47160: 78ff moveq #-1,%d4 <== NOT EXECUTED return result; } 47162: 2004 movel %d4,%d0 <== NOT EXECUTED 47164: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4716a: 4e5e unlk %fp <== NOT EXECUTED 4716c: 4e75 rts <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 4716e: 206e ffdc moveal %fp@(-36),%a0 47172: 4a88 tstl %a0 47174: 67ea beqs 47160 <_rename_r+0x1bc> <== NEVER TAKEN 47176: 2028 001c movel %a0@(28),%d0 4717a: 67e4 beqs 47160 <_rename_r+0x1bc> <== NEVER TAKEN 4717c: 2f0a movel %a2,%sp@- 4717e: 2040 moveal %d0,%a0 47180: 78ff moveq #-1,%d4 47182: 4e90 jsr %a0@ 47184: 588f addql #4,%sp if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 47186: 2004 movel %d4,%d0 47188: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 4718e: 4e5e unlk %fp 47190: 4e75 rts old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 47192: 42a7 clrl %sp@- 47194: 45ee ffd0 lea %fp@(-48),%a2 47198: 2400 movel %d0,%d2 4719a: 2f0a movel %a2,%sp@- 4719c: 4878 0002 pea 2 471a0: 2f00 movel %d0,%sp@- 471a2: 2f03 movel %d3,%sp@- 471a4: 4eb9 0004 57c4 jsr 457c4 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 471aa: 4fef 0014 lea %sp@(20),%sp 471ae: 4a80 tstl %d0 471b0: 66ae bnes 47160 <_rename_r+0x1bc> <== NEVER TAKEN 471b2: 7a01 moveq #1,%d5 471b4: 6000 fe28 braw 46fde <_rename_r+0x3a> rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 471b8: 206e ffc8 moveal %fp@(-56),%a0 471bc: 4a88 tstl %a0 471be: 670e beqs 471ce <_rename_r+0x22a> <== NEVER TAKEN 471c0: 2068 001c moveal %a0@(28),%a0 471c4: 4a88 tstl %a0 471c6: 6706 beqs 471ce <_rename_r+0x22a> <== NEVER TAKEN 471c8: 2f02 movel %d2,%sp@- 471ca: 4e90 jsr %a0@ 471cc: 588f addql #4,%sp if ( free_old_parentloc ) 471ce: 4a05 tstb %d5 471d0: 6716 beqs 471e8 <_rename_r+0x244> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 471d2: 206e ffdc moveal %fp@(-36),%a0 471d6: 4a88 tstl %a0 471d8: 670e beqs 471e8 <_rename_r+0x244> <== NEVER TAKEN 471da: 2068 001c moveal %a0@(28),%a0 471de: 4a88 tstl %a0 471e0: 6706 beqs 471e8 <_rename_r+0x244> <== NEVER TAKEN 471e2: 2f0a movel %a2,%sp@- 471e4: 4e90 jsr %a0@ 471e6: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 471e8: 206e fff0 moveal %fp@(-16),%a0 471ec: 4a88 tstl %a0 471ee: 6700 ff70 beqw 47160 <_rename_r+0x1bc> 471f2: 2028 001c movel %a0@(28),%d0 471f6: 6700 ff68 beqw 47160 <_rename_r+0x1bc> 471fa: 2f03 movel %d3,%sp@- 471fc: 2040 moveal %d0,%a0 471fe: 78ff moveq #-1,%d4 47200: 4e90 jsr %a0@ 47202: 588f addql #4,%sp if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 47204: 2004 movel %d4,%d0 47206: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 4720c: 4e5e unlk %fp 4720e: 4e75 rts rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 47210: 2069 001c moveal %a1@(28),%a0 47214: 4a88 tstl %a0 47216: 6706 beqs 4721e <_rename_r+0x27a> <== NEVER TAKEN 47218: 2f02 movel %d2,%sp@- 4721a: 4e90 jsr %a0@ 4721c: 588f addql #4,%sp if ( free_old_parentloc ) 4721e: 4a05 tstb %d5 47220: 6716 beqs 47238 <_rename_r+0x294> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 47222: 206e ffdc moveal %fp@(-36),%a0 47226: 4a88 tstl %a0 47228: 670e beqs 47238 <_rename_r+0x294> <== NEVER TAKEN 4722a: 2068 001c moveal %a0@(28),%a0 4722e: 4a88 tstl %a0 47230: 6706 beqs 47238 <_rename_r+0x294> <== NEVER TAKEN 47232: 2f0a movel %a2,%sp@- 47234: 4e90 jsr %a0@ 47236: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 47238: 206e fff0 moveal %fp@(-16),%a0 4723c: 4a88 tstl %a0 4723e: 670e beqs 4724e <_rename_r+0x2aa> <== NEVER TAKEN 47240: 2068 001c moveal %a0@(28),%a0 47244: 4a88 tstl %a0 47246: 6706 beqs 4724e <_rename_r+0x2aa> <== NEVER TAKEN 47248: 2f03 movel %d3,%sp@- 4724a: 4e90 jsr %a0@ 4724c: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTSUP ); 4724e: 4eb9 0005 2860 jsr 52860 <__errno> 47254: 78ff moveq #-1,%d4 47256: 2040 moveal %d0,%a0 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 47258: 2004 movel %d4,%d0 4725a: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 47260: 20bc 0000 0086 movel #134,%a0@ if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 47266: 4e5e unlk %fp ... =============================================================================== 00045282 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 45282: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 45286: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 4528a: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 45290: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 45294: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 45296: 4ef9 0004 519c jmp 4519c <== NOT EXECUTED =============================================================================== 0004ec3e <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4ec3e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4ec42: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4ec48: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4ec4a: 4ef9 0004 ea54 jmp 4ea54 <== NOT EXECUTED =============================================================================== 0005c594 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5c594: 4e56 0000 linkw %fp,#0 5c598: 222e 0010 movel %fp@(16),%d1 5c59c: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 5c5a0: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5c5a6: 2d41 000c movel %d1,%fp@(12) 5c5aa: 2d40 0008 movel %d0,%fp@(8) } 5c5ae: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5c5b0: 4ef9 0005 c6d4 jmp 5c6d4 ... =============================================================================== 00044820 : int access( const char *path, int amode ) { 44820: 4e56 ffb8 linkw %fp,#-72 44824: 2f02 movel %d2,%sp@- struct stat statbuf; if ( stat(path, &statbuf) ) 44826: 486e ffba pea %fp@(-70) 4482a: 2f2e 0008 movel %fp@(8),%sp@- int access( const char *path, int amode ) { 4482e: 242e 000c movel %fp@(12),%d2 struct stat statbuf; if ( stat(path, &statbuf) ) 44832: 4eb9 0004 6640 jsr 46640 44838: 508f addql #8,%sp 4483a: 4a80 tstl %d0 4483c: 6626 bnes 44864 return -1; if ( amode & R_OK ) { 4483e: 44c2 movew %d2,%ccr 44840: 6716 beqs 44858 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 44842: 0802 0001 btst #1,%d2 44846: 6626 bnes 4486e if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 44848: 0802 0000 btst #0,%d2 4484c: 6632 bnes 44880 if ( !( statbuf.st_mode & S_IEXEC ) ) 4484e: 4280 clrl %d0 return -1; } return 0; } 44850: 242e ffb4 movel %fp@(-76),%d2 44854: 4e5e unlk %fp 44856: 4e75 rts if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 44858: 202e ffc6 movel %fp@(-58),%d0 4485c: 0280 0000 0100 andil #256,%d0 44862: 66de bnes 44842 if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 44864: 242e ffb4 movel %fp@(-76),%d2 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 44868: 70ff moveq #-1,%d0 return -1; } return 0; } 4486a: 4e5e unlk %fp 4486c: 4e75 rts if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 4486e: 202e ffc6 movel %fp@(-58),%d0 44872: 0280 0000 0080 andil #128,%d0 44878: 67ea beqs 44864 return -1; } if ( amode & X_OK ) { 4487a: 0802 0000 btst #0,%d2 4487e: 67ce beqs 4484e <== NEVER TAKEN if ( !( statbuf.st_mode & S_IEXEC ) ) 44880: 7040 moveq #64,%d0 44882: c0ae ffc6 andl %fp@(-58),%d0 44886: 67dc beqs 44864 44888: 4280 clrl %d0 4488a: 60c4 bras 44850 =============================================================================== 00042918 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 42918: 4e56 0000 linkw %fp,#0 length = nelem * elsize; 4291c: 41ee 0008 lea %fp@(8),%a0 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 42920: 52b9 0005 fccc addql #1,5fccc 42926: 2f03 movel %d3,%sp@- length = nelem * elsize; 42928: 262e 000c movel %fp@(12),%d3 4292c: 4c10 3800 mulsl %a0@,%d3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 42930: 2f02 movel %d2,%sp@- length = nelem * elsize; cptr = malloc( length ); 42932: 2f03 movel %d3,%sp@- 42934: 4eb9 0004 3108 jsr 43108 if ( cptr ) 4293a: 588f addql #4,%sp size_t length; MSBUMP(calloc_calls, 1); length = nelem * elsize; cptr = malloc( length ); 4293c: 2400 movel %d0,%d2 if ( cptr ) 4293e: 6710 beqs 42950 <== NEVER TAKEN memset( cptr, '\0', length ); 42940: 2f03 movel %d3,%sp@- 42942: 42a7 clrl %sp@- 42944: 2f00 movel %d0,%sp@- 42946: 4eb9 0004 fa48 jsr 4fa48 4294c: 4fef 000c lea %sp@(12),%sp MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ return cptr; } 42950: 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 */ 42952: 53b9 0005 fcbc subql #1,5fcbc return cptr; } 42958: 242e fff8 movel %fp@(-8),%d2 4295c: 262e fffc movel %fp@(-4),%d3 42960: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c8d4 : #include int chdir( const char *pathname ) { 4c8d4: 4e56 ffec linkw %fp,#-20 4c8d8: 2f0a movel %a2,%sp@- 4c8da: 2f02 movel %d2,%sp@- 4c8dc: 242e 0008 movel %fp@(8),%d2 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 4c8e0: 6700 0098 beqw 4c97a rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4c8e4: 2f02 movel %d2,%sp@- 4c8e6: 45ee ffec lea %fp@(-20),%a2 4c8ea: 4eb9 0005 101c jsr 5101c 4c8f0: 7201 moveq #1,%d1 4c8f2: 2e81 movel %d1,%sp@ 4c8f4: 2f0a movel %a2,%sp@- 4c8f6: 4878 0001 pea 1 4c8fa: 2f00 movel %d0,%sp@- 4c8fc: 2f02 movel %d2,%sp@- 4c8fe: 4eb9 0004 3220 jsr 43220 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4c904: 4fef 0014 lea %sp@(20),%sp 4c908: 4a80 tstl %d0 4c90a: 6660 bnes 4c96c return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4c90c: 226e fff8 moveal %fp@(-8),%a1 4c910: 2069 0010 moveal %a1@(16),%a0 4c914: 4a88 tstl %a0 4c916: 6700 00ac beqw 4c9c4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4c91a: 2f0a movel %a2,%sp@- 4c91c: 4e90 jsr %a0@ 4c91e: 588f addql #4,%sp 4c920: 7201 moveq #1,%d1 4c922: b280 cmpl %d0,%d1 4c924: 666e bnes 4c994 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 4c926: 2079 0005 f198 moveal 5f198 ,%a0 4c92c: 2268 0010 moveal %a0@(16),%a1 4c930: 4a89 tstl %a1 4c932: 6716 beqs 4c94a <== NEVER TAKEN 4c934: 2269 001c moveal %a1@(28),%a1 4c938: 4a89 tstl %a1 4c93a: 670e beqs 4c94a <== NEVER TAKEN 4c93c: 4868 0004 pea %a0@(4) 4c940: 4e91 jsr %a1@ 4c942: 2079 0005 f198 moveal 5f198 ,%a0 4c948: 588f addql #4,%sp rtems_filesystem_current = loc; 4c94a: 5888 addql #4,%a0 4c94c: 4280 clrl %d0 4c94e: 20d2 movel %a2@,%a0@+ 4c950: 20ee fff0 movel %fp@(-16),%a0@+ 4c954: 20ee fff4 movel %fp@(-12),%a0@+ 4c958: 20ee fff8 movel %fp@(-8),%a0@+ return 0; } 4c95c: 242e ffe4 movel %fp@(-28),%d2 rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 4c960: 20ae fffc movel %fp@(-4),%a0@ return 0; } 4c964: 246e ffe8 moveal %fp@(-24),%a2 4c968: 4e5e unlk %fp 4c96a: 4e75 rts 4c96c: 242e ffe4 movel %fp@(-28),%d2 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4c970: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4c972: 246e ffe8 moveal %fp@(-24),%a2 4c976: 4e5e unlk %fp 4c978: 4e75 rts { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 4c97a: 4eb9 0004 fca0 jsr 4fca0 <__errno> 4c980: 740e moveq #14,%d2 4c982: 2040 moveal %d0,%a0 4c984: 70ff moveq #-1,%d0 4c986: 2082 movel %d2,%a0@ rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4c988: 242e ffe4 movel %fp@(-28),%d2 4c98c: 246e ffe8 moveal %fp@(-24),%a2 4c990: 4e5e unlk %fp 4c992: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 4c994: 206e fff8 moveal %fp@(-8),%a0 4c998: 4a88 tstl %a0 4c99a: 670e beqs 4c9aa <== NEVER TAKEN 4c99c: 2068 001c moveal %a0@(28),%a0 4c9a0: 4a88 tstl %a0 4c9a2: 6706 beqs 4c9aa <== NEVER TAKEN 4c9a4: 2f0a movel %a2,%sp@- 4c9a6: 4e90 jsr %a0@ 4c9a8: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 4c9aa: 4eb9 0004 fca0 jsr 4fca0 <__errno> rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4c9b0: 242e ffe4 movel %fp@(-28),%d2 rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); 4c9b4: 2040 moveal %d0,%a0 4c9b6: 7214 moveq #20,%d1 4c9b8: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4c9ba: 246e ffe8 moveal %fp@(-24),%a2 4c9be: 4e5e unlk %fp rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); 4c9c0: 2081 movel %d1,%a0@ rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4c9c2: 4e75 rts /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 4c9c4: 2069 001c moveal %a1@(28),%a0 4c9c8: 4a88 tstl %a0 <== NOT EXECUTED 4c9ca: 6706 beqs 4c9d2 <== NOT EXECUTED 4c9cc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c9ce: 4e90 jsr %a0@ <== NOT EXECUTED 4c9d0: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4c9d2: 4eb9 0004 fca0 jsr 4fca0 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4c9d8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4c9dc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c9de: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4c9e0: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 4c9e4: 4e5e unlk %fp <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4c9e6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } ... =============================================================================== 00044af8 : int chmod( const char *path, mode_t mode ) { 44af8: 4e56 ffec linkw %fp,#-20 44afc: 2f03 movel %d3,%sp@- 44afe: 262e 0008 movel %fp@(8),%d3 44b02: 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 ); 44b04: 240e movel %fp,%d2 44b06: 0682 ffff ffec addil #-20,%d2 44b0c: 2f03 movel %d3,%sp@- 44b0e: 4eb9 0005 3c14 jsr 53c14 44b14: 7201 moveq #1,%d1 44b16: 2e81 movel %d1,%sp@ 44b18: 2f02 movel %d2,%sp@- 44b1a: 42a7 clrl %sp@- 44b1c: 2f00 movel %d0,%sp@- 44b1e: 2f03 movel %d3,%sp@- 44b20: 4eb9 0004 5084 jsr 45084 if ( status != 0 ) 44b26: 4fef 0014 lea %sp@(20),%sp 44b2a: 4a80 tstl %d0 44b2c: 6640 bnes 44b6e return -1; if ( !loc.handlers ){ 44b2e: 206e fff4 moveal %fp@(-12),%a0 44b32: 4a88 tstl %a0 44b34: 677c beqs 44bb2 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 44b36: 2068 001c moveal %a0@(28),%a0 44b3a: 4a88 tstl %a0 44b3c: 6740 beqs 44b7e <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 44b3e: 2f2e 000c movel %fp@(12),%sp@- 44b42: 2f02 movel %d2,%sp@- 44b44: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 44b46: 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 ); 44b4a: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 44b4c: 508f addql #8,%sp 44b4e: 4a88 tstl %a0 44b50: 670e beqs 44b60 <== NEVER TAKEN 44b52: 2068 001c moveal %a0@(28),%a0 44b56: 4a88 tstl %a0 44b58: 6706 beqs 44b60 <== NEVER TAKEN 44b5a: 2f02 movel %d2,%sp@- 44b5c: 4e90 jsr %a0@ 44b5e: 588f addql #4,%sp return result; } 44b60: 2003 movel %d3,%d0 44b62: 242e ffe4 movel %fp@(-28),%d2 44b66: 262e ffe8 movel %fp@(-24),%d3 44b6a: 4e5e unlk %fp 44b6c: 4e75 rts int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) 44b6e: 76ff moveq #-1,%d3 result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44b70: 2003 movel %d3,%d0 44b72: 242e ffe4 movel %fp@(-28),%d2 44b76: 262e ffe8 movel %fp@(-24),%d3 44b7a: 4e5e unlk %fp 44b7c: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 44b7e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44b82: 4a88 tstl %a0 <== NOT EXECUTED 44b84: 670e beqs 44b94 <== NOT EXECUTED 44b86: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44b8a: 4a88 tstl %a0 <== NOT EXECUTED 44b8c: 6706 beqs 44b94 <== NOT EXECUTED 44b8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44b90: 4e90 jsr %a0@ <== NOT EXECUTED 44b92: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44b94: 4eb9 0005 2200 jsr 52200 <__errno> <== NOT EXECUTED 44b9a: 76ff moveq #-1,%d3 <== NOT EXECUTED 44b9c: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44b9e: 2003 movel %d3,%d0 <== NOT EXECUTED 44ba0: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 44ba4: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 44ba8: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 44baa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44bb0: 4e75 rts <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 44bb2: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44bb6: 4a88 tstl %a0 <== NOT EXECUTED 44bb8: 670e beqs 44bc8 <== NOT EXECUTED 44bba: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44bbe: 4a88 tstl %a0 <== NOT EXECUTED 44bc0: 6706 beqs 44bc8 <== NOT EXECUTED 44bc2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44bc4: 4e90 jsr %a0@ <== NOT EXECUTED 44bc6: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 44bc8: 4eb9 0005 2200 jsr 52200 <__errno> <== NOT EXECUTED 44bce: 76ff moveq #-1,%d3 <== NOT EXECUTED 44bd0: 2040 moveal %d0,%a0 <== NOT EXECUTED 44bd2: 7009 moveq #9,%d0 <== NOT EXECUTED 44bd4: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44bd6: 2003 movel %d3,%d0 <== NOT EXECUTED 44bd8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 44bdc: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 44be0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044be4 : int chown( const char *path, uid_t owner, gid_t group ) { 44be4: 4e56 ffdc linkw %fp,#-36 44be8: 48d7 003c moveml %d2-%d5,%sp@ 44bec: 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 ) ) 44bf0: 240e movel %fp,%d2 44bf2: 0682 ffff ffec addil #-20,%d2 44bf8: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 44bfa: 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 ) ) 44bfe: 4eb9 0005 3c14 jsr 53c14 44c04: 7201 moveq #1,%d1 44c06: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 44c08: 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 ) ) 44c0c: 2f02 movel %d2,%sp@- 44c0e: 42a7 clrl %sp@- 44c10: 2f00 movel %d0,%sp@- 44c12: 2f03 movel %d3,%sp@- 44c14: 4eb9 0004 5084 jsr 45084 44c1a: 4fef 0014 lea %sp@(20),%sp 44c1e: 4a80 tstl %d0 44c20: 6640 bnes 44c62 return -1; if ( !loc.ops->chown_h ) { 44c22: 226e fff8 moveal %fp@(-8),%a1 44c26: 2069 0018 moveal %a1@(24),%a0 44c2a: 4a88 tstl %a0 44c2c: 6742 beqs 44c70 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 44c2e: 3f05 movew %d5,%sp@- 44c30: 4267 clrw %sp@- 44c32: 3f04 movew %d4,%sp@- 44c34: 4267 clrw %sp@- 44c36: 2f02 movel %d2,%sp@- 44c38: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 44c3a: 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 ); 44c3e: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 44c40: 4fef 000c lea %sp@(12),%sp 44c44: 4a88 tstl %a0 44c46: 670e beqs 44c56 <== NEVER TAKEN 44c48: 2068 001c moveal %a0@(28),%a0 44c4c: 4a88 tstl %a0 44c4e: 6706 beqs 44c56 <== NEVER TAKEN 44c50: 2f02 movel %d2,%sp@- 44c52: 4e90 jsr %a0@ 44c54: 588f addql #4,%sp return result; } 44c56: 2003 movel %d3,%d0 44c58: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 44c5e: 4e5e unlk %fp 44c60: 4e75 rts ) { rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 44c62: 76ff moveq #-1,%d3 result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 44c64: 2003 movel %d3,%d0 44c66: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 44c6c: 4e5e unlk %fp 44c6e: 4e75 rts if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 44c70: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 44c74: 4a88 tstl %a0 <== NOT EXECUTED 44c76: 6706 beqs 44c7e <== NOT EXECUTED 44c78: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44c7a: 4e90 jsr %a0@ <== NOT EXECUTED 44c7c: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44c7e: 4eb9 0005 2200 jsr 52200 <__errno> <== NOT EXECUTED 44c84: 76ff moveq #-1,%d3 <== NOT EXECUTED 44c86: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 44c88: 2003 movel %d3,%d0 <== NOT EXECUTED 44c8a: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 44c90: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 44c96: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042cac : #include int chroot( const char *pathname ) { 42cac: 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) { 42cb0: 203c 0006 0770 movel #395120,%d0 #include int chroot( const char *pathname ) { 42cb6: 2f0b movel %a3,%sp@- 42cb8: 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) { 42cba: b0b9 0005 f198 cmpl 5f198 ,%d0 42cc0: 6700 0086 beqw 42d48 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 42cc4: 2f2e 0008 movel %fp@(8),%sp@- 42cc8: 4eb9 0004 c8d4 jsr 4c8d4 if (result) { 42cce: 588f addql #4,%sp 42cd0: 4a80 tstl %d0 42cd2: 6600 00a6 bnew 42d7a rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 42cd6: 42a7 clrl %sp@- 42cd8: 45ee ffec lea %fp@(-20),%a2 42cdc: 2f0a movel %a2,%sp@- 42cde: 42a7 clrl %sp@- 42ce0: 4878 0001 pea 1 42ce4: 4879 0005 e3c3 pea 5e3c3 <__FUNCTION__.5393+0x18> 42cea: 4eb9 0004 3220 jsr 43220 42cf0: 4fef 0014 lea %sp@(20),%sp 42cf4: 4a80 tstl %d0 42cf6: 6600 0082 bnew 42d7a /* 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); 42cfa: 2079 0005 f198 moveal 5f198 ,%a0 42d00: 2268 0024 moveal %a0@(36),%a1 42d04: 4a89 tstl %a1 42d06: 6716 beqs 42d1e <== NEVER TAKEN 42d08: 2269 001c moveal %a1@(28),%a1 42d0c: 4a89 tstl %a1 42d0e: 670e beqs 42d1e <== NEVER TAKEN 42d10: 4868 0018 pea %a0@(24) 42d14: 4e91 jsr %a1@ 42d16: 2079 0005 f198 moveal 5f198 ,%a0 42d1c: 588f addql #4,%sp rtems_filesystem_root = loc; 42d1e: 2152 0018 movel %a2@,%a0@(24) 42d22: 4280 clrl %d0 42d24: 216e fff0 001c movel %fp@(-16),%a0@(28) 42d2a: 216e fff4 0020 movel %fp@(-12),%a0@(32) 42d30: 216e fff8 0024 movel %fp@(-8),%a0@(36) return 0; } 42d36: 246e ffe4 moveal %fp@(-28),%a2 42d3a: 266e ffe8 moveal %fp@(-24),%a3 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; 42d3e: 216e fffc 0028 movel %fp@(-4),%a0@(40) return 0; } 42d44: 4e5e unlk %fp 42d46: 4e75 rts int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 42d48: 4eb9 0004 45bc jsr 445bc if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 42d4e: 203c 0006 0770 movel #395120,%d0 42d54: b0b9 0005 f198 cmpl 5f198 ,%d0 42d5a: 6600 ff68 bnew 42cc4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 42d5e: 4eb9 0004 fca0 jsr 4fca0 <__errno> <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42d64: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 42d68: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d6a: 70ff moveq #-1,%d0 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42d6c: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42d70: 4e5e unlk %fp <== NOT EXECUTED /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 42d72: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42d78: 4e75 rts <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 42d7a: 45f9 0004 fca0 lea 4fca0 <__errno>,%a2 <== NOT EXECUTED 42d80: 4e92 jsr %a2@ <== NOT EXECUTED 42d82: 2640 moveal %d0,%a3 <== NOT EXECUTED 42d84: 4e92 jsr %a2@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42d86: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 42d8a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d8c: 70ff moveq #-1,%d0 <== NOT EXECUTED 42d8e: 2690 movel %a0@,%a3@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42d90: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42d94: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ba7c : #include int close( int fd ) { 4ba7c: 4e56 0000 linkw %fp,#0 4ba80: 202e 0008 movel %fp@(8),%d0 4ba84: 2f0a movel %a2,%sp@- 4ba86: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 4ba88: b0b9 0005 e5f4 cmpl 5e5f4 ,%d0 4ba8e: 645e bccs 4baee iop = rtems_libio_iop(fd); 4ba90: 2479 0005 fca0 moveal 5fca0 ,%a2 4ba96: ed88 lsll #6,%d0 4ba98: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4ba9a: 202a 0014 movel %a2@(20),%d0 4ba9e: 0280 0000 0100 andil #256,%d0 4baa4: 6748 beqs 4baee rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4baa6: 206a 003c moveal %a2@(60),%a0 4baaa: 2068 0004 moveal %a0@(4),%a0 4baae: 4a88 tstl %a0 4bab0: 6738 beqs 4baea <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 4bab2: 2f0a movel %a2,%sp@- 4bab4: 4e90 jsr %a0@ 4bab6: 588f addql #4,%sp 4bab8: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 4baba: 206a 0024 moveal %a2@(36),%a0 4babe: 4a88 tstl %a0 4bac0: 6710 beqs 4bad2 <== NEVER TAKEN 4bac2: 2068 001c moveal %a0@(28),%a0 4bac6: 4a88 tstl %a0 4bac8: 6708 beqs 4bad2 4baca: 486a 0018 pea %a2@(24) 4bace: 4e90 jsr %a0@ 4bad0: 588f addql #4,%sp rtems_libio_free( iop ); 4bad2: 2f0a movel %a2,%sp@- 4bad4: 4eb9 0004 bd4e jsr 4bd4e return rc; } 4bada: 246e fffc moveal %fp@(-4),%a2 4bade: 2002 movel %d2,%d0 rc = (*iop->handlers->close_h)( iop ); rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; 4bae0: 588f addql #4,%sp } 4bae2: 242e fff8 movel %fp@(-8),%d2 4bae6: 4e5e unlk %fp 4bae8: 4e75 rts rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4baea: 4282 clrl %d2 <== NOT EXECUTED 4baec: 60cc bras 4baba <== NOT EXECUTED rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 4baee: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4baf4: 74ff moveq #-1,%d2 4baf6: 2040 moveal %d0,%a0 4baf8: 7009 moveq #9,%d0 4bafa: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; } 4bafc: 2002 movel %d2,%d0 4bafe: 242e fff8 movel %fp@(-8),%d2 4bb02: 246e fffc moveal %fp@(-4),%a2 4bb06: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049788 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 49788: 4e56 fff4 linkw %fp,#-12 4978c: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 49790: 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; 49794: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 49798: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4979c: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 497a0: 2f29 000c movel %a1@(12),%sp@- 497a4: 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; 497a8: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 497ac: 4eb9 0004 a734 jsr 4a734 np->major, np->minor, (void *) &args ); if ( status ) { 497b2: 4fef 000c lea %sp@(12),%sp 497b6: 4a80 tstl %d0 497b8: 6604 bnes 497be <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 497ba: 4e5e unlk %fp 497bc: 4e75 rts np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 497be: 2f00 movel %d0,%sp@- <== NOT EXECUTED 497c0: 4eb9 0004 98bc jsr 498bc <== NOT EXECUTED 497c6: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 497c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000497de : { int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 497de: 70f8 moveq #-8,%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 497e0: 4e56 ffdc linkw %fp,#-36 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 497e4: c0ae 0010 andl %fp@(16),%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 497e8: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 497ec: 2c2e 0008 movel %fp@(8),%d6 497f0: 262e 000c movel %fp@(12),%d3 497f4: 286e 0014 moveal %fp@(20),%a4 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 497f8: 4a80 tstl %d0 497fa: 6600 0090 bnew 4988c rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 497fe: 2814 movel %a4@,%d4 if (!device_name_table) 49800: 6700 00a2 beqw 498a4 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 49804: 2a39 0005 9c98 movel 59c98 ,%d5 4980a: 673c beqs 49848 <== NEVER TAKEN 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 ); 4980c: 4280 clrl %d0 4980e: 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) 49810: 4bf9 0004 c9b0 lea 4c9b0 ,%a5 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 49816: 2200 movel %d0,%d1 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 49818: 5282 addql #1,%d2 if (!device_name_table[i].device_name) 4981a: e989 lsll #4,%d1 4981c: 2041 moveal %d1,%a0 4981e: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 49822: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 49826: 2453 moveal %a3@,%a2 49828: 4a8a tstl %a2 4982a: 6716 beqs 49842 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4982c: 2f03 movel %d3,%sp@- 4982e: 2f0a movel %a2,%sp@- 49830: 2f06 movel %d6,%sp@- 49832: 4e95 jsr %a5@ 49834: 4fef 000c lea %sp@(12),%sp 49838: 4a80 tstl %d0 4983a: 6606 bnes 49842 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4983c: 4a32 3800 tstb %a2@(00000000,%d3:l) 49840: 671e beqs 49860 <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 49842: 2002 movel %d2,%d0 49844: b485 cmpl %d5,%d2 49846: 65ce bcss 49816 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 49848: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> 4984e: 7202 moveq #2,%d1 49850: 2040 moveal %d0,%a0 49852: 70ff moveq #-1,%d0 } 49854: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4985a: 2081 movel %d1,%a0@ } 4985c: 4e5e unlk %fp 4985e: 4e75 rts /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 49860: 2079 0005 9e18 moveal 59e18 ,%a0 49866: 2968 0028 0010 movel %a0@(40),%a4@(16) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 4986c: 223c 0005 9dc0 movel #368064,%d1 pathloc->ops = &devFS_ops; 49872: 41f9 0005 9d78 lea 59d78 ,%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; 49878: 2941 0008 movel %d1,%a4@(8) pathloc->ops = &devFS_ops; 4987c: 2948 000c movel %a0,%a4@(12) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 49880: 288b movel %a3,%a4@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 49882: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 49888: 4e5e unlk %fp 4988a: 4e75 rts int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4988c: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> <== NOT EXECUTED 49892: 7601 moveq #1,%d3 <== NOT EXECUTED 49894: 2040 moveal %d0,%a0 <== NOT EXECUTED 49896: 70ff moveq #-1,%d0 <== NOT EXECUTED 49898: 2083 movel %d3,%a0@ <== NOT EXECUTED return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4989a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 498a0: 4e5e unlk %fp <== NOT EXECUTED 498a2: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 498a4: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> <== NOT EXECUTED 498aa: 740e moveq #14,%d2 <== NOT EXECUTED 498ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 498ae: 70ff moveq #-1,%d0 <== NOT EXECUTED 498b0: 2082 movel %d2,%a0@ <== NOT EXECUTED return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 498b2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 498b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042028 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 42028: 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( 4202c: 2039 0005 9c98 movel 59c98 ,%d0 42032: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 42034: 2f0a movel %a2,%sp@- 42036: 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( 4203a: e989 lsll #4,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 4203c: 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( 4203e: 2041 moveal %d1,%a0 42040: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42044: 4eb9 0004 9544 jsr 49544 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 4204a: 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( 4204c: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 4204e: 6744 beqs 42094 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 42050: 2039 0005 9c98 movel 59c98 ,%d0 42056: 2200 movel %d0,%d1 42058: e989 lsll #4,%d1 4205a: 2041 moveal %d1,%a0 4205c: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42060: 42a7 clrl %sp@- 42062: 2f02 movel %d2,%sp@- 42064: 4eb9 0004 bef8 jsr 4bef8 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; 4206a: 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; 4206e: 203c 0005 9dc0 movel #368064,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 42074: 41f9 0005 9d78 lea 59d78 ,%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; 4207a: 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; 4207e: 4280 clrl %d0 42080: 2542 001c movel %d2,%a2@(28) return 0; } 42084: 242e fff8 movel %fp@(-8),%d2 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; 42088: 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; return 0; } 4208c: 246e fffc moveal %fp@(-4),%a2 42090: 4e5e unlk %fp 42092: 4e75 rts sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 42094: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 4209a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 4209e: 2040 moveal %d0,%a0 <== NOT EXECUTED 420a0: 720c moveq #12,%d1 <== NOT EXECUTED 420a2: 70ff moveq #-1,%d0 <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 420a4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 420a8: 4e5e unlk %fp <== NOT EXECUTED sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 420aa: 2081 movel %d1,%a0@ <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } ... =============================================================================== 00042224 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 42224: 4e56 fff0 linkw %fp,#-16 42228: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 4222c: 486e fff0 pea %fp@(-16) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 42230: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.command = command; 42234: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; status = rtems_io_control( 4223a: 2f29 000c movel %a1@(12),%sp@- 4223e: 2f29 0008 movel %a1@(8),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; args.buffer = buffer; 42242: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 42248: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 4224c: 4eb9 0004 6804 jsr 46804 np->major, np->minor, (void *) &args ); if ( status ) 42252: 4fef 000c lea %sp@(12),%sp 42256: 4a80 tstl %d0 42258: 6608 bnes 42262 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 4225a: 202e fffc movel %fp@(-4),%d0 } 4225e: 4e5e unlk %fp 42260: 4e75 rts np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 42262: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42264: 4eb9 0004 98bc jsr 498bc <== NOT EXECUTED 4226a: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4226c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000420b0 : * 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') && 420b0: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420b2: 4e56 ffdc linkw %fp,#-36 420b6: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 420ba: 266e 0008 moveal %fp@(8),%a3 * 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') && 420be: 1013 moveb %a3@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420c0: 2a2e 000c movel %fp@(12),%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') && 420c4: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420c6: 2e2e 0010 movel %fp@(16),%d7 420ca: 2c2e 0014 movel %fp@(20),%d6 * 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') && 420ce: b280 cmpl %d0,%d1 420d0: 6700 00d0 beqw 421a2 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 420d4: 2005 movel %d5,%d0 420d6: 0280 0000 f000 andil #61440,%d0 420dc: 0c80 0000 6000 cmpil #24576,%d0 420e2: 670a beqs 420ee <== NEVER TAKEN 420e4: 0c80 0000 2000 cmpil #8192,%d0 420ea: 6600 00e2 bnew 421ce rtems_set_errno_and_return_minus_one( EINVAL ); 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; 420ee: 206e 0018 moveal %fp@(24),%a0 420f2: 2450 moveal %a0@,%a2 if (!device_name_table) 420f4: 4a8a tstl %a2 420f6: 6700 0106 beqw 421fe rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 420fa: 2639 0005 9c98 movel 59c98 ,%d3 42100: 6700 00e4 beqw 421e6 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 ); 42104: 4280 clrl %d0 42106: 78ff moveq #-1,%d4 42108: 4282 clrl %d2 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) 4210a: 49f9 0004 c4d4 lea 4c4d4 ,%a4 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++){ if (device_name_table[i].device_name == NULL) 42110: 2200 movel %d0,%d1 42112: e989 lsll #4,%d1 42114: 2241 moveal %d1,%a1 42116: 41f1 0c00 lea %a1@(00000000,%d0:l:4),%a0 4211a: 2030 a800 movel %a0@(00000000,%a2:l),%d0 4211e: 675e beqs 4217e slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 42120: 2f00 movel %d0,%sp@- 42122: 2f0b movel %a3,%sp@- 42124: 4e94 jsr %a4@ 42126: 508f addql #8,%sp 42128: 4a80 tstl %d0 4212a: 675e beqs 4218a <== NEVER TAKEN /* 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++){ 4212c: 5282 addql #1,%d2 4212e: 2002 movel %d2,%d0 42130: b682 cmpl %d2,%d3 42132: 62dc bhis 42110 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 42134: 70ff moveq #-1,%d0 42136: b084 cmpl %d4,%d0 42138: 6700 00ac beqw 421e6 rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 4213c: 203c 0000 0700 movel #1792,%d0 42142: 40c2 movew %sr,%d2 42144: 8082 orl %d2,%d0 42146: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 42148: 2004 movel %d4,%d0 4214a: e988 lsll #4,%d0 4214c: 2240 moveal %d0,%a1 4214e: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 42152: d5c8 addal %a0,%a2 42154: 248b movel %a3,%a2@ device_name_table[slot].device_name_length = strlen(path); 42156: 2f0b movel %a3,%sp@- 42158: 4eb9 0004 c998 jsr 4c998 4215e: 588f addql #4,%sp device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 42160: 2545 0010 movel %d5,%a2@(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); 42164: 2540 0004 movel %d0,%a2@(4) device_name_table[slot].major = major; 42168: 2547 0008 movel %d7,%a2@(8) device_name_table[slot].minor = minor; 4216c: 2546 000c movel %d6,%a2@(12) device_name_table[slot].mode = mode; _ISR_Enable(level); 42170: 46c2 movew %d2,%sr 42172: 4280 clrl %d0 return 0; } 42174: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4217a: 4e5e unlk %fp 4217c: 4e75 rts 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) rtems_set_errno_and_return_minus_one( EEXIST ); 4217e: 2802 movel %d2,%d4 /* 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++){ 42180: 5282 addql #1,%d2 42182: 2002 movel %d2,%d0 42184: b682 cmpl %d2,%d3 42186: 6288 bhis 42110 42188: 60aa bras 42134 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 4218a: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> <== NOT EXECUTED 42190: 7411 moveq #17,%d2 <== NOT EXECUTED 42192: 2040 moveal %d0,%a0 <== NOT EXECUTED 42194: 70ff moveq #-1,%d0 <== NOT EXECUTED 42196: 2082 movel %d2,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 42198: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4219e: 4e5e unlk %fp <== NOT EXECUTED 421a0: 4e75 rts <== NOT EXECUTED * 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') && 421a2: 123c 0065 moveb #101,%d1 421a6: 102b 0001 moveb %a3@(1),%d0 421aa: 49c0 extbl %d0 421ac: b280 cmpl %d0,%d1 421ae: 6600 ff24 bnew 420d4 (path[2] == 'v') && (path[3] == '\0')) 421b2: 123c 0076 moveb #118,%d1 421b6: 102b 0002 moveb %a3@(2),%d0 421ba: 49c0 extbl %d0 421bc: b280 cmpl %d0,%d1 421be: 6600 ff14 bnew 420d4 421c2: 4a2b 0003 tstb %a3@(3) 421c6: 6600 ff0c bnew 420d4 device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); 421ca: 4280 clrl %d0 421cc: 60a6 bras 42174 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 421ce: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> <== NOT EXECUTED 421d4: 7816 moveq #22,%d4 <== NOT EXECUTED 421d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 421d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 421da: 2084 movel %d4,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421dc: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 421e2: 4e5e unlk %fp <== NOT EXECUTED 421e4: 4e75 rts <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 421e6: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> <== NOT EXECUTED 421ec: 720c moveq #12,%d1 <== NOT EXECUTED 421ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 421f0: 70ff moveq #-1,%d0 <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421f2: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 421f8: 2081 movel %d1,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421fa: 4e5e unlk %fp <== NOT EXECUTED 421fc: 4e75 rts <== NOT EXECUTED 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 ); 421fe: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> <== NOT EXECUTED 42204: 760e moveq #14,%d3 <== NOT EXECUTED 42206: 2040 moveal %d0,%a0 <== NOT EXECUTED 42208: 70ff moveq #-1,%d0 <== NOT EXECUTED 4220a: 2083 movel %d3,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 4220c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 42212: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042270 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 42270: 4e56 fff4 linkw %fp,#-12 42274: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 42278: 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; 4227c: 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; 42282: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 42286: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) status = rtems_io_open( 4228c: 2f29 000c movel %a1@(12),%sp@- 42290: 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; 42294: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 42298: 4eb9 0004 6950 jsr 46950 np->major, np->minor, (void *) &args ); if ( status ) 4229e: 4fef 000c lea %sp@(12),%sp 422a2: 4a80 tstl %d0 422a4: 6604 bnes 422aa <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 422a6: 4e5e unlk %fp 422a8: 4e75 rts np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 422aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 422ac: 4eb9 0004 98bc jsr 498bc <== NOT EXECUTED 422b2: 588f addql #4,%sp <== NOT EXECUTED return 0; } 422b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000422b8 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 422b8: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 422bc: 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( 422c0: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 422c4: 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; 422ca: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 422ce: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 422d4: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 422d8: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 422dc: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 422e0: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 422e6: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 422ea: 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; 422ee: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 422f2: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 422f6: 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( 422fa: 4eb9 0004 69ac jsr 469ac <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 42300: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42304: 4a80 tstl %d0 <== NOT EXECUTED 42306: 6608 bnes 42310 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 42308: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4230c: 4e5e unlk %fp <== NOT EXECUTED 4230e: 4e75 rts <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 42310: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42312: 4eb9 0004 98bc jsr 498bc <== NOT EXECUTED 42318: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4231a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042320 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 42320: 4e56 0000 linkw %fp,#0 42324: 206e 0008 moveal %fp@(8),%a0 42328: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 4232c: 2050 moveal %a0@,%a0 if (!the_dev) 4232e: 4a88 tstl %a0 42330: 671a beqs 4234c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 42332: 2228 000c movel %a0@(12),%d1 buf->st_mode = the_dev->mode; 42336: 4280 clrl %d0 return 0; } 42338: 4e5e unlk %fp 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 ); 4233a: 2368 0008 0016 movel %a0@(8),%a1@(22) buf->st_mode = the_dev->mode; 42340: 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 ); 42346: 2341 001a movel %d1,%a1@(26) buf->st_mode = the_dev->mode; return 0; } 4234a: 4e75 rts { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 4234c: 4eb9 0004 b6a8 jsr 4b6a8 <__errno> <== NOT EXECUTED 42352: 720e moveq #14,%d1 <== NOT EXECUTED 42354: 2040 moveal %d0,%a0 <== NOT EXECUTED 42356: 70ff moveq #-1,%d0 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; return 0; } 42358: 4e5e unlk %fp <== NOT EXECUTED { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 4235a: 2081 movel %d1,%a0@ <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; return 0; } ... =============================================================================== 00042360 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 42360: 4e56 ffe4 linkw %fp,#-28 42364: 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( 42368: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4236c: 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; 42372: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 42376: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) args.flags = iop->flags; args.bytes_moved = 0; 4237c: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 42380: 2f29 000c movel %a1@(12),%sp@- 42384: 2f29 0008 movel %a1@(8),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 42388: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 4238e: 2028 000c movel %a0@(12),%d0 42392: 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; 42396: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4239a: 2d40 ffe8 movel %d0,%fp@(-24) 4239e: 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( 423a2: 4eb9 0004 6a08 jsr 46a08 np->major, np->minor, (void *) &args ); if ( status ) 423a8: 4fef 000c lea %sp@(12),%sp 423ac: 4a80 tstl %d0 423ae: 6608 bnes 423b8 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 423b0: 202e fffc movel %fp@(-4),%d0 } 423b4: 4e5e unlk %fp 423b6: 4e75 rts np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 423b8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 423ba: 4eb9 0004 98bc jsr 498bc <== NOT EXECUTED 423c0: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 423c2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004e50a : */ int device_close( rtems_libio_t *iop ) { 4e50a: 4e56 fff4 linkw %fp,#-12 4e50e: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4e512: 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; 4e516: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4e51a: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4e51e: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4e522: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4e526: 2f28 0050 movel %a0@(80),%sp@- 4e52a: 2f28 004c movel %a0@(76),%sp@- 4e52e: 4eb9 0004 ede0 jsr 4ede0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4e534: 4fef 000c lea %sp@(12),%sp 4e538: 4a80 tstl %d0 4e53a: 6604 bnes 4e540 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 4e53c: 4e5e unlk %fp 4e53e: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4e540: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4e542: 4eb9 0004 f128 jsr 4f128 <== NOT EXECUTED 4e548: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4e54a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e3f2 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4e3f2: 4e56 fff0 linkw %fp,#-16 4e3f6: 226e 0008 moveal %fp@(8),%a1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4e3fa: 486e fff0 pea %fp@(-16) rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4e3fe: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4e404: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4e40a: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4e40e: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4e412: 2f28 0050 movel %a0@(80),%sp@- 4e416: 2f28 004c movel %a0@(76),%sp@- 4e41a: 4eb9 0004 ee3c jsr 4ee3c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4e420: 4fef 000c lea %sp@(12),%sp 4e424: 4a80 tstl %d0 4e426: 6608 bnes 4e430 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 4e428: 202e fffc movel %fp@(-4),%d0 } 4e42c: 4e5e unlk %fp 4e42e: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4e430: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4e432: 4eb9 0004 f128 jsr 4f128 <== NOT EXECUTED 4e438: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4e43a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e54e : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4e54e: 4e56 fff4 linkw %fp,#-12 4e552: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4e556: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4e55a: 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; 4e560: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4e564: 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; 4e56a: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4e56e: 2f29 0050 movel %a1@(80),%sp@- 4e572: 2f29 004c movel %a1@(76),%sp@- 4e576: 4eb9 0004 ee98 jsr 4ee98 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4e57c: 4fef 000c lea %sp@(12),%sp 4e580: 4a80 tstl %d0 4e582: 6604 bnes 4e588 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 4e584: 4e5e unlk %fp 4e586: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4e588: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4e58a: 4eb9 0004 f128 jsr 4f128 <== NOT EXECUTED 4e590: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4e592: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004e4a4 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4e4a4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4e4a8: 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( 4e4ac: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4e4b0: 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; 4e4b6: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4e4bc: 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; 4e4c2: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4e4c6: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4e4ca: 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; 4e4ce: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4e4d2: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4e4d6: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4e4da: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4e4de: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4e4e2: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4e4e6: 4eb9 0004 eef4 jsr 4eef4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4e4ec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4e4f0: 4a80 tstl %d0 <== NOT EXECUTED 4e4f2: 6608 bnes 4e4fc <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4e4f4: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4e4f8: 4e5e unlk %fp <== NOT EXECUTED 4e4fa: 4e75 rts <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4e4fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4e4fe: 4eb9 0004 f128 jsr 4f128 <== NOT EXECUTED 4e504: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4e506: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e43e : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4e43e: 4e56 ffe4 linkw %fp,#-28 4e442: 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( 4e446: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4e44a: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4e450: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4e456: 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; 4e45c: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4e460: 2028 000c movel %a0@(12),%d0 4e464: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4e468: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4e46c: 2d40 ffe8 movel %d0,%fp@(-24) 4e470: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4e474: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4e478: 2f29 0050 movel %a1@(80),%sp@- 4e47c: 2f29 004c movel %a1@(76),%sp@- 4e480: 4eb9 0004 ef50 jsr 4ef50 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4e486: 4fef 000c lea %sp@(12),%sp 4e48a: 4a80 tstl %d0 4e48c: 6608 bnes 4e496 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4e48e: 202e fffc movel %fp@(-4),%d0 } 4e492: 4e5e unlk %fp 4e494: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4e496: 2f00 movel %d0,%sp@- 4e498: 4eb9 0004 f128 jsr 4f128 <== NOT EXECUTED 4e49e: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4e4a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044d8e : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 44d8e: 4e56 fff4 linkw %fp,#-12 44d92: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 44d96: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 44d9a: 4aaa 00b4 tstl %a2@(180) 44d9e: 6750 beqs 44df0 rtems_interrupt_disable (level); 44da0: 243c 0000 0700 movel #1792,%d2 44da6: 2002 movel %d2,%d0 44da8: 40c1 movew %sr,%d1 44daa: 8081 orl %d1,%d0 44dac: 46c0 movew %d0,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 44dae: 206a 0084 moveal %a2@(132),%a0 44db2: 202a 0080 movel %a2@(128),%d0 44db6: b088 cmpl %a0,%d0 44db8: 6734 beqs 44dee 44dba: 47f9 0004 6704 lea 46704 ,%a3 tty->rawOutBufState = rob_wait; 44dc0: 7002 moveq #2,%d0 44dc2: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 44dc6: 46c1 movew %d1,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 44dc8: 42a7 clrl %sp@- 44dca: 42a7 clrl %sp@- 44dcc: 2f2a 008c movel %a2@(140),%sp@- 44dd0: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44dd2: 4fef 000c lea %sp@(12),%sp 44dd6: 4a80 tstl %d0 44dd8: 6620 bnes 44dfa <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 44dda: 2002 movel %d2,%d0 44ddc: 40c1 movew %sr,%d1 44dde: 8081 orl %d1,%d0 44de0: 46c0 movew %d0,%sr rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 44de2: 206a 0084 moveal %a2@(132),%a0 44de6: 202a 0080 movel %a2@(128),%d0 44dea: b088 cmpl %a0,%d0 44dec: 66d2 bnes 44dc0 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 44dee: 46c1 movew %d1,%sr } } 44df0: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44df6: 4e5e unlk %fp 44df8: 4e75 rts rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 44dfa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44dfc: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED =============================================================================== 00043368 : int dup2( int fildes, int fildes2 ) { 43368: 4e56 ffac linkw %fp,#-84 4336c: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 43370: 240e movel %fp,%d2 43372: 0682 ffff ffba addil #-70,%d2 43378: 45f9 0004 3cc0 lea 43cc0 ,%a2 4337e: 2f02 movel %d2,%sp@- int dup2( int fildes, int fildes2 ) { 43380: 262e 0008 movel %fp@(8),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 43384: 2f03 movel %d3,%sp@- 43386: 4e92 jsr %a2@ if ( status == -1 ) 43388: 508f addql #8,%sp 4338a: 72ff moveq #-1,%d1 4338c: b280 cmpl %d0,%d1 4338e: 660c bnes 4339c <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 43390: 70ff moveq #-1,%d0 } 43392: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 43398: 4e5e unlk %fp 4339a: 4e75 rts /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 4339c: 2f02 movel %d2,%sp@- 4339e: 2f2e 000c movel %fp@(12),%sp@- 433a2: 4e92 jsr %a2@ if ( status == -1 ) 433a4: 508f addql #8,%sp 433a6: 72ff moveq #-1,%d1 433a8: b280 cmpl %d0,%d1 433aa: 67e4 beqs 43390 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433ac: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 433b0: 42a7 clrl %sp@- <== NOT EXECUTED 433b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 433b4: 4eb9 0004 3858 jsr 43858 <== NOT EXECUTED 433ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 433be: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 433c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000447b0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 447b0: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 447b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447b6: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 447ba: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 447bc: 242a 003c movel %a2@(60),%d2 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 447c0: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 447c4: 0282 0000 0200 andil #512,%d2 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 447ca: 1001 moveb %d1,%d0 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 447cc: 4a82 tstl %d2 <== NOT EXECUTED 447ce: 673e beqs 4480e <== NOT EXECUTED 447d0: 1001 moveb %d1,%d0 <== NOT EXECUTED 447d2: 2079 0005 e7a0 moveal 5e7a0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 447d8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 447de: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 <== NOT EXECUTED 447e2: 49c2 extbl %d2 <== NOT EXECUTED 447e4: 0802 0005 btst #5,%d2 <== NOT EXECUTED 447e8: 670e beqs 447f8 <== NOT EXECUTED 447ea: 7409 moveq #9,%d2 <== NOT EXECUTED 447ec: b480 cmpl %d0,%d2 <== NOT EXECUTED 447ee: 6708 beqs 447f8 <== NOT EXECUTED 447f0: 143c 000a moveb #10,%d2 <== NOT EXECUTED 447f4: b480 cmpl %d0,%d2 <== NOT EXECUTED 447f6: 662a bnes 44822 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 447f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 447fc: 4eba fdd2 jsr %pc@(445d0 ) <== NOT EXECUTED 44800: 508f addql #8,%sp <== NOT EXECUTED } } 44802: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 44806: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4480a: 4e5e unlk %fp <== NOT EXECUTED 4480c: 4e75 rts <== NOT EXECUTED 4480e: 1001 moveb %d1,%d0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 44810: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44812: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44818: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4481a: 4eba fdb4 jsr %pc@(445d0 ) <== NOT EXECUTED 4481e: 508f addql #8,%sp <== NOT EXECUTED 44820: 60e0 bras 44802 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 44822: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44824: 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; 44828: 7040 moveq #64,%d0 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 4482a: 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; 4482e: b181 eorl %d0,%d1 <== 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] = '^'; 44830: 745e moveq #94,%d2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 44832: 1d41 ffff moveb %d1,%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] = '^'; 44836: 1d42 fffe moveb %d2,%fp@(-2) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 4483a: 4eb9 0004 44a8 jsr 444a8 <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 44840: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 44844: 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')) { 44848: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 4484c: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 44850: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ff0 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 42ff0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 42ff4: 2039 0006 0b0a movel 60b0a ,%d0 <== NOT EXECUTED 42ffa: 670a beqs 43006 <== NOT EXECUTED fclose(group_fp); 42ffc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42ffe: 4eb9 0004 fc72 jsr 4fc72 <== NOT EXECUTED 43004: 588f addql #4,%sp <== NOT EXECUTED } 43006: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004300a : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 4300a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 4300e: 2039 0006 0a22 movel 60a22 ,%d0 <== NOT EXECUTED 43014: 670a beqs 43020 <== NOT EXECUTED fclose(passwd_fp); 43016: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43018: 4eb9 0004 fc72 jsr 4fc72 <== NOT EXECUTED 4301e: 588f addql #4,%sp <== NOT EXECUTED } 43020: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044854 : * 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) { 44854: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 44858: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 4485c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 44860: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED if (tty->ccount == 0) 44864: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44868: 6732 beqs 4489c <== NOT EXECUTED return; if (lineFlag) { 4486a: 4a84 tstl %d4 <== NOT EXECUTED 4486c: 6738 beqs 448a6 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 4486e: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 44872: 44c3 movew %d3,%ccr <== NOT EXECUTED 44874: 6a00 01ae bplw 44a24 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 44878: 0803 0004 btst #4,%d3 <== NOT EXECUTED 4487c: 662c bnes 448aa <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 4487e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44880: 4280 clrl %d0 <== NOT EXECUTED 44882: 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; 44886: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 4488a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4488c: 4eba ff22 jsr %pc@(447b0 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 44890: 508f addql #8,%sp <== NOT EXECUTED 44892: 7020 moveq #32,%d0 <== NOT EXECUTED 44894: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44898: 6600 0198 bnew 44a32 <== NOT EXECUTED } } if (!lineFlag) break; } } 4489c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 448a2: 4e5e unlk %fp <== NOT EXECUTED 448a4: 4e75 rts <== NOT EXECUTED 448a6: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 448aa: 47f9 0004 44a8 lea 444a8 ,%a3 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 448b0: 5381 subql #1,%d1 <== NOT EXECUTED 448b2: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED 448b6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 448ba: 1031 1800 moveb %a1@(00000000,%d1:l),%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 448be: 44c3 movew %d3,%ccr <== NOT EXECUTED 448c0: 6a36 bpls 448f8 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 448c2: 4a84 tstl %d4 <== NOT EXECUTED 448c4: 6608 bnes 448ce <== NOT EXECUTED 448c6: 0803 0004 btst #4,%d3 <== NOT EXECUTED 448ca: 6700 013e beqw 44a0a <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 448ce: 7409 moveq #9,%d2 <== NOT EXECUTED 448d0: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 448d6: b480 cmpl %d0,%d2 <== NOT EXECUTED 448d8: 6700 008e beqw 44968 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 448dc: 2400 movel %d0,%d2 <== NOT EXECUTED 448de: 5282 addql #1,%d2 <== NOT EXECUTED 448e0: 2079 0005 e7a0 moveal 5e7a0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 448e6: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 448ea: 49c0 extbl %d0 <== NOT EXECUTED 448ec: 0800 0005 btst #5,%d0 <== NOT EXECUTED 448f0: 6752 beqs 44944 <== NOT EXECUTED 448f2: 0803 0009 btst #9,%d3 <== NOT EXECUTED 448f6: 6610 bnes 44908 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 448f8: 4a84 tstl %d4 <== NOT EXECUTED 448fa: 67a0 beqs 4489c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 448fc: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44900: 679a beqs 4489c <== NOT EXECUTED 44902: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 44906: 60a8 bras 448b0 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 44908: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4490a: 4878 0003 pea 3 <== NOT EXECUTED 4490e: 4879 0005 d561 pea 5d561 <== NOT EXECUTED 44914: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 44916: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4491a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4491e: 6706 beqs 44926 <== NOT EXECUTED tty->column--; 44920: 5380 subql #1,%d0 <== NOT EXECUTED 44922: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 44926: 2079 0005 e7a0 moveal 5e7a0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 4492c: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 44930: 49c0 extbl %d0 <== NOT EXECUTED 44932: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44936: 670c beqs 44944 <== NOT EXECUTED 44938: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 4493c: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 44942: 67b4 beqs 448f8 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 44944: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44946: 4878 0003 pea 3 <== NOT EXECUTED 4494a: 4879 0005 d561 pea 5d561 <== NOT EXECUTED 44950: 4eb9 0004 44a8 jsr 444a8 <== NOT EXECUTED if (tty->column) 44956: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4495a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4495e: 6798 beqs 448f8 <== NOT EXECUTED tty->column--; 44960: 5380 subql #1,%d0 <== NOT EXECUTED 44962: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 44966: 6090 bras 448f8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 44968: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4496c: 4a81 tstl %d1 <== NOT EXECUTED 4496e: 6734 beqs 449a4 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 44970: 2879 0005 e7a0 moveal 5e7a0 <__ctype_ptr__>,%a4 <== NOT EXECUTED 44976: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 44978: 0283 0000 0200 andil #512,%d3 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 4497e: 4285 clrl %d5 <== NOT EXECUTED 44980: 1a31 0800 moveb %a1@(00000000,%d0:l),%d5 <== NOT EXECUTED 44984: 5280 addql #1,%d0 <== NOT EXECUTED 44986: 2045 moveal %d5,%a0 <== NOT EXECUTED if (c == '\t') { 44988: 7a09 moveq #9,%d5 <== NOT EXECUTED 4498a: ba88 cmpl %a0,%d5 <== NOT EXECUTED 4498c: 676c beqs 449fa <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 4498e: 1a34 8801 moveb %a4@(00000001,%a0:l),%d5 <== NOT EXECUTED 44992: 49c5 extbl %d5 <== NOT EXECUTED 44994: 0805 0005 btst #5,%d5 <== NOT EXECUTED 44998: 6758 beqs 449f2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 4499a: 4a83 tstl %d3 <== NOT EXECUTED 4499c: 6702 beqs 449a0 <== NOT EXECUTED col += 2; 4499e: 5482 addql #2,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 449a0: b081 cmpl %d1,%d0 <== NOT EXECUTED 449a2: 66da bnes 4497e <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 449a4: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 449a8: 6c00 ff4e bgew 448f8 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 449ac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 449ae: 4878 0001 pea 1 <== NOT EXECUTED 449b2: 4879 0005 d563 pea 5d563 <== NOT EXECUTED 449b8: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 449ba: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 449be: 5380 subql #1,%d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 449c0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 449c4: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 449c8: b082 cmpl %d2,%d0 <== NOT EXECUTED 449ca: 6f00 ff2c blew 448f8 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 449ce: 2f0a movel %a2,%sp@- <== NOT EXECUTED 449d0: 4878 0001 pea 1 <== NOT EXECUTED 449d4: 4879 0005 d563 pea 5d563 <== NOT EXECUTED 449da: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 449dc: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 449e0: 5380 subql #1,%d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 449e2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 449e6: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 449ea: b082 cmpl %d2,%d0 <== NOT EXECUTED 449ec: 6ebe bgts 449ac <== NOT EXECUTED 449ee: 6000 ff08 braw 448f8 <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 449f2: 5282 addql #1,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 449f4: b081 cmpl %d1,%d0 <== NOT EXECUTED 449f6: 6686 bnes 4497e <== NOT EXECUTED 449f8: 60aa bras 449a4 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 449fa: 1a3c 0007 moveb #7,%d5 <== NOT EXECUTED 449fe: 8485 orl %d5,%d2 <== NOT EXECUTED 44a00: 5282 addql #1,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 44a02: b081 cmpl %d1,%d0 <== NOT EXECUTED 44a04: 6600 ff78 bnew 4497e <== NOT EXECUTED 44a08: 609a bras 449a4 <== 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); 44a0a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 44a0e: 4280 clrl %d0 <== NOT EXECUTED 44a10: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 44a14: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== 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); 44a1a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 44a1e: 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); 44a20: 6000 fd8e braw 447b0 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 44a24: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED } } if (!lineFlag) break; } } 44a28: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 44a2e: 4e5e unlk %fp <== NOT EXECUTED 44a30: 4e75 rts <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 44a32: 700a moveq #10,%d0 <== NOT EXECUTED 44a34: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } } if (!lineFlag) break; } } 44a38: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 44a3e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 44a42: 4e5e unlk %fp <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 44a44: 6000 fd6a braw 447b0 <== NOT EXECUTED =============================================================================== 00043858 : int fcntl( int fd, int cmd, ... ) { 43858: 4e56 fff4 linkw %fp,#-12 4385c: 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, ...)); 43860: 41ee 0010 lea %fp@(16),%a0 43864: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43868: 242e 000c movel %fp@(12),%d2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4386c: 2239 0006 03d4 movel 603d4 ,%d1 43872: b280 cmpl %d0,%d1 43874: 6300 0192 blsw 43a08 iop = rtems_libio_iop( fd ); 43878: 2279 0006 1a80 moveal 61a80 ,%a1 4387e: ed88 lsll #6,%d0 43880: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 43884: 202a 0014 movel %a2@(20),%d0 43888: 0800 0008 btst #8,%d0 4388c: 6700 017a beqw 43a08 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 43890: 7609 moveq #9,%d3 43892: b682 cmpl %d2,%d3 43894: 641a bccs 438b0 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 43896: 4eb9 0005 04d0 jsr 504d0 <__errno> 4389c: 76ff moveq #-1,%d3 4389e: 2040 moveal %d0,%a0 438a0: 7016 moveq #22,%d0 438a2: 2080 movel %d0,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 438a4: 2003 movel %d3,%d0 438a6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 438ac: 4e5e unlk %fp 438ae: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 438b0: 363b 2a08 movew %pc@(438ba ,%d2:l:2),%d3 438b4: 48c3 extl %d3 438b6: 4efb 3802 jmp %pc@(438ba ,%d3:l) 438ba: 00b8 00ac 009c oril #11272348,%d0 <== NOT EXECUTED 438c0: 0082 0030 0014 oril #3145748,%d2 <== NOT EXECUTED 438c6: 0014 024 <== NOT EXECUTED 438c8: 0014 024 <== NOT EXECUTED 438ca: 0014 024 <== NOT EXECUTED 438cc: 0014 024 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 438ce: 4eb9 0005 04d0 jsr 504d0 <__errno> 438d4: 76ff moveq #-1,%d3 438d6: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 438d8: 2003 movel %d3,%d0 438da: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 438e0: 20bc 0000 0086 movel #134,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 438e6: 4e5e unlk %fp 438e8: 4e75 rts 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 ) ); 438ea: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 438ec: 4283 clrl %d3 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 438ee: 4eb9 0004 41d0 jsr 441d0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 438f4: 222a 0014 movel %a2@(20),%d1 438f8: 588f addql #4,%sp 438fa: 0280 0000 0201 andil #513,%d0 43900: 0281 ffff fdfe andil #-514,%d1 43906: 8081 orl %d1,%d0 43908: 2540 0014 movel %d0,%a2@(20) * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 4390c: 206a 003c moveal %a2@(60),%a0 43910: 2068 0030 moveal %a0@(48),%a0 43914: 4a88 tstl %a0 43916: 678c beqs 438a4 <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 43918: 2f0a movel %a2,%sp@- 4391a: 2f02 movel %d2,%sp@- 4391c: 4e90 jsr %a0@ if (err) { 4391e: 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 ); 43920: 2400 movel %d0,%d2 if (err) { 43922: 6780 beqs 438a4 <== ALWAYS TAKEN errno = err; 43924: 4eb9 0005 04d0 jsr 504d0 <__errno> <== NOT EXECUTED 4392a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4392c: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4392e: 2003 movel %d3,%d0 <== NOT EXECUTED if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 43930: 2082 movel %d2,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43932: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43938: 4e5e unlk %fp <== NOT EXECUTED 4393a: 4e75 rts <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 4393c: 2f00 movel %d0,%sp@- 4393e: 4eb9 0004 3f40 jsr 43f40 43944: 588f addql #4,%sp 43946: 2600 movel %d0,%d3 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 43948: 6cc2 bges 4390c <== ALWAYS TAKEN va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 4394a: 2003 movel %d3,%d0 <== NOT EXECUTED 4394c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43952: 4e5e unlk %fp <== NOT EXECUTED 43954: 4e75 rts <== NOT EXECUTED * 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 ) ) 43956: 4a90 tstl %a0@ 43958: 6766 beqs 439c0 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 4395a: 4283 clrl %d3 4395c: 08c0 000b bset #11,%d0 43960: 2540 0014 movel %d0,%a2@(20) 43964: 60a6 bras 4390c diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 43966: 2600 movel %d0,%d3 43968: 720b moveq #11,%d1 4396a: e2ab lsrl %d1,%d3 4396c: 7001 moveq #1,%d0 4396e: c680 andl %d0,%d3 43970: 609a bras 4390c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 43972: 2010 movel %a0@,%d0 if ( fd2 ) 43974: 6700 00ac beqw 43a22 diop = rtems_libio_iop( fd2 ); 43978: b081 cmpl %d1,%d0 <== NOT EXECUTED 4397a: 6452 bccs 439ce <== NOT EXECUTED 4397c: ed88 lsll #6,%d0 <== NOT EXECUTED 4397e: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 43982: 2608 movel %a0,%d3 <== 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); 43984: 9689 subl %a1,%d3 <== NOT EXECUTED 43986: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43988: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 4398e: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 43994: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 4399a: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 439a0: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 439a6: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 439ac: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 439b2: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 439b8: 4a83 tstl %d3 439ba: 6c00 ff50 bgew 4390c 439be: 608a bras 4394a <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 439c0: 4283 clrl %d3 <== NOT EXECUTED 439c2: 0880 000b bclr #11,%d0 <== NOT EXECUTED 439c6: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED 439ca: 6000 ff40 braw 4390c <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 439ce: 91c8 subal %a0,%a0 <== NOT EXECUTED 439d0: 4283 clrl %d3 <== 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); 439d2: 9689 subl %a1,%d3 <== NOT EXECUTED 439d4: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 439d6: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 439dc: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 439e2: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 439e8: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 439ee: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 439f4: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 439fa: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 43a00: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED 43a06: 60b0 bras 439b8 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43a08: 4eb9 0005 04d0 jsr 504d0 <__errno> <== NOT EXECUTED 43a0e: 76ff moveq #-1,%d3 <== NOT EXECUTED 43a10: 7209 moveq #9,%d1 <== NOT EXECUTED 43a12: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43a14: 2003 movel %d3,%d0 <== NOT EXECUTED 43a16: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43a1c: 2081 movel %d1,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43a1e: 4e5e unlk %fp <== NOT EXECUTED 43a20: 4e75 rts <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 43a22: 4eb9 0004 4118 jsr 44118 43a28: 2040 moveal %d0,%a0 if ( diop == 0 ) { 43a2a: 4a80 tstl %d0 43a2c: 6740 beqs 43a6e <== NEVER TAKEN 43a2e: 2279 0006 1a80 moveal 61a80 ,%a1 43a34: 2600 movel %d0,%d3 diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 43a36: 9689 subl %a1,%d3 43a38: ec83 asrl #6,%d3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43a3a: 216a 0018 0018 movel %a2@(24),%a0@(24) 43a40: 216a 001c 001c movel %a2@(28),%a0@(28) 43a46: 216a 0020 0020 movel %a2@(32),%a0@(32) 43a4c: 216a 0024 0024 movel %a2@(36),%a0@(36) ret = -1; break; } } diop->handlers = iop->handlers; 43a52: 216a 003c 003c movel %a2@(60),%a0@(60) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43a58: 216a 0028 0028 movel %a2@(40),%a0@(40) break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 43a5e: 216a 0038 0038 movel %a2@(56),%a0@(56) diop->flags = iop->flags; 43a64: 216a 0014 0014 movel %a2@(20),%a0@(20) 43a6a: 6000 ff4c braw 439b8 if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); if ( diop == 0 ) { 43a6e: 76ff moveq #-1,%d3 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43a70: 2003 movel %d3,%d0 <== NOT EXECUTED 43a72: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43a78: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043aa0 : #include int fdatasync( int fd ) { 43aa0: 4e56 0000 linkw %fp,#0 43aa4: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43aa8: b0b9 0006 03d4 cmpl 603d4 ,%d0 43aae: 642c bccs 43adc iop = rtems_libio_iop( fd ); 43ab0: 2079 0006 1a80 moveal 61a80 ,%a0 43ab6: ed88 lsll #6,%d0 43ab8: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43aba: 2028 0014 movel %a0@(20),%d0 43abe: 0800 0008 btst #8,%d0 43ac2: 6718 beqs 43adc <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43ac4: 44c0 movew %d0,%ccr 43ac6: 6626 bnes 43aee /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 43ac8: 2268 003c moveal %a0@(60),%a1 43acc: 2269 002c moveal %a1@(44),%a1 43ad0: 4a89 tstl %a1 43ad2: 672c beqs 43b00 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43ad4: 2d48 0008 movel %a0,%fp@(8) } 43ad8: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43ada: 4ed1 jmp %a1@ { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43adc: 4eb9 0005 04d0 jsr 504d0 <__errno> 43ae2: 7209 moveq #9,%d1 43ae4: 2040 moveal %d0,%a0 if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43ae6: 70ff moveq #-1,%d0 43ae8: 4e5e unlk %fp { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43aea: 2081 movel %d1,%a0@ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43aec: 4e75 rts rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43aee: 4eb9 0005 04d0 jsr 504d0 <__errno> if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43af4: 4e5e unlk %fp rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43af6: 2040 moveal %d0,%a0 43af8: 7016 moveq #22,%d0 43afa: 2080 movel %d0,%a0@ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43afc: 70ff moveq #-1,%d0 43afe: 4e75 rts /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43b00: 4eb9 0005 04d0 jsr 504d0 <__errno> return (*iop->handlers->fdatasync_h)( iop ); } 43b06: 4e5e unlk %fp /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43b08: 2040 moveal %d0,%a0 return (*iop->handlers->fdatasync_h)( iop ); } 43b0a: 70ff moveq #-1,%d0 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43b0c: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fdatasync_h)( iop ); } =============================================================================== 0004a3fa : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4a3fa: 4e56 ffe0 linkw %fp,#-32 4a3fe: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4a402: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4a404: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4a408: 47f9 0004 6704 lea 46704 ,%a3 4a40e: 42a7 clrl %sp@- 4a410: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4a416: 262e 000c movel %fp@(12),%d3 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4a41a: 4e93 jsr %a3@ 4a41c: 4fef 000c lea %sp@(12),%sp 4a420: 4a80 tstl %d0 4a422: 6710 beqs 4a434 <== NEVER TAKEN 4a424: 347c fffc moveaw #-4,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4a428: 200a movel %a2,%d0 4a42a: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4a430: 4e5e unlk %fp 4a432: 4e75 rts if (rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4a434: 2414 movel %a4@,%d2 <== NOT EXECUTED if (pipe == NULL) { 4a436: 6700 00e2 beqw 4a51a <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4a43a: 42a7 clrl %sp@- <== NOT EXECUTED 4a43c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a43e: 42a7 clrl %sp@- <== NOT EXECUTED 4a440: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4a444: 4e93 jsr %a3@ <== NOT EXECUTED 4a446: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a44a: 4a80 tstl %d0 <== NOT EXECUTED 4a44c: 6758 beqs 4a4a6 <== NOT EXECUTED 4a44e: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4a452: 4a94 tstl %a4@ <== NOT EXECUTED 4a454: 6700 0282 beqw 4a6d8 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4a458: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- <== NOT EXECUTED 4a45e: 4bf9 0004 6840 lea 46840 ,%a5 <== NOT EXECUTED 4a464: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 4a466: 588f addql #4,%sp <== NOT EXECUTED 4a468: 4a8a tstl %a2 <== NOT EXECUTED 4a46a: 66bc bnes 4a428 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4a46c: 7006 moveq #6,%d0 <== NOT EXECUTED 4a46e: 2043 moveal %d3,%a0 <== NOT EXECUTED 4a470: 7204 moveq #4,%d1 <== NOT EXECUTED 4a472: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4a476: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4a478: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a47a: 6700 01e8 beqw 4a664 <== NOT EXECUTED 4a47e: 123c 0006 moveb #6,%d1 <== NOT EXECUTED 4a482: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a484: 6700 0194 beqw 4a61a <== NOT EXECUTED 4a488: 123c 0002 moveb #2,%d1 <== NOT EXECUTED 4a48c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a48e: 671a beqs 4a4aa <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4a490: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a494: 95ca subal %a2,%a2 <== NOT EXECUTED 4a496: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4a498: 588f addql #4,%sp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 4a49a: 200a movel %a2,%d0 <== NOT EXECUTED 4a49c: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4a4a2: 4e5e unlk %fp <== NOT EXECUTED 4a4a4: 4e75 rts <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4a4a6: 95ca subal %a2,%a2 <== NOT EXECUTED 4a4a8: 60a8 bras 4a452 <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4a4aa: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4a4ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a4b0: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4a4b2: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4a4b6: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4a4ba: 4a80 tstl %d0 <== NOT EXECUTED 4a4bc: 6700 025c beqw 4a71a <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4a4c0: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a4c4: 66ca bnes 4a490 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4a4c6: 7001 moveq #1,%d0 <== NOT EXECUTED 4a4c8: 2043 moveal %d3,%a0 <== NOT EXECUTED 4a4ca: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4a4ce: 66c0 bnes 4a490 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4a4d0: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 4a4d4: 243c 0004 c3e4 movel #312292,%d2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4a4da: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a4de: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4a4e0: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a4e2: 42a7 clrl %sp@- <== NOT EXECUTED 4a4e4: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a4e8: 4e90 jsr %a0@ <== NOT EXECUTED 4a4ea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a4ee: 4a80 tstl %d0 <== NOT EXECUTED 4a4f0: 6600 028c bnew 4a77e <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4a4f4: 42a7 clrl %sp@- <== NOT EXECUTED 4a4f6: 42a7 clrl %sp@- <== NOT EXECUTED 4a4f8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a4fc: 4e93 jsr %a3@ <== NOT EXECUTED 4a4fe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a502: 4a80 tstl %d0 <== NOT EXECUTED 4a504: 6600 0278 bnew 4a77e <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4a508: b8aa 0024 cmpl %a2@(36),%d4 <== NOT EXECUTED 4a50c: 67cc beqs 4a4da <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4a50e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a512: 95ca subal %a2,%a2 <== NOT EXECUTED 4a514: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4a516: 588f addql #4,%sp <== NOT EXECUTED 4a518: 6080 bras 4a49a <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4a51a: 4878 0034 pea 34 <== NOT EXECUTED 4a51e: 45f9 0004 3108 lea 43108 ,%a2 <== NOT EXECUTED 4a524: 4e92 jsr %a2@ <== NOT EXECUTED if (pipe == NULL) 4a526: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4a528: 2400 movel %d0,%d2 <== NOT EXECUTED 4a52a: 2a40 moveal %d0,%a5 <== NOT EXECUTED if (pipe == NULL) 4a52c: 6700 02b6 beqw 4a7e4 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4a530: 2040 moveal %d0,%a0 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4a532: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED 4a538: 283c 0004 2ddc movel #273884,%d4 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4a53e: 4298 clrl %a0@+ <== NOT EXECUTED 4a540: 5888 addql #4,%a0 <== NOT EXECUTED 4a542: 4298 clrl %a0@+ <== NOT EXECUTED 4a544: 4298 clrl %a0@+ <== NOT EXECUTED 4a546: 4298 clrl %a0@+ <== NOT EXECUTED 4a548: 4298 clrl %a0@+ <== NOT EXECUTED 4a54a: 4298 clrl %a0@+ <== NOT EXECUTED 4a54c: 4298 clrl %a0@+ <== NOT EXECUTED 4a54e: 4298 clrl %a0@+ <== NOT EXECUTED 4a550: 4298 clrl %a0@+ <== NOT EXECUTED 4a552: 4298 clrl %a0@+ <== NOT EXECUTED 4a554: 4298 clrl %a0@+ <== NOT EXECUTED 4a556: 4290 clrl %a0@ <== NOT EXECUTED pipe->Size = PIPE_BUF; 4a558: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a55a: 2140 0004 movel %d0,%a0@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4a55e: 4878 0200 pea 200 <== NOT EXECUTED 4a562: 4e92 jsr %a2@ <== NOT EXECUTED if (! pipe->Buffer) 4a564: 588f addql #4,%sp <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4a566: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a568: 2080 movel %d0,%a0@ <== NOT EXECUTED if (! pipe->Buffer) 4a56a: 6700 0270 beqw 4a7dc <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4a56e: 4868 002c pea %a0@(44) <== NOT EXECUTED 4a572: 45f9 0004 c1d0 lea 4c1d0 ,%a2 <== NOT EXECUTED 4a578: 1039 0005 e714 moveb 5e714 ,%d0 <== NOT EXECUTED 4a57e: 42a7 clrl %sp@- <== NOT EXECUTED 4a580: 49c0 extbl %d0 <== NOT EXECUTED 4a582: 42a7 clrl %sp@- <== NOT EXECUTED 4a584: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4a58a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a58c: 4e92 jsr %a2@ <== NOT EXECUTED 4a58e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4a592: 4a80 tstl %d0 <== NOT EXECUTED 4a594: 6600 0238 bnew 4a7ce <== 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( 4a598: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a59a: 4868 0030 pea %a0@(48) <== NOT EXECUTED 4a59e: 283c 0004 c2cc movel #312012,%d4 <== NOT EXECUTED 4a5a4: 1039 0005 e714 moveb 5e714 ,%d0 <== NOT EXECUTED 4a5aa: 42a7 clrl %sp@- <== NOT EXECUTED 4a5ac: 49c0 extbl %d0 <== NOT EXECUTED 4a5ae: 42a7 clrl %sp@- <== NOT EXECUTED 4a5b0: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4a5b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a5b8: 4e92 jsr %a2@ <== NOT EXECUTED 4a5ba: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4a5be: 4a80 tstl %d0 <== NOT EXECUTED 4a5c0: 6600 0202 bnew 4a7c4 <== 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( 4a5c4: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a5c6: 4868 0028 pea %a0@(40) <== NOT EXECUTED 4a5ca: 1039 0005 e714 moveb 5e714 ,%d0 <== NOT EXECUTED 4a5d0: 42a7 clrl %sp@- <== NOT EXECUTED 4a5d2: 4878 0010 pea 10 <== NOT EXECUTED 4a5d6: 49c0 extbl %d0 <== NOT EXECUTED 4a5d8: 4878 0001 pea 1 <== NOT EXECUTED 4a5dc: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4a5e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a5e4: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 4a5ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4a5ee: 4a80 tstl %d0 <== NOT EXECUTED 4a5f0: 6600 01c2 bnew 4a7b4 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4a5f4: 1039 0005 e714 moveb 5e714 ,%d0 <== NOT EXECUTED 4a5fa: 49c0 extbl %d0 <== NOT EXECUTED 4a5fc: 2200 movel %d0,%d1 <== NOT EXECUTED 4a5fe: 5281 addql #1,%d1 <== NOT EXECUTED 4a600: 13c1 0005 e714 moveb %d1,5e714 <== NOT EXECUTED 4a606: 727a moveq #122,%d1 <== NOT EXECUTED 4a608: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a60a: 6600 fe2e bnew 4a43a <== NOT EXECUTED c = 'a'; 4a60e: 7061 moveq #97,%d0 <== NOT EXECUTED 4a610: 13c0 0005 e714 moveb %d0,5e714 <== NOT EXECUTED 4a616: 6000 fe22 braw 4a43a <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4a61a: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4a61e: 2200 movel %d0,%d1 <== NOT EXECUTED 4a620: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4a622: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4a626: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4a62a: 4a80 tstl %d0 <== NOT EXECUTED 4a62c: 6700 00d8 beqw 4a706 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4a630: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4a634: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a636: 5288 addql #1,%a0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4a638: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4a63c: 2548 0014 movel %a0,%a2@(20) <== NOT EXECUTED 4a640: 4a80 tstl %d0 <== NOT EXECUTED 4a642: 6600 fe4c bnew 4a490 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4a646: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a64a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a64e: 4eb9 0004 c36c jsr 4c36c <== NOT EXECUTED 4a654: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4a656: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a65a: 95ca subal %a2,%a2 <== NOT EXECUTED 4a65c: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4a65e: 588f addql #4,%sp <== NOT EXECUTED 4a660: 6000 fe38 braw 4a49a <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4a664: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4a668: 2200 movel %d0,%d1 <== NOT EXECUTED 4a66a: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4a66c: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4a670: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4a674: 4a80 tstl %d0 <== NOT EXECUTED 4a676: 677a beqs 4a6f2 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4a678: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a67c: 6600 fe12 bnew 4a490 <== NOT EXECUTED 4a680: 7001 moveq #1,%d0 <== NOT EXECUTED 4a682: 2043 moveal %d3,%a0 <== NOT EXECUTED 4a684: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4a688: 6600 0110 bnew 4a79a <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4a68c: 282a 0020 movel %a2@(32),%d4 <== NOT EXECUTED 4a690: 243c 0004 c3e4 movel #312292,%d2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4a696: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a69a: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4a69c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a69e: 42a7 clrl %sp@- <== NOT EXECUTED 4a6a0: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a6a4: 4e90 jsr %a0@ <== NOT EXECUTED 4a6a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a6aa: 4a80 tstl %d0 <== NOT EXECUTED 4a6ac: 6600 00d0 bnew 4a77e <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4a6b0: 42a7 clrl %sp@- <== NOT EXECUTED 4a6b2: 42a7 clrl %sp@- <== NOT EXECUTED 4a6b4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a6b8: 4e93 jsr %a3@ <== NOT EXECUTED 4a6ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a6be: 4a80 tstl %d0 <== NOT EXECUTED 4a6c0: 6600 00bc bnew 4a77e <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4a6c4: b8aa 0020 cmpl %a2@(32),%d4 <== NOT EXECUTED 4a6c8: 67cc beqs 4a696 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4a6ca: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a6ce: 95ca subal %a2,%a2 <== NOT EXECUTED 4a6d0: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4a6d2: 588f addql #4,%sp <== NOT EXECUTED 4a6d4: 6000 fdc4 braw 4a49a <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4a6d8: 4a8a tstl %a2 <== NOT EXECUTED 4a6da: 6652 bnes 4a72e <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4a6dc: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- <== NOT EXECUTED 4a6e2: 4bf9 0004 6840 lea 46840 ,%a5 <== NOT EXECUTED if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4a6e8: 2882 movel %d2,%a4@ <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 4a6ea: 4e95 jsr %a5@ <== NOT EXECUTED 4a6ec: 588f addql #4,%sp <== NOT EXECUTED 4a6ee: 6000 fd7c braw 4a46c <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4a6f2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a6f6: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a6fa: 4eb9 0004 c36c jsr 4c36c <== NOT EXECUTED 4a700: 508f addql #8,%sp <== NOT EXECUTED 4a702: 6000 ff74 braw 4a678 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4a706: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a70a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a70e: 4eb9 0004 c36c jsr 4c36c <== NOT EXECUTED 4a714: 508f addql #8,%sp <== NOT EXECUTED 4a716: 6000 ff18 braw 4a630 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4a71a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a71e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a722: 4eb9 0004 c36c jsr 4c36c <== NOT EXECUTED 4a728: 508f addql #8,%sp <== NOT EXECUTED 4a72a: 6000 fd94 braw 4a4c0 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4a72e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a730: 49f9 0004 c2cc lea 4c2cc ,%a4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4a736: 47f9 0004 2ddc lea 42ddc ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4a73c: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4a740: 4e94 jsr %a4@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4a742: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a744: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4a748: 4e94 jsr %a4@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4a74a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a74c: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4a750: 4eb9 0004 662c jsr 4662c <== NOT EXECUTED free(pipe->Buffer); 4a756: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a758: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4a75a: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4a75c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a75e: 4e93 jsr %a3@ <== NOT EXECUTED 4a760: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4a764: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- <== NOT EXECUTED 4a76a: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED 4a770: 588f addql #4,%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4a772: 200a movel %a2,%d0 <== NOT EXECUTED 4a774: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4a77a: 4e5e unlk %fp <== NOT EXECUTED 4a77c: 4e75 rts <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4a77e: 2f03 movel %d3,%sp@- <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4a780: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4a784: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4a786: 4eb9 0004 a2da jsr 4a2da <== NOT EXECUTED return err; 4a78c: 508f addql #8,%sp <== NOT EXECUTED } 4a78e: 200a movel %a2,%d0 <== NOT EXECUTED 4a790: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4a796: 4e5e unlk %fp <== NOT EXECUTED 4a798: 4e75 rts <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4a79a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a79e: 347c fffa moveaw #-6,%a2 <== NOT EXECUTED 4a7a2: 4e95 jsr %a5@ <== NOT EXECUTED err = -ENXIO; goto out_error; 4a7a4: 588f addql #4,%sp <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4a7a6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4a7a8: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4a7aa: 4eb9 0004 a2da jsr 4a2da <== NOT EXECUTED return err; 4a7b0: 508f addql #8,%sp <== NOT EXECUTED 4a7b2: 60da bras 4a78e <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4a7b4: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4a7b8: 283c 0004 c2cc movel #312012,%d4 <== NOT EXECUTED 4a7be: 2044 moveal %d4,%a0 <== NOT EXECUTED 4a7c0: 4e90 jsr %a0@ <== NOT EXECUTED 4a7c2: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4a7c4: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4a7c8: 2044 moveal %d4,%a0 <== NOT EXECUTED 4a7ca: 4e90 jsr %a0@ <== NOT EXECUTED 4a7cc: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4a7ce: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4a7d0: 283c 0004 2ddc movel #273884,%d4 <== NOT EXECUTED 4a7d6: 2044 moveal %d4,%a0 <== NOT EXECUTED 4a7d8: 4e90 jsr %a0@ <== NOT EXECUTED 4a7da: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4a7dc: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4a7de: 2044 moveal %d4,%a0 <== NOT EXECUTED 4a7e0: 4e90 jsr %a0@ <== NOT EXECUTED 4a7e2: 588f addql #4,%sp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4a7e4: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4a7ea: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4a7ee: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED 4a7f4: 588f addql #4,%sp <== NOT EXECUTED 4a7f6: 6000 ff7a braw 4a772 <== NOT EXECUTED ... =============================================================================== 00043b14 : long fpathconf( int fd, int name ) { 43b14: 4e56 0000 linkw %fp,#0 43b18: 202e 0008 movel %fp@(8),%d0 43b1c: 222e 000c movel %fp@(12),%d1 43b20: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43b22: b0b9 0006 03d4 cmpl 603d4 ,%d0 43b28: 6400 00f0 bccw 43c1a iop = rtems_libio_iop(fd); 43b2c: 2079 0006 1a80 moveal 61a80 ,%a0 43b32: ed88 lsll #6,%d0 43b34: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43b36: 2428 0014 movel %a0@(20),%d2 43b3a: 0802 0008 btst #8,%d2 43b3e: 6700 00da beqw 43c1a rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 43b42: 0802 0001 btst #1,%d2 43b46: 670a beqs 43b52 <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43b48: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 43b4c: 700b moveq #11,%d0 43b4e: b081 cmpl %d1,%d0 43b50: 6416 bccs 43b68 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43b52: 4eb9 0005 04d0 jsr 504d0 <__errno> break; } return return_value; } 43b58: 242e fffc movel %fp@(-4),%d2 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43b5c: 2040 moveal %d0,%a0 43b5e: 7216 moveq #22,%d1 43b60: 70ff moveq #-1,%d0 break; } return return_value; } 43b62: 4e5e unlk %fp break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43b64: 2081 movel %d1,%a0@ break; } return return_value; } 43b66: 4e75 rts * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 43b68: 303b 1a08 movew %pc@(43b72 ,%d1:l:2),%d0 43b6c: 48c0 extl %d0 43b6e: 4efb 0802 jmp %pc@(43b72 ,%d0:l) 43b72: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43b78: 006c 0154 <== NOT EXECUTED 43b7a: 0060 0140 <== NOT EXECUTED 43b7c: 0054 0124 <== NOT EXECUTED 43b7e: 0048 0110 <== NOT EXECUTED 43b80: 003c 074 <== NOT EXECUTED 43b82: 0030 060 <== NOT EXECUTED 43b84: 0024 044 <== NOT EXECUTED 43b86: 0018 030 <== NOT EXECUTED 43b88: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43b8e: 4e5e unlk %fp break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43b90: 2028 005c movel %a0@(92),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43b94: 4e75 rts 43b96: 242e fffc movel %fp@(-4),%d2 43b9a: 4e5e unlk %fp break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 43b9c: 2028 0050 movel %a0@(80),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43ba0: 4e75 rts 43ba2: 242e fffc movel %fp@(-4),%d2 43ba6: 4e5e unlk %fp break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43ba8: 2028 0064 movel %a0@(100),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43bac: 4e75 rts 43bae: 242e fffc movel %fp@(-4),%d2 43bb2: 4e5e unlk %fp break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 43bb4: 2028 0058 movel %a0@(88),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43bb8: 4e75 rts 43bba: 242e fffc movel %fp@(-4),%d2 43bbe: 4e5e unlk %fp break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43bc0: 2028 0054 movel %a0@(84),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43bc4: 4e75 rts 43bc6: 242e fffc movel %fp@(-4),%d2 43bca: 4e5e unlk %fp break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43bcc: 2028 004c movel %a0@(76),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43bd0: 4e75 rts 43bd2: 242e fffc movel %fp@(-4),%d2 43bd6: 4e5e unlk %fp break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 43bd8: 2028 0048 movel %a0@(72),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43bdc: 4e75 rts 43bde: 242e fffc movel %fp@(-4),%d2 43be2: 4e5e unlk %fp break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 43be4: 2028 0044 movel %a0@(68),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43be8: 4e75 rts 43bea: 242e fffc movel %fp@(-4),%d2 43bee: 4e5e unlk %fp break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 43bf0: 2028 0040 movel %a0@(64),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43bf4: 4e75 rts 43bf6: 242e fffc movel %fp@(-4),%d2 43bfa: 4e5e unlk %fp switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 43bfc: 2028 003c movel %a0@(60),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c00: 4e75 rts 43c02: 242e fffc movel %fp@(-4),%d2 43c06: 4e5e unlk %fp the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 43c08: 2028 0038 movel %a0@(56),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c0c: 4e75 rts 43c0e: 242e fffc movel %fp@(-4),%d2 43c12: 4e5e unlk %fp break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43c14: 2028 0060 movel %a0@(96),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c18: 4e75 rts rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 43c1a: 4eb9 0005 04d0 jsr 504d0 <__errno> 43c20: 7409 moveq #9,%d2 43c22: 2040 moveal %d0,%a0 43c24: 70ff moveq #-1,%d0 43c26: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c28: 242e fffc movel %fp@(-4),%d2 43c2c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ddc : void free( void *ptr ) { MSBUMP(free_calls, 1); 42ddc: 4e56 0000 linkw %fp,#0 42de0: 52b9 0005 fcc4 addql #1,5fcc4 42de6: 2f02 movel %d2,%sp@- 42de8: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 42dec: 6732 beqs 42e20 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42dee: 7003 moveq #3,%d0 42df0: b0b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d0 42df6: 6758 beqs 42e50 <== ALWAYS TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42df8: 2079 0005 ec66 moveal 5ec66 ,%a0 42dfe: 4a88 tstl %a0 42e00: 670a beqs 42e0c <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 42e02: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42e04: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 42e08: 4e90 jsr %a0@ <== NOT EXECUTED 42e0a: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 42e0c: 2f02 movel %d2,%sp@- 42e0e: 2f39 0005 e600 movel 5e600 ,%sp@- 42e14: 4eb9 0004 82bc jsr 482bc <_Protected_heap_Free> 42e1a: 508f addql #8,%sp 42e1c: 4a00 tstb %d0 42e1e: 6708 beqs 42e28 <== NEVER TAKEN RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42e20: 242e fffc movel %fp@(-4),%d2 42e24: 4e5e unlk %fp 42e26: 4e75 rts if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 42e28: 2079 0005 e600 moveal 5e600 ,%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", 42e2e: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 42e32: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 42e36: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42e38: 4879 0005 d4ec pea 5d4ec <== NOT EXECUTED 42e3e: 4eb9 0004 3ce8 jsr 43ce8 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42e44: 242e fffc movel %fp@(-4),%d2 <== 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", 42e48: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42e4c: 4e5e unlk %fp <== NOT EXECUTED 42e4e: 4e75 rts <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42e50: 4eb9 0004 2f98 jsr 42f98 42e56: 4a00 tstb %d0 42e58: 669e bnes 42df8 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 42e5a: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42e5e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 42e62: 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); 42e64: 4ef9 0004 2fd8 jmp 42fd8 <== NOT EXECUTED ... =============================================================================== 000444a4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 444a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 444a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 444aa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 444ae: b5fc 0006 0770 cmpal #395120,%a2 <== NOT EXECUTED 444b4: 6740 beqs 444f6 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 444b6: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 444ba: 4a88 tstl %a0 <== NOT EXECUTED 444bc: 6710 beqs 444ce <== NOT EXECUTED 444be: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 444c2: 4a88 tstl %a0 <== NOT EXECUTED 444c4: 6708 beqs 444ce <== NOT EXECUTED 444c6: 486a 0004 pea %a2@(4) <== NOT EXECUTED 444ca: 4e90 jsr %a0@ <== NOT EXECUTED 444cc: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 444ce: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 444d2: 4a88 tstl %a0 <== NOT EXECUTED 444d4: 6710 beqs 444e6 <== NOT EXECUTED 444d6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 444da: 4a88 tstl %a0 <== NOT EXECUTED 444dc: 6708 beqs 444e6 <== NOT EXECUTED 444de: 486a 0018 pea %a2@(24) <== NOT EXECUTED 444e2: 4e90 jsr %a0@ <== NOT EXECUTED 444e4: 588f addql #4,%sp <== NOT EXECUTED free(env); 444e6: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 444ea: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 444ee: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 444f0: 4ef9 0004 32b0 jmp 432b0 <== NOT EXECUTED } } 444f6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 444fa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005c1ac : int fstat( int fd, struct stat *sbuf ) { 5c1ac: 4e56 0000 linkw %fp,#0 5c1b0: 202e 0008 movel %fp@(8),%d0 5c1b4: 2f0a movel %a2,%sp@- 5c1b6: 2f02 movel %d2,%sp@- 5c1b8: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5c1bc: 6700 0096 beqw 5c254 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5c1c0: b0b9 0005 e5f4 cmpl 5e5f4 ,%d0 5c1c6: 6456 bccs 5c21e 5c1c8: 2479 0005 fca0 moveal 5fca0 ,%a2 5c1ce: ed88 lsll #6,%d0 5c1d0: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5c1d2: 202a 0014 movel %a2@(20),%d0 5c1d6: 0280 0000 0100 andil #256,%d0 5c1dc: 6740 beqs 5c21e <== NEVER TAKEN if ( !iop->handlers ) 5c1de: 206a 003c moveal %a2@(60),%a0 5c1e2: 4a88 tstl %a0 5c1e4: 6738 beqs 5c21e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 5c1e6: 4aa8 0018 tstl %a0@(24) 5c1ea: 674c beqs 5c238 <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5c1ec: 4878 0046 pea 46 5c1f0: 42a7 clrl %sp@- 5c1f2: 2f02 movel %d2,%sp@- 5c1f4: 4eb9 0004 fa48 jsr 4fa48 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5c1fa: 206a 003c moveal %a2@(60),%a0 5c1fe: 45ea 0018 lea %a2@(24),%a2 5c202: 4fef 000c lea %sp@(12),%sp 5c206: 2d42 000c movel %d2,%fp@(12) } 5c20a: 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 ); 5c20e: 2d4a 0008 movel %a2,%fp@(8) } 5c212: 246e fffc moveal %fp@(-4),%a2 5c216: 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 ); 5c218: 2268 0018 moveal %a0@(24),%a1 5c21c: 4ed1 jmp %a1@ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5c21e: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5c224: 242e fff8 movel %fp@(-8),%d2 iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5c228: 2040 moveal %d0,%a0 5c22a: 7009 moveq #9,%d0 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5c22c: 246e fffc moveal %fp@(-4),%a2 5c230: 4e5e unlk %fp iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5c232: 2080 movel %d0,%a0@ * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5c234: 70ff moveq #-1,%d0 5c236: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c238: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5c23e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c242: 2040 moveal %d0,%a0 <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5c244: 70ff moveq #-1,%d0 <== NOT EXECUTED 5c246: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5c24a: 4e5e unlk %fp <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c24c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5c252: 4e75 rts <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5c254: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5c25a: 242e fff8 movel %fp@(-8),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5c25e: 2040 moveal %d0,%a0 5c260: 720e moveq #14,%d1 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5c262: 70ff moveq #-1,%d0 5c264: 246e fffc moveal %fp@(-4),%a2 5c268: 4e5e unlk %fp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5c26a: 2081 movel %d1,%a0@ <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } =============================================================================== 00043d9c : #include int fsync( int fd ) { 43d9c: 4e56 0000 linkw %fp,#0 43da0: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43da4: b0b9 0006 03d4 cmpl 603d4 ,%d0 43daa: 6430 bccs 43ddc <== NEVER TAKEN iop = rtems_libio_iop( fd ); 43dac: 2079 0006 1a80 moveal 61a80 ,%a0 43db2: ed88 lsll #6,%d0 43db4: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43db6: 2028 0014 movel %a0@(20),%d0 43dba: 0800 0008 btst #8,%d0 43dbe: 671c beqs 43ddc <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43dc0: 44c0 movew %d0,%ccr 43dc2: 662a bnes 43dee /* * Now process the fsync(). */ if ( !iop->handlers ) 43dc4: 2268 003c moveal %a0@(60),%a1 43dc8: 4a89 tstl %a1 43dca: 6710 beqs 43ddc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 43dcc: 2269 0028 moveal %a1@(40),%a1 43dd0: 4a89 tstl %a1 43dd2: 672c beqs 43e00 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 43dd4: 2d48 0008 movel %a0,%fp@(8) } 43dd8: 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 ); 43dda: 4ed1 jmp %a1@ /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 43ddc: 4eb9 0005 04d0 jsr 504d0 <__errno> <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 43de2: 4e5e unlk %fp <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 43de4: 2040 moveal %d0,%a0 <== NOT EXECUTED 43de6: 7009 moveq #9,%d0 <== NOT EXECUTED 43de8: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 43dea: 70ff moveq #-1,%d0 <== NOT EXECUTED 43dec: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43dee: 4eb9 0005 04d0 jsr 504d0 <__errno> 43df4: 7216 moveq #22,%d1 43df6: 2040 moveal %d0,%a0 if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 43df8: 70ff moveq #-1,%d0 43dfa: 4e5e unlk %fp rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43dfc: 2081 movel %d1,%a0@ if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 43dfe: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43e00: 4eb9 0005 04d0 jsr 504d0 <__errno> return (*iop->handlers->fsync_h)( iop ); } 43e06: 4e5e unlk %fp if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43e08: 2040 moveal %d0,%a0 return (*iop->handlers->fsync_h)( iop ); } 43e0a: 70ff moveq #-1,%d0 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43e0c: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fsync_h)( iop ); } =============================================================================== 0004bb1c : int ftruncate( int fd, off_t length ) { 4bb1c: 4e56 ffec linkw %fp,#-20 4bb20: 202e 0008 movel %fp@(8),%d0 4bb24: 2f0a movel %a2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4bb26: b0b9 0005 e5f4 cmpl 5e5f4 ,%d0 4bb2c: 647a bccs 4bba8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 4bb2e: 2479 0005 fca0 moveal 5fca0 ,%a2 4bb34: ed88 lsll #6,%d0 4bb36: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4bb38: 202a 0014 movel %a2@(20),%d0 4bb3c: 0280 0000 0100 andil #256,%d0 4bb42: 6764 beqs 4bba8 <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4bb44: 43ee ffec lea %fp@(-20),%a1 4bb48: 22aa 0018 movel %a2@(24),%a1@ 4bb4c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4bb52: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4bb58: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 4bb5e: 206e fff8 moveal %fp@(-8),%a0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4bb62: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 4bb68: 2068 0010 moveal %a0@(16),%a0 4bb6c: 4a88 tstl %a0 4bb6e: 6764 beqs 4bbd4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4bb70: 2f09 movel %a1,%sp@- 4bb72: 4e90 jsr %a0@ 4bb74: 588f addql #4,%sp 4bb76: 7201 moveq #1,%d1 4bb78: b280 cmpl %d0,%d1 4bb7a: 6770 beqs 4bbec rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4bb7c: 7004 moveq #4,%d0 4bb7e: c0aa 0014 andl %a2@(20),%d0 4bb82: 673a beqs 4bbbe <== NEVER TAKEN if ( !iop->handlers->ftruncate_h ) 4bb84: 206a 003c moveal %a2@(60),%a0 4bb88: 2068 0020 moveal %a0@(32),%a0 4bb8c: 4a88 tstl %a0 4bb8e: 6744 beqs 4bbd4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4bb90: 2f2e 0010 movel %fp@(16),%sp@- 4bb94: 2f2e 000c movel %fp@(12),%sp@- 4bb98: 2f0a movel %a2,%sp@- 4bb9a: 4e90 jsr %a0@ } 4bb9c: 246e ffe8 moveal %fp@(-24),%a2 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4bba0: 4fef 000c lea %sp@(12),%sp } 4bba4: 4e5e unlk %fp 4bba6: 4e75 rts rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4bba8: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbae: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4bbb2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bbb4: 7209 moveq #9,%d1 <== NOT EXECUTED 4bbb6: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbb8: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4bbba: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbbc: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4bbbe: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbc4: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4bbc8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bbca: 7216 moveq #22,%d1 <== NOT EXECUTED 4bbcc: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbce: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4bbd0: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbd2: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4bbd4: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbda: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4bbde: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bbe0: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbe2: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4bbe4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbea: 4e75 rts <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4bbec: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbf2: 246e ffe8 moveal %fp@(-24),%a2 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4bbf6: 2040 moveal %d0,%a0 4bbf8: 7215 moveq #21,%d1 4bbfa: 70ff moveq #-1,%d0 if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4bbfc: 4e5e unlk %fp loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4bbfe: 2081 movel %d1,%a0@ if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } ... =============================================================================== 0005e030 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5e030: 4e56 ffec linkw %fp,#-20 5e034: 202e 0008 movel %fp@(8),%d0 5e038: 2f0a movel %a2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5e03a: b0b9 0006 0cf4 cmpl 60cf4 ,%d0 5e040: 655e bcss 5e0a0 5e042: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e044: 43ee ffec lea %fp@(-20),%a1 5e048: 22aa 0018 movel %a2@(24),%a1@ 5e04c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 5e052: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 5e058: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 5e05e: 206e fff8 moveal %fp@(-8),%a0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e062: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 5e068: 2068 0010 moveal %a0@(16),%a0 5e06c: 4a88 tstl %a0 5e06e: 6752 beqs 5e0c2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5e070: 2f09 movel %a1,%sp@- 5e072: 4e90 jsr %a0@ 5e074: 588f addql #4,%sp 5e076: 7201 moveq #1,%d1 5e078: b280 cmpl %d0,%d1 5e07a: 6630 bnes 5e0ac /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 5e07c: 206a 003c moveal %a2@(60),%a0 5e080: 2068 0008 moveal %a0@(8),%a0 5e084: 4a88 tstl %a0 5e086: 673a beqs 5e0c2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5e088: 2f2e 0010 movel %fp@(16),%sp@- 5e08c: 2f2e 000c movel %fp@(12),%sp@- 5e090: 2f0a movel %a2,%sp@- 5e092: 4e90 jsr %a0@ } 5e094: 246e ffe8 moveal %fp@(-24),%a2 */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5e098: 4fef 000c lea %sp@(12),%sp } 5e09c: 4e5e unlk %fp 5e09e: 4e75 rts /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5e0a0: 2479 0006 24b0 moveal 624b0 ,%a2 5e0a6: ed88 lsll #6,%d0 5e0a8: d5c0 addal %d0,%a2 5e0aa: 6098 bras 5e044 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5e0ac: 4eb9 0005 077c jsr 5077c <__errno> if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 5e0b2: 246e ffe8 moveal %fp@(-24),%a2 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5e0b6: 2040 moveal %d0,%a0 5e0b8: 7214 moveq #20,%d1 5e0ba: 70ff moveq #-1,%d0 if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 5e0bc: 4e5e unlk %fp loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5e0be: 2081 movel %d1,%a0@ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 5e0c0: 4e75 rts * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5e0c2: 4eb9 0005 077c jsr 5077c <__errno> <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 5e0c8: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5e0cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 5e0ce: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 5e0d0: 4e5e unlk %fp <== NOT EXECUTED * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5e0d2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } ... =============================================================================== 0004355e : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4355e: 4e56 ffe0 linkw %fp,#-32 43562: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43566: 242e 0008 movel %fp@(8),%d2 4356a: 47fa fc26 lea %pc@(43192 ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 4356e: 49f9 0005 1578 lea 51578 ,%a4 struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 43574: 2c2e 000c movel %fp@(12),%d6 43578: 246e 0010 moveal %fp@(16),%a2 4357c: 2a2e 0014 movel %fp@(20),%d5 43580: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 43584: 4eb9 0004 341a jsr 4341a if ((fp = fopen("/etc/group", "r")) == NULL) { 4358a: 4879 0005 f42b pea 5f42b <_global_impure_ptr+0xbf> 43590: 4879 0005 ea72 pea 5ea72 43596: 4eb9 0005 02f4 jsr 502f4 4359c: 508f addql #8,%sp 4359e: 2600 movel %d0,%d3 435a0: 6778 beqs 4361a <== NEVER TAKEN errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 435a2: 2f04 movel %d4,%sp@- 435a4: 2f05 movel %d5,%sp@- 435a6: 2f0a movel %a2,%sp@- 435a8: 2f03 movel %d3,%sp@- 435aa: 4e93 jsr %a3@ 435ac: 4fef 0010 lea %sp@(16),%sp 435b0: 4a80 tstl %d0 435b2: 6744 beqs 435f8 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 435b4: 4a82 tstl %d2 435b6: 672e beqs 435e6 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 435b8: 2f02 movel %d2,%sp@- 435ba: 2f12 movel %a2@,%sp@- 435bc: 4e94 jsr %a4@ 435be: 508f addql #8,%sp 435c0: 4a80 tstl %d0 435c2: 57c0 seq %d0 435c4: 49c0 extbl %d0 435c6: 4480 negl %d0 } else { match = (grp->gr_gid == gid); } if (match) { 435c8: 67d8 beqs 435a2 fclose(fp); 435ca: 2f03 movel %d3,%sp@- 435cc: 4eb9 0004 fc72 jsr 4fc72 *result = grp; 435d2: 206e 001c moveal %fp@(28),%a0 return 0; 435d6: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 435d8: 4280 clrl %d0 435da: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 435dc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 435e2: 4e5e unlk %fp 435e4: 4e75 rts } if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 435e6: 4280 clrl %d0 <== NOT EXECUTED 435e8: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 435ec: bc80 cmpl %d0,%d6 <== NOT EXECUTED 435ee: 57c0 seq %d0 <== NOT EXECUTED 435f0: 49c0 extbl %d0 <== NOT EXECUTED 435f2: 4480 negl %d0 <== NOT EXECUTED } if (match) { 435f4: 67ac beqs 435a2 <== NOT EXECUTED 435f6: 60d2 bras 435ca <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 435f8: 4eb9 0004 fb34 jsr 4fb34 <__errno> <== NOT EXECUTED 435fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 43600: 7016 moveq #22,%d0 <== NOT EXECUTED 43602: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 43604: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43606: 4eb9 0004 fc72 jsr 4fc72 <== NOT EXECUTED return -1; 4360c: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 4360e: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 43610: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 43616: 4e5e unlk %fp <== NOT EXECUTED 43618: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 4361a: 4eb9 0004 fb34 jsr 4fb34 <__errno> <== NOT EXECUTED 43620: 7216 moveq #22,%d1 <== NOT EXECUTED 43622: 2040 moveal %d0,%a0 <== NOT EXECUTED 43624: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 43626: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 4362c: 2081 movel %d1,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 4362e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000432ae : return NULL; return p; } struct group *getgrent(void) { 432ae: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 432b2: 2039 0006 0b0a movel 60b0a ,%d0 <== NOT EXECUTED 432b8: 6608 bnes 432c2 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 432ba: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 432bc: 2001 movel %d1,%d0 <== NOT EXECUTED 432be: 4e5e unlk %fp <== NOT EXECUTED 432c0: 4e75 rts <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 432c2: 4878 00c8 pea c8 <== NOT EXECUTED 432c6: 4879 0006 0b0e pea 60b0e <== NOT EXECUTED 432cc: 4879 0006 0bd6 pea 60bd6 <== NOT EXECUTED 432d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432d4: 4eba febc jsr %pc@(43192 ) <== NOT EXECUTED 432d8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 432dc: 223c 0006 0bd6 movel #396246,%d1 <== NOT EXECUTED 432e2: 4a80 tstl %d0 <== NOT EXECUTED 432e4: 67d4 beqs 432ba <== NOT EXECUTED return NULL; return &grent; } 432e6: 2001 movel %d1,%d0 <== NOT EXECUTED 432e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043658 : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 43658: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 4365a: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4365e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 43662: 4878 00c8 pea c8 <== NOT EXECUTED 43666: 4879 0006 0b0e pea 60b0e <== NOT EXECUTED 4366c: 4879 0006 0bd6 pea 60bd6 <== NOT EXECUTED 43672: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43676: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43678: 4eb9 0004 3632 jsr 43632 <== NOT EXECUTED 4367e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 43682: 4a80 tstl %d0 <== NOT EXECUTED 43684: 6608 bnes 4368e <== NOT EXECUTED return NULL; return p; 43686: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4368a: 4e5e unlk %fp <== NOT EXECUTED 4368c: 4e75 rts <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4368e: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 43690: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043632 : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 43632: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 43634: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 43638: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 4363c: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 43640: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 43644: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 43648: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 4364c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4364e: 42a7 clrl %sp@- <== NOT EXECUTED 43650: 4eba ff0c jsr %pc@(4355e ) <== NOT EXECUTED } 43654: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436b6 : struct group *getgrnam( const char *name ) { 436b6: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 436ba: 486e fffc pea %fp@(-4) 436be: 4878 00c8 pea c8 436c2: 4879 0006 0b0e pea 60b0e 436c8: 4879 0006 0bd6 pea 60bd6 436ce: 2f2e 0008 movel %fp@(8),%sp@- 436d2: 4eb9 0004 3694 jsr 43694 436d8: 4fef 0014 lea %sp@(20),%sp 436dc: 4a80 tstl %d0 436de: 6608 bnes 436e8 <== NEVER TAKEN return NULL; return p; 436e0: 202e fffc movel %fp@(-4),%d0 } 436e4: 4e5e unlk %fp 436e6: 4e75 rts const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 436e8: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 436ea: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005c288 : */ pid_t getpid( void ) { return _Objects_Local_node; } 5c288: 7001 moveq #1,%d0 <== NOT EXECUTED * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 5c28a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return _Objects_Local_node; } 5c28e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043728 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 43728: 4e56 ffe0 linkw %fp,#-32 4372c: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43730: 242e 0008 movel %fp@(8),%d2 43734: 47fa fbb6 lea %pc@(432ec ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 43738: 49f9 0005 1578 lea 51578 ,%a4 struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4373e: 2c2e 000c movel %fp@(12),%d6 43742: 246e 0010 moveal %fp@(16),%a2 43746: 2a2e 0014 movel %fp@(20),%d5 4374a: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 4374e: 4eb9 0004 341a jsr 4341a if ((fp = fopen("/etc/passwd", "r")) == NULL) { 43754: 4879 0005 f42b pea 5f42b <_global_impure_ptr+0xbf> 4375a: 4879 0005 e9ff pea 5e9ff 43760: 4eb9 0005 02f4 jsr 502f4 43766: 508f addql #8,%sp 43768: 2600 movel %d0,%d3 4376a: 6778 beqs 437e4 <== NEVER TAKEN errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 4376c: 2f04 movel %d4,%sp@- 4376e: 2f05 movel %d5,%sp@- 43770: 2f0a movel %a2,%sp@- 43772: 2f03 movel %d3,%sp@- 43774: 4e93 jsr %a3@ 43776: 4fef 0010 lea %sp@(16),%sp 4377a: 4a80 tstl %d0 4377c: 6744 beqs 437c2 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 4377e: 4a82 tstl %d2 43780: 672e beqs 437b0 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 43782: 2f02 movel %d2,%sp@- 43784: 2f12 movel %a2@,%sp@- 43786: 4e94 jsr %a4@ 43788: 508f addql #8,%sp 4378a: 4a80 tstl %d0 4378c: 57c0 seq %d0 4378e: 49c0 extbl %d0 43790: 4480 negl %d0 } else { match = (pwd->pw_uid == uid); } if (match) { 43792: 67d8 beqs 4376c fclose(fp); 43794: 2f03 movel %d3,%sp@- 43796: 4eb9 0004 fc72 jsr 4fc72 *result = pwd; 4379c: 206e 001c moveal %fp@(28),%a0 return 0; 437a0: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 437a2: 4280 clrl %d0 437a4: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 437a6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 437ac: 4e5e unlk %fp 437ae: 4e75 rts } if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 437b0: 4280 clrl %d0 <== NOT EXECUTED 437b2: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 437b6: bc80 cmpl %d0,%d6 <== NOT EXECUTED 437b8: 57c0 seq %d0 <== NOT EXECUTED 437ba: 49c0 extbl %d0 <== NOT EXECUTED 437bc: 4480 negl %d0 <== NOT EXECUTED } if (match) { 437be: 67ac beqs 4376c <== NOT EXECUTED 437c0: 60d2 bras 43794 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 437c2: 4eb9 0004 fb34 jsr 4fb34 <__errno> <== NOT EXECUTED 437c8: 7416 moveq #22,%d2 <== NOT EXECUTED 437ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 437cc: 2082 movel %d2,%a0@ <== NOT EXECUTED fclose(fp); 437ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 437d0: 4eb9 0004 fc72 jsr 4fc72 <== NOT EXECUTED return -1; 437d6: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 437d8: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 437da: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 437e0: 4e5e unlk %fp <== NOT EXECUTED 437e2: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 437e4: 4eb9 0004 fb34 jsr 4fb34 <__errno> <== NOT EXECUTED 437ea: 7616 moveq #22,%d3 <== NOT EXECUTED 437ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 437ee: 70ff moveq #-1,%d0 <== NOT EXECUTED 437f0: 2083 movel %d3,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 437f2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 437f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000433dc : return NULL; return p; } struct passwd *getpwent(void) { 433dc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 433e0: 2039 0006 0a22 movel 60a22 ,%d0 <== NOT EXECUTED 433e6: 6608 bnes 433f0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 433e8: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 433ea: 2001 movel %d1,%d0 <== NOT EXECUTED 433ec: 4e5e unlk %fp <== NOT EXECUTED 433ee: 4e75 rts <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 433f0: 4878 00c8 pea c8 <== NOT EXECUTED 433f4: 4879 0006 0a26 pea 60a26 <== NOT EXECUTED 433fa: 4879 0006 0aee pea 60aee <== NOT EXECUTED 43400: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43402: 4eba fee8 jsr %pc@(432ec ) <== NOT EXECUTED 43406: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4340a: 223c 0006 0aee movel #396014,%d1 <== NOT EXECUTED 43410: 4a80 tstl %d0 <== NOT EXECUTED 43412: 67d4 beqs 433e8 <== NOT EXECUTED return NULL; return &pwent; } 43414: 2001 movel %d1,%d0 <== NOT EXECUTED 43416: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043880 : struct passwd *getpwnam( const char *name ) { 43880: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 43884: 486e fffc pea %fp@(-4) 43888: 4878 00c8 pea c8 4388c: 4879 0006 0a26 pea 60a26 43892: 4879 0006 0aee pea 60aee 43898: 2f2e 0008 movel %fp@(8),%sp@- 4389c: 4eb9 0004 385e jsr 4385e 438a2: 4fef 0014 lea %sp@(20),%sp 438a6: 4a80 tstl %d0 438a8: 6608 bnes 438b2 <== NEVER TAKEN return NULL; return p; 438aa: 202e fffc movel %fp@(-4),%d0 } 438ae: 4e5e unlk %fp 438b0: 4e75 rts const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 438b2: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 438b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043822 : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 43822: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 43824: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 43828: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4382c: 4878 00c8 pea c8 <== NOT EXECUTED 43830: 4879 0006 0a26 pea 60a26 <== NOT EXECUTED 43836: 4879 0006 0aee pea 60aee <== NOT EXECUTED 4383c: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43840: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43842: 4eb9 0004 37fc jsr 437fc <== NOT EXECUTED 43848: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4384c: 4a80 tstl %d0 <== NOT EXECUTED 4384e: 6608 bnes 43858 <== NOT EXECUTED return NULL; return p; 43850: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 43854: 4e5e unlk %fp <== NOT EXECUTED 43856: 4e75 rts <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 43858: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 4385a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000437fc : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 437fc: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 437fe: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 43802: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 43806: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 4380a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4380e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 43812: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43816: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43818: 42a7 clrl %sp@- <== NOT EXECUTED 4381a: 4eba ff0c jsr %pc@(43728 ) <== NOT EXECUTED } 4381e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042e6c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 42e6c: 4e56 ffec linkw %fp,#-20 42e70: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42e74: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 42e78: 4a8a tstl %a2 42e7a: 673c beqs 42eb8 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 42e7c: 203c 0000 0700 movel #1792,%d0 42e82: 40c2 movew %sr,%d2 42e84: 8082 orl %d2,%d0 42e86: 46c0 movew %d0,%sr _TOD_Get( &now ); 42e88: 486e fff8 pea %fp@(-8) 42e8c: 4eb9 0004 759c jsr 4759c <_TOD_Get> _ISR_Enable(level); 42e92: 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; 42e94: 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; 42e9a: 588f addql #4,%sp 42e9c: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 42e9e: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 42ea2: 4c43 1801 remsl %d3,%d1,%d1 42ea6: 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; 42eaa: 24ae fff8 movel %fp@(-8),%a2@ } 42eae: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 42eb4: 4e5e unlk %fp 42eb6: 4e75 rts void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 42eb8: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42ebe: 720e moveq #14,%d1 <== NOT EXECUTED 42ec0: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ec2: 70ff moveq #-1,%d0 <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 42ec4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 42eca: 2081 movel %d1,%a0@ <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 42ecc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e598 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4e598: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4e59a: 4e56 0000 linkw %fp,#0 4e59e: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4e5a2: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4e5a6: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4e5a8: b0a9 0048 cmpl %a1@(72),%d0 4e5ac: 6708 beqs 4e5b6 <== ALWAYS TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 4e5ae: 241f movel %sp@+,%d2 <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4e5b0: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 4e5b2: 4e5e unlk %fp <== NOT EXECUTED 4e5b4: 4e75 rts <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4e5b6: 4280 clrl %d0 4e5b8: 4281 clrl %d1 4e5ba: 4282 clrl %d2 4e5bc: 2141 000c movel %d1,%a0@(12) 4e5c0: 2142 0010 movel %d2,%a0@(16) return 0; } 4e5c4: 241f movel %sp@+,%d2 4e5c6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e706 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4e706: 4e56 fff8 linkw %fp,#-8 4e70a: 2f0b movel %a3,%sp@- 4e70c: 266e 000c moveal %fp@(12),%a3 4e710: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4e712: 2453 moveal %a3@,%a2 4e714: 200a movel %a2,%d0 4e716: 0680 0000 0050 addil #80,%d0 4e71c: b0aa 004c cmpl %a2@(76),%d0 4e720: 6600 0090 bnew 4e7b2 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 4e724: 206b 0010 moveal %a3@(16),%a0 4e728: b5e8 001c cmpal %a0@(28),%a2 4e72c: 6700 009e beqw 4e7cc /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4e730: 4aaa 0058 tstl %a2@(88) 4e734: 6600 0096 bnew 4e7cc /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4e738: 4aaa 0008 tstl %a2@(8) 4e73c: 670e beqs 4e74c 4e73e: 2f0a movel %a2,%sp@- 4e740: 4eb9 0004 714c jsr 4714c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4e746: 588f addql #4,%sp 4e748: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4e74c: 302a 0032 movew %a2@(50),%d0 4e750: 5380 subql #1,%d0 4e752: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4e756: 42a7 clrl %sp@- 4e758: 486e fff8 pea %fp@(-8) 4e75c: 4eb9 0004 2e6c jsr 42e6c 4e762: 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) ) { 4e768: 2f0a movel %a2,%sp@- 4e76a: 4eb9 0004 bc52 jsr 4bc52 4e770: 4fef 000c lea %sp@(12),%sp 4e774: 4a80 tstl %d0 4e776: 662c bnes 4e7a4 <== NEVER TAKEN 4e778: 4a6a 0032 tstw %a2@(50) 4e77c: 6626 bnes 4e7a4 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4e77e: 2079 0005 e710 moveal 5e710 ,%a0 4e784: 2653 moveal %a3@,%a3 4e786: b7e8 0004 cmpal %a0@(4),%a3 4e78a: 675a beqs 4e7e6 <== NEVER TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 4e78c: 2f0a movel %a2,%sp@- 4e78e: 4eb9 0004 2ddc jsr 42ddc 4e794: 588f addql #4,%sp 4e796: 4280 clrl %d0 } return 0; } 4e798: 246e fff0 moveal %fp@(-16),%a2 4e79c: 266e fff4 moveal %fp@(-12),%a3 4e7a0: 4e5e unlk %fp 4e7a2: 4e75 rts 4e7a4: 246e fff0 moveal %fp@(-16),%a2 /* * Free memory associated with a memory file. */ free( the_jnode ); 4e7a8: 4280 clrl %d0 } return 0; } 4e7aa: 266e fff4 moveal %fp@(-12),%a3 4e7ae: 4e5e unlk %fp 4e7b0: 4e75 rts /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4e7b2: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> free( the_jnode ); } return 0; } 4e7b8: 246e fff0 moveal %fp@(-16),%a2 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4e7bc: 2040 moveal %d0,%a0 4e7be: 725a moveq #90,%d1 4e7c0: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 4e7c2: 266e fff4 moveal %fp@(-12),%a3 4e7c6: 4e5e unlk %fp /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4e7c8: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 4e7ca: 4e75 rts /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4e7cc: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> free( the_jnode ); } return 0; } 4e7d2: 246e fff0 moveal %fp@(-16),%a2 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4e7d6: 2040 moveal %d0,%a0 4e7d8: 7210 moveq #16,%d1 4e7da: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 4e7dc: 266e fff4 moveal %fp@(-12),%a3 4e7e0: 4e5e unlk %fp /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4e7e2: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 4e7e4: 4e75 rts /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 4e7e6: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 4e7ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e7ec: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED 4e7f2: 588f addql #4,%sp <== NOT EXECUTED 4e7f4: 4280 clrl %d0 <== NOT EXECUTED 4e7f6: 60a0 bras 4e798 <== NOT EXECUTED =============================================================================== 0004341a : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 4341a: 4e56 0000 linkw %fp,#0 4341e: 2f0a movel %a2,%sp@- 43420: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 43422: 4a39 0006 0a20 tstb 60a20 43428: 670c beqs 43436 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 4342a: 242e fff8 movel %fp@(-8),%d2 4342e: 246e fffc moveal %fp@(-4),%a2 43432: 4e5e unlk %fp 43434: 4e75 rts static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 43436: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4343a: 45f9 0005 02f4 lea 502f4 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 43440: 4879 0005 e9fa pea 5e9fa FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 43446: 7001 moveq #1,%d0 43448: 13c0 0006 0a20 moveb %d0,60a20 mkdir("/etc", 0777); 4344e: 4eb9 0004 3c20 jsr 43c20 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 43454: 4879 0005 f42b pea 5f42b <_global_impure_ptr+0xbf> 4345a: 4879 0005 e9ff pea 5e9ff 43460: 4e92 jsr %a2@ 43462: 4fef 0010 lea %sp@(16),%sp 43466: 4a80 tstl %d0 43468: 677e beqs 434e8 <== ALWAYS TAKEN fclose(fp); 4346a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4346c: 4eb9 0004 fc72 jsr 4fc72 <== NOT EXECUTED 43472: 588f addql #4,%sp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 43474: 4879 0005 f42b pea 5f42b <_global_impure_ptr+0xbf> 4347a: 4879 0005 ea72 pea 5ea72 43480: 4e92 jsr %a2@ 43482: 508f addql #8,%sp 43484: 4a80 tstl %d0 43486: 6716 beqs 4349e <== ALWAYS TAKEN fclose(fp); 43488: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4348a: 4eb9 0004 fc72 jsr 4fc72 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 43490: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); 43494: 588f addql #4,%sp <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 43496: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4349a: 4e5e unlk %fp <== NOT EXECUTED 4349c: 4e75 rts <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 4349e: 4879 0005 e102 pea 5e102 <_rodata_start+0xf2> 434a4: 4879 0005 ea72 pea 5ea72 434aa: 4eb9 0005 02f4 jsr 502f4 434b0: 508f addql #8,%sp 434b2: 2440 moveal %d0,%a2 434b4: 4a80 tstl %d0 434b6: 6700 ff72 beqw 4342a fprintf( fp, "root:x:0:root\n" 434ba: 2f00 movel %d0,%sp@- 434bc: 4878 002a pea 2a 434c0: 4878 0001 pea 1 434c4: 4879 0005 ea7d pea 5ea7d 434ca: 4eb9 0005 0b1c jsr 50b1c "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 434d0: 2f0a movel %a2,%sp@- 434d2: 4eb9 0004 fc72 jsr 4fc72 } } 434d8: 242e fff8 movel %fp@(-8),%d2 } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 434dc: 4fef 0014 lea %sp@(20),%sp } } 434e0: 246e fffc moveal %fp@(-4),%a2 434e4: 4e5e unlk %fp 434e6: 4e75 rts * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 434e8: 4879 0005 e102 pea 5e102 <_rodata_start+0xf2> 434ee: 4879 0005 e9ff pea 5e9ff 434f4: 4e92 jsr %a2@ 434f6: 508f addql #8,%sp 434f8: 2400 movel %d0,%d2 434fa: 6700 ff78 beqw 43474 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 434fe: 2f00 movel %d0,%sp@- 43500: 4878 0066 pea 66 43504: 4878 0001 pea 1 43508: 4879 0005 ea0b pea 5ea0b 4350e: 4eb9 0005 0b1c jsr 50b1c "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 43514: 2f02 movel %d2,%sp@- 43516: 4eb9 0004 fc72 jsr 4fc72 4351c: 4fef 0014 lea %sp@(20),%sp 43520: 6000 ff52 braw 43474 =============================================================================== 0004654c : int ioctl( int fd, ioctl_command_t command, ... ) { 4654c: 4e56 0000 linkw %fp,#0 46550: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 46554: b0b9 0006 27a4 cmpl 627a4 ,%d0 4655a: 643c bccs 46598 iop = rtems_libio_iop( fd ); 4655c: 2079 0006 3f0c moveal 63f0c ,%a0 46562: ed88 lsll #6,%d0 46564: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 46566: 2028 0014 movel %a0@(20),%d0 4656a: 0280 0000 0100 andil #256,%d0 46570: 6726 beqs 46598 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 46572: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 46576: 2268 003c moveal %a0@(60),%a1 4657a: 4a89 tstl %a1 4657c: 671a beqs 46598 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 4657e: 2269 0010 moveal %a1@(16),%a1 46582: 4a89 tstl %a1 46584: 6724 beqs 465aa <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 46586: 2f00 movel %d0,%sp@- 46588: 2f2e 000c movel %fp@(12),%sp@- 4658c: 2f08 movel %a0,%sp@- 4658e: 4e91 jsr %a1@ return rc; 46590: 4fef 000c lea %sp@(12),%sp } 46594: 4e5e unlk %fp 46596: 4e75 rts /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 46598: 4eb9 0005 3524 jsr 53524 <__errno> 4659e: 7209 moveq #9,%d1 465a0: 2040 moveal %d0,%a0 465a2: 70ff moveq #-1,%d0 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465a4: 4e5e unlk %fp /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 465a6: 2081 movel %d1,%a0@ rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465a8: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 465aa: 4eb9 0005 3524 jsr 53524 <__errno> <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465b0: 4e5e unlk %fp <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 465b2: 2040 moveal %d0,%a0 <== NOT EXECUTED 465b4: 70ff moveq #-1,%d0 <== NOT EXECUTED 465b6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } ... =============================================================================== 00044a48 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44a48: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 44a4c: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 44a50: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 44a54: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 44a58: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44a5c: 1401 moveb %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 44a5e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44a62: 6704 beqs 44a68 <== NOT EXECUTED c &= 0x7f; 44a64: 747f moveq #127,%d2 <== NOT EXECUTED 44a66: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 44a68: 0800 0009 btst #9,%d0 <== NOT EXECUTED 44a6c: 6720 beqs 44a8e <== NOT EXECUTED c = tolower (c); 44a6e: 2079 0005 e7a0 moveal 5e7a0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 44a74: 7603 moveq #3,%d3 <== NOT EXECUTED 44a76: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44a7c: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 44a80: 49c1 extbl %d1 <== NOT EXECUTED 44a82: c283 andl %d3,%d1 <== NOT EXECUTED 44a84: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 44a88: b681 cmpl %d1,%d3 <== NOT EXECUTED 44a8a: 6700 00e0 beqw 44b6c <== NOT EXECUTED if (c == '\r') { 44a8e: 4281 clrl %d1 <== NOT EXECUTED 44a90: 1202 moveb %d2,%d1 <== NOT EXECUTED 44a92: 760d moveq #13,%d3 <== NOT EXECUTED 44a94: b681 cmpl %d1,%d3 <== NOT EXECUTED 44a96: 6740 beqs 44ad8 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 44a98: 760a moveq #10,%d3 <== NOT EXECUTED 44a9a: b681 cmpl %d1,%d3 <== NOT EXECUTED 44a9c: 6700 00c4 beqw 44b62 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 44aa0: 4a02 tstb %d2 <== NOT EXECUTED 44aa2: 664c bnes 44af0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 44aa4: 2039 0005 e700 movel 5e700 ,%d0 <== NOT EXECUTED 44aaa: 5380 subql #1,%d0 <== NOT EXECUTED 44aac: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44ab0: b081 cmpl %d1,%d0 <== NOT EXECUTED 44ab2: 6f28 bles 44adc <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 44ab4: 7008 moveq #8,%d0 <== NOT EXECUTED 44ab6: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44aba: 6600 00ba bnew 44b76 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 44abe: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44ac2: 4280 clrl %d0 <== NOT EXECUTED 44ac4: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44ac8: 5281 addql #1,%d1 <== NOT EXECUTED 44aca: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED } return 0; } 44ace: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44ad4: 4e5e unlk %fp <== NOT EXECUTED 44ad6: 4e75 rts <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 44ad8: 4a00 tstb %d0 <== NOT EXECUTED 44ada: 6c0c bges 44ae8 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 44adc: 4280 clrl %d0 <== NOT EXECUTED } return 0; } 44ade: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44ae4: 4e5e unlk %fp <== NOT EXECUTED 44ae6: 4e75 rts <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 44ae8: 0800 0008 btst #8,%d0 <== NOT EXECUTED 44aec: 6702 beqs 44af0 <== NOT EXECUTED 44aee: 740a moveq #10,%d2 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 44af0: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 44af4: 0801 0001 btst #1,%d1 <== NOT EXECUTED 44af8: 67aa beqs 44aa4 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 44afa: 4283 clrl %d3 <== NOT EXECUTED 44afc: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 44b00: 4280 clrl %d0 <== NOT EXECUTED 44b02: 1002 moveb %d2,%d0 <== NOT EXECUTED 44b04: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b06: 6700 0122 beqw 44c2a <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 44b0a: 4283 clrl %d3 <== NOT EXECUTED 44b0c: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 44b10: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b12: 6700 00a8 beqw 44bbc <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 44b16: 4283 clrl %d3 <== NOT EXECUTED 44b18: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 44b1c: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b1e: 6700 00fe beqw 44c1e <== NOT EXECUTED return 1; } else if (c == '\n') { 44b22: 760a moveq #10,%d3 <== NOT EXECUTED 44b24: b680 cmpl %d0,%d3 <== NOT EXECUTED 44b26: 6700 00ac beqw 44bd4 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 44b2a: 4283 clrl %d3 <== NOT EXECUTED 44b2c: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 44b30: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b32: 670c beqs 44b40 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 44b34: 4283 clrl %d3 <== NOT EXECUTED 44b36: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 44b3a: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b3c: 6600 ff66 bnew 44aa4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 44b40: 44c1 movew %d1,%ccr <== NOT EXECUTED 44b42: 6b58 bmis 44b9c <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 44b44: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44b48: 7001 moveq #1,%d0 <== NOT EXECUTED 44b4a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44b4e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44b52: 5281 addql #1,%d1 <== NOT EXECUTED 44b54: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44b58: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44b5e: 4e5e unlk %fp <== NOT EXECUTED 44b60: 4e75 rts <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 44b62: 0800 0006 btst #6,%d0 <== NOT EXECUTED 44b66: 6788 beqs 44af0 <== NOT EXECUTED 44b68: 740d moveq #13,%d2 <== NOT EXECUTED 44b6a: 6084 bras 44af0 <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 44b6c: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 44b72: 6000 ff1a braw 44a8e <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 44b76: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b78: 4280 clrl %d0 <== NOT EXECUTED 44b7a: 1002 moveb %d2,%d0 <== NOT EXECUTED 44b7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b7e: 4eba fc30 jsr %pc@(447b0 ) <== NOT EXECUTED 44b82: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44b86: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44b88: 4280 clrl %d0 <== NOT EXECUTED 44b8a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44b8e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44b92: 5281 addql #1,%d1 <== NOT EXECUTED 44b94: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44b98: 6000 ff34 braw 44ace <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 44b9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b9e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44ba0: 4eba fc0e jsr %pc@(447b0 ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44ba4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 44ba8: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44baa: 7001 moveq #1,%d0 <== NOT EXECUTED 44bac: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44bb0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44bb4: 5281 addql #1,%d1 <== NOT EXECUTED 44bb6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44bba: 609c bras 44b58 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 44bbc: 4878 0001 pea 1 <== NOT EXECUTED 44bc0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44bc2: 4eba fc90 jsr %pc@(44854 ) <== NOT EXECUTED return 0; 44bc6: 508f addql #8,%sp <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 44bc8: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44bca: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44bd0: 4e5e unlk %fp <== NOT EXECUTED 44bd2: 4e75 rts <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 44bd4: 7048 moveq #72,%d0 <== NOT EXECUTED 44bd6: c280 andl %d0,%d1 <== NOT EXECUTED 44bd8: 6620 bnes 44bfa <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 44bda: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44bde: 7001 moveq #1,%d0 <== NOT EXECUTED 44be0: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44be4: 740a moveq #10,%d2 <== NOT EXECUTED 44be6: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44bea: 5281 addql #1,%d1 <== NOT EXECUTED 44bec: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44bf0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44bf6: 4e5e unlk %fp <== NOT EXECUTED 44bf8: 4e75 rts <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 44bfa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44bfc: 4878 000a pea a <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44c00: 740a moveq #10,%d2 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 44c02: 4eba fbac jsr %pc@(447b0 ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44c06: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 44c0a: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44c0c: 7001 moveq #1,%d0 <== NOT EXECUTED 44c0e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44c12: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44c16: 5281 addql #1,%d1 <== NOT EXECUTED 44c18: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44c1c: 60d2 bras 44bf0 <== NOT EXECUTED } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 44c1e: 7001 moveq #1,%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44c20: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44c26: 4e5e unlk %fp <== NOT EXECUTED 44c28: 4e75 rts <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 44c2a: 42a7 clrl %sp@- <== NOT EXECUTED 44c2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44c2e: 4eba fc24 jsr %pc@(44854 ) <== NOT EXECUTED return 0; 44c32: 508f addql #8,%sp <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 44c34: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44c36: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44c3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005c2b0 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 5c2b0: 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 ) { 5c2b2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5c2b6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000443b4 : int link( const char *existing, const char *new ) { 443b4: 4e56 ffc0 linkw %fp,#-64 443b8: 48d7 003c moveml %d2-%d5,%sp@ 443bc: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 443c0: 260e movel %fp,%d3 443c2: 0683 ffff ffe4 addil #-28,%d3 443c8: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 443ca: 282e 000c movel %fp@(12),%d4 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 443ce: 4eb9 0005 1c48 jsr 51c48 443d4: 7201 moveq #1,%d1 443d6: 2e81 movel %d1,%sp@ 443d8: 2f03 movel %d3,%sp@- 443da: 42a7 clrl %sp@- 443dc: 2f00 movel %d0,%sp@- 443de: 2f02 movel %d2,%sp@- 443e0: 4eb9 0004 3e98 jsr 43e98 0, &existing_loc, true ); if ( result != 0 ) 443e6: 4fef 0014 lea %sp@(20),%sp 443ea: 4a80 tstl %d0 443ec: 670e beqs 443fc 443ee: 74ff moveq #-1,%d2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 443f0: 2002 movel %d2,%d0 443f2: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 443f8: 4e5e unlk %fp 443fa: 4e75 rts /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 443fc: 2a0e movel %fp,%d5 443fe: 0685 ffff ffd0 addil #-48,%d5 44404: 2f05 movel %d5,%sp@- 44406: 486e fffc pea %fp@(-4) 4440a: 2f04 movel %d4,%sp@- 4440c: 4eb9 0004 5408 jsr 45408 if ( !parent_loc.ops->evalformake_h ) { 44412: 206e ffdc moveal %fp@(-36),%a0 44416: 4fef 000c lea %sp@(12),%sp 4441a: 2068 0004 moveal %a0@(4),%a0 4441e: 4a88 tstl %a0 44420: 6700 00f2 beqw 44514 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 ); 44424: 486e fff8 pea %fp@(-8) 44428: 2f05 movel %d5,%sp@- 4442a: d8ae fffc addl %fp@(-4),%d4 4442e: 2f04 movel %d4,%sp@- 44430: 4e90 jsr %a0@ if ( result != 0 ) { 44432: 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 ); 44436: 2800 movel %d0,%d4 if ( result != 0 ) { 44438: 6600 00ac bnew 444e6 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 4443c: 202e fff4 movel %fp@(-12),%d0 44440: b0ae ffe0 cmpl %fp@(-32),%d0 44444: 665a bnes 444a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 44446: 226e ffdc moveal %fp@(-36),%a1 4444a: 2069 0008 moveal %a1@(8),%a0 4444e: 4a88 tstl %a0 44450: 6700 00f4 beqw 44546 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 ); 44454: 2f2e fff8 movel %fp@(-8),%sp@- 44458: 2f05 movel %d5,%sp@- 4445a: 2f03 movel %d3,%sp@- 4445c: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 4445e: 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 ); 44462: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 44464: 4fef 000c lea %sp@(12),%sp 44468: 4a88 tstl %a0 4446a: 670e beqs 4447a <== NEVER TAKEN 4446c: 2068 001c moveal %a0@(28),%a0 44470: 4a88 tstl %a0 44472: 6706 beqs 4447a <== NEVER TAKEN 44474: 2f03 movel %d3,%sp@- 44476: 4e90 jsr %a0@ 44478: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 4447a: 206e ffdc moveal %fp@(-36),%a0 4447e: 4a88 tstl %a0 44480: 6700 ff6e beqw 443f0 44484: 2068 001c moveal %a0@(28),%a0 44488: 4a88 tstl %a0 4448a: 6700 ff64 beqw 443f0 4448e: 2f05 movel %d5,%sp@- 44490: 4e90 jsr %a0@ 44492: 588f addql #4,%sp return result; } 44494: 2002 movel %d2,%d0 44496: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 4449c: 4e5e unlk %fp 4449e: 4e75 rts * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 444a0: 206e fff0 moveal %fp@(-16),%a0 444a4: 4a88 tstl %a0 444a6: 670e beqs 444b6 <== NEVER TAKEN 444a8: 2068 001c moveal %a0@(28),%a0 444ac: 4a88 tstl %a0 444ae: 6706 beqs 444b6 <== NEVER TAKEN 444b0: 2f03 movel %d3,%sp@- 444b2: 4e90 jsr %a0@ 444b4: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 444b6: 206e ffdc moveal %fp@(-36),%a0 444ba: 4a88 tstl %a0 444bc: 670e beqs 444cc <== NEVER TAKEN 444be: 2068 001c moveal %a0@(28),%a0 444c2: 4a88 tstl %a0 444c4: 6706 beqs 444cc <== NEVER TAKEN 444c6: 2f05 movel %d5,%sp@- 444c8: 4e90 jsr %a0@ 444ca: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 444cc: 4eb9 0005 077c jsr 5077c <__errno> 444d2: 74ff moveq #-1,%d2 444d4: 2040 moveal %d0,%a0 444d6: 7012 moveq #18,%d0 444d8: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 444da: 2002 movel %d2,%d0 444dc: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 444e2: 4e5e unlk %fp 444e4: 4e75 rts rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 444e6: 206e fff0 moveal %fp@(-16),%a0 444ea: 4a88 tstl %a0 444ec: 670e beqs 444fc <== NEVER TAKEN 444ee: 2068 001c moveal %a0@(28),%a0 444f2: 4a88 tstl %a0 444f4: 6706 beqs 444fc <== NEVER TAKEN 444f6: 2f03 movel %d3,%sp@- 444f8: 4e90 jsr %a0@ 444fa: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 444fc: 4eb9 0005 077c jsr 5077c <__errno> 44502: 74ff moveq #-1,%d2 44504: 2040 moveal %d0,%a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 44506: 2002 movel %d2,%d0 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( result ); 44508: 2084 movel %d4,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 4450a: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 44510: 4e5e unlk %fp 44512: 4e75 rts */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 44514: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 44518: 4a88 tstl %a0 <== NOT EXECUTED 4451a: 670e beqs 4452a <== NOT EXECUTED 4451c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44520: 4a88 tstl %a0 <== NOT EXECUTED 44522: 6706 beqs 4452a <== NOT EXECUTED 44524: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44526: 4e90 jsr %a0@ <== NOT EXECUTED 44528: 588f addql #4,%sp <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4452a: 4eb9 0005 077c jsr 5077c <__errno> <== NOT EXECUTED 44530: 74ff moveq #-1,%d2 <== NOT EXECUTED 44532: 2040 moveal %d0,%a0 <== NOT EXECUTED 44534: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 4453a: 2002 movel %d2,%d0 <== NOT EXECUTED 4453c: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 <== NOT EXECUTED 44542: 4e5e unlk %fp <== NOT EXECUTED 44544: 4e75 rts <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 44546: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4454a: 4a88 tstl %a0 <== NOT EXECUTED 4454c: 6712 beqs 44560 <== NOT EXECUTED 4454e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44552: 4a88 tstl %a0 <== NOT EXECUTED 44554: 670a beqs 44560 <== NOT EXECUTED 44556: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44558: 4e90 jsr %a0@ <== NOT EXECUTED 4455a: 226e ffdc moveal %fp@(-36),%a1 <== NOT EXECUTED 4455e: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 44560: 4a89 tstl %a1 <== NOT EXECUTED 44562: 67c6 beqs 4452a <== NOT EXECUTED 44564: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 44568: 4a88 tstl %a0 <== NOT EXECUTED 4456a: 67be beqs 4452a <== NOT EXECUTED 4456c: 2f05 movel %d5,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4456e: 74ff moveq #-1,%d2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); 44570: 4e90 jsr %a0@ <== NOT EXECUTED 44572: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44574: 4eb9 0005 077c jsr 5077c <__errno> <== NOT EXECUTED 4457a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4457c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 44582: 60b6 bras 4453a <== NOT EXECUTED =============================================================================== 0005c2d0 : off_t lseek( int fd, off_t offset, int whence ) { 5c2d0: 4e56 ffe4 linkw %fp,#-28 5c2d4: 222e 0008 movel %fp@(8),%d1 5c2d8: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 5c2dc: 202e 0014 movel %fp@(20),%d0 5c2e0: 282e 000c movel %fp@(12),%d4 5c2e4: 2a2e 0010 movel %fp@(16),%d5 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 5c2e8: b2b9 0005 e5f4 cmpl 5e5f4 ,%d1 5c2ee: 6400 0118 bccw 5c408 iop = rtems_libio_iop( fd ); 5c2f2: 2479 0005 fca0 moveal 5fca0 ,%a2 5c2f8: ed89 lsll #6,%d1 5c2fa: d5c1 addal %d1,%a2 rtems_libio_check_is_open(iop); 5c2fc: 222a 0014 movel %a2@(20),%d1 5c300: 0281 0000 0100 andil #256,%d1 5c306: 6700 0100 beqw 5c408 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 5c30a: 206a 003c moveal %a2@(60),%a0 5c30e: 4aa8 0014 tstl %a0@(20) 5c312: 6700 0112 beqw 5c426 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 5c316: 7201 moveq #1,%d1 /* * Now process the lseek(). */ old_offset = iop->offset; 5c318: 242a 000c movel %a2@(12),%d2 5c31c: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 5c320: b280 cmpl %d0,%d1 5c322: 6700 00ae beqw 5c3d2 5c326: 7c02 moveq #2,%d6 5c328: bc80 cmpl %d0,%d6 5c32a: 6752 beqs 5c37e 5c32c: 4a80 tstl %d0 5c32e: 6600 0084 bnew 5c3b4 case SEEK_SET: iop->offset = offset; 5c332: 2544 000c movel %d4,%a2@(12) 5c336: 2545 0010 movel %d5,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5c33a: 2f00 movel %d0,%sp@- 5c33c: 2f05 movel %d5,%sp@- 5c33e: 2f04 movel %d4,%sp@- 5c340: 2f0a movel %a2,%sp@- 5c342: 2068 0014 moveal %a0@(20),%a0 5c346: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5c348: 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 ); 5c34c: 2800 movel %d0,%d4 5c34e: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5c350: 70ff moveq #-1,%d0 5c352: 72ff moveq #-1,%d1 5c354: 9285 subl %d5,%d1 5c356: 9184 subxl %d4,%d0 5c358: 670e beqs 5c368 <== NEVER TAKEN /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5c35a: 2205 movel %d5,%d1 5c35c: 2004 movel %d4,%d0 5c35e: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5c364: 4e5e unlk %fp 5c366: 4e75 rts 5c368: 2205 movel %d5,%d1 5c36a: 2004 movel %d4,%d0 * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; 5c36c: 2542 000c movel %d2,%a2@(12) 5c370: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5c374: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5c37a: 4e5e unlk %fp 5c37c: 4e75 rts case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 5c37e: 2c2a 0004 movel %a2@(4),%d6 5c382: 2e2a 0008 movel %a2@(8),%d7 5c386: de85 addl %d5,%d7 5c388: dd84 addxl %d4,%d6 5c38a: 2546 000c movel %d6,%a2@(12) 5c38e: 2547 0010 movel %d7,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5c392: 2f00 movel %d0,%sp@- 5c394: 2f05 movel %d5,%sp@- 5c396: 2f04 movel %d4,%sp@- 5c398: 2f0a movel %a2,%sp@- 5c39a: 2068 0014 moveal %a0@(20),%a0 5c39e: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5c3a0: 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 ); 5c3a4: 2800 movel %d0,%d4 5c3a6: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5c3a8: 70ff moveq #-1,%d0 5c3aa: 72ff moveq #-1,%d1 5c3ac: 9285 subl %d5,%d1 5c3ae: 9184 subxl %d4,%d0 5c3b0: 66a8 bnes 5c35a 5c3b2: 60b4 bras 5c368 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 5c3b4: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 5c3ba: 2040 moveal %d0,%a0 5c3bc: 7016 moveq #22,%d0 5c3be: 78ff moveq #-1,%d4 5c3c0: 7aff moveq #-1,%d5 5c3c2: 2080 movel %d0,%a0@ /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5c3c4: 2205 movel %d5,%d1 5c3c6: 2004 movel %d4,%d0 5c3c8: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5c3ce: 4e5e unlk %fp 5c3d0: 4e75 rts case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 5c3d2: 2c04 movel %d4,%d6 5c3d4: 2e05 movel %d5,%d7 5c3d6: de83 addl %d3,%d7 5c3d8: dd82 addxl %d2,%d6 5c3da: 2546 000c movel %d6,%a2@(12) 5c3de: 2547 0010 movel %d7,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5c3e2: 2f00 movel %d0,%sp@- 5c3e4: 2f05 movel %d5,%sp@- 5c3e6: 2f04 movel %d4,%sp@- 5c3e8: 2f0a movel %a2,%sp@- 5c3ea: 2068 0014 moveal %a0@(20),%a0 5c3ee: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5c3f0: 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 ); 5c3f4: 2800 movel %d0,%d4 5c3f6: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5c3f8: 70ff moveq #-1,%d0 5c3fa: 72ff moveq #-1,%d1 5c3fc: 9285 subl %d5,%d1 5c3fe: 9184 subxl %d4,%d0 5c400: 6600 ff58 bnew 5c35a 5c404: 6000 ff62 braw 5c368 <== NOT EXECUTED off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5c408: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 5c40e: 7209 moveq #9,%d1 <== NOT EXECUTED 5c410: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c412: 78ff moveq #-1,%d4 <== NOT EXECUTED 5c414: 7aff moveq #-1,%d5 <== NOT EXECUTED 5c416: 2081 movel %d1,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5c418: 2205 movel %d5,%d1 <== NOT EXECUTED 5c41a: 2004 movel %d4,%d0 <== NOT EXECUTED 5c41c: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5c422: 4e5e unlk %fp <== NOT EXECUTED 5c424: 4e75 rts <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c426: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 5c42c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c42e: 78ff moveq #-1,%d4 <== NOT EXECUTED 5c430: 7aff moveq #-1,%d5 <== NOT EXECUTED 5c432: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5c438: 2205 movel %d5,%d1 <== NOT EXECUTED 5c43a: 2004 movel %d4,%d0 <== NOT EXECUTED 5c43c: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5c442: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043108 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 43108: 4e56 fff4 linkw %fp,#-12 4310c: 52b9 0005 fcbc addql #1,5fcbc 43112: 48d7 001c moveml %d2-%d4,%sp@ 43116: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4311a: 4eb9 0004 2ff2 jsr 42ff2 /* * Validate the parameters */ if ( !size ) 43120: 4a83 tstl %d3 43122: 6764 beqs 43188 <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 43124: 7003 moveq #3,%d0 43126: b0b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d0 4312c: 6750 beqs 4317e RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4312e: 42a7 clrl %sp@- 43130: 42a7 clrl %sp@- 43132: 2f03 movel %d3,%sp@- 43134: 2f39 0005 e600 movel 5e600 ,%sp@- 4313a: 4eb9 0004 827c jsr 4827c <_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 ) { 43140: 4fef 0010 lea %sp@(16),%sp 43144: 2400 movel %d0,%d2 43146: 675c beqs 431a4 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 43148: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4314a: 2079 0005 ec6e moveal 5ec6e ,%a0 43150: 4a88 tstl %a0 43152: 6708 beqs 4315c <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 43154: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43156: 2f04 movel %d4,%sp@- <== NOT EXECUTED 43158: 4e90 jsr %a0@ <== NOT EXECUTED 4315a: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4315c: 2079 0005 ec66 moveal 5ec66 ,%a0 43162: 4a88 tstl %a0 43164: 6730 beqs 43196 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 43166: 2f04 movel %d4,%sp@- <== NOT EXECUTED 43168: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4316c: 2404 movel %d4,%d2 <== NOT EXECUTED 4316e: 4e90 jsr %a0@ <== NOT EXECUTED 43170: 588f addql #4,%sp <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 43172: 2002 movel %d2,%d0 <== NOT EXECUTED 43174: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4317a: 4e5e unlk %fp <== NOT EXECUTED 4317c: 4e75 rts <== NOT EXECUTED return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4317e: 4eb9 0004 2f98 jsr 42f98 43184: 4a00 tstb %d0 43186: 66a6 bnes 4312e <== ALWAYS TAKEN /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 43188: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4318a: 2002 movel %d2,%d0 <== NOT EXECUTED 4318c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 43192: 4e5e unlk %fp <== NOT EXECUTED 43194: 4e75 rts <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 43196: 2404 movel %d4,%d2 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 43198: 2002 movel %d2,%d0 4319a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 431a0: 4e5e unlk %fp 431a2: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 431a4: 2079 0005 ec6a moveal 5ec6a ,%a0 431aa: 4a88 tstl %a0 431ac: 670e beqs 431bc <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 431ae: 2f03 movel %d3,%sp@- <== NOT EXECUTED 431b0: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 431b4: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 431b6: 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 ); 431b8: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 431ba: 668e bnes 4314a <== NOT EXECUTED errno = ENOMEM; 431bc: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 431c2: 2040 moveal %d0,%a0 431c4: 700c moveq #12,%d0 431c6: 2080 movel %d0,%a0@ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 431c8: 2002 movel %d2,%d0 431ca: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 431d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042fd8 : } void malloc_deferred_free( void *pointer ) { 42fd8: 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 ); 42fdc: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42fe0: 4879 0005 fcac pea 5fcac <== NOT EXECUTED 42fe6: 4eb9 0004 7114 jsr 47114 <_Chain_Append> <== NOT EXECUTED 42fec: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 42fee: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ff2 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 42ff2: 4e56 0000 linkw %fp,#0 42ff6: 2f0b movel %a3,%sp@- /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 42ff8: 47f9 0004 2ddc lea 42ddc ,%a3 { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 42ffe: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 43000: 4879 0005 fcac pea 5fcac 43006: 45f9 0004 7174 lea 47174 <_Chain_Get>,%a2 4300c: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 4300e: 588f addql #4,%sp 43010: 4a80 tstl %d0 43012: 6714 beqs 43028 <== ALWAYS TAKEN free(to_be_freed); 43014: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43016: 4e93 jsr %a3@ <== NOT EXECUTED 43018: 588f addql #4,%sp <== NOT EXECUTED 4301a: 4879 0005 fcac pea 5fcac <== NOT EXECUTED 43020: 4e92 jsr %a2@ <== NOT EXECUTED 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) 43022: 588f addql #4,%sp <== NOT EXECUTED 43024: 4a80 tstl %d0 <== NOT EXECUTED 43026: 66ec bnes 43014 <== NOT EXECUTED free(to_be_freed); } 43028: 246e fff8 moveal %fp@(-8),%a2 4302c: 266e fffc moveal %fp@(-4),%a3 43030: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f98 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 42f98: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 42f9c: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 42fa2: 660e bnes 42fb2 <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 42fa4: 2039 0005 fe96 movel 5fe96 <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 42faa: 57c0 seq %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 42fac: 4e5e unlk %fp #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 42fae: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 42fb0: 4e75 rts 42fb2: 4e5e unlk %fp <== NOT EXECUTED rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 42fb4: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Nest_level > 0 ) return false; return true; } =============================================================================== 0004d3b4 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4d3b4: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4d3b8: 2f39 0005 f498 movel 5f498 ,%sp@- 4d3be: 4878 0001 pea 1 4d3c2: 4eb9 0004 2918 jsr 42918 if ( memory ) 4d3c8: 508f addql #8,%sp 4d3ca: 4a80 tstl %d0 4d3cc: 6706 beqs 4d3d4 <== NEVER TAKEN memfile_blocks_allocated++; 4d3ce: 52b9 0005 f5ac addql #1,5f5ac return memory; } 4d3d4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d7aa : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4d7aa: 4e56 0000 linkw %fp,#0 4d7ae: 2f0a movel %a2,%sp@- 4d7b0: 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) ) { 4d7b4: 2f0a movel %a2,%sp@- 4d7b6: 4eb9 0004 bc52 jsr 4bc52 4d7bc: 588f addql #4,%sp 4d7be: 4a80 tstl %d0 4d7c0: 662e bnes 4d7f0 4d7c2: 4a6a 0032 tstw %a2@(50) 4d7c6: 6628 bnes 4d7f0 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4d7c8: 2079 0005 e710 moveal 5e710 ,%a0 4d7ce: b5e8 0004 cmpal %a0@(4),%a2 4d7d2: 6726 beqs 4d7fa <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4d7d4: 7006 moveq #6,%d0 4d7d6: b0aa 0048 cmpl %a2@(72),%d0 4d7da: 670a beqs 4d7e6 <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 4d7dc: 2f0a movel %a2,%sp@- 4d7de: 4eb9 0004 d656 jsr 4d656 4d7e4: 588f addql #4,%sp free( the_jnode ); 4d7e6: 2f0a movel %a2,%sp@- 4d7e8: 4eb9 0004 2ddc jsr 42ddc 4d7ee: 588f addql #4,%sp } return 0; } 4d7f0: 246e fffc moveal %fp@(-4),%a2 4d7f4: 4280 clrl %d0 4d7f6: 4e5e unlk %fp 4d7f8: 4e75 rts /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 4d7fa: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4d7fe: 7006 moveq #6,%d0 <== NOT EXECUTED 4d800: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4d804: 66d6 bnes 4d7dc <== NOT EXECUTED 4d806: 60de bras 4d7e6 <== NOT EXECUTED =============================================================================== 0004d5a4 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4d5a4: 4e56 ffec linkw %fp,#-20 4d5a8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d5ac: 286e 0008 moveal %fp@(8),%a4 4d5b0: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 4d5b4: 4a8c tstl %a4 4d5b6: 6736 beqs 4d5ee <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 4d5b8: 2454 moveal %a4@,%a2 4d5ba: 47f9 0004 d39a lea 4d39a ,%a3 for ( i=0 ; i<== NEVER TAKEN 4d5c4: 4282 clrl %d2 if ( b[i] ) { 4d5c6: 2012 movel %a2@,%d0 4d5c8: 6708 beqs 4d5d2 memfile_free_block( b[i] ); 4d5ca: 2f00 movel %d0,%sp@- 4d5cc: 4e93 jsr %a3@ b[i] = 0; 4d5ce: 588f addql #4,%sp 4d5d0: 4292 clrl %a2@ * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4d5da: 2454 moveal %a4@,%a2 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4d5dc: 2f0a movel %a2,%sp@- 4d5de: 4e93 jsr %a3@ *block_table = 0; 4d5e0: 588f addql #4,%sp 4d5e2: 4294 clrl %a4@ } 4d5e4: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4d5ea: 4e5e unlk %fp 4d5ec: 4e75 rts /* * Perform internal consistency checks */ assert( block_table ); 4d5ee: 4879 0005 dad0 pea 5dad0 <== NOT EXECUTED 4d5f4: 4879 0005 db8e pea 5db8e <__FUNCTION__.6076> <== NOT EXECUTED 4d5fa: 4878 01b3 pea 1b3 <== NOT EXECUTED 4d5fe: 4879 0005 da62 pea 5da62 <== NOT EXECUTED 4d604: 4eb9 0004 b97c jsr 4b97c <__assert_func> <== NOT EXECUTED =============================================================================== 0004da6a : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4da6a: 4e56 ffec linkw %fp,#-20 4da6e: 206e 0008 moveal %fp@(8),%a0 4da72: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4da76: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4da7a: 202e 000c movel %fp@(12),%d0 4da7e: 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 ) 4da82: 242a 004c movel %a2@(76),%d2 4da86: 262a 0050 movel %a2@(80),%d3 4da8a: 9681 subl %d1,%d3 4da8c: 9580 subxl %d0,%d2 4da8e: 6d30 blts 4dac0 <== NEVER TAKEN * 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; 4da90: 2540 004c movel %d0,%a2@(76) 4da94: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 4da98: 2140 0004 movel %d0,%a0@(4) 4da9c: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 4daa0: 42a7 clrl %sp@- 4daa2: 486e fff8 pea %fp@(-8) 4daa6: 4eb9 0004 2e6c jsr 42e6c 4daac: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 4dab2: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 4dab4: 4280 clrl %d0 return 0; } 4dab6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4dabc: 4e5e unlk %fp 4dabe: 4e75 rts * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 4dac0: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4dac2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4dac4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4dac6: 4eb9 0004 d918 jsr 4d918 <== NOT EXECUTED 4dacc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 4dad0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 4dad6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dada : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 4dada: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4dadc: 4e56 ffe8 linkw %fp,#-24 4dae0: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4dae4: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4dae8: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4daec: b0ab 0048 cmpl %a3@(72),%d0 4daf0: 673e beqs 4db30 <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4daf2: 2f2a 0010 movel %a2@(16),%sp@- 4daf6: 2f2a 000c movel %a2@(12),%sp@- 4dafa: 2f0b movel %a3,%sp@- 4dafc: 4eb9 0004 d918 jsr 4d918 4db02: 4fef 000c lea %sp@(12),%sp 4db06: 4a80 tstl %d0 4db08: 6668 bnes 4db72 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 4db0a: 202b 004c movel %a3@(76),%d0 4db0e: 222b 0050 movel %a3@(80),%d1 4db12: 242a 000c movel %a2@(12),%d2 4db16: 262a 0010 movel %a2@(16),%d3 4db1a: 2540 0004 movel %d0,%a2@(4) 4db1e: 2541 0008 movel %d1,%a2@(8) } return iop->offset; } 4db22: 2203 movel %d3,%d1 4db24: 2002 movel %d2,%d0 4db26: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4db2c: 4e5e unlk %fp 4db2e: 4e75 rts IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 4db30: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 4db34: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED 4db38: 242b 004c movel %a3@(76),%d2 <== NOT EXECUTED 4db3c: 262b 0050 movel %a3@(80),%d3 <== NOT EXECUTED 4db40: 2800 movel %d0,%d4 <== NOT EXECUTED 4db42: 2a01 movel %d1,%d5 <== NOT EXECUTED 4db44: 9a83 subl %d3,%d5 <== NOT EXECUTED 4db46: 9982 subxl %d2,%d4 <== NOT EXECUTED 4db48: 6e12 bgts 4db5c <== NOT EXECUTED 4db4a: 2400 movel %d0,%d2 <== NOT EXECUTED 4db4c: 2601 movel %d1,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 4db4e: 2203 movel %d3,%d1 <== NOT EXECUTED 4db50: 2002 movel %d2,%d0 <== NOT EXECUTED 4db52: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4db58: 4e5e unlk %fp <== NOT EXECUTED 4db5a: 4e75 rts <== NOT EXECUTED 4db5c: 2203 movel %d3,%d1 <== NOT EXECUTED 4db5e: 2002 movel %d2,%d0 <== NOT EXECUTED the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; 4db60: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 4db64: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 4db68: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4db6e: 4e5e unlk %fp <== NOT EXECUTED 4db70: 4e75 rts <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 4db72: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4db78: 761c moveq #28,%d3 <== NOT EXECUTED 4db7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4db7c: 2083 movel %d3,%a0@ <== NOT EXECUTED 4db7e: 74ff moveq #-1,%d2 <== NOT EXECUTED 4db80: 76ff moveq #-1,%d3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; } return iop->offset; } 4db82: 2203 movel %d3,%d1 <== NOT EXECUTED 4db84: 2002 movel %d2,%d0 <== NOT EXECUTED 4db86: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4db8c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004de5a : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4de5a: 4e56 fff0 linkw %fp,#-16 4de5e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4de62: 246e 0008 moveal %fp@(8),%a2 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4de66: 202a 0014 movel %a2@(20),%d0 4de6a: 2200 movel %d0,%d1 4de6c: 0281 0000 0204 andil #516,%d1 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4de72: 266a 0038 moveal %a2@(56),%a3 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4de76: 6708 beqs 4de80 && (the_jnode->type == IMFS_LINEAR_FILE)) { 4de78: 7206 moveq #6,%d1 4de7a: b2ab 0048 cmpl %a3@(72),%d1 4de7e: 6732 beqs 4deb2 <== NEVER TAKEN 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) 4de80: 222b 004c movel %a3@(76),%d1 4de84: 242b 0050 movel %a3@(80),%d2 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4de88: 0800 0009 btst #9,%d0 4de8c: 6710 beqs 4de9e iop->offset = the_jnode->info.file.size; 4de8e: 2541 000c movel %d1,%a2@(12) 4de92: 2542 0010 movel %d2,%a2@(16) 4de96: 222b 004c movel %a3@(76),%d1 4de9a: 242b 0050 movel %a3@(80),%d2 iop->size = the_jnode->info.file.size; 4de9e: 4280 clrl %d0 4dea0: 2541 0004 movel %d1,%a2@(4) 4dea4: 2542 0008 movel %d2,%a2@(8) return 0; } 4dea8: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4deae: 4e5e unlk %fp 4deb0: 4e75 rts /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 4deb2: 202b 0050 movel %a3@(80),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4deb6: 4282 clrl %d2 <== NOT EXECUTED 4deb8: 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; 4deba: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4debe: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 4dec2: 2743 0050 movel %d3,%a3@(80) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4dec6: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 4dec8: 42ab 0054 clrl %a3@(84) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4decc: 2743 0048 movel %d3,%a3@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4ded0: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4ded4: 42ab 005c clrl %a3@(92) <== NOT EXECUTED if ((count != 0) 4ded8: 4a80 tstl %d0 <== NOT EXECUTED 4deda: 6610 bnes 4deec <== NOT EXECUTED 4dedc: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4dee0: 4281 clrl %d1 <== NOT EXECUTED 4dee2: 4282 clrl %d2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4dee4: 0800 0009 btst #9,%d0 <== NOT EXECUTED 4dee8: 67b4 beqs 4de9e <== NOT EXECUTED 4deea: 60a2 bras 4de8e <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4deec: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4deee: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4def0: 42a7 clrl %sp@- <== NOT EXECUTED 4def2: 42a7 clrl %sp@- <== NOT EXECUTED 4def4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4def6: 4eb9 0004 db90 jsr 4db90 <== 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) 4defc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4df00: 72ff moveq #-1,%d1 <== NOT EXECUTED 4df02: b280 cmpl %d0,%d1 <== NOT EXECUTED 4df04: 6710 beqs 4df16 <== NOT EXECUTED 4df06: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4df0a: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED 4df0e: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED 4df12: 6000 ff74 braw 4de88 <== NOT EXECUTED 4df16: 70ff moveq #-1,%d0 <== NOT EXECUTED if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; return 0; } 4df18: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4df1e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d808 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4d808: 4e56 fff8 linkw %fp,#-8 4d80c: 206e 000c moveal %fp@(12),%a0 4d810: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4d812: 2450 moveal %a0@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4d814: 4aaa 0008 tstl %a2@(8) 4d818: 670e beqs 4d828 <== NEVER TAKEN 4d81a: 2f0a movel %a2,%sp@- 4d81c: 4eb9 0004 714c jsr 4714c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4d822: 588f addql #4,%sp 4d824: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4d828: 302a 0032 movew %a2@(50),%d0 4d82c: 5380 subql #1,%d0 4d82e: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4d832: 42a7 clrl %sp@- 4d834: 486e fff8 pea %fp@(-8) 4d838: 4eb9 0004 2e6c jsr 42e6c 4d83e: 256e fff8 0044 movel %fp@(-8),%a2@(68) return memfile_check_rmnod( the_jnode ); 4d844: 2f0a movel %a2,%sp@- 4d846: 4eb9 0004 d7aa jsr 4d7aa } 4d84c: 246e fff4 moveal %fp@(-12),%a2 4d850: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000431f4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 431f4: 4e56 ffd8 linkw %fp,#-40 431f8: 48d7 001c moveml %d2-%d4,%sp@ 431fc: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 43200: 2003 movel %d3,%d0 43202: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 43208: 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) ) ) 4320c: 4a80 tstl %d0 4320e: 6700 00bc beqw 432cc rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 43212: 240e movel %fp,%d2 43214: 0682 ffff ffe4 addil #-28,%d2 4321a: 2f02 movel %d2,%sp@- 4321c: 486e fffc pea %fp@(-4) 43220: 2f04 movel %d4,%sp@- 43222: 4eb9 0004 3d00 jsr 43d00 if ( !temp_loc.ops->evalformake_h ) { 43228: 206e fff0 moveal %fp@(-16),%a0 4322c: 4fef 000c lea %sp@(12),%sp 43230: 2068 0004 moveal %a0@(4),%a0 43234: 4a88 tstl %a0 43236: 6778 beqs 432b0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 43238: 486e fff8 pea %fp@(-8) 4323c: 2f02 movel %d2,%sp@- 4323e: d8ae fffc addl %fp@(-4),%d4 43242: 2f04 movel %d4,%sp@- 43244: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 43246: 4fef 000c lea %sp@(12),%sp 4324a: 4a80 tstl %d0 4324c: 6646 bnes 43294 return -1; if ( !temp_loc.ops->mknod_h ) { 4324e: 226e fff0 moveal %fp@(-16),%a1 43252: 2069 0014 moveal %a1@(20),%a0 43256: 4a88 tstl %a0 43258: 6748 beqs 432a2 <== NEVER TAKEN 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 ); 4325a: 2f02 movel %d2,%sp@- 4325c: 2f2e 0014 movel %fp@(20),%sp@- 43260: 2f2e 0010 movel %fp@(16),%sp@- 43264: 2f03 movel %d3,%sp@- 43266: 2f2e fff8 movel %fp@(-8),%sp@- 4326a: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 4326c: 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 ); 43270: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 43272: 4fef 0014 lea %sp@(20),%sp 43276: 4a88 tstl %a0 43278: 670e beqs 43288 <== NEVER TAKEN 4327a: 2068 001c moveal %a0@(28),%a0 4327e: 4a88 tstl %a0 43280: 6706 beqs 43288 43282: 2f02 movel %d2,%sp@- 43284: 4e90 jsr %a0@ 43286: 588f addql #4,%sp return result; } 43288: 2003 movel %d3,%d0 4328a: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 43290: 4e5e unlk %fp 43292: 4e75 rts result = (*temp_loc.ops->evalformake_h)( &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 43294: 76ff moveq #-1,%d3 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 43296: 2003 movel %d3,%d0 43298: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 4329e: 4e5e unlk %fp 432a0: 4e75 rts ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 432a2: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 432a6: 4a88 tstl %a0 <== NOT EXECUTED 432a8: 6706 beqs 432b0 <== NOT EXECUTED 432aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 432ac: 4e90 jsr %a0@ <== NOT EXECUTED 432ae: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 432b0: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 432b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 432b8: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 432ba: 2003 movel %d3,%d0 <== NOT EXECUTED 432bc: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 <== NOT EXECUTED if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 432c2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 432c8: 4e5e unlk %fp <== NOT EXECUTED 432ca: 4e75 rts <== NOT EXECUTED int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 432cc: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 432d2: 76ff moveq #-1,%d3 <== NOT EXECUTED 432d4: 2040 moveal %d0,%a0 <== NOT EXECUTED 432d6: 7016 moveq #22,%d0 <== NOT EXECUTED 432d8: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 432da: 2003 movel %d3,%d0 <== NOT EXECUTED 432dc: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 <== NOT EXECUTED 432e2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004337c : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4337c: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 4337e: 4e56 ffbc linkw %fp,#-68 43382: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 43386: 262e 0008 movel %fp@(8),%d3 4338a: 282e 000c movel %fp@(12),%d4 4338e: 2a2e 0010 movel %fp@(16),%d5 43392: 2c2e 0014 movel %fp@(20),%d6 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 43396: b086 cmpl %d6,%d0 43398: 6500 028e bcsw 43628 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 4339c: 2f05 movel %d5,%sp@- 4339e: 4eb9 0004 c07a jsr 4c07a if ( !mount_h ) 433a4: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 433a6: 2640 moveal %d0,%a3 if ( !mount_h ) 433a8: 4a80 tstl %d0 433aa: 6700 027c beqw 43628 { 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; 433ae: 4a84 tstl %d4 433b0: 56c0 sne %d0 433b2: 4480 negl %d0 433b4: 1e00 moveb %d0,%d7 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 433b6: 6700 0254 beqw 4360c * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 433ba: 2f04 movel %d4,%sp@- 433bc: 45f9 0005 05e4 lea 505e4 ,%a2 433c2: 2d44 ffe4 movel %d4,%fp@(-28) 433c6: 4e92 jsr %a2@ 433c8: 588f addql #4,%sp 433ca: 2d40 ffe8 movel %d0,%fp@(-24) const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 433ce: 2f05 movel %d5,%sp@- 433d0: 4e92 jsr %a2@ 433d2: 588f addql #4,%sp 433d4: 2400 movel %d0,%d2 433d6: 5282 addql #1,%d2 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 433d8: 4a83 tstl %d3 433da: 6700 022a beqw 43606 433de: 2f03 movel %d3,%sp@- 433e0: 4eb9 0005 05e4 jsr 505e4 433e6: 588f addql #4,%sp 433e8: 2a40 moveal %d0,%a5 433ea: 528d addql #1,%a5 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 ); 433ec: 226e ffe8 moveal %fp@(-24),%a1 433f0: 41f1 2875 lea %a1@(00000075,%d2:l),%a0 433f4: 4870 d800 pea %a0@(00000000,%a5:l) 433f8: 4878 0001 pea 1 433fc: 4eb9 0004 2918 jsr 42918 if ( mt_entry != NULL ) { 43402: 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 ); 43404: 2440 moveal %d0,%a2 if ( mt_entry != NULL ) { 43406: 4a80 tstl %d0 43408: 6700 01e4 beqw 435ee char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); 4340c: 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 ); 4340e: 2a00 movel %d0,%d5 43410: 0685 0000 0074 addil #116,%d5 strcpy( str, filesystemtype ); 43416: 49f9 0005 0138 lea 50138 ,%a4 mt_entry->type = str; str += filesystemtype_size; 4341c: d485 addl %d5,%d2 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 ); 4341e: 2f05 movel %d5,%sp@- 43420: 4e94 jsr %a4@ mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 43422: 508f addql #8,%sp if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; 43424: 2545 006c movel %d5,%a2@(108) str += filesystemtype_size; if ( source_or_null != NULL ) { 43428: 4a83 tstl %d3 4342a: 670e beqs 4343a strcpy( str, source_or_null ); 4342c: 2f03 movel %d3,%sp@- 4342e: 2f02 movel %d2,%sp@- 43430: 4e94 jsr %a4@ mt_entry->dev = str; str += source_size; 43432: 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; 43434: 2542 0070 movel %d2,%a2@(112) str += source_size; 43438: d48d addl %a5,%d2 } strcpy( str, target ); 4343a: 2f2e ffe4 movel %fp@(-28),%sp@- 4343e: 2f02 movel %d2,%sp@- 43440: 4e94 jsr %a4@ /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 43442: 508f addql #8,%sp if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 43444: 7005 moveq #5,%d0 43446: 223c 0000 0080 movel #128,%d1 4344c: 307c 0400 moveaw #1024,%a0 43450: 2540 0038 movel %d0,%a2@(56) 43454: 103c 0007 moveb #7,%d0 43458: 2541 003c movel %d1,%a2@(60) 4345c: 0681 0000 007f addil #127,%d1 43462: 2540 0040 movel %d0,%a2@(64) 43466: 103c 0001 moveb #1,%d0 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; 4346a: 2542 0068 movel %d2,%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; 4346e: 2546 0030 movel %d6,%a2@(48) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 43472: 254a 002c movel %a2,%a2@(44) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 43476: 2541 0044 movel %d1,%a2@(68) 4347a: 2541 0048 movel %d1,%a2@(72) 4347e: 2548 004c movel %a0,%a2@(76) 43482: 42aa 0050 clrl %a2@(80) 43486: 42aa 0054 clrl %a2@(84) 4348a: 2540 0058 movel %d0,%a2@(88) 4348e: 42aa 005c clrl %a2@(92) 43492: 42aa 0060 clrl %a2@(96) 43496: 42aa 0064 clrl %a2@(100) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 4349a: 4a07 tstb %d7 4349c: 6600 0092 bnew 43530 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 434a0: 43f9 0005 e6f4 lea 5e6f4 ,%a1 434a6: b3f9 0005 e6f0 cmpal 5e6f0 ,%a1 434ac: 6600 01c0 bnew 4366e 434b0: 4282 clrl %d2 * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 434b2: 2f2e 0018 movel %fp@(24),%sp@- 434b6: 2f0a movel %a2,%sp@- 434b8: 4e93 jsr %a3@ 434ba: 508f addql #8,%sp 434bc: 4a80 tstl %d0 434be: 6600 0180 bnew 43640 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 ); 434c2: 42a7 clrl %sp@- 434c4: 42a7 clrl %sp@- 434c6: 2f39 0005 fca8 movel 5fca8 ,%sp@- 434cc: 4eb9 0004 6704 jsr 46704 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 434d2: 2f0a movel %a2,%sp@- 434d4: 4879 0005 e6f0 pea 5e6f0 434da: 4eb9 0004 7114 jsr 47114 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 434e0: 2f39 0005 fca8 movel 5fca8 ,%sp@- 434e6: 4eb9 0004 6840 jsr 46840 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 434ec: 4fef 0018 lea %sp@(24),%sp 434f0: 4a07 tstb %d7 434f2: 6630 bnes 43524 rtems_filesystem_root = mt_entry->mt_fs_root; 434f4: 2079 0005 e710 moveal 5e710 ,%a0 434fa: 4280 clrl %d0 434fc: 216a 001c 0018 movel %a2@(28),%a0@(24) 43502: 216a 0020 001c movel %a2@(32),%a0@(28) 43508: 216a 0024 0020 movel %a2@(36),%a0@(32) 4350e: 216a 0028 0024 movel %a2@(40),%a0@(36) 43514: 216a 002c 0028 movel %a2@(44),%a0@(40) if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 4351a: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 43520: 4e5e unlk %fp 43522: 4e75 rts */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 43524: 4280 clrl %d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43526: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 4352c: 4e5e unlk %fp 4352e: 4e75 rts * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 43530: 4878 0001 pea 1 43534: 240e movel %fp,%d2 43536: 0682 ffff ffec addil #-20,%d2 4353c: 2f02 movel %d2,%sp@- 4353e: 4878 0007 pea 7 43542: 2f2e ffe8 movel %fp@(-24),%sp@- 43546: 2f04 movel %d4,%sp@- 43548: 4eb9 0004 2d4c jsr 42d4c 4354e: 4fef 0014 lea %sp@(20),%sp 43552: 72ff moveq #-1,%d1 43554: b280 cmpl %d0,%d1 43556: 6700 0122 beqw 4367a /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 4355a: 206e fff8 moveal %fp@(-8),%a0 4355e: 2068 0010 moveal %a0@(16),%a0 43562: 4a88 tstl %a0 43564: 6700 015e beqw 436c4 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 43568: 2f02 movel %d2,%sp@- 4356a: 4e90 jsr %a0@ 4356c: 588f addql #4,%sp 4356e: 7201 moveq #1,%d1 43570: b280 cmpl %d0,%d1 43572: 6600 011c bnew 43690 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 43576: 2f2e ffec movel %fp@(-20),%sp@- 4357a: 487a fd6c pea %pc@(432e8 ) 4357e: 4eb9 0004 3300 jsr 43300 43584: 508f addql #8,%sp 43586: 4a00 tstb %d0 43588: 6600 0120 bnew 436aa * 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; 4358c: 206e fff8 moveal %fp@(-8),%a0 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 43590: 256e ffec 0008 movel %fp@(-20),%a2@(8) mt_entry->mt_point_node.handlers = loc.handlers; 43596: 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; 4359c: 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 ){ 435a2: 2268 0020 moveal %a0@(32),%a1 * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 435a6: 2548 0014 movel %a0,%a2@(20) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 435aa: 4a89 tstl %a1 435ac: 6700 0116 beqw 436c4 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( mt_entry ) ) { 435b0: 2f0a movel %a2,%sp@- 435b2: 4e91 jsr %a1@ 435b4: 588f addql #4,%sp 435b6: 4a80 tstl %d0 435b8: 6700 fef8 beqw 434b2 return 0; cleanup_and_bail: free( mt_entry ); 435bc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435be: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED 435c4: 588f addql #4,%sp <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 435c6: 2242 moveal %d2,%a1 435c8: 2069 000c moveal %a1@(12),%a0 435cc: 4a88 tstl %a0 435ce: 6700 0092 beqw 43662 435d2: 2028 001c movel %a0@(28),%d0 435d6: 6700 008a beqw 43662 435da: 2f02 movel %d2,%sp@- 435dc: 2040 moveal %d0,%a0 435de: 4e90 jsr %a0@ 435e0: 588f addql #4,%sp 435e2: 70ff moveq #-1,%d0 return -1; } 435e4: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 435ea: 4e5e unlk %fp 435ec: 4e75 rts target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 435ee: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 435f4: 780c moveq #12,%d4 <== NOT EXECUTED 435f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 435f8: 70ff moveq #-1,%d0 <== NOT EXECUTED 435fa: 2084 movel %d4,%a0@ <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 435fc: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43602: 4e5e unlk %fp <== NOT EXECUTED 43604: 4e75 rts <== NOT EXECUTED ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 43606: 9bcd subal %a5,%a5 43608: 6000 fde2 braw 433ec const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 4360c: 307c 0001 moveaw #1,%a0 43610: 43f9 0005 d070 lea 5d070 ,%a1 43616: 45f9 0005 05e4 lea 505e4 ,%a2 4361c: 2d48 ffe8 movel %a0,%fp@(-24) 43620: 2d49 ffe4 movel %a1,%fp@(-28) 43624: 6000 fda8 braw 433ce /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 43628: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4362e: 7a16 moveq #22,%d5 43630: 2040 moveal %d0,%a0 43632: 70ff moveq #-1,%d0 43634: 2085 movel %d5,%a0@ if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43636: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 4363c: 4e5e unlk %fp 4363e: 4e75 rts if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 43640: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 43644: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 43648: 4a88 tstl %a0 <== NOT EXECUTED 4364a: 6706 beqs 43652 <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 4364c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4364e: 4e90 jsr %a0@ <== NOT EXECUTED 43650: 588f addql #4,%sp <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 43652: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43654: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED if ( loc_to_free ) 4365a: 588f addql #4,%sp <== NOT EXECUTED 4365c: 4a82 tstl %d2 <== NOT EXECUTED 4365e: 6600 ff66 bnew 435c6 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 43662: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; } 43664: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4366a: 4e5e unlk %fp <== NOT EXECUTED 4366c: 4e75 rts <== NOT EXECUTED } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 4366e: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 43674: 2040 moveal %d0,%a0 <== NOT EXECUTED 43676: 7016 moveq #22,%d0 <== NOT EXECUTED 43678: 2080 movel %d0,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 4367a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4367c: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED 43682: 588f addql #4,%sp <== NOT EXECUTED 43684: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43686: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4368c: 4e5e unlk %fp <== NOT EXECUTED 4368e: 4e75 rts <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 43690: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 43696: 7614 moveq #20,%d3 43698: 2040 moveal %d0,%a0 4369a: 2083 movel %d3,%a0@ return 0; cleanup_and_bail: free( mt_entry ); 4369c: 2f0a movel %a2,%sp@- 4369e: 4eb9 0004 2ddc jsr 42ddc 436a4: 588f addql #4,%sp 436a6: 6000 ff1e braw 435c6 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 436aa: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 436b0: 7210 moveq #16,%d1 436b2: 2240 moveal %d0,%a1 436b4: 2281 movel %d1,%a1@ return 0; cleanup_and_bail: free( mt_entry ); 436b6: 2f0a movel %a2,%sp@- 436b8: 4eb9 0004 2ddc jsr 42ddc 436be: 588f addql #4,%sp 436c0: 6000 ff04 braw 435c6 * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 436c4: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 436ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 436cc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 436d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 436d4: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED 436da: 588f addql #4,%sp <== NOT EXECUTED 436dc: 6000 fee8 braw 435c6 <== NOT EXECUTED =============================================================================== 0004376c : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 4376c: 4e56 fff4 linkw %fp,#-12 43770: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43774: 262e 0008 movel %fp@(8),%d3 43778: 246e 000c moveal %fp@(12),%a2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 4377c: b5c3 cmpal %d3,%a2 4377e: 674c beqs 437cc ptr = _REENT; } else { ptr = deleted_task->libc_reent; 43780: 242a 0104 movel %a2@(260),%d2 } if (ptr && ptr != _global_impure_ptr) { 43784: 4a82 tstl %d2 43786: 6722 beqs 437aa <== NEVER TAKEN 43788: b4b9 0005 ddec cmpl 5ddec <_global_impure_ptr>,%d2 4378e: 671a beqs 437aa _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 43790: 4879 0004 37d4 pea 437d4 43796: 2f02 movel %d2,%sp@- 43798: 4eb9 0004 f95e jsr 4f95e <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 4379e: 2f02 movel %d2,%sp@- 437a0: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 437a6: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 437aa: 42aa 0104 clrl %a2@(260) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 437ae: b5c3 cmpal %d3,%a2 437b0: 670a beqs 437bc _REENT = 0; } } 437b2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 437b8: 4e5e unlk %fp 437ba: 4e75 rts /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 437bc: 42b9 0005 e7a4 clrl 5e7a4 <_impure_ptr> } } 437c2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 437c8: 4e5e unlk %fp 437ca: 4e75 rts /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 437cc: 2439 0005 e7a4 movel 5e7a4 <_impure_ptr>,%d2 437d2: 60b0 bras 43784 =============================================================================== 000437d4 : */ int newlib_free_buffers( FILE *fp ) { 437d4: 4e56 0000 linkw %fp,#0 437d8: 2f0a movel %a2,%sp@- 437da: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 437de: 2f0a movel %a2,%sp@- 437e0: 4eb9 0004 f54c jsr 4f54c 437e6: 588f addql #4,%sp 437e8: 7202 moveq #2,%d1 437ea: b280 cmpl %d0,%d1 437ec: 6414 bccs 43802 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 437ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 437f0: 4eb9 0004 f2f6 jsr 4f2f6 <== NOT EXECUTED 437f6: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 437f8: 246e fffc moveal %fp@(-4),%a2 437fc: 4280 clrl %d0 437fe: 4e5e unlk %fp 43800: 4e75 rts { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 43802: 302a 000c movew %a2@(12),%d0 43806: 48c0 extl %d0 43808: 4a00 tstb %d0 4380a: 6cec bges 437f8 <== ALWAYS TAKEN free( fp->_bf._base ); 4380c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43810: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; 43816: 588f addql #4,%sp <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 43818: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 4381c: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 43820: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 43824: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 43826: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED break; default: fclose(fp); } return 0; } 4382a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4382e: 4280 clrl %d0 <== NOT EXECUTED 43830: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004333c : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 4333c: 4e56 0000 linkw %fp,#0 43340: 2f02 movel %d2,%sp@- 43342: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 43346: 4a39 0006 0f40 tstb 60f40 4334c: 670a beqs 43358 NULL_major = major; } return RTEMS_SUCCESSFUL; } 4334e: 242e fffc movel %fp@(-4),%d2 43352: 4280 clrl %d0 43354: 4e5e unlk %fp 43356: 4e75 rts rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 43358: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 4335a: 7001 moveq #1,%d0 4335c: 13c0 0006 0f40 moveb %d0,60f40 status = rtems_io_register_name( 43362: 2f02 movel %d2,%sp@- 43364: 4879 0005 ea70 pea 5ea70 4336a: 4eb9 0004 3abe jsr 43abe "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 43370: 4fef 000c lea %sp@(12),%sp 43374: 4a80 tstl %d0 43376: 6610 bnes 43388 <== NEVER TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 43378: 23c2 0006 1768 movel %d2,61768 } return RTEMS_SUCCESSFUL; } 4337e: 242e fffc movel %fp@(-4),%d2 43382: 4280 clrl %d0 43384: 4e5e unlk %fp 43386: 4e75 rts major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 43388: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4338a: 4eb9 0004 80b4 jsr 480b4 <== NOT EXECUTED =============================================================================== 0004331a : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 4331a: 4e56 0000 linkw %fp,#0 4331e: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 43322: 4a88 tstl %a0 43324: 6706 beqs 4332c <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 43326: 2168 0010 0018 movel %a0@(16),%a0@(24) return NULL_SUCCESSFUL; } 4332c: 4280 clrl %d0 4332e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043a60 : int open( const char *pathname, int flags, ... ) { 43a60: 4e56 ffcc linkw %fp,#-52 43a64: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43a68: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 43a6c: 2002 movel %d2,%d0 43a6e: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 43a70: 282e 0008 movel %fp@(8),%d4 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 43a74: 0800 0000 btst #0,%d0 43a78: 6600 00dc bnew 43b56 43a7c: 4283 clrl %d3 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 43a7e: 0800 0001 btst #1,%d0 43a82: 6704 beqs 43a88 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 43a84: 7002 moveq #2,%d0 43a86: 8680 orl %d0,%d3 va_start(ap, flags); mode = va_arg( ap, int ); 43a88: 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(); 43a8c: 4eb9 0004 bddc jsr 4bddc 43a92: 2440 moveal %d0,%a2 if ( iop == 0 ) { 43a94: 4a80 tstl %d0 43a96: 6700 00c4 beqw 43b5c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 43a9a: 2f04 movel %d4,%sp@- 43a9c: 4bf9 0005 05e4 lea 505e4 ,%a5 43aa2: 4e95 jsr %a5@ 43aa4: 47ee ffec lea %fp@(-20),%a3 43aa8: 7201 moveq #1,%d1 43aaa: 49f9 0004 2d4c lea 42d4c ,%a4 43ab0: 2e81 movel %d1,%sp@ 43ab2: 2f0b movel %a3,%sp@- 43ab4: 2f03 movel %d3,%sp@- 43ab6: 2f00 movel %d0,%sp@- 43ab8: 2f04 movel %d4,%sp@- 43aba: 4e94 jsr %a4@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 43abc: 4fef 0014 lea %sp@(20),%sp 43ac0: 72ff moveq #-1,%d1 43ac2: b280 cmpl %d0,%d1 43ac4: 6700 016c beqw 43c32 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 43ac8: 2002 movel %d2,%d0 43aca: 0280 0000 0a00 andil #2560,%d0 43ad0: 0c80 0000 0a00 cmpil #2560,%d0 43ad6: 6700 00a0 beqw 43b78 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 43ada: 262a 0014 movel %a2@(20),%d3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 43ade: 256e fff4 003c movel %fp@(-12),%a2@(60) iop->file_info = loc.node_access; 43ae4: 256e ffec 0038 movel %fp@(-20),%a2@(56) iop->flags |= rtems_libio_fcntl_flags( flags ); 43aea: 2f02 movel %d2,%sp@- 43aec: 4eb9 0004 be94 jsr 4be94 iop->pathinfo = loc; 43af2: 2553 0018 movel %a3@,%a2@(24) if ( !iop->handlers || !iop->handlers->open_h ) { 43af6: 588f addql #4,%sp */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 43af8: 256e fff0 001c movel %fp@(-16),%a2@(28) 43afe: 256e fff4 0020 movel %fp@(-12),%a2@(32) 43b04: 256e fff8 0024 movel %fp@(-8),%a2@(36) if ( !iop->handlers || !iop->handlers->open_h ) { 43b0a: 206a 003c moveal %a2@(60),%a0 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 43b0e: 8083 orl %d3,%d0 iop->pathinfo = loc; 43b10: 256e fffc 0028 movel %fp@(-4),%a2@(40) * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 43b16: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 43b1a: 4a88 tstl %a0 43b1c: 6700 0104 beqw 43c22 43b20: 2050 moveal %a0@,%a0 43b22: 4a88 tstl %a0 43b24: 6700 00fc beqw 43c22 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 43b28: 2f05 movel %d5,%sp@- 43b2a: 2f02 movel %d2,%sp@- 43b2c: 2f04 movel %d4,%sp@- 43b2e: 2f0a movel %a2,%sp@- 43b30: 4e90 jsr %a0@ if ( rc ) { 43b32: 4fef 0010 lea %sp@(16),%sp 43b36: 4a80 tstl %d0 43b38: 667a bnes 43bb4 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 43b3a: 0802 000a btst #10,%d2 43b3e: 6600 0092 bnew 43bd2 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 43b42: 200a movel %a2,%d0 43b44: 90b9 0005 fca0 subl 5fca0 ,%d0 43b4a: ec80 asrl #6,%d0 } 43b4c: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43b52: 4e5e unlk %fp 43b54: 4e75 rts * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 43b56: 7604 moveq #4,%d3 43b58: 6000 ff24 braw 43a7e * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 43b5c: 7417 moveq #23,%d2 43b5e: 263c 0004 f1b8 movel #324024,%d3 if ( rc ) { if ( iop ) rtems_libio_free( iop ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); 43b64: 2043 moveal %d3,%a0 43b66: 4e90 jsr %a0@ 43b68: 2040 moveal %d0,%a0 43b6a: 70ff moveq #-1,%d0 43b6c: 2082 movel %d2,%a0@ } return iop - rtems_libio_iops; } 43b6e: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43b74: 4e5e unlk %fp 43b76: 4e75 rts if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 43b78: 7411 moveq #17,%d2 43b7a: 263c 0004 f1b8 movel #324024,%d3 done: va_end(ap); if ( rc ) { if ( iop ) 43b80: 4a8a tstl %a2 43b82: 670a beqs 43b8e <== NEVER TAKEN rtems_libio_free( iop ); 43b84: 2f0a movel %a2,%sp@- 43b86: 4eb9 0004 bd4e jsr 4bd4e 43b8c: 588f addql #4,%sp if ( loc_to_free ) 43b8e: 4a8b tstl %a3 43b90: 67d2 beqs 43b64 rtems_filesystem_freenode( loc_to_free ); 43b92: 206b 000c moveal %a3@(12),%a0 43b96: 4a88 tstl %a0 43b98: 67ca beqs 43b64 <== NEVER TAKEN 43b9a: 2068 001c moveal %a0@(28),%a0 43b9e: 4a88 tstl %a0 43ba0: 67c2 beqs 43b64 <== NEVER TAKEN 43ba2: 2f0b movel %a3,%sp@- 43ba4: 4e90 jsr %a0@ 43ba6: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 43ba8: 2043 moveal %d3,%a0 43baa: 4e90 jsr %a0@ 43bac: 2040 moveal %d0,%a0 43bae: 70ff moveq #-1,%d0 43bb0: 2082 movel %d2,%a0@ 43bb2: 60ba bras 43b6e goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 43bb4: 263c 0004 f1b8 movel #324024,%d3 43bba: 2043 moveal %d3,%a0 43bbc: 4e90 jsr %a0@ 43bbe: 2040 moveal %d0,%a0 43bc0: 2410 movel %a0@,%d2 */ done: va_end(ap); if ( rc ) { 43bc2: 66bc bnes 43b80 <== ALWAYS TAKEN if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 43bc4: 200a movel %a2,%d0 <== NOT EXECUTED 43bc6: 90b9 0005 fca0 subl 5fca0 ,%d0 <== NOT EXECUTED 43bcc: ec80 asrl #6,%d0 <== NOT EXECUTED 43bce: 6000 ff7c braw 43b4c <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 43bd2: 200a movel %a2,%d0 43bd4: 90b9 0005 fca0 subl 5fca0 ,%d0 43bda: ec80 asrl #6,%d0 43bdc: 42a7 clrl %sp@- 43bde: 42a7 clrl %sp@- 43be0: 2f00 movel %d0,%sp@- 43be2: 4eb9 0004 bb1c jsr 4bb1c if ( rc ) { 43be8: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 43bec: 2400 movel %d0,%d2 if ( rc ) { 43bee: 6700 ff52 beqw 43b42 if(errno) rc = errno; 43bf2: 263c 0004 f1b8 movel #324024,%d3 <== NOT EXECUTED 43bf8: 2043 moveal %d3,%a0 <== NOT EXECUTED 43bfa: 4e90 jsr %a0@ <== NOT EXECUTED 43bfc: 2040 moveal %d0,%a0 <== NOT EXECUTED 43bfe: 4a90 tstl %a0@ <== NOT EXECUTED 43c00: 6662 bnes 43c64 <== NOT EXECUTED close( iop - rtems_libio_iops ); 43c02: 200a movel %a2,%d0 <== NOT EXECUTED 43c04: 90b9 0005 fca0 subl 5fca0 ,%d0 <== NOT EXECUTED 43c0a: 97cb subal %a3,%a3 <== NOT EXECUTED 43c0c: ec80 asrl #6,%d0 <== NOT EXECUTED 43c0e: 95ca subal %a2,%a2 <== NOT EXECUTED 43c10: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43c12: 4eb9 0004 ba7c jsr 4ba7c <== NOT EXECUTED 43c18: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 43c1a: 4a82 tstl %d2 <== NOT EXECUTED 43c1c: 67a6 beqs 43bc4 <== NOT EXECUTED 43c1e: 6000 ff60 braw 43b80 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 43c22: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 43c28: 263c 0004 f1b8 movel #324024,%d3 <== NOT EXECUTED 43c2e: 6000 ff50 braw 43b80 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 43c32: 263c 0004 f1b8 movel #324024,%d3 43c38: 2043 moveal %d3,%a0 43c3a: 4e90 jsr %a0@ 43c3c: 7202 moveq #2,%d1 43c3e: 2040 moveal %d0,%a0 43c40: b290 cmpl %a0@,%d1 43c42: 6712 beqs 43c56 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 43c44: 2043 moveal %d3,%a0 43c46: 97cb subal %a3,%a3 43c48: 4e90 jsr %a0@ 43c4a: 2040 moveal %d0,%a0 43c4c: 2410 movel %a0@,%d2 */ done: va_end(ap); if ( rc ) { 43c4e: 6700 ff74 beqw 43bc4 43c52: 6000 ff2c braw 43b80 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 43c56: 0802 0009 btst #9,%d2 43c5a: 662a bnes 43c86 43c5c: 97cb subal %a3,%a3 43c5e: 7402 moveq #2,%d2 43c60: 6000 ff1e braw 43b80 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 43c64: 2043 moveal %d3,%a0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 43c66: 97cb subal %a3,%a3 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 43c68: 4e90 jsr %a0@ <== NOT EXECUTED 43c6a: 2040 moveal %d0,%a0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 43c6c: 200a movel %a2,%d0 <== NOT EXECUTED 43c6e: 90b9 0005 fca0 subl 5fca0 ,%d0 <== NOT EXECUTED 43c74: 95ca subal %a2,%a2 <== NOT EXECUTED 43c76: ec80 asrl #6,%d0 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 43c78: 2410 movel %a0@,%d2 <== NOT EXECUTED close( iop - rtems_libio_iops ); 43c7a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43c7c: 4eb9 0004 ba7c jsr 4ba7c <== NOT EXECUTED 43c82: 588f addql #4,%sp <== NOT EXECUTED 43c84: 6094 bras 43c1a <== NOT EXECUTED rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 43c86: 42a7 clrl %sp@- 43c88: 2005 movel %d5,%d0 43c8a: 42a7 clrl %sp@- 43c8c: 08c0 000f bset #15,%d0 43c90: 2f00 movel %d0,%sp@- 43c92: 2f04 movel %d4,%sp@- 43c94: 4eb9 0004 31f4 jsr 431f4 if ( rc ) { 43c9a: 4fef 0010 lea %sp@(16),%sp 43c9e: 4a80 tstl %d0 43ca0: 66a2 bnes 43c44 <== NEVER TAKEN rc = errno; 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 ); 43ca2: 2f04 movel %d4,%sp@- 43ca4: 4e95 jsr %a5@ 43ca6: 7201 moveq #1,%d1 43ca8: 2e81 movel %d1,%sp@ 43caa: 2f0b movel %a3,%sp@- 43cac: 42a7 clrl %sp@- 43cae: 2f00 movel %d0,%sp@- 43cb0: 2f04 movel %d4,%sp@- 43cb2: 4e94 jsr %a4@ if ( status != 0 ) { /* The file did not exist */ 43cb4: 4fef 0014 lea %sp@(20),%sp 43cb8: 4a80 tstl %d0 43cba: 6700 fe1e beqw 43ada 43cbe: 97cb subal %a3,%a3 <== NOT EXECUTED 43cc0: 740d moveq #13,%d2 <== NOT EXECUTED 43cc2: 6000 febc braw 43b80 <== NOT EXECUTED =============================================================================== 000439ec : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 439ec: 4e56 0000 linkw %fp,#0 439f0: 2f0a movel %a2,%sp@- int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 439f2: 45f9 0004 3a60 lea 43a60 ,%a2 439f8: 42a7 clrl %sp@- 439fa: 42a7 clrl %sp@- 439fc: 4879 0005 cf92 pea 5cf92 43a02: 4e92 jsr %a2@ 43a04: 4fef 000c lea %sp@(12),%sp 43a08: 72ff moveq #-1,%d1 43a0a: b280 cmpl %d0,%d1 43a0c: 6730 beqs 43a3e <== NEVER TAKEN /* * 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) 43a0e: 42a7 clrl %sp@- 43a10: 4878 0001 pea 1 43a14: 4879 0005 cf92 pea 5cf92 43a1a: 4e92 jsr %a2@ 43a1c: 4fef 000c lea %sp@(12),%sp 43a20: 72ff moveq #-1,%d1 43a22: b280 cmpl %d0,%d1 43a24: 672c beqs 43a52 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 43a26: 42a7 clrl %sp@- 43a28: 4878 0001 pea 1 43a2c: 4879 0005 cf92 pea 5cf92 43a32: 4e92 jsr %a2@ 43a34: 4fef 000c lea %sp@(12),%sp 43a38: 72ff moveq #-1,%d1 43a3a: b280 cmpl %d0,%d1 43a3c: 6708 beqs 43a46 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 43a3e: 246e fffc moveal %fp@(-4),%a2 43a42: 4e5e unlk %fp 43a44: 4e75 rts */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 43a46: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 43a4c: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED /* * 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) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 43a52: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 43a58: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED ... =============================================================================== 000445d0 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 445d0: 4e56 fff0 linkw %fp,#-16 445d4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 445d8: 246e 000c moveal %fp@(12),%a2 445dc: 47f9 0004 44a8 lea 444a8 ,%a3 445e2: 202e 0008 movel %fp@(8),%d0 int i; if (tty->termios.c_oflag & OPOST) { 445e6: 222a 0034 movel %a2@(52),%d1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 445ea: 1d40 fffe moveb %d0,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 445ee: 0801 0000 btst #0,%d1 445f2: 6744 beqs 44638 <== NEVER TAKEN switch (c) { 445f4: 7409 moveq #9,%d2 445f6: 0280 0000 00ff andil #255,%d0 445fc: b480 cmpl %d0,%d2 445fe: 6700 00f8 beqw 446f8 44602: 644e bccs 44652 <== NEVER TAKEN 44604: 740a moveq #10,%d2 44606: b480 cmpl %d0,%d2 44608: 6774 beqs 4467e 4460a: 143c 000d moveb #13,%d2 4460e: b480 cmpl %d0,%d2 44610: 6700 00a8 beqw 446ba if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 44614: 0801 0001 btst #1,%d1 44618: 6600 011a bnew 44734 4461c: 2079 0005 e7a0 moveal 5e7a0 <__ctype_ptr__>,%a0 44622: 47f9 0004 44a8 lea 444a8 ,%a3 c = toupper(c); if (!iscntrl(c)) 44628: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 4462c: 49c0 extbl %d0 4462e: 0800 0005 btst #5,%d0 44632: 6604 bnes 44638 <== NEVER TAKEN tty->column++; 44634: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 44638: 2f0a movel %a2,%sp@- 4463a: 4878 0001 pea 1 4463e: 486e fffe pea %fp@(-2) 44642: 4e93 jsr %a3@ 44644: 4fef 000c lea %sp@(12),%sp } 44648: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4464e: 4e5e unlk %fp 44650: 4e75 rts oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 44652: 143c 0008 moveb #8,%d2 <== NOT EXECUTED 44656: b480 cmpl %d0,%d2 <== NOT EXECUTED 44658: 66ba bnes 44614 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 4465a: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4465e: 47f9 0004 44a8 lea 444a8 ,%a3 <== NOT EXECUTED 44664: 6fd2 bles 44638 <== NOT EXECUTED tty->column--; 44666: 5380 subql #1,%d0 <== NOT EXECUTED 44668: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 4466c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4466e: 4878 0001 pea 1 <== NOT EXECUTED 44672: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44676: 4e93 jsr %a3@ <== NOT EXECUTED 44678: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4467c: 60ca bras 44648 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 4467e: 0801 0005 btst #5,%d1 44682: 6704 beqs 44688 <== ALWAYS TAKEN tty->column = 0; 44684: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 44688: 47f9 0004 44a8 lea 444a8 ,%a3 if (tty->termios.c_oflag & ONLCR) { 4468e: 44c1 movew %d1,%ccr 44690: 66a6 bnes 44638 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 44692: 2f0a movel %a2,%sp@- 44694: 4878 0001 pea 1 44698: 4879 0005 d556 pea 5d556 4469e: 4e93 jsr %a3@ tty->column = 0; 446a0: 4fef 000c lea %sp@(12),%sp 446a4: 42aa 0028 clrl %a2@(40) if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 446a8: 2f0a movel %a2,%sp@- 446aa: 4878 0001 pea 1 446ae: 486e fffe pea %fp@(-2) 446b2: 4e93 jsr %a3@ 446b4: 4fef 000c lea %sp@(12),%sp 446b8: 608e bras 44648 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 446ba: 0801 0004 btst #4,%d1 <== NOT EXECUTED 446be: 6706 beqs 446c6 <== NOT EXECUTED 446c0: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 446c4: 6782 beqs 44648 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 446c6: 44c1 movew %d1,%ccr <== NOT EXECUTED 446c8: 6a00 0090 bplw 4475a <== NOT EXECUTED 446cc: 47f9 0004 44a8 lea 444a8 ,%a3 <== NOT EXECUTED c = '\n'; 446d2: 700a moveq #10,%d0 <== NOT EXECUTED 446d4: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 446d8: 0801 0005 btst #5,%d1 <== NOT EXECUTED 446dc: 6700 ff5a beqw 44638 <== NOT EXECUTED tty->column = 0; 446e0: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 446e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446e6: 4878 0001 pea 1 <== NOT EXECUTED 446ea: 486e fffe pea %fp@(-2) <== NOT EXECUTED 446ee: 4e93 jsr %a3@ <== NOT EXECUTED 446f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 446f4: 6000 ff52 braw 44648 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 446f8: 202a 0028 movel %a2@(40),%d0 446fc: 7407 moveq #7,%d2 446fe: 307c 0008 moveaw #8,%a0 44702: c480 andl %d0,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 44704: 0281 0000 1800 andil #6144,%d1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4470a: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 4470c: 0c81 0000 1800 cmpil #6144,%d1 44712: 6778 beqs 4478c <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 44714: d1c0 addal %d0,%a0 <== NOT EXECUTED 44716: 47f9 0004 44a8 lea 444a8 ,%a3 <== NOT EXECUTED 4471c: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 44720: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44722: 4878 0001 pea 1 <== NOT EXECUTED 44726: 486e fffe pea %fp@(-2) <== NOT EXECUTED 4472a: 4e93 jsr %a3@ <== NOT EXECUTED 4472c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44730: 6000 ff16 braw 44648 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 44734: 2079 0005 e7a0 moveal 5e7a0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 4473a: 7403 moveq #3,%d2 <== NOT EXECUTED 4473c: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 44740: 49c1 extbl %d1 <== NOT EXECUTED 44742: c282 andl %d2,%d1 <== NOT EXECUTED 44744: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 44748: b481 cmpl %d1,%d2 <== NOT EXECUTED 4474a: 672c beqs 44778 <== NOT EXECUTED 4474c: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 44750: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44756: 6000 feca braw 44622 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 4475a: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 4475e: 47f9 0004 44a8 lea 444a8 ,%a3 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 44764: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44766: 4878 0001 pea 1 <== NOT EXECUTED 4476a: 486e fffe pea %fp@(-2) <== NOT EXECUTED 4476e: 4e93 jsr %a3@ <== NOT EXECUTED 44770: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44774: 6000 fed2 braw 44648 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 44778: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 4477e: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 44782: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44788: 6000 fe98 braw 44622 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); 4478c: 2f0a movel %a2,%sp@- break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 4478e: d088 addl %a0,%d0 44790: 2540 0028 movel %d0,%a2@(40) rtems_termios_puts ( " ", i, tty); 44794: 2f08 movel %a0,%sp@- 44796: 4879 0005 d558 pea 5d558 4479c: 4eb9 0004 44a8 jsr 444a8 return; 447a2: 4fef 000c lea %sp@(12),%sp tty->column++; break; } } rtems_termios_puts (&c, 1, tty); } 447a6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 447ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e208 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4e208: 4e56 ffcc linkw %fp,#-52 4e20c: 48d7 3c00 moveml %a2-%a5,%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) 4e210: 4878 0001 pea 1 4e214: 45ee ffdc lea %fp@(-36),%a2 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4e218: 286e 0008 moveal %fp@(8),%a4 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) 4e21c: 2f0a movel %a2,%sp@- 4e21e: 4878 0007 pea 7 4e222: 4878 0003 pea 3 4e226: 4879 0005 dbef pea 5dbef <__FUNCTION__.5988+0x14> 4e22c: 4eb9 0004 2d4c jsr 42d4c 4e232: 4fef 0014 lea %sp@(20),%sp 4e236: 4a80 tstl %d0 4e238: 6600 00e0 bnew 4e31a return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 4e23c: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4e240: 47f9 0004 f1b8 lea 4f1b8 <__errno>,%a3 <== NOT EXECUTED 4e246: 4a88 tstl %a0 <== NOT EXECUTED 4e248: 670e beqs 4e258 <== NOT EXECUTED 4e24a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e24e: 4a88 tstl %a0 <== NOT EXECUTED 4e250: 6706 beqs 4e258 <== NOT EXECUTED 4e252: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e254: 4e90 jsr %a0@ <== NOT EXECUTED 4e256: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e258: 45ee fff1 lea %fp@(-15),%a2 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e25c: 3039 0005 f5b0 movew 5f5b0 ,%d0 <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e262: 24bc 2f74 6d70 movel #796159344,%a2@ <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e268: 2200 movel %d0,%d1 <== NOT EXECUTED 4e26a: 5281 addql #1,%d1 <== NOT EXECUTED 4e26c: 3f00 movew %d0,%sp@- <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e26e: 203c 2f2e 6669 movel #791570025,%d0 <== NOT EXECUTED 4e274: 2d40 fff5 movel %d0,%fp@(-11) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e278: 4267 clrw %sp@- <== NOT EXECUTED 4e27a: 33c1 0005 f5b0 movew %d1,5f5b0 <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e280: 323c 666f movew #26223,%d1 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e284: 4879 0005 dbf4 pea 5dbf4 <__FUNCTION__.5988+0x19> <== NOT EXECUTED 4e28a: 486e fffb pea %fp@(-5) <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e28e: 3d41 fff9 movew %d1,%fp@(-7) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e292: 4eb9 0004 feb0 jsr 4feb0 <== NOT EXECUTED /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4e298: 4878 0180 pea 180 <== NOT EXECUTED 4e29c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e29e: 4eb9 0004 ea34 jsr 4ea34 <== NOT EXECUTED 4e2a4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4e2a8: 4a80 tstl %d0 <== NOT EXECUTED 4e2aa: 6660 bnes 4e30c <== 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); 4e2ac: 4878 4000 pea 4000 4e2b0: 4bf9 0004 3a60 lea 43a60 ,%a5 4e2b6: 2f0a movel %a2,%sp@- 4e2b8: 4e95 jsr %a5@ if (filsdes[0] < 0) { 4e2ba: 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); 4e2bc: 2880 movel %d0,%a4@ if (filsdes[0] < 0) { 4e2be: 6d00 00e0 bltw 4e3a0 the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4e2c2: b0b9 0005 e5f4 cmpl 5e5f4 ,%d0 <== NOT EXECUTED 4e2c8: 6400 00d0 bccw 4e39a <== NOT EXECUTED 4e2cc: 2079 0005 fca0 moveal 5fca0 ,%a0 <== NOT EXECUTED 4e2d2: ed88 lsll #6,%d0 <== NOT EXECUTED 4e2d4: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4e2d6: 70fe moveq #-2,%d0 <== NOT EXECUTED 4e2d8: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4e2dc: 4878 0001 pea 1 <== NOT EXECUTED 4e2e0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e2e2: 4e95 jsr %a5@ <== NOT EXECUTED if (filsdes[1] < 0) { 4e2e4: 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); 4e2e6: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4e2ea: 6d00 00ce bltw 4e3ba <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4e2ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { 4e2f0: 9bcd subal %a5,%a5 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4e2f2: 4eb9 0004 ea54 jsr 4ea54 <== NOT EXECUTED 4e2f8: 588f addql #4,%sp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4e2fa: 4e93 jsr %a3@ <== NOT EXECUTED 4e2fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e2fe: 208d movel %a5,%a0@ <== NOT EXECUTED } 4e300: 70ff moveq #-1,%d0 4e302: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 4e308: 4e5e unlk %fp 4e30a: 4e75 rts memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 4e30c: 4e93 jsr %a3@ <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4e30e: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 <== NOT EXECUTED 4e314: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e316: 4e5e unlk %fp <== NOT EXECUTED 4e318: 4e75 rts <== NOT EXECUTED 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) != 0) { if (errno != ENOENT) 4e31a: 47f9 0004 f1b8 lea 4f1b8 <__errno>,%a3 4e320: 4e93 jsr %a3@ 4e322: 7202 moveq #2,%d1 4e324: 2040 moveal %d0,%a0 4e326: b290 cmpl %a0@,%d1 4e328: 66d6 bnes 4e300 <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4e32a: 4878 03ff pea 3ff 4e32e: 4879 0005 dbef pea 5dbef <__FUNCTION__.5988+0x14> 4e334: 4eb9 0004 31d4 jsr 431d4 4e33a: 508f addql #8,%sp 4e33c: 4a80 tstl %d0 4e33e: 66c0 bnes 4e300 <== NEVER TAKEN else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e340: 45ee fff1 lea %fp@(-15),%a2 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e344: 3039 0005 f5b0 movew 5f5b0 ,%d0 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e34a: 24bc 2f74 6d70 movel #796159344,%a2@ sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e350: 2200 movel %d0,%d1 4e352: 5281 addql #1,%d1 4e354: 3f00 movew %d0,%sp@- else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e356: 203c 2f2e 6669 movel #791570025,%d0 4e35c: 2d40 fff5 movel %d0,%fp@(-11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e360: 4267 clrw %sp@- 4e362: 33c1 0005 f5b0 movew %d1,5f5b0 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e368: 323c 666f movew #26223,%d1 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e36c: 4879 0005 dbf4 pea 5dbf4 <__FUNCTION__.5988+0x19> 4e372: 486e fffb pea %fp@(-5) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e376: 3d41 fff9 movew %d1,%fp@(-7) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e37a: 4eb9 0004 feb0 jsr 4feb0 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4e380: 4878 0180 pea 180 4e384: 2f0a movel %a2,%sp@- 4e386: 4eb9 0004 ea34 jsr 4ea34 4e38c: 4fef 0014 lea %sp@(20),%sp 4e390: 4a80 tstl %d0 4e392: 6700 ff18 beqw 4e2ac 4e396: 6000 ff74 braw 4e30c <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4e39a: 91c8 subal %a0,%a0 <== NOT EXECUTED 4e39c: 6000 ff38 braw 4e2d6 <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 4e3a0: 4e93 jsr %a3@ 4e3a2: 2040 moveal %d0,%a0 4e3a4: 2a50 moveal %a0@,%a5 /* 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); 4e3a6: 2f0a movel %a2,%sp@- 4e3a8: 4eb9 0004 ea54 jsr 4ea54 4e3ae: 588f addql #4,%sp close(filsdes[0]); } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); 4e3b0: 4e93 jsr %a3@ 4e3b2: 2040 moveal %d0,%a0 4e3b4: 208d movel %a5,%a0@ 4e3b6: 6000 ff48 braw 4e300 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4e3ba: 4e93 jsr %a3@ <== NOT EXECUTED 4e3bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e3be: 2a50 moveal %a0@,%a5 <== NOT EXECUTED close(filsdes[0]); 4e3c0: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4e3c2: 4eb9 0004 ba7c jsr 4ba7c <== NOT EXECUTED 4e3c8: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4e3ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e3cc: 4eb9 0004 ea54 jsr 4ea54 <== NOT EXECUTED 4e3d2: 588f addql #4,%sp <== NOT EXECUTED 4e3d4: 6000 ff24 braw 4e2fa <== NOT EXECUTED =============================================================================== 00049ea6 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 49ea6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 49eaa: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED 49eb0: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 49eb4: 6706 beqs 49ebc <== NOT EXECUTED 49eb6: 70ea moveq #-22,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 49eb8: 4e5e unlk %fp <== NOT EXECUTED 49eba: 4e75 rts <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 49ebc: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 49ec0: 6606 bnes 49ec8 <== NOT EXECUTED 49ec2: 70f2 moveq #-14,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 49ec4: 4e5e unlk %fp <== NOT EXECUTED 49ec6: 4e75 rts <== NOT EXECUTED { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) 49ec8: 42a7 clrl %sp@- <== NOT EXECUTED 49eca: 42a7 clrl %sp@- <== NOT EXECUTED 49ecc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49ed0: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 49ed4: 4eb9 0004 6704 jsr 46704 <== NOT EXECUTED 49eda: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 49ede: 4a80 tstl %d0 <== NOT EXECUTED 49ee0: 6706 beqs 49ee8 <== NOT EXECUTED 49ee2: 70fc moveq #-4,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 49ee4: 4e5e unlk %fp <== NOT EXECUTED 49ee6: 4e75 rts <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 49ee8: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 49eec: 2f29 0028 movel %a1@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 49ef0: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 49ef4: 20a9 000c movel %a1@(12),%a0@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 49ef8: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return 0; 49efe: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 49f00: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 49f02: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049e48 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 49e48: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 49e4a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 49e4e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a0e4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4a0e4: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 4a0e8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4a0ec: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4a0ee: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4a0f2: 47f9 0004 6704 lea 46704 ,%a3 <== NOT EXECUTED 4a0f8: 42a7 clrl %sp@- <== NOT EXECUTED 4a0fa: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4a0fe: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED 4a102: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4a106: 4e93 jsr %a3@ <== NOT EXECUTED 4a108: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a10c: 4a80 tstl %d0 <== NOT EXECUTED 4a10e: 6600 00ac bnew 4a1bc <== NOT EXECUTED return -EINTR; while (read < count) { 4a112: 4a84 tstl %d4 <== NOT EXECUTED 4a114: 6700 01ac beqw 4a2c2 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4a118: 4285 clrl %d5 <== NOT EXECUTED 4a11a: 4283 clrl %d3 <== NOT EXECUTED 4a11c: 49f9 0004 6840 lea 46840 ,%a4 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4a122: 243c 0004 c3e4 movel #312292,%d2 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4a128: 2e3c 0004 c36c movel #312172,%d7 <== NOT EXECUTED if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4a12e: 2c3c 0004 f9d8 movel #326104,%d6 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4a134: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4a138: 6600 0090 bnew 4a1ca <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4a13c: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a140: 6700 010a beqw 4a24c <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4a144: 7001 moveq #1,%d0 <== NOT EXECUTED 4a146: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4a14a: 6600 0110 bnew 4a25c <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4a14e: 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 ++; 4a152: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4a156: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4a158: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a15a: 42a7 clrl %sp@- <== NOT EXECUTED 4a15c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a160: 4e90 jsr %a0@ <== NOT EXECUTED 4a162: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a166: 4a80 tstl %d0 <== NOT EXECUTED 4a168: 673c beqs 4a1a6 <== NOT EXECUTED 4a16a: 70fc moveq #-4,%d0 <== NOT EXECUTED 4a16c: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4a170: 42a7 clrl %sp@- <== NOT EXECUTED 4a172: 42a7 clrl %sp@- <== NOT EXECUTED 4a174: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a178: 4e93 jsr %a3@ <== NOT EXECUTED 4a17a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a17e: 4a80 tstl %d0 <== NOT EXECUTED 4a180: 6600 00ec bnew 4a26e <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4a184: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4a188: 4aae fff8 tstl %fp@(-8) <== NOT EXECUTED 4a18c: 67a6 beqs 4a134 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4a18e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a192: 4e94 jsr %a4@ <== NOT EXECUTED 4a194: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4a196: 4a83 tstl %d3 <== NOT EXECUTED 4a198: 6f12 bles 4a1ac <== NOT EXECUTED return read; return ret; } 4a19a: 2003 movel %d3,%d0 <== NOT EXECUTED 4a19c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a1a2: 4e5e unlk %fp <== NOT EXECUTED 4a1a4: 4e75 rts <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4a1a6: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 4a1aa: 60c4 bras 4a170 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4a1ac: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED return read; return ret; } 4a1b0: 2003 movel %d3,%d0 <== NOT EXECUTED 4a1b2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a1b8: 4e5e unlk %fp <== NOT EXECUTED 4a1ba: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4a1bc: 76fc moveq #-4,%d3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 4a1be: 2003 movel %d3,%d0 <== NOT EXECUTED 4a1c0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a1c6: 4e5e unlk %fp <== NOT EXECUTED 4a1c8: 4e75 rts <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4a1ca: 2004 movel %d4,%d0 <== NOT EXECUTED 4a1cc: 9085 subl %d5,%d0 <== NOT EXECUTED 4a1ce: b081 cmpl %d1,%d0 <== NOT EXECUTED 4a1d0: 6402 bccs 4a1d4 <== NOT EXECUTED 4a1d2: 2200 movel %d0,%d1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4a1d4: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 4a1d8: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4a1dc: 91c0 subal %d0,%a0 <== NOT EXECUTED if (chunk > chunk1) { 4a1de: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4a1e0: 6d00 009c bltw 4a27e <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4a1e4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a1e6: d092 addl %a2@,%d0 <== NOT EXECUTED 4a1e8: 2246 moveal %d6,%a1 <== NOT EXECUTED 4a1ea: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a1ec: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a1f0: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4a1f4: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4a1f8: 4e91 jsr %a1@ <== NOT EXECUTED 4a1fa: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4a1fe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4a202: 2041 moveal %d1,%a0 <== NOT EXECUTED 4a204: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4a208: 2008 movel %a0,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4a20a: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 4a20e: 93c1 subal %d1,%a1 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4a210: 4c6a 0005 0004 remul %a2@(4),%d5,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4a216: 2549 000c movel %a1,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4a21a: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4a21e: 4a89 tstl %a1 <== NOT EXECUTED 4a220: 6604 bnes 4a226 <== NOT EXECUTED pipe->Start = 0; 4a222: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4a226: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4a22a: 6716 beqs 4a242 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4a22c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a230: 2047 moveal %d7,%a0 <== NOT EXECUTED 4a232: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a236: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4a23a: 4e90 jsr %a0@ <== NOT EXECUTED 4a23c: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4a240: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4a242: d681 addl %d1,%d3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4a244: 2a03 movel %d3,%d5 <== NOT EXECUTED 4a246: b883 cmpl %d3,%d4 <== NOT EXECUTED 4a248: 6200 feea bhiw 4a134 <== NOT EXECUTED 4a24c: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4a250: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a254: 4e94 jsr %a4@ <== NOT EXECUTED 4a256: 588f addql #4,%sp <== NOT EXECUTED 4a258: 6000 ff3c braw 4a196 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 4a25c: 70f5 moveq #-11,%d0 <== NOT EXECUTED 4a25e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4a262: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a266: 4e94 jsr %a4@ <== NOT EXECUTED 4a268: 588f addql #4,%sp <== NOT EXECUTED 4a26a: 6000 ff2a braw 4a196 <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4a26e: 7afc moveq #-4,%d5 <== NOT EXECUTED 4a270: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4a274: 4a83 tstl %d3 <== NOT EXECUTED 4a276: 6e00 ff22 bgtw 4a19a <== NOT EXECUTED 4a27a: 6000 ff30 braw 4a1ac <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4a27e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4a280: d092 addl %a2@,%d0 <== NOT EXECUTED 4a282: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a284: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4a288: 4871 5800 pea %a1@(00000000,%d5:l) <== NOT EXECUTED 4a28c: 2246 moveal %d6,%a1 <== NOT EXECUTED 4a28e: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4a292: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED 4a296: 4e91 jsr %a1@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4a298: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4a29c: 2001 movel %d1,%d0 <== NOT EXECUTED 4a29e: 2246 moveal %d6,%a1 <== NOT EXECUTED 4a2a0: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4a2a4: 9088 subl %a0,%d0 <== NOT EXECUTED 4a2a6: da88 addl %a0,%d5 <== NOT EXECUTED 4a2a8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a2aa: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a2ac: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a2b0: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4a2b4: 4e91 jsr %a1@ <== NOT EXECUTED 4a2b6: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4a2ba: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4a2be: 6000 ff42 braw 4a202 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4a2c2: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4a2c6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a2ca: 49f9 0004 6840 lea 46840 ,%a4 <== NOT EXECUTED 4a2d0: 4e94 jsr %a4@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4a2d2: 4283 clrl %d3 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4a2d4: 588f addql #4,%sp <== NOT EXECUTED 4a2d6: 6000 febe braw 4a196 <== NOT EXECUTED =============================================================================== 0004a2da : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4a2da: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4a2de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4a2e2: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4a2e6: 47f9 0004 6704 lea 46704 ,%a3 <== NOT EXECUTED 4a2ec: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4a2ee: 2454 moveal %a4@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4a2f0: 42a7 clrl %sp@- <== NOT EXECUTED 4a2f2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a2f6: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4a2f8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a2fc: 4a80 tstl %d0 <== NOT EXECUTED 4a2fe: 6600 00f2 bnew 4a3f2 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4a302: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a306: 7406 moveq #6,%d2 <== NOT EXECUTED 4a308: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4a30c: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4a310: 6704 beqs 4a316 <== NOT EXECUTED pipe->Readers --; 4a312: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4a316: 44c2 movew %d2,%ccr <== NOT EXECUTED 4a318: 675a beqs 4a374 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4a31a: 42a7 clrl %sp@- <== NOT EXECUTED 4a31c: 42a7 clrl %sp@- <== NOT EXECUTED 4a31e: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- <== NOT EXECUTED 4a324: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4a326: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a32a: 4a80 tstl %d0 <== NOT EXECUTED 4a32c: 6600 00c4 bnew 4a3f2 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4a330: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a334: 47f9 0004 6840 lea 46840 ,%a3 <== NOT EXECUTED 4a33a: 4e93 jsr %a3@ <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4a33c: 588f addql #4,%sp <== NOT EXECUTED 4a33e: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a342: 6736 beqs 4a37a <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4a344: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a348: 6616 bnes 4a360 <== NOT EXECUTED 4a34a: 7002 moveq #2,%d0 <== NOT EXECUTED 4a34c: b082 cmpl %d2,%d0 <== NOT EXECUTED 4a34e: 6710 beqs 4a360 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4a350: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a354: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a358: 4eb9 0004 c36c jsr 4c36c <== NOT EXECUTED 4a35e: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4a360: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- <== NOT EXECUTED 4a366: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4a368: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4a36e: 4280 clrl %d0 <== NOT EXECUTED 4a370: 4e5e unlk %fp <== NOT EXECUTED 4a372: 4e75 rts <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 4a374: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED 4a378: 60a0 bras 4a31a <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4a37a: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a37e: 672a beqs 4a3aa <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4a380: 7004 moveq #4,%d0 <== NOT EXECUTED 4a382: b082 cmpl %d2,%d0 <== NOT EXECUTED 4a384: 67da beqs 4a360 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4a386: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a38a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a38e: 4eb9 0004 c36c jsr 4c36c <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4a394: 508f addql #8,%sp <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4a396: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- <== NOT EXECUTED 4a39c: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4a39e: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4a3a4: 4280 clrl %d0 <== NOT EXECUTED 4a3a6: 4e5e unlk %fp <== NOT EXECUTED 4a3a8: 4e75 rts <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4a3aa: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4a3ae: 4bf9 0004 2ddc lea 42ddc ,%a5 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4a3b4: 243c 0004 c2cc movel #312012,%d2 <== NOT EXECUTED 4a3ba: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a3bc: 4e90 jsr %a0@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4a3be: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a3c2: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a3c4: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4a3c6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a3ca: 4eb9 0004 662c jsr 4662c <== NOT EXECUTED free(pipe->Buffer); 4a3d0: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a3d2: 4e95 jsr %a5@ <== NOT EXECUTED free(pipe); 4a3d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a3d6: 4e95 jsr %a5@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4a3d8: 4fef 0014 lea %sp@(20),%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; 4a3dc: 4294 clrl %a4@ <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4a3de: 2f39 0005 f5a8 movel 5f5a8 ,%sp@- <== NOT EXECUTED 4a3e4: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4a3e6: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4a3ec: 4280 clrl %d0 <== NOT EXECUTED 4a3ee: 4e5e unlk %fp <== NOT EXECUTED 4a3f0: 4e75 rts <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 4a3f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a3f4: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED =============================================================================== 00049f06 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 49f06: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 49f0a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 49f0e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 49f12: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 49f16: 660e bnes 49f26 <== NOT EXECUTED 49f18: 4282 clrl %d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 49f1a: 2002 movel %d2,%d0 <== NOT EXECUTED 49f1c: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 49f22: 4e5e unlk %fp <== NOT EXECUTED 49f24: 4e75 rts <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 49f26: 42a7 clrl %sp@- <== NOT EXECUTED 49f28: 47f9 0004 6704 lea 46704 ,%a3 <== NOT EXECUTED 49f2e: 42a7 clrl %sp@- <== NOT EXECUTED 49f30: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 49f34: 4e93 jsr %a3@ <== NOT EXECUTED 49f36: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 49f3a: 4a80 tstl %d0 <== NOT EXECUTED 49f3c: 6600 00b6 bnew 49ff4 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 49f40: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 49f44: 6700 0088 beqw 49fce <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 49f48: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 49f4c: b083 cmpl %d3,%d0 <== NOT EXECUTED 49f4e: 6500 00be bcsw 4a00e <== NOT EXECUTED 49f52: 2a03 movel %d3,%d5 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 49f54: 4286 clrl %d6 <== NOT EXECUTED 49f56: 4282 clrl %d2 <== NOT EXECUTED 49f58: 49f9 0004 6840 lea 46840 ,%a4 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 49f5e: 4bf9 0004 c3e4 lea 4c3e4 ,%a5 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 49f64: 2e3c 0004 f9d8 movel #326104,%d7 <== 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) { 49f6a: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 49f6e: 2800 movel %d0,%d4 <== NOT EXECUTED 49f70: 9881 subl %d1,%d4 <== NOT EXECUTED 49f72: ba84 cmpl %d4,%d5 <== NOT EXECUTED 49f74: 6300 00b4 blsw 4a02a <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 49f78: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 49f7c: 7001 moveq #1,%d0 <== NOT EXECUTED 49f7e: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 49f82: 6600 0122 bnew 4a0a6 <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 49f86: 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 ++; 49f8a: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 49f8e: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 49f90: 42a7 clrl %sp@- <== NOT EXECUTED 49f92: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 49f96: 4e95 jsr %a5@ <== NOT EXECUTED 49f98: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 49f9c: 4a80 tstl %d0 <== NOT EXECUTED 49f9e: 672a beqs 49fca <== NOT EXECUTED 49fa0: 78fc moveq #-4,%d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 49fa2: 42a7 clrl %sp@- <== NOT EXECUTED 49fa4: 42a7 clrl %sp@- <== NOT EXECUTED 49fa6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 49faa: 4e93 jsr %a3@ <== NOT EXECUTED 49fac: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 49fb0: 4a80 tstl %d0 <== NOT EXECUTED 49fb2: 6600 00ec bnew 4a0a0 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 49fb6: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 49fba: 4a84 tstl %d4 <== NOT EXECUTED 49fbc: 661a bnes 49fd8 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 49fbe: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 49fc2: 673e beqs 4a002 <== NOT EXECUTED 49fc4: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 49fc8: 60a0 bras 49f6a <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 49fca: 4284 clrl %d4 <== NOT EXECUTED 49fcc: 60d4 bras 49fa2 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 49fce: 78e0 moveq #-32,%d4 <== NOT EXECUTED 49fd0: 4282 clrl %d2 <== NOT EXECUTED 49fd2: 49f9 0004 6840 lea 46840 ,%a4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 49fd8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 49fdc: 4e94 jsr %a4@ <== NOT EXECUTED 49fde: 588f addql #4,%sp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 49fe0: 4a82 tstl %d2 <== NOT EXECUTED 49fe2: 6e00 ff36 bgtw 49f1a <== NOT EXECUTED 49fe6: 2404 movel %d4,%d2 <== NOT EXECUTED return written; return ret; } 49fe8: 2002 movel %d2,%d0 <== NOT EXECUTED 49fea: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 49ff0: 4e5e unlk %fp <== NOT EXECUTED 49ff2: 4e75 rts <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 49ff4: 74fc moveq #-4,%d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 49ff6: 2002 movel %d2,%d0 <== NOT EXECUTED 49ff8: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 49ffe: 4e5e unlk %fp <== NOT EXECUTED 4a000: 4e75 rts <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4a002: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4a006: 78e0 moveq #-32,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4a008: 4e94 jsr %a4@ <== NOT EXECUTED 4a00a: 588f addql #4,%sp <== NOT EXECUTED 4a00c: 60d2 bras 49fe0 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4a00e: 7a01 moveq #1,%d5 <== NOT EXECUTED 4a010: 4286 clrl %d6 <== NOT EXECUTED 4a012: 4282 clrl %d2 <== NOT EXECUTED 4a014: 49f9 0004 6840 lea 46840 ,%a4 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4a01a: 4bf9 0004 c3e4 lea 4c3e4 ,%a5 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4a020: 2e3c 0004 f9d8 movel #326104,%d7 <== NOT EXECUTED 4a026: 6000 ff42 braw 49f6a <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4a02a: 2043 moveal %d3,%a0 <== NOT EXECUTED 4a02c: 91c6 subal %d6,%a0 <== NOT EXECUTED 4a02e: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 4a030: 6402 bccs 4a034 <== NOT EXECUTED 4a032: 2808 movel %a0,%d4 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4a034: 2a01 movel %d1,%d5 <== NOT EXECUTED 4a036: daaa 0008 addl %a2@(8),%d5 <== NOT EXECUTED 4a03a: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED 4a03e: 2a00 movel %d0,%d5 <== NOT EXECUTED 4a040: 9a81 subl %d1,%d5 <== NOT EXECUTED if (chunk > chunk1) { 4a042: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4a044: 6c6e bges 4a0b4 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4a046: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4a048: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a04c: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4a050: d292 addl %a2@,%d1 <== NOT EXECUTED 4a052: 2047 moveal %d7,%a0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4a054: dc85 addl %d5,%d6 <== NOT EXECUTED } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4a056: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a058: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4a05a: 2004 movel %d4,%d0 <== NOT EXECUTED 4a05c: 9085 subl %d5,%d0 <== NOT EXECUTED 4a05e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a060: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a064: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4a068: 2047 moveal %d7,%a0 <== NOT EXECUTED 4a06a: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a06c: 4e90 jsr %a0@ <== NOT EXECUTED 4a06e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4a072: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4a076: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4a07a: 6612 bnes 4a08e <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4a07c: d484 addl %d4,%d2 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4a07e: 2c02 movel %d2,%d6 <== NOT EXECUTED 4a080: b483 cmpl %d3,%d2 <== NOT EXECUTED 4a082: 6452 bccs 4a0d6 <== NOT EXECUTED 4a084: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4a088: 7a01 moveq #1,%d5 <== NOT EXECUTED 4a08a: 6000 fede braw 49f6a <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4a08e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a092: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a096: 4eb9 0004 c36c jsr 4c36c <== NOT EXECUTED 4a09c: 508f addql #8,%sp <== NOT EXECUTED 4a09e: 60dc bras 4a07c <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4a0a0: 78fc moveq #-4,%d4 <== NOT EXECUTED 4a0a2: 6000 ff3c braw 49fe0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4a0a6: 2f2a 0028 movel %a2@(40),%sp@- <== 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)) { 4a0aa: 78f5 moveq #-11,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4a0ac: 4e94 jsr %a4@ <== NOT EXECUTED 4a0ae: 588f addql #4,%sp <== NOT EXECUTED 4a0b0: 6000 ff2e braw 49fe0 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4a0b4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4a0b6: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a0ba: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4a0be: d292 addl %a2@,%d1 <== NOT EXECUTED 4a0c0: 2047 moveal %d7,%a0 <== NOT EXECUTED 4a0c2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a0c4: 4e90 jsr %a0@ <== NOT EXECUTED 4a0c6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4a0ca: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4a0ce: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4a0d2: 67a8 beqs 4a07c <== NOT EXECUTED 4a0d4: 60b8 bras 4a08e <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4a0d6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4a0da: 4284 clrl %d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4a0dc: 4e94 jsr %a4@ <== NOT EXECUTED 4a0de: 588f addql #4,%sp <== NOT EXECUTED 4a0e0: 6000 fefe braw 49fe0 <== NOT EXECUTED =============================================================================== 00047c8c : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 47c8c: 4e56 0000 linkw %fp,#0 47c90: 222e 000c movel %fp@(12),%d1 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 47c94: 2001 movel %d1,%d0 47c96: 5380 subql #1,%d0 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 47c98: 52b9 0006 5e60 addql #1,65e60 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 47c9e: c081 andl %d1,%d0 47ca0: 6608 bnes 47caa <== NEVER TAKEN 47ca2: 103c 0003 moveb #3,%d0 47ca6: b081 cmpl %d1,%d0 47ca8: 6506 bcss 47cb0 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 47caa: 7016 moveq #22,%d0 47cac: 4e5e unlk %fp 47cae: 4e75 rts 47cb0: 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 ); 47cb2: 4ef9 0004 7e04 jmp 47e04 =============================================================================== 000432e0 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 432e0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 432e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 432e6: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 432ea: 1012 moveb %a2@,%d0 <== NOT EXECUTED 432ec: 6714 beqs 43302 <== NOT EXECUTED BSP_output_char(*p); 432ee: 49c0 extbl %d0 <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 432f0: 528a addql #1,%a2 <== NOT EXECUTED BSP_output_char(*p); 432f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432f4: 2079 0005 ecd4 moveal 5ecd4 ,%a0 <== NOT EXECUTED 432fa: 4e90 jsr %a0@ <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 432fc: 588f addql #4,%sp <== NOT EXECUTED 432fe: 1012 moveb %a2@,%d0 <== NOT EXECUTED 43300: 66ec bnes 432ee <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 43302: 2279 0005 ecd4 moveal 5ecd4 ,%a1 <== NOT EXECUTED 43308: 700a moveq #10,%d0 <== NOT EXECUTED } 4330a: 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'); 4330e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43312: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 43314: 4ed1 jmp %a1@ <== NOT EXECUTED ... =============================================================================== 0005c488 : ssize_t read( int fd, void *buffer, size_t count ) { 5c488: 4e56 fff4 linkw %fp,#-12 5c48c: 202e 0008 movel %fp@(8),%d0 5c490: 222e 000c movel %fp@(12),%d1 5c494: 206e 0010 moveal %fp@(16),%a0 5c498: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5c49c: b0b9 0005 e5f4 cmpl 5e5f4 ,%d0 5c4a2: 6468 bccs 5c50c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5c4a4: 2479 0005 fca0 moveal 5fca0 ,%a2 5c4aa: ed88 lsll #6,%d0 5c4ac: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5c4ae: 202a 0014 movel %a2@(20),%d0 5c4b2: 0800 0008 btst #8,%d0 5c4b6: 6754 beqs 5c50c rtems_libio_check_buffer( buffer ); 5c4b8: 4a81 tstl %d1 5c4ba: 6768 beqs 5c524 <== NEVER TAKEN rtems_libio_check_count( count ); 5c4bc: 4a88 tstl %a0 5c4be: 6740 beqs 5c500 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5c4c0: 0800 0001 btst #1,%d0 5c4c4: 675e beqs 5c524 <== NEVER TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) 5c4c6: 226a 003c moveal %a2@(60),%a1 5c4ca: 2269 0008 moveal %a1@(8),%a1 5c4ce: 4a89 tstl %a1 5c4d0: 676a beqs 5c53c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 5c4d2: 2f08 movel %a0,%sp@- 5c4d4: 2f01 movel %d1,%sp@- 5c4d6: 2f0a movel %a2,%sp@- 5c4d8: 4e91 jsr %a1@ if ( rc > 0 ) 5c4da: 4fef 000c lea %sp@(12),%sp 5c4de: 4a80 tstl %d0 5c4e0: 6f14 bles 5c4f6 iop->offset += rc; 5c4e2: 2400 movel %d0,%d2 5c4e4: 5bc1 smi %d1 5c4e6: 49c1 extbl %d1 5c4e8: d5aa 0010 addl %d2,%a2@(16) 5c4ec: 262a 000c movel %a2@(12),%d3 5c4f0: d781 addxl %d1,%d3 5c4f2: 2543 000c movel %d3,%a2@(12) return rc; } 5c4f6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5c4fc: 4e5e unlk %fp 5c4fe: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 5c500: 4280 clrl %d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c502: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5c508: 4e5e unlk %fp <== NOT EXECUTED 5c50a: 4e75 rts <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 5c50c: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 5c512: 7409 moveq #9,%d2 5c514: 2040 moveal %d0,%a0 5c516: 70ff moveq #-1,%d0 5c518: 2082 movel %d2,%a0@ if ( rc > 0 ) iop->offset += rc; return rc; } 5c51a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5c520: 4e5e unlk %fp 5c522: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5c524: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 5c52a: 7216 moveq #22,%d1 <== NOT EXECUTED 5c52c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c52e: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c530: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5c536: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c538: 4e5e unlk %fp <== NOT EXECUTED 5c53a: 4e75 rts <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c53c: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 5c542: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c544: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c546: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c54c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c552: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046328 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 46328: 4e56 ffe0 linkw %fp,#-32 4632c: 48d7 001c moveml %d2-%d4,%sp@ 46330: 262e 0008 movel %fp@(8),%d3 46334: 282e 000c movel %fp@(12),%d4 rtems_filesystem_location_info_t loc; int result; if (!buf) 46338: 6700 0092 beqw 463cc rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 4633c: 2f03 movel %d3,%sp@- 4633e: 240e movel %fp,%d2 46340: 0682 ffff ffec addil #-20,%d2 46346: 4eb9 0005 3c14 jsr 53c14 4634c: 4297 clrl %sp@ 4634e: 2f02 movel %d2,%sp@- 46350: 42a7 clrl %sp@- 46352: 2f00 movel %d0,%sp@- 46354: 2f03 movel %d3,%sp@- 46356: 4eb9 0004 5084 jsr 45084 0, &loc, false ); if ( result != 0 ) 4635c: 4fef 0014 lea %sp@(20),%sp 46360: 4a80 tstl %d0 46362: 665a bnes 463be <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ 46364: 226e fff8 moveal %fp@(-8),%a1 46368: 2069 0010 moveal %a1@(16),%a0 4636c: 4a88 tstl %a0 4636e: 6700 00a6 beqw 46416 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 46372: 2f02 movel %d2,%sp@- 46374: 4e90 jsr %a0@ 46376: 588f addql #4,%sp 46378: 7204 moveq #4,%d1 4637a: b280 cmpl %d0,%d1 4637c: 6668 bnes 463e6 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 4637e: 226e fff8 moveal %fp@(-8),%a1 46382: 2069 003c moveal %a1@(60),%a0 46386: 4a88 tstl %a0 46388: 6700 008c beqw 46416 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 4638c: 2f2e 0010 movel %fp@(16),%sp@- 46390: 2f04 movel %d4,%sp@- 46392: 2f02 movel %d2,%sp@- 46394: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 46396: 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 ); 4639a: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 4639c: 4fef 000c lea %sp@(12),%sp 463a0: 4a88 tstl %a0 463a2: 670e beqs 463b2 <== NEVER TAKEN 463a4: 2068 001c moveal %a0@(28),%a0 463a8: 4a88 tstl %a0 463aa: 6706 beqs 463b2 <== NEVER TAKEN 463ac: 2f02 movel %d2,%sp@- 463ae: 4e90 jsr %a0@ 463b0: 588f addql #4,%sp return result; } 463b2: 2003 movel %d3,%d0 463b4: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 463ba: 4e5e unlk %fp 463bc: 4e75 rts if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) 463be: 76ff moveq #-1,%d3 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 463c0: 2003 movel %d3,%d0 <== NOT EXECUTED 463c2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 463c8: 4e5e unlk %fp <== NOT EXECUTED 463ca: 4e75 rts <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 463cc: 4eb9 0005 2200 jsr 52200 <__errno> <== NOT EXECUTED 463d2: 76ff moveq #-1,%d3 <== NOT EXECUTED 463d4: 720e moveq #14,%d1 <== NOT EXECUTED 463d6: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 463d8: 2003 movel %d3,%d0 <== NOT EXECUTED 463da: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 463e0: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 463e2: 4e5e unlk %fp <== NOT EXECUTED 463e4: 4e75 rts <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 463e6: 206e fff8 moveal %fp@(-8),%a0 463ea: 4a88 tstl %a0 463ec: 670e beqs 463fc <== NEVER TAKEN 463ee: 2068 001c moveal %a0@(28),%a0 463f2: 4a88 tstl %a0 463f4: 6706 beqs 463fc <== NEVER TAKEN 463f6: 2f02 movel %d2,%sp@- 463f8: 4e90 jsr %a0@ 463fa: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 463fc: 4eb9 0005 2200 jsr 52200 <__errno> 46402: 76ff moveq #-1,%d3 46404: 2040 moveal %d0,%a0 46406: 7016 moveq #22,%d0 46408: 2080 movel %d0,%a0@ result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 4640a: 2003 movel %d3,%d0 4640c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 46412: 4e5e unlk %fp 46414: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 46416: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4641a: 4a88 tstl %a0 <== NOT EXECUTED 4641c: 6706 beqs 46424 <== NOT EXECUTED 4641e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46420: 4e90 jsr %a0@ <== NOT EXECUTED 46422: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 46424: 4eb9 0005 2200 jsr 52200 <__errno> <== NOT EXECUTED 4642a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4642c: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 4642e: 2003 movel %d3,%d0 <== NOT EXECUTED 46430: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 46436: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 4643c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044998 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44998: 4e56 ffe0 linkw %fp,#-32 4499c: 202e 0008 movel %fp@(8),%d0 449a0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 449a4: 246e 000c moveal %fp@(12),%a2 449a8: 242e 0010 movel %fp@(16),%d2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 449ac: b0b9 0006 0124 cmpl 60124 ,%d0 449b2: 6400 00f0 bccw 44aa4 iop = rtems_libio_iop( fd ); 449b6: 2679 0006 1fa0 moveal 61fa0 ,%a3 449bc: ed88 lsll #6,%d0 449be: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 449c0: 202b 0014 movel %a3@(20),%d0 449c4: 0800 0008 btst #8,%d0 449c8: 6700 00da beqw 44aa4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 449cc: 0800 0001 btst #1,%d0 449d0: 6700 009c beqw 44a6e /* * Argument validation on IO vector */ if ( !iov ) 449d4: 4a8a tstl %a2 449d6: 6700 0096 beqw 44a6e rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 449da: 4a82 tstl %d2 449dc: 6f00 0090 blew 44a6e rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 449e0: 0c82 0000 0400 cmpil #1024,%d2 449e6: 6e00 0086 bgtw 44a6e rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 449ea: 206b 003c moveal %a3@(60),%a0 449ee: 2868 0008 moveal %a0@(8),%a4 449f2: 4a8c tstl %a4 449f4: 6700 00c8 beqw 44abe rtems_set_errno_and_return_minus_one( ENOTSUP ); 449f8: 204a moveal %a2,%a0 449fa: 93c9 subal %a1,%a1 449fc: 4281 clrl %d1 449fe: 7a01 moveq #1,%d5 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 44a00: 4a90 tstl %a0@ 44a02: 676a beqs 44a6e if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 44a04: 2828 0004 movel %a0@(4),%d4 44a08: 2601 movel %d1,%d3 44a0a: d684 addl %d4,%d3 if ( total < old ) 44a0c: b283 cmpl %d3,%d1 44a0e: 6e5e bgts 44a6e rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 44a10: 4a84 tstl %d4 44a12: 57c4 seq %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++ ) { 44a14: 2203 movel %d3,%d1 old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 44a16: 2605 movel %d5,%d3 * 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++ ) { 44a18: 5289 addql #1,%a1 44a1a: 5088 addql #8,%a0 old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 44a1c: c684 andl %d4,%d3 44a1e: 1a03 moveb %d3,%d5 * 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++ ) { 44a20: b3c2 cmpal %d2,%a1 44a22: 6ddc blts 44a00 <== 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 ) { 44a24: 4a03 tstb %d3 <== NOT EXECUTED 44a26: 6660 bnes 44a88 <== NOT EXECUTED 44a28: 588a addql #4,%a2 <== NOT EXECUTED 44a2a: 4283 clrl %d3 <== NOT EXECUTED 44a2c: 4284 clrl %d4 <== 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 ); 44a2e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a30: 5283 addql #1,%d3 <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 44a32: 2f2a fffc movel %a2@(-4),%sp@- <== NOT EXECUTED 44a36: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44a38: 4e94 jsr %a4@ <== NOT EXECUTED if ( bytes < 0 ) 44a3a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44a3e: 4a80 tstl %d0 <== NOT EXECUTED 44a40: 6d54 blts 44a96 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 44a42: 6716 beqs 44a5a <== NOT EXECUTED iop->offset += bytes; total += bytes; 44a44: d880 addl %d0,%d4 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 44a46: 2c00 movel %d0,%d6 <== NOT EXECUTED 44a48: 5bc5 smi %d5 <== NOT EXECUTED 44a4a: 49c5 extbl %d5 <== NOT EXECUTED 44a4c: ddab 0010 addl %d6,%a3@(16) <== NOT EXECUTED 44a50: 222b 000c movel %a3@(12),%d1 <== NOT EXECUTED 44a54: d385 addxl %d5,%d1 <== NOT EXECUTED 44a56: 2741 000c movel %d1,%a3@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 44a5a: b092 cmpl %a2@,%d0 <== NOT EXECUTED 44a5c: 661e bnes 44a7c <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a5e: 508a addql #8,%a2 <== NOT EXECUTED 44a60: b682 cmpl %d2,%d3 <== NOT EXECUTED 44a62: 6c18 bges 44a7c <== NOT EXECUTED 44a64: 206b 003c moveal %a3@(60),%a0 <== NOT EXECUTED 44a68: 2868 0008 moveal %a0@(8),%a4 <== NOT EXECUTED 44a6c: 60c0 bras 44a2e <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 44a6e: 4eb9 0005 0014 jsr 50014 <__errno> 44a74: 78ff moveq #-1,%d4 44a76: 2040 moveal %d0,%a0 44a78: 7016 moveq #22,%d0 44a7a: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 44a7c: 2004 movel %d4,%d0 44a7e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a84: 4e5e unlk %fp 44a86: 4e75 rts /* * 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 ) { 44a88: 4284 clrl %d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a8a: 2004 movel %d4,%d0 <== NOT EXECUTED 44a8c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44a92: 4e5e unlk %fp <== NOT EXECUTED 44a94: 4e75 rts <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a96: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a98: 2004 movel %d4,%d0 <== NOT EXECUTED 44a9a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44aa0: 4e5e unlk %fp <== NOT EXECUTED 44aa2: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 44aa4: 4eb9 0005 0014 jsr 50014 <__errno> <== NOT EXECUTED 44aaa: 78ff moveq #-1,%d4 <== NOT EXECUTED 44aac: 7209 moveq #9,%d1 <== NOT EXECUTED 44aae: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44ab0: 2004 movel %d4,%d0 <== NOT EXECUTED 44ab2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 44ab8: 2081 movel %d1,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44aba: 4e5e unlk %fp <== NOT EXECUTED 44abc: 4e75 rts <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 44abe: 4eb9 0005 0014 jsr 50014 <__errno> <== NOT EXECUTED 44ac4: 78ff moveq #-1,%d4 <== NOT EXECUTED 44ac6: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44ac8: 2004 movel %d4,%d0 <== NOT EXECUTED 44aca: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 44ad0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44ad6: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0005c5b8 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5c5b8: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 5c5ba: 4e56 fff0 linkw %fp,#-16 5c5be: 52b9 0005 fcc8 addql #1,5fcc8 5c5c4: 48d7 001c moveml %d2-%d4,%sp@ 5c5c8: 242e 0008 movel %fp@(8),%d2 5c5cc: 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())) { 5c5d0: b0b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d0 5c5d6: 677a beqs 5c652 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 5c5d8: 4a82 tstl %d2 5c5da: 6700 00de beqw 5c6ba return malloc( size ); if ( !size ) { 5c5de: 4a83 tstl %d3 5c5e0: 673e beqs 5c620 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 5c5e2: 486e fffc pea %fp@(-4) 5c5e6: 2f02 movel %d2,%sp@- 5c5e8: 2f39 0005 e600 movel 5e600 ,%sp@- 5c5ee: 4eb9 0005 c7a0 jsr 5c7a0 <_Protected_heap_Get_block_size> 5c5f4: 4fef 000c lea %sp@(12),%sp 5c5f8: 4a00 tstb %d0 5c5fa: 673c beqs 5c638 #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 ) ) { 5c5fc: 2f03 movel %d3,%sp@- 5c5fe: 2f02 movel %d2,%sp@- 5c600: 2f39 0005 e600 movel 5e600 ,%sp@- 5c606: 4eb9 0005 c7dc jsr 5c7dc <_Protected_heap_Resize_block> 5c60c: 4fef 000c lea %sp@(12),%sp 5c610: 4a00 tstb %d0 5c612: 6754 beqs 5c668 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5c614: 2002 movel %d2,%d0 5c616: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5c61c: 4e5e unlk %fp 5c61e: 4e75 rts */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 5c620: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c622: 4282 clrl %d2 <== NOT EXECUTED 5c624: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED return (void *) 0; 5c62a: 588f addql #4,%sp <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5c62c: 2002 movel %d2,%d0 <== NOT EXECUTED 5c62e: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5c634: 4e5e unlk %fp <== NOT EXECUTED 5c636: 4e75 rts <== NOT EXECUTED free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 5c638: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 5c63e: 4282 clrl %d2 5c640: 2040 moveal %d0,%a0 5c642: 7016 moveq #22,%d0 5c644: 2080 movel %d0,%a0@ memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5c646: 2002 movel %d2,%d0 5c648: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5c64e: 4e5e unlk %fp 5c650: 4e75 rts /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 5c652: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 5c658: 6752 beqs 5c6ac <== ALWAYS TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5c65a: 4282 clrl %d2 } 5c65c: 2002 movel %d2,%d0 5c65e: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5c664: 4e5e unlk %fp 5c666: 4e75 rts * 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 ); 5c668: 2f03 movel %d3,%sp@- 5c66a: 4eb9 0004 3108 jsr 43108 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5c670: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 5c672: 53b9 0005 fcbc subql #1,5fcbc * 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 ); 5c678: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5c67a: 67de beqs 5c65a return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 5c67c: 202e fffc movel %fp@(-4),%d0 5c680: b083 cmpl %d3,%d0 5c682: 6402 bccs 5c686 <== NEVER TAKEN 5c684: 2600 movel %d0,%d3 5c686: 2f03 movel %d3,%sp@- 5c688: 2f02 movel %d2,%sp@- 5c68a: 2f04 movel %d4,%sp@- 5c68c: 4eb9 0004 f9d8 jsr 4f9d8 free( ptr ); 5c692: 2f02 movel %d2,%sp@- 5c694: 2404 movel %d4,%d2 5c696: 4eb9 0004 2ddc jsr 42ddc return new_area; 5c69c: 4fef 0010 lea %sp@(16),%sp } 5c6a0: 2002 movel %d2,%d0 5c6a2: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5c6a8: 4e5e unlk %fp 5c6aa: 4e75 rts if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 5c6ac: 2039 0005 fe96 movel 5fe96 <_ISR_Nest_level>,%d0 5c6b2: 6700 ff24 beqw 5c5d8 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5c6b6: 4282 clrl %d2 <== NOT EXECUTED 5c6b8: 60a2 bras 5c65c <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 5c6ba: 2f03 movel %d3,%sp@- 5c6bc: 4eb9 0004 3108 jsr 43108 5c6c2: 588f addql #4,%sp 5c6c4: 2400 movel %d0,%d2 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5c6c6: 2002 movel %d2,%d0 5c6c8: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5c6ce: 4e5e unlk %fp ... =============================================================================== 0004726c : #include int rmdir( const char *pathname ) { 4726c: 4e56 ffc0 linkw %fp,#-64 47270: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47274: 242e 0008 movel %fp@(8),%d2 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 47278: 2f02 movel %d2,%sp@- 4727a: 4eb9 0004 5674 jsr 45674 if ( parentpathlen == 0 ) 47280: 588f addql #4,%sp 47282: 4a80 tstl %d0 47284: 6600 012e bnew 473b4 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 47288: 45ee ffe8 lea %fp@(-24),%a2 4728c: 4283 clrl %d3 4728e: 2f0a movel %a2,%sp@- 47290: 486e fffc pea %fp@(-4) 47294: 4204 clrb %d4 47296: 2f02 movel %d2,%sp@- 47298: 4eb9 0004 756c jsr 4756c 4729e: 4fef 000c lea %sp@(12),%sp /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 472a2: 2d52 ffd4 movel %a2@,%fp@(-44) name = pathname + parentpathlen; 472a6: d682 addl %d2,%d3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 472a8: 47f9 0005 58c8 lea 558c8 ,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 472ae: 240e movel %fp,%d2 472b0: 0682 ffff ffd4 addil #-44,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 472b6: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40) 472bc: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36) 472c2: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32) 472c8: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 472ce: 2f03 movel %d3,%sp@- 472d0: 4e93 jsr %a3@ 472d2: 2e80 movel %d0,%sp@ 472d4: 2f03 movel %d3,%sp@- 472d6: 4eb9 0004 5620 jsr 45620 472dc: d680 addl %d0,%d3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 472de: 2f03 movel %d3,%sp@- 472e0: 4e93 jsr %a3@ 472e2: 4297 clrl %sp@ 472e4: 2f02 movel %d2,%sp@- 472e6: 42a7 clrl %sp@- 472e8: 2f00 movel %d0,%sp@- 472ea: 2f03 movel %d3,%sp@- 472ec: 4eb9 0004 56ba jsr 456ba 0, &loc, false ); if ( result != 0 ) { 472f2: 4fef 001c lea %sp@(28),%sp 472f6: 4a80 tstl %d0 472f8: 6600 00ee bnew 473e8 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 472fc: 226e ffe0 moveal %fp@(-32),%a1 47300: 2069 0010 moveal %a1@(16),%a0 47304: 4a88 tstl %a0 47306: 6700 0154 beqw 4745c 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 ){ 4730a: 2f02 movel %d2,%sp@- 4730c: 4e90 jsr %a0@ 4730e: 588f addql #4,%sp 47310: 7201 moveq #1,%d1 47312: b280 cmpl %d0,%d1 47314: 6654 bnes 4736a /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 47316: 206e ffdc moveal %fp@(-36),%a0 4731a: 2068 0034 moveal %a0@(52),%a0 4731e: 4a88 tstl %a0 47320: 6700 00ee beqw 47410 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 47324: 2f02 movel %d2,%sp@- 47326: 2f0a movel %a2,%sp@- 47328: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4732a: 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 ); 4732e: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 47330: 508f addql #8,%sp 47332: 4a88 tstl %a0 47334: 670e beqs 47344 <== NEVER TAKEN 47336: 2068 001c moveal %a0@(28),%a0 4733a: 4a88 tstl %a0 4733c: 6706 beqs 47344 <== NEVER TAKEN 4733e: 2f02 movel %d2,%sp@- 47340: 4e90 jsr %a0@ 47342: 588f addql #4,%sp if ( free_parentloc ) 47344: 4a04 tstb %d4 47346: 6716 beqs 4735e rtems_filesystem_freenode( &parentloc ); 47348: 206e fff4 moveal %fp@(-12),%a0 4734c: 4a88 tstl %a0 4734e: 670e beqs 4735e <== NEVER TAKEN 47350: 2068 001c moveal %a0@(28),%a0 47354: 4a88 tstl %a0 47356: 6706 beqs 4735e <== NEVER TAKEN 47358: 2f0a movel %a2,%sp@- 4735a: 4e90 jsr %a0@ 4735c: 588f addql #4,%sp return result; } 4735e: 2003 movel %d3,%d0 47360: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 47366: 4e5e unlk %fp 47368: 4e75 rts rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 4736a: 206e ffe0 moveal %fp@(-32),%a0 4736e: 4a88 tstl %a0 47370: 670e beqs 47380 <== NEVER TAKEN 47372: 2068 001c moveal %a0@(28),%a0 47376: 4a88 tstl %a0 47378: 6706 beqs 47380 <== NEVER TAKEN 4737a: 2f02 movel %d2,%sp@- 4737c: 4e90 jsr %a0@ 4737e: 588f addql #4,%sp if ( free_parentloc ) 47380: 4a04 tstb %d4 47382: 6716 beqs 4739a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 47384: 206e fff4 moveal %fp@(-12),%a0 47388: 4a88 tstl %a0 4738a: 670e beqs 4739a <== NEVER TAKEN 4738c: 2068 001c moveal %a0@(28),%a0 47390: 4a88 tstl %a0 47392: 6706 beqs 4739a <== NEVER TAKEN 47394: 2f0a movel %a2,%sp@- 47396: 4e90 jsr %a0@ 47398: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 4739a: 4eb9 0005 2860 jsr 52860 <__errno> 473a0: 76ff moveq #-1,%d3 473a2: 2040 moveal %d0,%a0 473a4: 7014 moveq #20,%d0 473a6: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 473a8: 2003 movel %d3,%d0 473aa: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 473b0: 4e5e unlk %fp 473b2: 4e75 rts parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 473b4: 42a7 clrl %sp@- 473b6: 45ee ffe8 lea %fp@(-24),%a2 473ba: 2600 movel %d0,%d3 473bc: 2f0a movel %a2,%sp@- 473be: 4878 0002 pea 2 473c2: 2f00 movel %d0,%sp@- 473c4: 2f02 movel %d2,%sp@- 473c6: 4eb9 0004 57c4 jsr 457c4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 473cc: 4fef 0014 lea %sp@(20),%sp 473d0: 4a80 tstl %d0 473d2: 6606 bnes 473da <== NEVER TAKEN 473d4: 7801 moveq #1,%d4 473d6: 6000 feca braw 472a2 result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 473da: 76ff moveq #-1,%d3 return result; } 473dc: 2003 movel %d3,%d0 473de: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 473e4: 4e5e unlk %fp 473e6: 4e75 rts name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 473e8: 4a04 tstb %d4 473ea: 67ee beqs 473da <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 473ec: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 473f0: 4a88 tstl %a0 <== NOT EXECUTED 473f2: 67e6 beqs 473da <== NOT EXECUTED 473f4: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 473f8: 67e0 beqs 473da <== NOT EXECUTED 473fa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 473fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 473fe: 76ff moveq #-1,%d3 <== NOT EXECUTED 47400: 4e90 jsr %a0@ <== NOT EXECUTED 47402: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 47404: 2003 movel %d3,%d0 <== NOT EXECUTED 47406: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4740c: 4e5e unlk %fp <== NOT EXECUTED 4740e: 4e75 rts <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 47410: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 47414: 4a88 tstl %a0 <== NOT EXECUTED 47416: 670e beqs 47426 <== NOT EXECUTED 47418: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4741c: 4a88 tstl %a0 <== NOT EXECUTED 4741e: 6706 beqs 47426 <== NOT EXECUTED 47420: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47422: 4e90 jsr %a0@ <== NOT EXECUTED 47424: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 47426: 4a04 tstb %d4 <== NOT EXECUTED 47428: 6716 beqs 47440 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4742a: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4742e: 4a88 tstl %a0 <== NOT EXECUTED 47430: 670e beqs 47440 <== NOT EXECUTED 47432: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47436: 4a88 tstl %a0 <== NOT EXECUTED 47438: 6706 beqs 47440 <== NOT EXECUTED 4743a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4743c: 4e90 jsr %a0@ <== NOT EXECUTED 4743e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 47440: 4eb9 0005 2860 jsr 52860 <__errno> <== NOT EXECUTED 47446: 76ff moveq #-1,%d3 <== NOT EXECUTED 47448: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4744a: 2003 movel %d3,%d0 <== NOT EXECUTED 4744c: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 47452: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 47458: 4e5e unlk %fp <== NOT EXECUTED 4745a: 4e75 rts <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 4745c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 47460: 4a88 tstl %a0 <== NOT EXECUTED 47462: 67c2 beqs 47426 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 47464: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47466: 4e90 jsr %a0@ <== NOT EXECUTED 47468: 588f addql #4,%sp <== NOT EXECUTED 4746a: 60ba bras 47426 <== NOT EXECUTED =============================================================================== 0004e94c : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4e94c: 4e56 ffe8 linkw %fp,#-24 4e950: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4e954: 2c2e 0008 movel %fp@(8),%d6 4e958: 4283 clrl %d3 4e95a: 4285 clrl %d5 4e95c: 7401 moveq #1,%d2 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4e95e: 45f9 0004 e998 lea 4e998 ,%a2 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4e964: 282e 000c movel %fp@(12),%d4 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) 4e968: 2002 movel %d2,%d0 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4e96a: 5283 addql #1,%d3 if (b & remote_value) 4e96c: c084 andl %d4,%d0 4e96e: 6614 bnes 4e984 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4e970: 7020 moveq #32,%d0 4e972: d482 addl %d2,%d2 4e974: b083 cmpl %d3,%d0 4e976: 66f0 bnes 4e968 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 4e978: 2005 movel %d5,%d0 4e97a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4e980: 4e5e unlk %fp 4e982: 4e75 rts uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4e984: 2f02 movel %d2,%sp@- ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4e986: d482 addl %d2,%d2 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4e988: 2f06 movel %d6,%sp@- 4e98a: 4e92 jsr %a2@ 4e98c: 508f addql #8,%sp 4e98e: 8a80 orl %d0,%d5 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4e990: 7020 moveq #32,%d0 4e992: b083 cmpl %d3,%d0 4e994: 66d2 bnes 4e968 <== ALWAYS TAKEN 4e996: 60e0 bras 4e978 <== NOT EXECUTED =============================================================================== 0004e9bc : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4e9bc: 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; } 4e9c0: 203c 0005 e768 movel #386920,%d0 <== NOT EXECUTED 4e9c6: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004b9dc : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4b9dc: 4e56 0000 linkw %fp,#0 4b9e0: 2f02 movel %d2,%sp@- 4b9e2: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4b9e6: 2f02 movel %d2,%sp@- 4b9e8: 2f2e 0008 movel %fp@(8),%sp@- 4b9ec: 4eb9 0004 ba14 jsr 4ba14 if (nap) 4b9f2: 508f addql #8,%sp 4b9f4: 4a80 tstl %d0 4b9f6: 670c beqs 4ba04 <== NEVER TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } 4b9f8: 2040 moveal %d0,%a0 4b9fa: 242e fffc movel %fp@(-4),%d2 4b9fe: 4e5e unlk %fp 4ba00: 2010 movel %a0@,%d0 4ba02: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 4ba04: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 4ba08: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4ba0c: 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); 4ba0e: 4ef9 0004 e9bc jmp 4e9bc <== NOT EXECUTED =============================================================================== 0004ba14 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4ba14: 4e56 0000 linkw %fp,#0 4ba18: 2f0a movel %a2,%sp@- 4ba1a: 246e 0008 moveal %fp@(8),%a2 4ba1e: 2f02 movel %d2,%sp@- 4ba20: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4ba24: 2012 movel %a2@,%d0 4ba26: 6742 beqs 4ba6a <== NEVER TAKEN 4ba28: 4879 0005 d9b6 pea 5d9b6 4ba2e: 2f00 movel %d0,%sp@- 4ba30: 4eb9 0005 00c0 jsr 500c0 4ba36: 508f addql #8,%sp 4ba38: 4a80 tstl %d0 4ba3a: 662a bnes 4ba66 <== ALWAYS TAKEN default_ap = ap++; 4ba3c: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4ba40: 4a90 tstl %a0@ <== NOT EXECUTED 4ba42: 6714 beqs 4ba58 <== NOT EXECUTED 4ba44: 200a movel %a2,%d0 <== NOT EXECUTED 4ba46: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->local_value == local_value) 4ba48: b4aa 0004 cmpl %a2@(4),%d2 4ba4c: 670a beqs 4ba58 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4ba4e: 45ea 000c lea %a2@(12),%a2 4ba52: 4a92 tstl %a2@ 4ba54: 66f2 bnes 4ba48 4ba56: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 4ba58: 200a movel %a2,%d0 4ba5a: 242e fff8 movel %fp@(-8),%d2 4ba5e: 246e fffc moveal %fp@(-4),%a2 4ba62: 4e5e unlk %fp 4ba64: 4e75 rts uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4ba66: 4280 clrl %d0 4ba68: 60de bras 4ba48 4ba6a: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 4ba6c: 200a movel %a2,%d0 <== NOT EXECUTED 4ba6e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4ba72: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4ba76: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004e9cc : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4e9cc: 4e56 0000 linkw %fp,#0 4e9d0: 2f0a movel %a2,%sp@- 4e9d2: 246e 0008 moveal %fp@(8),%a2 4e9d6: 2f02 movel %d2,%sp@- 4e9d8: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4e9dc: 2012 movel %a2@,%d0 4e9de: 6742 beqs 4ea22 <== NEVER TAKEN 4e9e0: 4879 0005 d9b6 pea 5d9b6 4e9e6: 2f00 movel %d0,%sp@- 4e9e8: 4eb9 0005 00c0 jsr 500c0 4e9ee: 508f addql #8,%sp 4e9f0: 4a80 tstl %d0 4e9f2: 662a bnes 4ea1e <== ALWAYS TAKEN default_ap = ap++; 4e9f4: 41ea 000c lea %a2@(12),%a0 for ( ; ap->name; ap++) 4e9f8: 4a90 tstl %a0@ <== NOT EXECUTED 4e9fa: 6714 beqs 4ea10 <== NOT EXECUTED 4e9fc: 200a movel %a2,%d0 <== NOT EXECUTED 4e9fe: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->remote_value == remote_value) 4ea00: b4aa 0008 cmpl %a2@(8),%d2 4ea04: 670a beqs 4ea10 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4ea06: 45ea 000c lea %a2@(12),%a2 4ea0a: 4a92 tstl %a2@ 4ea0c: 66f2 bnes 4ea00 4ea0e: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4ea10: 200a movel %a2,%d0 4ea12: 242e fff8 movel %fp@(-8),%d2 4ea16: 246e fffc moveal %fp@(-4),%a2 4ea1a: 4e5e unlk %fp 4ea1c: 4e75 rts uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4ea1e: 4280 clrl %d0 4ea20: 60de bras 4ea00 4ea22: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 4ea24: 200a movel %a2,%d0 <== NOT EXECUTED 4ea26: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4ea2a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4ea2e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004f164 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4f164: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4f168: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4f16c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4f170: 4eb9 0004 ba14 jsr 4ba14 <== NOT EXECUTED if (nap) 4f176: 508f addql #8,%sp <== NOT EXECUTED 4f178: 4a80 tstl %d0 <== NOT EXECUTED 4f17a: 6706 beqs 4f182 <== NOT EXECUTED return nap->remote_value; 4f17c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f17e: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4f182: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004c1d0 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4c1d0: 4e56 ffe8 linkw %fp,#-24 4c1d4: 202e 0010 movel %fp@(16),%d0 4c1d8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4c1dc: 242e 0008 movel %fp@(8),%d2 4c1e0: 262e 000c movel %fp@(12),%d3 4c1e4: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4c1e8: 4a82 tstl %d2 4c1ea: 677a beqs 4c266 return RTEMS_INVALID_NAME; if ( !id ) 4c1ec: 4a8a tstl %a2 4c1ee: 6700 00ce beqw 4c2be return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4c1f2: 0803 0004 btst #4,%d3 4c1f6: 677a beqs 4c272 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4c1f8: 4a80 tstl %d0 4c1fa: 6700 00b4 beqw 4c2b0 4c1fe: 2239 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d1 4c204: 5281 addql #1,%d1 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4c206: 42ae fff8 clrl %fp@(-8) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4c20a: 2d40 fffc movel %d0,%fp@(-4) 4c20e: 23c1 0005 fdfc movel %d1,5fdfc <_Thread_Dispatch_disable_level> * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 4c214: 4879 0005 ffce pea 5ffce <_Barrier_Information> 4c21a: 4eb9 0004 7b0c jsr 47b0c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4c220: 588f addql #4,%sp 4c222: 2640 moveal %d0,%a3 4c224: 4a80 tstl %d0 4c226: 6776 beqs 4c29e <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4c228: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4c22c: 486e fff8 pea %fp@(-8) 4c230: 486b 0014 pea %a3@(20) 4c234: 4eb9 0004 c8f8 jsr 4c8f8 <_CORE_barrier_Initialize> 4c23a: 202b 0008 movel %a3@(8),%d0 4c23e: 4281 clrl %d1 4c240: 2079 0005 ffe6 moveal 5ffe6 <_Barrier_Information+0x18>,%a0 4c246: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4c248: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4c24c: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4c250: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4c252: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4c258: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4c25a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4c25c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c262: 4e5e unlk %fp 4c264: 4e75 rts ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4c266: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4c268: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c26e: 4e5e unlk %fp 4c270: 4e75 rts if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4c272: 7201 moveq #1,%d1 4c274: 2d41 fff8 movel %d1,%fp@(-8) 4c278: 2239 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d1 4c27e: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4c280: 2d40 fffc movel %d0,%fp@(-4) 4c284: 23c1 0005 fdfc movel %d1,5fdfc <_Thread_Dispatch_disable_level> 4c28a: 4879 0005 ffce pea 5ffce <_Barrier_Information> 4c290: 4eb9 0004 7b0c jsr 47b0c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4c296: 588f addql #4,%sp 4c298: 2640 moveal %d0,%a3 4c29a: 4a80 tstl %d0 4c29c: 668a bnes 4c228 _Thread_Enable_dispatch(); 4c29e: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> 4c2a4: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4c2a6: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c2ac: 4e5e unlk %fp 4c2ae: 4e75 rts return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4c2b0: 103c 000a moveb #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4c2b4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c2ba: 4e5e unlk %fp 4c2bc: 4e75 rts CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4c2be: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4c2c0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c2c6: 4e5e unlk %fp ... =============================================================================== 00042708 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42708: 4e56 ffec linkw %fp,#-20 4270c: 202e 0008 movel %fp@(8),%d0 42710: 48d7 043c moveml %d2-%d5/%a2,%sp@ 42714: 246e 000c moveal %fp@(12),%a2 const char *p; if ( !name ) 42718: 4a80 tstl %d0 4271a: 660e bnes 4272a int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 4272e: 4aae 0010 tstl %fp@(16) 42732: 67e8 beqs 4271c return NULL; value[0] = '\0'; 42734: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 42736: 2f00 movel %d0,%sp@- 42738: 4eb9 0004 2798 jsr 42798 if ( !p ) 4273e: 588f addql #4,%sp if ( !length ) return NULL; value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); 42740: 2240 moveal %d0,%a1 if ( !p ) 42742: 4a80 tstl %d0 42744: 67d6 beqs 4271c int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN 4274a: 202e 0010 movel %fp@(16),%d0 4274e: 5380 subql #1,%d0 42750: 67cc beqs 4271e <== NEVER TAKEN 42752: 91c8 subal %a0,%a0 42754: 4281 clrl %d1 42756: 4284 clrl %d4 if ( *p == '\"' ) { 42758: 7a22 moveq #34,%d5 4275a: 1602 moveb %d2,%d3 4275c: 49c3 extbl %d3 4275e: ba83 cmpl %d3,%d5 42760: 6730 beqs 42792 <== NEVER TAKEN quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42762: 0804 0000 btst #0,%d4 42766: 6606 bnes 4276e <== NEVER TAKEN 42768: 7a20 moveq #32,%d5 4276a: ba83 cmpl %d3,%d5 4276c: 67b0 beqs 4271e <== NEVER TAKEN break; value[i++] = *p++; 4276e: 5281 addql #1,%d1 42770: 1582 8800 moveb %d2,%a2@(00000000,%a0:l) value[i] = '\0'; 42774: 4202 clrb %d2 for (i=0 ; *p && i 42782: b081 cmpl %d1,%d0 42784: 62d2 bhis 42758 <== ALWAYS TAKEN return NULL; copy_string( p, value, length ); return value; } 42786: 200a movel %a2,%d0 <== NOT EXECUTED 42788: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 4278e: 4e5e unlk %fp <== NOT EXECUTED 42790: 4e75 rts <== NOT EXECUTED const char *p = start; quotes=0; for (i=0 ; *p && i<== NOT EXECUTED ... =============================================================================== 000427c0 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427c0: 4e56 fff4 linkw %fp,#-12 427c4: 48d7 001c moveml %d2-%d4,%sp@ const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427c8: 2f2e 0010 movel %fp@(16),%sp@- const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427cc: 242e 000c movel %fp@(12),%d2 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427d0: 2f02 movel %d2,%sp@- const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427d2: 282e 0008 movel %fp@(8),%d4 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427d6: 2f04 movel %d4,%sp@- 427d8: 4eb9 0004 2708 jsr 42708 if ( !p ) 427de: 4fef 000c lea %sp@(12),%sp { const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427e2: 2600 movel %d0,%d3 if ( !p ) 427e4: 660e bnes 427f4 <== ALWAYS TAKEN *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 427e6: 4282 clrl %d2 <== NOT EXECUTED } 427e8: 2002 movel %d2,%d0 <== NOT EXECUTED 427ea: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 427f0: 4e5e unlk %fp <== NOT EXECUTED 427f2: 4e75 rts <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 427f4: 2f04 movel %d4,%sp@- 427f6: 4eb9 0005 0c00 jsr 50c00 427fc: 588f addql #4,%sp 427fe: 2043 moveal %d3,%a0 42800: d1c0 addal %d0,%a0 if ( *rhs != '=' ) 42802: 723d moveq #61,%d1 42804: 1010 moveb %a0@,%d0 42806: 49c0 extbl %d0 42808: b280 cmpl %d0,%d1 4280a: 66da bnes 427e6 <== NEVER TAKEN return NULL; rhs++; 4280c: 5288 addql #1,%a0 if ( *rhs == '\"' ) 4280e: 7622 moveq #34,%d3 42810: 1010 moveb %a0@,%d0 42812: 1200 moveb %d0,%d1 42814: 49c1 extbl %d1 42816: b681 cmpl %d1,%d3 42818: 672a beqs 42844 <== NEVER TAKEN rhs++; for ( d=value ; *rhs ; ) 4281a: 4a00 tstb %d0 4281c: 672c beqs 4284a <== ALWAYS TAKEN 4281e: 2242 moveal %d2,%a1 <== NOT EXECUTED *d++ = *rhs++; 42820: 5288 addql #1,%a0 <== NOT EXECUTED 42822: 12c0 moveb %d0,%a1@+ <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42824: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42826: 66f8 bnes 42820 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 42828: 2049 moveal %a1,%a0 4282a: 7222 moveq #34,%d1 4282c: 1020 moveb %a0@-,%d0 4282e: 49c0 extbl %d0 42830: b280 cmpl %d0,%d1 42832: 6702 beqs 42836 <== NEVER TAKEN 42834: 2049 moveal %a1,%a0 d--; *d = '\0'; return value; } 42836: 2002 movel %d2,%d0 rhs++; for ( d=value ; *rhs ; ) *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; 42838: 4210 clrb %a0@ return value; } 4283a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 42840: 4e5e unlk %fp 42842: 4e75 rts if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 42844: 5288 addql #1,%a0 <== NOT EXECUTED 42846: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42848: 60d0 bras 4281a <== NOT EXECUTED for ( d=value ; *rhs ; ) 4284a: 2242 moveal %d2,%a1 4284c: 60da bras 42828 ... =============================================================================== 000431b4 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 431b4: 4e56 ff9c linkw %fp,#-100 431b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 431bc: 262e 0008 movel %fp@(8),%d3 431c0: 286e 000c moveal %fp@(12),%a4 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 431c4: 4a8c tstl %a4 431c6: 6700 0140 beqw 43308 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 431ca: 486e fff0 pea %fp@(-16) } } } #endif (*print)( 431ce: 41f9 0006 29e8 lea 629e8 <_Objects_Information_table+0x4>,%a0 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 431d4: 280e movel %fp,%d4 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 431d6: 2a0e movel %fp,%d5 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 431d8: 0684 ffff ffcb addil #-53,%d4 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 431de: 0685 ffff ffe0 addil #-32,%d5 } } } #endif (*print)( 431e4: 2d48 ffc4 movel %a0,%fp@(-60) * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 431e8: 4eb9 0004 8ed8 jsr 48ed8 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 431ee: 486e ffe8 pea %fp@(-24) 431f2: 486e fff0 pea %fp@(-16) 431f6: 4879 0006 2c36 pea 62c36 431fc: 4eb9 0004 b2d8 jsr 4b2d8 <_Timespec_Subtract> } } } #endif (*print)( 43202: 4879 0005 f4de pea 5f4de 43208: 2f03 movel %d3,%sp@- 4320a: 4e94 jsr %a4@ /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( 4320c: 4fef 0018 lea %sp@(24),%sp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 43210: 226e ffc4 moveal %fp@(-60),%a1 43214: 2051 moveal %a1@,%a0 43216: 4a88 tstl %a0 43218: 6700 00ba beqw 432d4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 4321c: 2668 0004 moveal %a0@(4),%a3 if ( information ) { 43220: 4a8b tstl %a3 43222: 6700 00b0 beqw 432d4 for ( i=1 ; i <= information->maximum ; i++ ) { 43226: 4a6b 000e tstw %a3@(14) 4322a: 6700 00a8 beqw 432d4 4322e: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 43230: 2c3c 0004 7ac0 movel #293568,%d6 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 43236: 4bf9 0004 b1f0 lea 4b1f0 <_Timespec_Divide>,%a5 if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 4323c: 206b 0018 moveal %a3@(24),%a0 43240: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 43244: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 43246: 4a8a tstl %a2 43248: 677e beqs 432c8 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 4324a: 2f04 movel %d4,%sp@- 4324c: 4878 000d pea d 43250: 2046 moveal %d6,%a0 43252: 2f2a 0008 movel %a2@(8),%sp@- 43256: 4e90 jsr %a0@ (*print)( 43258: 2f04 movel %d4,%sp@- 4325a: 2f2a 0008 movel %a2@(8),%sp@- 4325e: 4879 0005 f650 pea 5f650 43264: 2f03 movel %d3,%sp@- 43266: 4e94 jsr %a4@ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 43268: 2079 0006 2ae6 moveal 62ae6 <_Thread_Executing>,%a0 4326e: 4fef 001c lea %sp@(28),%sp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 43272: 202a 0082 movel %a2@(130),%d0 43276: 222a 0086 movel %a2@(134),%d1 4327a: 2d40 ffe0 movel %d0,%fp@(-32) 4327e: 2d41 ffe4 movel %d1,%fp@(-28) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 43282: 246a 0008 moveal %a2@(8),%a2 43286: b5e8 0008 cmpal %a0@(8),%a2 4328a: 6700 0086 beqw 43312 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 4328e: 486e fff8 pea %fp@(-8) /* * Print the information */ (*print)( context, 43292: 2e3c 0000 03e8 movel #1000,%d7 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 43298: 486e fffc pea %fp@(-4) 4329c: 486e ffe8 pea %fp@(-24) 432a0: 2f05 movel %d5,%sp@- 432a2: 4e95 jsr %a5@ /* * Print the information */ (*print)( context, 432a4: 2f2e fff8 movel %fp@(-8),%sp@- 432a8: 202e ffe4 movel %fp@(-28),%d0 432ac: 2f2e fffc movel %fp@(-4),%sp@- 432b0: 4c47 0000 remul %d7,%d0,%d0 432b4: 2f00 movel %d0,%sp@- 432b6: 2f2e ffe0 movel %fp@(-32),%sp@- 432ba: 4879 0005 f663 pea 5f663 432c0: 2f03 movel %d3,%sp@- 432c2: 4e94 jsr %a4@ 432c4: 4fef 0028 lea %sp@(40),%sp api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 432c8: 4280 clrl %d0 432ca: 302b 000e movew %a3@(14),%d0 432ce: b480 cmpl %d0,%d2 432d0: 6300 ff6a blsw 4323c 432d4: 58ae ffc4 addql #4,%fp@(-60) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 432d8: 206e ffc4 moveal %fp@(-60),%a0 432dc: b1fc 0006 29f8 cmpal #403960,%a0 432e2: 6600 ff2c bnew 43210 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 432e6: 202e ffec movel %fp@(-20),%d0 432ea: 243c 0000 03e8 movel #1000,%d2 432f0: 4c42 0000 remul %d2,%d0,%d0 432f4: 2f00 movel %d0,%sp@- 432f6: 2f2e ffe8 movel %fp@(-24),%sp@- 432fa: 4879 0005 f67b pea 5f67b 43300: 2f03 movel %d3,%sp@- 43302: 4e94 jsr %a4@ 43304: 4fef 0010 lea %sp@(16),%sp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 43308: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 4330e: 4e5e unlk %fp 43310: 4e75 rts * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 43312: 486e ffd8 pea %fp@(-40) /* * Print the information */ (*print)( context, 43316: 2e3c 0000 03e8 movel #1000,%d7 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 4331c: 486e fff0 pea %fp@(-16) 43320: 4879 0006 2aee pea 62aee <_Thread_Time_of_last_context_switch> 43326: 4eb9 0004 b2d8 jsr 4b2d8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 4332c: 486e ffd8 pea %fp@(-40) 43330: 2f05 movel %d5,%sp@- 43332: 4eb9 0004 b1a8 jsr 4b1a8 <_Timespec_Add_to> 43338: 4fef 0014 lea %sp@(20),%sp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 4333c: 486e fff8 pea %fp@(-8) 43340: 486e fffc pea %fp@(-4) 43344: 486e ffe8 pea %fp@(-24) 43348: 2f05 movel %d5,%sp@- 4334a: 4e95 jsr %a5@ /* * Print the information */ (*print)( context, 4334c: 2f2e fff8 movel %fp@(-8),%sp@- 43350: 202e ffe4 movel %fp@(-28),%d0 43354: 2f2e fffc movel %fp@(-4),%sp@- 43358: 4c47 0000 remul %d7,%d0,%d0 4335c: 2f00 movel %d0,%sp@- 4335e: 2f2e ffe0 movel %fp@(-32),%sp@- 43362: 4879 0005 f663 pea 5f663 43368: 2f03 movel %d3,%sp@- 4336a: 4e94 jsr %a4@ 4336c: 4fef 0028 lea %sp@(40),%sp 43370: 6000 ff56 braw 432c8 =============================================================================== 0004f128 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4f128: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4f12c: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4f12e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4f132: 4879 0005 dc66 pea 5dc66 <== NOT EXECUTED 4f138: 4eb9 0004 f164 jsr 4f164 <== NOT EXECUTED 4f13e: 508f addql #8,%sp <== NOT EXECUTED 4f140: 2400 movel %d0,%d2 <== NOT EXECUTED 4f142: 660a bnes 4f14e <== NOT EXECUTED { errno = rc; return -1; } return -1; } 4f144: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4f148: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f14a: 4e5e unlk %fp <== NOT EXECUTED 4f14c: 4e75 rts <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4f14e: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4f154: 2040 moveal %d0,%a0 <== NOT EXECUTED return -1; } return -1; } 4f156: 70ff moveq #-1,%d0 <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4f158: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4f15a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4f15e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042b90 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 42b90: 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); 42b94: 486e 0010 pea %fp@(16) <== NOT EXECUTED 42b98: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42b9c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42ba0: 4eba fdda jsr %pc@(4297c ) <== NOT EXECUTED va_end(arglist); return chars_written; } 42ba4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042bfc : } int rtems_filesystem_dirname( const char *pathname ) { 42bfc: 4e56 fff4 linkw %fp,#-12 42c00: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42c04: 246e 0008 moveal %fp@(8),%a2 int len = strlen( pathname ); 42c08: 2f0a movel %a2,%sp@- 42c0a: 4eb9 0005 05e4 jsr 505e4 42c10: 588f addql #4,%sp 42c12: 2400 movel %d0,%d2 while ( len ) { 42c14: 6720 beqs 42c36 <== NEVER TAKEN 42c16: 47f9 0004 3d74 lea 43d74 ,%a3 42c1c: 45f2 08ff lea %a2@(ffffffff,%d0:l),%a2 len--; 42c20: 5382 subql #1,%d2 if ( rtems_filesystem_is_separator( pathname[len] ) ) 42c22: 1012 moveb %a2@,%d0 42c24: 538a subql #1,%a2 42c26: 49c0 extbl %d0 42c28: 2f00 movel %d0,%sp@- 42c2a: 4e93 jsr %a3@ 42c2c: 588f addql #4,%sp 42c2e: 4a80 tstl %d0 42c30: 6604 bnes 42c36 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 42c32: 4a82 tstl %d2 42c34: 66ea bnes 42c20 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 42c36: 2002 movel %d2,%d0 42c38: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 42c3e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042d4c : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42d4c: 4e56 fffc linkw %fp,#-4 42d50: 2f0a movel %a2,%sp@- 42d52: 246e 0008 moveal %fp@(8),%a2 42d56: 2f02 movel %d2,%sp@- 42d58: 242e 0014 movel %fp@(20),%d2 int i = 0; 42d5c: 42ae fffc clrl %fp@(-4) /* * Verify Input parameters. */ if ( !pathname ) 42d60: 4a8a tstl %a2 42d62: 675c beqs 42dc0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42d64: 4a82 tstl %d2 42d66: 673e beqs 42da6 <== NEVER TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42d68: 2f02 movel %d2,%sp@- 42d6a: 486e fffc pea %fp@(-4) 42d6e: 2f0a movel %a2,%sp@- 42d70: 4eb9 0004 3d00 jsr 43d00 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 42d76: 202e fffc movel %fp@(-4),%d0 42d7a: 2f2e 0018 movel %fp@(24),%sp@- 42d7e: 2f02 movel %d2,%sp@- 42d80: 2f2e 0010 movel %fp@(16),%sp@- 42d84: 222e 000c movel %fp@(12),%d1 42d88: 9280 subl %d0,%d1 42d8a: 2f01 movel %d1,%sp@- 42d8c: 4872 0800 pea %a2@(00000000,%d0:l) 42d90: 4eb9 0004 2c42 jsr 42c42 pathnamelen - i, flags, pathloc, follow_link ); } 42d96: 242e fff4 movel %fp@(-12),%d2 rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 42d9a: 4fef 0020 lea %sp@(32),%sp pathnamelen - i, flags, pathloc, follow_link ); } 42d9e: 246e fff8 moveal %fp@(-8),%a2 42da2: 4e5e unlk %fp 42da4: 4e75 rts if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 42da6: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42dac: 7405 moveq #5,%d2 <== NOT EXECUTED 42dae: 2040 moveal %d0,%a0 <== NOT EXECUTED 42db0: 70ff moveq #-1,%d0 <== NOT EXECUTED 42db2: 2082 movel %d2,%a0@ <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 42db4: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 42db8: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 42dbc: 4e5e unlk %fp <== NOT EXECUTED 42dbe: 4e75 rts <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42dc0: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 42dc6: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42dca: 2040 moveal %d0,%a0 <== NOT EXECUTED 42dcc: 720e moveq #14,%d1 <== NOT EXECUTED 42dce: 70ff moveq #-1,%d0 <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 42dd0: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 42dd4: 4e5e unlk %fp <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42dd6: 2081 movel %d1,%a0@ <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } ... =============================================================================== 00042c42 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42c42: 4e56 fff0 linkw %fp,#-16 42c46: 222e 0008 movel %fp@(8),%d1 42c4a: 48d7 041c moveml %d2-%d4/%a2,%sp@ 42c4e: 202e 000c movel %fp@(12),%d0 42c52: 242e 0010 movel %fp@(16),%d2 42c56: 246e 0014 moveal %fp@(20),%a2 42c5a: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 42c5e: 4a81 tstl %d1 42c60: 6700 00d0 beqw 42d32 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42c64: 4a8a tstl %a2 42c66: 6700 00b0 beqw 42d18 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 42c6a: 206a 000c moveal %a2@(12),%a0 42c6e: 2050 moveal %a0@,%a0 42c70: 4a88 tstl %a0 42c72: 6768 beqs 42cdc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 42c74: 2f0a movel %a2,%sp@- 42c76: 2f02 movel %d2,%sp@- 42c78: 2f00 movel %d0,%sp@- 42c7a: 2f01 movel %d1,%sp@- 42c7c: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42c7e: 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 ); 42c82: 2600 movel %d0,%d3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42c84: 661e bnes 42ca4 42c86: 4a84 tstl %d4 42c88: 671a beqs 42ca4 if ( !pathloc->ops->node_type_h ){ 42c8a: 226a 000c moveal %a2@(12),%a1 42c8e: 2069 0010 moveal %a1@(16),%a0 42c92: 4a88 tstl %a0 42c94: 6762 beqs 42cf8 <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 42c96: 2f0a movel %a2,%sp@- 42c98: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 42c9a: 588f addql #4,%sp 42c9c: 7201 moveq #1,%d1 42c9e: 5780 subql #3,%d0 42ca0: b280 cmpl %d0,%d1 42ca2: 640c bccs 42cb0 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42ca4: 2003 movel %d3,%d0 42ca6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42cac: 4e5e unlk %fp 42cae: 4e75 rts type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 42cb0: 206a 000c moveal %a2@(12),%a0 42cb4: 2268 0034 moveal %a0@(52),%a1 42cb8: 4a89 tstl %a1 42cba: 6712 beqs 42cce <== NEVER TAKEN * 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 ); 42cbc: 2d42 000c movel %d2,%fp@(12) 42cc0: 2d4a 0008 movel %a2,%fp@(8) } } return result; } 42cc4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42cca: 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 ); 42ccc: 4ed1 jmp %a1@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 42cce: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 42cd2: 6708 beqs 42cdc <== NOT EXECUTED 42cd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cd6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cd8: 4e90 jsr %a0@ <== NOT EXECUTED 42cda: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42cdc: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42ce2: 76ff moveq #-1,%d3 <== NOT EXECUTED 42ce4: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ce6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42cec: 2003 movel %d3,%d0 <== NOT EXECUTED 42cee: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42cf4: 4e5e unlk %fp <== NOT EXECUTED 42cf6: 4e75 rts <== NOT EXECUTED */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 42cf8: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42cfc: 4a88 tstl %a0 <== NOT EXECUTED 42cfe: 67dc beqs 42cdc <== NOT EXECUTED 42d00: 2f0a movel %a2,%sp@- <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 42d02: 76ff moveq #-1,%d3 <== NOT EXECUTED */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 42d04: 4e90 jsr %a0@ <== NOT EXECUTED 42d06: 588f addql #4,%sp <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 42d08: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42d0e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d10: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42d16: 60d4 bras 42cec <== NOT EXECUTED if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 42d18: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42d1e: 76ff moveq #-1,%d3 <== NOT EXECUTED 42d20: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d22: 7005 moveq #5,%d0 <== NOT EXECUTED 42d24: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42d26: 2003 movel %d3,%d0 <== NOT EXECUTED 42d28: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42d2e: 4e5e unlk %fp <== NOT EXECUTED 42d30: 4e75 rts <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42d32: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42d38: 76ff moveq #-1,%d3 <== NOT EXECUTED 42d3a: 720e moveq #14,%d1 <== NOT EXECUTED 42d3c: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42d3e: 2003 movel %d3,%d0 <== NOT EXECUTED 42d40: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42d46: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42d48: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c07a : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 4c07a: 4e56 fff8 linkw %fp,#-8 4c07e: 202e 0008 movel %fp@(8),%d0 find_arg fa = { .type = type, .mount_h = NULL }; 4c082: 42ae fffc clrl %fp@(-4) 4c086: 2d40 fff8 movel %d0,%fp@(-8) if ( type != NULL ) { 4c08a: 6714 beqs 4c0a0 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 4c08c: 486e fff8 pea %fp@(-8) 4c090: 487a fe42 pea %pc@(4bed4 ) 4c094: 4eb9 0004 bfd0 jsr 4bfd0 4c09a: 202e fffc movel %fp@(-4),%d0 4c09e: 508f addql #8,%sp } return fa.mount_h; } 4c0a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042814 : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42814: 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 ) { 42816: 4e56 ffe0 linkw %fp,#-32 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 4281a: 2079 0005 e710 moveal 5e710 ,%a0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 42820: 48d7 1c00 moveml %a2-%a4,%sp@ /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 42824: 2140 002c movel %d0,%a0@(44) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 42828: 4ab9 0005 ccbe tstl 5ccbe 4282e: 6700 00c2 beqw 428f2 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 42832: 2079 0005 e5fc moveal 5e5fc ,%a0 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 42838: 42a7 clrl %sp@- 4283a: 2f28 0004 movel %a0@(4),%sp@- 4283e: 2f10 movel %a0@,%sp@- 42840: 2f28 000c movel %a0@(12),%sp@- 42844: 2f28 0008 movel %a0@(8),%sp@- 42848: 4eb9 0004 337c jsr 4337c if ( status == -1 ) 4284e: 4fef 0014 lea %sp@(20),%sp 42852: 72ff moveq #-1,%d1 42854: b280 cmpl %d0,%d1 42856: 6700 00b2 beqw 4290a rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4285a: 2079 0005 e710 moveal 5e710 ,%a0 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 42860: 45ee ffec lea %fp@(-20),%a2 42864: 49f9 0004 2d4c lea 42d4c ,%a4 rtems_filesystem_root = loc; 4286a: 264e moveal %fp,%a3 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; 4286c: 4240 clrw %d0 4286e: 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); 42872: 42a7 clrl %sp@- 42874: 2f0a movel %a2,%sp@- 42876: 42a7 clrl %sp@- 42878: 4878 0001 pea 1 4287c: 4879 0005 d070 pea 5d070 42882: 4e94 jsr %a4@ rtems_filesystem_root = loc; 42884: 2079 0005 e710 moveal 5e710 ,%a0 4288a: 2152 0018 movel %a2@,%a0@(24) 4288e: 216e fff0 001c movel %fp@(-16),%a0@(28) 42894: 216e fff4 0020 movel %fp@(-12),%a0@(32) 4289a: 216e fff8 0024 movel %fp@(-8),%a0@(36) 428a0: 2163 0028 movel %a3@-,%a0@(40) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 428a4: 42a7 clrl %sp@- 428a6: 2f0a movel %a2,%sp@- 428a8: 42a7 clrl %sp@- 428aa: 4878 0001 pea 1 428ae: 4879 0005 d070 pea 5d070 428b4: 4e94 jsr %a4@ rtems_filesystem_current = loc; 428b6: 2079 0005 e710 moveal 5e710 ,%a0 428bc: 5888 addql #4,%a0 * * 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); 428be: 4fef 0028 lea %sp@(40),%sp /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 428c2: 20d2 movel %a2@,%a0@+ 428c4: 20ee fff0 movel %fp@(-16),%a0@+ 428c8: 20ee fff4 movel %fp@(-12),%a0@+ 428cc: 20ee fff8 movel %fp@(-8),%a0@+ 428d0: 2093 movel %a3@,%a0@ * * 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); 428d2: 4878 01ff pea 1ff 428d6: 4879 0005 d072 pea 5d072 428dc: 4eb9 0004 31d4 jsr 431d4 if ( status != 0 ) 428e2: 508f addql #8,%sp 428e4: 4a80 tstl %d0 428e6: 6616 bnes 428fe <== NEVER TAKEN * 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. */ } 428e8: 4cee 1c00 ffe0 moveml %fp@(-32),%a2-%a4 428ee: 4e5e unlk %fp 428f0: 4e75 rts /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 428f2: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 428f8: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 428fe: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42904: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 4290a: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42910: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED ... =============================================================================== 0004bfd0 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 4bfd0: 4e56 fff0 linkw %fp,#-16 4bfd4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4bfd8: 266e 0008 moveal %fp@(8),%a3 4bfdc: 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 ) { 4bfe0: 4ab9 0005 cc9e tstl 5cc9e 4bfe6: 672a beqs 4c012 <== NEVER TAKEN 4bfe8: 45f9 0005 cc9e lea 5cc9e ,%a2 stop = (*routine)( table_entry, routine_arg ); 4bfee: 2f03 movel %d3,%sp@- 4bff0: 2f0a movel %a2,%sp@- ++table_entry; 4bff2: 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 ); 4bff4: 4e93 jsr %a3@ { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 4bff6: 508f addql #8,%sp stop = (*routine)( table_entry, routine_arg ); 4bff8: 1400 moveb %d0,%d2 { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 4bffa: 4a92 tstl %a2@ 4bffc: 6710 beqs 4c00e <== ALWAYS TAKEN 4bffe: 4a00 tstb %d0 <== NOT EXECUTED 4c000: 67ec beqs 4bfee <== NOT EXECUTED } rtems_libio_unlock(); } return stop; } 4c002: 1002 moveb %d2,%d0 4c004: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4c00a: 4e5e unlk %fp 4c00c: 4e75 rts while ( table_entry->type && !stop ) { stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 4c00e: 4a00 tstb %d0 4c010: 66f0 bnes 4c002 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 ); 4c012: 42a7 clrl %sp@- 4c014: 42a7 clrl %sp@- 4c016: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4c01c: 4eb9 0004 6704 jsr 46704 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 4c022: 2479 0005 e718 moveal 5e718 ,%a2 rtems_libio_lock(); for ( 4c028: 4fef 000c lea %sp@(12),%sp 4c02c: b5fc 0005 e71c cmpal #386844,%a2 4c032: 6734 beqs 4c068 !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 ); 4c034: 2f03 movel %d3,%sp@- 4c036: 486a 0008 pea %a2@(8) 4c03a: 4e93 jsr %a3@ */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 4c03c: 2452 moveal %a2@,%a2 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 4c03e: 508f addql #8,%sp !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 4c040: 1400 moveb %d0,%d2 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 4c042: b5fc 0005 e71c cmpal #386844,%a2 4c048: 6704 beqs 4c04e 4c04a: 4a00 tstb %d0 4c04c: 67e6 beqs 4c034 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4c04e: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4c054: 4eb9 0004 6840 jsr 46840 4c05a: 588f addql #4,%sp } rtems_libio_unlock(); } return stop; } 4c05c: 1002 moveb %d2,%d0 4c05e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4c064: 4e5e unlk %fp 4c066: 4e75 rts 4c068: 2f39 0005 fca8 movel 5fca8 ,%sp@- ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 4c06e: 4202 clrb %d2 4c070: 4eb9 0004 6840 jsr 46840 4c076: 588f addql #4,%sp 4c078: 60e2 bras 4c05c =============================================================================== 00043300 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 43300: 4e56 fff0 linkw %fp,#-16 43304: 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 ); 43308: 42a7 clrl %sp@- 4330a: 266e 0008 moveal %fp@(8),%a3 4330e: 42a7 clrl %sp@- 43310: 2f39 0005 fca8 movel 5fca8 ,%sp@- 43316: 262e 000c movel %fp@(12),%d3 4331a: 4eb9 0004 6704 jsr 46704 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 43320: 2479 0005 e6f0 moveal 5e6f0 ,%a2 rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 43326: 4fef 000c lea %sp@(12),%sp 4332a: b5fc 0005 e6f4 cmpal #386804,%a2 43330: 6730 beqs 43362 <== NEVER TAKEN 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 ); 43332: 2f03 movel %d3,%sp@- 43334: 2f0a movel %a2,%sp@- 43336: 4e93 jsr %a3@ */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 43338: 2452 moveal %a2@,%a2 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 4333a: 508f addql #8,%sp 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 ); 4333c: 1400 moveb %d0,%d2 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 4333e: b5fc 0005 e6f4 cmpal #386804,%a2 43344: 6704 beqs 4334a 43346: 4a00 tstb %d0 43348: 67e8 beqs 43332 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4334a: 2f39 0005 fca8 movel 5fca8 ,%sp@- 43350: 4eb9 0004 6840 jsr 46840 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 43356: 1002 moveb %d2,%d0 43358: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4335e: 4e5e unlk %fp 43360: 4e75 rts 43362: 2f39 0005 fca8 movel 5fca8 ,%sp@- <== NOT EXECUTED { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 43368: 4202 clrb %d2 <== NOT EXECUTED 4336a: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 43370: 1002 moveb %d2,%d0 <== NOT EXECUTED 43372: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 43378: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ba8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 42ba8: 4e56 fff0 linkw %fp,#-16 42bac: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42bb0: 246e 0008 moveal %fp@(8),%a2 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42bb4: 1012 moveb %a2@,%d0 int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 42bb6: 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 ) ) 42bba: 4a00 tstb %d0 42bbc: 6730 beqs 42bee <== NEVER TAKEN 42bbe: 4a83 tstl %d3 42bc0: 672c beqs 42bee <== NEVER TAKEN 42bc2: 4282 clrl %d2 42bc4: 47f9 0004 3d74 lea 43d74 ,%a3 42bca: 49c0 extbl %d0 42bcc: 2f00 movel %d0,%sp@- 42bce: 4e93 jsr %a3@ 42bd0: 588f addql #4,%sp 42bd2: 4a80 tstl %d0 42bd4: 670c beqs 42be2 { pathname++; pathnamelen--; stripped++; 42bd6: 5282 addql #1,%d2 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42bd8: 1032 2800 moveb %a2@(00000000,%d2:l),%d0 42bdc: 6704 beqs 42be2 <== NEVER TAKEN 42bde: b483 cmpl %d3,%d2 42be0: 66e8 bnes 42bca <== ALWAYS TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 42be2: 2002 movel %d2,%d0 42be4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 42bea: 4e5e unlk %fp 42bec: 4e75 rts { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42bee: 4282 clrl %d2 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 42bf0: 2002 movel %d2,%d0 <== NOT EXECUTED 42bf2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 42bf8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c0a4 : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 4c0a4: 4e56 fff4 linkw %fp,#-12 4c0a8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4c0ac: 242e 0008 movel %fp@(8),%d2 size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; 4c0b0: 2f02 movel %d2,%sp@- 4c0b2: 4eb9 0005 05e4 jsr 505e4 filesystem_node *fsn = malloc( fsn_size ); 4c0b8: 0680 0000 0011 addil #17,%d0 4c0be: 2e80 movel %d0,%sp@ 4c0c0: 4eb9 0004 3108 jsr 43108 char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 4c0c6: 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 ); 4c0c8: 2440 moveal %d0,%a2 char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 4c0ca: 4a80 tstl %d0 4c0cc: 6700 0096 beqw 4c164 rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); 4c0d0: 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 ); 4c0d2: 2600 movel %d0,%d3 4c0d4: 0683 0000 0010 addil #16,%d3 if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); 4c0da: 2f03 movel %d3,%sp@- 4c0dc: 4eb9 0005 0138 jsr 50138 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 ); 4c0e2: 42a7 clrl %sp@- 4c0e4: 42a7 clrl %sp@- 4c0e6: 2f39 0005 fca8 movel 5fca8 ,%sp@- fsn->entry.type = type_storage; fsn->entry.mount_h = mount_h; 4c0ec: 256e 000c 000c movel %fp@(12),%a2@(12) if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); fsn->entry.type = type_storage; 4c0f2: 2543 0008 movel %d3,%a2@(8) 4c0f6: 4eb9 0004 6704 jsr 46704 fsn->entry.mount_h = mount_h; rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 4c0fc: 2f02 movel %d2,%sp@- 4c0fe: 4eb9 0004 c07a jsr 4c07a 4c104: 4fef 0018 lea %sp@(24),%sp 4c108: 4a80 tstl %d0 4c10a: 662a bnes 4c136 <== 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 ); 4c10c: 2f0a movel %a2,%sp@- 4c10e: 4879 0005 e718 pea 5e718 4c114: 4eb9 0004 7114 jsr 47114 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4c11a: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4c120: 4eb9 0004 6840 jsr 46840 rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 4c126: 4fef 000c lea %sp@(12),%sp 4c12a: 4280 clrl %d0 } 4c12c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4c132: 4e5e unlk %fp 4c134: 4e75 rts 4c136: 2f39 0005 fca8 movel 5fca8 ,%sp@- <== NOT EXECUTED rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); rtems_set_errno_and_return_minus_one( EINVAL ); 4c13c: 7616 moveq #22,%d3 <== NOT EXECUTED 4c13e: 4eb9 0004 6840 jsr 46840 <== 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 ); 4c144: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c146: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 4c14c: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4c152: 508f addql #8,%sp <== NOT EXECUTED 4c154: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c156: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c158: 2083 movel %d3,%a0@ <== NOT EXECUTED } rtems_libio_unlock(); return 0; } 4c15a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4c160: 4e5e unlk %fp <== NOT EXECUTED 4c162: 4e75 rts <== NOT EXECUTED size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4c164: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4c16a: 720c moveq #12,%d1 <== NOT EXECUTED 4c16c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c16e: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; } 4c170: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4c176: 2081 movel %d1,%a0@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; } 4c178: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bf16 : int rtems_filesystem_unregister( const char *type ) { 4bf16: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 4bf1a: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4bf1e: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED rtems_chain_node *node = NULL; if ( type == NULL ) { 4bf22: 6700 0094 beqw 4bfb8 <== 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 ); 4bf26: 42a7 clrl %sp@- <== NOT EXECUTED 4bf28: 42a7 clrl %sp@- <== NOT EXECUTED 4bf2a: 2f39 0005 fca8 movel 5fca8 ,%sp@- <== NOT EXECUTED 4bf30: 4eb9 0004 6704 jsr 46704 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 4bf36: 2479 0005 e718 moveal 5e718 ,%a2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 4bf3c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bf40: b5fc 0005 e71c cmpal #386844,%a2 <== NOT EXECUTED 4bf46: 671e beqs 4bf66 <== NOT EXECUTED 4bf48: 47f9 0005 00c0 lea 500c0 ,%a3 <== 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 ) { 4bf4e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4bf50: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4bf54: 4e93 jsr %a3@ <== NOT EXECUTED 4bf56: 508f addql #8,%sp <== NOT EXECUTED 4bf58: 4a80 tstl %d0 <== NOT EXECUTED 4bf5a: 6730 beqs 4bf8c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 4bf5c: 2452 moveal %a2@,%a2 <== NOT EXECUTED if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 4bf5e: b5fc 0005 e71c cmpal #386844,%a2 <== NOT EXECUTED 4bf64: 66e8 bnes 4bf4e <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4bf66: 2f39 0005 fca8 movel 5fca8 ,%sp@- <== NOT EXECUTED 4bf6c: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 4bf72: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4bf78: 588f addql #4,%sp <== NOT EXECUTED 4bf7a: 7202 moveq #2,%d1 <== NOT EXECUTED 4bf7c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bf7e: 70ff moveq #-1,%d0 <== NOT EXECUTED } 4bf80: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 4bf86: 2081 movel %d1,%a0@ <== NOT EXECUTED } 4bf88: 4e5e unlk %fp <== NOT EXECUTED 4bf8a: 4e75 rts <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4bf8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4bf8e: 4eb9 0004 714c jsr 4714c <_Chain_Extract> <== NOT EXECUTED ) { filesystem_node *fsn = (filesystem_node *) node; if ( strcmp( fsn->entry.type, type ) == 0 ) { rtems_chain_extract( node ); free( fsn ); 4bf94: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4bf96: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED 4bf9c: 2f39 0005 fca8 movel 5fca8 ,%sp@- <== NOT EXECUTED 4bfa2: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED rtems_libio_unlock(); return 0; 4bfa8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bfac: 4280 clrl %d0 <== NOT EXECUTED } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 4bfae: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4bfb4: 4e5e unlk %fp <== NOT EXECUTED 4bfb6: 4e75 rts <== NOT EXECUTED ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); 4bfb8: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4bfbe: 7416 moveq #22,%d2 <== NOT EXECUTED 4bfc0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bfc2: 70ff moveq #-1,%d0 <== NOT EXECUTED 4bfc4: 2082 movel %d2,%a0@ <== NOT EXECUTED } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 4bfc6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4bfcc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000426e0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 426e0: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 426e4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 426e8: 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 ); 426ec: 45f9 0005 05e4 lea 505e4 ,%a2 <== NOT EXECUTED 426f2: 240e movel %fp,%d2 <== NOT EXECUTED 426f4: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 426fa: 2f03 movel %d3,%sp@- <== NOT EXECUTED 426fc: 4e92 jsr %a2@ <== NOT EXECUTED 426fe: 7201 moveq #1,%d1 <== NOT EXECUTED 42700: 2e81 movel %d1,%sp@ <== NOT EXECUTED 42702: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42704: 42a7 clrl %sp@- <== NOT EXECUTED 42706: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42708: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4270a: 4eb9 0004 2d4c jsr 42d4c <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 42710: 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 ); 42714: 2800 movel %d0,%d4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 42716: 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; 4271a: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 4271e: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 42722: 4a88 tstl %a0 <== NOT EXECUTED 42724: 6730 beqs 42756 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 42726: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42728: 4e90 jsr %a0@ <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 4272a: 588f addql #4,%sp <== NOT EXECUTED 4272c: 4a84 tstl %d4 <== NOT EXECUTED 4272e: 674e beqs 4277e <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 42730: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42734: 4a88 tstl %a0 <== NOT EXECUTED 42736: 6700 0092 beqw 427ca <== NOT EXECUTED 4273a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4273e: 4a88 tstl %a0 <== NOT EXECUTED 42740: 6700 0088 beqw 427ca <== NOT EXECUTED 42744: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42746: 4e90 jsr %a0@ <== NOT EXECUTED 42748: 588f addql #4,%sp <== NOT EXECUTED 4274a: 700d moveq #13,%d0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 4274c: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 42752: 4e5e unlk %fp <== NOT EXECUTED 42754: 4e75 rts <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 42756: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4275a: 4a88 tstl %a0 <== NOT EXECUTED 4275c: 6706 beqs 42764 <== NOT EXECUTED 4275e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42760: 4e90 jsr %a0@ <== NOT EXECUTED 42762: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42764: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4276a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4276c: 70ff moveq #-1,%d0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 4276e: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 42774: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 4277a: 4e5e unlk %fp <== NOT EXECUTED 4277c: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 4277e: 7202 moveq #2,%d1 <== NOT EXECUTED 42780: b280 cmpl %d0,%d1 <== NOT EXECUTED 42782: 66ac bnes 42730 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 42784: 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; 42786: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4278a: 2083 movel %d3,%a0@ <== NOT EXECUTED device_info->device_name_length = strlen( name ); 4278c: 4e92 jsr %a2@ <== NOT EXECUTED 4278e: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 42792: 41eb 004c lea %a3@(76),%a0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 42796: 47eb 0050 lea %a3@(80),%a3 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 4279a: 588f addql #4,%sp <== NOT EXECUTED 4279c: 2340 0004 movel %d0,%a1@(4) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 427a0: 2350 0008 movel %a0@,%a1@(8) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 427a4: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 427a8: 2353 000c movel %a3@,%a1@(12) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 427ac: 4a88 tstl %a0 <== NOT EXECUTED 427ae: 6726 beqs 427d6 <== NOT EXECUTED 427b0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 427b4: 4a88 tstl %a0 <== NOT EXECUTED 427b6: 671e beqs 427d6 <== NOT EXECUTED 427b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 427ba: 4e90 jsr %a0@ <== NOT EXECUTED 427bc: 588f addql #4,%sp <== NOT EXECUTED 427be: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 427c0: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 427c6: 4e5e unlk %fp <== NOT EXECUTED 427c8: 4e75 rts <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 427ca: 700d moveq #13,%d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 427cc: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 427d2: 4e5e unlk %fp <== NOT EXECUTED 427d4: 4e75 rts <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 427d6: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 427d8: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 427de: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004838c : 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 ) { 4838c: 4e56 fff4 linkw %fp,#-12 48390: 226e 000c moveal %fp@(12),%a1 48394: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48398: 242e 0008 movel %fp@(8),%d2 4839c: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 483a0: 2039 0006 406a movel 6406a <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 483a6: 2239 0006 3ebe movel 63ebe <_ISR_Nest_level>,%d1 483ac: 6600 009c bnew 4844a return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 483b0: 4a8a tstl %a2 483b2: 6700 00ea beqw 4849e return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 483b6: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 483b8: 4a89 tstl %a1 483ba: 6700 00e2 beqw 4849e static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483be: 4a91 tstl %a1@ 483c0: 6700 00d4 beqw 48496 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 483c4: b480 cmpl %d0,%d2 483c6: 6476 bccs 4843e <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 483c8: 2039 0006 3e24 movel 63e24 <_Thread_Dispatch_disable_level>,%d0 483ce: 5280 addql #1,%d0 483d0: 23c0 0006 3e24 movel %d0,63e24 <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 483d6: 4a82 tstl %d2 483d8: 667c bnes 48456 <== NEVER TAKEN static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 483da: 2039 0006 406a movel 6406a <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 483e0: 6700 00fc beqw 484de 483e4: 2239 0006 406e movel 6406e <_IO_Driver_address_table>,%d1 483ea: 2041 moveal %d1,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483ec: 4a90 tstl %a0@ 483ee: 6700 008e beqw 4847e 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 ) { 483f2: 5282 addql #1,%d2 483f4: 41e8 0018 lea %a0@(24),%a0 483f8: b480 cmpl %d0,%d2 483fa: 65f0 bcss 483ec if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 483fc: 2482 movel %d2,%a2@ if ( m != n ) 483fe: b480 cmpl %d0,%d2 48400: 6700 00de beqw 484e0 48404: 2602 movel %d2,%d3 48406: 2002 movel %d2,%d0 48408: 2041 moveal %d1,%a0 4840a: e78b lsll #3,%d3 4840c: eb88 lsll #5,%d0 4840e: 9083 subl %d3,%d0 48410: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48412: 20d9 movel %a1@+,%a0@+ 48414: 20d9 movel %a1@+,%a0@+ 48416: 20d9 movel %a1@+,%a0@+ 48418: 20d9 movel %a1@+,%a0@+ 4841a: 20d9 movel %a1@+,%a0@+ 4841c: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 4841e: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48424: 2d42 0008 movel %d2,%fp@(8) } 48428: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4842e: 42ae 0010 clrl %fp@(16) 48432: 42ae 000c clrl %fp@(12) } 48436: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48438: 4ef9 0005 0bdc jmp 50bdc return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4843e: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48440: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48446: 4e5e unlk %fp 48448: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 4844a: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 4844c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48452: 4e5e unlk %fp 48454: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 48456: 2202 movel %d2,%d1 48458: 2002 movel %d2,%d0 4845a: e789 lsll #3,%d1 4845c: eb88 lsll #5,%d0 4845e: 2079 0006 406e moveal 6406e <_IO_Driver_address_table>,%a0 48464: 9081 subl %d1,%d0 48466: d1c0 addal %d0,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48468: 4a90 tstl %a0@ 4846a: 673e beqs 484aa major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 4846c: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> 48472: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48474: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4847a: 4e5e unlk %fp 4847c: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4847e: 4aa8 0004 tstl %a0@(4) 48482: 6700 ff78 beqw 483fc 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 ) { 48486: 5282 addql #1,%d2 48488: 41e8 0018 lea %a0@(24),%a0 4848c: b480 cmpl %d0,%d2 4848e: 6500 ff5c bcsw 483ec 48492: 6000 ff68 braw 483fc static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48496: 4aa9 0004 tstl %a1@(4) 4849a: 6600 ff28 bnew 483c4 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4849e: 7009 moveq #9,%d0 } 484a0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484a6: 4e5e unlk %fp 484a8: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 484aa: 4aa8 0004 tstl %a0@(4) 484ae: 66bc bnes 4846c } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 484b0: 20d9 movel %a1@+,%a0@+ 484b2: 20d9 movel %a1@+,%a0@+ 484b4: 20d9 movel %a1@+,%a0@+ 484b6: 20d9 movel %a1@+,%a0@+ 484b8: 20d9 movel %a1@+,%a0@+ 484ba: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 484bc: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 484be: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 484c4: 2d42 0008 movel %d2,%fp@(8) } 484c8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 484ce: 42ae 0010 clrl %fp@(16) 484d2: 42ae 000c clrl %fp@(12) } 484d6: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 484d8: 4ef9 0005 0bdc jmp 50bdc if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 484de: 4292 clrl %a2@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 484e0: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> 484e6: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 484e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484ee: 4e5e unlk %fp ... =============================================================================== 000494e0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 494e0: 4e56 fff0 linkw %fp,#-16 494e4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 494e8: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 494ec: 4a8b tstl %a3 494ee: 6744 beqs 49534 <== NEVER TAKEN 494f0: 49f9 0006 29e8 lea 629e8 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 494f6: 2054 moveal %a4@,%a0 494f8: 4a88 tstl %a0 494fa: 672e beqs 4952a continue; information = _Objects_Information_table[ api_index ][ 1 ]; 494fc: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 49500: 4a8a tstl %a2 49502: 6726 beqs 4952a continue; for ( i=1 ; i <= information->maximum ; i++ ) { 49504: 4a6a 000e tstw %a2@(14) 49508: 6720 beqs 4952a <== NEVER TAKEN 4950a: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 4950c: 206a 0018 moveal %a2@(24),%a0 49510: 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++ ) { 49514: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 49516: 4a80 tstl %d0 49518: 6706 beqs 49520 <== NEVER TAKEN continue; (*routine)(the_thread); 4951a: 2f00 movel %d0,%sp@- 4951c: 4e93 jsr %a3@ 4951e: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 49520: 4280 clrl %d0 49522: 302a 000e movew %a2@(14),%d0 49526: b480 cmpl %d0,%d2 49528: 63e2 blss 4950c 4952a: 588c addql #4,%a4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 4952c: b9fc 0006 29f8 cmpal #403960,%a4 49532: 66c2 bnes 494f6 (*routine)(the_thread); } } } 49534: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4953a: 4e5e unlk %fp ... =============================================================================== 0004bddc : * 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 ) { 4bddc: 4e56 fffc linkw %fp,#-4 4bde0: 2f0a movel %a2,%sp@- 4bde2: 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 ); 4bde4: 42a7 clrl %sp@- 4bde6: 42a7 clrl %sp@- 4bde8: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4bdee: 4eb9 0004 6704 jsr 46704 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 4bdf4: 2039 0005 fca4 movel 5fca4 ,%d0 4bdfa: 4fef 000c lea %sp@(12),%sp 4bdfe: 661c bnes 4be1c } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4be00: 2f39 0005 fca8 movel 5fca8 ,%sp@- next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 4be06: 95ca subal %a2,%a2 4be08: 4eb9 0004 6840 jsr 46840 iop = 0; done: rtems_libio_unlock(); return iop; } 4be0e: 242e fff4 movel %fp@(-12),%d2 4be12: 200a movel %a2,%d0 4be14: 246e fff8 moveal %fp@(-8),%a2 4be18: 4e5e unlk %fp 4be1a: 4e75 rts rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 4be1c: 486e fffc pea %fp@(-4) 4be20: 90b9 0005 fca0 subl 5fca0 ,%d0 4be26: ec80 asrl #6,%d0 4be28: 42a7 clrl %sp@- 4be2a: 4878 0054 pea 54 4be2e: 4878 0001 pea 1 4be32: 0080 4c42 4900 oril #1279412480,%d0 4be38: 2f00 movel %d0,%sp@- 4be3a: 4eb9 0004 6464 jsr 46464 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 4be40: 4fef 0014 lea %sp@(20),%sp 4be44: 4a80 tstl %d0 4be46: 66b8 bnes 4be00 <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 4be48: 2479 0005 fca4 moveal 5fca4 ,%a2 next = iop->data1; 4be4e: 242a 0034 movel %a2@(52),%d2 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4be52: 4878 0040 pea 40 4be56: 42a7 clrl %sp@- 4be58: 2f0a movel %a2,%sp@- 4be5a: 4eb9 0004 fa48 jsr 4fa48 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4be60: 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; 4be66: 203c 0000 0100 movel #256,%d0 iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 4be6c: 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; 4be70: 23c2 0005 fca4 movel %d2,5fca4 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; 4be76: 2540 0014 movel %d0,%a2@(20) 4be7a: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4be80: 4eb9 0004 6840 jsr 46840 iop = 0; done: rtems_libio_unlock(); return iop; } 4be86: 242e fff4 movel %fp@(-12),%d2 4be8a: 200a movel %a2,%d0 4be8c: 246e fff8 moveal %fp@(-8),%a2 4be90: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bd4e : */ void rtems_libio_free( rtems_libio_t *iop ) { 4bd4e: 4e56 0000 linkw %fp,#0 4bd52: 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 ); 4bd54: 42a7 clrl %sp@- 4bd56: 246e 0008 moveal %fp@(8),%a2 4bd5a: 42a7 clrl %sp@- 4bd5c: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4bd62: 4eb9 0004 6704 jsr 46704 rtems_libio_lock(); if (iop->sem) 4bd68: 202a 002c movel %a2@(44),%d0 4bd6c: 4fef 000c lea %sp@(12),%sp 4bd70: 6630 bnes 4bda2 <== ALWAYS TAKEN rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4bd72: 41f9 0005 fca4 lea 5fca4 ,%a0 <== NOT EXECUTED rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4bd78: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; 4bd7e: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4bd82: 41f9 0005 fca8 lea 5fca8 ,%a0 <== NOT EXECUTED 4bd88: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4bd8c: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4bd90: 23ca 0005 fca4 movel %a2,5fca4 <== NOT EXECUTED rtems_libio_unlock(); } 4bd96: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4bd9a: 4e5e unlk %fp <== NOT EXECUTED 4bd9c: 4ef9 0004 6840 jmp 46840 <== NOT EXECUTED ) { rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); 4bda2: 2f00 movel %d0,%sp@- 4bda4: 4eb9 0004 662c jsr 4662c 4bdaa: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4bdac: 41f9 0005 fca4 lea 5fca4 ,%a0 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4bdb2: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 4bdb8: 2550 0034 movel %a0@,%a2@(52) 4bdbc: 41f9 0005 fca8 lea 5fca8 ,%a0 4bdc2: 2d50 0008 movel %a0@,%fp@(8) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4bdc6: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4bdca: 23ca 0005 fca4 movel %a2,5fca4 rtems_libio_unlock(); } 4bdd0: 246e fffc moveal %fp@(-4),%a2 4bdd4: 4e5e unlk %fp 4bdd6: 4ef9 0004 6840 jmp 46840 =============================================================================== 00042ef8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42ef8: 4e56 0000 linkw %fp,#0 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 42efc: 2039 0005 e5f4 movel 5e5f4 ,%d0 42f02: 674a beqs 42f4e <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42f04: 4878 0040 pea 40 42f08: 2f00 movel %d0,%sp@- 42f0a: 4eb9 0004 2918 jsr 42918 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42f10: 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, 42f12: 2040 moveal %d0,%a0 42f14: 23c0 0005 fca0 movel %d0,5fca0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42f1a: 6770 beqs 42f8c <== NEVER TAKEN 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++) 42f1c: 2279 0005 e5f4 moveal 5e5f4 ,%a1 42f22: 7201 moveq #1,%d1 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 42f24: 23c0 0005 fca4 movel %d0,5fca4 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42f2a: b289 cmpl %a1,%d1 42f2c: 641c bccs 42f4a <== NEVER TAKEN 42f2e: 2040 moveal %d0,%a0 42f30: 41e8 0040 lea %a0@(64),%a0 iop->data1 = iop + 1; 42f34: 2148 fff4 movel %a0,%a0@(-12) 42f38: 41e8 0040 lea %a0@(64),%a0 42f3c: 5281 addql #1,%d1 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++) 42f3e: b3c1 cmpal %d1,%a1 42f40: 66f2 bnes 42f34 42f42: ed89 lsll #6,%d1 42f44: 2241 moveal %d1,%a1 42f46: 41f1 08c0 lea %a1@(ffffffc0,%d0:l),%a0 iop->data1 = iop + 1; iop->data1 = NULL; 42f4a: 42a8 0034 clrl %a0@(52) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 42f4e: 4879 0005 fca8 pea 5fca8 42f54: 42a7 clrl %sp@- 42f56: 4878 0054 pea 54 42f5a: 4878 0001 pea 1 42f5e: 2f3c 4c42 494f movel #1279412559,%sp@- 42f64: 4eb9 0004 6464 jsr 46464 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 42f6a: 4fef 0014 lea %sp@(20),%sp 42f6e: 4a80 tstl %d0 42f70: 6612 bnes 42f84 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 42f72: 2279 0005 e5f0 moveal 5e5f0 ,%a1 42f78: 4a89 tstl %a1 42f7a: 6704 beqs 42f80 <== NEVER TAKEN (* rtems_fs_init_helper)(); } 42f7c: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 42f7e: 4ed1 jmp %a1@ } 42f80: 4e5e unlk %fp <== NOT EXECUTED 42f82: 4e75 rts <== NOT EXECUTED RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 42f84: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42f86: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 42f8c: 4878 001a pea 1a <== NOT EXECUTED 42f90: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED ... =============================================================================== 0004bc52 : */ int rtems_libio_is_file_open( void *node_access ) { 4bc52: 4e56 0000 linkw %fp,#0 4bc56: 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 ); 4bc58: 42a7 clrl %sp@- 4bc5a: 242e 0008 movel %fp@(8),%d2 4bc5e: 42a7 clrl %sp@- 4bc60: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4bc66: 4eb9 0004 6704 jsr 46704 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4bc6c: 2079 0005 fca0 moveal 5fca0 ,%a0 4bc72: 4fef 000c lea %sp@(12),%sp 4bc76: 2279 0005 e5f4 moveal 5e5f4 ,%a1 4bc7c: 4a89 tstl %a1 4bc7e: 6720 beqs 4bca0 <== NEVER TAKEN 4bc80: 41e8 0014 lea %a0@(20),%a0 4bc84: 4280 clrl %d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4bc86: 2210 movel %a0@,%d1 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4bc88: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4bc8a: 0281 0000 0100 andil #256,%d1 4bc90: 6706 beqs 4bc98 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4bc92: b4a8 0004 cmpl %a0@(4),%d2 4bc96: 6720 beqs 4bcb8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4bc98: 41e8 0040 lea %a0@(64),%a0 4bc9c: b3c0 cmpal %d0,%a1 4bc9e: 62e6 bhis 4bc86 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4bca0: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4bca6: 4282 clrl %d2 4bca8: 4eb9 0004 6840 jsr 46840 } rtems_libio_unlock(); return result; } 4bcae: 2002 movel %d2,%d0 4bcb0: 242e fffc movel %fp@(-4),%d2 4bcb4: 4e5e unlk %fp 4bcb6: 4e75 rts 4bcb8: 2f39 0005 fca8 movel 5fca8 ,%sp@- /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4bcbe: 7401 moveq #1,%d2 4bcc0: 4eb9 0004 6840 jsr 46840 } rtems_libio_unlock(); return result; } 4bcc6: 2002 movel %d2,%d0 4bcc8: 242e fffc movel %fp@(-4),%d2 4bccc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bcd0 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 4bcd0: 4e56 0000 linkw %fp,#0 4bcd4: 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 ); 4bcd6: 42a7 clrl %sp@- 4bcd8: 242e 0008 movel %fp@(8),%d2 4bcdc: 42a7 clrl %sp@- 4bcde: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4bce4: 4eb9 0004 6704 jsr 46704 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4bcea: 2079 0005 fca0 moveal 5fca0 ,%a0 4bcf0: 4fef 000c lea %sp@(12),%sp 4bcf4: 2279 0005 e5f4 moveal 5e5f4 ,%a1 4bcfa: 4a89 tstl %a1 4bcfc: 6720 beqs 4bd1e <== NEVER TAKEN 4bcfe: 41e8 0014 lea %a0@(20),%a0 4bd02: 4280 clrl %d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4bd04: 2210 movel %a0@,%d1 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4bd06: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4bd08: 0281 0000 0100 andil #256,%d1 4bd0e: 6706 beqs 4bd16 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 4bd10: b4a8 0014 cmpl %a0@(20),%d2 4bd14: 6720 beqs 4bd36 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4bd16: 41e8 0040 lea %a0@(64),%a0 4bd1a: b3c0 cmpal %d0,%a1 4bd1c: 62e6 bhis 4bd04 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4bd1e: 2f39 0005 fca8 movel 5fca8 ,%sp@- 4bd24: 4282 clrl %d2 4bd26: 4eb9 0004 6840 jsr 46840 } rtems_libio_unlock(); return result; } 4bd2c: 2002 movel %d2,%d0 4bd2e: 242e fffc movel %fp@(-4),%d2 4bd32: 4e5e unlk %fp 4bd34: 4e75 rts 4bd36: 2f39 0005 fca8 movel 5fca8 ,%sp@- /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 4bd3c: 7401 moveq #1,%d2 4bd3e: 4eb9 0004 6840 jsr 46840 } rtems_libio_unlock(); return result; } 4bd44: 2002 movel %d2,%d0 4bd46: 242e fffc movel %fp@(-4),%d2 4bd4a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000445bc : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 445bc: 4e56 ffd4 linkw %fp,#-44 445c0: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 445c4: 486e fffc pea %fp@(-4) 445c8: 42a7 clrl %sp@- 445ca: 42a7 clrl %sp@- 445cc: 4eb9 0004 7650 jsr 47650 if (sc != RTEMS_SUCCESSFUL) return sc; 445d2: 4fef 000c lea %sp@(12),%sp 445d6: 4a80 tstl %d0 445d8: 6600 00a8 bnew 44682 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 445dc: 2479 0005 f198 moveal 5f198 ,%a2 445e2: b5fc 0006 0770 cmpal #395120,%a2 445e8: 6700 00a6 beqw 44690 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 445ec: 4878 0048 pea 48 * 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); 445f0: 47ee ffe8 lea %fp@(-24),%a3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 445f4: 4879 0006 0770 pea 60770 * 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); 445fa: 4bf9 0004 3220 lea 43220 ,%a5 rtems_filesystem_root = loc; 44600: 49ee fff8 lea %fp@(-8),%a4 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 44604: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 44606: 2f0a movel %a2,%sp@- 44608: 4eb9 0005 04c0 jsr 504c0 rtems_current_user_env->task_id=task_id; /* mark the local values*/ 4460e: 24ae fffc movel %fp@(-4),%a2@ * 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); 44612: 42a7 clrl %sp@- 44614: 2f0b movel %a3,%sp@- 44616: 42a7 clrl %sp@- 44618: 4878 0001 pea 1 4461c: 4879 0005 db16 pea 5db16 44622: 4e95 jsr %a5@ rtems_filesystem_root = loc; 44624: 2079 0005 f198 moveal 5f198 ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4462a: 4fef 0020 lea %sp@(32),%sp * 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); rtems_filesystem_root = loc; 4462e: 2153 0018 movel %a3@,%a0@(24) 44632: 216e ffec 001c movel %fp@(-20),%a0@(28) 44638: 216e fff0 0020 movel %fp@(-16),%a0@(32) 4463e: 216e fff4 0024 movel %fp@(-12),%a0@(36) 44644: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 44648: 42a7 clrl %sp@- 4464a: 2f0b movel %a3,%sp@- 4464c: 42a7 clrl %sp@- 4464e: 4878 0001 pea 1 44652: 4879 0005 db16 pea 5db16 44658: 4e95 jsr %a5@ rtems_filesystem_current = loc; 4465a: 2079 0005 f198 moveal 5f198 ,%a0 44660: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 44662: 4fef 0014 lea %sp@(20),%sp */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 44666: 20d3 movel %a3@,%a0@+ 44668: 20ee ffec movel %fp@(-20),%a0@+ 4466c: 20ee fff0 movel %fp@(-16),%a0@+ 44670: 20ee fff4 movel %fp@(-12),%a0@+ 44674: 2094 movel %a4@,%a0@ return RTEMS_SUCCESSFUL; } 44676: 2002 movel %d2,%d0 44678: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 4467e: 4e5e unlk %fp 44680: 4e75 rts rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; 44682: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 44684: 2002 movel %d2,%d0 <== NOT EXECUTED 44686: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 4468c: 4e5e unlk %fp <== NOT EXECUTED 4468e: 4e75 rts <== NOT EXECUTED 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)); 44690: 4878 0048 pea 48 44694: 4eb9 0004 38ac jsr 438ac if (!tmp) 4469a: 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)); 4469c: 2440 moveal %d0,%a2 if (!tmp) 4469e: 4a80 tstl %d0 446a0: 6700 00b2 beqw 44754 #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); 446a4: 487a fdfe pea %pc@(444a4 ) 446a8: 4879 0005 f198 pea 5f198 446ae: 42a7 clrl %sp@- 446b0: 4eb9 0004 77e4 jsr 477e4 if (sc != RTEMS_SUCCESSFUL) { 446b6: 4fef 000c lea %sp@(12),%sp #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); 446ba: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 446bc: 6600 00a4 bnew 44762 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 446c0: 23ca 0005 f198 movel %a2,5f198 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 446c6: 4878 0048 pea 48 * 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); 446ca: 47ee ffe8 lea %fp@(-24),%a3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 446ce: 4879 0006 0770 pea 60770 * 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); 446d4: 4bf9 0004 3220 lea 43220 ,%a5 rtems_filesystem_root = loc; 446da: 49ee fff8 lea %fp@(-8),%a4 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 446de: 2f0a movel %a2,%sp@- */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 446e0: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 446e2: 4eb9 0005 04c0 jsr 504c0 rtems_current_user_env->task_id=task_id; /* mark the local values*/ 446e8: 24ae fffc movel %fp@(-4),%a2@ * 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); 446ec: 42a7 clrl %sp@- 446ee: 2f0b movel %a3,%sp@- 446f0: 42a7 clrl %sp@- 446f2: 4878 0001 pea 1 446f6: 4879 0005 db16 pea 5db16 446fc: 4e95 jsr %a5@ rtems_filesystem_root = loc; 446fe: 2079 0005 f198 moveal 5f198 ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 44704: 4fef 0020 lea %sp@(32),%sp * 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); rtems_filesystem_root = loc; 44708: 2153 0018 movel %a3@,%a0@(24) 4470c: 216e ffec 001c movel %fp@(-20),%a0@(28) 44712: 216e fff0 0020 movel %fp@(-16),%a0@(32) 44718: 216e fff4 0024 movel %fp@(-12),%a0@(36) 4471e: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 44722: 42a7 clrl %sp@- 44724: 2f0b movel %a3,%sp@- 44726: 42a7 clrl %sp@- 44728: 4878 0001 pea 1 4472c: 4879 0005 db16 pea 5db16 44732: 4e95 jsr %a5@ rtems_filesystem_current = loc; 44734: 2079 0005 f198 moveal 5f198 ,%a0 4473a: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 4473c: 4fef 0014 lea %sp@(20),%sp */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 44740: 20d3 movel %a3@,%a0@+ 44742: 20ee ffec movel %fp@(-20),%a0@+ 44746: 20ee fff0 movel %fp@(-16),%a0@+ 4474a: 20ee fff4 movel %fp@(-12),%a0@+ 4474e: 2094 movel %a4@,%a0@ 44750: 6000 ff24 braw 44676 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)); if (!tmp) 44754: 741a moveq #26,%d2 <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 44756: 2002 movel %d2,%d0 <== NOT EXECUTED 44758: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 4475e: 4e5e unlk %fp <== NOT EXECUTED 44760: 4e75 rts <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 44762: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44764: 4eb9 0004 32b0 jsr 432b0 <== NOT EXECUTED return sc; 4476a: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 4476c: 2002 movel %d2,%d0 <== NOT EXECUTED 4476e: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 44774: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000444fe : * 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) { 444fe: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 44502: 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); 44504: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 44508: 42a7 clrl %sp@- <== NOT EXECUTED 4450a: 42a7 clrl %sp@- <== NOT EXECUTED 4450c: 4eb9 0004 7650 jsr 47650 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 44512: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44516: 4a80 tstl %d0 <== NOT EXECUTED 44518: 6636 bnes 44550 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 4451a: 2479 0005 f198 moveal 5f198 ,%a2 <== NOT EXECUTED 44520: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 44524: b092 cmpl %a2@,%d0 <== NOT EXECUTED 44526: 6730 beqs 44558 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 44528: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4452c: 4879 0005 f198 pea 5f198 <== NOT EXECUTED 44532: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 44536: 4eb9 0004 791c jsr 4791c <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 4453c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44540: 4a80 tstl %d0 <== NOT EXECUTED 44542: 674c beqs 44590 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 44544: 223c 0006 0770 movel #395120,%d1 <== NOT EXECUTED 4454a: 23c1 0005 f198 movel %d1,5f198 <== NOT EXECUTED return sc; } 44550: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 44554: 4e5e unlk %fp <== NOT EXECUTED 44556: 4e75 rts <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* 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); 44558: 4879 0005 f198 pea 5f198 <== NOT EXECUTED 4455e: 42a7 clrl %sp@- <== NOT EXECUTED 44560: 4eb9 0004 7888 jsr 47888 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 44566: 508f addql #8,%sp <== NOT EXECUTED 44568: 4a80 tstl %d0 <== NOT EXECUTED 4456a: 66e4 bnes 44550 <== NOT EXECUTED free_user_env(tmp); 4456c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4456e: 4eba ff34 jsr %pc@(444a4 ) <== NOT EXECUTED 44572: 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, 44574: 486e fffc pea %fp@(-4) <== NOT EXECUTED 44578: 4879 0005 f198 pea 5f198 <== NOT EXECUTED 4457e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 44582: 4eb9 0004 791c jsr 4791c <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 44588: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4458c: 4a80 tstl %d0 <== NOT EXECUTED 4458e: 66b4 bnes 44544 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 44590: 487a ff12 pea %pc@(444a4 ) <== NOT EXECUTED 44594: 4879 0005 f198 pea 5f198 <== NOT EXECUTED 4459a: 42a7 clrl %sp@- <== NOT EXECUTED 4459c: 4eb9 0004 77e4 jsr 477e4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 445a2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 445a6: 4a80 tstl %d0 <== NOT EXECUTED 445a8: 669a bnes 44544 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 445aa: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 445ae: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 445b2: 4e5e unlk %fp <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 445b4: 23d0 0005 f198 movel %a0@,5f198 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } =============================================================================== 0004bc04 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4bc04: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4bc06: 4e56 0000 linkw %fp,#0 4bc0a: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4bc0e: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4bc10: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4bc12: 7406 moveq #6,%d2 4bc14: b480 cmpl %d0,%d2 4bc16: 6736 beqs 4bc4e <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4bc18: 0801 0001 btst #1,%d1 4bc1c: 6726 beqs 4bc44 <== NEVER TAKEN 4bc1e: 4280 clrl %d0 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 ) { 4bc20: 0801 0000 btst #0,%d1 4bc24: 6704 beqs 4bc2a fcntl_flags |= O_NONBLOCK; 4bc26: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4bc2a: 0801 0009 btst #9,%d1 4bc2e: 6704 beqs 4bc34 fcntl_flags |= O_APPEND; 4bc30: 7408 moveq #8,%d2 4bc32: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4bc34: 0801 000a btst #10,%d1 4bc38: 6704 beqs 4bc3e fcntl_flags |= O_CREAT; 4bc3a: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 4bc3e: 241f movel %sp@+,%d2 4bc40: 4e5e unlk %fp 4bc42: 4e75 rts { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4bc44: 2001 movel %d1,%d0 <== NOT EXECUTED 4bc46: e488 lsrl #2,%d0 <== NOT EXECUTED 4bc48: 7401 moveq #1,%d2 <== NOT EXECUTED 4bc4a: c082 andl %d2,%d0 <== NOT EXECUTED 4bc4c: 60d2 bras 4bc20 <== NOT EXECUTED uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4bc4e: 7002 moveq #2,%d0 <== NOT EXECUTED 4bc50: 60ce bras 4bc20 <== NOT EXECUTED =============================================================================== 00050278 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 50278: 4e56 0000 linkw %fp,#0 5027c: 2f0a movel %a2,%sp@- 5027e: 246e 0008 moveal %fp@(8),%a2 50282: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 50284: 4a8a tstl %a2 50286: 675e beqs 502e6 return EINVAL; *pointer = NULL; 50288: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 5028a: 7003 moveq #3,%d0 5028c: b0b9 0006 3fa6 cmpl 63fa6 <_System_state_Current>,%d0 50292: 6748 beqs 502dc <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 50294: 4eb9 0004 418a jsr 4418a uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 5029a: 42a7 clrl %sp@- 5029c: 2f2e 000c movel %fp@(12),%sp@- 502a0: 2f2e 0010 movel %fp@(16),%sp@- 502a4: 2f39 0006 2580 movel 62580 ,%sp@- 502aa: 4eb9 0004 9820 jsr 49820 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 502b0: 4fef 0010 lea %sp@(16),%sp 502b4: 2400 movel %d0,%d2 502b6: 673c beqs 502f4 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 502b8: 2079 0006 2bf6 moveal 62bf6 ,%a0 502be: 4a88 tstl %a0 502c0: 670a beqs 502cc <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 502c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 502c4: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 502c8: 4e90 jsr %a0@ <== NOT EXECUTED 502ca: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 502cc: 2482 movel %d2,%a2@ return 0; } 502ce: 242e fff8 movel %fp@(-8),%d2 */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 502d2: 4280 clrl %d0 return 0; } 502d4: 246e fffc moveal %fp@(-4),%a2 502d8: 4e5e unlk %fp 502da: 4e75 rts *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 502dc: 4eb9 0004 4130 jsr 44130 502e2: 4a00 tstb %d0 502e4: 66ae bnes 50294 <== ALWAYS TAKEN (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 502e6: 242e fff8 movel %fp@(-8),%d2 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 502ea: 7016 moveq #22,%d0 } 502ec: 246e fffc moveal %fp@(-4),%a2 502f0: 4e5e unlk %fp 502f2: 4e75 rts 502f4: 242e fff8 movel %fp@(-8),%d2 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 502f8: 700c moveq #12,%d0 (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 502fa: 246e fffc moveal %fp@(-4),%a2 502fe: 4e5e unlk %fp ... =============================================================================== 0004813c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 4813c: 4e56 0000 linkw %fp,#0 48140: 2f0a movel %a2,%sp@- 48142: 246e 0010 moveal %fp@(16),%a2 48146: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 48148: 4a8a tstl %a2 4814a: 6766 beqs 481b2 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 4814c: 2f2e 000c movel %fp@(12),%sp@- 48150: 2f2e 0008 movel %fp@(8),%sp@- 48154: 4eb9 0004 9dec jsr 49dec <_Objects_Get_information> if ( !obj_info ) 4815a: 508f addql #8,%sp * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 4815c: 2040 moveal %d0,%a0 if ( !obj_info ) 4815e: 4a80 tstl %d0 48160: 675e beqs 481c0 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 48162: 24a8 0006 movel %a0@(6),%a2@ info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 48166: 4282 clrl %d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 48168: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 4816e: 3428 000e movew %a0@(14),%d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 48172: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 48178: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 4817c: 6750 beqs 481ce <== NEVER TAKEN 4817e: 2068 0018 moveal %a0@(24),%a0 48182: 7201 moveq #1,%d1 48184: 7001 moveq #1,%d0 48186: 93c9 subal %a1,%a1 48188: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 4818a: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 4818e: 6718 beqs 481a8 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 48190: 2200 movel %d0,%d1 48192: b082 cmpl %d2,%d0 48194: 63f2 blss 48188 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 48196: 2549 000e movel %a1,%a2@(14) 4819a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4819c: 242e fff8 movel %fp@(-8),%d2 481a0: 246e fffc moveal %fp@(-4),%a2 481a4: 4e5e unlk %fp 481a6: 4e75 rts info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; 481a8: 5289 addql #1,%a1 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 481aa: 2200 movel %d0,%d1 481ac: b082 cmpl %d2,%d0 481ae: 63d8 blss 48188 <== NEVER TAKEN 481b0: 60e4 bras 48196 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 481b2: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 481b6: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 481b8: 246e fffc moveal %fp@(-4),%a2 481bc: 4e5e unlk %fp 481be: 4e75 rts 481c0: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 481c4: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 481c6: 246e fffc moveal %fp@(-4),%a2 481ca: 4e5e unlk %fp 481cc: 4e75 rts info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 481ce: 93c9 subal %a1,%a1 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 481d0: 4280 clrl %d0 481d2: 2549 000e movel %a1,%a2@(14) 481d6: 60c4 bras 4819c =============================================================================== 00042b72 : void rtems_panic( const char *printf_format, ... ) { 42b72: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 42b76: 486e 000c pea %fp@(12) <== NOT EXECUTED 42b7a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42b7e: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 42b84: 4eba fdf6 jsr %pc@(4297c ) <== NOT EXECUTED 42b88: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED va_end(arglist); } 42b8c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057304 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 57304: 4e56 ffe8 linkw %fp,#-24 57308: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 5730c: 242e 0008 movel %fp@(8),%d2 57310: 2a2e 000c movel %fp@(12),%d5 57314: 282e 0010 movel %fp@(16),%d4 57318: 262e 0014 movel %fp@(20),%d3 5731c: 246e 001c moveal %fp@(28),%a2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 57320: 4a82 tstl %d2 57322: 673a beqs 5735e return RTEMS_INVALID_NAME; if ( !starting_address ) 57324: 4a85 tstl %d5 57326: 671e beqs 57346 return RTEMS_INVALID_ADDRESS; if ( !id ) 57328: 4a8a tstl %a2 5732a: 671a beqs 57346 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 5732c: 4a84 tstl %d4 5732e: 6722 beqs 57352 57330: 4a83 tstl %d3 57332: 671e beqs 57352 57334: b684 cmpl %d4,%d3 57336: 621a bhis 57352 57338: 7003 moveq #3,%d0 5733a: c083 andl %d3,%d0 5733c: 6614 bnes 57352 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 5733e: 103c 0003 moveb #3,%d0 57342: c085 andl %d5,%d0 57344: 6724 beqs 5736a 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 57346: 7009 moveq #9,%d0 } 57348: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5734e: 4e5e unlk %fp 57350: 4e75 rts 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 57352: 7008 moveq #8,%d0 } 57354: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5735a: 4e5e unlk %fp 5735c: 4e75 rts rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 5735e: 7003 moveq #3,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 57360: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 57366: 4e5e unlk %fp 57368: 4e75 rts 5736a: 2039 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d0 57370: 5280 addql #1,%d0 57372: 23c0 0007 f538 movel %d0,7f538 <_Thread_Dispatch_disable_level> * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 57378: 4879 0007 f3cc pea 7f3cc <_Partition_Information> 5737e: 4eb9 0005 bd9c jsr 5bd9c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 57384: 588f addql #4,%sp 57386: 2640 moveal %d0,%a3 57388: 4a80 tstl %d0 5738a: 675a beqs 573e6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 5738c: 2745 0010 movel %d5,%a3@(16) the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 57390: 2004 movel %d4,%d0 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 57392: 276e 0018 001c movel %fp@(24),%a3@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 57398: 4c43 0000 remul %d3,%d0,%d0 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 5739c: 2744 0014 movel %d4,%a3@(20) the_partition->buffer_size = buffer_size; 573a0: 2743 0018 movel %d3,%a3@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 573a4: 42ab 0020 clrl %a3@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 573a8: 2f03 movel %d3,%sp@- 573aa: 2f00 movel %d0,%sp@- 573ac: 2f05 movel %d5,%sp@- 573ae: 486b 0024 pea %a3@(36) 573b2: 4eb9 0005 a8e8 jsr 5a8e8 <_Chain_Initialize> 573b8: 202b 0008 movel %a3@(8),%d0 573bc: 4281 clrl %d1 573be: 2079 0007 f3e4 moveal 7f3e4 <_Partition_Information+0x18>,%a0 573c4: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 573c6: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 573ca: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 573ce: 2480 movel %d0,%a2@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 573d0: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 573d6: 4fef 0010 lea %sp@(16),%sp name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 573da: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 573dc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 573e2: 4e5e unlk %fp 573e4: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 573e6: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 573ec: 7005 moveq #5,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 573ee: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 573f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057518 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 57518: 4e56 fffc linkw %fp,#-4 5751c: 2f0a movel %a2,%sp@- 5751e: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 57520: 486e fffc pea %fp@(-4) 57524: 2f2e 0008 movel %fp@(8),%sp@- 57528: 4879 0007 f3cc pea 7f3cc <_Partition_Information> 5752e: 242e 000c movel %fp@(12),%d2 57532: 4eb9 0005 c274 jsr 5c274 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 57538: 4fef 000c lea %sp@(12),%sp 5753c: 2440 moveal %d0,%a2 5753e: 4aae fffc tstl %fp@(-4) 57542: 670e beqs 57552 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57544: 242e fff4 movel %fp@(-12),%d2 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 57548: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5754a: 246e fff8 moveal %fp@(-8),%a2 5754e: 4e5e unlk %fp 57550: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 57552: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 57556: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 5755a: b082 cmpl %d2,%d0 5755c: 623c bhis 5759a 5755e: d280 addl %d0,%d1 57560: b282 cmpl %d2,%d1 57562: 6536 bcss 5759a <== NEVER TAKEN return ( 57564: 2202 movel %d2,%d1 57566: 9280 subl %d0,%d1 57568: 2001 movel %d1,%d0 5756a: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 57570: 4a81 tstl %d1 57572: 6626 bnes 5759a RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 57574: 2f02 movel %d2,%sp@- 57576: 486a 0024 pea %a2@(36) 5757a: 4eb9 0005 a84c jsr 5a84c <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 57580: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 57584: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5758a: 242e fff4 movel %fp@(-12),%d2 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(); return RTEMS_SUCCESSFUL; 5758e: 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(); 57590: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57592: 246e fff8 moveal %fp@(-8),%a2 57596: 4e5e unlk %fp 57598: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 5759a: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 575a0: 242e fff4 movel %fp@(-12),%d2 _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 575a4: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 575a6: 246e fff8 moveal %fp@(-8),%a2 575aa: 4e5e unlk %fp ... =============================================================================== 00049e52 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 49e52: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 49e56: 4a39 0005 ec64 tstb 5ec64 49e5c: 6708 beqs 49e66 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 49e5e: 4ab9 0005 f5a8 tstl 5f5a8 <== NOT EXECUTED 49e64: 6704 beqs 49e6a <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 49e66: 4e5e unlk %fp 49e68: 4e75 rts if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 49e6a: 4879 0005 f5a8 pea 5f5a8 <== NOT EXECUTED 49e70: 42a7 clrl %sp@- <== NOT EXECUTED 49e72: 4878 0054 pea 54 <== NOT EXECUTED 49e76: 4878 0001 pea 1 <== NOT EXECUTED 49e7a: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 49e80: 4eb9 0004 6464 jsr 46464 <== 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) 49e86: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 49e8a: 4a80 tstl %d0 <== NOT EXECUTED 49e8c: 6610 bnes 49e9e <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 49e8e: 4eb9 0004 5fd4 jsr 45fd4 <== NOT EXECUTED rtems_pipe_no = now; } 49e94: 4e5e unlk %fp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; 49e96: 33c0 0005 f5b0 movew %d0,5f5b0 <== NOT EXECUTED } 49e9c: 4e75 rts <== NOT EXECUTED sc = rtems_semaphore_create( 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) rtems_fatal_error_occurred (sc); 49e9e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49ea0: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED =============================================================================== 00047798 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 47798: 4e56 ffec linkw %fp,#-20 4779c: 48d7 040c moveml %d2-%d3/%a2,%sp@ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 477a0: 486e fffc pea %fp@(-4) 477a4: 242e 0008 movel %fp@(8),%d2 477a8: 2f02 movel %d2,%sp@- 477aa: 4879 0006 1e48 pea 61e48 <_Rate_monotonic_Information> 477b0: 4eb9 0004 9ae0 jsr 49ae0 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 477b6: 4fef 000c lea %sp@(12),%sp 477ba: 2440 moveal %d0,%a2 477bc: 4aae fffc tstl %fp@(-4) 477c0: 661e bnes 477e0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 477c2: 2039 0006 1ffe movel 61ffe <_Thread_Executing>,%d0 477c8: b0aa 0040 cmpl %a2@(64),%d0 477cc: 671e beqs 477ec _Thread_Enable_dispatch(); 477ce: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> 477d4: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 477d6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477dc: 4e5e unlk %fp 477de: 4e75 rts the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 477e0: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 477e2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477e8: 4e5e unlk %fp 477ea: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 477ec: 4aae 000c tstl %fp@(12) 477f0: 6700 00ce beqw 478c0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 477f4: 203c 0000 0700 movel #1792,%d0 477fa: 40c3 movew %sr,%d3 477fc: 8083 orl %d3,%d0 477fe: 46c0 movew %d0,%sr switch ( the_period->state ) { 47800: 202a 0038 movel %a2@(56),%d0 47804: 7202 moveq #2,%d1 47806: b280 cmpl %d0,%d1 47808: 6700 00dc beqw 478e6 4780c: 123c 0004 moveb #4,%d1 47810: b280 cmpl %d0,%d1 47812: 6762 beqs 47876 47814: 4a80 tstl %d0 47816: 66c8 bnes 477e0 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 47818: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 4781a: 2f0a movel %a2,%sp@- 4781c: 2d40 fff8 movel %d0,%fp@(-8) 47820: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47826: 223c 0004 7bfc movel #293884,%d1 the_watchdog->id = id; 4782c: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47830: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47834: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 47838: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4783a: 2542 001c movel %d2,%a2@(28) 4783e: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47842: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 47846: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 4784a: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4784e: 486a 0010 pea %a2@(16) 47852: 4879 0006 201c pea 6201c <_Watchdog_Ticks_chain> 47858: 4eb9 0004 b5cc jsr 4b5cc <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 4785e: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47864: 202e fff8 movel %fp@(-8),%d0 47868: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4786c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47872: 4e5e unlk %fp 47874: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 47876: 2f0a movel %a2,%sp@- 47878: 4eb9 0004 767e jsr 4767e <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 4787e: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 47880: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 47882: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47884: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 47888: 2541 0038 movel %d1,%a2@(56) 4788c: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 47890: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47894: 486a 0010 pea %a2@(16) 47898: 4879 0006 201c pea 6201c <_Watchdog_Ticks_chain> 4789e: 2d40 fff8 movel %d0,%fp@(-8) 478a2: 4eb9 0004 b5cc jsr 4b5cc <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 478a8: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 478ae: 202e fff8 movel %fp@(-8),%d0 478b2: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478b6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 478bc: 4e5e unlk %fp 478be: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 478c0: 202a 0038 movel %a2@(56),%d0 478c4: 7204 moveq #4,%d1 478c6: b280 cmpl %d0,%d1 478c8: 6400 009c bccw 47966 478cc: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 478ce: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 478d2: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 478d8: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478dc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 478e2: 4e5e unlk %fp 478e4: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 478e6: 2f0a movel %a2,%sp@- 478e8: 4eb9 0004 767e jsr 4767e <_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; 478ee: 242e 000c movel %fp@(12),%d2 /* * 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; 478f2: 7001 moveq #1,%d0 the_period->next_length = length; 478f4: 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; 478f8: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 478fc: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 478fe: 2079 0006 1ffe moveal 61ffe <_Thread_Executing>,%a0 47904: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 4790a: 4878 4000 pea 4000 4790e: 2f08 movel %a0,%sp@- 47910: 4eb9 0004 acd0 jsr 4acd0 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 47916: 203c 0000 0700 movel #1792,%d0 4791c: 40c1 movew %sr,%d1 4791e: 8081 orl %d1,%d0 47920: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 47922: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 47924: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 47928: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 4792c: 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 ) 4792e: 7203 moveq #3,%d1 47930: 4fef 000c lea %sp@(12),%sp 47934: b280 cmpl %d0,%d1 47936: 6712 beqs 4794a _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 47938: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> 4793e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47940: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47946: 4e5e unlk %fp 47948: 4e75 rts /* * 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 ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 4794a: 4878 4000 pea 4000 4794e: 2f39 0006 1ffe movel 61ffe <_Thread_Executing>,%sp@- 47954: 4eb9 0004 9ff0 jsr 49ff0 <_Thread_Clear_state> 4795a: 508f addql #8,%sp _Thread_Enable_dispatch(); 4795c: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> 47962: 4280 clrl %d0 47964: 60da bras 47940 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 47966: 41f9 0005 f482 lea 5f482 ,%a0 4796c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 47970: 2d40 fff8 movel %d0,%fp@(-8) 47974: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> return( return_value ); 4797a: 202e fff8 movel %fp@(-8),%d0 4797e: 6000 ff5c braw 478dc ... =============================================================================== 00047984 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 47984: 4e56 ff78 linkw %fp,#-136 47988: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4798c: 262e 0008 movel %fp@(8),%d3 47990: 246e 000c moveal %fp@(12),%a2 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 47994: 4a8a tstl %a2 47996: 6700 0082 beqw 47a1a return; (*print)( context, "Period information by period\n" ); 4799a: 4879 0005 f496 pea 5f496 479a0: 2f03 movel %d3,%sp@- 479a2: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 479a4: 4879 0005 f4b4 pea 5f4b4 479aa: 2f03 movel %d3,%sp@- 479ac: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 479ae: 4879 0005 f4d6 pea 5f4d6 479b4: 2f03 movel %d3,%sp@- 479b6: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 479b8: 4879 0005 f4f9 pea 5f4f9 479be: 2f03 movel %d3,%sp@- 479c0: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 479c2: 4fef 001c lea %sp@(28),%sp 479c6: 2ebc 0005 f544 movel #390468,%sp@ 479cc: 2f03 movel %d3,%sp@- 479ce: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 479d0: 2439 0006 1e4e movel 61e4e <_Rate_monotonic_Information+0x6>,%d2 479d6: 508f addql #8,%sp 479d8: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2 479de: 623a bhis 47a1a <== NEVER TAKEN 479e0: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 479e2: 2a0e movel %fp,%d5 479e4: 0684 ffff ffa2 addil #-94,%d4 479ea: 47f9 0004 e168 lea 4e168 ,%a3 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 479f0: 4bf9 0004 e228 lea 4e228 ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 479f6: 5b85 subql #5,%d5 479f8: 49f9 0004 7cdc lea 47cdc ,%a4 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 479fe: 2e3c 0004 b1d4 movel #307668,%d7 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 47a04: 2f04 movel %d4,%sp@- 47a06: 2f02 movel %d2,%sp@- 47a08: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 47a0a: 508f addql #8,%sp 47a0c: 4a80 tstl %d0 47a0e: 6714 beqs 47a24 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 47a10: 5282 addql #1,%d2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 47a12: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2 47a18: 63ea blss 47a04 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 47a1a: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47a20: 4e5e unlk %fp 47a22: 4e75 rts status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 47a24: 486e ffda pea %fp@(-38) 47a28: 2f02 movel %d2,%sp@- 47a2a: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47a2c: 2f05 movel %d5,%sp@- 47a2e: 4878 0005 pea 5 47a32: 2f2e ffda movel %fp@(-38),%sp@- 47a36: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 47a38: 2f2e ffa6 movel %fp@(-90),%sp@- 47a3c: 2f2e ffa2 movel %fp@(-94),%sp@- 47a40: 2f05 movel %d5,%sp@- 47a42: 2f02 movel %d2,%sp@- 47a44: 4879 0005 f590 pea 5f590 47a4a: 2f03 movel %d3,%sp@- 47a4c: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 47a4e: 202e ffa2 movel %fp@(-94),%d0 47a52: 4fef 002c lea %sp@(44),%sp 47a56: 6618 bnes 47a70 (*print)( context, "\n" ); 47a58: 4879 0005 f42e pea 5f42e * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 47a5e: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 47a60: 2f03 movel %d3,%sp@- 47a62: 4e92 jsr %a2@ continue; 47a64: 508f addql #8,%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 47a66: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2 47a6c: 6396 blss 47a04 <== ALWAYS TAKEN 47a6e: 60aa bras 47a1a <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 47a70: 486e fff2 pea %fp@(-14) 47a74: 2047 moveal %d7,%a0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 47a76: 5282 addql #1,%d2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 47a78: 2f00 movel %d0,%sp@- 47a7a: 486e ffba pea %fp@(-70) 47a7e: 4e90 jsr %a0@ (*print)( context, 47a80: 202e fff6 movel %fp@(-10),%d0 47a84: 223c 0000 03e8 movel #1000,%d1 47a8a: 4c41 0800 remsl %d1,%d0,%d0 47a8e: 2c2e ffb6 movel %fp@(-74),%d6 47a92: 2f00 movel %d0,%sp@- 47a94: 2001 movel %d1,%d0 47a96: 2f2e fff2 movel %fp@(-14),%sp@- 47a9a: 4c40 6806 remsl %d0,%d6,%d6 47a9e: 202e ffae movel %fp@(-82),%d0 47aa2: 2246 moveal %d6,%a1 47aa4: 223c 0000 03e8 movel #1000,%d1 47aaa: 2f09 movel %a1,%sp@- 47aac: 2f2e ffb2 movel %fp@(-78),%sp@- 47ab0: 4c41 0800 remsl %d1,%d0,%d0 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 47ab4: 2c3c 0000 03e8 movel #1000,%d6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 47aba: 2f00 movel %d0,%sp@- 47abc: 2f2e ffaa movel %fp@(-86),%sp@- 47ac0: 4879 0005 f5a7 pea 5f5a7 47ac6: 2f03 movel %d3,%sp@- 47ac8: 4e92 jsr %a2@ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 47aca: 4fef 002c lea %sp@(44),%sp 47ace: 2047 moveal %d7,%a0 47ad0: 486e fff2 pea %fp@(-14) 47ad4: 2f2e ffa2 movel %fp@(-94),%sp@- 47ad8: 486e ffd2 pea %fp@(-46) 47adc: 4e90 jsr %a0@ (*print)( context, 47ade: 202e fff6 movel %fp@(-10),%d0 47ae2: 4c46 0800 remsl %d6,%d0,%d0 47ae6: 222e ffce movel %fp@(-50),%d1 47aea: 2f00 movel %d0,%sp@- 47aec: 2f2e fff2 movel %fp@(-14),%sp@- 47af0: 4c46 1801 remsl %d6,%d1,%d1 47af4: 202e ffc6 movel %fp@(-58),%d0 47af8: 2241 moveal %d1,%a1 47afa: 2f09 movel %a1,%sp@- 47afc: 2f2e ffca movel %fp@(-54),%sp@- 47b00: 4c46 0800 remsl %d6,%d0,%d0 47b04: 2f00 movel %d0,%sp@- 47b06: 2f2e ffc2 movel %fp@(-62),%sp@- 47b0a: 4879 0005 f5c6 pea 5f5c6 47b10: 2f03 movel %d3,%sp@- 47b12: 4e92 jsr %a2@ 47b14: 4fef 002c lea %sp@(44),%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 47b18: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2 47b1e: 6300 fee4 blsw 47a04 47b22: 6000 fef6 braw 47a1a <== NOT EXECUTED =============================================================================== 00047b40 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 47b40: 4e56 0000 linkw %fp,#0 47b44: 2039 0006 1f44 movel 61f44 <_Thread_Dispatch_disable_level>,%d0 47b4a: 5280 addql #1,%d0 47b4c: 2f0a movel %a2,%sp@- 47b4e: 23c0 0006 1f44 movel %d0,61f44 <_Thread_Dispatch_disable_level> 47b54: 2f02 movel %d2,%sp@- /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 47b56: 2439 0006 1e4e movel 61e4e <_Rate_monotonic_Information+0x6>,%d2 47b5c: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2 47b62: 6216 bhis 47b7a <== NEVER TAKEN 47b64: 45f9 0004 7b8c lea 47b8c ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 47b6a: 2f02 movel %d2,%sp@- * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 47b6c: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 47b6e: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 47b70: 588f addql #4,%sp 47b72: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2 47b78: 63f0 blss 47b6a /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 47b7a: 242e fff8 movel %fp@(-8),%d2 47b7e: 246e fffc moveal %fp@(-4),%a2 47b82: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 47b84: 4ef9 0004 a3c4 jmp 4a3c4 <_Thread_Enable_dispatch> ... =============================================================================== 00057e40 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 57e40: 4e56 ffec linkw %fp,#-20 57e44: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57e48: 262e 0008 movel %fp@(8),%d3 57e4c: 242e 000c movel %fp@(12),%d2 57e50: 246e 001c moveal %fp@(28),%a2 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 57e54: 4a83 tstl %d3 57e56: 6700 0096 beqw 57eee return RTEMS_INVALID_NAME; if ( !starting_address ) 57e5a: 4a82 tstl %d2 57e5c: 670a beqs 57e68 return RTEMS_INVALID_ADDRESS; if ( !id ) 57e5e: 4a8a tstl %a2 57e60: 6706 beqs 57e68 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 57e62: 7003 moveq #3,%d0 57e64: c082 andl %d2,%d0 57e66: 670c beqs 57e74 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 57e68: 7009 moveq #9,%d0 } 57e6a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57e70: 4e5e unlk %fp 57e72: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 57e74: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 57e7a: 4eb9 0005 a7b8 jsr 5a7b8 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 57e80: 4879 0007 f43c pea 7f43c <_Region_Information> 57e86: 4eb9 0005 bd9c jsr 5bd9c <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 57e8c: 508f addql #8,%sp 57e8e: 2640 moveal %d0,%a3 57e90: 4a80 tstl %d0 57e92: 6766 beqs 57efa return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 57e94: 2f2e 0014 movel %fp@(20),%sp@- 57e98: 2f2e 0010 movel %fp@(16),%sp@- 57e9c: 2f02 movel %d2,%sp@- 57e9e: 486b 0068 pea %a3@(104) 57ea2: 4eb9 0005 b820 jsr 5b820 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 57ea8: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 57eac: 2740 005c movel %d0,%a3@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 57eb0: 6662 bnes 57f14 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 57eb2: 2f0b movel %a3,%sp@- 57eb4: 4879 0007 f43c pea 7f43c <_Region_Information> 57eba: 103c 0008 moveb #8,%d0 57ebe: 2d40 fffc movel %d0,%fp@(-4) 57ec2: 4eb9 0005 c0d4 jsr 5c0d4 <_Objects_Free> 57ec8: 202e fffc movel %fp@(-4),%d0 57ecc: 508f addql #8,%sp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57ece: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 57ed4: 2d40 fffc movel %d0,%fp@(-4) 57ed8: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 57ede: 202e fffc movel %fp@(-4),%d0 57ee2: 588f addql #4,%sp } 57ee4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57eea: 4e5e unlk %fp 57eec: 4e75 rts ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 57eee: 7003 moveq #3,%d0 } } _RTEMS_Unlock_allocator(); return return_status; } 57ef0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57ef6: 4e5e unlk %fp 57ef8: 4e75 rts *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57efa: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 57f00: 7005 moveq #5,%d0 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57f02: 2d40 fffc movel %d0,%fp@(-4) 57f06: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 57f0c: 202e fffc movel %fp@(-4),%d0 57f10: 588f addql #4,%sp 57f12: 60d0 bras 57ee4 return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 57f14: 2742 0050 movel %d2,%a3@(80) the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57f18: 222e 0018 movel %fp@(24),%d1 } else { the_region->starting_address = starting_address; the_region->length = length; 57f1c: 202e 0010 movel %fp@(16),%d0 the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57f20: e489 lsrl #2,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 57f22: 242e 0014 movel %fp@(20),%d2 the_region->attribute_set = attribute_set; 57f26: 206e 0018 moveal %fp@(24),%a0 } else { the_region->starting_address = starting_address; the_region->length = length; 57f2a: 2740 0054 movel %d0,%a3@(84) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57f2e: 4280 clrl %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 57f30: 2742 0058 movel %d2,%a3@(88) the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57f34: 7401 moveq #1,%d2 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; 57f36: 2748 0060 movel %a0,%a3@(96) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57f3a: c481 andl %d1,%d2 the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; 57f3c: 42ab 0064 clrl %a3@(100) _Thread_queue_Initialize( 57f40: 4878 0006 pea 6 57f44: 4878 0040 pea 40 57f48: 2f02 movel %d2,%sp@- 57f4a: 486b 0010 pea %a3@(16) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 57f4e: 4282 clrl %d2 57f50: 2d40 fffc movel %d0,%fp@(-4) 57f54: 4eb9 0005 d35c jsr 5d35c <_Thread_queue_Initialize> 57f5a: 222b 0008 movel %a3@(8),%d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57f5e: 4fef 0010 lea %sp@(16),%sp 57f62: 2079 0007 f454 moveal 7f454 <_Region_Information+0x18>,%a0 57f68: 3401 movew %d1,%d2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 57f6a: 2743 000c movel %d3,%a3@(12) 57f6e: 202e fffc movel %fp@(-4),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 57f72: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 57f76: 2481 movel %d1,%a2@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57f78: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 57f7e: 2d40 fffc movel %d0,%fp@(-4) 57f82: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 57f88: 202e fffc movel %fp@(-4),%d0 57f8c: 588f addql #4,%sp 57f8e: 6000 ff54 braw 57ee4 ... =============================================================================== 00058044 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 58044: 4e56 fff8 linkw %fp,#-8 58048: 2f0a movel %a2,%sp@- 5804a: 2f02 movel %d2,%sp@- 5804c: 242e 000c movel %fp@(12),%d2 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 58050: 677e beqs 580d0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 58052: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 58058: 4eb9 0005 a7b8 jsr 5a7b8 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 5805e: 486e fff8 pea %fp@(-8) 58062: 2f2e 0008 movel %fp@(8),%sp@- 58066: 4879 0007 f43c pea 7f43c <_Region_Information> 5806c: 4eb9 0005 c238 jsr 5c238 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 58072: 4fef 0010 lea %sp@(16),%sp 58076: 2440 moveal %d0,%a2 58078: 4aae fff8 tstl %fp@(-8) 5807c: 6640 bnes 580be case OBJECTS_LOCAL: heap_status = _Heap_Extend( 5807e: 486e fffc pea %fp@(-4) 58082: 2f2e 0010 movel %fp@(16),%sp@- 58086: 2f02 movel %d2,%sp@- 58088: 486a 0068 pea %a2@(104) 5808c: 4eb9 0005 b510 jsr 5b510 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 58092: 4fef 0010 lea %sp@(16),%sp 58096: 4a80 tstl %d0 58098: 6748 beqs 580e2 the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 5809a: 7201 moveq #1,%d1 5809c: b280 cmpl %d0,%d1 5809e: 6760 beqs 58100 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 580a0: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 580a6: 7418 moveq #24,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 580a8: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 580ae: 588f addql #4,%sp } 580b0: 2002 movel %d2,%d0 580b2: 242e fff0 movel %fp@(-16),%d2 580b6: 246e fff4 moveal %fp@(-12),%a2 580ba: 4e5e unlk %fp 580bc: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 580be: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 580c4: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 580c6: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 580cc: 588f addql #4,%sp 580ce: 60e0 bras 580b0 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 580d0: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 580d4: 2002 movel %d2,%d0 580d6: 242e fff0 movel %fp@(-16),%d2 580da: 246e fff4 moveal %fp@(-12),%a2 580de: 4e5e unlk %fp 580e0: 4e75 rts length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 580e2: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 580e6: d1aa 005c addl %d0,%a2@(92) 580ea: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 580ec: d1aa 0054 addl %d0,%a2@(84) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 580f0: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 580f6: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 580fc: 588f addql #4,%sp 580fe: 60b0 bras 580b0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 58100: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 58106: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 58108: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 5810e: 588f addql #4,%sp 58110: 609e bras 580b0 ... =============================================================================== 00058398 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 58398: 4e56 fffc linkw %fp,#-4 5839c: 2f03 movel %d3,%sp@- 5839e: 262e 0010 movel %fp@(16),%d3 583a2: 2f02 movel %d2,%sp@- 583a4: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 583a8: 6700 0092 beqw 5843c return RTEMS_INVALID_ADDRESS; if ( !size ) 583ac: 4a83 tstl %d3 583ae: 6700 008c beqw 5843c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 583b2: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 583b8: 4eb9 0005 a7b8 jsr 5a7b8 <_API_Mutex_Lock> 583be: 486e fffc pea %fp@(-4) 583c2: 2f2e 0008 movel %fp@(8),%sp@- 583c6: 4879 0007 f43c pea 7f43c <_Region_Information> 583cc: 4eb9 0005 c238 jsr 5c238 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 583d2: 222e fffc movel %fp@(-4),%d1 583d6: 4fef 0010 lea %sp@(16),%sp 583da: 6636 bnes 58412 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 583dc: 2f03 movel %d3,%sp@- 583de: 2040 moveal %d0,%a0 583e0: 2f02 movel %d2,%sp@- 583e2: 4868 0068 pea %a0@(104) 583e6: 4eb9 0005 bc74 jsr 5bc74 <_Heap_Size_of_alloc_area> 583ec: 4fef 000c lea %sp@(12),%sp 583f0: 4a00 tstb %d0 583f2: 6624 bnes 58418 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 583f4: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 583fa: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 583fc: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 58402: 588f addql #4,%sp <== NOT EXECUTED } 58404: 2002 movel %d2,%d0 58406: 242e fff4 movel %fp@(-12),%d2 5840a: 262e fff8 movel %fp@(-8),%d3 5840e: 4e5e unlk %fp 58410: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 58412: 7001 moveq #1,%d0 58414: b081 cmpl %d1,%d0 58416: 6712 beqs 5842a <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 58418: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 5841e: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 58420: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 58426: 588f addql #4,%sp 58428: 60da bras 58404 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5842a: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 58430: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 58432: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> return return_status; 58438: 588f addql #4,%sp 5843a: 60c8 bras 58404 5843c: 7409 moveq #9,%d2 } 5843e: 2002 movel %d2,%d0 58440: 242e fff4 movel %fp@(-12),%d2 58444: 262e fff8 movel %fp@(-8),%d3 58448: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046464 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 46464: 4e56 ffd4 linkw %fp,#-44 46468: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4646c: 262e 0008 movel %fp@(8),%d3 46470: 242e 0010 movel %fp@(16),%d2 46474: 246e 0018 moveal %fp@(24),%a2 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 46478: 4a83 tstl %d3 4647a: 6748 beqs 464c4 return RTEMS_INVALID_NAME; if ( !id ) 4647c: 4a8a tstl %a2 4647e: 6700 00ea beqw 4656a * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 46482: 2002 movel %d2,%d0 46484: 0280 0000 00c0 andil #192,%d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 4648a: 6744 beqs 464d0 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 4648c: 7230 moveq #48,%d1 4648e: 7810 moveq #16,%d4 46490: c282 andl %d2,%d1 46492: b881 cmpl %d1,%d4 46494: 670c beqs 464a2 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 46496: 700b moveq #11,%d0 } 46498: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 4649e: 4e5e unlk %fp 464a0: 4e75 rts #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 464a2: 44c2 movew %d2,%ccr 464a4: 66f0 bnes 46496 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 464a6: 0c80 0000 00c0 cmpil #192,%d0 464ac: 67e8 beqs 46496 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 464ae: 7001 moveq #1,%d0 464b0: b0ae 000c cmpl %fp@(12),%d0 464b4: 6420 bccs 464d6 464b6: 103c 000a moveb #10,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 464ba: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 464c0: 4e5e unlk %fp 464c2: 4e75 rts register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 464c4: 7003 moveq #3,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 464c6: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 464cc: 4e5e unlk %fp 464ce: 4e75 rts */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 464d0: 7830 moveq #48,%d4 464d2: c882 andl %d2,%d4 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 464d4: 66d8 bnes 464ae rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 464d6: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 464dc: 5280 addql #1,%d0 464de: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 464e4: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 464ea: 4eb9 0004 7b0c jsr 47b0c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 464f0: 588f addql #4,%sp 464f2: 2640 moveal %d0,%a3 464f4: 4a80 tstl %d0 464f6: 6700 00d8 beqw 465d0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 464fa: 2742 0010 movel %d2,%a3@(16) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 464fe: 4a84 tstl %d4 46500: 6774 beqs 46576 /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 46502: 44c2 movew %d2,%ccr 46504: 56c0 sne %d0 46506: 49c0 extbl %d0 46508: 5280 addql #1,%d0 4650a: 2d40 fff0 movel %d0,%fp@(-16) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 4650e: 7010 moveq #16,%d0 46510: b084 cmpl %d4,%d0 46512: 6700 00ce beqw 465e2 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 46516: 7202 moveq #2,%d1 the_mutex_attr.only_owner_release = false; 46518: 4204 clrb %d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 4651a: 2d41 ffea movel %d1,%fp@(-22) the_mutex_attr.only_owner_release = false; 4651e: 1d44 ffee moveb %d4,%fp@(-18) } mutex_status = _CORE_mutex_Initialize( 46522: 7001 moveq #1,%d0 46524: b0ae 000c cmpl %fp@(12),%d0 46528: 57c0 seq %d0 4652a: 49c0 extbl %d0 4652c: 4480 negl %d0 4652e: 2f00 movel %d0,%sp@- 46530: 486e ffea pea %fp@(-22) 46534: 486b 0014 pea %a3@(20) 46538: 4eb9 0004 71bc jsr 471bc <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 4653e: 4fef 000c lea %sp@(12),%sp 46542: 7206 moveq #6,%d1 46544: b280 cmpl %d0,%d1 46546: 665e bnes 465a6 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 46548: 2f0b movel %a3,%sp@- 4654a: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 46550: 4eb9 0004 7e44 jsr 47e44 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 46556: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 4655c: 508f addql #8,%sp (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 4655e: 7013 moveq #19,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 46560: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 46566: 4e5e unlk %fp 46568: 4e75 rts CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4656a: 7009 moveq #9,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4656c: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 46572: 4e5e unlk %fp 46574: 4e75 rts * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 46576: 2f2e 000c movel %fp@(12),%sp@- */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 4657a: 72ff moveq #-1,%d1 * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 4657c: 486e fff8 pea %fp@(-8) 46580: 486b 0014 pea %a3@(20) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 46584: 44c2 movew %d2,%ccr 46586: 56c0 sne %d0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 46588: 2d41 fff8 movel %d1,%fp@(-8) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4658c: 49c0 extbl %d0 4658e: 5280 addql #1,%d0 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46590: 42ae ffea clrl %fp@(-22) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 46594: 2d40 fffc movel %d0,%fp@(-4) /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 46598: 42ae fff4 clrl %fp@(-12) _CORE_semaphore_Initialize( 4659c: 4eb9 0004 7504 jsr 47504 <_CORE_semaphore_Initialize> 465a2: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 465a6: 202b 0008 movel %a3@(8),%d0 465aa: 4281 clrl %d1 465ac: 2079 0005 fd50 moveal 5fd50 <_Semaphore_Information+0x18>,%a0 465b2: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 465b4: 2743 000c movel %d3,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 465b8: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 465bc: 2480 movel %d0,%a2@ the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 465be: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 465c4: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 465ca: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 465cc: 4e5e unlk %fp 465ce: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 465d0: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> 465d6: 7005 moveq #5,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 465d8: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 465de: 4e5e unlk %fp 465e0: 4e75 rts else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 465e2: 42ae ffea clrl %fp@(-22) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 465e6: 7801 moveq #1,%d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 465e8: 4201 clrb %d1 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 465ea: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 465f0: 1d41 ffee moveb %d1,%fp@(-18) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 465f4: b8ae fff0 cmpl %fp@(-16),%d4 465f8: 6600 ff28 bnew 46522 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 465fc: 0802 0006 btst #6,%d2 46600: 6712 beqs 46614 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 46602: 103c 0002 moveb #2,%d0 the_mutex_attr.only_owner_release = true; 46606: 7201 moveq #1,%d1 the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 46608: 2d40 fff0 movel %d0,%fp@(-16) the_mutex_attr.only_owner_release = true; 4660c: 1d41 ffee moveb %d1,%fp@(-18) 46610: 6000 ff10 braw 46522 } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 46614: 4a02 tstb %d2 46616: 6c00 ff0a bgew 46522 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 4661a: 7803 moveq #3,%d4 the_mutex_attr.only_owner_release = true; 4661c: 7001 moveq #1,%d0 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 4661e: 2d44 fff0 movel %d4,%fp@(-16) the_mutex_attr.only_owner_release = true; 46622: 1d40 ffee moveb %d0,%fp@(-18) 46626: 6000 fefa braw 46522 ... =============================================================================== 0004662c : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 4662c: 4e56 fffc linkw %fp,#-4 46630: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 46632: 486e fffc pea %fp@(-4) 46636: 2f2e 0008 movel %fp@(8),%sp@- 4663a: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 46640: 4eb9 0004 7fa8 jsr 47fa8 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 46646: 4fef 000c lea %sp@(12),%sp 4664a: 2440 moveal %d0,%a2 4664c: 4aae fffc tstl %fp@(-4) 46650: 670a beqs 4665c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46652: 246e fff8 moveal %fp@(-8),%a2 { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 46656: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46658: 4e5e unlk %fp 4665a: 4e75 rts 4665c: 7030 moveq #48,%d0 4665e: c0aa 0010 andl %a2@(16),%d0 the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 46662: 6760 beqs 466c4 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 46664: 4aaa 0062 tstl %a2@(98) 46668: 6616 bnes 46680 4666a: 7220 moveq #32,%d1 4666c: b280 cmpl %d0,%d1 4666e: 6710 beqs 46680 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 46670: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46676: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 4667a: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4667c: 4e5e unlk %fp 4667e: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 46680: 4878 0004 pea 4 46684: 42a7 clrl %sp@- 46686: 486a 0014 pea %a2@(20) 4668a: 4eb9 0004 71b0 jsr 471b0 <_CORE_mutex_Flush> 46690: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 46694: 2f0a movel %a2,%sp@- 46696: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 4669c: 4eb9 0004 7b9c jsr 47b9c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 466a2: 2f0a movel %a2,%sp@- 466a4: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 466aa: 4eb9 0004 7e44 jsr 47e44 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 466b0: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 466b6: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 466ba: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466bc: 246e fff8 moveal %fp@(-8),%a2 466c0: 4e5e unlk %fp 466c2: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 466c4: 4878 0002 pea 2 466c8: 42a7 clrl %sp@- 466ca: 486a 0014 pea %a2@(20) 466ce: 4eb9 0004 74f8 jsr 474f8 <_CORE_semaphore_Flush> 466d4: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 466d8: 2f0a movel %a2,%sp@- 466da: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 466e0: 4eb9 0004 7b9c jsr 47b9c <_Objects_Close> 466e6: 2f0a movel %a2,%sp@- 466e8: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 466ee: 4eb9 0004 7e44 jsr 47e44 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 466f4: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 466fa: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 466fe: 4280 clrl %d0 46700: 60ba bras 466bc ... =============================================================================== 00050710 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 50710: 4e56 fffc linkw %fp,#-4 50714: 486e fffc pea %fp@(-4) 50718: 2f2e 0008 movel %fp@(8),%sp@- 5071c: 4879 0006 3d60 pea 63d60 <_Semaphore_Information> 50722: 4eb9 0004 95cc jsr 495cc <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 50728: 4fef 000c lea %sp@(12),%sp 5072c: 4aae fffc tstl %fp@(-4) 50730: 6706 beqs 50738 50732: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50734: 4e5e unlk %fp 50736: 4e75 rts the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 50738: 7230 moveq #48,%d1 5073a: 2040 moveal %d0,%a0 5073c: c2a8 0010 andl %a0@(16),%d1 50740: 6720 beqs 50762 _CORE_mutex_Flush( 50742: 4878 0001 pea 1 50746: 42a7 clrl %sp@- 50748: 4868 0014 pea %a0@(20) 5074c: 4eb9 0004 87d4 jsr 487d4 <_CORE_mutex_Flush> 50752: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50756: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> 5075c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5075e: 4e5e unlk %fp 50760: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 50762: 4878 0001 pea 1 50766: 2040 moveal %d0,%a0 50768: 42a7 clrl %sp@- 5076a: 4868 0014 pea %a0@(20) 5076e: 4eb9 0004 8b1c jsr 48b1c <_CORE_semaphore_Flush> 50774: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50778: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> 5077e: 4280 clrl %d0 50780: 60dc bras 5075e ... =============================================================================== 00058b58 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 58b58: 4e56 fffc linkw %fp,#-4 58b5c: 2f03 movel %d3,%sp@- 58b5e: 2f02 movel %d2,%sp@- 58b60: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 58b64: 660e bnes 58b74 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58b66: 242e fff4 movel %fp@(-12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 58b6a: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58b6c: 262e fff8 movel %fp@(-8),%d3 58b70: 4e5e unlk %fp 58b72: 4e75 rts ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4eb9 0005 cc34 jsr 5cc34 <_Thread_Get> switch ( location ) { 58b82: 508f addql #8,%sp 58b84: 4aae fffc tstl %fp@(-4) 58b88: 670e beqs 58b98 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58b8a: 242e fff4 movel %fp@(-12),%d2 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 58b8e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58b90: 262e fff8 movel %fp@(-8),%d3 58b94: 4e5e unlk %fp 58b96: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 58b98: 2240 moveal %d0,%a1 58b9a: 2069 0108 moveal %a1@(264),%a0 asr = &api->Signal; 58b9e: 4aa8 000a tstl %a0@(10) 58ba2: 6770 beqs 58c14 <== NEVER TAKEN if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 58ba4: 4a28 0008 tstb %a0@(8) 58ba8: 673e beqs 58be8 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 58baa: 223c 0000 0700 movel #1792,%d1 58bb0: 40c3 movew %sr,%d3 58bb2: 8283 orl %d3,%d1 58bb4: 46c1 movew %d1,%sr *signal_set |= signals; 58bb6: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 58bba: 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 ) ) 58bbc: 2239 0007 f5d2 movel 7f5d2 <_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; 58bc2: 7401 moveq #1,%d2 58bc4: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 58bc8: 4a81 tstl %d1 58bca: 6708 beqs 58bd4 58bcc: b0b9 0007 f5f2 cmpl 7f5f2 <_Thread_Executing>,%d0 58bd2: 6730 beqs 58c04 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 58bd4: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 58bda: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58bdc: 242e fff4 movel %fp@(-12),%d2 58be0: 262e fff8 movel %fp@(-8),%d3 58be4: 4e5e unlk %fp 58be6: 4e75 rts rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 58be8: 203c 0000 0700 movel #1792,%d0 58bee: 40c1 movew %sr,%d1 58bf0: 8081 orl %d1,%d0 58bf2: 46c0 movew %d0,%sr *signal_set |= signals; 58bf4: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 58bf8: 46c1 movew %d1,%sr if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 58bfa: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 58c00: 4280 clrl %d0 58c02: 60d8 bras 58bdc _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 ) ) _ISR_Signals_to_thread_executing = true; 58c04: 13c2 0007 f67c moveb %d2,7f67c <_ISR_Signals_to_thread_executing> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 58c0a: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 58c10: 4280 clrl %d0 58c12: 60c8 bras 58bdc return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 58c14: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58c1a: 242e fff4 movel %fp@(-12),%d2 _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 58c1e: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58c20: 262e fff8 movel %fp@(-8),%d3 58c24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042090 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 42090: 4e56 0000 linkw %fp,#0 42094: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 42098: 4aa8 0008 tstl %a0@(8) 4209c: 672c beqs 420ca <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 4209e: 2068 00c0 moveal %a0@(192),%a0 420a2: 43f9 0006 0348 lea 60348 ,%a1 420a8: 2151 0008 movel %a1@,%a0@(8) 420ac: 43f9 0006 034c lea 6034c ,%a1 420b2: 2151 000c movel %a1@,%a0@(12) 420b6: 43f9 0006 0350 lea 60350 ,%a1 420bc: 2151 0010 movel %a1@,%a0@(16) 420c0: 43f9 0006 0354 lea 60354 ,%a1 420c6: 2151 0014 movel %a1@,%a0@(20) } 420ca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004252e : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 4252e: 4e56 0000 linkw %fp,#0 42532: 2f0a movel %a2,%sp@- 42534: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 42538: 4eb9 0004 24c8 jsr 424c8 if (the_thread) 4253e: 4a8a tstl %a2 42540: 6716 beqs 42558 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 42542: 2f2a 00bc movel %a2@(188),%sp@- 42546: 4878 00a5 pea a5 4254a: 2f2a 00c0 movel %a2@(192),%sp@- 4254e: 4eb9 0005 0014 jsr 50014 42554: 4fef 000c lea %sp@(12),%sp return true; } 42558: 246e fffc moveal %fp@(-4),%a2 4255c: 4e5e unlk %fp 4255e: 7001 moveq #1,%d0 ... =============================================================================== 000423b4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 423b4: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 423b8: 2279 0006 057a moveal 6057a <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 423be: 2069 00c0 moveal %a1@(192),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 423c2: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 423c4: b1ce cmpal %fp,%a0 423c6: 6354 blss 4241c 423c8: 4202 clrb %d2 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 423ca: 4ab9 0005 fb38 tstl 5fb38 423d0: 662a bnes 423fc <== ALWAYS TAKEN 423d2: 7001 moveq #1,%d0 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 423d4: 4a02 tstb %d2 423d6: 6704 beqs 423dc <== NEVER TAKEN 423d8: 4a00 tstb %d0 423da: 664e bnes 4242a return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 423dc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 423e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 423e4: 2f39 0006 057a movel 6057a <_Thread_Executing>,%sp@- <== NOT EXECUTED 423ea: 4eb9 0004 2304 jsr 42304 <== NOT EXECUTED return true; } 423f0: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; 423f4: 508f addql #8,%sp <== NOT EXECUTED } 423f6: 4e5e unlk %fp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 423f8: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 423fa: 4e75 rts <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 423fc: 4878 0010 pea 10 42400: 4879 0006 0348 pea 60348 42406: 4868 0008 pea %a0@(8) 4240a: 4eb9 0004 ff2c jsr 4ff2c 42410: 4fef 000c lea %sp@(12),%sp 42414: 4a80 tstl %d0 42416: 57c0 seq %d0 42418: 4480 negl %d0 4241a: 60b8 bras 423d4 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 4241c: 2008 movel %a0,%d0 4241e: d0a9 00bc addl %a1@(188),%d0 42422: b08e cmpl %fp,%d0 42424: 54c2 scc %d2 42426: 4482 negl %d2 42428: 60a0 bras 423ca /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 4242a: 242e fffc movel %fp@(-4),%d2 4242e: 4e5e unlk %fp } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 42430: 4200 clrb %d0 <== NOT EXECUTED /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } =============================================================================== 000422ec : void rtems_stack_checker_report_usage( void ) { 422ec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 422f0: 4879 0004 41b0 pea 441b0 <== NOT EXECUTED 422f6: 42a7 clrl %sp@- <== NOT EXECUTED 422f8: 4eb9 0004 228a jsr 4228a <== NOT EXECUTED 422fe: 508f addql #8,%sp <== NOT EXECUTED } 42300: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004228a : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 4228a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4228e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42290: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 42294: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 42296: 4879 0005 d58c pea 5d58c <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 4229c: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 422a0: 23ca 0005 fb40 movel %a2,5fb40 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 422a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 422a8: 23c2 0005 fb3c movel %d2,5fb3c <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 422ae: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 422b0: 4879 0005 d5a3 pea 5d5a3 <== NOT EXECUTED 422b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 422b8: 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 ); 422ba: 4879 0004 2102 pea 42102 <== NOT EXECUTED 422c0: 4eb9 0004 7f90 jsr 47f90 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 422c6: 4878 ffff pea ffffffff <== NOT EXECUTED 422ca: 4eb9 0004 2102 jsr 42102 <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 422d0: 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; 422d4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 422d8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 422dc: 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; 422de: 42b9 0005 fb3c clrl 5fb3c <== NOT EXECUTED print_handler = NULL; 422e4: 42b9 0005 fb40 clrl 5fb40 <== NOT EXECUTED } =============================================================================== 00042434 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 42434: 4e56 0000 linkw %fp,#0 42438: 2f0a movel %a2,%sp@- 4243a: 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; 4243e: 222a 00c0 movel %a2@(192),%d1 42442: 5081 addql #8,%d1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 42444: 202a 00c0 movel %a2@(192),%d0 42448: b08e cmpl %fp,%d0 4244a: 6208 bhis 42454 <== NEVER TAKEN void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 4244c: d0aa 00bc addl %a2@(188),%d0 42450: b08e cmpl %fp,%d0 42452: 6436 bccs 4248a <== ALWAYS TAKEN /* * 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, 42454: 4878 0010 pea 10 <== NOT EXECUTED 42458: 4879 0006 0348 pea 60348 <== NOT EXECUTED 4245e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 42460: 4eb9 0004 ff2c jsr 4ff2c <== NOT EXECUTED 42466: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4246a: 4a80 tstl %d0 <== NOT EXECUTED 4246c: 57c0 seq %d0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 4246e: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 42472: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 42476: 4480 negl %d0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 42478: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4247e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 42482: 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 ); 42484: 4ef9 0004 2304 jmp 42304 <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 4248a: 4878 0010 pea 10 4248e: 4879 0006 0348 pea 60348 42494: 2f01 movel %d1,%sp@- 42496: 4eb9 0004 ff2c jsr 4ff2c 4249c: 4fef 000c lea %sp@(12),%sp (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 424a0: 4a80 tstl %d0 424a2: 671c beqs 424c0 <== ALWAYS TAKEN Stack_check_report_blown_task( running, pattern_ok ); 424a4: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 424a8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 424ac: 4200 clrb %d0 <== NOT EXECUTED Stack_check_report_blown_task( running, pattern_ok ); 424ae: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 424b4: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 424b8: 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 ); 424ba: 4ef9 0004 2304 jmp 42304 <== NOT EXECUTED } } 424c0: 246e fffc moveal %fp@(-4),%a2 424c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d4d0 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { 4d4d0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d4d4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d4d8: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d4dc: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d4e0: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED double result; char *end; if ( !n ) 4d4e4: 4a8a tstl %a2 <== NOT EXECUTED 4d4e6: 6700 00ba beqw 4d5a2 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4d4ea: 49f9 0004 fa18 lea 4fa18 <__errno>,%a4 <== NOT EXECUTED 4d4f0: 4e94 jsr %a4@ <== NOT EXECUTED *n = 0; 4d4f2: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d4f4: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4d4f6: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d4f8: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; result = strtod( s, &end ); 4d4fa: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d4fe: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d500: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED result = strtod( s, &end ); 4d504: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d506: 4eb9 0005 246c jsr 5246c <== NOT EXECUTED if ( endptr ) 4d50c: 508f addql #8,%sp <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtod( s, &end ); 4d50e: 2600 movel %d0,%d3 <== NOT EXECUTED 4d510: 2801 movel %d1,%d4 <== NOT EXECUTED if ( endptr ) 4d512: 4a8b tstl %a3 <== NOT EXECUTED 4d514: 6704 beqs 4d51a <== NOT EXECUTED *endptr = end; 4d516: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED if ( end == s ) 4d51a: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4d51e: 6776 beqs 4d596 <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d520: 4e94 jsr %a4@ <== NOT EXECUTED 4d522: 7222 moveq #34,%d1 <== NOT EXECUTED 4d524: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d526: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d528: 6712 beqs 4d53c <== NOT EXECUTED (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; 4d52a: 2483 movel %d3,%a2@ <== NOT EXECUTED 4d52c: 4280 clrl %d0 <== NOT EXECUTED 4d52e: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4d532: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d538: 4e5e unlk %fp <== NOT EXECUTED 4d53a: 4e75 rts <== NOT EXECUTED *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d53c: 42a7 clrl %sp@- <== NOT EXECUTED 4d53e: 42a7 clrl %sp@- <== NOT EXECUTED 4d540: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d542: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d544: 4eb9 0004 2eb4 jsr 42eb4 <__eqdf2> <== NOT EXECUTED 4d54a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d54e: 4a80 tstl %d0 <== NOT EXECUTED 4d550: 6738 beqs 4d58a <== NOT EXECUTED 4d552: 4878 ffff pea ffffffff <== NOT EXECUTED 4d556: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d55c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d55e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d560: 4eb9 0005 d268 jsr 5d268 <__gtdf2> <== NOT EXECUTED 4d566: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d56a: 4a80 tstl %d0 <== NOT EXECUTED 4d56c: 6e1c bgts 4d58a <== NOT EXECUTED 4d56e: 4878 ffff pea ffffffff <== NOT EXECUTED 4d572: 2f3c ffef ffff movel #-1048577,%sp@- <== NOT EXECUTED 4d578: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d57a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d57c: 4eb9 0005 d2b0 jsr 5d2b0 <__ltdf2> <== NOT EXECUTED 4d582: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d586: 4a80 tstl %d0 <== NOT EXECUTED 4d588: 6ca0 bges 4d52a <== NOT EXECUTED (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 4d58a: 700a moveq #10,%d0 <== NOT EXECUTED } 4d58c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d592: 4e5e unlk %fp <== NOT EXECUTED 4d594: 4e75 rts <== NOT EXECUTED result = strtod( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) 4d596: 700b moveq #11,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4d598: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d59e: 4e5e unlk %fp <== NOT EXECUTED 4d5a0: 4e75 rts <== NOT EXECUTED ) { double result; char *end; if ( !n ) 4d5a2: 7009 moveq #9,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4d5a4: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5aa: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004d5b0 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { 4d5b0: 4e56 ffe8 linkw %fp,#-24 4d5b4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d5b8: 242e 0008 movel %fp@(8),%d2 4d5bc: 246e 000c moveal %fp@(12),%a2 4d5c0: 266e 0010 moveal %fp@(16),%a3 float result; char *end; if ( !n ) 4d5c4: 4a8a tstl %a2 4d5c6: 6700 009e beqw 4d666 return RTEMS_INVALID_ADDRESS; errno = 0; 4d5ca: 49f9 0004 fa18 lea 4fa18 <__errno>,%a4 4d5d0: 4e94 jsr %a4@ 4d5d2: 2040 moveal %d0,%a0 4d5d4: 4290 clrl %a0@ *n = 0; result = strtof( s, &end ); 4d5d6: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d5da: 24bc 0000 0000 movel #0,%a2@ result = strtof( s, &end ); 4d5e0: 2f02 movel %d2,%sp@- 4d5e2: 4eb9 0005 240e jsr 5240e if ( endptr ) 4d5e8: 508f addql #8,%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtof( s, &end ); 4d5ea: 2600 movel %d0,%d3 if ( endptr ) 4d5ec: 4a8b tstl %a3 4d5ee: 6704 beqs 4d5f4 *endptr = end; 4d5f0: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4d5f4: b4ae fffc cmpl %fp@(-4),%d2 4d5f8: 6760 beqs 4d65a return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d5fa: 4e94 jsr %a4@ 4d5fc: 7222 moveq #34,%d1 4d5fe: 2040 moveal %d0,%a0 4d600: b290 cmpl %a0@,%d1 4d602: 670e beqs 4d612 (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; 4d604: 2483 movel %d3,%a2@ 4d606: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d608: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d60e: 4e5e unlk %fp 4d610: 4e75 rts *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d612: 2f3c 0000 0000 movel #0,%sp@- 4d618: 2f03 movel %d3,%sp@- 4d61a: 4eb9 0004 2ed8 jsr 42ed8 <__eqsf2> 4d620: 508f addql #8,%sp 4d622: 4a80 tstl %d0 4d624: 6728 beqs 4d64e <== NEVER TAKEN 4d626: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d62c: 2f03 movel %d3,%sp@- 4d62e: 4eb9 0005 d2f8 jsr 5d2f8 <__gtsf2> 4d634: 508f addql #8,%sp 4d636: 4a80 tstl %d0 4d638: 6e14 bgts 4d64e <== NEVER TAKEN 4d63a: 2f3c ff7f ffff movel #-8388609,%sp@- 4d640: 2f03 movel %d3,%sp@- 4d642: 4eb9 0005 d314 jsr 5d314 <__ltsf2> 4d648: 508f addql #8,%sp 4d64a: 4a80 tstl %d0 4d64c: 6cb6 bges 4d604 <== ALWAYS TAKEN (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 4d64e: 700a moveq #10,%d0 <== NOT EXECUTED } 4d650: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d656: 4e5e unlk %fp <== NOT EXECUTED 4d658: 4e75 rts <== NOT EXECUTED result = strtof( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) 4d65a: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4d65c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d662: 4e5e unlk %fp 4d664: 4e75 rts ) { float result; char *end; if ( !n ) 4d666: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4d668: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d66e: 4e5e unlk %fp ... =============================================================================== 0004d674 : const char *s, int *n, char **endptr, int base ) { 4d674: 4e56 ffe8 linkw %fp,#-24 4d678: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d67c: 242e 0008 movel %fp@(8),%d2 4d680: 246e 000c moveal %fp@(12),%a2 4d684: 266e 0010 moveal %fp@(16),%a3 long result; char *end; if ( !n ) 4d688: 4a8a tstl %a2 4d68a: 6776 beqs 4d702 return RTEMS_INVALID_ADDRESS; errno = 0; 4d68c: 49f9 0004 fa18 lea 4fa18 <__errno>,%a4 4d692: 4e94 jsr %a4@ 4d694: 2040 moveal %d0,%a0 4d696: 4290 clrl %a0@ *n = 0; result = strtol( s, &end, base ); 4d698: 2f2e 0014 movel %fp@(20),%sp@- 4d69c: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d6a0: 4292 clrl %a2@ result = strtol( s, &end, base ); 4d6a2: 2f02 movel %d2,%sp@- 4d6a4: 4eb9 0005 25ee jsr 525ee if ( endptr ) 4d6aa: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); 4d6ae: 2600 movel %d0,%d3 if ( endptr ) 4d6b0: 4a8b tstl %a3 4d6b2: 6704 beqs 4d6b8 *endptr = end; 4d6b4: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4d6b8: b4ae fffc cmpl %fp@(-4),%d2 4d6bc: 6738 beqs 4d6f6 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d6be: 4e94 jsr %a4@ 4d6c0: 7222 moveq #34,%d1 4d6c2: 2040 moveal %d0,%a0 4d6c4: b290 cmpl %a0@,%d1 4d6c6: 670e beqs 4d6d6 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 4d6c8: 2483 movel %d3,%a2@ 4d6ca: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d6cc: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6d2: 4e5e unlk %fp 4d6d4: 4e75 rts *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d6d6: 4a83 tstl %d3 4d6d8: 6710 beqs 4d6ea <== NEVER TAKEN 4d6da: 0c83 7fff ffff cmpil #2147483647,%d3 4d6e0: 6708 beqs 4d6ea <== ALWAYS TAKEN 4d6e2: 0c83 8000 0000 cmpil #-2147483648,%d3 <== NOT EXECUTED 4d6e8: 66de bnes 4d6c8 <== NOT EXECUTED } #endif *n = result; return RTEMS_SUCCESSFUL; 4d6ea: 700a moveq #10,%d0 } 4d6ec: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6f2: 4e5e unlk %fp 4d6f4: 4e75 rts result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 4d6f6: 700b moveq #11,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4d6f8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6fe: 4e5e unlk %fp 4d700: 4e75 rts ) { long result; char *end; if ( !n ) 4d702: 7009 moveq #9,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4d704: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d70a: 4e5e unlk %fp ... =============================================================================== 0004d7c8 : const char *s, long *n, char **endptr, int base ) { 4d7c8: 4e56 ffe8 linkw %fp,#-24 4d7cc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d7d0: 242e 0008 movel %fp@(8),%d2 4d7d4: 246e 000c moveal %fp@(12),%a2 4d7d8: 266e 0010 moveal %fp@(16),%a3 long result; char *end; if ( !n ) 4d7dc: 4a8a tstl %a2 4d7de: 6776 beqs 4d856 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4d7e0: 49f9 0004 fa18 lea 4fa18 <__errno>,%a4 4d7e6: 4e94 jsr %a4@ 4d7e8: 2040 moveal %d0,%a0 4d7ea: 4290 clrl %a0@ *n = 0; result = strtol( s, &end, base ); 4d7ec: 2f2e 0014 movel %fp@(20),%sp@- 4d7f0: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d7f4: 4292 clrl %a2@ result = strtol( s, &end, base ); 4d7f6: 2f02 movel %d2,%sp@- 4d7f8: 4eb9 0005 25ee jsr 525ee if ( endptr ) 4d7fe: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); 4d802: 2600 movel %d0,%d3 if ( endptr ) 4d804: 4a8b tstl %a3 4d806: 6704 beqs 4d80c *endptr = end; 4d808: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4d80c: b4ae fffc cmpl %fp@(-4),%d2 4d810: 6738 beqs 4d84a return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d812: 4e94 jsr %a4@ 4d814: 7222 moveq #34,%d1 4d816: 2040 moveal %d0,%a0 4d818: b290 cmpl %a0@,%d1 4d81a: 670e beqs 4d82a (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 4d81c: 2483 movel %d3,%a2@ 4d81e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d820: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d826: 4e5e unlk %fp 4d828: 4e75 rts *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d82a: 4a83 tstl %d3 4d82c: 6710 beqs 4d83e <== NEVER TAKEN 4d82e: 0c83 7fff ffff cmpil #2147483647,%d3 4d834: 6708 beqs 4d83e 4d836: 0c83 8000 0000 cmpil #-2147483648,%d3 4d83c: 66de bnes 4d81c <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 4d83e: 700a moveq #10,%d0 } 4d840: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d846: 4e5e unlk %fp 4d848: 4e75 rts result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 4d84a: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4d84c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d852: 4e5e unlk %fp 4d854: 4e75 rts ) { long result; char *end; if ( !n ) 4d856: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4d858: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d85e: 4e5e unlk %fp ... =============================================================================== 0004d710 : const char *s, long long *n, char **endptr, int base ) { 4d710: 4e56 ffe4 linkw %fp,#-28 4d714: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d718: 242e 0008 movel %fp@(8),%d2 4d71c: 246e 000c moveal %fp@(12),%a2 4d720: 266e 0010 moveal %fp@(16),%a3 long long result; char *end; if ( !n ) 4d724: 4a8a tstl %a2 4d726: 6700 0094 beqw 4d7bc return RTEMS_INVALID_ADDRESS; errno = 0; 4d72a: 49f9 0004 fa18 lea 4fa18 <__errno>,%a4 4d730: 4e94 jsr %a4@ 4d732: 2040 moveal %d0,%a0 *n = 0; 4d734: 4280 clrl %d0 4d736: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d738: 4290 clrl %a0@ *n = 0; 4d73a: 2480 movel %d0,%a2@ 4d73c: 2541 0004 movel %d1,%a2@(4) result = strtoll( s, &end, base ); 4d740: 2f2e 0014 movel %fp@(20),%sp@- 4d744: 486e fffc pea %fp@(-4) 4d748: 2f02 movel %d2,%sp@- 4d74a: 4eb9 0005 2610 jsr 52610 if ( endptr ) 4d750: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoll( s, &end, base ); 4d754: 2600 movel %d0,%d3 4d756: 2801 movel %d1,%d4 if ( endptr ) 4d758: 4a8b tstl %a3 4d75a: 6704 beqs 4d760 *endptr = end; 4d75c: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4d760: b4ae fffc cmpl %fp@(-4),%d2 4d764: 674a beqs 4d7b0 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d766: 4e94 jsr %a4@ 4d768: 7222 moveq #34,%d1 4d76a: 2040 moveal %d0,%a0 4d76c: b290 cmpl %a0@,%d1 4d76e: 6712 beqs 4d782 (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 4d770: 4280 clrl %d0 4d772: 2483 movel %d3,%a2@ 4d774: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4d778: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d77e: 4e5e unlk %fp 4d780: 4e75 rts *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d782: 2003 movel %d3,%d0 4d784: 8084 orl %d4,%d0 4d786: 671c beqs 4d7a4 <== NEVER TAKEN 4d788: 203c 7fff ffff movel #2147483647,%d0 4d78e: 72ff moveq #-1,%d1 4d790: 9284 subl %d4,%d1 4d792: 9183 subxl %d3,%d0 4d794: 670e beqs 4d7a4 4d796: 203c 8000 0000 movel #-2147483648,%d0 4d79c: 4281 clrl %d1 4d79e: 9284 subl %d4,%d1 4d7a0: 9183 subxl %d3,%d0 4d7a2: 66cc bnes 4d770 <== NEVER TAKEN (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 4d7a4: 700a moveq #10,%d0 } 4d7a6: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d7ac: 4e5e unlk %fp 4d7ae: 4e75 rts result = strtoll( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 4d7b0: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4d7b2: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d7b8: 4e5e unlk %fp 4d7ba: 4e75 rts ) { long long result; char *end; if ( !n ) 4d7bc: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4d7be: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d7c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d880 : const char *s, unsigned char *n, char **endptr, int base ) { 4d880: 4e56 ffe8 linkw %fp,#-24 4d884: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d888: 242e 0008 movel %fp@(8),%d2 4d88c: 246e 000c moveal %fp@(12),%a2 4d890: 286e 0010 moveal %fp@(16),%a4 unsigned long result; char *end; if ( !n ) 4d894: 4a8a tstl %a2 4d896: 6700 008a beqw 4d922 return RTEMS_INVALID_ADDRESS; errno = 0; 4d89a: 47f9 0004 fa18 lea 4fa18 <__errno>,%a3 4d8a0: 4e93 jsr %a3@ 4d8a2: 2040 moveal %d0,%a0 4d8a4: 4290 clrl %a0@ *n = 0; 4d8a6: 4212 clrb %a2@ result = strtoul( s, &end, base ); 4d8a8: 2f2e 0014 movel %fp@(20),%sp@- 4d8ac: 486e fffc pea %fp@(-4) 4d8b0: 2f02 movel %d2,%sp@- 4d8b2: 4eb9 0005 2a20 jsr 52a20 if ( endptr ) 4d8b8: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4d8bc: 2600 movel %d0,%d3 if ( endptr ) 4d8be: 4a8c tstl %a4 4d8c0: 6704 beqs 4d8c6 *endptr = end; 4d8c2: 28ae fffc movel %fp@(-4),%a4@ if ( end == s ) 4d8c6: b4ae fffc cmpl %fp@(-4),%d2 4d8ca: 674a beqs 4d916 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d8cc: 4e93 jsr %a3@ 4d8ce: 7222 moveq #34,%d1 4d8d0: 2040 moveal %d0,%a0 4d8d2: b290 cmpl %a0@,%d1 4d8d4: 6716 beqs 4d8ec <== NEVER TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 4d8d6: 0c83 0000 00ff cmpil #255,%d3 4d8dc: 6224 bhis 4d902 <== NEVER TAKEN errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 4d8de: 4280 clrl %d0 4d8e0: 1483 moveb %d3,%a2@ return RTEMS_SUCCESSFUL; } 4d8e2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d8e8: 4e5e unlk %fp 4d8ea: 4e75 rts *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d8ec: 2003 movel %d3,%d0 <== NOT EXECUTED 4d8ee: 5380 subql #1,%d0 <== NOT EXECUTED 4d8f0: 72fd moveq #-3,%d1 <== NOT EXECUTED 4d8f2: b280 cmpl %d0,%d1 <== NOT EXECUTED 4d8f4: 64e0 bccs 4d8d6 <== NOT EXECUTED 4d8f6: 700a moveq #10,%d0 <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } 4d8f8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d8fe: 4e5e unlk %fp <== NOT EXECUTED 4d900: 4e75 rts <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { errno = ERANGE; 4d902: 4e93 jsr %a3@ <== NOT EXECUTED 4d904: 7222 moveq #34,%d1 <== NOT EXECUTED 4d906: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d908: 700a moveq #10,%d0 <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } 4d90a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { errno = ERANGE; 4d910: 2081 movel %d1,%a0@ <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } 4d912: 4e5e unlk %fp <== NOT EXECUTED 4d914: 4e75 rts <== NOT EXECUTED result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 4d916: 700b moveq #11,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4d918: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d91e: 4e5e unlk %fp 4d920: 4e75 rts ) { unsigned long result; char *end; if ( !n ) 4d922: 7009 moveq #9,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4d924: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d92a: 4e5e unlk %fp ... =============================================================================== 0004d930 : const char *s, unsigned int *n, char **endptr, int base ) { 4d930: 4e56 ffe8 linkw %fp,#-24 4d934: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d938: 242e 0008 movel %fp@(8),%d2 4d93c: 246e 000c moveal %fp@(12),%a2 4d940: 266e 0010 moveal %fp@(16),%a3 unsigned long result; char *end; if ( !n ) 4d944: 4a8a tstl %a2 4d946: 676c beqs 4d9b4 return RTEMS_INVALID_ADDRESS; errno = 0; 4d948: 49f9 0004 fa18 lea 4fa18 <__errno>,%a4 4d94e: 4e94 jsr %a4@ 4d950: 2040 moveal %d0,%a0 4d952: 4290 clrl %a0@ *n = 0; result = strtoul( s, &end, base ); 4d954: 2f2e 0014 movel %fp@(20),%sp@- 4d958: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d95c: 4292 clrl %a2@ result = strtoul( s, &end, base ); 4d95e: 2f02 movel %d2,%sp@- 4d960: 4eb9 0005 2a20 jsr 52a20 if ( endptr ) 4d966: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4d96a: 2600 movel %d0,%d3 if ( endptr ) 4d96c: 4a8b tstl %a3 4d96e: 6704 beqs 4d974 *endptr = end; 4d970: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4d974: b4ae fffc cmpl %fp@(-4),%d2 4d978: 672e beqs 4d9a8 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d97a: 4e94 jsr %a4@ 4d97c: 7222 moveq #34,%d1 4d97e: 2040 moveal %d0,%a0 4d980: b290 cmpl %a0@,%d1 4d982: 670e beqs 4d992 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 4d984: 2483 movel %d3,%a2@ 4d986: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d988: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d98e: 4e5e unlk %fp 4d990: 4e75 rts *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4d992: 2003 movel %d3,%d0 4d994: 5380 subql #1,%d0 4d996: 72fd moveq #-3,%d1 4d998: b280 cmpl %d0,%d1 4d99a: 64e8 bccs 4d984 <== NEVER TAKEN 4d99c: 700a moveq #10,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4d99e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9a4: 4e5e unlk %fp 4d9a6: 4e75 rts result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 4d9a8: 700b moveq #11,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4d9aa: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9b0: 4e5e unlk %fp 4d9b2: 4e75 rts ) { unsigned long result; char *end; if ( !n ) 4d9b4: 7009 moveq #9,%d0 #endif *n = result; return RTEMS_SUCCESSFUL; } 4d9b6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004da68 : const char *s, unsigned long *n, char **endptr, int base ) { 4da68: 4e56 ffe8 linkw %fp,#-24 4da6c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4da70: 242e 0008 movel %fp@(8),%d2 4da74: 246e 000c moveal %fp@(12),%a2 4da78: 266e 0010 moveal %fp@(16),%a3 unsigned long result; char *end; if ( !n ) 4da7c: 4a8a tstl %a2 4da7e: 676c beqs 4daec return RTEMS_INVALID_ADDRESS; errno = 0; 4da80: 49f9 0004 fa18 lea 4fa18 <__errno>,%a4 4da86: 4e94 jsr %a4@ 4da88: 2040 moveal %d0,%a0 4da8a: 4290 clrl %a0@ *n = 0; result = strtoul( s, &end, base ); 4da8c: 2f2e 0014 movel %fp@(20),%sp@- 4da90: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4da94: 4292 clrl %a2@ result = strtoul( s, &end, base ); 4da96: 2f02 movel %d2,%sp@- 4da98: 4eb9 0005 2a20 jsr 52a20 if ( endptr ) 4da9e: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); 4daa2: 2600 movel %d0,%d3 if ( endptr ) 4daa4: 4a8b tstl %a3 4daa6: 6704 beqs 4daac *endptr = end; 4daa8: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4daac: b4ae fffc cmpl %fp@(-4),%d2 4dab0: 672e beqs 4dae0 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4dab2: 4e94 jsr %a4@ 4dab4: 7222 moveq #34,%d1 4dab6: 2040 moveal %d0,%a0 4dab8: b290 cmpl %a0@,%d1 4daba: 670e beqs 4daca (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 4dabc: 2483 movel %d3,%a2@ 4dabe: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4dac0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dac6: 4e5e unlk %fp 4dac8: 4e75 rts *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4daca: 2003 movel %d3,%d0 4dacc: 5380 subql #1,%d0 4dace: 72fd moveq #-3,%d1 4dad0: b280 cmpl %d0,%d1 4dad2: 64e8 bccs 4dabc <== NEVER TAKEN 4dad4: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4dad6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dadc: 4e5e unlk %fp 4dade: 4e75 rts result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 4dae0: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4dae2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dae8: 4e5e unlk %fp 4daea: 4e75 rts ) { unsigned long result; char *end; if ( !n ) 4daec: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4daee: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4daf4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d9c0 : const char *s, unsigned long long *n, char **endptr, int base ) { 4d9c0: 4e56 ffdc linkw %fp,#-36 4d9c4: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4d9c8: 242e 0008 movel %fp@(8),%d2 4d9cc: 246e 000c moveal %fp@(12),%a2 4d9d0: 266e 0010 moveal %fp@(16),%a3 unsigned long long result; char *end; if ( !n ) 4d9d4: 4a8a tstl %a2 4d9d6: 6700 0084 beqw 4da5c return RTEMS_INVALID_ADDRESS; errno = 0; 4d9da: 49f9 0004 fa18 lea 4fa18 <__errno>,%a4 4d9e0: 4e94 jsr %a4@ 4d9e2: 2040 moveal %d0,%a0 *n = 0; 4d9e4: 4280 clrl %d0 4d9e6: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d9e8: 4290 clrl %a0@ *n = 0; 4d9ea: 2480 movel %d0,%a2@ 4d9ec: 2541 0004 movel %d1,%a2@(4) result = strtoull( s, &end, base ); 4d9f0: 2f2e 0014 movel %fp@(20),%sp@- 4d9f4: 486e fffc pea %fp@(-4) 4d9f8: 2f02 movel %d2,%sp@- 4d9fa: 4eb9 0005 2a40 jsr 52a40 if ( endptr ) 4da00: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoull( s, &end, base ); 4da04: 2600 movel %d0,%d3 4da06: 2801 movel %d1,%d4 if ( endptr ) 4da08: 4a8b tstl %a3 4da0a: 6704 beqs 4da10 *endptr = end; 4da0c: 26ae fffc movel %fp@(-4),%a3@ if ( end == s ) 4da10: b4ae fffc cmpl %fp@(-4),%d2 4da14: 673a beqs 4da50 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4da16: 4e94 jsr %a4@ 4da18: 7222 moveq #34,%d1 4da1a: 2040 moveal %d0,%a0 4da1c: b290 cmpl %a0@,%d1 4da1e: 6712 beqs 4da32 (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 4da20: 4280 clrl %d0 4da22: 2483 movel %d3,%a2@ 4da24: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4da28: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4da2e: 4e5e unlk %fp 4da30: 4e75 rts *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 4da32: 70ff moveq #-1,%d0 4da34: 72ff moveq #-1,%d1 4da36: 7aff moveq #-1,%d5 4da38: 7cfd moveq #-3,%d6 4da3a: d284 addl %d4,%d1 4da3c: d183 addxl %d3,%d0 4da3e: 9c81 subl %d1,%d6 4da40: 9b80 subxl %d0,%d5 4da42: 64dc bccs 4da20 <== NEVER TAKEN 4da44: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4da46: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4da4c: 4e5e unlk %fp 4da4e: 4e75 rts result = strtoull( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 4da50: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4da52: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4da58: 4e5e unlk %fp 4da5a: 4e75 rts ) { unsigned long long result; char *end; if ( !n ) 4da5c: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 4da5e: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4da64: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ec68 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4ec68: 4e56 ffe4 linkw %fp,#-28 4ec6c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ec70: 2a2e 0008 movel %fp@(8),%d5 4ec74: 242e 000c movel %fp@(12),%d2 4ec78: 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 ) 4ec7c: 4a8c tstl %a4 4ec7e: 6700 0154 beqw 4edd4 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4ec82: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4ec88: 4a2a 0075 tstb %a2@(117) 4ec8c: 57c0 seq %d0 4ec8e: 263c 0000 0100 movel #256,%d3 4ec94: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4ec96: 266a 0108 moveal %a2@(264),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4ec9a: c680 andl %d0,%d3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4ec9c: 4aaa 007a tstl %a2@(122) 4eca0: 6600 00d4 bnew 4ed76 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4eca4: 4a2b 0008 tstb %a3@(8) 4eca8: 57c0 seq %d0 4ecaa: 283c 0000 0400 movel #1024,%d4 4ecb0: 49c0 extbl %d0 4ecb2: c880 andl %d0,%d4 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(); 4ecb4: 4eb9 0004 9d6c jsr 49d6c <_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; 4ecba: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4ecbc: 8083 orl %d3,%d0 4ecbe: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4ecc0: 0802 0008 btst #8,%d2 4ecc4: 670e beqs 4ecd4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4ecc6: 2005 movel %d5,%d0 4ecc8: 7201 moveq #1,%d1 4ecca: e088 lsrl #8,%d0 4eccc: b380 eorl %d1,%d0 4ecce: c081 andl %d1,%d0 4ecd0: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4ecd4: 0802 0009 btst #9,%d2 4ecd8: 6718 beqs 4ecf2 if ( _Modes_Is_timeslice(mode_set) ) { 4ecda: 0805 0009 btst #9,%d5 4ecde: 6700 00c2 beqw 4eda2 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4ece2: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4ece4: 41f9 0005 fdac lea 5fdac <_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; 4ecea: 2540 007a movel %d0,%a2@(122) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4ecee: 2550 0076 movel %a0@,%a2@(118) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4ecf2: 7007 moveq #7,%d0 4ecf4: c082 andl %d2,%d0 4ecf6: 6712 beqs 4ed0a */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4ecf8: 40c0 movew %sr,%d0 4ecfa: 7207 moveq #7,%d1 4ecfc: c285 andl %d5,%d1 4ecfe: 0280 0000 f8ff andil #63743,%d0 4ed04: e189 lsll #8,%d1 4ed06: 8081 orl %d1,%d0 4ed08: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4ed0a: 0802 000a btst #10,%d2 4ed0e: 6758 beqs 4ed68 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4ed10: 700a moveq #10,%d0 4ed12: e0ad lsrl %d0,%d5 4ed14: 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; 4ed16: 4280 clrl %d0 4ed18: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4ed1c: b385 eorl %d1,%d5 4ed1e: ca81 andl %d1,%d5 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ed20: ba80 cmpl %d0,%d5 4ed22: 6744 beqs 4ed68 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4ed24: 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; 4ed2a: 1745 0008 moveb %d5,%a3@(8) 4ed2e: 40c1 movew %sr,%d1 4ed30: 8081 orl %d1,%d0 4ed32: 46c0 movew %d0,%sr _signals = information->signals_pending; 4ed34: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4ed38: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4ed3e: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4ed42: 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; 4ed44: 4aab 0012 tstl %a3@(18) 4ed48: 671e beqs 4ed68 executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ed4a: 7203 moveq #3,%d1 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; 4ed4c: 7001 moveq #1,%d0 4ed4e: 7401 moveq #1,%d2 4ed50: 1540 0074 moveb %d0,%a2@(116) } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ed54: b2b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d1 4ed5a: 6758 beqs 4edb4 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 4ed5c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4ed5e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ed64: 4e5e unlk %fp 4ed66: 4e75 rts executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ed68: 7203 moveq #3,%d1 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; 4ed6a: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ed6c: b2b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d1 4ed72: 66e8 bnes 4ed5c <== NEVER TAKEN 4ed74: 603e bras 4edb4 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ed76: 4a2b 0008 tstb %a3@(8) 4ed7a: 57c0 seq %d0 4ed7c: 283c 0000 0400 movel #1024,%d4 4ed82: 49c0 extbl %d0 4ed84: c880 andl %d0,%d4 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(); 4ed86: 4eb9 0004 9d6c jsr 49d6c <_CPU_ISR_Get_level> old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4ed8c: 08c3 0009 bset #9,%d3 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4ed90: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4ed92: 8083 orl %d3,%d0 4ed94: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4ed96: 0802 0008 btst #8,%d2 4ed9a: 6700 ff38 beqw 4ecd4 4ed9e: 6000 ff26 braw 4ecc6 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4eda2: 7007 moveq #7,%d0 4eda4: c082 andl %d2,%d0 if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4eda6: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4edaa: 4a80 tstl %d0 4edac: 6700 ff5c beqw 4ed0a 4edb0: 6000 ff46 braw 4ecf8 } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4edb4: 4eb9 0004 efac jsr 4efac <_Thread_Evaluate_mode> 4edba: 4a00 tstb %d0 4edbc: 6604 bnes 4edc2 4edbe: 4a02 tstb %d2 4edc0: 679a beqs 4ed5c _Thread_Dispatch(); 4edc2: 4eb9 0004 8734 jsr 48734 <_Thread_Dispatch> 4edc8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4edca: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4edd0: 4e5e unlk %fp 4edd2: 4e75 rts ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4edd4: 7009 moveq #9,%d0 if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 4edd6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4eddc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af5c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4af5c: 4e56 fffc linkw %fp,#-4 4af60: 2f0a movel %a2,%sp@- 4af62: 246e 0010 moveal %fp@(16),%a2 4af66: 2f02 movel %d2,%sp@- 4af68: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4af6c: 670c beqs 4af7a */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4af6e: 4280 clrl %d0 4af70: 1039 0006 2912 moveb 62912 ,%d0 4af76: b082 cmpl %d2,%d0 4af78: 6566 bcss 4afe0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4af7a: 4a8a tstl %a2 4af7c: 6770 beqs 4afee return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4af7e: 486e fffc pea %fp@(-4) 4af82: 2f2e 0008 movel %fp@(8),%sp@- 4af86: 4eb9 0004 ced0 jsr 4ced0 <_Thread_Get> switch ( location ) { 4af8c: 508f addql #8,%sp 4af8e: 4aae fffc tstl %fp@(-4) 4af92: 663e bnes 4afd2 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4af94: 2040 moveal %d0,%a0 4af96: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4af9a: 4a82 tstl %d2 4af9c: 6720 beqs 4afbe the_thread->real_priority = new_priority; 4af9e: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4afa2: 4aa8 001c tstl %a0@(28) 4afa6: 6706 beqs 4afae the_thread->current_priority > new_priority ) 4afa8: b4a8 0014 cmpl %a0@(20),%d2 4afac: 6410 bccs 4afbe <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 4afae: 42a7 clrl %sp@- 4afb0: 2f02 movel %d2,%sp@- 4afb2: 2f00 movel %d0,%sp@- 4afb4: 4eb9 0004 c958 jsr 4c958 <_Thread_Change_priority> 4afba: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4afbe: 4eb9 0004 ce78 jsr 4ce78 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4afc4: 242e fff4 movel %fp@(-12),%d2 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); } _Thread_Enable_dispatch(); 4afc8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4afca: 246e fff8 moveal %fp@(-8),%a2 4afce: 4e5e unlk %fp 4afd0: 4e75 rts 4afd2: 242e fff4 movel %fp@(-12),%d2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4afd6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4afd8: 246e fff8 moveal %fp@(-8),%a2 4afdc: 4e5e unlk %fp 4afde: 4e75 rts 4afe0: 242e fff4 movel %fp@(-12),%d2 4afe4: 7013 moveq #19,%d0 4afe6: 246e fff8 moveal %fp@(-8),%a2 4afea: 4e5e unlk %fp 4afec: 4e75 rts 4afee: 242e fff4 movel %fp@(-12),%d2 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4aff2: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4aff4: 246e fff8 moveal %fp@(-8),%a2 4aff8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047888 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 47888: 4e56 fffc linkw %fp,#-4 4788c: 2f02 movel %d2,%sp@- 4788e: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 47892: 6762 beqs 478f6 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 47894: 486e fffc pea %fp@(-4) 47898: 2f2e 0008 movel %fp@(8),%sp@- 4789c: 4eb9 0004 9634 jsr 49634 <_Thread_Get> switch (location) { 478a2: 508f addql #8,%sp 478a4: 4aae fffc tstl %fp@(-4) 478a8: 663c bnes 478e6 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 478aa: 2240 moveal %d0,%a1 478ac: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 478b0: 4a88 tstl %a0 478b2: 673c beqs 478f0 if (tvp->ptr == ptr) { 478b4: b4a8 0004 cmpl %a0@(4),%d2 478b8: 6746 beqs 47900 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 478ba: 2248 moveal %a0,%a1 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 478bc: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 478be: 4a88 tstl %a0 478c0: 672e beqs 478f0 <== NEVER TAKEN if (tvp->ptr == ptr) { 478c2: b4a8 0004 cmpl %a0@(4),%d2 478c6: 66f2 bnes 478ba if (prev) prev->next = tvp->next; 478c8: 2290 movel %a0@,%a1@ else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 478ca: 2f08 movel %a0,%sp@- 478cc: 2f00 movel %d0,%sp@- 478ce: 4eb9 0004 79a8 jsr 479a8 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 478d4: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 478da: 508f addql #8,%sp prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); 478dc: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478de: 242e fff8 movel %fp@(-8),%d2 478e2: 4e5e unlk %fp 478e4: 4e75 rts 478e6: 242e fff8 movel %fp@(-8),%d2 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 478ea: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478ec: 4e5e unlk %fp 478ee: 4e75 rts return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 478f0: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478f6: 242e fff8 movel %fp@(-8),%d2 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 478fa: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478fc: 4e5e unlk %fp 478fe: 4e75 rts while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 47900: 2240 moveal %d0,%a1 47902: 2350 0118 movel %a0@,%a1@(280) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 47906: 2f08 movel %a0,%sp@- 47908: 2f00 movel %d0,%sp@- 4790a: 4eb9 0004 79a8 jsr 479a8 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47910: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47916: 508f addql #8,%sp prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); 47918: 4280 clrl %d0 4791a: 60c2 bras 478de =============================================================================== 0004791c : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 4791c: 4e56 fffc linkw %fp,#-4 47920: 2f0a movel %a2,%sp@- 47922: 246e 0010 moveal %fp@(16),%a2 47926: 2f02 movel %d2,%sp@- 47928: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 4792c: 6752 beqs 47980 return RTEMS_INVALID_ADDRESS; if ( !result ) 4792e: 4a8a tstl %a2 47930: 674e beqs 47980 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 47932: 486e fffc pea %fp@(-4) 47936: 2f2e 0008 movel %fp@(8),%sp@- 4793a: 4eb9 0004 9634 jsr 49634 <_Thread_Get> switch (location) { 47940: 508f addql #8,%sp 47942: 4aae fffc tstl %fp@(-4) 47946: 662a bnes 47972 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 47948: 2240 moveal %d0,%a1 4794a: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 4794e: 4a88 tstl %a0 47950: 670c beqs 4795e if (tvp->ptr == ptr) { 47952: b4a8 0004 cmpl %a0@(4),%d2 47956: 6736 beqs 4798e */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 47958: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 4795a: 4a88 tstl %a0 4795c: 66f4 bnes 47952 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 4795e: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47964: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 47968: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4796a: 246e fff8 moveal %fp@(-8),%a2 4796e: 4e5e unlk %fp 47970: 4e75 rts 47972: 242e fff4 movel %fp@(-12),%d2 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 47976: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47978: 246e fff8 moveal %fp@(-8),%a2 4797c: 4e5e unlk %fp 4797e: 4e75 rts 47980: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 47984: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47986: 246e fff8 moveal %fp@(-8),%a2 4798a: 4e5e unlk %fp 4798c: 4e75 rts if (tvp->ptr == ptr) { /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 4798e: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 47992: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47998: 242e fff4 movel %fp@(-12),%d2 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; _Thread_Enable_dispatch(); 4799c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4799e: 246e fff8 moveal %fp@(-8),%a2 479a2: 4e5e unlk %fp ... =============================================================================== 00045024 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 45024: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 45026: 4e56 0000 linkw %fp,#0 4502a: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 4502e: b280 cmpl %d0,%d1 45030: 6700 010a beqw 4513c 45034: 6c32 bges 45068 <== ALWAYS TAKEN 45036: 720e moveq #14,%d1 <== NOT EXECUTED 45038: b280 cmpl %d0,%d1 <== NOT EXECUTED 4503a: 6700 00d6 beqw 45112 <== NOT EXECUTED 4503e: 6c56 bges 45096 <== NOT EXECUTED 45040: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 45046: 6700 00e2 beqw 4512a <== NOT EXECUTED 4504a: 6f00 0098 blew 450e4 <== NOT EXECUTED 4504e: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 45054: 6700 00b6 beqw 4510c <== NOT EXECUTED 45058: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 4505e: 6700 009a beqw 450fa <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 45062: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 45064: 4e5e unlk %fp 45066: 4e75 rts rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 45068: 123c 0004 moveb #4,%d1 4506c: b280 cmpl %d0,%d1 4506e: 6700 00d2 beqw 45142 45072: 6d46 blts 450ba <== NEVER TAKEN 45074: 123c 0001 moveb #1,%d1 45078: b280 cmpl %d0,%d1 4507a: 6700 00a2 beqw 4511e 4507e: 6c00 00c8 bgew 45148 45082: 7202 moveq #2,%d1 <== NOT EXECUTED 45084: b280 cmpl %d0,%d1 <== NOT EXECUTED 45086: 677e beqs 45106 <== NOT EXECUTED 45088: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 4508c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4508e: 66d2 bnes 45062 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 45090: 7003 moveq #3,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45092: 4e5e unlk %fp <== NOT EXECUTED 45094: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 45096: 123c 000b moveb #11,%d1 <== NOT EXECUTED 4509a: b280 cmpl %d0,%d1 <== NOT EXECUTED 4509c: 6700 0086 beqw 45124 <== NOT EXECUTED 450a0: 6e3c bgts 450de <== NOT EXECUTED 450a2: 123c 000c moveb #12,%d1 <== NOT EXECUTED 450a6: b280 cmpl %d0,%d1 <== NOT EXECUTED 450a8: 6700 008c beqw 45136 <== NOT EXECUTED 450ac: 123c 000d moveb #13,%d1 <== NOT EXECUTED 450b0: b280 cmpl %d0,%d1 <== NOT EXECUTED 450b2: 66ae bnes 45062 <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 450b4: 700d moveq #13,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 450b6: 4e5e unlk %fp <== NOT EXECUTED 450b8: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 450ba: 7206 moveq #6,%d1 <== NOT EXECUTED 450bc: b280 cmpl %d0,%d1 <== NOT EXECUTED 450be: 6758 beqs 45118 <== NOT EXECUTED 450c0: 6e16 bgts 450d8 <== NOT EXECUTED 450c2: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 450c6: b280 cmpl %d0,%d1 <== NOT EXECUTED 450c8: 6766 beqs 45130 <== NOT EXECUTED 450ca: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 450ce: b280 cmpl %d0,%d1 <== NOT EXECUTED 450d0: 6690 bnes 45062 <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 450d2: 7008 moveq #8,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 450d4: 4e5e unlk %fp <== NOT EXECUTED 450d6: 4e75 rts <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 450d8: 7005 moveq #5,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 450da: 4e5e unlk %fp <== NOT EXECUTED 450dc: 4e75 rts <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 450de: 700a moveq #10,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 450e0: 4e5e unlk %fp <== NOT EXECUTED 450e2: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 450e4: 720f moveq #15,%d1 <== NOT EXECUTED 450e6: b280 cmpl %d0,%d1 <== NOT EXECUTED 450e8: 6716 beqs 45100 <== NOT EXECUTED 450ea: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 450f0: 6600 ff70 bnew 45062 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 450f4: 7010 moveq #16,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 450f6: 4e5e unlk %fp <== NOT EXECUTED 450f8: 4e75 rts <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 450fa: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 450fc: 4e5e unlk %fp <== NOT EXECUTED 450fe: 4e75 rts <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 45100: 700f moveq #15,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45102: 4e5e unlk %fp <== NOT EXECUTED 45104: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 45106: 7002 moveq #2,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45108: 4e5e unlk %fp <== NOT EXECUTED 4510a: 4e75 rts <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 4510c: 7012 moveq #18,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4510e: 4e5e unlk %fp <== NOT EXECUTED 45110: 4e75 rts <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 45112: 700e moveq #14,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45114: 4e5e unlk %fp <== NOT EXECUTED 45116: 4e75 rts <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 45118: 7006 moveq #6,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4511a: 4e5e unlk %fp <== NOT EXECUTED 4511c: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4511e: 7001 moveq #1,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45120: 4e5e unlk %fp <== NOT EXECUTED 45122: 4e75 rts <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 45124: 700b moveq #11,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45126: 4e5e unlk %fp <== NOT EXECUTED 45128: 4e75 rts <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 4512a: 7011 moveq #17,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4512c: 4e5e unlk %fp <== NOT EXECUTED 4512e: 4e75 rts <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 45130: 7007 moveq #7,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45132: 4e5e unlk %fp <== NOT EXECUTED 45134: 4e75 rts <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 45136: 700c moveq #12,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45138: 4e5e unlk %fp <== NOT EXECUTED 4513a: 4e75 rts <== NOT EXECUTED case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 4513c: 7009 moveq #9,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4513e: 4e5e unlk %fp <== NOT EXECUTED 45140: 4e75 rts <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 45142: 7004 moveq #4,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45144: 4e5e unlk %fp <== NOT EXECUTED 45146: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 45148: 4a80 tstl %d0 4514a: 6600 ff16 bnew 45062 4514e: 4280 clrl %d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 45150: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043da8 : 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; 43da8: 203c 0000 04b0 movel #1200,%d0 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 43dae: 4e56 0000 linkw %fp,#0 43db2: 222e 0008 movel %fp@(8),%d1 43db6: 2f02 movel %d2,%sp@- int32_t baud; switch (termios_baud) { 43db8: 7409 moveq #9,%d2 43dba: b481 cmpl %d1,%d2 43dbc: 6740 beqs 43dfe 43dbe: 6c44 bges 43e04 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; 43dc0: 203c 0000 4b00 movel #19200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43dc6: 740e moveq #14,%d2 43dc8: b481 cmpl %d1,%d2 43dca: 6732 beqs 43dfe 43dcc: 6c68 bges 43e36 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; 43dce: 203c 0001 c200 movel #115200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43dd4: 0c81 0000 1002 cmpil #4098,%d1 43dda: 6722 beqs 43dfe 43ddc: 6f00 00c0 blew 43e9e 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; 43de0: 203c 0003 8400 movel #230400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43de6: 0c81 0000 1003 cmpil #4099,%d1 43dec: 6710 beqs 43dfe 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; 43dee: 203c 0007 0800 movel #460800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43df4: 0c81 0000 1004 cmpil #4100,%d1 43dfa: 6702 beqs 43dfe <== ALWAYS TAKEN 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; 43dfc: 70ff moveq #-1,%d0 default: baud = -1; break; } return baud; } 43dfe: 241f movel %sp@+,%d2 43e00: 4e5e unlk %fp 43e02: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43e04: 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; 43e08: 303c 0086 movew #134,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e0c: b481 cmpl %d1,%d2 43e0e: 67ee beqs 43dfe 43e10: 6d54 blts 43e66 43e12: 103c 0001 moveb #1,%d0 43e16: b081 cmpl %d1,%d0 43e18: 6700 00a6 beqw 43ec0 43e1c: 6c00 00b2 bgew 43ed0 43e20: 7402 moveq #2,%d2 43e22: b481 cmpl %d1,%d2 43e24: 6700 00a2 beqw 43ec8 43e28: 7003 moveq #3,%d0 43e2a: b081 cmpl %d1,%d0 43e2c: 66ce bnes 43dfc <== NEVER TAKEN case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 43e2e: 241f movel %sp@+,%d2 int32_t baud; switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 43e30: 706e moveq #110,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 43e32: 4e5e unlk %fp 43e34: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43e36: 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; 43e3a: 303c 0960 movew #2400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e3e: b481 cmpl %d1,%d2 43e40: 67bc beqs 43dfe 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; 43e42: 303c 0708 movew #1800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e46: b481 cmpl %d1,%d2 43e48: 6eb4 bgts 43dfe 43e4a: 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; 43e4e: 303c 12c0 movew #4800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e52: b481 cmpl %d1,%d2 43e54: 67a8 beqs 43dfe 43e56: 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; 43e5a: 303c 2580 movew #9600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e5e: b481 cmpl %d1,%d2 43e60: 679c beqs 43dfe <== ALWAYS TAKEN 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; 43e62: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e64: 6098 bras 43dfe <== NOT EXECUTED 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; 43e66: 203c 0000 00c8 movel #200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e6c: 7406 moveq #6,%d2 43e6e: b481 cmpl %d1,%d2 43e70: 678c beqs 43dfe 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; 43e72: 0680 ffff ffce addil #-50,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e78: b481 cmpl %d1,%d2 43e7a: 6e82 bgts 43dfe 43e7c: 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; 43e80: 303c 012c movew #300,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e84: b481 cmpl %d1,%d2 43e86: 6700 ff76 beqw 43dfe 43e8a: 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; 43e8e: 303c 0258 movew #600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43e92: b481 cmpl %d1,%d2 43e94: 6700 ff68 beqw 43dfe 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; 43e98: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e9a: 6000 ff62 braw 43dfe <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 43e9e: 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; 43ea0: 203c 0000 9600 movel #38400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43ea6: b481 cmpl %d1,%d2 43ea8: 6700 ff54 beqw 43dfe 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; 43eac: 303c e100 movew #-7936,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43eb0: 0c81 0000 1001 cmpil #4097,%d1 43eb6: 6700 ff46 beqw 43dfe 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; 43eba: 70ff moveq #-1,%d0 <== NOT EXECUTED 43ebc: 6000 ff40 braw 43dfe <== NOT EXECUTED default: baud = -1; break; } return baud; } 43ec0: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 43ec2: 7032 moveq #50,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 43ec4: 4e5e unlk %fp 43ec6: 4e75 rts 43ec8: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 43eca: 704b moveq #75,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 43ecc: 4e5e unlk %fp 43ece: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43ed0: 4a81 tstl %d1 43ed2: 6600 ff28 bnew 43dfc case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 43ed6: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 43ed8: 4280 clrl %d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 43eda: 4e5e unlk %fp ... =============================================================================== 00043f1c : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 43f1c: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 43f1e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 43f22: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 43f26: 23d0 0005 e700 movel %a0@,5e700 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 43f2c: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 43f30: 23d0 0005 e704 movel %a0@,5e704 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 43f36: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 43f3a: 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; 43f3c: 23d0 0005 e708 movel %a0@,5e708 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } =============================================================================== 0004550c : } } rtems_status_code rtems_termios_close (void *arg) { 4550c: 4e56 fff4 linkw %fp,#-12 45510: 48d7 1c00 moveml %a2-%a4,%sp@ 45514: 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); 45518: 49f9 0004 6704 lea 46704 ,%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; 4551e: 2053 moveal %a3@,%a0 45520: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 45524: 42a7 clrl %sp@- 45526: 42a7 clrl %sp@- 45528: 2f39 0005 fce4 movel 5fce4 ,%sp@- 4552e: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 45530: 4fef 000c lea %sp@(12),%sp 45534: 4a80 tstl %d0 45536: 6600 011c bnew 45654 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 4553a: 202a 0008 movel %a2@(8),%d0 4553e: 5380 subql #1,%d0 45540: 2540 0008 movel %d0,%a2@(8) 45544: 6600 00a4 bnew 455ea if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 45548: 202a 00cc movel %a2@(204),%d0 4554c: 41f9 0005 f4a0 lea 5f4a0 ,%a0 45552: e788 lsll #3,%d0 45554: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 45558: 4a88 tstl %a0 4555a: 6700 012c beqw 45688 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 4555e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45560: 4e90 jsr %a0@ <== NOT EXECUTED 45562: 588f addql #4,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 45564: 7002 moveq #2,%d0 <== NOT EXECUTED 45566: b0aa 00b4 cmpl %a2@(180),%d0 <== NOT EXECUTED 4556a: 6700 00c0 beqw 4562c <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 4556e: 206a 009c moveal %a2@(156),%a0 45572: 4a88 tstl %a0 45574: 6710 beqs 45586 (*tty->device.lastClose)(tty->major, tty->minor, arg); 45576: 2f0b movel %a3,%sp@- 45578: 2f2a 0010 movel %a2@(16),%sp@- 4557c: 2f2a 000c movel %a2@(12),%sp@- 45580: 4e90 jsr %a0@ 45582: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 45586: 2052 moveal %a2@,%a0 45588: 4a88 tstl %a0 4558a: 6700 00d0 beqw 4565c if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 4558e: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 45594: 206a 0004 moveal %a2@(4),%a0 45598: 4a88 tstl %a0 4559a: 6700 00d8 beqw 45674 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 4559e: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 455a0: 2f2a 0014 movel %a2@(20),%sp@- 455a4: 47f9 0004 662c lea 4662c ,%a3 455aa: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 455ac: 2f2a 0018 movel %a2@(24),%sp@- 455b0: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 455b2: 2f2a 008c movel %a2@(140),%sp@- 455b6: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 455b8: 4fef 000c lea %sp@(12),%sp 455bc: 4aaa 00a0 tstl %a2@(160) 455c0: 6740 beqs 45602 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 455c2: 7002 moveq #2,%d0 455c4: b0aa 00b4 cmpl %a2@(180),%d0 455c8: 6738 beqs 45602 <== NEVER TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 455ca: 2f2a 0058 movel %a2@(88),%sp@- 455ce: 47f9 0004 2ddc lea 42ddc ,%a3 455d4: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 455d6: 2f2a 007c movel %a2@(124),%sp@- 455da: 4e93 jsr %a3@ free (tty->cbuf); 455dc: 2f2a 001c movel %a2@(28),%sp@- 455e0: 4e93 jsr %a3@ free (tty); 455e2: 2f0a movel %a2,%sp@- 455e4: 4e93 jsr %a3@ 455e6: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 455ea: 2f39 0005 fce4 movel 5fce4 ,%sp@- 455f0: 4eb9 0004 6840 jsr 46840 return RTEMS_SUCCESSFUL; } 455f6: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 455fc: 4280 clrl %d0 455fe: 4e5e unlk %fp 45600: 4e75 rts rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 45602: 2f2a 0068 movel %a2@(104),%sp@- 45606: 4e93 jsr %a3@ 45608: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 4560a: 47f9 0004 2ddc lea 42ddc ,%a3 45610: 2f2a 0058 movel %a2@(88),%sp@- 45614: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 45616: 2f2a 007c movel %a2@(124),%sp@- 4561a: 4e93 jsr %a3@ free (tty->cbuf); 4561c: 2f2a 001c movel %a2@(28),%sp@- 45620: 4e93 jsr %a3@ free (tty); 45622: 2f0a movel %a2,%sp@- 45624: 4e93 jsr %a3@ 45626: 4fef 0010 lea %sp@(16),%sp 4562a: 60be bras 455ea if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 4562c: 4878 0001 pea 1 <== NOT EXECUTED 45630: 49f9 0004 61ec lea 461ec ,%a4 <== NOT EXECUTED 45636: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 4563a: 4e94 jsr %a4@ <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 4563c: 508f addql #8,%sp <== NOT EXECUTED 4563e: 4a80 tstl %d0 <== NOT EXECUTED 45640: 6612 bnes 45654 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 45642: 4878 0001 pea 1 <== NOT EXECUTED 45646: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 4564a: 4e94 jsr %a4@ <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 4564c: 508f addql #8,%sp <== NOT EXECUTED 4564e: 4a80 tstl %d0 <== NOT EXECUTED 45650: 6700 ff1c beqw 4556e <== NOT EXECUTED rtems_fatal_error_occurred (sc); 45654: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45656: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 4565c: 206a 0004 moveal %a2@(4),%a0 45660: 23c8 0005 fce8 movel %a0,5fce8 if ( rtems_termios_ttyTail != NULL ) { 45666: 6748 beqs 456b0 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 45668: 4290 clrl %a0@ <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 4566a: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4566e: 4a88 tstl %a0 <== NOT EXECUTED 45670: 6600 ff2c bnew 4559e <== NOT EXECUTED 45674: 2052 moveal %a2@,%a0 rtems_termios_ttyHead = tty->forw; 45676: 23c8 0005 fcec movel %a0,5fcec if ( rtems_termios_ttyHead != NULL ) { 4567c: 6700 ff22 beqw 455a0 rtems_termios_ttyHead->back = NULL; 45680: 42a8 0004 clrl %a0@(4) 45684: 6000 ff1a braw 455a0 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 45688: 42a7 clrl %sp@- 4568a: 42a7 clrl %sp@- 4568c: 2f2a 0018 movel %a2@(24),%sp@- 45690: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 45692: 4fef 000c lea %sp@(12),%sp 45696: 4a80 tstl %d0 45698: 66ba bnes 45654 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 4569a: 2f0a movel %a2,%sp@- 4569c: 4eba f6f0 jsr %pc@(44d8e ) 456a0: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts 456a2: 7002 moveq #2,%d0 456a4: b0aa 00b4 cmpl %a2@(180),%d0 456a8: 6600 fec4 bnew 4556e 456ac: 6000 ff7e braw 4562c <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 456b0: 42b9 0005 fcec clrl 5fcec 456b6: 6000 fee8 braw 455a0 =============================================================================== 00044192 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 44192: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44196: 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) { 4419a: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4419e: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 441a2: 7002 moveq #2,%d0 441a4: b0a8 00b4 cmpl %a0@(180),%d0 441a8: 672a beqs 441d4 <== NEVER TAKEN TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 441aa: 7005 moveq #5,%d0 441ac: b0a8 00cc cmpl %a0@(204),%d0 441b0: 670c beqs 441be <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 441b2: 2d48 0008 movel %a0,%fp@(8) } } 441b6: 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); 441b8: 4ef9 0004 3f60 jmp 43f60 } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 441be: 2279 0005 f554 moveal 5f554 ,%a1 441c4: 4a89 tstl %a1 441c6: 6706 beqs 441ce <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 441c8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 441ca: 4e91 jsr %a1@ <== NOT EXECUTED 441cc: 588f addql #4,%sp <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 441ce: 4280 clrl %d0 <== NOT EXECUTED 441d0: 4e5e unlk %fp <== NOT EXECUTED 441d2: 4e75 rts <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 441d4: 4878 0002 pea 2 <== NOT EXECUTED 441d8: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 441dc: 4eb9 0004 61ec jsr 461ec <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 441e2: 508f addql #8,%sp <== NOT EXECUTED 441e4: 4a80 tstl %d0 <== NOT EXECUTED 441e6: 67e6 beqs 441ce <== NOT EXECUTED rtems_fatal_error_occurred (sc); 441e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 441ea: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED =============================================================================== 000441f0 : * 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) { 441f0: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED 441f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 441f8: 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) { 441fc: 49f9 0005 f4a0 lea 5f4a0 ,%a4 <== NOT EXECUTED 44202: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44206: 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) { 44208: 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) { 4420c: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== 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) { 44210: 262e 0010 movel %fp@(16),%d3 <== 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) { 44214: 4a88 tstl %a0 <== NOT EXECUTED 44216: 6774 beqs 4428c <== NOT EXECUTED while (len--) { 44218: 4a83 tstl %d3 <== NOT EXECUTED 4421a: 6734 beqs 44250 <== NOT EXECUTED 4421c: 4282 clrl %d2 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 4421e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44220: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 44224: 5282 addql #1,%d2 <== NOT EXECUTED 44226: 49c1 extbl %d1 <== NOT EXECUTED 44228: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4422a: 4e90 jsr %a0@ <== 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--) { 4422c: 508f addql #8,%sp <== NOT EXECUTED 4422e: b483 cmpl %d3,%d2 <== NOT EXECUTED 44230: 671e beqs 44250 <== NOT EXECUTED 44232: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44236: eb88 lsll #5,%d0 <== NOT EXECUTED 44238: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 4423c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4423e: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 44242: 5282 addql #1,%d2 <== NOT EXECUTED 44244: 49c1 extbl %d1 <== NOT EXECUTED 44246: 2f01 movel %d1,%sp@- <== NOT EXECUTED 44248: 4e90 jsr %a0@ <== 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--) { 4424a: 508f addql #8,%sp <== NOT EXECUTED 4424c: b483 cmpl %d3,%d2 <== NOT EXECUTED 4424e: 66e2 bnes 44232 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 44250: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 44254: 6628 bnes 4427e <== NOT EXECUTED 44256: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 4425a: 4a88 tstl %a0 <== NOT EXECUTED 4425c: 6720 beqs 4427e <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4425e: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 44262: 4285 clrl %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); 44264: 486a 0030 pea %a2@(48) <== NOT EXECUTED tty->tty_rcvwakeup = 1; 44268: 7c01 moveq #1,%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); 4426a: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4426c: 508f addql #8,%sp <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 4426e: 2005 movel %d5,%d0 <== 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); tty->tty_rcvwakeup = 1; 44270: 2546 00e4 movel %d6,%a2@(228) <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 44274: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4427a: 4e5e unlk %fp <== NOT EXECUTED 4427c: 4e75 rts <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 4427e: 4285 clrl %d5 <== NOT EXECUTED } 44280: 2005 movel %d5,%d0 <== NOT EXECUTED 44282: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44288: 4e5e unlk %fp <== NOT EXECUTED 4428a: 4e75 rts <== 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, 4428c: 41ea 004a lea %a2@(74),%a0 <== 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); 44290: 4bea 0030 lea %a2@(48),%a5 <== NOT EXECUTED 44294: 4285 clrl %d5 <== 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); 44296: 387c 0700 moveaw #1792,%a4 <== 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); 4429a: 4200 clrb %d0 <== 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, 4429c: 2d48 fffc movel %a0,%fp@(-4) <== 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); 442a0: 1d40 fff7 moveb %d0,%fp@(-9) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 442a4: 4a83 tstl %d3 <== NOT EXECUTED 442a6: 6700 00e8 beqw 44390 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 442aa: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 442ae: 1813 moveb %a3@,%d4 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 442b0: 0800 0009 btst #9,%d0 <== NOT EXECUTED 442b4: 671c beqs 442d2 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 442b6: 4281 clrl %d1 <== NOT EXECUTED 442b8: 122a 004a moveb %a2@(74),%d1 <== NOT EXECUTED 442bc: 1004 moveb %d4,%d0 <== NOT EXECUTED 442be: 49c0 extbl %d0 <== NOT EXECUTED 442c0: b280 cmpl %d0,%d1 <== NOT EXECUTED 442c2: 6700 014a beqw 4440e <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 442c6: 4281 clrl %d1 <== NOT EXECUTED 442c8: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 442cc: b280 cmpl %d0,%d1 <== NOT EXECUTED 442ce: 6700 00dc beqw 443ac <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 442d2: 4a2e fff7 tstb %fp@(-9) <== NOT EXECUTED 442d6: 6600 00e6 bnew 443be <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 442da: 2e2a 0060 movel %a2@(96),%d7 <== NOT EXECUTED 442de: 5287 addql #1,%d7 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 442e0: 200c movel %a4,%d0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 442e2: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 442e6: 4c41 7002 remul %d1,%d2,%d7 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 442ea: 40c7 movew %sr,%d7 <== NOT EXECUTED 442ec: 8087 orl %d7,%d0 <== NOT EXECUTED 442ee: 46c0 movew %d0,%sr <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 442f0: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 442f4: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 442f8: 9081 subl %d1,%d0 <== NOT EXECUTED 442fa: 2240 moveal %d0,%a1 <== NOT EXECUTED 442fc: d3c2 addal %d2,%a1 <== NOT EXECUTED 442fe: 2209 movel %a1,%d1 <== NOT EXECUTED 44300: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 44304: 4c40 1006 remul %d0,%d6,%d1 <== NOT EXECUTED 44308: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 4430c: bcaa 00c0 cmpl %a2@(192),%d6 <== NOT EXECUTED 44310: 633e blss 44350 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 44312: 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) 44316: 0800 0000 btst #0,%d0 <== NOT EXECUTED 4431a: 6634 bnes 44350 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 4431c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44320: 7201 moveq #1,%d1 <== NOT EXECUTED 44322: 8081 orl %d1,%d0 <== NOT EXECUTED 44324: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 44328: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4432c: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 44332: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 44338: 6700 0112 beqw 4444c <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 4433c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44340: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 44346: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 4434c: 6700 0136 beqw 44484 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 44350: 46c7 movew %d7,%sr <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 44352: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 44356: b480 cmpl %d0,%d2 <== NOT EXECUTED 44358: 6700 00d2 beqw 4442c <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 4435c: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 44360: 1184 2800 moveb %d4,%a0@(00000000,%d2:l) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 44364: 2542 0060 movel %d2,%a2@(96) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 44368: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 4436c: 6618 bnes 44386 <== NOT EXECUTED 4436e: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 44372: 4a88 tstl %a0 <== NOT EXECUTED 44374: 6710 beqs 44386 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 44376: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 4437a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4437c: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4437e: 508f addql #8,%sp <== NOT EXECUTED 44380: 7201 moveq #1,%d1 <== NOT EXECUTED 44382: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 44386: 528b addql #1,%a3 <== NOT EXECUTED 44388: 5383 subql #1,%d3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 4438a: 4a83 tstl %d3 <== NOT EXECUTED 4438c: 6600 ff1c bnew 442aa <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); 44390: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 44394: dbaa 0078 addl %d5,%a2@(120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 44398: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return dropped; 4439e: 588f addql #4,%sp <== NOT EXECUTED } 443a0: 2005 movel %d5,%d0 <== NOT EXECUTED 443a2: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 443a8: 4e5e unlk %fp <== NOT EXECUTED 443aa: 4e75 rts <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 443ac: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 443b0: 72ef moveq #-17,%d1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 443b2: 7c01 moveq #1,%d6 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 443b4: c081 andl %d1,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 443b6: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 443ba: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 443be: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 443c2: 7c30 moveq #48,%d6 <== NOT EXECUTED 443c4: 7220 moveq #32,%d1 <== NOT EXECUTED 443c6: c086 andl %d6,%d0 <== NOT EXECUTED 443c8: b280 cmpl %d0,%d1 <== NOT EXECUTED 443ca: 66ba bnes 44386 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 443cc: 200c movel %a4,%d0 <== NOT EXECUTED 443ce: 40c2 movew %sr,%d2 <== NOT EXECUTED 443d0: 8082 orl %d2,%d0 <== NOT EXECUTED 443d2: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 443d4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 443d8: 7cdf moveq #-33,%d6 <== NOT EXECUTED 443da: c086 andl %d6,%d0 <== NOT EXECUTED 443dc: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 443e0: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 443e4: 6608 bnes 443ee <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 443e6: 46c2 movew %d2,%sr <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 443e8: 528b addql #1,%a3 <== NOT EXECUTED 443ea: 5383 subql #1,%d3 <== NOT EXECUTED 443ec: 609c bras 4438a <== 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, 443ee: 4878 0001 pea 1 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 443f2: 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, 443f6: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 443fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 443fc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44400: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44404: 4e90 jsr %a0@ <== NOT EXECUTED 44406: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 4440a: 46c2 movew %d2,%sr <== NOT EXECUTED 4440c: 60da bras 443e8 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 4440e: 4281 clrl %d1 <== NOT EXECUTED 44410: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 44414: b280 cmpl %d0,%d1 <== NOT EXECUTED 44416: 671e beqs 44436 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 44418: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4441c: 7c10 moveq #16,%d6 <== NOT EXECUTED 4441e: 8086 orl %d6,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 44420: 7c01 moveq #1,%d6 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 44422: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 44426: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 4442a: 6092 bras 443be <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 4442c: 5285 addql #1,%d5 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4442e: 528b addql #1,%a3 <== NOT EXECUTED 44430: 5383 subql #1,%d3 <== NOT EXECUTED 44432: 6000 ff56 braw 4438a <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 44436: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4443a: 7210 moveq #16,%d1 <== NOT EXECUTED 4443c: b380 eorl %d1,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 4443e: 7c01 moveq #1,%d6 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 44440: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 44444: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 44448: 6000 ff74 braw 443be <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 4444c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44450: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44454: 6608 bnes 4445e <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 44456: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4445a: 6600 fef4 bnew 44350 <== 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, 4445e: 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; 44462: 7c02 moveq #2,%d6 <== NOT EXECUTED 44464: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 44468: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4446c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44470: 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; 44474: 8286 orl %d6,%d1 <== NOT EXECUTED 44476: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 4447a: 4e90 jsr %a0@ <== NOT EXECUTED 4447c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44480: 6000 fece braw 44350 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 44484: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44488: 303c 0004 movew #4,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4448c: 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; 44490: 8280 orl %d0,%d1 <== NOT EXECUTED 44492: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 44496: 4a88 tstl %a0 <== NOT EXECUTED 44498: 6700 feb6 beqw 44350 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 4449c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 444a0: 4e90 jsr %a0@ <== NOT EXECUTED 444a2: 588f addql #4,%sp <== NOT EXECUTED 444a4: 6000 feaa braw 44350 <== NOT EXECUTED =============================================================================== 00043ee0 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 43ee0: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 43ee4: 4ab9 0005 fce4 tstl 5fce4 43eea: 6704 beqs 43ef0 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 43eec: 4e5e unlk %fp 43eee: 4e75 rts /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 43ef0: 4879 0005 fce4 pea 5fce4 43ef6: 42a7 clrl %sp@- 43ef8: 4878 0054 pea 54 43efc: 4878 0001 pea 1 43f00: 2f3c 5452 6d69 movel #1414688105,%sp@- 43f06: 4eb9 0004 6464 jsr 46464 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) 43f0c: 4fef 0014 lea %sp@(20),%sp 43f10: 4a80 tstl %d0 43f12: 67d8 beqs 43eec <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43f14: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43f16: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED =============================================================================== 0004511e : } } rtems_status_code rtems_termios_ioctl (void *arg) { 4511e: 4e56 ffec linkw %fp,#-20 45122: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 45126: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4512a: 2053 moveal %a3@,%a0 4512c: 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); 45130: 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; 45132: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 45136: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4513a: 42a7 clrl %sp@- 4513c: 2f2a 0018 movel %a2@(24),%sp@- 45140: 4eb9 0004 6704 jsr 46704 if (sc != RTEMS_SUCCESSFUL) { 45146: 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); 4514a: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 4514c: 662c bnes 4517a <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 4514e: 202b 0004 movel %a3@(4),%d0 45152: 7204 moveq #4,%d1 45154: b280 cmpl %d0,%d1 45156: 6774 beqs 451cc <== NEVER TAKEN 45158: 6530 bcss 4518a <== NEVER TAKEN 4515a: 7602 moveq #2,%d3 4515c: b680 cmpl %d0,%d3 4515e: 6700 00b6 beqw 45216 45162: 6400 0224 bccw 45388 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 45166: 2f0a movel %a2,%sp@- 45168: 4eba fc24 jsr %pc@(44d8e ) break; 4516c: 588f addql #4,%sp /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 4516e: 2f2a 0018 movel %a2@(24),%sp@- 45172: 4eb9 0004 6840 jsr 46840 args->ioctl_return = sc; return sc; 45178: 588f addql #4,%sp } 4517a: 2002 movel %d2,%d0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 4517c: 2742 000c movel %d2,%a3@(12) return sc; } 45180: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 45186: 4e5e unlk %fp 45188: 4e75 rts sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 4518a: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 45190: 6756 beqs 451e8 <== NOT EXECUTED 45192: 6200 0236 bhiw 453ca <== NOT EXECUTED 45196: 7605 moveq #5,%d3 <== NOT EXECUTED 45198: b680 cmpl %d0,%d3 <== NOT EXECUTED 4519a: 6700 01ce beqw 4536a <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 4519e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 451a2: eb88 lsll #5,%d0 <== NOT EXECUTED 451a4: 0680 0005 f4b8 addil #390328,%d0 <== NOT EXECUTED 451aa: 2240 moveal %d0,%a1 <== NOT EXECUTED 451ac: 2051 moveal %a1@,%a0 <== NOT EXECUTED 451ae: 4a88 tstl %a0 <== NOT EXECUTED 451b0: 6700 0292 beqw 45444 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 451b4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 451b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 451b8: 4e90 jsr %a0@ <== NOT EXECUTED 451ba: 508f addql #8,%sp <== NOT EXECUTED 451bc: 2400 movel %d0,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 451be: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 451c2: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED args->ioctl_return = sc; return sc; 451c8: 588f addql #4,%sp <== NOT EXECUTED 451ca: 60ae bras 4517a <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 451cc: 2014 movel %a4@,%d0 <== NOT EXECUTED 451ce: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 451d2: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 451d6: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 451da: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 451de: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED args->ioctl_return = sc; return sc; 451e4: 588f addql #4,%sp <== NOT EXECUTED 451e6: 6092 bras 4517a <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 451e8: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 451ec: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 451f0: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 451f2: 6b00 02a4 bmiw 45498 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 451f6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 451fa: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 451fe: d280 addl %d0,%d1 <== NOT EXECUTED 45200: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 45204: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 45206: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 4520a: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED args->ioctl_return = sc; return sc; 45210: 588f addql #4,%sp <== NOT EXECUTED 45212: 6000 ff66 braw 4517a <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 45216: 206b 0008 moveal %a3@(8),%a0 4521a: 49ea 0030 lea %a2@(48),%a4 4521e: 2898 movel %a0@+,%a4@ 45220: 2558 0034 movel %a0@+,%a2@(52) 45224: 2558 0038 movel %a0@+,%a2@(56) 45228: 2558 003c movel %a0@+,%a2@(60) 4522c: 2558 0040 movel %a0@+,%a2@(64) 45230: 2558 0044 movel %a0@+,%a2@(68) 45234: 2558 0048 movel %a0@+,%a2@(72) 45238: 2558 004c movel %a0@+,%a2@(76) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 4523c: 202a 00b8 movel %a2@(184),%d0 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 45240: 2550 0050 movel %a0@,%a2@(80) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 45244: 0800 0009 btst #9,%d0 45248: 6746 beqs 45290 4524a: 202a 0030 movel %a2@(48),%d0 4524e: 0280 0000 0400 andil #1024,%d0 45254: 663a bnes 45290 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 45256: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4525a: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 45260: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 45264: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45268: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4526c: 6722 beqs 45290 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 4526e: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 45274: 40c3 movew %sr,%d3 <== NOT EXECUTED 45276: 8083 orl %d3,%d0 <== NOT EXECUTED 45278: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 4527a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4527e: 72df moveq #-33,%d1 <== NOT EXECUTED 45280: c081 andl %d1,%d0 <== NOT EXECUTED 45282: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 45286: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4528a: 6600 0242 bnew 454ce <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 4528e: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 45290: 202a 00b8 movel %a2@(184),%d0 45294: 0800 000a btst #10,%d0 45298: 6724 beqs 452be <== ALWAYS TAKEN 4529a: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 4529e: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 452a4: 6618 bnes 452be <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 452a6: 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); 452aa: 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); 452ac: 0880 000a bclr #10,%d0 <== NOT EXECUTED 452b0: 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); 452b4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 452b8: c083 andl %d3,%d0 <== NOT EXECUTED 452ba: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 452be: 202a 00b8 movel %a2@(184),%d0 452c2: 0800 0008 btst #8,%d0 452c6: 6738 beqs 45300 <== ALWAYS TAKEN 452c8: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 452cc: 6d00 01e4 bltw 454b2 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 452d0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 452d4: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 452d8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 452dc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 452e0: 44c0 movew %d0,%ccr <== NOT EXECUTED 452e2: 6610 bnes 452f4 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 452e4: 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) && 452e8: 4a88 tstl %a0 <== NOT EXECUTED 452ea: 6708 beqs 452f4 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 452ec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 452f0: 4e90 jsr %a0@ <== NOT EXECUTED 452f2: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 452f4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 452f8: 72fb moveq #-5,%d1 <== NOT EXECUTED 452fa: c081 andl %d1,%d0 <== NOT EXECUTED 452fc: 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) { 45300: 4aaa 0038 tstl %a2@(56) 45304: 6d00 01ac bltw 454b2 tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 45308: 202a 0030 movel %a2@(48),%d0 4530c: 0800 000c btst #12,%d0 45310: 670c beqs 4531e tty->flow_ctrl |= FL_MDXOF; 45312: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 45316: 08c1 000a bset #10,%d1 <== NOT EXECUTED 4531a: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 4531e: 0800 000a btst #10,%d0 45322: 670c beqs 45330 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 45324: 202a 00b8 movel %a2@(184),%d0 45328: 08c0 0009 bset #9,%d0 4532c: 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) { 45330: 7002 moveq #2,%d0 45332: c0aa 003c andl %a2@(60),%d0 45336: 6700 011e beqw 45456 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 4533a: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 4533e: 42aa 0070 clrl %a2@(112) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 45342: 206a 00a8 moveal %a2@(168),%a0 } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 45346: 42aa 0074 clrl %a2@(116) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4534a: 4a88 tstl %a0 4534c: 6700 fe20 beqw 4516e (*tty->device.setAttributes)(tty->minor, &tty->termios); 45350: 2f0c movel %a4,%sp@- 45352: 2f2a 0010 movel %a2@(16),%sp@- 45356: 4e90 jsr %a0@ 45358: 508f addql #8,%sp /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 4535a: 2f2a 0018 movel %a2@(24),%sp@- 4535e: 4eb9 0004 6840 jsr 46840 args->ioctl_return = sc; return sc; 45364: 588f addql #4,%sp 45366: 6000 fe12 braw 4517a case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 4536a: 2014 movel %a4@,%d0 <== NOT EXECUTED 4536c: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 45370: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 45374: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 45378: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 4537c: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED args->ioctl_return = sc; return sc; 45382: 588f addql #4,%sp <== NOT EXECUTED 45384: 6000 fdf4 braw 4517a <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 45388: 123c 0001 moveb #1,%d1 4538c: b280 cmpl %d0,%d1 4538e: 6600 fe0e bnew 4519e sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 45392: 206b 0008 moveal %a3@(8),%a0 45396: 20ea 0030 movel %a2@(48),%a0@+ 4539a: 20ea 0034 movel %a2@(52),%a0@+ 4539e: 20ea 0038 movel %a2@(56),%a0@+ 453a2: 20ea 003c movel %a2@(60),%a0@+ 453a6: 20ea 0040 movel %a2@(64),%a0@+ 453aa: 20ea 0044 movel %a2@(68),%a0@+ 453ae: 20ea 0048 movel %a2@(72),%a0@+ 453b2: 20ea 004c movel %a2@(76),%a0@+ 453b6: 20aa 0050 movel %a2@(80),%a0@ /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 453ba: 2f2a 0018 movel %a2@(24),%sp@- 453be: 4eb9 0004 6840 jsr 46840 args->ioctl_return = sc; return sc; 453c4: 588f addql #4,%sp 453c6: 6000 fdb2 braw 4517a sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 453ca: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 453d0: 675a beqs 4542c <== NOT EXECUTED 453d2: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 453d8: 6600 fdc4 bnew 4519e <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 453dc: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 453e0: 49f9 0005 f4a0 lea 5f4a0 ,%a4 <== NOT EXECUTED 453e6: e788 lsll #3,%d0 <== NOT EXECUTED 453e8: 2074 0c04 moveal %a4@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 453ec: 4a88 tstl %a0 <== NOT EXECUTED 453ee: 6708 beqs 453f8 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 453f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 453f2: 4e90 jsr %a0@ <== NOT EXECUTED 453f4: 588f addql #4,%sp <== NOT EXECUTED 453f6: 2400 movel %d0,%d2 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 453f8: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 453fc: 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) { 453fe: 2200 movel %d0,%d1 <== NOT EXECUTED 45400: 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); 45402: 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) { 45406: 2074 1800 moveal %a4@(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 */ 4540a: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 4540e: 4a88 tstl %a0 <== NOT EXECUTED 45410: 6700 fd5c beqw 4516e <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 45414: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45416: 4e90 jsr %a0@ <== NOT EXECUTED 45418: 588f addql #4,%sp <== NOT EXECUTED 4541a: 2400 movel %d0,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 4541c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 45420: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED args->ioctl_return = sc; return sc; 45426: 588f addql #4,%sp <== NOT EXECUTED 45428: 6000 fd50 braw 4517a <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_open != NULL) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 4542c: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 45430: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 45434: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 45438: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED args->ioctl_return = sc; return sc; 4543e: 588f addql #4,%sp <== NOT EXECUTED 45440: 6000 fd38 braw 4517a <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 45444: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 45448: 740a moveq #10,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 4544a: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED args->ioctl_return = sc; return sc; 45450: 588f addql #4,%sp <== NOT EXECUTED 45452: 6000 fd26 braw 4517a <== NOT EXECUTED 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; 45456: 4283 clrl %d3 <== NOT EXECUTED 45458: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 4545c: 4eb9 0004 5fbc jsr 45fbc <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 45462: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 45466: 760a moveq #10,%d3 <== NOT EXECUTED 45468: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 4546c: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 45470: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 45474: 677a beqs 454f0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 45476: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 4547a: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 4547e: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 45482: 6600 febe bnew 45342 <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 45486: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 4548a: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4548e: 4a88 tstl %a0 <== NOT EXECUTED 45490: 6600 febe bnew 45350 <== NOT EXECUTED 45494: 6000 fcd8 braw 4516e <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 45498: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 4549c: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 4549e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 454a2: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 454a6: d280 addl %d0,%d1 <== NOT EXECUTED 454a8: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 454ac: 2081 movel %d1,%a0@ <== NOT EXECUTED 454ae: 6000 fd56 braw 45206 <== 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) { tty->flow_ctrl |= FL_MDRTS; 454b2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 454b6: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 454ba: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 454be: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 454c2: 0800 000c btst #12,%d0 <== NOT EXECUTED 454c6: 6700 fe56 beqw 4531e <== NOT EXECUTED 454ca: 6000 fe46 braw 45312 <== NOT EXECUTED 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, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 454ce: 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, 454d2: 4878 0001 pea 1 <== NOT EXECUTED 454d6: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 454da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 454dc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 454e0: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 454e4: 4e90 jsr %a0@ <== NOT EXECUTED 454e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 454ea: 46c3 movew %d3,%sr <== NOT EXECUTED 454ec: 6000 fda2 braw 45290 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 454f0: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 454f4: 6600 fe44 bnew 4533a <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 454f8: 7001 moveq #1,%d0 <== NOT EXECUTED } } } if (tty->device.setAttributes) 454fa: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 454fe: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED } } } if (tty->device.setAttributes) 45502: 4a88 tstl %a0 <== NOT EXECUTED 45504: 6600 fe4a bnew 45350 <== NOT EXECUTED 45508: 6000 fc64 braw 4516e <== NOT EXECUTED =============================================================================== 000452c8 : #include int rtems_termios_number_to_baud( int32_t baud ) { 452c8: 4e56 0000 linkw %fp,#0 452cc: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 452d0: 0c81 0000 04b0 cmpil #1200,%d1 452d6: 6700 011c beqw 453f4 452da: 6f3c bles 45318 452dc: 0c81 0000 4b00 cmpil #19200,%d1 452e2: 6700 011c beqw 45400 452e6: 6f60 bles 45348 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; 452e8: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 452ee: 0c81 0001 c200 cmpil #115200,%d1 452f4: 671e beqs 45314 452f6: 6f00 00a8 blew 453a0 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; 452fa: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 45300: 0c81 0003 8400 cmpil #230400,%d1 45306: 670c beqs 45314 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; 45308: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 4530a: 0c81 0007 0800 cmpil #460800,%d1 45310: 6702 beqs 45314 <== ALWAYS TAKEN case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 45312: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 45314: 4e5e unlk %fp 45316: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 45318: 0c81 0000 0086 cmpil #134,%d1 4531e: 6700 00da beqw 453fa 45322: 6f46 bles 4536a 45324: 0c81 0000 00c8 cmpil #200,%d1 4532a: 6700 00b6 beqw 453e2 4532e: 6f56 bles 45386 45330: 0c81 0000 012c cmpil #300,%d1 45336: 6700 00a4 beqw 453dc 4533a: 0c81 0000 0258 cmpil #600,%d1 45340: 66d0 bnes 45312 <== NEVER TAKEN case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 45342: 7008 moveq #8,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 45344: 4e5e unlk %fp 45346: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 45348: 0c81 0000 0960 cmpil #2400,%d1 4534e: 6700 009e beqw 453ee 45352: 6f66 bles 453ba 45354: 0c81 0000 12c0 cmpil #4800,%d1 4535a: 676e beqs 453ca 4535c: 0c81 0000 2580 cmpil #9600,%d1 45362: 66ae bnes 45312 case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 45364: 700d moveq #13,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 45366: 4e5e unlk %fp 45368: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 4536a: 7032 moveq #50,%d0 4536c: b081 cmpl %d1,%d0 4536e: 6778 beqs 453e8 45370: 6c22 bges 45394 45372: 704b moveq #75,%d0 45374: b081 cmpl %d1,%d0 45376: 6758 beqs 453d0 45378: 103c 006e moveb #110,%d0 4537c: b081 cmpl %d1,%d0 4537e: 6692 bnes 45312 <== NEVER TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 45380: 7003 moveq #3,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 45382: 4e5e unlk %fp 45384: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 45386: 0c81 0000 0096 cmpil #150,%d1 4538c: 6684 bnes 45312 <== NEVER TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 4538e: 7005 moveq #5,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 45390: 4e5e unlk %fp 45392: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 45394: 4a81 tstl %d1 45396: 6600 ff7a bnew 45312 4539a: 4280 clrl %d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4539c: 4e5e unlk %fp 4539e: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 453a0: 0c81 0000 9600 cmpil #38400,%d1 453a6: 672e beqs 453d6 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; 453a8: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 453aa: 0c81 0000 e100 cmpil #57600,%d1 453b0: 6700 ff62 beqw 45314 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 453b4: 70ff moveq #-1,%d0 <== NOT EXECUTED 453b6: 6000 ff5c braw 45314 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 453ba: 0c81 0000 0708 cmpil #1800,%d1 453c0: 6600 ff50 bnew 45312 case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 453c4: 700a moveq #10,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453c6: 4e5e unlk %fp 453c8: 4e75 rts case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 453ca: 700c moveq #12,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453cc: 4e5e unlk %fp 453ce: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 453d0: 7002 moveq #2,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453d2: 4e5e unlk %fp 453d4: 4e75 rts case 1200: termios_baud = B1200; break; 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; 453d6: 700f moveq #15,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453d8: 4e5e unlk %fp 453da: 4e75 rts case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 453dc: 7007 moveq #7,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453de: 4e5e unlk %fp 453e0: 4e75 rts case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 453e2: 7006 moveq #6,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453e4: 4e5e unlk %fp 453e6: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 453e8: 7001 moveq #1,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453ea: 4e5e unlk %fp 453ec: 4e75 rts case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 453ee: 700b moveq #11,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453f0: 4e5e unlk %fp 453f2: 4e75 rts case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 453f4: 7009 moveq #9,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453f6: 4e5e unlk %fp 453f8: 4e75 rts switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 453fa: 7004 moveq #4,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 453fc: 4e5e unlk %fp 453fe: 4e75 rts case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 45400: 700e moveq #14,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 45402: 4e5e unlk %fp ... =============================================================================== 000456ba : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 456ba: 4e56 ffdc linkw %fp,#-36 456be: 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, 456c2: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 456c4: 242e 0008 movel %fp@(8),%d2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 456c8: 42a7 clrl %sp@- 456ca: 2f39 0005 fce4 movel 5fce4 ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 456d0: 262e 000c movel %fp@(12),%d3 456d4: 266e 0010 moveal %fp@(16),%a3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 456d8: 4eb9 0004 6704 jsr 46704 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 456de: 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, 456e2: 2800 movel %d0,%d4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 456e4: 6600 027a bnew 45960 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 456e8: 2479 0005 fcec moveal 5fcec ,%a2 456ee: 4a8a tstl %a2 456f0: 670e beqs 45700 if ((tty->major == major) && (tty->minor == minor)) 456f2: b4aa 000c cmpl %a2@(12),%d2 456f6: 6700 0274 beqw 4596c */ 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) { 456fa: 2452 moveal %a2@,%a2 456fc: 4a8a tstl %a2 456fe: 66f2 bnes 456f2 <== NEVER TAKEN static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 45700: 4878 00e8 pea e8 45704: 4878 0001 pea 1 45708: 4eb9 0004 2918 jsr 42918 if (tty == NULL) { 4570e: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 45710: 2840 moveal %d0,%a4 45712: 2440 moveal %d0,%a2 if (tty == NULL) { 45714: 4a80 tstl %d0 45716: 6700 0348 beqw 45a60 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 4571a: 41f9 0005 e704 lea 5e704 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 45720: 4bf9 0004 3108 lea 43108 ,%a5 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 45726: 2950 0064 movel %a0@,%a4@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 4572a: 202c 0064 movel %a4@(100),%d0 4572e: 2f00 movel %d0,%sp@- 45730: 4e95 jsr %a5@ if (tty->rawInBuf.theBuf == NULL) { 45732: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 45734: 2940 0058 movel %d0,%a4@(88) if (tty->rawInBuf.theBuf == NULL) { 45738: 6700 0342 beqw 45a7c return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 4573c: 41f9 0005 e708 lea 5e708 ,%a0 45742: 2950 0088 movel %a0@,%a4@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 45746: 202c 0088 movel %a4@(136),%d0 4574a: 2f00 movel %d0,%sp@- 4574c: 4e95 jsr %a5@ if (tty->rawOutBuf.theBuf == NULL) { 4574e: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 45750: 2940 007c movel %d0,%a4@(124) if (tty->rawOutBuf.theBuf == NULL) { 45754: 6700 034a beqw 45aa0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 45758: 2f39 0005 e700 movel 5e700 ,%sp@- 4575e: 4e95 jsr %a5@ if (tty->cbuf == NULL) { 45760: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 45762: 2940 001c movel %d0,%a4@(28) if (tty->cbuf == NULL) { 45766: 6700 0366 beqw 45ace tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 4576a: 2079 0005 fcec moveal 5fcec ,%a0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 45770: 42ac 00d4 clrl %a4@(212) tty->tty_snd.sw_arg = NULL; 45774: 42ac 00d8 clrl %a4@(216) tty->tty_rcv.sw_pfn = NULL; 45778: 42ac 00dc clrl %a4@(220) tty->tty_rcv.sw_arg = NULL; 4577c: 42ac 00e0 clrl %a4@(224) tty->tty_rcvwakeup = 0; 45780: 42ac 00e4 clrl %a4@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 45784: 2888 movel %a0,%a4@ tty->back = NULL; 45786: 42ac 0004 clrl %a4@(4) if (rtems_termios_ttyHead != NULL) 4578a: 4a88 tstl %a0 4578c: 6704 beqs 45792 rtems_termios_ttyHead->back = tty; 4578e: 214c 0004 movel %a4,%a0@(4) rtems_termios_ttyHead = tty; 45792: 23cc 0005 fcec movel %a4,5fcec if (rtems_termios_ttyTail == NULL) 45798: 4ab9 0005 fce8 tstl 5fce8 4579e: 6700 02b6 beqw 45a56 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 457a2: 486c 0014 pea %a4@(20) 457a6: 4bf9 0004 6464 lea 46464 ,%a5 457ac: 1039 0005 e70c moveb 5e70c ,%d0 457b2: 42a7 clrl %sp@- 457b4: 4878 0054 pea 54 457b8: 49c0 extbl %d0 457ba: 4878 0001 pea 1 457be: 0080 5452 6900 oril #1414686976,%d0 457c4: 2f00 movel %d0,%sp@- rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 457c6: 2943 0010 movel %d3,%a4@(16) tty->major = major; 457ca: 2942 000c movel %d2,%a4@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 457ce: 4e95 jsr %a5@ 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) 457d0: 4fef 0014 lea %sp@(20),%sp 457d4: 4a80 tstl %d0 457d6: 6600 020c bnew 459e4 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 457da: 486c 0018 pea %a4@(24) 457de: 1039 0005 e70c moveb 5e70c ,%d0 457e4: 42a7 clrl %sp@- 457e6: 4878 0054 pea 54 457ea: 49c0 extbl %d0 457ec: 4878 0001 pea 1 457f0: 0080 5452 6f00 oril #1414688512,%d0 457f6: 2f00 movel %d0,%sp@- 457f8: 4e95 jsr %a5@ 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) 457fa: 4fef 0014 lea %sp@(20),%sp 457fe: 4a80 tstl %d0 45800: 6600 01e2 bnew 459e4 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 45804: 486c 008c pea %a4@(140) 45808: 1039 0005 e70c moveb 5e70c ,%d0 4580e: 42a7 clrl %sp@- 45810: 4878 0020 pea 20 45814: 49c0 extbl %d0 45816: 0080 5452 7800 oril #1414690816,%d0 4581c: 42a7 clrl %sp@- 4581e: 2f00 movel %d0,%sp@- 45820: 4e95 jsr %a5@ rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 45822: 4fef 0014 lea %sp@(20),%sp 45826: 4a80 tstl %d0 45828: 6600 01ba bnew 459e4 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 4582c: 226e 0014 moveal %fp@(20),%a1 45830: 41ec 0098 lea %a4@(152),%a0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 45834: 7002 moveq #2,%d0 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 45836: 20d9 movel %a1@+,%a0@+ 45838: 20d9 movel %a1@+,%a0@+ 4583a: 20d9 movel %a1@+,%a0@+ 4583c: 20d9 movel %a1@+,%a0@+ 4583e: 20d9 movel %a1@+,%a0@+ 45840: 20d9 movel %a1@+,%a0@+ 45842: 20d9 movel %a1@+,%a0@+ 45844: 2091 movel %a1@,%a0@ RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 45846: 42ac 0094 clrl %a4@(148) tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4584a: b0ac 00b4 cmpl %a4@(180),%d0 4584e: 6700 019c beqw 459ec &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 45852: 4aac 00a0 tstl %a4@(160) 45856: 6700 0164 beqw 459bc (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 4585a: 7202 moveq #2,%d1 4585c: b2ac 00b4 cmpl %a4@(180),%d1 45860: 6700 015a beqw 459bc 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; 45864: 42ac 00b8 clrl %a4@(184) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 45868: 202c 0064 movel %a4@(100),%d0 tty->highwater = tty->rawInBuf.Size * 3/4; 4586c: 206c 0064 moveal %a4@(100),%a0 /* 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; 45870: e288 lsrl #1,%d0 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 45872: 1239 0005 e70c moveb 5e70c ,%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; 45878: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 /* * Bump name characer */ if (c++ == 'z') 4587c: 49c1 extbl %d1 4587e: 2a41 moveal %d1,%a5 45880: 528d addql #1,%a5 45882: 2241 moveal %d1,%a1 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; 45884: 2208 movel %a0,%d1 45886: e489 lsrl #2,%d1 /* * 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; 45888: 307c 08bd moveaw #2237,%a0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 4588c: 3a0d movew %a5,%d5 4588e: 13c5 0005 e70c moveb %d5,5e70c 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'; 45894: 7a03 moveq #3,%d5 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; 45896: 2941 00c0 movel %d1,%a4@(192) 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'; 4589a: 1945 0041 moveb %d5,%a4@(65) tty->termios.c_cc[VQUIT] = '\034'; 4589e: 7a1c moveq #28,%d5 /* 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; 458a0: 2940 00bc movel %d0,%a4@(188) 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'; 458a4: 1945 0042 moveb %d5,%a4@(66) tty->termios.c_cc[VERASE] = '\177'; 458a8: 7a7f moveq #127,%d5 /* * 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; 458aa: 2948 0038 movel %a0,%a4@(56) 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'; 458ae: 1945 0043 moveb %d5,%a4@(67) tty->termios.c_cc[VKILL] = '\025'; 458b2: 7a15 moveq #21,%d5 tty->termios.c_cc[VEOF] = '\004'; 458b4: 7204 moveq #4,%d1 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'; 458b6: 1945 0044 moveb %d5,%a4@(68) tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 458ba: 4205 clrb %d5 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 458bc: 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'; 458be: 1941 0045 moveb %d1,%a4@(69) tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 458c2: 7213 moveq #19,%d1 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'; 458c4: 1945 004c moveb %d5,%a4@(76) tty->termios.c_cc[VEOL2] = '\000'; 458c8: 1945 0051 moveb %d5,%a4@(81) tty->termios.c_cc[VSTART] = '\021'; 458cc: 1940 0049 moveb %d0,%a4@(73) tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 458d0: 7a1a moveq #26,%d5 tty->termios.c_cc[VREPRINT] = '\022'; 458d2: 7012 moveq #18,%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'; 458d4: 1941 004a moveb %d1,%a4@(74) tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 458d8: 720f moveq #15,%d1 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 458da: 1945 004b moveb %d5,%a4@(75) tty->termios.c_cc[VREPRINT] = '\022'; 458de: 1940 004d moveb %d0,%a4@(77) tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 458e2: 7a17 moveq #23,%d5 tty->termios.c_cc[VLNEXT] = '\026'; 458e4: 7016 moveq #22,%d0 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 458e6: 1941 004e moveb %d1,%a4@(78) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 458ea: 223c 0000 2502 movel #9474,%d1 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'; 458f0: 1945 004f moveb %d5,%a4@(79) tty->termios.c_cc[VLNEXT] = '\026'; 458f4: 1940 0050 moveb %d0,%a4@(80) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 458f8: 2941 0030 movel %d1,%a4@(48) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 458fc: 2a3c 0000 1805 movel #6149,%d5 45902: 2945 0034 movel %d5,%a4@(52) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 45906: 203c 0000 823b movel #33339,%d0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 4590c: 323c 007a movew #122,%d1 * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 45910: 2940 003c movel %d0,%a4@(60) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 45914: b289 cmpl %a1,%d1 45916: 6608 bnes 45920 <== ALWAYS TAKEN c = 'a'; 45918: 7a61 moveq #97,%d5 <== NOT EXECUTED 4591a: 13c5 0005 e70c moveb %d5,5e70c <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 45920: 202a 0008 movel %a2@(8),%d0 45924: 2200 movel %d0,%d1 45926: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 45928: 2053 moveal %a3@,%a0 if (!tty->refcount++) { 4592a: 2541 0008 movel %d1,%a2@(8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 4592e: 214a 0034 movel %a2,%a0@(52) if (!tty->refcount++) { 45932: 4a80 tstl %d0 45934: 661c bnes 45952 if (tty->device.firstOpen) 45936: 206a 0098 moveal %a2@(152),%a0 4593a: 4a88 tstl %a0 4593c: 670c beqs 4594a (*tty->device.firstOpen)(major, minor, arg); 4593e: 2f0b movel %a3,%sp@- 45940: 2f03 movel %d3,%sp@- 45942: 2f02 movel %d2,%sp@- 45944: 4e90 jsr %a0@ 45946: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4594a: 7a02 moveq #2,%d5 4594c: baaa 00b4 cmpl %a2@(180),%d5 45950: 672c beqs 4597e <== NEVER TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 45952: 2f39 0005 fce4 movel 5fce4 ,%sp@- 45958: 4eb9 0004 6840 jsr 46840 return RTEMS_SUCCESSFUL; 4595e: 588f addql #4,%sp } 45960: 2004 movel %d4,%d0 45962: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 45968: 4e5e unlk %fp 4596a: 4e75 rts 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) { if ((tty->major == major) && (tty->minor == minor)) 4596c: b6aa 0010 cmpl %a2@(16),%d3 45970: 67ae beqs 45920 <== ALWAYS TAKEN */ 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) { 45972: 2452 moveal %a2@,%a2 <== NOT EXECUTED 45974: 4a8a tstl %a2 <== NOT EXECUTED 45976: 6600 fd7a bnew 456f2 <== NOT EXECUTED 4597a: 6000 fd84 braw 45700 <== NOT EXECUTED (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 4597e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45980: 487a 0202 pea %pc@(45b84 ) <== NOT EXECUTED 45984: 47f9 0004 6bb0 lea 46bb0 ,%a3 <== NOT EXECUTED 4598a: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 4598e: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 45990: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45994: 4a80 tstl %d0 <== NOT EXECUTED 45996: 664c bnes 459e4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 45998: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4599a: 487a 0166 pea %pc@(45b02 ) <== NOT EXECUTED 4599e: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 459a2: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 459a4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 459a8: 4a80 tstl %d0 <== NOT EXECUTED 459aa: 6638 bnes 459e4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 459ac: 2f39 0005 fce4 movel 5fce4 ,%sp@- <== NOT EXECUTED 459b2: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return RTEMS_SUCCESSFUL; 459b8: 588f addql #4,%sp <== NOT EXECUTED 459ba: 60a4 bras 45960 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 459bc: 486c 0068 pea %a4@(104) 459c0: 1039 0005 e70c moveb 5e70c ,%d0 459c6: 42a7 clrl %sp@- 459c8: 4878 0024 pea 24 459cc: 49c0 extbl %d0 459ce: 0080 5452 7200 oril #1414689280,%d0 459d4: 42a7 clrl %sp@- 459d6: 2f00 movel %d0,%sp@- 459d8: 4e95 jsr %a5@ rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 459da: 4fef 0014 lea %sp@(20),%sp 459de: 4a80 tstl %d0 459e0: 6700 fe82 beqw 45864 sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 459e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 459e6: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 459ec: 486c 00c8 pea %a4@(200) <== NOT EXECUTED 459f0: 41f9 0004 68fc lea 468fc ,%a0 <== NOT EXECUTED 459f6: 1039 0005 e70c moveb 5e70c ,%d0 <== NOT EXECUTED 459fc: 42a7 clrl %sp@- <== NOT EXECUTED 459fe: 4878 0500 pea 500 <== NOT EXECUTED 45a02: 49c0 extbl %d0 <== NOT EXECUTED 45a04: 4878 0400 pea 400 <== NOT EXECUTED 45a08: 4878 000a pea a <== NOT EXECUTED 45a0c: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 45a12: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45a14: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 45a18: 4e90 jsr %a0@ <== 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) 45a1a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 45a1e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45a22: 4a80 tstl %d0 <== NOT EXECUTED 45a24: 66be bnes 459e4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 45a26: 486c 00c4 pea %a4@(196) <== NOT EXECUTED 45a2a: 1039 0005 e70c moveb 5e70c ,%d0 <== NOT EXECUTED 45a30: 42a7 clrl %sp@- <== NOT EXECUTED 45a32: 4878 0500 pea 500 <== NOT EXECUTED 45a36: 49c0 extbl %d0 <== NOT EXECUTED 45a38: 4878 0400 pea 400 <== NOT EXECUTED 45a3c: 4878 0009 pea 9 <== NOT EXECUTED 45a40: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 45a46: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45a48: 4e90 jsr %a0@ <== 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) 45a4a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45a4e: 4a80 tstl %d0 <== NOT EXECUTED 45a50: 6700 fe00 beqw 45852 <== NOT EXECUTED 45a54: 608e bras 459e4 <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 45a56: 23cc 0005 fce8 movel %a4,5fce8 45a5c: 6000 fd44 braw 457a2 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 45a60: 2f39 0005 fce4 movel 5fce4 ,%sp@- <== NOT EXECUTED 45a66: 781a moveq #26,%d4 <== NOT EXECUTED 45a68: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return RTEMS_NO_MEMORY; 45a6e: 588f addql #4,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 45a70: 2004 movel %d4,%d0 <== NOT EXECUTED 45a72: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45a78: 4e5e unlk %fp <== NOT EXECUTED 45a7a: 4e75 rts <== 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); 45a7c: 2f0c movel %a4,%sp@- <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 45a7e: 781a moveq #26,%d4 <== 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); 45a80: 4eb9 0004 2ddc jsr 42ddc <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 45a86: 2f39 0005 fce4 movel 5fce4 ,%sp@- <== NOT EXECUTED 45a8c: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return RTEMS_NO_MEMORY; 45a92: 508f addql #8,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 45a94: 2004 movel %d4,%d0 <== NOT EXECUTED 45a96: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45a9c: 4e5e unlk %fp <== NOT EXECUTED 45a9e: 4e75 rts <== 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)); 45aa0: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 45aa4: 45f9 0004 2ddc lea 42ddc ,%a2 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 45aaa: 781a moveq #26,%d4 <== 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)); 45aac: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 45aae: 2f0c movel %a4,%sp@- <== NOT EXECUTED 45ab0: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 45ab2: 2f39 0005 fce4 movel 5fce4 ,%sp@- <== NOT EXECUTED 45ab8: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return RTEMS_NO_MEMORY; 45abe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 45ac2: 2004 movel %d4,%d0 <== NOT EXECUTED 45ac4: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45aca: 4e5e unlk %fp <== NOT EXECUTED 45acc: 4e75 rts <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 45ace: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 45ad2: 45f9 0004 2ddc lea 42ddc ,%a2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 45ad8: 781a moveq #26,%d4 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 45ada: 4e92 jsr %a2@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 45adc: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 45ae0: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 45ae2: 2f0c movel %a4,%sp@- <== NOT EXECUTED 45ae4: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 45ae6: 2f39 0005 fce4 movel 5fce4 ,%sp@- <== NOT EXECUTED 45aec: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return RTEMS_NO_MEMORY; 45af2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 45af6: 2004 movel %d4,%d0 <== NOT EXECUTED 45af8: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45afe: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000444a8 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 444a8: 4e56 ffdc linkw %fp,#-36 444ac: 202e 0008 movel %fp@(8),%d0 444b0: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 444b4: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 444b8: 2840 moveal %d0,%a4 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 444ba: 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) { 444be: 4aaa 00b4 tstl %a2@(180) 444c2: 6700 00e8 beqw 445ac (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 444c6: 2c2a 0080 movel %a2@(128),%d6 while (len) { 444ca: 4a82 tstl %d2 444cc: 6700 00d4 beqw 445a2 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 444d0: 222a 0088 movel %a2@(136),%d1 444d4: 5286 addql #1,%d6 rtems_interrupt_disable (level); 444d6: 2a3c 0000 0700 movel #1792,%d5 444dc: 47f9 0004 6704 lea 46704 ,%a3 444e2: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 444e4: 4c41 6007 remul %d1,%d7,%d6 444e8: 2c07 movel %d7,%d6 rtems_interrupt_disable (level); 444ea: 40c3 movew %sr,%d3 444ec: 8083 orl %d3,%d0 444ee: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 444f0: 282a 0084 movel %a2@(132),%d4 444f4: be84 cmpl %d4,%d7 444f6: 662c bnes 44524 tty->rawOutBufState = rob_wait; 444f8: 7002 moveq #2,%d0 444fa: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 444fe: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 44500: 42a7 clrl %sp@- 44502: 42a7 clrl %sp@- 44504: 2f2a 008c movel %a2@(140),%sp@- 44508: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4450a: 4fef 000c lea %sp@(12),%sp 4450e: 4a80 tstl %d0 44510: 6600 00b6 bnew 445c8 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 44514: 2005 movel %d5,%d0 44516: 40c3 movew %sr,%d3 44518: 8083 orl %d3,%d0 4451a: 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) { 4451c: 202a 0084 movel %a2@(132),%d0 44520: b880 cmpl %d0,%d4 44522: 67d4 beqs 444f8 <== NEVER TAKEN RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 44524: 202a 0080 movel %a2@(128),%d0 44528: 206a 007c moveal %a2@(124),%a0 4452c: 1194 0800 moveb %a4@,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 44530: 2547 0080 movel %d7,%a2@(128) if (tty->rawOutBufState == rob_idle) { 44534: 4aaa 0094 tstl %a2@(148) 44538: 661c bnes 44556 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 4453a: 202a 00b8 movel %a2@(184),%d0 4453e: 0800 0004 btst #4,%d0 44542: 673a beqs 4457e <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 44544: 202a 00b8 movel %a2@(184),%d0 44548: 7220 moveq #32,%d1 <== NOT EXECUTED 4454a: 8081 orl %d1,%d0 <== NOT EXECUTED 4454c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 44550: 7001 moveq #1,%d0 <== NOT EXECUTED 44552: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED } rtems_interrupt_enable (level); 44556: 46c3 movew %d3,%sr len--; 44558: 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) { 4455a: 6746 beqs 445a2 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 4455c: 222a 0088 movel %a2@(136),%d1 44560: 5286 addql #1,%d6 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 44562: 528c addql #1,%a4 * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 44564: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 44566: 4c41 6007 remul %d1,%d7,%d6 4456a: 2c07 movel %d7,%d6 rtems_interrupt_disable (level); 4456c: 40c3 movew %sr,%d3 4456e: 8083 orl %d3,%d0 44570: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 44572: 282a 0084 movel %a2@(132),%d4 44576: be84 cmpl %d4,%d7 44578: 6700 ff7e beqw 444f8 4457c: 60a6 bras 44524 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, 4457e: 4878 0001 pea 1 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 44582: 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, 44586: d0aa 007c addl %a2@(124),%d0 4458a: 2f00 movel %d0,%sp@- 4458c: 2f2a 0010 movel %a2@(16),%sp@- 44590: 206a 00a4 moveal %a2@(164),%a0 44594: 4e90 jsr %a0@ 44596: 4fef 000c lea %sp@(12),%sp } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 4459a: 7001 moveq #1,%d0 4459c: 2540 0094 movel %d0,%a2@(148) 445a0: 60b4 bras 44556 } rtems_interrupt_enable (level); len--; } } 445a2: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 445a8: 4e5e unlk %fp 445aa: 4e75 rts 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); 445ac: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 445b0: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 445b6: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 445ba: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%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); 445c0: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 445c4: 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); 445c6: 4ed1 jmp %a1@ <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 445c8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 445ca: 4eb9 0004 6e28 jsr 46e28 <== NOT EXECUTED =============================================================================== 00044e02 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 44e02: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 44e06: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 44e0a: 2a6e 0008 moveal %fp@(8),%a5 <== 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); 44e0e: 2c3c 0004 6704 movel #288516,%d6 <== 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; 44e14: 2055 moveal %a5@,%a0 <== NOT EXECUTED 44e16: 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); 44e1a: 2046 moveal %d6,%a0 <== NOT EXECUTED 44e1c: 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; 44e1e: 262d 0010 movel %a5@(16),%d3 <== NOT EXECUTED char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44e22: 42a7 clrl %sp@- <== NOT EXECUTED 44e24: 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; 44e28: 286d 000c moveal %a5@(12),%a4 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44e2c: 4e90 jsr %a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 44e2e: 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); 44e32: 2a00 movel %d0,%d5 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 44e34: 662e bnes 44e64 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 44e36: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44e3a: 41f9 0005 f4a0 lea 5f4a0 ,%a0 <== NOT EXECUTED 44e40: eb88 lsll #5,%d0 <== NOT EXECUTED 44e42: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 44e46: 4a88 tstl %a0 <== NOT EXECUTED 44e48: 6726 beqs 44e70 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 44e4a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 44e4c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44e4e: 4e90 jsr %a0@ <== NOT EXECUTED 44e50: 2a00 movel %d0,%d5 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 44e52: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED rtems_semaphore_release (tty->isem); 44e56: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 44e5a: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return sc; 44e60: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 44e64: 2005 movel %d5,%d0 <== NOT EXECUTED 44e66: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44e6c: 4e5e unlk %fp <== NOT EXECUTED 44e6e: 4e75 rts <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 44e70: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 44e74: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 44e78: 674e beqs 44ec8 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 44e7a: 4a83 tstl %d3 <== NOT EXECUTED 44e7c: 6724 beqs 44ea2 <== NOT EXECUTED 44e7e: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 44e82: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44e86: 6c1a bges 44ea2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 44e88: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED count--; 44e8c: 5383 subql #1,%d3 <== 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++]; 44e8e: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+ <== NOT EXECUTED 44e92: 5280 addql #1,%d0 <== NOT EXECUTED 44e94: 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)) { 44e98: 4a83 tstl %d3 <== NOT EXECUTED 44e9a: 6706 beqs 44ea2 <== NOT EXECUTED 44e9c: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44ea0: 6de6 blts 44e88 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 44ea2: 202d 0010 movel %a5@(16),%d0 <== NOT EXECUTED 44ea6: 9083 subl %d3,%d0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 44ea8: 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; 44eac: 2b40 0018 movel %d0,%a5@(24) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 44eb0: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 44eb4: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return sc; 44eba: 588f addql #4,%sp <== NOT EXECUTED } 44ebc: 2005 movel %d5,%d0 <== NOT EXECUTED 44ebe: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44ec4: 4e5e unlk %fp <== NOT EXECUTED 44ec6: 4e75 rts <== NOT EXECUTED } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 44ec8: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 44ecc: 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; 44ed2: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED 44ed6: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 44eda: 4a88 tstl %a0 <== NOT EXECUTED 44edc: 6708 beqs 44ee6 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 44ede: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 44ee2: 6700 0152 beqw 45036 <== 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, 44ee6: 41ea 0049 lea %a2@(73),%a0 <== NOT EXECUTED 44eea: 7801 moveq #1,%d4 <== NOT EXECUTED 44eec: 47fa fd52 lea %pc@(44c40 ),%a3 <== 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; 44ef0: 242a 0074 movel %a2@(116),%d2 <== 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, 44ef4: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44ef8: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44efc: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44f00: b081 cmpl %d1,%d0 <== NOT EXECUTED 44f02: 6700 00c6 beqw 44fca <== NOT EXECUTED 44f06: 2039 0005 e700 movel 5e700 ,%d0 <== NOT EXECUTED 44f0c: 5380 subql #1,%d0 <== NOT EXECUTED 44f0e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44f12: 6f00 00b6 blew 44fca <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 44f16: 242a 005c movel %a2@(92),%d2 <== NOT EXECUTED 44f1a: 5282 addql #1,%d2 <== NOT EXECUTED 44f1c: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 44f20: 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; 44f24: 4c40 2001 remul %d0,%d1,%d2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 44f28: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 44f2c: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 44f30: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44f34: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 44f38: d088 addl %a0,%d0 <== NOT EXECUTED 44f3a: 9081 subl %d1,%d0 <== NOT EXECUTED 44f3c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44f40: 4c41 0007 remul %d1,%d7,%d0 <== NOT EXECUTED 44f44: beaa 00bc cmpl %a2@(188),%d7 <== NOT EXECUTED 44f48: 6446 bccs 44f90 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 44f4a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44f4e: 72fe moveq #-2,%d1 <== NOT EXECUTED 44f50: c081 andl %d1,%d0 <== NOT EXECUTED 44f52: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 44f56: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44f5a: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 44f60: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 44f66: 6700 00a2 beqw 4500a <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 44f6a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44f6e: 0800 0008 btst #8,%d0 <== NOT EXECUTED 44f72: 671c beqs 44f90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 44f74: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44f78: 7efb moveq #-5,%d7 <== NOT EXECUTED 44f7a: c287 andl %d7,%d1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 44f7c: 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; 44f80: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 44f84: 4a88 tstl %a0 <== NOT EXECUTED 44f86: 6708 beqs 44f90 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 44f88: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44f8c: 4e90 jsr %a0@ <== NOT EXECUTED 44f8e: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 44f90: 7002 moveq #2,%d0 <== NOT EXECUTED 44f92: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44f96: 6754 beqs 44fec <== NOT EXECUTED if (siproc (c, tty)) 44f98: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44f9a: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44fa0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44fa2: 4e93 jsr %a3@ <== NOT EXECUTED 44fa4: 508f addql #8,%sp <== NOT EXECUTED 44fa6: 4a80 tstl %d0 <== NOT EXECUTED 44fa8: 665c bnes 45006 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44faa: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 44fae: 242a 0070 movel %a2@(112),%d2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44fb2: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44fb6: b081 cmpl %d1,%d0 <== NOT EXECUTED 44fb8: 6710 beqs 44fca <== NOT EXECUTED 44fba: 2039 0005 e700 movel 5e700 ,%d0 <== NOT EXECUTED 44fc0: 5380 subql #1,%d0 <== NOT EXECUTED 44fc2: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44fc6: 6e00 ff4e bgtw 44f16 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 44fca: 4a84 tstl %d4 <== NOT EXECUTED 44fcc: 6700 feac beqw 44e7a <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 44fd0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44fd2: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 44fd6: 2046 moveal %d6,%a0 <== NOT EXECUTED 44fd8: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 44fdc: 4e90 jsr %a0@ <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 44fde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fe2: 4a80 tstl %d0 <== NOT EXECUTED 44fe4: 6700 ff12 beqw 44ef8 <== NOT EXECUTED 44fe8: 6000 fe90 braw 44e7a <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 44fec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fee: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44ff4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44ff6: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 44ff8: 508f addql #8,%sp <== NOT EXECUTED 44ffa: 4280 clrl %d0 <== NOT EXECUTED 44ffc: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 45000: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 45004: 6ea4 bgts 44faa <== NOT EXECUTED 45006: 4284 clrl %d4 <== NOT EXECUTED 45008: 60a0 bras 44faa <== 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)) 4500a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4500e: 670c beqs 4501c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 45010: 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)) 45014: 0800 0005 btst #5,%d0 <== NOT EXECUTED 45018: 6700 ff50 beqw 44f6a <== 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, 4501c: 4878 0001 pea 1 <== NOT EXECUTED 45020: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 45024: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45028: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4502c: 4e90 jsr %a0@ <== NOT EXECUTED 4502e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45032: 6000 ff5c braw 44f90 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 45036: 7002 moveq #2,%d0 <== NOT EXECUTED 45038: 47fa fc06 lea %pc@(44c40 ),%a3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 4503c: 243c 0004 6c6c movel #289900,%d2 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 45042: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 45046: 6728 beqs 45070 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 45048: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4504c: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 4504e: 588f addql #4,%sp <== NOT EXECUTED 45050: 4a80 tstl %d0 <== NOT EXECUTED 45052: 6d00 00b8 bltw 4510c <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 45056: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45058: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4505e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45060: 4e93 jsr %a3@ <== NOT EXECUTED 45062: 508f addql #8,%sp <== NOT EXECUTED 45064: 4a80 tstl %d0 <== NOT EXECUTED 45066: 6600 fe12 bnew 44e7a <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4506a: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 4506e: 60d8 bras 45048 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 45070: 283c 0004 5fd4 movel #286676,%d4 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 45076: 243c 0004 6c6c movel #289900,%d2 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 4507c: 2044 moveal %d4,%a0 <== NOT EXECUTED 4507e: 4e90 jsr %a0@ <== NOT EXECUTED 45080: 2c00 movel %d0,%d6 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 45082: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45086: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 4508a: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 4508c: 588f addql #4,%sp <== NOT EXECUTED 4508e: 4a80 tstl %d0 <== NOT EXECUTED 45090: 6d38 blts 450ca <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 45092: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45094: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4509a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4509c: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 4509e: 508f addql #8,%sp <== NOT EXECUTED 450a0: 4281 clrl %d1 <== NOT EXECUTED 450a2: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 450a6: 1200 moveb %d0,%d1 <== NOT EXECUTED 450a8: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 450ac: 6f00 fdcc blew 44e7a <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 450b0: 4a00 tstb %d0 <== NOT EXECUTED 450b2: 67ce beqs 45082 <== NOT EXECUTED 450b4: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 450b8: 66c2 bnes 4507c <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 450ba: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 450be: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 450c2: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 450c4: 588f addql #4,%sp <== NOT EXECUTED 450c6: 4a80 tstl %d0 <== NOT EXECUTED 450c8: 6cc8 bges 45092 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 450ca: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 450ce: 6718 beqs 450e8 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 450d0: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 450d4: 6706 beqs 450dc <== NOT EXECUTED 450d6: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 450da: 6614 bnes 450f0 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 450dc: 4878 0001 pea 1 <== NOT EXECUTED 450e0: 2042 moveal %d2,%a0 <== NOT EXECUTED 450e2: 4e90 jsr %a0@ <== NOT EXECUTED 450e4: 588f addql #4,%sp <== NOT EXECUTED 450e6: 609a bras 45082 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 450e8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 450ec: 6700 fd8c beqw 44e7a <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 450f0: 2044 moveal %d4,%a0 <== NOT EXECUTED 450f2: 4e90 jsr %a0@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 450f4: 9086 subl %d6,%d0 <== NOT EXECUTED 450f6: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 450fa: 6200 fd7e bhiw 44e7a <== NOT EXECUTED break; } } rtems_task_wake_after (1); 450fe: 4878 0001 pea 1 <== NOT EXECUTED 45102: 2042 moveal %d2,%a0 <== NOT EXECUTED 45104: 4e90 jsr %a0@ <== NOT EXECUTED 45106: 588f addql #4,%sp <== NOT EXECUTED 45108: 6000 ff78 braw 45082 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 4510c: 4878 0001 pea 1 <== NOT EXECUTED 45110: 2042 moveal %d2,%a0 <== NOT EXECUTED 45112: 4e90 jsr %a0@ <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 45114: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 45118: 588f addql #4,%sp <== NOT EXECUTED 4511a: 6000 ff2c braw 45048 <== NOT EXECUTED =============================================================================== 00043f60 : * 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) { 43f60: 4e56 fff4 linkw %fp,#-12 43f64: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43f68: 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)) 43f6c: 202a 00b8 movel %a2@(184),%d0 43f70: 0280 0000 0403 andil #1027,%d0 43f76: 0c80 0000 0401 cmpil #1025,%d0 43f7c: 6700 0140 beqw 440be tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 43f80: 202a 00b8 movel %a2@(184),%d0 43f84: 7603 moveq #3,%d3 43f86: 7202 moveq #2,%d1 43f88: c083 andl %d3,%d0 43f8a: b280 cmpl %d0,%d1 43f8c: 6700 0172 beqw 44100 rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 43f90: 222a 0080 movel %a2@(128),%d1 43f94: 202a 0084 movel %a2@(132),%d0 43f98: b081 cmpl %d1,%d0 43f9a: 6700 009c beqw 44038 rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 43f9e: 203c 0000 0700 movel #1792,%d0 43fa4: 40c2 movew %sr,%d2 43fa6: 8082 orl %d2,%d0 43fa8: 46c0 movew %d0,%sr len = tty->t_dqlen; 43faa: 222a 0090 movel %a2@(144),%d1 tty->t_dqlen = 0; 43fae: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 43fb2: 46c2 movew %d2,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 43fb4: 202a 0084 movel %a2@(132),%d0 43fb8: d280 addl %d0,%d1 43fba: 202a 0088 movel %a2@(136),%d0 43fbe: 4c40 1002 remul %d0,%d2,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 43fc2: 7002 moveq #2,%d0 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 43fc4: 2542 0084 movel %d2,%a2@(132) if (tty->rawOutBufState == rob_wait) { 43fc8: b0aa 0094 cmpl %a2@(148),%d0 43fcc: 6700 00d8 beqw 440a6 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 43fd0: 202a 0080 movel %a2@(128),%d0 43fd4: b480 cmpl %d0,%d2 43fd6: 6778 beqs 44050 if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 43fd8: 202a 00b8 movel %a2@(184),%d0 43fdc: 0280 0000 0210 andil #528,%d0 43fe2: 0c80 0000 0210 cmpil #528,%d0 43fe8: 6700 015a beqw 44144 } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 43fec: 202a 0080 movel %a2@(128),%d0 43ff0: b082 cmpl %d2,%d0 43ff2: 647e bccs 44072 nToSend = tty->rawOutBuf.Size - newTail; 43ff4: 262a 0088 movel %a2@(136),%d3 43ff8: 9682 subl %d2,%d3 else nToSend = tty->rawOutBuf.Head - newTail; /* 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)) { 43ffa: 202a 00b8 movel %a2@(184),%d0 43ffe: 0280 0000 0600 andil #1536,%d0 44004: 677e beqs 44084 <== ALWAYS TAKEN 44006: 7001 moveq #1,%d0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 44008: 7201 moveq #1,%d1 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; /* 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)) { 4400a: 7601 moveq #1,%d3 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 4400c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4400e: 202a 007c movel %a2@(124),%d0 <== NOT EXECUTED 44012: d082 addl %d2,%d0 <== NOT EXECUTED 44014: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44016: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4401a: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED /* 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*/ 4401e: 2541 0094 movel %d1,%a2@(148) <== NOT EXECUTED (*tty->device.write)(tty->minor, 44022: 4e90 jsr %a0@ <== NOT EXECUTED 44024: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 44028: 2542 0084 movel %d2,%a2@(132) } return nToSend; } 4402c: 2003 movel %d3,%d0 4402e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 44034: 4e5e unlk %fp 44036: 4e75 rts else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 44038: 7602 moveq #2,%d3 <== NOT EXECUTED 4403a: b6aa 0094 cmpl %a2@(148),%d3 <== NOT EXECUTED 4403e: 6700 012e beqw 4416e <== NOT EXECUTED 44042: 4203 clrb %d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 44044: 2003 movel %d3,%d0 <== NOT EXECUTED 44046: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4404c: 4e5e unlk %fp <== NOT EXECUTED 4404e: 4e75 rts <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 44050: 206a 00d4 moveal %a2@(212),%a0 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 44054: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 44058: 4a88 tstl %a0 4405a: 6700 012c beqw 44188 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 4405e: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 44062: 4283 clrl %d3 <== NOT EXECUTED 44064: 486a 0030 pea %a2@(48) <== NOT EXECUTED 44068: 4e90 jsr %a0@ <== NOT EXECUTED 4406a: 508f addql #8,%sp <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4406c: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED 44070: 60ba bras 4402c <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 44072: 262a 0080 movel %a2@(128),%d3 44076: 9682 subl %d2,%d3 /* 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)) { 44078: 202a 00b8 movel %a2@(184),%d0 4407c: 0280 0000 0600 andil #1536,%d0 44082: 6682 bnes 44006 <== NEVER TAKEN 44084: 2003 movel %d3,%d0 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 44086: 7201 moveq #1,%d1 (*tty->device.write)(tty->minor, 44088: 2f00 movel %d0,%sp@- 4408a: 202a 007c movel %a2@(124),%d0 4408e: d082 addl %d2,%d0 44090: 2f00 movel %d0,%sp@- 44092: 2f2a 0010 movel %a2@(16),%sp@- 44096: 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*/ 4409a: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)(tty->minor, 4409e: 4e90 jsr %a0@ 440a0: 4fef 000c lea %sp@(12),%sp 440a4: 6082 bras 44028 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 440a6: 2f2a 008c movel %a2@(140),%sp@- 440aa: 4eb9 0004 6840 jsr 46840 } if (newTail == tty->rawOutBuf.Head) { 440b0: 202a 0080 movel %a2@(128),%d0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 440b4: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 440b6: b480 cmpl %d0,%d2 440b8: 6600 ff1e bnew 43fd8 440bc: 6092 bras 44050 /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 440be: 4878 0001 pea 1 <== NOT EXECUTED 440c2: 486a 004a pea %a2@(74) <== NOT EXECUTED 440c6: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 440ca: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 440ce: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 440d0: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 440d6: 40c1 movew %sr,%d1 <== NOT EXECUTED 440d8: 8081 orl %d1,%d0 <== NOT EXECUTED 440da: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 440dc: 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--; 440de: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 440e2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 440e6: 8082 orl %d2,%d0 <== NOT EXECUTED 440e8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 440ec: 46c1 movew %d1,%sr <== NOT EXECUTED 440ee: 7601 moveq #1,%d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 440f0: 2003 movel %d3,%d0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 440f2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 440f6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 440fc: 4e5e unlk %fp <== NOT EXECUTED 440fe: 4e75 rts <== NOT EXECUTED * 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, 44100: 4878 0001 pea 1 <== NOT EXECUTED 44104: 486a 0049 pea %a2@(73) <== NOT EXECUTED 44108: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4410c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44110: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 44112: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44118: 40c1 movew %sr,%d1 <== NOT EXECUTED 4411a: 8081 orl %d1,%d0 <== NOT EXECUTED 4411c: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 4411e: 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--; 44120: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 44124: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44128: c082 andl %d2,%d0 <== NOT EXECUTED 4412a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 4412e: 46c1 movew %d1,%sr <== NOT EXECUTED 44130: 163c 0001 moveb #1,%d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 44134: 2003 movel %d3,%d0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 44136: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4413a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44140: 4e5e unlk %fp <== NOT EXECUTED 44142: 4e75 rts <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ 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); 44144: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 44148: 40c1 movew %sr,%d1 <== NOT EXECUTED 4414a: 8081 orl %d1,%d0 <== NOT EXECUTED 4414c: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4414e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44152: 7620 moveq #32,%d3 <== NOT EXECUTED 44154: 8083 orl %d3,%d0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 44156: 163c 0001 moveb #1,%d3 <== 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; 4415a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4415e: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 44162: 46c1 movew %d1,%sr <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 44164: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED /* 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; tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 44168: 4203 clrb %d3 <== NOT EXECUTED 4416a: 6000 fec0 braw 4402c <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4416e: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 44172: 4283 clrl %d3 <== NOT EXECUTED 44174: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED 4417a: 588f addql #4,%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4417c: 2003 movel %d3,%d0 <== NOT EXECUTED 4417e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44184: 4e5e unlk %fp <== NOT EXECUTED 44186: 4e75 rts <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 44188: 2542 0084 movel %d2,%a2@(132) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4418c: 4283 clrl %d3 4418e: 6000 fe9c braw 4402c =============================================================================== 00045b84 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 45b84: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 45b88: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 45b8c: 240e movel %fp,%d2 <== NOT EXECUTED 45b8e: 260e movel %fp,%d3 <== NOT EXECUTED 45b90: 5d82 subql #6,%d2 <== NOT EXECUTED 45b92: 47f9 0004 6044 lea 46044 ,%a3 <== NOT EXECUTED 45b98: 4bf9 0004 6a44 lea 46a44 ,%a5 <== NOT EXECUTED 45b9e: 5383 subql #1,%d3 <== NOT EXECUTED 45ba0: 49f9 0004 41f0 lea 441f0 ,%a4<== NOT EXECUTED 45ba6: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 45baa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45bac: 42a7 clrl %sp@- <== NOT EXECUTED 45bae: 4878 0002 pea 2 <== NOT EXECUTED 45bb2: 4878 0003 pea 3 <== NOT EXECUTED 45bb6: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 45bb8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45bbc: 7001 moveq #1,%d0 <== NOT EXECUTED 45bbe: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 45bc2: 663e bnes 45c02 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 45bc4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45bc8: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 45bcc: 4e90 jsr %a0@ <== NOT EXECUTED if (c != EOF) { 45bce: 588f addql #4,%sp <== NOT EXECUTED 45bd0: 72ff moveq #-1,%d1 <== NOT EXECUTED 45bd2: b280 cmpl %d0,%d1 <== NOT EXECUTED 45bd4: 67d4 beqs 45baa <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 45bd6: 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; 45bda: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 45bde: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45be0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45be2: 4e94 jsr %a4@ <== NOT EXECUTED 45be4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 45be8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45bea: 42a7 clrl %sp@- <== NOT EXECUTED 45bec: 4878 0002 pea 2 <== NOT EXECUTED 45bf0: 4878 0003 pea 3 <== NOT EXECUTED 45bf4: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 45bf6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45bfa: 7001 moveq #1,%d0 <== NOT EXECUTED 45bfc: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 45c00: 67c2 beqs 45bc4 <== NOT EXECUTED tty->rxTaskId = 0; 45c02: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 45c06: 42a7 clrl %sp@- <== NOT EXECUTED 45c08: 4e95 jsr %a5@ <== NOT EXECUTED 45c0a: 588f addql #4,%sp <== NOT EXECUTED 45c0c: 609c bras 45baa <== NOT EXECUTED ... =============================================================================== 00043f44 : * 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) { 43f44: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43f48: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 43f4c: 4878 0002 pea 2 <== NOT EXECUTED 43f50: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 43f54: 4eb9 0004 61ec jsr 461ec <== NOT EXECUTED 43f5a: 508f addql #8,%sp <== NOT EXECUTED } 43f5c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045b02 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 45b02: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 45b06: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 45b0a: 240e movel %fp,%d2 <== NOT EXECUTED 45b0c: 5982 subql #4,%d2 <== NOT EXECUTED 45b0e: 47f9 0004 6044 lea 46044 ,%a3 <== NOT EXECUTED 45b14: 4bf9 0004 6a44 lea 46a44 ,%a5 <== NOT EXECUTED 45b1a: 49f9 0004 3f60 lea 43f60 ,%a4<== NOT EXECUTED 45b20: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 45b24: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45b26: 42a7 clrl %sp@- <== NOT EXECUTED 45b28: 4878 0002 pea 2 <== NOT EXECUTED 45b2c: 4878 0003 pea 3 <== NOT EXECUTED 45b30: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 45b32: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45b36: 7001 moveq #1,%d0 <== NOT EXECUTED 45b38: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 45b3c: 663a bnes 45b78 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 45b3e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 45b42: eb88 lsll #5,%d0 <== NOT EXECUTED 45b44: 0680 0005 f4b4 addil #390324,%d0 <== NOT EXECUTED 45b4a: 2240 moveal %d0,%a1 <== NOT EXECUTED 45b4c: 2051 moveal %a1@,%a0 <== NOT EXECUTED 45b4e: 4a88 tstl %a0 <== NOT EXECUTED 45b50: 6706 beqs 45b58 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 45b52: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45b54: 4e90 jsr %a0@ <== NOT EXECUTED 45b56: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 45b58: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45b5a: 4e94 jsr %a4@ <== NOT EXECUTED 45b5c: 588f addql #4,%sp <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 45b5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45b60: 42a7 clrl %sp@- <== NOT EXECUTED 45b62: 4878 0002 pea 2 <== NOT EXECUTED 45b66: 4878 0003 pea 3 <== NOT EXECUTED 45b6a: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 45b6c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45b70: 7001 moveq #1,%d0 <== NOT EXECUTED 45b72: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 45b76: 67c6 beqs 45b3e <== NOT EXECUTED tty->txTaskId = 0; 45b78: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 45b7c: 42a7 clrl %sp@- <== NOT EXECUTED 45b7e: 4e95 jsr %a5@ <== NOT EXECUTED 45b80: 588f addql #4,%sp <== NOT EXECUTED 45b82: 60a0 bras 45b24 <== NOT EXECUTED =============================================================================== 00044cb4 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 44cb4: 4e56 ffe4 linkw %fp,#-28 44cb8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 44cbc: 266e 0008 moveal %fp@(8),%a3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44cc0: 2053 moveal %a3@,%a0 44cc2: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44cc6: 42a7 clrl %sp@- 44cc8: 42a7 clrl %sp@- 44cca: 2f2a 0018 movel %a2@(24),%sp@- 44cce: 4eb9 0004 6704 jsr 46704 if (sc != RTEMS_SUCCESSFUL) 44cd4: 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); 44cd8: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 44cda: 662a bnes 44d06 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 44cdc: 202a 00cc movel %a2@(204),%d0 44ce0: eb88 lsll #5,%d0 44ce2: 0680 0005 f4ac addil #390316,%d0 44ce8: 2240 moveal %d0,%a1 44cea: 2051 moveal %a1@,%a0 44cec: 4a88 tstl %a0 44cee: 6722 beqs 44d12 <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 44cf0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44cf2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44cf4: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44cf6: 2f2a 0018 movel %a2@(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); 44cfa: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44cfc: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return sc; 44d02: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 44d06: 2002 movel %d2,%d0 <== NOT EXECUTED 44d08: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED 44d0e: 4e5e unlk %fp <== NOT EXECUTED 44d10: 4e75 rts <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 44d12: 7001 moveq #1,%d0 44d14: c0aa 0034 andl %a2@(52),%d0 44d18: 6744 beqs 44d5e <== NEVER TAKEN uint32_t count = args->count; 44d1a: 282b 0010 movel %a3@(16),%d4 char *buffer = args->buffer; 44d1e: 286b 000c moveal %a3@(12),%a4 while (count--) 44d22: 6762 beqs 44d86 <== NEVER TAKEN 44d24: 4283 clrl %d3 44d26: 4bfa f8a8 lea %pc@(445d0 ),%a5 oproc (*buffer++, tty); 44d2a: 2f0a movel %a2,%sp@- 44d2c: 4280 clrl %d0 44d2e: 1034 3800 moveb %a4@(00000000,%d3:l),%d0 44d32: 5283 addql #1,%d3 44d34: 2f00 movel %d0,%sp@- 44d36: 4e95 jsr %a5@ return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 44d38: 508f addql #8,%sp 44d3a: b883 cmpl %d3,%d4 44d3c: 66ec bnes 44d2a 44d3e: 202b 0010 movel %a3@(16),%d0 oproc (*buffer++, tty); args->bytes_moved = args->count; 44d42: 2740 0018 movel %d0,%a3@(24) } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); 44d46: 2f2a 0018 movel %a2@(24),%sp@- 44d4a: 4eb9 0004 6840 jsr 46840 return sc; 44d50: 588f addql #4,%sp } 44d52: 2002 movel %d2,%d0 44d54: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 44d5a: 4e5e unlk %fp 44d5c: 4e75 rts while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 44d5e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44d60: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 44d64: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 44d68: 4eb9 0004 44a8 jsr 444a8 <== NOT EXECUTED args->bytes_moved = args->count; 44d6e: 276b 0010 0018 movel %a3@(16),%a3@(24) <== NOT EXECUTED 44d74: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 44d78: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44d7c: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED return sc; 44d82: 588f addql #4,%sp <== NOT EXECUTED 44d84: 60cc bras 44d52 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 44d86: 4280 clrl %d0 <== NOT EXECUTED oproc (*buffer++, tty); args->bytes_moved = args->count; 44d88: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED 44d8c: 60b8 bras 44d46 <== NOT EXECUTED =============================================================================== 00059548 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 59548: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 5954c: 486e fffc pea %fp@(-4) 59550: 2f2e 0008 movel %fp@(8),%sp@- 59554: 4879 0007 f786 pea 7f786 <_Timer_Information> 5955a: 4eb9 0005 c274 jsr 5c274 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59560: 4fef 000c lea %sp@(12),%sp 59564: 4aae fffc tstl %fp@(-4) 59568: 6706 beqs 59570 5956a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5956c: 4e5e unlk %fp 5956e: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 59570: 7204 moveq #4,%d1 59572: 2040 moveal %d0,%a0 59574: b2a8 0038 cmpl %a0@(56),%d1 59578: 670c beqs 59586 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 5957a: 4868 0010 pea %a0@(16) 5957e: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> 59584: 588f addql #4,%sp _Thread_Enable_dispatch(); 59586: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 5958c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5958e: 4e5e unlk %fp ... =============================================================================== 00059784 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 59784: 4e56 ffec linkw %fp,#-20 59788: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5978c: 242e 000c movel %fp@(12),%d2 59790: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 59794: 4a39 0007 f54c tstb 7f54c <_TOD_Is_set> 5979a: 660c bnes 597a8 5979c: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5979e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 597a4: 4e5e unlk %fp 597a6: 4e75 rts rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 597a8: 2f02 movel %d2,%sp@- 597aa: 4eb9 0005 676c jsr 5676c <_TOD_Validate> 597b0: 588f addql #4,%sp 597b2: 4a00 tstb %d0 597b4: 671a beqs 597d0 return RTEMS_INVALID_CLOCK; if ( !routine ) 597b6: 4a83 tstl %d3 597b8: 6700 00a8 beqw 59862 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 597bc: 2f02 movel %d2,%sp@- 597be: 4eb9 0005 665c jsr 5665c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 597c4: 588f addql #4,%sp return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 597c6: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 597c8: b0b9 0007 f5ca cmpl 7f5ca <_TOD_Now>,%d0 597ce: 620c bhis 597dc _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 597d0: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 597d2: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 597d8: 4e5e unlk %fp 597da: 4e75 rts 597dc: 486e fffc pea %fp@(-4) 597e0: 2f2e 0008 movel %fp@(8),%sp@- 597e4: 4879 0007 f786 pea 7f786 <_Timer_Information> 597ea: 4eb9 0005 c274 jsr 5c274 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 597f0: 4fef 000c lea %sp@(12),%sp 597f4: 2440 moveal %d0,%a2 597f6: 4aae fffc tstl %fp@(-4) 597fa: 665a bnes 59856 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 597fc: 2800 movel %d0,%d4 597fe: 0684 0000 0010 addil #16,%d4 59804: 2f04 movel %d4,%sp@- 59806: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 5980c: 202e 0008 movel %fp@(8),%d0 59810: 2540 0030 movel %d0,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 59814: 94b9 0007 f5ca subl 7f5ca <_TOD_Now>,%d2 the_timer->the_class = TIMER_TIME_OF_DAY; 5981a: 7002 moveq #2,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 5981c: 256e 0014 0034 movel %fp@(20),%a2@(52) 59822: 2540 0038 movel %d0,%a2@(56) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 59826: 2542 001c movel %d2,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 5982a: 2543 002c movel %d3,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5982e: 42aa 0018 clrl %a2@(24) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 59832: 2f04 movel %d4,%sp@- 59834: 4879 0007 f604 pea 7f604 <_Watchdog_Seconds_chain> 5983a: 4eb9 0005 dff8 jsr 5dff8 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 59840: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 59846: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 5984a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5984c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 59852: 4e5e unlk %fp 59854: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59856: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59858: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5985e: 4e5e unlk %fp 59860: 4e75 rts return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 59862: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59864: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5986a: 4e5e unlk %fp ... =============================================================================== 00059b94 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 59b94: 4e56 fffc linkw %fp,#-4 59b98: 202e 0008 movel %fp@(8),%d0 59b9c: 2f03 movel %d3,%sp@- 59b9e: 2f02 movel %d2,%sp@- 59ba0: 4a80 tstl %d0 59ba2: 6748 beqs 59bec 59ba4: 4281 clrl %d1 59ba6: 1239 0007 9a32 moveb 79a32 ,%d1 59bac: b280 cmpl %d0,%d1 59bae: 644a bccs 59bfa * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 59bb0: 72ff moveq #-1,%d1 59bb2: b280 cmpl %d0,%d1 59bb4: 6636 bnes 59bec 59bb6: 2239 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d1 59bbc: 5281 addql #1,%d1 59bbe: 4283 clrl %d3 59bc0: 23c1 0007 f538 movel %d1,7f538 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 59bc6: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 59bc8: 1439 0007 a990 moveb 7a990 ,%d2 initialized = true; 59bce: 13c0 0007 a990 moveb %d0,7a990 _Thread_Enable_dispatch(); 59bd4: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> if ( tmpInitialized ) 59bda: 4a02 tstb %d2 59bdc: 6744 beqs 59c22 initialized = false; } #endif return status; } 59bde: 242e fff4 movel %fp@(-12),%d2 _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) 59be2: 700e moveq #14,%d0 initialized = false; } #endif return status; } 59be4: 262e fff8 movel %fp@(-8),%d3 59be8: 4e5e unlk %fp 59bea: 4e75 rts 59bec: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 59bf0: 7013 moveq #19,%d0 } 59bf2: 262e fff8 movel %fp@(-8),%d3 59bf6: 4e5e unlk %fp 59bf8: 4e75 rts 59bfa: 2239 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d1 59c00: 5281 addql #1,%d1 59c02: 2600 movel %d0,%d3 59c04: 23c1 0007 f538 movel %d1,7f538 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 59c0a: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 59c0c: 1439 0007 a990 moveb 7a990 ,%d2 initialized = true; 59c12: 13c0 0007 a990 moveb %d0,7a990 _Thread_Enable_dispatch(); 59c18: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> if ( tmpInitialized ) 59c1e: 4a02 tstb %d2 59c20: 66bc bnes 59bde <== NEVER TAKEN * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 59c22: 486e fffc pea %fp@(-4) 59c26: 222e 0010 movel %fp@(16),%d1 59c2a: 08c1 000f bset #15,%d1 59c2e: 2f01 movel %d1,%sp@- 59c30: 4878 0100 pea 100 59c34: 2f2e 000c movel %fp@(12),%sp@- 59c38: 2f03 movel %d3,%sp@- 59c3a: 2f3c 5449 4d45 movel #1414090053,%sp@- 59c40: 4eb9 0005 8c28 jsr 58c28 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 59c46: 4fef 0018 lea %sp@(24),%sp 59c4a: 4a80 tstl %d0 59c4c: 6714 beqs 59c62 initialized = false; } #endif return status; } 59c4e: 242e fff4 movel %fp@(-12),%d2 /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 59c52: 4201 clrb %d1 initialized = false; } #endif return status; } 59c54: 262e fff8 movel %fp@(-8),%d3 59c58: 4e5e unlk %fp /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 59c5a: 13c1 0007 a990 moveb %d1,7a990 initialized = false; } #endif return status; } 59c60: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 59c62: 41f9 0007 a9c6 lea 7a9c6 <_Timer_server_Default+0x34>,%a0 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 59c68: 4282 clrl %d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 59c6a: 223c 0007 a9c2 movel #502210,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 59c70: 23c8 0007 a9c2 movel %a0,7a9c2 <_Timer_server_Default+0x30> &_RTEMS_tasks_Information, _Objects_Get_index(id) 59c76: 202e fffc movel %fp@(-4),%d0 59c7a: 41f9 0007 a9fe lea 7a9fe <_Timer_server_Default+0x6c>,%a0 59c80: 23c8 0007 a9fa movel %a0,7a9fa <_Timer_server_Default+0x68> /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 59c86: 2079 0007 f4c4 moveal 7f4c4 <_RTEMS_tasks_Information+0x18>,%a0 59c8c: 3400 movew %d0,%d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 59c8e: 23c1 0007 a9ca movel %d1,7a9ca <_Timer_server_Default+0x38> * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 59c94: 2239 0007 f678 movel 7f678 <_Watchdog_Ticks_since_boot>,%d1 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 59c9a: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 59c9e: 23d0 0007 a992 movel %a0@,7a992 <_Timer_server_Default> 59ca4: 41f9 0007 a9fa lea 7a9fa <_Timer_server_Default+0x68>,%a0 59caa: 23c8 0007 aa02 movel %a0,7aa02 <_Timer_server_Default+0x70> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 59cb0: 4879 0007 a992 pea 7a992 <_Timer_server_Default> the_watchdog->routine = routine; 59cb6: 41f9 0005 ca48 lea 5ca48 <_Thread_Delay_ended>,%a0 59cbc: 23c8 0007 a9b6 movel %a0,7a9b6 <_Timer_server_Default+0x24> 59cc2: 487a 0160 pea %pc@(59e24 <_Timer_server_Body>) 59cc6: 23c8 0007 a9ee movel %a0,7a9ee <_Timer_server_Default+0x5c> * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59ccc: 41f9 0007 f5ca lea 7f5ca <_TOD_Now>,%a0 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 59cd2: 23c1 0007 a9ce movel %d1,7a9ce <_Timer_server_Default+0x3c> ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59cd8: 23d0 0007 aa06 movel %a0@,7aa06 <_Timer_server_Default+0x74> /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 59cde: 223c 0005 a060 movel #368736,%d1 ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 59ce4: 41f9 0007 a992 lea 7a992 <_Timer_server_Default>,%a0 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 59cea: 23c1 0007 a996 movel %d1,7a996 <_Timer_server_Default+0x4> ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; ts->active = false; 59cf0: 4201 clrb %d1 ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; 59cf2: 42b9 0007 aa0a clrl 7aa0a <_Timer_server_Default+0x78> ts->active = false; 59cf8: 13c1 0007 aa0e moveb %d1,7aa0e <_Timer_server_Default+0x7c> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 59cfe: 2f00 movel %d0,%sp@- ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 59d00: 23c8 0007 f7be movel %a0,7f7be <_Timer_server> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 59d06: 42b9 0007 a9c6 clrl 7a9c6 <_Timer_server_Default+0x34> 59d0c: 42b9 0007 a9fe clrl 7a9fe <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59d12: 42b9 0007 a9a2 clrl 7a9a2 <_Timer_server_Default+0x10> the_watchdog->routine = routine; the_watchdog->id = id; 59d18: 23c0 0007 a9ba movel %d0,7a9ba <_Timer_server_Default+0x28> the_watchdog->user_data = user_data; 59d1e: 42b9 0007 a9be clrl 7a9be <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59d24: 42b9 0007 a9da clrl 7a9da <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 59d2a: 23c0 0007 a9f2 movel %d0,7a9f2 <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 59d30: 42b9 0007 a9f6 clrl 7a9f6 <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 59d36: 4eb9 0005 9330 jsr 59330 initialized = false; } #endif return status; } 59d3c: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 59d40: 4fef 000c lea %sp@(12),%sp } 59d44: 262e fff8 movel %fp@(-8),%d3 59d48: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059908 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 59908: 4e56 fff0 linkw %fp,#-16 5990c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 59910: 486e fffc pea %fp@(-4) 59914: 2f2e 0008 movel %fp@(8),%sp@- 59918: 4879 0007 f786 pea 7f786 <_Timer_Information> 5991e: 4eb9 0005 c274 jsr 5c274 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59924: 4fef 000c lea %sp@(12),%sp 59928: 2440 moveal %d0,%a2 5992a: 4aae fffc tstl %fp@(-4) 5992e: 670e beqs 5993e 59930: 7404 moveq #4,%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59932: 2002 movel %d2,%d0 59934: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5993a: 4e5e unlk %fp 5993c: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 5993e: 202a 0038 movel %a2@(56),%d0 59942: 671a beqs 5995e _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 59944: 7201 moveq #1,%d1 59946: b280 cmpl %d0,%d1 59948: 673c beqs 59986 5994a: 740b moveq #11,%d2 * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 5994c: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59952: 2002 movel %d2,%d0 59954: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5995a: 4e5e unlk %fp 5995c: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 5995e: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 59962: 4282 clrl %d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 59964: 2f0a movel %a2,%sp@- 59966: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 5996c: 2f0a movel %a2,%sp@- 5996e: 4879 0007 f610 pea 7f610 <_Watchdog_Ticks_chain> 59974: 4eb9 0005 dff8 jsr 5dff8 <_Watchdog_Insert> 5997a: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 5997e: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 59984: 60cc bras 59952 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 59986: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 5998a: 4282 clrl %d2 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 5998c: 2679 0007 f7be moveal 7f7be <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 59992: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 59998: 2f0a movel %a2,%sp@- 5999a: 2f0b movel %a3,%sp@- 5999c: 206b 0004 moveal %a3@(4),%a0 599a0: 4e90 jsr %a0@ 599a2: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 599a6: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 599ac: 60a4 bras 59952 ... =============================================================================== 00059a98 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 59a98: 4e56 ffec linkw %fp,#-20 59a9c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 59aa0: 242e 000c movel %fp@(12),%d2 59aa4: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 59aa8: 2479 0007 f7be moveal 7f7be <_Timer_server>,%a2 if ( !timer_server ) 59aae: 4a8a tstl %a2 59ab0: 6700 00c8 beqw 59b7a return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 59ab4: 4a39 0007 f54c tstb 7f54c <_TOD_Is_set> 59aba: 6700 00a6 beqw 59b62 return RTEMS_NOT_DEFINED; if ( !routine ) 59abe: 4a83 tstl %d3 59ac0: 6700 00ac beqw 59b6e return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 59ac4: 2f02 movel %d2,%sp@- 59ac6: 4eb9 0005 676c jsr 5676c <_TOD_Validate> 59acc: 588f addql #4,%sp 59ace: 4a00 tstb %d0 59ad0: 660c bnes 59ade the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 59ad2: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59ad4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59ada: 4e5e unlk %fp 59adc: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59ade: 2f02 movel %d2,%sp@- 59ae0: 4eb9 0005 665c jsr 5665c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 59ae6: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59ae8: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 59aea: b0b9 0007 f5ca cmpl 7f5ca <_TOD_Now>,%d0 59af0: 63e0 blss 59ad2 59af2: 486e fffc pea %fp@(-4) 59af6: 2f2e 0008 movel %fp@(8),%sp@- 59afa: 4879 0007 f786 pea 7f786 <_Timer_Information> 59b00: 4eb9 0005 c274 jsr 5c274 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59b06: 4fef 000c lea %sp@(12),%sp 59b0a: 2640 moveal %d0,%a3 59b0c: 4aae fffc tstl %fp@(-4) 59b10: 6674 bnes 59b86 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 59b12: 486b 0010 pea %a3@(16) 59b16: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 59b1c: 202e 0008 movel %fp@(8),%d0 59b20: 2740 0030 movel %d0,%a3@(48) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 59b24: 94b9 0007 f5ca subl 7f5ca <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 59b2a: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 59b2c: 276e 0014 0034 movel %fp@(20),%a3@(52) 59b32: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 59b36: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 59b3a: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59b3e: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 59b42: 2f0b movel %a3,%sp@- 59b44: 2f0a movel %a2,%sp@- 59b46: 206a 0004 moveal %a2@(4),%a0 59b4a: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59b4c: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 59b52: 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(); 59b56: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59b58: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b5e: 4e5e unlk %fp 59b60: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 59b62: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59b64: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59b6a: 4e5e unlk %fp <== NOT EXECUTED 59b6c: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 59b6e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59b70: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b76: 4e5e unlk %fp 59b78: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 59b7a: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59b7c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b82: 4e5e unlk %fp 59b84: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59b86: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59b88: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b8e: 4e5e unlk %fp ... =============================================================================== 0004297c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 4297c: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42980: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ <== NOT EXECUTED 42984: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 42988: 2802 movel %d2,%d4 <== NOT EXECUTED 4298a: 0284 2000 0000 andil #536870912,%d4 <== NOT EXECUTED 42990: 6730 beqs 429c2 <== NOT EXECUTED { if (rtems_panic_in_progress++) 42992: 2239 0005 fc9c movel 5fc9c ,%d1 <== NOT EXECUTED 42998: 2001 movel %d1,%d0 <== NOT EXECUTED 4299a: 5280 addql #1,%d0 <== NOT EXECUTED 4299c: 23c0 0005 fc9c movel %d0,5fc9c <== NOT EXECUTED 429a2: 4a81 tstl %d1 <== NOT EXECUTED 429a4: 6714 beqs 429ba <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 429a6: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 429ac: 5280 addql #1,%d0 <== NOT EXECUTED 429ae: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level><== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 429b4: 2039 0005 fc9c movel 5fc9c ,%d0 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 429ba: 7202 moveq #2,%d1 <== NOT EXECUTED 429bc: b280 cmpl %d0,%d1 <== NOT EXECUTED 429be: 6d00 00de bltw 42a9e <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 429c2: 2079 0005 e7a4 moveal 5e7a4 <_impure_ptr>,%a0 <== NOT EXECUTED 429c8: 45f9 0004 f514 lea 4f514 ,%a2 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 429ce: 2c02 movel %d2,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 429d0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 429d4: 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 */ 429da: 4e92 jsr %a2@ <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 429dc: 588f addql #4,%sp <== NOT EXECUTED 429de: 0802 001e btst #30,%d2 <== NOT EXECUTED 429e2: 6600 0106 bnew 42aea <== 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); 429e6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 429ea: 4283 clrl %d3 <== NOT EXECUTED 429ec: 47f9 0004 f8a0 lea 4f8a0 ,%a3 <== 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); 429f2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 429f6: 2079 0005 e7a4 moveal 5e7a4 <_impure_ptr>,%a0 <== NOT EXECUTED 429fc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42a00: 4eb9 0005 5a5c jsr 55a5c <== NOT EXECUTED if (status) 42a06: 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); 42a0a: 2a00 movel %d0,%d5 <== NOT EXECUTED if (status) 42a0c: 4a86 tstl %d6 <== NOT EXECUTED 42a0e: 6600 009a bnew 42aaa <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 42a12: 4a83 tstl %d3 <== NOT EXECUTED 42a14: 6732 beqs 42a48 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 42a16: 4a83 tstl %d3 <== NOT EXECUTED 42a18: 6f14 bles 42a2e <== NOT EXECUTED 42a1a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42a1c: 49f9 0005 01b4 lea 501b4 ,%a4 <== NOT EXECUTED 42a22: 4e94 jsr %a4@ <== NOT EXECUTED 42a24: 588f addql #4,%sp <== NOT EXECUTED 42a26: 2040 moveal %d0,%a0 <== NOT EXECUTED 42a28: 4a10 tstb %a0@ <== NOT EXECUTED 42a2a: 6600 00f4 bnew 42b20 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 42a2e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42a30: 4879 0005 d092 pea 5d092 <== NOT EXECUTED 42a36: 2079 0005 e7a4 moveal 5e7a4 <_impure_ptr>,%a0 <== NOT EXECUTED 42a3c: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42a40: 4e93 jsr %a3@ <== NOT EXECUTED 42a42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42a46: da80 addl %d0,%d5 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 42a48: 4879 0005 d522 pea 5d522 <== NOT EXECUTED 42a4e: 2079 0005 e7a4 moveal 5e7a4 <_impure_ptr>,%a0 <== NOT EXECUTED 42a54: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42a58: 0282 3000 0000 andil #805306368,%d2 <== 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"); 42a5e: 4e93 jsr %a3@ <== NOT EXECUTED (void) fflush(stderr); 42a60: 2079 0005 e7a4 moveal 5e7a4 <_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"); 42a66: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 42a68: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42a6c: 4e92 jsr %a2@ <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42a6e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42a72: 4a82 tstl %d2 <== NOT EXECUTED 42a74: 671a beqs 42a90 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 42a76: 4a84 tstl %d4 <== NOT EXECUTED 42a78: 675c beqs 42ad6 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 42a7a: 4879 0005 d0a6 pea 5d0a6 <== NOT EXECUTED 42a80: 42a7 clrl %sp@- <== NOT EXECUTED 42a82: 4eb9 0004 2b90 jsr 42b90 <== NOT EXECUTED _exit(local_errno); 42a88: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42a8a: 4eb9 0004 3746 jsr 43746 <_exit> <== 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"); 42a90: 2006 movel %d6,%d0 <== NOT EXECUTED 42a92: d085 addl %d5,%d0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 42a94: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 42a9a: 4e5e unlk %fp <== NOT EXECUTED 42a9c: 4e75 rts <== NOT EXECUTED _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); abort(); 42a9e: 4280 clrl %d0 <== NOT EXECUTED } } return chars_written; } 42aa0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 42aa6: 4e5e unlk %fp <== NOT EXECUTED 42aa8: 4e75 rts <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 42aaa: 2f06 movel %d6,%sp@- <== NOT EXECUTED 42aac: 4eb9 0004 2964 jsr 42964 <== NOT EXECUTED 42ab2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42ab4: 4879 0005 d077 pea 5d077 <== NOT EXECUTED 42aba: 2079 0005 e7a4 moveal 5e7a4 <_impure_ptr>,%a0 <== NOT EXECUTED 42ac0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42ac4: 4e93 jsr %a3@ <== NOT EXECUTED 42ac6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42aca: da80 addl %d0,%d5 <== NOT EXECUTED if (local_errno) 42acc: 4a83 tstl %d3 <== NOT EXECUTED 42ace: 6700 ff78 beqw 42a48 <== NOT EXECUTED 42ad2: 6000 ff42 braw 42a16 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 42ad6: 4879 0005 d0bb pea 5d0bb <== NOT EXECUTED 42adc: 42a7 clrl %sp@- <== NOT EXECUTED 42ade: 4eb9 0004 2b90 jsr 42b90 <== NOT EXECUTED abort(); 42ae4: 4eb9 0004 f188 jsr 4f188 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 42aea: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 42af0: 47f9 0004 f8a0 lea 4f8a0 ,%a3 <== NOT EXECUTED 42af6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42af8: 2610 movel %a0@,%d3 <== 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); 42afa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 42afe: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42b02: 2079 0005 e7a4 moveal 5e7a4 <_impure_ptr>,%a0 <== NOT EXECUTED 42b08: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42b0c: 4eb9 0005 5a5c jsr 55a5c <== NOT EXECUTED if (status) 42b12: 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); 42b16: 2a00 movel %d0,%d5 <== NOT EXECUTED if (status) 42b18: 4a86 tstl %d6 <== NOT EXECUTED 42b1a: 6700 fef6 beqw 42a12 <== NOT EXECUTED 42b1e: 608a bras 42aaa <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 42b20: 2f03 movel %d3,%sp@- <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42b22: 0282 3000 0000 andil #805306368,%d2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 42b28: 4e94 jsr %a4@ <== NOT EXECUTED 42b2a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42b2c: 4879 0005 d085 pea 5d085 <== NOT EXECUTED 42b32: 2079 0005 e7a4 moveal 5e7a4 <_impure_ptr>,%a0 <== NOT EXECUTED 42b38: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42b3c: 4e93 jsr %a3@ <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 42b3e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 42b42: da80 addl %d0,%d5 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 42b44: 4879 0005 d522 pea 5d522 <== NOT EXECUTED 42b4a: 2079 0005 e7a4 moveal 5e7a4 <_impure_ptr>,%a0 <== NOT EXECUTED 42b50: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42b54: 4e93 jsr %a3@ <== NOT EXECUTED (void) fflush(stderr); 42b56: 2079 0005 e7a4 moveal 5e7a4 <_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"); 42b5c: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 42b5e: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42b62: 4e92 jsr %a2@ <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42b64: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42b68: 4a82 tstl %d2 <== NOT EXECUTED 42b6a: 6600 ff0a bnew 42a76 <== NOT EXECUTED 42b6e: 6000 ff20 braw 42a90 <== NOT EXECUTED =============================================================================== 00043024 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 43024: 4e56 ffe4 linkw %fp,#-28 43028: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4302c: 246e 0008 moveal %fp@(8),%a2 43030: 4284 clrl %d4 43032: 263c 7fff ffff movel #2147483647,%d3 43038: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4303a: 47f9 0005 1154 lea 51154 <__srget_r>,%a3 43040: 202a 0004 movel %a2@(4),%d0 43044: 5380 subql #1,%d0 43046: 2540 0004 movel %d0,%a2@(4) 4304a: 6d62 blts 430ae <== NEVER TAKEN 4304c: 2052 moveal %a2@,%a0 4304e: 4280 clrl %d0 43050: 1010 moveb %a0@,%d0 43052: 5288 addql #1,%a0 if (c == ':') 43054: 723a moveq #58,%d1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 43056: 2488 movel %a0,%a2@ if (c == ':') 43058: b280 cmpl %d0,%d1 4305a: 6764 beqs 430c0 break; if (sign == 0) { 4305c: 4a84 tstl %d4 4305e: 660a bnes 4306a <== NEVER TAKEN if (c == '-') { 43060: 7c2d moveq #45,%d6 43062: bc80 cmpl %d0,%d6 43064: 6700 0084 beqw 430ea sign = -1; limit++; continue; 43068: 7801 moveq #1,%d4 } sign = 1; } if (!isdigit(c)) 4306a: 2079 0005 fd20 moveal 5fd20 <__ctype_ptr__>,%a0 43070: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 43074: 49c1 extbl %d1 43076: 44c1 movew %d1,%ccr 43078: 6664 bnes 430de <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 4307a: 2203 movel %d3,%d1 4307c: 7c0a moveq #10,%d6 4307e: 4c46 1005 remul %d6,%d5,%d1 43082: 4c46 1001 remul %d6,%d1,%d1 43086: b282 cmpl %d2,%d1 43088: 6554 bcss 430de <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 4308a: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 43090: b282 cmpl %d2,%d1 43092: 6746 beqs 430da <== NEVER TAKEN || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 43094: 2202 movel %d2,%d1 43096: e789 lsll #3,%d1 43098: 2241 moveal %d1,%a1 4309a: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 4309e: 2400 movel %d0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 430a0: 202a 0004 movel %a2@(4),%d0 430a4: 5380 subql #1,%d0 return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 430a6: d488 addl %a0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 430a8: 2540 0004 movel %d0,%a2@(4) 430ac: 6c9e bges 4304c <== ALWAYS TAKEN 430ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 430b0: 2f39 0005 fd24 movel 5fd24 <_impure_ptr>,%sp@- <== NOT EXECUTED 430b6: 4e93 jsr %a3@ <== NOT EXECUTED 430b8: 508f addql #8,%sp <== NOT EXECUTED if (c == ':') 430ba: 723a moveq #58,%d1 <== NOT EXECUTED 430bc: b280 cmpl %d0,%d1 <== NOT EXECUTED 430be: 669c bnes 4305c <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 430c0: 4a84 tstl %d4 430c2: 671a beqs 430de <== NEVER TAKEN return 0; *val = i * sign; 430c4: 4c02 4800 mulsl %d2,%d4 430c8: 7001 moveq #1,%d0 430ca: 206e 000c moveal %fp@(12),%a0 430ce: 2084 movel %d4,%a0@ return 1; } 430d0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 430d6: 4e5e unlk %fp 430d8: 4e75 rts sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 430da: ba80 cmpl %d0,%d5 <== NOT EXECUTED 430dc: 64b6 bccs 43094 <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 430de: 4280 clrl %d0 <== NOT EXECUTED } 430e0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 430e6: 4e5e unlk %fp <== NOT EXECUTED 430e8: 4e75 rts <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 430ea: 5283 addql #1,%d3 <== NOT EXECUTED 430ec: 78ff moveq #-1,%d4 <== NOT EXECUTED continue; 430ee: 6000 ff50 braw 43040 <== NOT EXECUTED =============================================================================== 000430f2 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 430f2: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 430f6: 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) { 430fa: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 430fe: 246e 0008 moveal %fp@(8),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 43102: 4bf9 0005 1154 lea 51154 <__srget_r>,%a5 43108: 202a 0004 movel %a2@(4),%d0 4310c: 5380 subql #1,%d0 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 4310e: 266e 0010 moveal %fp@(16),%a3 43112: 242e 0018 movel %fp@(24),%d2 43116: 286e 0014 moveal %fp@(20),%a4 int c; *name = *bufp; 4311a: 2093 movel %a3@,%a0@ for (;;) { c = getc(fp); 4311c: 2540 0004 movel %d0,%a2@(4) 43120: 6d36 blts 43158 43122: 2052 moveal %a2@,%a0 43124: 4280 clrl %d0 43126: 1010 moveb %a0@,%d0 43128: 5288 addql #1,%a0 if (c == ':') { 4312a: 723a moveq #58,%d1 { int c; *name = *bufp; for (;;) { c = getc(fp); 4312c: 2488 movel %a0,%a2@ if (c == ':') { 4312e: b280 cmpl %d0,%d1 43130: 6738 beqs 4316a if (nlFlag) return 0; break; } if (c == '\n') { 43132: 720a moveq #10,%d1 43134: b280 cmpl %d0,%d1 43136: 674a beqs 43182 if (!nlFlag) return 0; break; } if (c == EOF) 43138: 72ff moveq #-1,%d1 4313a: b280 cmpl %d0,%d1 4313c: 6748 beqs 43186 <== NEVER TAKEN return 0; if (*nleft < 2) 4313e: 7201 moveq #1,%d1 43140: b294 cmpl %a4@,%d1 43142: 6442 bccs 43186 <== NEVER TAKEN return 0; **bufp = c; 43144: 2053 moveal %a3@,%a0 43146: 1080 moveb %d0,%a0@ { int c; *name = *bufp; for (;;) { c = getc(fp); 43148: 202a 0004 movel %a2@(4),%d0 4314c: 5380 subql #1,%d0 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4314e: 5293 addql #1,%a3@ --(*nleft); 43150: 5394 subql #1,%a4@ { int c; *name = *bufp; for (;;) { c = getc(fp); 43152: 2540 0004 movel %d0,%a2@(4) 43156: 6cca bges 43122 <== ALWAYS TAKEN 43158: 2f0a movel %a2,%sp@- 4315a: 2f39 0005 fd24 movel 5fd24 <_impure_ptr>,%sp@- 43160: 4e95 jsr %a5@ 43162: 508f addql #8,%sp if (c == ':') { 43164: 723a moveq #58,%d1 43166: b280 cmpl %d0,%d1 43168: 66c8 bnes 43132 <== ALWAYS TAKEN if (nlFlag) 4316a: 4a82 tstl %d2 4316c: 6618 bnes 43186 <== NEVER TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 4316e: 2053 moveal %a3@,%a0 ++(*bufp); --(*nleft); 43170: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 43172: 4210 clrb %a0@ ++(*bufp); 43174: 5293 addql #1,%a3@ --(*nleft); 43176: 5394 subql #1,%a4@ return 1; } 43178: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4317e: 4e5e unlk %fp 43180: 4e75 rts if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 43182: 4a82 tstl %d2 43184: 66e8 bnes 4316e <== ALWAYS TAKEN --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 43186: 4280 clrl %d0 <== NOT EXECUTED } 43188: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 4318e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043192 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 43192: 4e56 ffe4 linkw %fp,#-28 43196: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4319a: 42a7 clrl %sp@- 4319c: 280e movel %fp,%d4 4319e: 0684 0000 0014 addil #20,%d4 431a4: 260e movel %fp,%d3 431a6: 0683 0000 0010 addil #16,%d3 431ac: 47fa ff44 lea %pc@(430f2 ),%a3 431b0: 2f04 movel %d4,%sp@- 431b2: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 431b4: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 431b8: 2f0a movel %a2,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 431ba: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 431be: 2f02 movel %d2,%sp@- 431c0: 4e93 jsr %a3@ 431c2: 4fef 0014 lea %sp@(20),%sp 431c6: 4a80 tstl %d0 431c8: 660c bnes 431d6 <== ALWAYS TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 431ca: 4280 clrl %d0 <== NOT EXECUTED } 431cc: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 <== NOT EXECUTED 431d2: 4e5e unlk %fp <== NOT EXECUTED 431d4: 4e75 rts <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 431d6: 42a7 clrl %sp@- 431d8: 2f04 movel %d4,%sp@- 431da: 2f03 movel %d3,%sp@- 431dc: 486a 0004 pea %a2@(4) 431e0: 2f02 movel %d2,%sp@- 431e2: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 431e4: 4fef 0014 lea %sp@(20),%sp 431e8: 4a80 tstl %d0 431ea: 67de beqs 431ca <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 431ec: 486e fffc pea %fp@(-4) 431f0: 2f02 movel %d2,%sp@- 431f2: 4eba fe30 jsr %pc@(43024 ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 431f6: 508f addql #8,%sp 431f8: 4a80 tstl %d0 431fa: 67ce beqs 431ca <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 431fc: 4878 0001 pea 1 43200: 2f04 movel %d4,%sp@- 43202: 2f03 movel %d3,%sp@- 43204: 486e fff8 pea %fp@(-8) 43208: 2f02 movel %d2,%sp@- 4320a: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4320c: 4fef 0014 lea %sp@(20),%sp 43210: 4a80 tstl %d0 43212: 67b6 beqs 431ca <== NEVER TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43214: 226e fff8 moveal %fp@(-8),%a1 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; 43218: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4321e: 1011 moveb %a1@,%d0 43220: 677a beqs 4329c <== NEVER TAKEN 43222: 2049 moveal %a1,%a0 43224: 7201 moveq #1,%d1 43226: 5288 addql #1,%a0 if(*cp == ',') 43228: 49c0 extbl %d0 4322a: 742c moveq #44,%d2 4322c: b480 cmpl %d0,%d2 4322e: 6756 beqs 43286 <== NEVER TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43230: 1010 moveb %a0@,%d0 43232: 66f2 bnes 43226 43234: e589 lsll #2,%d1 43236: 0681 0000 0013 addil #19,%d1 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 4323c: b2ae 0014 cmpl %fp@(20),%d1 43240: 6288 bhis 431ca <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 43242: 202e 0010 movel %fp@(16),%d0 43246: 72f0 moveq #-16,%d1 43248: 0680 0000 000f addil #15,%d0 4324e: c081 andl %d1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 43250: 2040 moveal %d0,%a0 43252: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43254: 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); 43258: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4325c: 1010 moveb %a0@,%d0 4325e: 6740 beqs 432a0 <== NEVER TAKEN 43260: 5288 addql #1,%a0 43262: 7201 moveq #1,%d1 if(*cp == ',') { 43264: 49c0 extbl %d0 43266: 742c moveq #44,%d2 43268: b480 cmpl %d0,%d2 4326a: 671e beqs 4328a <== NEVER TAKEN /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4326c: 1018 moveb %a0@+,%d0 4326e: 66f4 bnes 43264 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 43270: 206a 000a moveal %a2@(10),%a0 43274: 7001 moveq #1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43276: e589 lsll #2,%d1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 43278: 42b0 1800 clrl %a0@(00000000,%d1:l) return 1; } 4327c: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 43282: 4e5e unlk %fp 43284: 4e75 rts /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') memcount++; 43286: 5281 addql #1,%d1 <== NOT EXECUTED 43288: 60a6 bras 43230 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 4328a: 4200 clrb %d0 <== NOT EXECUTED 4328c: 1140 ffff moveb %d0,%a0@(-1) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 43290: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 43294: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 43298: 5281 addql #1,%d1 <== NOT EXECUTED 4329a: 60d0 bras 4326c <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4329c: 7217 moveq #23,%d1 <== NOT EXECUTED 4329e: 609c bras 4323c <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 432a0: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 432a4: 7204 moveq #4,%d1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 432a6: 7001 moveq #1,%d0 <== NOT EXECUTED 432a8: 42b0 1800 clrl %a0@(00000000,%d1:l) <== NOT EXECUTED 432ac: 60ce bras 4327c <== NOT EXECUTED =============================================================================== 000432ec : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 432ec: 4e56 ffe0 linkw %fp,#-32 432f0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 432f4: 42a7 clrl %sp@- 432f6: 280e movel %fp,%d4 432f8: 0684 0000 0014 addil #20,%d4 432fe: 260e movel %fp,%d3 43300: 0683 0000 0010 addil #16,%d3 43306: 47fa fdea lea %pc@(430f2 ),%a3 4330a: 2f04 movel %d4,%sp@- 4330c: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4330e: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43312: 2f0a movel %a2,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 43314: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43318: 2f02 movel %d2,%sp@- 4331a: 4e93 jsr %a3@ 4331c: 4fef 0014 lea %sp@(20),%sp 43320: 4a80 tstl %d0 43322: 660c bnes 43330 <== ALWAYS TAKEN || !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; return 1; 43324: 4280 clrl %d0 <== NOT EXECUTED } 43326: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4332c: 4e5e unlk %fp <== NOT EXECUTED 4332e: 4e75 rts <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 43330: 42a7 clrl %sp@- 43332: 2f04 movel %d4,%sp@- 43334: 2f03 movel %d3,%sp@- 43336: 486a 0004 pea %a2@(4) 4333a: 2f02 movel %d2,%sp@- 4333c: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4333e: 4fef 0014 lea %sp@(20),%sp 43342: 4a80 tstl %d0 43344: 67de beqs 43324 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 43346: 486e fffc pea %fp@(-4) 4334a: 49fa fcd8 lea %pc@(43024 ),%a4 4334e: 2f02 movel %d2,%sp@- 43350: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43352: 508f addql #8,%sp 43354: 4a80 tstl %d0 43356: 67cc beqs 43324 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 43358: 486e fff8 pea %fp@(-8) 4335c: 2f02 movel %d2,%sp@- 4335e: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43360: 508f addql #8,%sp 43362: 4a80 tstl %d0 43364: 67be beqs 43324 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 43366: 42a7 clrl %sp@- 43368: 2f04 movel %d4,%sp@- 4336a: 2f03 movel %d3,%sp@- 4336c: 486a 000c pea %a2@(12) 43370: 2f02 movel %d2,%sp@- 43372: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43374: 4fef 0014 lea %sp@(20),%sp 43378: 4a80 tstl %d0 4337a: 67a8 beqs 43324 <== 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) 4337c: 42a7 clrl %sp@- 4337e: 2f04 movel %d4,%sp@- 43380: 2f03 movel %d3,%sp@- 43382: 486a 0010 pea %a2@(16) 43386: 2f02 movel %d2,%sp@- 43388: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4338a: 4fef 0014 lea %sp@(20),%sp 4338e: 4a80 tstl %d0 43390: 6792 beqs 43324 <== 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) 43392: 42a7 clrl %sp@- 43394: 2f04 movel %d4,%sp@- 43396: 2f03 movel %d3,%sp@- 43398: 486a 0014 pea %a2@(20) 4339c: 2f02 movel %d2,%sp@- 4339e: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 433a0: 4fef 0014 lea %sp@(20),%sp 433a4: 4a80 tstl %d0 433a6: 6700 ff7c beqw 43324 || !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)) 433aa: 4878 0001 pea 1 433ae: 2f04 movel %d4,%sp@- 433b0: 2f03 movel %d3,%sp@- 433b2: 486a 0018 pea %a2@(24) 433b6: 2f02 movel %d2,%sp@- 433b8: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 433ba: 4fef 0014 lea %sp@(20),%sp 433be: 4a80 tstl %d0 433c0: 6700 ff62 beqw 43324 || !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; 433c4: 7001 moveq #1,%d0 433c6: 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; 433cc: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; } 433d2: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 433d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043524 : return NULL; return &grent; } void setgrent(void) { 43524: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 43528: 4eb9 0004 341a jsr 4341a <== NOT EXECUTED if (group_fp != NULL) 4352e: 2039 0006 0b0a movel 60b0a ,%d0 <== NOT EXECUTED 43534: 670a beqs 43540 <== NOT EXECUTED fclose(group_fp); 43536: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43538: 4eb9 0004 fc72 jsr 4fc72 <== NOT EXECUTED 4353e: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 43540: 4879 0005 f42b pea 5f42b <_global_impure_ptr+0xbf> <== NOT EXECUTED 43546: 4879 0005 ea72 pea 5ea72 <== NOT EXECUTED 4354c: 4eb9 0005 02f4 jsr 502f4 <== NOT EXECUTED 43552: 508f addql #8,%sp <== NOT EXECUTED } 43554: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 43556: 23c0 0006 0b0a movel %d0,60b0a <== NOT EXECUTED } =============================================================================== 000436ee : return NULL; return &pwent; } void setpwent(void) { 436ee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 436f2: 4eb9 0004 341a jsr 4341a <== NOT EXECUTED if (passwd_fp != NULL) 436f8: 2039 0006 0a22 movel 60a22 ,%d0 <== NOT EXECUTED 436fe: 670a beqs 4370a <== NOT EXECUTED fclose(passwd_fp); 43700: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43702: 4eb9 0004 fc72 jsr 4fc72 <== NOT EXECUTED 43708: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4370a: 4879 0005 f42b pea 5f42b <_global_impure_ptr+0xbf> <== NOT EXECUTED 43710: 4879 0005 e9ff pea 5e9ff <== NOT EXECUTED 43716: 4eb9 0005 02f4 jsr 502f4 <== NOT EXECUTED 4371c: 508f addql #8,%sp <== NOT EXECUTED } 4371e: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 43720: 23c0 0006 0a22 movel %d0,60a22 <== NOT EXECUTED } =============================================================================== 00044c40 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44c40: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44c44: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44c46: 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)) { 44c4a: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 44c4e: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44c54: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44c56: 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)) { 44c5a: 4a80 tstl %d0 <== NOT EXECUTED 44c5c: 661c bnes 44c7a <== 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); 44c5e: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 44c62: 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); 44c66: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44c6c: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 44c70: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44c74: 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); 44c76: 6000 fdd0 braw 44a48 <== 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); 44c7a: 42a7 clrl %sp@- <== NOT EXECUTED i = iproc (c, tty); 44c7c: 0282 0000 00ff andil #255,%d2 <== 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); 44c82: 42a7 clrl %sp@- <== NOT EXECUTED 44c84: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44c88: 4eb9 0004 6704 jsr 46704 <== NOT EXECUTED i = iproc (c, tty); 44c8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44c90: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44c92: 4eba fdb4 jsr %pc@(44a48 ) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44c96: 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); 44c9a: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44c9c: 4eb9 0004 6840 jsr 46840 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 44ca2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 44ca6: 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); 44ca8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 44cac: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44cb0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004519c : int _STAT_NAME( const char *path, struct stat *buf ) { 4519c: 4e56 ffe0 linkw %fp,#-32 451a0: 48d7 001c moveml %d2-%d4,%sp@ 451a4: 262e 0008 movel %fp@(8),%d3 451a8: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 451ac: 6700 0088 beqw 45236 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 451b0: 2f03 movel %d3,%sp@- 451b2: 280e movel %fp,%d4 451b4: 0684 ffff ffec addil #-20,%d4 451ba: 4eb9 0005 25b4 jsr 525b4 451c0: 7201 moveq #1,%d1 451c2: 2e81 movel %d1,%sp@ 451c4: 2f04 movel %d4,%sp@- 451c6: 42a7 clrl %sp@- 451c8: 2f00 movel %d0,%sp@- 451ca: 2f03 movel %d3,%sp@- 451cc: 4eb9 0004 37c8 jsr 437c8 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 451d2: 4fef 0014 lea %sp@(20),%sp 451d6: 4a80 tstl %d0 451d8: 664e bnes 45228 return -1; if ( !loc.handlers->fstat_h ){ 451da: 206e fff4 moveal %fp@(-12),%a0 451de: 4aa8 0018 tstl %a0@(24) 451e2: 676c beqs 45250 <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 451e4: 4878 0046 pea 46 451e8: 42a7 clrl %sp@- 451ea: 2f02 movel %d2,%sp@- 451ec: 4eb9 0005 1770 jsr 51770 status = (*loc.handlers->fstat_h)( &loc, buf ); 451f2: 2f02 movel %d2,%sp@- 451f4: 2f04 movel %d4,%sp@- 451f6: 206e fff4 moveal %fp@(-12),%a0 451fa: 2068 0018 moveal %a0@(24),%a0 451fe: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 45200: 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 ); 45204: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 45206: 4fef 0014 lea %sp@(20),%sp 4520a: 4a88 tstl %a0 4520c: 670e beqs 4521c <== NEVER TAKEN 4520e: 2068 001c moveal %a0@(28),%a0 45212: 4a88 tstl %a0 45214: 6706 beqs 4521c <== NEVER TAKEN 45216: 2f04 movel %d4,%sp@- 45218: 4e90 jsr %a0@ 4521a: 588f addql #4,%sp return status; } 4521c: 2002 movel %d2,%d0 4521e: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 45224: 4e5e unlk %fp 45226: 4e75 rts if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 45228: 74ff moveq #-1,%d2 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 4522a: 2002 movel %d2,%d0 4522c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 45232: 4e5e unlk %fp 45234: 4e75 rts /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 45236: 4eb9 0005 04d0 jsr 504d0 <__errno> 4523c: 74ff moveq #-1,%d2 4523e: 760e moveq #14,%d3 45240: 2040 moveal %d0,%a0 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 45242: 2002 movel %d2,%d0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 45244: 2083 movel %d3,%a0@ status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 45246: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 4524c: 4e5e unlk %fp 4524e: 4e75 rts 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 45250: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 45254: 4a88 tstl %a0 <== NOT EXECUTED 45256: 670e beqs 45266 <== NOT EXECUTED 45258: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4525c: 4a88 tstl %a0 <== NOT EXECUTED 4525e: 6706 beqs 45266 <== NOT EXECUTED 45260: 2f04 movel %d4,%sp@- <== NOT EXECUTED 45262: 4e90 jsr %a0@ <== NOT EXECUTED 45264: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 45266: 4eb9 0005 04d0 jsr 504d0 <__errno> <== NOT EXECUTED 4526c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4526e: 2040 moveal %d0,%a0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 45270: 2002 movel %d2,%d0 <== NOT EXECUTED 45272: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 45278: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 4527e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000454b0 : int symlink( const char *actualpath, const char *sympath ) { 454b0: 4e56 ffe4 linkw %fp,#-28 454b4: 2f03 movel %d3,%sp@- 454b6: 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 ); 454b8: 240e movel %fp,%d2 454ba: 0682 ffff ffe4 addil #-28,%d2 454c0: 2f02 movel %d2,%sp@- 454c2: 486e fffc pea %fp@(-4) int symlink( const char *actualpath, const char *sympath ) { 454c6: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 454ca: 2f03 movel %d3,%sp@- 454cc: 4eb9 0004 5408 jsr 45408 if ( !loc.ops->evalformake_h ) { 454d2: 206e fff0 moveal %fp@(-16),%a0 454d6: 4fef 000c lea %sp@(12),%sp 454da: 2068 0004 moveal %a0@(4),%a0 454de: 4a88 tstl %a0 454e0: 6776 beqs 45558 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 454e2: 486e fff8 pea %fp@(-8) 454e6: 2f02 movel %d2,%sp@- 454e8: d6ae fffc addl %fp@(-4),%d3 454ec: 2f03 movel %d3,%sp@- 454ee: 4e90 jsr %a0@ if ( result != 0 ) 454f0: 4fef 000c lea %sp@(12),%sp 454f4: 4a80 tstl %d0 454f6: 6642 bnes 4553a return -1; if ( !loc.ops->symlink_h ) { 454f8: 226e fff0 moveal %fp@(-16),%a1 454fc: 2069 0038 moveal %a1@(56),%a0 45500: 4a88 tstl %a0 45502: 6746 beqs 4554a <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 45504: 2f2e fff8 movel %fp@(-8),%sp@- 45508: 2f2e 0008 movel %fp@(8),%sp@- 4550c: 2f02 movel %d2,%sp@- 4550e: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 45510: 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); 45514: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 45516: 4fef 000c lea %sp@(12),%sp 4551a: 4a88 tstl %a0 4551c: 670e beqs 4552c <== NEVER TAKEN 4551e: 2068 001c moveal %a0@(28),%a0 45522: 4a88 tstl %a0 45524: 6706 beqs 4552c <== NEVER TAKEN 45526: 2f02 movel %d2,%sp@- 45528: 4e90 jsr %a0@ 4552a: 588f addql #4,%sp return result; } 4552c: 2003 movel %d3,%d0 4552e: 242e ffdc movel %fp@(-36),%d2 45532: 262e ffe0 movel %fp@(-32),%d3 45536: 4e5e unlk %fp 45538: 4e75 rts if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) 4553a: 76ff moveq #-1,%d3 result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 4553c: 2003 movel %d3,%d0 4553e: 242e ffdc movel %fp@(-36),%d2 45542: 262e ffe0 movel %fp@(-32),%d3 45546: 4e5e unlk %fp 45548: 4e75 rts result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 4554a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4554e: 4a88 tstl %a0 <== NOT EXECUTED 45550: 6706 beqs 45558 <== NOT EXECUTED 45552: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45554: 4e90 jsr %a0@ <== NOT EXECUTED 45556: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 45558: 4eb9 0005 077c jsr 5077c <__errno> <== NOT EXECUTED 4555e: 76ff moveq #-1,%d3 <== NOT EXECUTED 45560: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 45562: 2003 movel %d3,%d0 <== NOT EXECUTED 45564: 242e ffdc movel %fp@(-36),%d2 <== NOT EXECUTED 45568: 262e ffe0 movel %fp@(-32),%d3 <== NOT EXECUTED 4556c: 4e5e unlk %fp <== NOT EXECUTED if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4556e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } ... =============================================================================== 00045344 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 45344: 4e56 0000 linkw %fp,#0 45348: 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; 4534c: 2028 0104 movel %a0@(260),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 45350: 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 ) { 45352: 4a80 tstl %d0 45354: 6728 beqs 4537e <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 45356: 2279 0006 1c96 moveal 61c96 <_Thread_Executing>,%a1 4535c: 2429 0104 movel %a1@(260),%d2 _Thread_Executing->libc_reent = this_reent; 45360: 2340 0104 movel %d0,%a1@(260) _fwalk (t->libc_reent, sync_wrapper); 45364: 487a 0046 pea %pc@(453ac ) 45368: 2f28 0104 movel %a0@(260),%sp@- 4536c: 4eb9 0005 144e jsr 5144e <_fwalk> _Thread_Executing->libc_reent = current_reent; 45372: 2079 0006 1c96 moveal 61c96 <_Thread_Executing>,%a0 45378: 508f addql #8,%sp 4537a: 2142 0104 movel %d2,%a0@(260) } } 4537e: 242e fffc movel %fp@(-4),%d2 45382: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044fb4 : int tcsetattr( int fd, int opt, struct termios *tp ) { 44fb4: 4e56 0000 linkw %fp,#0 44fb8: 202e 000c movel %fp@(12),%d0 44fbc: 2f03 movel %d3,%sp@- 44fbe: 262e 0010 movel %fp@(16),%d3 44fc2: 2f02 movel %d2,%sp@- 44fc4: 242e 0008 movel %fp@(8),%d2 switch (opt) { 44fc8: 4a80 tstl %d0 44fca: 6738 beqs 45004 44fcc: 7201 moveq #1,%d1 <== NOT EXECUTED 44fce: b280 cmpl %d0,%d1 <== NOT EXECUTED 44fd0: 671c beqs 44fee <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 44fd2: 4eb9 0005 0480 jsr 50480 <__errno> <== NOT EXECUTED 44fd8: 2040 moveal %d0,%a0 <== NOT EXECUTED 44fda: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 44fe0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44fe4: 70ff moveq #-1,%d0 <== NOT EXECUTED 44fe6: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 44fea: 4e5e unlk %fp <== NOT EXECUTED 44fec: 4e75 rts <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 44fee: 42a7 clrl %sp@- <== NOT EXECUTED 44ff0: 4878 0003 pea 3 <== NOT EXECUTED 44ff4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44ff6: 4eb9 0004 d200 jsr 4d200 <== NOT EXECUTED 44ffc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45000: 4a80 tstl %d0 <== NOT EXECUTED 45002: 6ddc blts 44fe0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 45004: 2d43 0010 movel %d3,%fp@(16) 45008: 7002 moveq #2,%d0 4500a: 2d42 0008 movel %d2,%fp@(8) } } 4500e: 242e fff8 movel %fp@(-8),%d2 45012: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 45016: 2d40 000c movel %d0,%fp@(12) } } 4501a: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4501c: 4ef9 0004 d200 jmp 4d200 ... =============================================================================== 0004ea54 : #include int unlink( const char *path ) { 4ea54: 4e56 ffc0 linkw %fp,#-64 4ea58: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4ea5c: 242e 0008 movel %fp@(8),%d2 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4ea60: 2f02 movel %d2,%sp@- 4ea62: 4eb9 0004 2bfc jsr 42bfc if ( parentpathlen == 0 ) 4ea68: 588f addql #4,%sp 4ea6a: 4a80 tstl %d0 4ea6c: 6600 00e6 bnew 4eb54 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4ea70: 45ee ffe8 lea %fp@(-24),%a2 4ea74: 4283 clrl %d3 4ea76: 2f0a movel %a2,%sp@- 4ea78: 486e fffc pea %fp@(-4) 4ea7c: 4204 clrb %d4 4ea7e: 2f02 movel %d2,%sp@- 4ea80: 4eb9 0004 3d00 jsr 43d00 4ea86: 4fef 000c lea %sp@(12),%sp /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4ea8a: 2d52 ffd4 movel %a2@,%fp@(-44) name = path + parentpathlen; 4ea8e: d682 addl %d2,%d3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4ea90: 47f9 0005 05e4 lea 505e4 ,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4ea96: 240e movel %fp,%d2 4ea98: 0682 ffff ffd4 addil #-44,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4ea9e: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40) 4eaa4: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36) 4eaaa: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32) 4eab0: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4eab6: 2f03 movel %d3,%sp@- 4eab8: 4e93 jsr %a3@ 4eaba: 2e80 movel %d0,%sp@ 4eabc: 2f03 movel %d3,%sp@- 4eabe: 4eb9 0004 2ba8 jsr 42ba8 4eac4: d680 addl %d0,%d3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4eac6: 2f03 movel %d3,%sp@- 4eac8: 4e93 jsr %a3@ 4eaca: 4297 clrl %sp@ 4eacc: 2f02 movel %d2,%sp@- 4eace: 42a7 clrl %sp@- 4ead0: 2f00 movel %d0,%sp@- 4ead2: 2f03 movel %d3,%sp@- 4ead4: 4eb9 0004 2c42 jsr 42c42 0, &loc, false ); if ( result != 0 ) { 4eada: 4fef 001c lea %sp@(28),%sp 4eade: 4a80 tstl %d0 4eae0: 6600 00a6 bnew 4eb88 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4eae4: 226e ffe0 moveal %fp@(-32),%a1 4eae8: 2069 0010 moveal %a1@(16),%a0 4eaec: 4a88 tstl %a0 4eaee: 6700 00c0 beqw 4ebb0 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 ) { 4eaf2: 2f02 movel %d2,%sp@- 4eaf4: 4e90 jsr %a0@ 4eaf6: 588f addql #4,%sp 4eaf8: 7201 moveq #1,%d1 4eafa: b280 cmpl %d0,%d1 4eafc: 6700 00f6 beqw 4ebf4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 4eb00: 226e ffe0 moveal %fp@(-32),%a1 4eb04: 2069 000c moveal %a1@(12),%a0 4eb08: 4a88 tstl %a0 4eb0a: 6700 00a4 beqw 4ebb0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4eb0e: 2f02 movel %d2,%sp@- 4eb10: 2f0a movel %a2,%sp@- 4eb12: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4eb14: 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 ); 4eb18: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 4eb1a: 508f addql #8,%sp 4eb1c: 4a88 tstl %a0 4eb1e: 670e beqs 4eb2e <== NEVER TAKEN 4eb20: 2068 001c moveal %a0@(28),%a0 4eb24: 4a88 tstl %a0 4eb26: 6706 beqs 4eb2e <== NEVER TAKEN 4eb28: 2f02 movel %d2,%sp@- 4eb2a: 4e90 jsr %a0@ 4eb2c: 588f addql #4,%sp if ( free_parentloc ) 4eb2e: 4a04 tstb %d4 4eb30: 6716 beqs 4eb48 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 4eb32: 206e fff4 moveal %fp@(-12),%a0 4eb36: 4a88 tstl %a0 4eb38: 670e beqs 4eb48 <== NEVER TAKEN 4eb3a: 2068 001c moveal %a0@(28),%a0 4eb3e: 4a88 tstl %a0 4eb40: 6706 beqs 4eb48 <== NEVER TAKEN 4eb42: 2f0a movel %a2,%sp@- 4eb44: 4e90 jsr %a0@ 4eb46: 588f addql #4,%sp return result; } 4eb48: 2003 movel %d3,%d0 4eb4a: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 4eb50: 4e5e unlk %fp 4eb52: 4e75 rts parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4eb54: 42a7 clrl %sp@- 4eb56: 45ee ffe8 lea %fp@(-24),%a2 4eb5a: 2600 movel %d0,%d3 4eb5c: 2f0a movel %a2,%sp@- 4eb5e: 4878 0002 pea 2 4eb62: 2f00 movel %d0,%sp@- 4eb64: 2f02 movel %d2,%sp@- 4eb66: 4eb9 0004 2d4c jsr 42d4c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4eb6c: 4fef 0014 lea %sp@(20),%sp 4eb70: 4a80 tstl %d0 4eb72: 6606 bnes 4eb7a <== NEVER TAKEN 4eb74: 7801 moveq #1,%d4 4eb76: 6000 ff12 braw 4ea8a result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4eb7a: 76ff moveq #-1,%d3 <== NOT EXECUTED return result; } 4eb7c: 2003 movel %d3,%d0 <== NOT EXECUTED 4eb7e: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4eb84: 4e5e unlk %fp <== NOT EXECUTED 4eb86: 4e75 rts <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 4eb88: 4a04 tstb %d4 4eb8a: 67ee beqs 4eb7a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 4eb8c: 206e fff4 moveal %fp@(-12),%a0 4eb90: 4a88 tstl %a0 4eb92: 67e6 beqs 4eb7a <== NEVER TAKEN 4eb94: 2028 001c movel %a0@(28),%d0 4eb98: 67e0 beqs 4eb7a <== NEVER TAKEN 4eb9a: 2f0a movel %a2,%sp@- 4eb9c: 2040 moveal %d0,%a0 4eb9e: 76ff moveq #-1,%d3 4eba0: 4e90 jsr %a0@ 4eba2: 588f addql #4,%sp rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4eba4: 2003 movel %d3,%d0 4eba6: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 4ebac: 4e5e unlk %fp 4ebae: 4e75 rts rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 4ebb0: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4ebb4: 4a88 tstl %a0 <== NOT EXECUTED 4ebb6: 6706 beqs 4ebbe <== NOT EXECUTED 4ebb8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ebba: 4e90 jsr %a0@ <== NOT EXECUTED 4ebbc: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4ebbe: 4a04 tstb %d4 <== NOT EXECUTED 4ebc0: 6716 beqs 4ebd8 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4ebc2: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4ebc6: 4a88 tstl %a0 <== NOT EXECUTED 4ebc8: 670e beqs 4ebd8 <== NOT EXECUTED 4ebca: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4ebce: 4a88 tstl %a0 <== NOT EXECUTED 4ebd0: 6706 beqs 4ebd8 <== NOT EXECUTED 4ebd2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ebd4: 4e90 jsr %a0@ <== NOT EXECUTED 4ebd6: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ebd8: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 4ebde: 76ff moveq #-1,%d3 <== NOT EXECUTED 4ebe0: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4ebe2: 2003 movel %d3,%d0 <== NOT EXECUTED 4ebe4: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ebea: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4ebf0: 4e5e unlk %fp <== NOT EXECUTED 4ebf2: 4e75 rts <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 4ebf4: 206e ffe0 moveal %fp@(-32),%a0 4ebf8: 4a88 tstl %a0 4ebfa: 670e beqs 4ec0a <== NEVER TAKEN 4ebfc: 2068 001c moveal %a0@(28),%a0 4ec00: 4a88 tstl %a0 4ec02: 6706 beqs 4ec0a <== NEVER TAKEN 4ec04: 2f02 movel %d2,%sp@- 4ec06: 4e90 jsr %a0@ 4ec08: 588f addql #4,%sp if ( free_parentloc ) 4ec0a: 4a04 tstb %d4 4ec0c: 6716 beqs 4ec24 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4ec0e: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4ec12: 4a88 tstl %a0 <== NOT EXECUTED 4ec14: 670e beqs 4ec24 <== NOT EXECUTED 4ec16: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4ec1a: 4a88 tstl %a0 <== NOT EXECUTED 4ec1c: 6706 beqs 4ec24 <== NOT EXECUTED 4ec1e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ec20: 4e90 jsr %a0@ <== NOT EXECUTED 4ec22: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4ec24: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> 4ec2a: 76ff moveq #-1,%d3 4ec2c: 2040 moveal %d0,%a0 4ec2e: 7015 moveq #21,%d0 4ec30: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4ec32: 2003 movel %d3,%d0 4ec34: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 4ec3a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049704 : */ int unmount( const char *path ) { 49704: 4e56 ffec linkw %fp,#-20 49708: 2f0a movel %a2,%sp@- 4970a: 246e 0008 moveal %fp@(8),%a2 4970e: 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 ) ) 49710: 240e movel %fp,%d2 49712: 0682 ffff ffec addil #-20,%d2 49718: 2f0a movel %a2,%sp@- 4971a: 4eb9 0005 58c8 jsr 558c8 49720: 7201 moveq #1,%d1 49722: 2e81 movel %d1,%sp@ 49724: 2f02 movel %d2,%sp@- 49726: 42a7 clrl %sp@- 49728: 2f00 movel %d0,%sp@- 4972a: 2f0a movel %a2,%sp@- 4972c: 4eb9 0004 57c4 jsr 457c4 49732: 4fef 0014 lea %sp@(20),%sp 49736: 4a80 tstl %d0 49738: 6600 0088 bnew 497c2 return -1; mt_entry = loc.mt_entry; 4973c: 246e fffc moveal %fp@(-4),%a2 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 49740: 202e ffec movel %fp@(-20),%d0 49744: b0aa 001c cmpl %a2@(28),%d0 49748: 6600 00f2 bnew 4983c /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4974c: 206e fff8 moveal %fp@(-8),%a0 49750: 4a88 tstl %a0 49752: 670e beqs 49762 <== NEVER TAKEN 49754: 2068 001c moveal %a0@(28),%a0 49758: 4a88 tstl %a0 4975a: 6706 beqs 49762 <== NEVER TAKEN 4975c: 2f02 movel %d2,%sp@- 4975e: 4e90 jsr %a0@ 49760: 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; 49762: 206a 0014 moveal %a2@(20),%a0 49766: 4aa8 0028 tstl %a0@(40) 4976a: 6700 0136 beqw 498a2 fs_root_loc = &mt_entry->mt_fs_root; 4976e: 206a 0028 moveal %a2@(40),%a0 49772: 4aa8 002c tstl %a0@(44) 49776: 6700 012a beqw 498a2 * 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 ) 4977a: 2079 0006 40cc moveal 640cc ,%a0 49780: b5e8 0014 cmpal %a0@(20),%a2 49784: 6700 00e6 beqw 4986c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 49788: 2f2a 002c movel %a2@(44),%sp@- 4978c: 487a ff5e pea %pc@(496ec ) 49790: 4eb9 0004 64b4 jsr 464b4 49796: 508f addql #8,%sp 49798: 4a00 tstb %d0 4979a: 6600 00d0 bnew 4986c * 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 ) 4979e: 2f0a movel %a2,%sp@- 497a0: 4eb9 0004 5adc jsr 45adc 497a6: 588f addql #4,%sp 497a8: 7201 moveq #1,%d1 497aa: b280 cmpl %d0,%d1 497ac: 6700 00be beqw 4986c * 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 ) 497b0: 206a 0014 moveal %a2@(20),%a0 497b4: 2f0a movel %a2,%sp@- 497b6: 2068 0028 moveal %a0@(40),%a0 497ba: 4e90 jsr %a0@ 497bc: 588f addql #4,%sp 497be: 4a80 tstl %d0 497c0: 670e beqs 497d0 <== ALWAYS TAKEN rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 497c2: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 497c6: 70ff moveq #-1,%d0 } 497c8: 246e ffe8 moveal %fp@(-24),%a2 497cc: 4e5e unlk %fp 497ce: 4e75 rts * 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){ 497d0: 206a 0028 moveal %a2@(40),%a0 497d4: 2f0a movel %a2,%sp@- 497d6: 2068 002c moveal %a0@(44),%a0 497da: 4e90 jsr %a0@ 497dc: 588f addql #4,%sp 497de: 4a80 tstl %d0 497e0: 6600 00a4 bnew 49886 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 ); 497e4: 42a7 clrl %sp@- 497e6: 42a7 clrl %sp@- 497e8: 2f39 0006 5f30 movel 65f30 ,%sp@- 497ee: 4eb9 0004 a6b0 jsr 4a6b0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 497f4: 2f0a movel %a2,%sp@- 497f6: 4eb9 0004 b0a8 jsr 4b0a8 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 497fc: 2f39 0006 5f30 movel 65f30 ,%sp@- 49802: 4eb9 0004 a7ec jsr 4a7ec /* * 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 ); 49808: 206a 0014 moveal %a2@(20),%a0 4980c: 4fef 0014 lea %sp@(20),%sp 49810: 4a88 tstl %a0 49812: 6710 beqs 49824 <== NEVER TAKEN 49814: 2068 001c moveal %a0@(28),%a0 49818: 4a88 tstl %a0 4981a: 6708 beqs 49824 <== NEVER TAKEN 4981c: 486a 0008 pea %a2@(8) 49820: 4e90 jsr %a0@ 49822: 588f addql #4,%sp free( mt_entry ); 49824: 2f0a movel %a2,%sp@- 49826: 4eb9 0004 5854 jsr 45854 return 0; } 4982c: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 49830: 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 ); 49832: 4280 clrl %d0 return 0; } 49834: 246e ffe8 moveal %fp@(-24),%a2 49838: 4e5e unlk %fp 4983a: 4e75 rts /* * 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 ); 4983c: 206e fff8 moveal %fp@(-8),%a0 49840: 4a88 tstl %a0 49842: 670e beqs 49852 <== NEVER TAKEN 49844: 2068 001c moveal %a0@(28),%a0 49848: 4a88 tstl %a0 4984a: 6706 beqs 49852 <== NEVER TAKEN 4984c: 2f02 movel %d2,%sp@- 4984e: 4e90 jsr %a0@ 49850: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 49852: 4eb9 0005 2860 jsr 52860 <__errno> 49858: 740d moveq #13,%d2 4985a: 2040 moveal %d0,%a0 4985c: 70ff moveq #-1,%d0 4985e: 2082 movel %d2,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 49860: 242e ffe4 movel %fp@(-28),%d2 49864: 246e ffe8 moveal %fp@(-24),%a2 49868: 4e5e unlk %fp 4986a: 4e75 rts * 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 ) rtems_set_errno_and_return_minus_one( EBUSY ); 4986c: 4eb9 0005 2860 jsr 52860 <__errno> rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 49872: 242e ffe4 movel %fp@(-28),%d2 * 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 ) rtems_set_errno_and_return_minus_one( EBUSY ); 49876: 2040 moveal %d0,%a0 49878: 7210 moveq #16,%d1 4987a: 70ff moveq #-1,%d0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4987c: 246e ffe8 moveal %fp@(-24),%a2 49880: 4e5e unlk %fp * 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 ) rtems_set_errno_and_return_minus_one( EBUSY ); 49882: 2081 movel %d1,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 49884: 4e75 rts * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 49886: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 4988a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4988c: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 49890: 4e90 jsr %a0@ <== NOT EXECUTED 49892: 588f addql #4,%sp <== NOT EXECUTED 49894: 4a80 tstl %d0 <== NOT EXECUTED 49896: 6700 ff2a beqw 497c2 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4989a: 42a7 clrl %sp@- <== NOT EXECUTED 4989c: 4eb9 0004 ad84 jsr 4ad84 <== NOT EXECUTED 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 ); 498a2: 4eb9 0005 2860 jsr 52860 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 498a8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 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 ); 498ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 498ae: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 498b0: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 498b4: 4e5e unlk %fp <== NOT EXECUTED 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 ); 498b6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ... =============================================================================== 00047258 : int utime( const char *path, const struct utimbuf *times ) { 47258: 4e56 ffe0 linkw %fp,#-32 4725c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47260: 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 ) ) 47264: 240e movel %fp,%d2 47266: 0682 ffff ffec addil #-20,%d2 4726c: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 4726e: 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 ) ) 47272: 4eb9 0005 25b4 jsr 525b4 47278: 7201 moveq #1,%d1 4727a: 2e81 movel %d1,%sp@ 4727c: 2f02 movel %d2,%sp@- 4727e: 42a7 clrl %sp@- 47280: 2f00 movel %d0,%sp@- 47282: 2f03 movel %d3,%sp@- 47284: 4eb9 0004 37c8 jsr 437c8 4728a: 4fef 0014 lea %sp@(20),%sp 4728e: 4a80 tstl %d0 47290: 663e bnes 472d0 return -1; if ( !temp_loc.ops->utime_h ){ 47292: 226e fff8 moveal %fp@(-8),%a1 47296: 2069 0030 moveal %a1@(48),%a0 4729a: 4a88 tstl %a0 4729c: 6740 beqs 472de <== NEVER TAKEN 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 ); 4729e: 2f2a 0004 movel %a2@(4),%sp@- 472a2: 2f12 movel %a2@,%sp@- 472a4: 2f02 movel %d2,%sp@- 472a6: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 472a8: 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 ); 472ac: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 472ae: 4fef 000c lea %sp@(12),%sp 472b2: 4a88 tstl %a0 472b4: 670e beqs 472c4 <== NEVER TAKEN 472b6: 2068 001c moveal %a0@(28),%a0 472ba: 4a88 tstl %a0 472bc: 6706 beqs 472c4 <== NEVER TAKEN 472be: 2f02 movel %d2,%sp@- 472c0: 4e90 jsr %a0@ 472c2: 588f addql #4,%sp return result; } 472c4: 2003 movel %d3,%d0 472c6: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 472cc: 4e5e unlk %fp 472ce: 4e75 rts ) { rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 472d0: 76ff moveq #-1,%d3 result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 472d2: 2003 movel %d3,%d0 472d4: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 472da: 4e5e unlk %fp 472dc: 4e75 rts if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 472de: 2069 001c moveal %a1@(28),%a0 472e2: 4a88 tstl %a0 472e4: 6706 beqs 472ec <== NOT EXECUTED 472e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 472e8: 4e90 jsr %a0@ <== NOT EXECUTED 472ea: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 472ec: 4eb9 0005 04d0 jsr 504d0 <__errno> <== NOT EXECUTED 472f2: 76ff moveq #-1,%d3 <== NOT EXECUTED 472f4: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 472f6: 2003 movel %d3,%d0 <== NOT EXECUTED 472f8: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 472fe: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 47304: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045c10 : */ void vprintk( const char *fmt, va_list ap ) { 45c10: 4e56 ffc0 linkw %fp,#-64 45c14: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45c18: 246e 0008 moveal %fp@(8),%a2 for (; *fmt != '\0'; fmt++) { 45c1c: 1012 moveb %a2@,%d0 */ void vprintk( const char *fmt, va_list ap ) { 45c1e: 2c2e 000c movel %fp@(12),%d6 for (; *fmt != '\0'; fmt++) { 45c22: 4a00 tstb %d0 45c24: 6700 0130 beqw 45d56 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45c28: 49ee ffec lea %fp@(-20),%a4 45c2c: 4bf9 0005 d565 lea 5d565 ,%a5 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 45c32: 49c0 extbl %d0 45c34: 7225 moveq #37,%d1 45c36: b280 cmpl %d0,%d1 45c38: 6724 beqs 45c5e BSP_output_char(*fmt); 45c3a: 2f00 movel %d0,%sp@- 45c3c: 2079 0005 e6ec moveal 5e6ec ,%a0 45c42: 2d46 ffe8 movel %d6,%fp@(-24) 45c46: 4e90 jsr %a0@ continue; 45c48: 588f addql #4,%sp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45c4a: 528a addql #1,%a2 45c4c: 1012 moveb %a2@,%d0 45c4e: 6700 0106 beqw 45d56 45c52: 2c2e ffe8 movel %fp@(-24),%d6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 45c56: 49c0 extbl %d0 45c58: 7225 moveq #37,%d1 45c5a: b280 cmpl %d0,%d1 45c5c: 66dc bnes 45c3a BSP_output_char(*fmt); continue; } fmt++; 45c5e: 528a addql #1,%a2 if (*fmt == '0' ) { 45c60: 7430 moveq #48,%d2 45c62: 1012 moveb %a2@,%d0 45c64: 1200 moveb %d0,%d1 45c66: 49c1 extbl %d1 45c68: b481 cmpl %d1,%d2 45c6a: 6700 01f8 beqw 45e64 lead = '0'; fmt++; } if (*fmt == '-' ) { 45c6e: 762d moveq #45,%d3 if (*fmt != '%') { BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { 45c70: 7e20 moveq #32,%d7 lead = '0'; fmt++; } if (*fmt == '-' ) { 45c72: b681 cmpl %d1,%d3 45c74: 6700 0200 beqw 45e76 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 45c78: 0680 ffff ffd0 addil #-48,%d0 45c7e: 7a09 moveq #9,%d5 45c80: 0280 0000 00ff andil #255,%d0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 45c86: 4204 clrb %d4 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 45c88: ba80 cmpl %d0,%d5 45c8a: 6500 0208 bcsw 45e94 45c8e: 4282 clrl %d2 width *= 10; width += ((unsigned) *fmt - '0'); 45c90: 2602 movel %d2,%d3 fmt++; 45c92: 528a addql #1,%a2 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 45c94: 7a09 moveq #9,%d5 width *= 10; width += ((unsigned) *fmt - '0'); 45c96: e78b lsll #3,%d3 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 45c98: 1012 moveb %a2@,%d0 width *= 10; width += ((unsigned) *fmt - '0'); 45c9a: 2043 moveal %d3,%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 45c9c: 2600 movel %d0,%d3 45c9e: 0683 ffff ffd0 addil #-48,%d3 width *= 10; width += ((unsigned) *fmt - '0'); 45ca4: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 45ca8: 0283 0000 00ff andil #255,%d3 width *= 10; width += ((unsigned) *fmt - '0'); 45cae: 41f0 18d0 lea %a0@(ffffffd0,%d1:l),%a0 45cb2: 1200 moveb %d0,%d1 45cb4: 2408 movel %a0,%d2 45cb6: 49c1 extbl %d1 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 45cb8: ba83 cmpl %d3,%d5 45cba: 64d4 bccs 45c90 45cbc: 1200 moveb %d0,%d1 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 45cbe: 706c moveq #108,%d0 45cc0: 49c1 extbl %d1 45cc2: b081 cmpl %d1,%d0 45cc4: 6700 009a beqw 45d60 lflag = true; c = *++fmt; } if ( c == 'c' ) { 45cc8: 7663 moveq #99,%d3 45cca: b681 cmpl %d1,%d3 45ccc: 6700 00a0 beqw 45d6e /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { 45cd0: 7673 moveq #115,%d3 45cd2: b681 cmpl %d1,%d3 45cd4: 6700 01cc beqw 45ea2 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 45cd8: 766f moveq #111,%d3 45cda: b681 cmpl %d1,%d3 45cdc: 6700 017a beqw 45e58 45ce0: 7a4f moveq #79,%d5 45ce2: ba81 cmpl %d1,%d5 45ce4: 6700 0172 beqw 45e58 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 45ce8: 163c 0069 moveb #105,%d3 45cec: b681 cmpl %d1,%d3 45cee: 6700 009a beqw 45d8a 45cf2: 1a3c 0049 moveb #73,%d5 45cf6: ba81 cmpl %d1,%d5 45cf8: 6700 0090 beqw 45d8a 45cfc: 163c 0064 moveb #100,%d3 45d00: b681 cmpl %d1,%d3 45d02: 6700 0086 beqw 45d8a 45d06: 1a3c 0044 moveb #68,%d5 45d0a: ba81 cmpl %d1,%d5 45d0c: 677c beqs 45d8a <== NEVER TAKEN c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 45d0e: 163c 0075 moveb #117,%d3 45d12: b681 cmpl %d1,%d3 45d14: 6700 0270 beqw 45f86 45d18: 1a3c 0055 moveb #85,%d5 45d1c: ba81 cmpl %d1,%d5 45d1e: 6700 0266 beqw 45f86 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 45d22: 163c 0078 moveb #120,%d3 45d26: b681 cmpl %d1,%d3 45d28: 6700 027a beqw 45fa4 45d2c: 1a3c 0058 moveb #88,%d5 45d30: ba81 cmpl %d1,%d5 45d32: 6700 0270 beqw 45fa4 base = 16; sign = false; } else if ( c == 'p' ) { 45d36: 7070 moveq #112,%d0 45d38: b081 cmpl %d1,%d0 45d3a: 6700 0274 beqw 45fb0 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 45d3e: 2f01 movel %d1,%sp@- 45d40: 2079 0005 e6ec moveal 5e6ec ,%a0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45d46: 528a addql #1,%a2 } else if ( c == 'x' || c == 'X' ) { base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 45d48: 2d46 ffe8 movel %d6,%fp@(-24) 45d4c: 4e90 jsr %a0@ continue; 45d4e: 588f addql #4,%sp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45d50: 1012 moveb %a2@,%d0 45d52: 6600 fefe bnew 45c52 sign, width, lead ); } } 45d56: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 45d5c: 4e5e unlk %fp 45d5e: 4e75 rts fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; 45d60: 528a addql #1,%a2 } if ( c == 'c' ) { 45d62: 7663 moveq #99,%d3 45d64: 1212 moveb %a2@,%d1 45d66: 49c1 extbl %d1 45d68: b681 cmpl %d1,%d3 45d6a: 6600 ff64 bnew 45cd0 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); 45d6e: 2046 moveal %d6,%a0 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); 45d70: 5886 addql #4,%d6 BSP_output_char(chr); 45d72: 2010 movel %a0@,%d0 45d74: 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); 45d76: 2d46 ffe8 movel %d6,%fp@(-24) BSP_output_char(chr); 45d7a: 2079 0005 e6ec moveal 5e6ec ,%a0 45d80: 2f00 movel %d0,%sp@- 45d82: 4e90 jsr %a0@ continue; 45d84: 588f addql #4,%sp 45d86: 6000 fec2 braw 45c4a } else { BSP_output_char(c); continue; } printNum( 45d8a: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45d8c: 7a0a moveq #10,%d5 } printNum( 45d8e: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45d90: 7201 moveq #1,%d1 } printNum( 45d92: 2046 moveal %d6,%a0 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 45d94: 5886 addql #4,%d6 } else { BSP_output_char(c); continue; } printNum( 45d96: 2810 movel %a0@,%d4 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 45d98: 2d46 ffe8 movel %d6,%fp@(-24) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 45d9c: 4a01 tstb %d1 45d9e: 6706 beqs 45da6 45da0: 4a84 tstl %d4 45da2: 6d00 01ae bltw 45f52 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45da6: 2004 movel %d4,%d0 45da8: 4c45 0000 remul %d5,%d0,%d0 45dac: 6700 01c6 beqw 45f74 45db0: 2600 movel %d0,%d3 45db2: 4281 clrl %d1 45db4: 3045 moveaw %d5,%a0 45db6: 4c45 3003 remul %d5,%d3,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 45dba: 3e08 movew %a0,%d7 45dbc: cfc0 mulsw %d0,%d7 45dbe: 9887 subl %d7,%d4 45dc0: 2e04 movel %d4,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45dc2: 2800 movel %d0,%d4 toPrint[count++] = (char) (unsigned_num - (n * base)); 45dc4: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 45dc8: 5281 addql #1,%d1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45dca: 4a83 tstl %d3 45dcc: 671c beqs 45dea 45dce: 2003 movel %d3,%d0 45dd0: 2600 movel %d0,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 45dd2: 3e08 movew %a0,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45dd4: 4c45 3003 remul %d5,%d3,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 45dd8: cfc0 mulsw %d0,%d7 45dda: 9887 subl %d7,%d4 45ddc: 2e04 movel %d4,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45dde: 2800 movel %d0,%d4 toPrint[count++] = (char) (unsigned_num - (n * base)); 45de0: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 45de4: 5281 addql #1,%d1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45de6: 4a83 tstl %d3 45de8: 66e4 bnes 45dce 45dea: 2800 movel %d0,%d4 45dec: 2601 movel %d1,%d3 45dee: 5283 addql #1,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 45df0: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l) for (n=maxwidth ; n > count; n-- ) 45df4: b682 cmpl %d2,%d3 45df6: 6412 bccs 45e0a BSP_output_char(lead); 45df8: 2f0b movel %a3,%sp@- 45dfa: 2079 0005 e6ec moveal 5e6ec ,%a0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 45e00: 5382 subql #1,%d2 BSP_output_char(lead); 45e02: 4e90 jsr %a0@ toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 45e04: 588f addql #4,%sp 45e06: b682 cmpl %d2,%d3 45e08: 65ee bcss 45df8 BSP_output_char(lead); for (n = 0; n < count; n++) { 45e0a: 4a83 tstl %d3 45e0c: 6700 fe3c beqw 45c4a 45e10: 4282 clrl %d2 45e12: 47f4 38ff lea %a4@(ffffffff,%d3:l),%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45e16: 2079 0005 e6ec moveal 5e6ec ,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45e1c: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45e1e: 1013 moveb %a3@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45e20: 538b subql #1,%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45e22: 49c0 extbl %d0 45e24: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45e28: 49c0 extbl %d0 45e2a: 2f00 movel %d0,%sp@- 45e2c: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45e2e: 588f addql #4,%sp 45e30: b682 cmpl %d2,%d3 45e32: 6300 fe16 blsw 45c4a BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45e36: 2079 0005 e6ec moveal 5e6ec ,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45e3c: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45e3e: 1013 moveb %a3@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45e40: 538b subql #1,%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45e42: 49c0 extbl %d0 45e44: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45e48: 49c0 extbl %d0 45e4a: 2f00 movel %d0,%sp@- 45e4c: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45e4e: 588f addql #4,%sp 45e50: b682 cmpl %d2,%d3 45e52: 62c2 bhis 45e16 45e54: 6000 fdf4 braw 45c4a } else { BSP_output_char(c); continue; } printNum( 45e58: 49c7 extbl %d7 <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45e5a: 7a08 moveq #8,%d5 <== NOT EXECUTED } printNum( 45e5c: 2647 moveal %d7,%a3 <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45e5e: 4201 clrb %d1 <== NOT EXECUTED 45e60: 6000 ff30 braw 45d92 <== NOT EXECUTED continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 45e64: 528a addql #1,%a2 } if (*fmt == '-' ) { 45e66: 762d moveq #45,%d3 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 45e68: 1012 moveb %a2@,%d0 45e6a: 7e30 moveq #48,%d7 45e6c: 1200 moveb %d0,%d1 45e6e: 49c1 extbl %d1 } if (*fmt == '-' ) { 45e70: b681 cmpl %d1,%d3 45e72: 6600 fe04 bnew 45c78 minus = true; fmt++; 45e76: 528a addql #1,%a2 } while (*fmt >= '0' && *fmt <= '9' ) { 45e78: 7a09 moveq #9,%d5 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; 45e7a: 1012 moveb %a2@,%d0 45e7c: 7801 moveq #1,%d4 45e7e: 1200 moveb %d0,%d1 } while (*fmt >= '0' && *fmt <= '9' ) { 45e80: 0680 ffff ffd0 addil #-48,%d0 45e86: 0280 0000 00ff andil #255,%d0 45e8c: 49c1 extbl %d1 45e8e: ba80 cmpl %d0,%d5 45e90: 6400 fdfc bccw 45c8e 45e94: 4282 clrl %d2 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 45e96: 706c moveq #108,%d0 45e98: b081 cmpl %d1,%d0 45e9a: 6600 fe2c bnew 45cc8 45e9e: 6000 fec0 braw 45d60 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 45ea2: 2046 moveal %d6,%a0 45ea4: 5886 addql #4,%d6 45ea6: 2650 moveal %a0@,%a3 45ea8: 2d46 ffe8 movel %d6,%fp@(-24) if ( str == NULL ) { 45eac: 4a8b tstl %a3 45eae: 6700 00e2 beqw 45f92 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 45eb2: 4a13 tstb %a3@ 45eb4: 6700 00e8 beqw 45f9e 45eb8: 4283 clrl %d3 45eba: 5283 addql #1,%d3 45ebc: 4a33 3800 tstb %a3@(00000000,%d3:l) 45ec0: 66f8 bnes 45eba ; /* leading spaces */ if ( !minus ) 45ec2: 4a04 tstb %d4 45ec4: 661a bnes 45ee0 for ( i=len ; i <== ALWAYS TAKEN 45eca: 2a03 movel %d3,%d5 <== NOT EXECUTED BSP_output_char(' '); 45ecc: 4878 0020 pea 20 <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i,%a0 <== NOT EXECUTED 45ed8: 4e90 jsr %a0@ <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NOT EXECUTED BSP_output_char(' '); /* no width option */ if (width == 0) { 45ee0: 4a82 tstl %d2 45ee2: 6606 bnes 45eea width = len; } /* output the string */ for ( i=0 ; i 45ee8: 2403 movel %d3,%d2 45eea: 1013 moveb %a3@,%d0 45eec: 672a beqs 45f18 <== NEVER TAKEN BSP_output_char(*str); 45eee: 49c0 extbl %d0 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i,%a0 45efa: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); 45f04: 49c0 extbl %d0 45f06: 2079 0005 e6ec moveal 5e6ec ,%a0 45f0c: 2f00 movel %d0,%sp@- 45f0e: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 45f18: 4a04 tstb %d4 45f1a: 6700 fd2e beqw 45c4a for ( i=len ; i BSP_output_char(' '); 45f24: 4878 0020 pea 20 for ( i=0 ; i,%a0 45f30: 4e90 jsr %a0@ for ( i=0 ; i BSP_output_char(' '); 45f3a: 4878 0020 pea 20 for ( i=0 ; i,%a0 45f46: 4e90 jsr %a0@ for ( i=0 ; i 45f4e: 6000 fcfa braw 45c4a unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 45f52: 4878 002d pea 2d <== NOT EXECUTED unsigned_num = (unsigned long) -num; 45f56: 4484 negl %d4 <== NOT EXECUTED unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 45f58: 2079 0005 e6ec moveal 5e6ec ,%a0 <== NOT EXECUTED 45f5e: 4e90 jsr %a0@ <== NOT EXECUTED unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 45f60: 588f addql #4,%sp <== NOT EXECUTED 45f62: 4a82 tstl %d2 <== NOT EXECUTED 45f64: 6700 fe40 beqw 45da6 <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45f68: 2004 movel %d4,%d0 <== NOT EXECUTED char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 45f6a: 5382 subql #1,%d2 <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45f6c: 4c45 0000 remul %d5,%d0,%d0 <== NOT EXECUTED 45f70: 6600 fe3e bnew 45db0 <== NOT EXECUTED 45f74: 4281 clrl %d1 45f76: 7601 moveq #1,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 45f78: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l) for (n=maxwidth ; n > count; n-- ) 45f7c: b682 cmpl %d2,%d3 45f7e: 6500 fe78 bcsw 45df8 45f82: 6000 fe86 braw 45e0a } else { BSP_output_char(c); continue; } printNum( 45f86: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45f88: 7a0a moveq #10,%d5 } printNum( 45f8a: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45f8c: 4201 clrb %d1 45f8e: 6000 fe02 braw 45d92 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 45f92: 47f9 0005 d564 lea 5d564 ,%a3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 45f98: 4a13 tstb %a3@ 45f9a: 6600 ff1c bnew 45eb8 45f9e: 4283 clrl %d3 45fa0: 6000 ff20 braw 45ec2 } else { BSP_output_char(c); continue; } printNum( 45fa4: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45fa6: 7a10 moveq #16,%d5 } printNum( 45fa8: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45faa: 4201 clrb %d1 45fac: 6000 fde4 braw 45d92 } printNum( 45fb0: 49c7 extbl %d7 45fb2: 2647 moveal %d7,%a3 45fb4: 7a10 moveq #16,%d5 45fb6: 4201 clrb %d1 45fb8: 6000 fdd8 braw 45d92 =============================================================================== 0005c6d4 : ssize_t write( int fd, const void *buffer, size_t count ) { 5c6d4: 4e56 fff4 linkw %fp,#-12 5c6d8: 202e 0008 movel %fp@(8),%d0 5c6dc: 222e 000c movel %fp@(12),%d1 5c6e0: 206e 0010 moveal %fp@(16),%a0 5c6e4: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5c6e8: b0b9 0005 e5f4 cmpl 5e5f4 ,%d0 5c6ee: 6466 bccs 5c756 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5c6f0: 2479 0005 fca0 moveal 5fca0 ,%a2 5c6f6: ed88 lsll #6,%d0 5c6f8: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5c6fa: 202a 0014 movel %a2@(20),%d0 5c6fe: 0800 0008 btst #8,%d0 5c702: 6752 beqs 5c756 <== NEVER TAKEN rtems_libio_check_buffer( buffer ); 5c704: 4a81 tstl %d1 5c706: 6766 beqs 5c76e <== NEVER TAKEN rtems_libio_check_count( count ); 5c708: 4a88 tstl %a0 5c70a: 673e beqs 5c74a rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5c70c: 44c0 movew %d0,%ccr 5c70e: 665e bnes 5c76e <== NEVER TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 5c710: 226a 003c moveal %a2@(60),%a1 5c714: 2269 000c moveal %a1@(12),%a1 5c718: 4a89 tstl %a1 5c71a: 676a beqs 5c786 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 5c71c: 2f08 movel %a0,%sp@- 5c71e: 2f01 movel %d1,%sp@- 5c720: 2f0a movel %a2,%sp@- 5c722: 4e91 jsr %a1@ if ( rc > 0 ) 5c724: 4fef 000c lea %sp@(12),%sp 5c728: 4a80 tstl %d0 5c72a: 6f14 bles 5c740 <== NEVER TAKEN iop->offset += rc; 5c72c: 2400 movel %d0,%d2 5c72e: 5bc1 smi %d1 5c730: 49c1 extbl %d1 5c732: d5aa 0010 addl %d2,%a2@(16) 5c736: 262a 000c movel %a2@(12),%d3 5c73a: d781 addxl %d1,%d3 5c73c: 2543 000c movel %d3,%a2@(12) return rc; } 5c740: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5c746: 4e5e unlk %fp 5c748: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 5c74a: 4280 clrl %d0 if ( rc > 0 ) iop->offset += rc; return rc; } 5c74c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5c752: 4e5e unlk %fp 5c754: 4e75 rts ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 5c756: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 5c75c: 7409 moveq #9,%d2 <== NOT EXECUTED 5c75e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c760: 70ff moveq #-1,%d0 <== NOT EXECUTED 5c762: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c764: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5c76a: 4e5e unlk %fp <== NOT EXECUTED 5c76c: 4e75 rts <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5c76e: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 5c774: 7216 moveq #22,%d1 <== NOT EXECUTED 5c776: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c778: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c77a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5c780: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c782: 4e5e unlk %fp <== NOT EXECUTED 5c784: 4e75 rts <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c786: 4eb9 0004 f1b8 jsr 4f1b8 <__errno> <== NOT EXECUTED 5c78c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c78e: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c790: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c796: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5c79c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046f94 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 46f94: 4e56 ffe4 linkw %fp,#-28 46f98: 202e 0008 movel %fp@(8),%d0 46f9c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 46fa0: 246e 000c moveal %fp@(12),%a2 46fa4: 242e 0010 movel %fp@(16),%d2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 46fa8: b0b9 0006 0124 cmpl 60124 ,%d0 46fae: 6400 00f0 bccw 470a0 iop = rtems_libio_iop( fd ); 46fb2: 2679 0006 1fa0 moveal 61fa0 ,%a3 46fb8: ed88 lsll #6,%d0 46fba: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 46fbc: 202b 0014 movel %a3@(20),%d0 46fc0: 0800 0008 btst #8,%d0 46fc4: 6700 00da beqw 470a0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 46fc8: 44c0 movew %d0,%ccr 46fca: 666e bnes 4703a <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 46fcc: 4a8a tstl %a2 46fce: 676a beqs 4703a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 46fd0: 4a82 tstl %d2 46fd2: 6f66 bles 4703a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 46fd4: 0c82 0000 0400 cmpil #1024,%d2 46fda: 6e5e bgts 4703a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 46fdc: 206b 003c moveal %a3@(60),%a0 46fe0: 4aa8 000c tstl %a0@(12) 46fe4: 6700 00d4 beqw 470ba rtems_set_errno_and_return_minus_one( ENOTSUP ); 46fe8: 204a moveal %a2,%a0 46fea: 93c9 subal %a1,%a1 46fec: 4281 clrl %d1 46fee: 7601 moveq #1,%d3 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 46ff0: 4a90 tstl %a0@ 46ff2: 6746 beqs 4703a <== NEVER TAKEN 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 ) 46ff4: 2028 0004 movel %a0@(4),%d0 46ff8: 57c4 seq %d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 46ffa: d081 addl %d1,%d0 * 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++ ) { 46ffc: 5289 addql #1,%a1 46ffe: 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 ) 47000: c883 andl %d3,%d4 47002: 1604 moveb %d4,%d3 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 47004: b081 cmpl %d1,%d0 47006: 6d32 blts 4703a * 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++ ) { 47008: 2200 movel %d0,%d1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 4700a: 0c80 0000 7fff cmpil #32767,%d0 47010: 6e28 bgts 4703a <== NEVER TAKEN * 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++ ) { 47012: b3c2 cmpal %d2,%a1 47014: 6dda blts 46ff0 <== NEVER TAKEN } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 47016: 4a04 tstb %d4 47018: 663a bnes 47054 <== NEVER TAKEN 4701a: 588a addql #4,%a2 4701c: 4283 clrl %d3 4701e: 4284 clrl %d4 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 47020: 2012 movel %a2@,%d0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 47022: 5283 addql #1,%d3 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 47024: 4a80 tstl %d0 47026: 663a bnes 47062 <== ALWAYS TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 47028: 508a addql #8,%a2 <== NOT EXECUTED 4702a: b682 cmpl %d2,%d3 <== NOT EXECUTED 4702c: 6df2 blts 47020 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 4702e: 2004 movel %d4,%d0 47030: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 47036: 4e5e unlk %fp 47038: 4e75 rts /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4703a: 4eb9 0005 0014 jsr 50014 <__errno> 47040: 78ff moveq #-1,%d4 47042: 2040 moveal %d0,%a0 47044: 7016 moveq #22,%d0 47046: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 47048: 2004 movel %d4,%d0 4704a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 47050: 4e5e unlk %fp 47052: 4e75 rts } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 47054: 4284 clrl %d4 if (bytes != iov[ v ].iov_len) break; } return total; } 47056: 2004 movel %d4,%d0 <== NOT EXECUTED 47058: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 4705e: 4e5e unlk %fp <== NOT EXECUTED 47060: 4e75 rts <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 47062: 206b 003c moveal %a3@(60),%a0 47066: 2f00 movel %d0,%sp@- 47068: 2f2a fffc movel %a2@(-4),%sp@- 4706c: 2f0b movel %a3,%sp@- 4706e: 2068 000c moveal %a0@(12),%a0 47072: 4e90 jsr %a0@ if ( bytes < 0 ) 47074: 4fef 000c lea %sp@(12),%sp 47078: 4a80 tstl %d0 4707a: 6d5a blts 470d6 <== NEVER TAKEN return -1; if ( bytes > 0 ) { 4707c: 6716 beqs 47094 <== NEVER TAKEN iop->offset += bytes; total += bytes; 4707e: d880 addl %d0,%d4 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 47080: 2c00 movel %d0,%d6 47082: 5bc5 smi %d5 47084: 49c5 extbl %d5 47086: ddab 0010 addl %d6,%a3@(16) 4708a: 222b 000c movel %a3@(12),%d1 4708e: d385 addxl %d5,%d1 47090: 2741 000c movel %d1,%a3@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 47094: b092 cmpl %a2@,%d0 47096: 6696 bnes 4702e <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 47098: 508a addql #8,%a2 4709a: b682 cmpl %d2,%d3 4709c: 6d82 blts 47020 4709e: 608e bras 4702e ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 470a0: 4eb9 0005 0014 jsr 50014 <__errno> 470a6: 78ff moveq #-1,%d4 470a8: 7209 moveq #9,%d1 470aa: 2040 moveal %d0,%a0 if (bytes != iov[ v ].iov_len) break; } return total; } 470ac: 2004 movel %d4,%d0 470ae: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 470b4: 2081 movel %d1,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 470b6: 4e5e unlk %fp 470b8: 4e75 rts if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 470ba: 4eb9 0005 0014 jsr 50014 <__errno> <== NOT EXECUTED 470c0: 78ff moveq #-1,%d4 <== NOT EXECUTED 470c2: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 470c4: 2004 movel %d4,%d0 <== NOT EXECUTED 470c6: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 470cc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 470d2: 4e5e unlk %fp <== NOT EXECUTED 470d4: 4e75 rts <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 470d6: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 470d8: 2004 movel %d4,%d0 <== NOT EXECUTED 470da: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 470e0: 4e5e unlk %fp <== NOT EXECUTED