=============================================================================== 0004945c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 4945c: 7007 moveq #7,%d0 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4945e: 4e56 0000 linkw %fp,#0 49462: 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; 49466: 2268 0010 moveal %a0@(16),%a1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4946a: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4946c: 2469 0034 moveal %a1@(52),%a2 switch( node->type ) { 49470: 2250 moveal %a0@,%a1 49472: b0a9 0048 cmpl %a1@(72),%d0 49476: 6526 bcss 4949e <== NEVER TAKEN 49478: 2029 0048 movel %a1@(72),%d0 4947c: d080 addl %d0,%d0 4947e: 303b 0808 movew %pc@(49488 ,%d0:l),%d0 49482: 48c0 extl %d0 49484: 4efb 0802 jmp %pc@(49488 ,%d0:l) 49488: 0016 026 <== NOT EXECUTED 4948a: 0010 020 <== NOT EXECUTED 4948c: 0050 0120 <== NOT EXECUTED 4948e: 002c 054 <== NOT EXECUTED 49490: 002c 054 <== NOT EXECUTED 49492: 001e 036 <== NOT EXECUTED 49494: 001e 036 <== NOT EXECUTED 49496: 003e 076 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 49498: 216a 000c 0008 movel %a2@(12),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4949e: 245f moveal %sp@+,%a2 494a0: 4280 clrl %d0 494a2: 4e5e unlk %fp 494a4: 4e75 rts 494a6: 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; 494a8: 216a 0008 0008 movel %a2@(8),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494ae: 245f moveal %sp@+,%a2 494b0: 4e5e unlk %fp 494b2: 4e75 rts 494b4: 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; 494b6: 203c 0005 c944 movel #379204,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494bc: 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; 494be: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494c2: 4280 clrl %d0 494c4: 4e75 rts 494c6: 245f moveal %sp@+,%a2 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 494c8: 203c 0005 c868 movel #378984,%d0 break; } return 0; } 494ce: 4e5e unlk %fp break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 494d0: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 494d4: 4280 clrl %d0 494d6: 4e75 rts 494d8: 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; 494da: 203c 0005 c90c movel #379148,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494e0: 4e5e unlk %fp switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 494e2: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494e6: 4280 clrl %d0 <== NOT EXECUTED =============================================================================== 0004d174 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4d174: 4e56 fff8 linkw %fp,#-8 4d178: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4d17a: 4878 0060 pea 60 4d17e: 4878 0001 pea 1 4d182: 4eb9 0004 a608 jsr 4a608 if ( !node ) 4d188: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4d18a: 2440 moveal %d0,%a2 if ( !node ) 4d18c: 4a80 tstl %d0 4d18e: 6758 beqs 4d1e8 <== NEVER TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4d190: 4878 0020 pea 20 4d194: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4d198: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 4d19e: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4d1a2: 7001 moveq #1,%d0 4d1a4: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4d1a8: 4eb9 0004 ffd8 jsr 4ffd8 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 4d1ae: 256e 0010 002e movel %fp@(16),%a2@(46) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4d1b4: 4eb9 0004 a880 jsr 4a880 4d1ba: 3540 0038 movew %d0,%a2@(56) node->st_gid = getegid(); 4d1be: 4eb9 0004 a86c jsr 4a86c #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4d1c4: 42a7 clrl %sp@- 4d1c6: 486e fff8 pea %fp@(-8) * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 4d1ca: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4d1ce: 4eb9 0004 a894 jsr 4a894 node->stat_atime = (time_t) tv.tv_sec; 4d1d4: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 4d1d8: 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; 4d1dc: 2540 0044 movel %d0,%a2@(68) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4d1e0: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 4d1e4: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; return node; } 4d1e8: 200a movel %a2,%d0 4d1ea: 246e fff4 moveal %fp@(-12),%a2 4d1ee: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ea9c : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4ea9c: 4e56 ffe8 linkw %fp,#-24 4eaa0: 206e 0008 moveal %fp@(8),%a0 4eaa4: 48d7 041c moveml %d2-%d4/%a2,%sp@ IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 4eaa8: 2450 moveal %a0@,%a2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4eaaa: 4284 clrl %d4 int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4eaac: 362e 000e movew %fp@(14),%d3 4eab0: 342e 0012 movew %fp@(18),%d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4eab4: 4eb9 0004 ff9c jsr 4ff9c if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4eaba: 4281 clrl %d1 4eabc: 3800 movew %d0,%d4 4eabe: 322a 0038 movew %a2@(56),%d1 4eac2: b284 cmpl %d4,%d1 4eac4: 6704 beqs 4eaca <== ALWAYS TAKEN 4eac6: 4a40 tstw %d0 <== NOT EXECUTED 4eac8: 6628 bnes 4eaf2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 4eaca: 3543 0038 movew %d3,%a2@(56) jnode->st_gid = group; 4eace: 3542 003a movew %d2,%a2@(58) IMFS_update_ctime( jnode ); 4ead2: 42a7 clrl %sp@- 4ead4: 486e fff8 pea %fp@(-8) 4ead8: 4eb9 0004 40b4 jsr 440b4 4eade: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4eae4: 508f addql #8,%sp #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 4eae6: 4280 clrl %d0 return 0; } 4eae8: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4eaee: 4e5e unlk %fp 4eaf0: 4e75 rts #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4eaf2: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 4eaf8: 7201 moveq #1,%d1 <== NOT EXECUTED 4eafa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4eafc: 70ff moveq #-1,%d0 <== NOT EXECUTED jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; } 4eafe: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 <== NOT EXECUTED #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4eb04: 2081 movel %d1,%a0@ <== NOT EXECUTED jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; } 4eb06: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004d22c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4d22c: 4e56 fffc linkw %fp,#-4 4d230: 2f0a movel %a2,%sp@- 4d232: 246e 0008 moveal %fp@(8),%a2 4d236: 2f02 movel %d2,%sp@- 4d238: 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 ) 4d23c: 4a8a tstl %a2 4d23e: 660e bnes 4d24e <== ALWAYS TAKEN 4d240: 4280 clrl %d0 <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4d242: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4d246: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4d24a: 4e5e unlk %fp <== NOT EXECUTED 4d24c: 4e75 rts <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4d24e: 2079 0005 d824 moveal 5d824 ,%a0 4d254: 2028 002c movel %a0@(44),%d0 4d258: 4680 notl %d0 4d25a: c0ae 0014 andl %fp@(20),%d0 4d25e: 2f00 movel %d0,%sp@- 4d260: 2f2e 0010 movel %fp@(16),%sp@- 4d264: 2f02 movel %d2,%sp@- 4d266: 4eb9 0004 d174 jsr 4d174 if ( !node ) 4d26c: 4fef 000c lea %sp@(12),%sp 4d270: 4a80 tstl %d0 4d272: 67ce beqs 4d242 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 4d274: 7207 moveq #7,%d1 4d276: b282 cmpl %d2,%d1 4d278: 641c bccs 4d296 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4d27a: 4879 0005 ccb6 pea 5ccb6 <== NOT EXECUTED 4d280: 4879 0005 cd01 pea 5cd01 <__FUNCTION__.5853> <== NOT EXECUTED 4d286: 4878 005c pea 5c <== NOT EXECUTED 4d28a: 4879 0005 ccb8 pea 5ccb8 <== NOT EXECUTED 4d290: 4eb9 0004 a508 jsr 4a508 <__assert_func> <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4d296: 323b 2a08 movew %pc@(4d2a0 ,%d2:l:2),%d1 4d29a: 48c1 extl %d1 4d29c: 4efb 1802 jmp %pc@(4d2a0 ,%d1:l) 4d2a0: ffda 0177732 <== NOT EXECUTED 4d2a2: 0144 bchg %d0,%d4 <== NOT EXECUTED 4d2a4: 00fc 0374 <== NOT EXECUTED 4d2a6: 0010 020 <== NOT EXECUTED 4d2a8: 0010 020 <== NOT EXECUTED 4d2aa: 006c 0154 <== NOT EXECUTED 4d2ac: 005a 0132 <== NOT EXECUTED 4d2ae: 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; 4d2b4: 2040 moveal %d0,%a0 4d2b6: 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; 4d2ba: 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; 4d2bc: 206a 0010 moveal %a2@(16),%a0 4d2c0: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d2c4: 2228 0004 movel %a0@(4),%d1 4d2c8: 5281 addql #1,%d1 4d2ca: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d2ce: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d2d0: 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; 4d2d4: 2348 0008 movel %a0,%a1@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4d2d8: 2f00 movel %d0,%sp@- 4d2da: 4868 004c pea %a0@(76) 4d2de: 2d40 fffc movel %d0,%fp@(-4) 4d2e2: 4eb9 0004 6798 jsr 46798 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d2e8: 202e fffc movel %fp@(-4),%d0 4d2ec: 508f addql #8,%sp } 4d2ee: 242e fff4 movel %fp@(-12),%d2 4d2f2: 246e fff8 moveal %fp@(-8),%a2 4d2f6: 4e5e unlk %fp 4d2f8: 4e75 rts node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4d2fa: 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; 4d2fc: 4281 clrl %d1 <== NOT EXECUTED 4d2fe: 4282 clrl %d2 <== NOT EXECUTED node->info.linearfile.direct = 0; 4d300: 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; 4d304: 2141 004c movel %d1,%a0@(76) <== NOT EXECUTED 4d308: 2142 0050 movel %d2,%a0@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4d30c: 2040 moveal %d0,%a0 node->info.file.indirect = 0; 4d30e: 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; 4d310: 4281 clrl %d1 4d312: 4282 clrl %d2 node->info.file.indirect = 0; 4d314: 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; 4d318: 2141 004c movel %d1,%a0@(76) 4d31c: 2142 0050 movel %d2,%a0@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4d320: 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; 4d324: 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; 4d326: 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; 4d32a: 206a 0010 moveal %a2@(16),%a0 4d32e: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d332: 2228 0004 movel %a0@(4),%d1 4d336: 5281 addql #1,%d1 4d338: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d33c: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d33e: 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; 4d342: 2348 0008 movel %a0,%a1@(8) 4d346: 2f00 movel %d0,%sp@- 4d348: 4868 004c pea %a0@(76) 4d34c: 2d40 fffc movel %d0,%fp@(-4) 4d350: 4eb9 0004 6798 jsr 46798 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d356: 202e fffc movel %fp@(-4),%d0 4d35a: 508f addql #8,%sp 4d35c: 6090 bras 4d2ee node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; case IMFS_FIFO: node->info.fifo.pipe = NULL; 4d35e: 2240 moveal %d0,%a1 4d360: 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; 4d364: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d368: 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; 4d36a: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d36e: 2228 0004 movel %a0@(4),%d1 4d372: 5281 addql #1,%d1 4d374: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d378: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d37a: 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; 4d37e: 2348 0008 movel %a0,%a1@(8) 4d382: 2f00 movel %d0,%sp@- 4d384: 4868 004c pea %a0@(76) 4d388: 2d40 fffc movel %d0,%fp@(-4) 4d38c: 4eb9 0004 6798 jsr 46798 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d392: 202e fffc movel %fp@(-4),%d0 4d396: 508f addql #8,%sp 4d398: 6000 ff54 braw 4d2ee case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4d39c: 226e 0018 moveal %fp@(24),%a1 4d3a0: 2040 moveal %d0,%a0 4d3a2: 2151 004c movel %a1@,%a0@(76) node->info.device.minor = info->device.minor; 4d3a6: 5889 addql #4,%a1 4d3a8: 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; 4d3ac: 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; 4d3ae: 206a 0010 moveal %a2@(16),%a0 4d3b2: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d3b6: 2228 0004 movel %a0@(4),%d1 4d3ba: 5281 addql #1,%d1 4d3bc: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d3c0: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d3c2: 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; 4d3c6: 2348 0008 movel %a0,%a1@(8) 4d3ca: 2f00 movel %d0,%sp@- 4d3cc: 4868 004c pea %a0@(76) 4d3d0: 2d40 fffc movel %d0,%fp@(-4) 4d3d4: 4eb9 0004 6798 jsr 46798 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d3da: 202e fffc movel %fp@(-4),%d0 4d3de: 508f addql #8,%sp 4d3e0: 6000 ff0c braw 4d2ee */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4d3e4: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4d3e6: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4d3e8: 43e9 0050 lea %a1@(80),%a1 4d3ec: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4d3f0: 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; 4d3f2: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4d3f6: 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; 4d3fa: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d3fe: 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; 4d400: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d404: 2228 0004 movel %a0@(4),%d1 4d408: 5281 addql #1,%d1 4d40a: 2141 0004 movel %d1,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d40e: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d410: 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; 4d414: 2348 0008 movel %a0,%a1@(8) 4d418: 2f00 movel %d0,%sp@- 4d41a: 4868 004c pea %a0@(76) 4d41e: 2d40 fffc movel %d0,%fp@(-4) 4d422: 4eb9 0004 6798 jsr 46798 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d428: 202e fffc movel %fp@(-4),%d0 4d42c: 508f addql #8,%sp 4d42e: 6000 febe braw 4d2ee ... =============================================================================== 0004d1f2 : IMFS_jnode_t *IMFS_create_root_node(void) { 4d1f2: 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) ); 4d1f6: 4878 41ed pea 41ed 4d1fa: 4879 0005 c67e pea 5c67e 4d200: 4878 0001 pea 1 4d204: 4eb9 0004 d174 jsr 4d174 if ( !node ) 4d20a: 4fef 000c lea %sp@(12),%sp 4d20e: 4a80 tstl %d0 4d210: 6716 beqs 4d228 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4d212: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4d214: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4d216: 43e9 0050 lea %a1@(80),%a1 4d21a: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4d21e: 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; 4d220: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4d224: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4d228: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004460e : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 4460e: 4e56 ffe0 linkw %fp,#-32 44612: 206e 0008 moveal %fp@(8),%a0 44616: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4461a: 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 ); 4461e: 4a88 tstl %a0 44620: 6700 008c beqw 446ae assert( level >= 0 ); 44624: 4a83 tstl %d3 44626: 6d00 00be bltw 446e6 assert( the_directory->type == IMFS_DIRECTORY ); 4462a: 7001 moveq #1,%d0 4462c: b0a8 0048 cmpl %a0@(72),%d0 44630: 6600 0098 bnew 446ca */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 44634: 2808 movel %a0,%d4 44636: 0684 0000 0050 addil #80,%d4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 4463c: 2668 004c moveal %a0@(76),%a3 44640: b88b cmpl %a3,%d4 44642: 6750 beqs 44694 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 ); 44644: 2a03 movel %d3,%d5 44646: 45f9 0005 5198 lea 55198 ,%a2 4464c: 49f9 0004 43f6 lea 443f6 ,%a4 44652: 5285 addql #1,%d5 44654: 4bf9 0004 460e lea 4460e ,%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; 4465a: 4282 clrl %d2 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 4465c: 2079 0006 5560 moveal 65560 <_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++ ) 44662: 5282 addql #1,%d2 fprintf(stdout, "...." ); 44664: 2f28 0008 movel %a0@(8),%sp@- 44668: 4878 0004 pea 4 4466c: 4878 0001 pea 1 44670: 4879 0006 3a7b pea 63a7b 44676: 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++ ) 44678: 4fef 0010 lea %sp@(16),%sp 4467c: b483 cmpl %d3,%d2 4467e: 6fdc bles 4465c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 44680: 2f0b movel %a3,%sp@- 44682: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 44684: 588f addql #4,%sp 44686: 7001 moveq #1,%d0 44688: b0ab 0048 cmpl %a3@(72),%d0 4468c: 6710 beqs 4469e 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 ) { 4468e: 2653 moveal %a3@,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 44690: b88b cmpl %a3,%d4 44692: 66c6 bnes 4465a fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 44694: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4469a: 4e5e unlk %fp 4469c: 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 ); 4469e: 2f05 movel %d5,%sp@- 446a0: 2f0b movel %a3,%sp@- 446a2: 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 ) { 446a4: 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 ); 446a6: 508f addql #8,%sp assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 446a8: b88b cmpl %a3,%d4 446aa: 66ae bnes 4465a 446ac: 60e6 bras 44694 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 446ae: 4879 0006 3a3c pea 63a3c <== NOT EXECUTED 446b4: 4879 0006 3b0a pea 63b0a <__FUNCTION__.6604> <== NOT EXECUTED 446ba: 4878 0084 pea 84 <== NOT EXECUTED 446be: 4879 0006 3990 pea 63990 <== NOT EXECUTED 446c4: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 446ca: 4879 0006 3a55 pea 63a55 <== NOT EXECUTED 446d0: 4879 0006 3b0a pea 63b0a <__FUNCTION__.6604> <== NOT EXECUTED 446d6: 4878 0088 pea 88 <== NOT EXECUTED 446da: 4879 0006 3990 pea 63990 <== NOT EXECUTED 446e0: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 446e6: 4879 0006 3a4a pea 63a4a <== NOT EXECUTED 446ec: 4879 0006 3b0a pea 63b0a <__FUNCTION__.6604> <== NOT EXECUTED 446f2: 4878 0086 pea 86 <== NOT EXECUTED 446f6: 4879 0006 3990 pea 63990 <== NOT EXECUTED 446fc: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED =============================================================================== 000496e2 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 496e2: 4e56 ffb0 linkw %fp,#-80 496e6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 496ea: 286e 0014 moveal %fp@(20),%a4 496ee: 2c0e movel %fp,%d6 496f0: 280e movel %fp,%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 496f2: 4282 clrl %d2 496f4: 5986 subql #4,%d6 496f6: 0684 ffff ffdb addil #-37,%d4 496fc: 2a3c 0004 9fd4 movel #303060,%d5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49702: 2e3c 0004 9f2c movel #302892,%d7 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 49708: 2a6e 0008 moveal %fp@(8),%a5 4970c: 246e 000c moveal %fp@(12),%a2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 49710: 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 ); 49712: 2f06 movel %d6,%sp@- 49714: 2045 moveal %d5,%a0 49716: 2f04 movel %d4,%sp@- 49718: 2f0a movel %a2,%sp@- 4971a: 4875 2800 pea %a5@(00000000,%d2:l) 4971e: 4e90 jsr %a0@ pathnamelen -= len; i += len; if ( !pathloc->node_access ) 49720: 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 ); 49722: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 49724: 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; 49728: 202e fffc movel %fp@(-4),%d0 i += len; if ( !pathloc->node_access ) 4972c: 4a88 tstl %a0 4972e: 6700 00f8 beqw 49828 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 49732: 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; 49734: 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 ) 49736: 4a83 tstl %d3 49738: 6662 bnes 4979c * 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 ) { 4973a: 7201 moveq #1,%d1 4973c: b2a8 0048 cmpl %a0@(72),%d1 49740: 6600 0132 bnew 49874 if ( node->info.directory.mt_fs != NULL ) { 49744: 2068 0058 moveal %a0@(88),%a0 49748: 4a88 tstl %a0 4974a: 6700 0128 beqw 49874 newloc = node->info.directory.mt_fs->mt_fs_root; 4974e: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 49752: 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; 49758: 2628 0024 movel %a0@(36),%d3 4975c: 2228 0020 movel %a0@(32),%d1 49760: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 49764: 2f0c movel %a4,%sp@- 49766: 206e fffc moveal %fp@(-4),%a0 4976a: 9488 subl %a0,%d2 4976c: 2f2e 0010 movel %fp@(16),%sp@- 49770: 4872 8800 pea %a2@(00000000,%a0:l) 49774: 4875 2800 pea %a5@(00000000,%d2:l) 49778: 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; 4977a: 2943 0008 movel %d3,%a4@(8) 4977e: 2941 0004 movel %d1,%a4@(4) 49782: 2880 movel %d0,%a4@ 49784: 2949 000c movel %a1,%a4@(12) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 49788: 4e90 jsr %a0@ 4978a: 4fef 0010 lea %sp@(16),%sp 4978e: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49790: 2003 movel %d3,%d0 49792: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49798: 4e5e unlk %fp 4979a: 4e75 rts /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4979c: 7001 moveq #1,%d0 4979e: b0ab 0048 cmpl %a3@(72),%d0 497a2: 6700 00b8 beqw 4985c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 497a6: 2648 moveal %a0,%a3 switch( type ) { 497a8: 7003 moveq #3,%d0 497aa: b083 cmpl %d3,%d0 497ac: 671c beqs 497ca 497ae: 7204 moveq #4,%d1 497b0: b283 cmpl %d3,%d1 497b2: 6700 008e beqw 49842 497b6: 103c 0002 moveb #2,%d0 497ba: b083 cmpl %d3,%d0 497bc: 6748 beqs 49806 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 497be: 7004 moveq #4,%d0 497c0: b083 cmpl %d3,%d0 497c2: 6600 ff4e bnew 49712 497c6: 6000 ff72 braw 4973a <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 497ca: 2028 0048 movel %a0@(72),%d0 497ce: 7203 moveq #3,%d1 497d0: b280 cmpl %d0,%d1 497d2: 6700 00d8 beqw 498ac node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 497d6: 7204 moveq #4,%d1 497d8: b280 cmpl %d0,%d1 497da: 6700 00ea beqw 498c6 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 497de: 7201 moveq #1,%d1 497e0: b280 cmpl %d0,%d1 497e2: 6600 0104 bnew 498e8 /* * 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 ) { 497e6: 206b 0058 moveal %a3@(88),%a0 497ea: 4a88 tstl %a0 497ec: 6600 ff60 bnew 4974e /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 497f0: 2f04 movel %d4,%sp@- 497f2: 2047 moveal %d7,%a0 497f4: 2f0b movel %a3,%sp@- 497f6: 4e90 jsr %a0@ if ( !node ) 497f8: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 497fa: 2640 moveal %d0,%a3 if ( !node ) 497fc: 4a80 tstl %d0 497fe: 6728 beqs 49828 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 49800: 288b movel %a3,%a4@ break; 49802: 6000 ff0e braw 49712 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 49806: 2279 0005 d824 moveal 5d824 ,%a1 4980c: b1e9 0018 cmpal %a1@(24),%a0 49810: 6700 ff00 beqw 49712 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 49814: 226c 0010 moveal %a4@(16),%a1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 49818: b1e9 001c cmpal %a1@(28),%a0 4981c: 6700 00e4 beqw 49902 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 49820: 2668 0008 moveal %a0@(8),%a3 49824: 4a8b tstl %a3 49826: 66d8 bnes 49800 * 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 ); 49828: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 4982e: 76ff moveq #-1,%d3 49830: 7c02 moveq #2,%d6 49832: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49834: 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 ); 49836: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49838: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4983e: 4e5e unlk %fp 49840: 4e75 rts case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49842: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 49848: 76ff moveq #-1,%d3 4984a: 7a5b moveq #91,%d5 4984c: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4984e: 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 ); 49850: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49852: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49858: 4e5e unlk %fp 4985a: 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 ) ) 4985c: 4878 0001 pea 1 49860: 2f0c movel %a4,%sp@- 49862: 4eb9 0004 94ea jsr 494ea 49868: 508f addql #8,%sp 4986a: 4a80 tstl %d0 4986c: 6724 beqs 49892 4986e: 2054 moveal %a4@,%a0 49870: 6000 ff34 braw 497a6 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 49874: 2f0c movel %a4,%sp@- 49876: 4eb9 0004 945c jsr 4945c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4987c: 2eae 0010 movel %fp@(16),%sp@ flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 49880: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 49882: 2f0c movel %a4,%sp@- 49884: 4eb9 0004 94ea jsr 494ea 4988a: 508f addql #8,%sp 4988c: 4a80 tstl %d0 4988e: 6600 ff00 bnew 49790 rtems_set_errno_and_return_minus_one( EACCES ); 49892: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 49898: 76ff moveq #-1,%d3 4989a: 780d moveq #13,%d4 4989c: 2040 moveal %d0,%a0 return result; } 4989e: 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 ); 498a0: 2084 movel %d4,%a0@ return result; } 498a2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 498a8: 4e5e unlk %fp 498aa: 4e75 rts * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 498ac: 42a7 clrl %sp@- 498ae: 2f0c movel %a4,%sp@- 498b0: 4eb9 0004 9576 jsr 49576 node = pathloc->node_access; 498b6: 2654 moveal %a4@,%a3 if ( !node ) 498b8: 508f addql #8,%sp 498ba: 4a8b tstl %a3 498bc: 672a beqs 498e8 <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 498be: 202b 0048 movel %a3@(72),%d0 498c2: 6000 ff1a braw 497de if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 498c6: 42a7 clrl %sp@- 498c8: 2f0c movel %a4,%sp@- 498ca: 4eb9 0004 95d6 jsr 495d6 node = pathloc->node_access; 498d0: 2654 moveal %a4@,%a3 if ( result == -1 ) 498d2: 508f addql #8,%sp 498d4: 72ff moveq #-1,%d1 498d6: b280 cmpl %d0,%d1 498d8: 66e4 bnes 498be <== ALWAYS TAKEN 498da: 2600 movel %d0,%d3 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 498dc: 2003 movel %d3,%d0 <== NOT EXECUTED 498de: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED 498e4: 4e5e unlk %fp <== NOT EXECUTED 498e6: 4e75 rts <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 498e8: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 498ee: 76ff moveq #-1,%d3 498f0: 7e14 moveq #20,%d7 498f2: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 498f4: 2003 movel %d3,%d0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 498f6: 2087 movel %d7,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 498f8: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 498fe: 4e5e unlk %fp 49900: 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; 49902: 2069 0014 moveal %a1@(20),%a0 *pathloc = newloc; 49906: 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; 4990c: 2829 0010 movel %a1@(16),%d4 49910: 2629 000c movel %a1@(12),%d3 49914: 2229 0008 movel %a1@(8),%d1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 49918: 2f0c movel %a4,%sp@- 4991a: 226e fffc moveal %fp@(-4),%a1 4991e: 9489 subl %a1,%d2 49920: 2f2e 0010 movel %fp@(16),%sp@- 49924: 4872 9800 pea %a2@(00000000,%a1:l) 49928: 4875 2800 pea %a5@(00000000,%d2:l) 4992c: 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; 4992e: 2943 0004 movel %d3,%a4@(4) 49932: 2948 000c movel %a0,%a4@(12) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 49936: 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; 49938: 2944 0008 movel %d4,%a4@(8) 4993c: 2881 movel %d1,%a4@ return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4993e: 4e90 jsr %a0@ 49940: 4fef 0010 lea %sp@(16),%sp 49944: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49946: 2003 movel %d3,%d0 49948: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4994e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049a0c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 49a0c: 4e56 ffb0 linkw %fp,#-80 49a10: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49a14: 286e 0008 moveal %fp@(8),%a4 49a18: 2e0e movel %fp,%d7 49a1a: 2c0e movel %fp,%d6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 49a1c: 4284 clrl %d4 49a1e: 5987 subql #4,%d7 49a20: 0686 ffff ffdb addil #-37,%d6 49a26: 4bf9 0004 9fd4 lea 49fd4 ,%a5 49a2c: 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 */ ) { 49a2e: 266e 000c moveal %fp@(12),%a3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 49a32: 4eb9 0004 ffc0 jsr 4ffc0 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 49a38: 2453 moveal %a3@,%a2 /* * Get the path length. */ pathlen = strlen( path ); 49a3a: 588f addql #4,%sp 49a3c: 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 ); 49a3e: 2f07 movel %d7,%sp@- 49a40: 2f06 movel %d6,%sp@- 49a42: 2f02 movel %d2,%sp@- 49a44: 4874 4800 pea %a4@(00000000,%d4:l) 49a48: 4e95 jsr %a5@ pathlen -= len; 49a4a: 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 ); 49a4e: 2600 movel %d0,%d3 pathlen -= len; i += len; if ( !pathloc->node_access ) 49a50: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 49a54: 9485 subl %d5,%d2 i += len; if ( !pathloc->node_access ) 49a56: 2053 moveal %a3@,%a0 49a58: 4a88 tstl %a0 49a5a: 6700 00ca beqw 49b26 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 49a5e: 4a80 tstl %d0 49a60: 6742 beqs 49aa4 <== NEVER TAKEN if ( node->type == IMFS_DIRECTORY ) 49a62: 7001 moveq #1,%d0 49a64: b0aa 0048 cmpl %a2@(72),%d0 49a68: 6700 00d6 beqw 49b40 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 49a6c: 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; 49a6e: 2448 moveal %a0,%a2 switch( type ) { 49a70: 7002 moveq #2,%d0 49a72: b083 cmpl %d3,%d0 49a74: 6700 008e beqw 49b04 49a78: 6426 bccs 49aa0 49a7a: 7203 moveq #3,%d1 49a7c: b283 cmpl %d3,%d1 49a7e: 673e beqs 49abe 49a80: 7004 moveq #4,%d0 49a82: b083 cmpl %d3,%d0 49a84: 66b8 bnes 49a3e <== 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 ); 49a86: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 49a8c: 7c5b moveq #91,%d6 49a8e: 76ff moveq #-1,%d3 49a90: 2040 moveal %d0,%a0 49a92: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49a94: 2003 movel %d3,%d0 49a96: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49a9c: 4e5e unlk %fp 49a9e: 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 ) { 49aa0: 4a83 tstl %d3 49aa2: 669a bnes 49a3e <== ALWAYS TAKEN pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49aa4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 49aaa: 76ff moveq #-1,%d3 49aac: 7e11 moveq #17,%d7 49aae: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49ab0: 2003 movel %d3,%d0 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49ab2: 2087 movel %d7,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49ab4: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49aba: 4e5e unlk %fp 49abc: 4e75 rts pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 49abe: 2028 0048 movel %a0@(72),%d0 49ac2: 7203 moveq #3,%d1 49ac4: b280 cmpl %d0,%d1 49ac6: 6700 0100 beqw 49bc8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 49aca: 7204 moveq #4,%d1 49acc: b280 cmpl %d0,%d1 49ace: 6700 00f8 beqw 49bc8 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 49ad2: 4a8a tstl %a2 49ad4: 6700 010e beqw 49be4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 49ad8: 7001 moveq #1,%d0 49ada: b0aa 0048 cmpl %a2@(72),%d0 49ade: 6600 0104 bnew 49be4 /* * 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 ) { 49ae2: 206a 0058 moveal %a2@(88),%a0 49ae6: 4a88 tstl %a0 49ae8: 6600 0114 bnew 49bfe /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49aec: 2f06 movel %d6,%sp@- 49aee: 2f0a movel %a2,%sp@- 49af0: 4eb9 0004 9f2c jsr 49f2c /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 49af6: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49af8: 2440 moveal %d0,%a2 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 49afa: 4a80 tstl %d0 49afc: 675a beqs 49b58 done = true; else pathloc->node_access = node; 49afe: 268a movel %a2,%a3@ 49b00: 6000 ff3c braw 49a3e case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 49b04: 2279 0005 d824 moveal 5d824 ,%a1 49b0a: b1e9 0018 cmpal %a1@(24),%a0 49b0e: 6700 ff2e beqw 49a3e /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 49b12: 226b 0010 moveal %a3@(16),%a1 49b16: b1e9 001c cmpal %a1@(28),%a0 49b1a: 6700 012c beqw 49c48 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 49b1e: 2468 0008 moveal %a0@(8),%a2 49b22: 4a8a tstl %a2 49b24: 66d8 bnes 49afe * 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 ); 49b26: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 49b2c: 76ff moveq #-1,%d3 49b2e: 7a02 moveq #2,%d5 49b30: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49b32: 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 ); 49b34: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49b36: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49b3c: 4e5e unlk %fp 49b3e: 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 ) ) 49b40: 4878 0001 pea 1 49b44: 2f0b movel %a3,%sp@- 49b46: 4eb9 0004 94ea jsr 494ea 49b4c: 508f addql #8,%sp 49b4e: 4a80 tstl %d0 49b50: 675c beqs 49bae 49b52: 2053 moveal %a3@,%a0 49b54: 6000 ff16 braw 49a6c case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 49b58: 2004 movel %d4,%d0 49b5a: 90ae fffc subl %fp@(-4),%d0 49b5e: d08c addl %a4,%d0 49b60: 206e 0010 moveal %fp@(16),%a0 49b64: 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++) { 49b66: 1034 4800 moveb %a4@(00000000,%d4:l),%d0 49b6a: 6718 beqs 49b84 49b6c: 41f4 4801 lea %a4@(00000001,%d4:l),%a0 if ( !IMFS_is_separator( path[ i ] ) ) 49b70: 49c0 extbl %d0 49b72: 722f moveq #47,%d1 49b74: b280 cmpl %d0,%d1 49b76: 6708 beqs 49b80 49b78: 123c 005c moveb #92,%d1 49b7c: b280 cmpl %d0,%d1 49b7e: 66a6 bnes 49b26 /* * 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++) { 49b80: 1018 moveb %a0@+,%d0 49b82: 66ec bnes 49b70 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49b84: 2f0b movel %a3,%sp@- 49b86: 4eb9 0004 945c jsr 4945c /* * The returned node must be a directory */ node = pathloc->node_access; 49b8c: 2053 moveal %a3@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49b8e: 2600 movel %d0,%d3 /* * The returned node must be a directory */ node = pathloc->node_access; 49b90: 588f addql #4,%sp 49b92: 7001 moveq #1,%d0 49b94: b0a8 0048 cmpl %a0@(72),%d0 49b98: 664a bnes 49be4 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 49b9a: 4878 0003 pea 3 49b9e: 2f0b movel %a3,%sp@- 49ba0: 4eb9 0004 94ea jsr 494ea 49ba6: 508f addql #8,%sp 49ba8: 4a80 tstl %d0 49baa: 6600 fee8 bnew 49a94 rtems_set_errno_and_return_minus_one( EACCES ); 49bae: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 49bb4: 76ff moveq #-1,%d3 49bb6: 740d moveq #13,%d2 49bb8: 2040 moveal %d0,%a0 return result; } 49bba: 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 ); 49bbc: 2082 movel %d2,%a0@ return result; } 49bbe: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49bc4: 4e5e unlk %fp 49bc6: 4e75 rts if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49bc8: 42a7 clrl %sp@- 49bca: 2f0b movel %a3,%sp@- 49bcc: 4eb9 0004 9952 jsr 49952 if ( result == -1 ) 49bd2: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49bd4: 2600 movel %d0,%d3 if ( result == -1 ) 49bd6: 70ff moveq #-1,%d0 49bd8: b083 cmpl %d3,%d0 49bda: 6700 feb8 beqw 49a94 49bde: 2453 moveal %a3@,%a2 49be0: 6000 fef0 braw 49ad2 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 49be4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 49bea: 76ff moveq #-1,%d3 49bec: 7814 moveq #20,%d4 49bee: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49bf0: 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 ); 49bf2: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49bf4: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49bfa: 4e5e unlk %fp 49bfc: 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 ); 49bfe: 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; 49c02: 2428 0024 movel %a0@(36),%d2 49c06: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 49c0a: 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; 49c10: 2228 0020 movel %a0@(32),%d1 49c14: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c18: 2f2e 0010 movel %fp@(16),%sp@- 49c1c: 2f0b movel %a3,%sp@- 49c1e: 4874 4800 pea %a4@(00000000,%d4:l) 49c22: 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; 49c26: 2742 0008 movel %d2,%a3@(8) 49c2a: 2741 0004 movel %d1,%a3@(4) 49c2e: 2680 movel %d0,%a3@ 49c30: 2749 000c movel %a1,%a3@(12) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c34: 4e90 jsr %a0@ 49c36: 4fef 000c lea %sp@(12),%sp 49c3a: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49c3c: 2003 movel %d3,%d0 49c3e: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49c44: 4e5e unlk %fp 49c46: 4e75 rts break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c48: 98ae fffc subl %fp@(-4),%d4 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 49c4c: 2069 0014 moveal %a1@(20),%a0 49c50: 2629 0010 movel %a1@(16),%d3 49c54: 2429 000c movel %a1@(12),%d2 *pathloc = newloc; 49c58: 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; 49c5e: 2229 0008 movel %a1@(8),%d1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c62: 2f2e 0010 movel %fp@(16),%sp@- 49c66: 2f0b movel %a3,%sp@- 49c68: 4874 4800 pea %a4@(00000000,%d4:l) 49c6c: 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; 49c70: 2743 0008 movel %d3,%a3@(8) 49c74: 2748 000c movel %a0,%a3@(12) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c78: 2040 moveal %d0,%a0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 49c7a: 2742 0004 movel %d2,%a3@(4) 49c7e: 2681 movel %d1,%a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c80: 4e90 jsr %a0@ 49c82: 4fef 000c lea %sp@(12),%sp 49c86: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49c88: 2003 movel %d3,%d0 49c8a: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49c90: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049576 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 49576: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 49578: 4e56 0000 linkw %fp,#0 4957c: 2f0a movel %a2,%sp@- 4957e: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 49582: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 49584: b0a8 0048 cmpl %a0@(72),%d0 49588: 6640 bnes 495ca <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 4958a: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 4958e: 2f0a movel %a2,%sp@- 49590: 4eb9 0004 945c jsr 4945c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 49596: 2f2e 000c movel %fp@(12),%sp@- 4959a: 2f0a movel %a2,%sp@- 4959c: 4eb9 0004 94ea jsr 494ea 495a2: 4fef 000c lea %sp@(12),%sp 495a6: 4a80 tstl %d0 495a8: 670a beqs 495b4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 495aa: 246e fffc moveal %fp@(-4),%a2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 495ae: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 495b0: 4e5e unlk %fp 495b2: 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 ); 495b4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED return result; } 495ba: 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 ); 495be: 2040 moveal %d0,%a0 <== NOT EXECUTED 495c0: 720d moveq #13,%d1 <== NOT EXECUTED 495c2: 70ff moveq #-1,%d0 <== NOT EXECUTED return result; } 495c4: 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 ); 495c6: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 495c8: 4e75 rts <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 495ca: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 495d0: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED =============================================================================== 00049952 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 49952: 4e56 ffec linkw %fp,#-20 49956: 2079 0005 d824 moveal 5d824 ,%a0 4995c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 49960: 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 ); 49964: 4bf9 0004 95d6 lea 495d6 ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4996a: 49f9 0004 9576 lea 49576 ,%a4 int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 49970: 242e 000c movel %fp@(12),%d2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 49974: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 49976: 3028 0030 movew %a0@(48),%d0 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4997a: 2453 moveal %a3@,%a2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4997c: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4997e: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 49980: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 49984: 7005 moveq #5,%d0 49986: b081 cmpl %d1,%d0 49988: 6564 bcss 499ee /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4998a: 202a 0048 movel %a2@(72),%d0 4998e: 7203 moveq #3,%d1 49990: b280 cmpl %d0,%d1 49992: 6740 beqs 499d4 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 49994: 7204 moveq #4,%d1 49996: b280 cmpl %d0,%d1 49998: 671a beqs 499b4 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4999a: 5780 subql #3,%d0 4999c: 7201 moveq #1,%d1 4999e: b280 cmpl %d0,%d1 499a0: 64d2 bccs 49974 <== NEVER TAKEN 499a2: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 499a4: 4241 clrw %d1 499a6: 3141 0030 movew %d1,%a0@(48) return result; } 499aa: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 499b0: 4e5e unlk %fp 499b2: 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 ); 499b4: 2f02 movel %d2,%sp@- 499b6: 2f0b movel %a3,%sp@- 499b8: 4e95 jsr %a5@ 499ba: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 499bc: 4a80 tstl %d0 499be: 6620 bnes 499e0 499c0: 202a 0048 movel %a2@(72),%d0 499c4: 7201 moveq #1,%d1 499c6: 5780 subql #3,%d0 499c8: 2079 0005 d824 moveal 5d824 ,%a0 499ce: b280 cmpl %d0,%d1 499d0: 64a2 bccs 49974 <== ALWAYS TAKEN 499d2: 60ce bras 499a2 <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 499d4: 2f02 movel %d2,%sp@- 499d6: 2f0b movel %a3,%sp@- 499d8: 4e94 jsr %a4@ 499da: 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 ) ) ); 499dc: 4a80 tstl %d0 499de: 67e0 beqs 499c0 <== ALWAYS TAKEN 499e0: 2079 0005 d824 moveal 5d824 ,%a0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 499e6: 4241 clrw %d1 499e8: 3141 0030 movew %d1,%a0@(48) 499ec: 60bc bras 499aa * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 499ee: 4241 clrw %d1 499f0: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 499f4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 499fa: 725c moveq #92,%d1 499fc: 2040 moveal %d0,%a0 499fe: 70ff moveq #-1,%d0 */ rtems_filesystem_link_counts = 0; return result; } 49a00: 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 ); 49a06: 2081 movel %d1,%a0@ */ rtems_filesystem_link_counts = 0; return result; } 49a08: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000494ea : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 494ea: 4e56 fff4 linkw %fp,#-12 494ee: 206e 0008 moveal %fp@(8),%a0 494f2: 48d7 040c moveml %d2-%d3/%a2,%sp@ if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 494f6: 2450 moveal %a0@,%a2 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 494f8: 262e 000c movel %fp@(12),%d3 } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 494fc: 4eb9 0004 a880 jsr 4a880 49502: 3400 movew %d0,%d2 st_gid = getegid(); 49504: 4eb9 0004 a86c jsr 4a86c * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 4950a: 4281 clrl %d1 4950c: 0282 0000 ffff andil #65535,%d2 49512: 322a 0038 movew %a2@(56),%d1 49516: b282 cmpl %d2,%d1 49518: 6742 beqs 4955c flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 4951a: 4281 clrl %d1 4951c: 0280 0000 ffff andil #65535,%d0 49522: 322a 003a movew %a2@(58),%d1 49526: b280 cmpl %d0,%d1 49528: 6718 beqs 49542 <== ALWAYS TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4952a: 2003 movel %d3,%d0 <== NOT EXECUTED 4952c: c0aa 002e andl %a2@(46),%d0 <== NOT EXECUTED 49530: b083 cmpl %d3,%d0 <== NOT EXECUTED 49532: 57c0 seq %d0 <== NOT EXECUTED return 1; return 0; } 49534: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4953a: 4e5e unlk %fp <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4953c: 49c0 extbl %d0 <== NOT EXECUTED return 1; return 0; } 4953e: 4480 negl %d0 <== NOT EXECUTED 49540: 4e75 rts <== NOT EXECUTED flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 49542: e78b lsll #3,%d3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 49544: 2003 movel %d3,%d0 49546: c0aa 002e andl %a2@(46),%d0 4954a: b083 cmpl %d3,%d0 4954c: 57c0 seq %d0 return 1; return 0; } 4954e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49554: 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 ) 49556: 49c0 extbl %d0 return 1; return 0; } 49558: 4480 negl %d0 4955a: 4e75 rts */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4955c: ed8b lsll #6,%d3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4955e: 2003 movel %d3,%d0 49560: c0aa 002e andl %a2@(46),%d0 49564: b083 cmpl %d3,%d0 49566: 57c0 seq %d0 return 1; return 0; } 49568: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4956e: 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 ) 49570: 49c0 extbl %d0 return 1; return 0; } 49572: 4480 negl %d0 <== NOT EXECUTED =============================================================================== 000495d6 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 495d6: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 495d8: 4e56 fff0 linkw %fp,#-16 495dc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 495e0: 246e 0008 moveal %fp@(8),%a2 495e4: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 495e8: 2252 moveal %a2@,%a1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 495ea: b0a9 0048 cmpl %a1@(72),%d0 495ee: 6600 00e6 bnew 496d6 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 495f2: 2029 0008 movel %a1@(8),%d0 495f6: 6700 00d2 beqw 496ca /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 495fa: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 495fc: 2069 004c moveal %a1@(76),%a0 49600: 762f moveq #47,%d3 49602: 1210 moveb %a0@,%d1 49604: 1001 moveb %d1,%d0 49606: 49c0 extbl %d0 49608: b680 cmpl %d0,%d3 4960a: 670c beqs 49618 4960c: 163c 005c moveb #92,%d3 49610: b680 cmpl %d0,%d3 49612: 6704 beqs 49618 <== NEVER TAKEN 49614: 4a01 tstb %d1 49616: 6662 bnes 4967a <== ALWAYS TAKEN 49618: 2679 0005 d824 moveal 5d824 ,%a3 4961e: 204a moveal %a2,%a0 49620: 7601 moveq #1,%d3 49622: 20eb 0018 movel %a3@(24),%a0@+ 49626: 20eb 001c movel %a3@(28),%a0@+ 4962a: 20eb 0020 movel %a3@(32),%a0@+ 4962e: 20eb 0024 movel %a3@(36),%a0@+ 49632: 20ab 0028 movel %a3@(40),%a0@ 49636: 2069 004c moveal %a1@(76),%a0 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 4963a: d688 addl %a0,%d3 4963c: 2f03 movel %d3,%sp@- 4963e: 4eb9 0004 ffc0 jsr 4ffc0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 49644: 2e8a movel %a2,%sp@ 49646: 2f02 movel %d2,%sp@- 49648: 2f00 movel %d0,%sp@- 4964a: 2f03 movel %d3,%sp@- 4964c: 4eb9 0004 96e2 jsr 496e2 49652: 2600 movel %d0,%d3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 49654: 2f0a movel %a2,%sp@- 49656: 4eb9 0004 945c jsr 4945c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4965c: 2f02 movel %d2,%sp@- 4965e: 2f0a movel %a2,%sp@- 49660: 4eb9 0004 94ea jsr 494ea 49666: 4fef 001c lea %sp@(28),%sp 4966a: 4a80 tstl %d0 4966c: 6742 beqs 496b0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4966e: 2003 movel %d3,%d0 49670: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 49676: 4e5e unlk %fp 49678: 4e75 rts * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 4967a: 4203 clrb %d3 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 4967c: d688 addl %a0,%d3 4967e: 2f03 movel %d3,%sp@- 49680: 4eb9 0004 ffc0 jsr 4ffc0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 49686: 2e8a movel %a2,%sp@ 49688: 2f02 movel %d2,%sp@- 4968a: 2f00 movel %d0,%sp@- 4968c: 2f03 movel %d3,%sp@- 4968e: 4eb9 0004 96e2 jsr 496e2 49694: 2600 movel %d0,%d3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 49696: 2f0a movel %a2,%sp@- 49698: 4eb9 0004 945c jsr 4945c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4969e: 2f02 movel %d2,%sp@- 496a0: 2f0a movel %a2,%sp@- 496a2: 4eb9 0004 94ea jsr 494ea 496a8: 4fef 001c lea %sp@(28),%sp 496ac: 4a80 tstl %d0 496ae: 66be bnes 4966e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 496b0: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 496b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 496b8: 740d moveq #13,%d2 <== NOT EXECUTED 496ba: 2040 moveal %d0,%a0 <== NOT EXECUTED return result; } 496bc: 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 ); 496be: 2082 movel %d2,%a0@ <== NOT EXECUTED return result; } 496c0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 496c6: 4e5e unlk %fp <== NOT EXECUTED 496c8: 4e75 rts <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 496ca: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 496d0: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 496d6: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 496dc: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED =============================================================================== 0004d434 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4d434: 4e56 fff8 linkw %fp,#-8 4d438: 206e 0008 moveal %fp@(8),%a0 4d43c: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4d43e: 2450 moveal %a0@,%a2 int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4d440: 2f02 movel %d2,%sp@- * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4d442: 4282 clrl %d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4d444: 4eb9 0004 a880 jsr 4a880 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4d44a: 4281 clrl %d1 4d44c: 3400 movew %d0,%d2 4d44e: 322a 0038 movew %a2@(56),%d1 4d452: b282 cmpl %d2,%d1 4d454: 6704 beqs 4d45a <== ALWAYS TAKEN 4d456: 4a40 tstw %d0 <== NOT EXECUTED 4d458: 663c bnes 4d496 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4d45a: 222e 000c movel %fp@(12),%d1 4d45e: 202a 002e movel %a2@(46),%d0 4d462: 0281 0000 0fff andil #4095,%d1 4d468: 0280 ffff f000 andil #-4096,%d0 4d46e: 8280 orl %d0,%d1 4d470: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4d474: 42a7 clrl %sp@- 4d476: 486e fff8 pea %fp@(-8) 4d47a: 4eb9 0004 a894 jsr 4a894 4d480: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4d486: 508f addql #8,%sp */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 4d488: 4280 clrl %d0 return 0; } 4d48a: 242e fff0 movel %fp@(-16),%d2 4d48e: 246e fff4 moveal %fp@(-12),%a2 4d492: 4e5e unlk %fp 4d494: 4e75 rts */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4d496: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4d49c: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4d4a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d4a2: 7201 moveq #1,%d1 <== NOT EXECUTED 4d4a4: 70ff moveq #-1,%d0 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4d4a6: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4d4aa: 4e5e unlk %fp <== NOT EXECUTED */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4d4ac: 2081 movel %d1,%a0@ <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } =============================================================================== 00049e68 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 49e68: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49e6c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 49e70: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 49e74: 266a 0038 moveal %a2@(56),%a3 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 49e78: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49e7a: 486b 004c pea %a3@(76) <== NOT EXECUTED 49e7e: 4eb9 0004 cbc8 jsr 4cbc8 <== NOT EXECUTED if (! err) { 49e84: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 49e86: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 49e88: 670e beqs 49e98 <== 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); 49e8a: 6d40 blts 49ecc <== NOT EXECUTED } 49e8c: 2002 movel %d2,%d0 <== NOT EXECUTED 49e8e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49e94: 4e5e unlk %fp <== NOT EXECUTED 49e96: 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; 49e98: 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) 49e9e: 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; 49ea0: 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) 49ea4: 4eb9 0004 a96e jsr 4a96e <== NOT EXECUTED 49eaa: 588f addql #4,%sp <== NOT EXECUTED 49eac: 4a80 tstl %d0 <== NOT EXECUTED 49eae: 66dc bnes 49e8c <== NOT EXECUTED 49eb0: 4a6b 0032 tstw %a3@(50) <== NOT EXECUTED 49eb4: 66d6 bnes 49e8c <== NOT EXECUTED free(jnode); 49eb6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 49eb8: 4eb9 0004 a6f4 jsr 4a6f4 <== NOT EXECUTED 49ebe: 588f addql #4,%sp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 49ec0: 2002 movel %d2,%d0 <== NOT EXECUTED 49ec2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49ec8: 4e5e unlk %fp <== NOT EXECUTED 49eca: 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); 49ecc: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 49ed2: 4482 negl %d2 <== NOT EXECUTED 49ed4: 2040 moveal %d0,%a0 <== NOT EXECUTED 49ed6: 2082 movel %d2,%a0@ <== NOT EXECUTED 49ed8: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49eda: 2002 movel %d2,%d0 <== NOT EXECUTED 49edc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49ee2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049cf8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 49cf8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49cfc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49d00: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 49d04: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 49d08: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 49d0a: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 49d10: 6724 beqs 49d36 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 49d12: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49d14: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49d18: 2f09 movel %a1,%sp@- <== NOT EXECUTED 49d1a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49d1c: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49d20: 4eb9 0004 c762 jsr 4c762 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49d26: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49d2a: 4a80 tstl %d0 <== NOT EXECUTED 49d2c: 6d46 blts 49d74 <== NOT EXECUTED } 49d2e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d32: 4e5e unlk %fp <== NOT EXECUTED 49d34: 4e75 rts <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 49d36: 4a89 tstl %a1 <== NOT EXECUTED 49d38: 6724 beqs 49d5e <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 49d3a: 4a91 tstl %a1@ <== NOT EXECUTED 49d3c: 6710 beqs 49d4e <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 49d3e: 7201 moveq #1,%d1 <== NOT EXECUTED 49d40: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49d42: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d46: 4e5e unlk %fp <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 49d48: 83a8 0014 orl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49d4c: 4e75 rts <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49d4e: 72fe moveq #-2,%d1 <== NOT EXECUTED 49d50: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49d52: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d56: 4e5e unlk %fp <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49d58: c3a8 0014 andl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49d5c: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49d5e: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 49d64: 740e moveq #14,%d2 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49d66: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d68: 70ff moveq #-1,%d0 <== NOT EXECUTED 49d6a: 2082 movel %d2,%a0@ <== NOT EXECUTED } 49d6c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d70: 4e5e unlk %fp <== NOT EXECUTED 49d72: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49d74: 2400 movel %d0,%d2 <== NOT EXECUTED 49d76: 4482 negl %d2 <== NOT EXECUTED 49d78: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 49d7e: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d80: 70ff moveq #-1,%d0 <== NOT EXECUTED 49d82: 2082 movel %d2,%a0@ <== NOT EXECUTED 49d84: 60e6 bras 49d6c <== NOT EXECUTED =============================================================================== 00049c94 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 49c94: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49c98: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c9c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 49ca0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49ca2: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 49ca6: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49caa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49cae: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 49cb2: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49cb6: 4eb9 0004 c704 jsr 4c704 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49cbc: 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); 49cc0: 2800 movel %d0,%d4 <== NOT EXECUTED 49cc2: 2600 movel %d0,%d3 <== NOT EXECUTED 49cc4: 5bc2 smi %d2 <== NOT EXECUTED 49cc6: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49cc8: 4a82 tstl %d2 <== NOT EXECUTED 49cca: 6b0e bmis 49cda <== NOT EXECUTED } 49ccc: 2203 movel %d3,%d1 <== NOT EXECUTED 49cce: 2002 movel %d2,%d0 <== NOT EXECUTED 49cd0: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49cd6: 4e5e unlk %fp <== NOT EXECUTED 49cd8: 4e75 rts <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 49cda: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 49ce0: 4484 negl %d4 <== NOT EXECUTED 49ce2: 2040 moveal %d0,%a0 <== NOT EXECUTED 49ce4: 74ff moveq #-1,%d2 <== NOT EXECUTED 49ce6: 76ff moveq #-1,%d3 <== NOT EXECUTED 49ce8: 2084 movel %d4,%a0@ <== NOT EXECUTED } 49cea: 2203 movel %d3,%d1 <== NOT EXECUTED 49cec: 2002 movel %d2,%d0 <== NOT EXECUTED 49cee: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49cf4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049ee6 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 49ee6: 4e56 0000 linkw %fp,#0 49eea: 206e 0008 moveal %fp@(8),%a0 49eee: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49ef0: 2f08 movel %a0,%sp@- 49ef2: 2068 0038 moveal %a0@(56),%a0 49ef6: 41e8 004c lea %a0@(76),%a0 49efa: 2f08 movel %a0,%sp@- 49efc: 4eb9 0004 cce8 jsr 4cce8 IMFS_FIFO_RETURN(err); 49f02: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49f04: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 49f06: 6d0a blts 49f12 <== ALWAYS TAKEN } 49f08: 2002 movel %d2,%d0 <== NOT EXECUTED 49f0a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49f0e: 4e5e unlk %fp <== NOT EXECUTED 49f10: 4e75 rts <== NOT EXECUTED ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 49f12: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 49f18: 4482 negl %d2 49f1a: 2040 moveal %d0,%a0 49f1c: 2082 movel %d2,%a0@ 49f1e: 74ff moveq #-1,%d2 } 49f20: 2002 movel %d2,%d0 49f22: 242e fffc movel %fp@(-4),%d2 49f26: 4e5e unlk %fp ... =============================================================================== 00049dfa : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 49dfa: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49dfe: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49e02: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49e04: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49e06: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49e08: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49e0c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 49e10: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49e14: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49e18: 4eb9 0004 c7c2 jsr 4c7c2 <== NOT EXECUTED if (err > 0) 49e1e: 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); 49e22: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 49e24: 6f22 bles 49e48 <== NOT EXECUTED IMFS_update_atime(jnode); 49e26: 42a7 clrl %sp@- <== NOT EXECUTED 49e28: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49e2c: 4eb9 0004 a894 jsr 4a894 <== NOT EXECUTED 49e32: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 49e38: 508f addql #8,%sp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 49e3a: 2002 movel %d2,%d0 <== NOT EXECUTED 49e3c: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49e40: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49e44: 4e5e unlk %fp <== NOT EXECUTED 49e46: 4e75 rts <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 49e48: 4a80 tstl %d0 <== NOT EXECUTED 49e4a: 67ee beqs 49e3a <== NOT EXECUTED 49e4c: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 49e52: 4482 negl %d2 <== NOT EXECUTED 49e54: 2040 moveal %d0,%a0 <== NOT EXECUTED 49e56: 2082 movel %d2,%a0@ <== NOT EXECUTED 49e58: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49e5a: 2002 movel %d2,%d0 <== NOT EXECUTED 49e5c: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49e60: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49e64: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049d86 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 49d86: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49d8a: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49d8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49d90: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49d92: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49d94: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49d98: 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; 49d9c: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49da0: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49da4: 4eb9 0004 c9b8 jsr 4c9b8 <== NOT EXECUTED if (err > 0) { 49daa: 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); 49dae: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 49db0: 6f28 bles 49dda <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 49db2: 42a7 clrl %sp@- <== NOT EXECUTED 49db4: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49db8: 4eb9 0004 a894 jsr 4a894 <== NOT EXECUTED 49dbe: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 49dc2: 508f addql #8,%sp <== NOT EXECUTED 49dc4: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 49dc8: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 49dcc: 2002 movel %d2,%d0 <== NOT EXECUTED 49dce: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49dd2: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49dd6: 4e5e unlk %fp <== NOT EXECUTED 49dd8: 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); 49dda: 4a80 tstl %d0 <== NOT EXECUTED 49ddc: 67ee beqs 49dcc <== NOT EXECUTED 49dde: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 49de4: 4482 negl %d2 <== NOT EXECUTED 49de6: 2040 moveal %d0,%a0 <== NOT EXECUTED 49de8: 2082 movel %d2,%a0@ <== NOT EXECUTED 49dea: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49dec: 2002 movel %d2,%d0 <== NOT EXECUTED 49dee: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49df2: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49df6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049f2c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49f2c: 4e56 fff0 linkw %fp,#-16 49f30: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49f34: 246e 0008 moveal %fp@(8),%a2 49f38: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49f3c: 4a8a tstl %a2 49f3e: 6776 beqs 49fb6 <== NEVER TAKEN if ( !name ) 49f40: 4a82 tstl %d2 49f42: 6756 beqs 49f9a <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49f44: 4879 0005 c8ec pea 5c8ec 49f4a: 47f9 0004 fafc lea 4fafc ,%a3 49f50: 2f02 movel %d2,%sp@- 49f52: 4e93 jsr %a3@ 49f54: 508f addql #8,%sp 49f56: 4a80 tstl %d0 49f58: 6714 beqs 49f6e <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 49f5a: 4879 0005 c8ee pea 5c8ee 49f60: 2f02 movel %d2,%sp@- 49f62: 4e93 jsr %a3@ 49f64: 508f addql #8,%sp 49f66: 4a80 tstl %d0 49f68: 6610 bnes 49f7a <== ALWAYS TAKEN return directory->Parent; 49f6a: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49f6e: 200a movel %a2,%d0 <== NOT EXECUTED 49f70: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 49f76: 4e5e unlk %fp <== NOT EXECUTED 49f78: 4e75 rts <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49f7a: 286a 004c moveal %a2@(76),%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49f7e: 45ea 0050 lea %a2@(80),%a2 49f82: b5cc cmpal %a4,%a2 49f84: 6714 beqs 49f9a !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 ) ) 49f86: 486c 000c pea %a4@(12) 49f8a: 2f02 movel %d2,%sp@- 49f8c: 4e93 jsr %a3@ 49f8e: 508f addql #8,%sp 49f90: 4a80 tstl %d0 49f92: 6714 beqs 49fa8 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 ) { 49f94: 2854 moveal %a4@,%a4 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49f96: b5cc cmpal %a4,%a2 49f98: 66ec bnes 49f86 49f9a: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49f9c: 200a movel %a2,%d0 49f9e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49fa4: 4e5e unlk %fp 49fa6: 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 ) ) 49fa8: 244c moveal %a4,%a2 return the_jnode; } return 0; } 49faa: 200a movel %a2,%d0 49fac: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49fb2: 4e5e unlk %fp 49fb4: 4e75 rts /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49fb6: 4879 0005 d0bf pea 5d0bf <_global_impure_ptr+0x1b1> <== NOT EXECUTED 49fbc: 4879 0005 c8f1 pea 5c8f1 <__FUNCTION__.5390> <== NOT EXECUTED 49fc2: 4878 002a pea 2a <== NOT EXECUTED 49fc6: 4879 0005 c8a0 pea 5c8a0 <== NOT EXECUTED 49fcc: 4eb9 0004 a508 jsr 4a508 <__assert_func> <== NOT EXECUTED ... =============================================================================== 0004f8a8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4f8a8: 4e56 ffd8 linkw %fp,#-40 4f8ac: 206e 0008 moveal %fp@(8),%a0 4f8b0: 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; 4f8b4: 47ee ffec lea %fp@(-20),%a3 4f8b8: 49f9 0004 edcc lea 4edcc ,%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4f8be: 4bf9 0004 3730 lea 43730 ,%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; 4f8c4: 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; 4f8c8: 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; 4f8cc: 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; 4f8d0: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4f8d6: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4f8dc: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4f8e2: 2d68 002c fffc movel %a0@(44),%fp@(-4) */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4f8e8: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4f8ec: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4f8f0: 2f0b movel %a3,%sp@- 4f8f2: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4f8f4: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4f8f6: 200a movel %a2,%d0 4f8f8: 0680 0000 0050 addil #80,%d0 4f8fe: 7201 moveq #1,%d1 4f900: b2aa 0048 cmpl %a2@(72),%d1 4f904: 6634 bnes 4f93a 4f906: b0aa 004c cmpl %a2@(76),%d0 4f90a: 672e beqs 4f93a result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4f90c: 4a8a tstl %a2 4f90e: 671e beqs 4f92e if ( jnode->type == IMFS_DIRECTORY ) { 4f910: 7001 moveq #1,%d0 4f912: b0aa 0048 cmpl %a2@(72),%d0 4f916: 66d0 bnes 4f8e8 <== NEVER TAKEN 4f918: 200a movel %a2,%d0 4f91a: 0680 0000 0050 addil #80,%d0 4f920: b0aa 004c cmpl %a2@(76),%d0 4f924: 67c2 beqs 4f8e8 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4f926: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4f92a: 4a8a tstl %a2 4f92c: 66ba bnes 4f8e8 <== ALWAYS TAKEN 4f92e: 4280 clrl %d0 return 0; } 4f930: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4f936: 4e5e unlk %fp 4f938: 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 ); 4f93a: 2f0b movel %a3,%sp@- 4f93c: 42a7 clrl %sp@- 4f93e: 4e95 jsr %a5@ if (result != 0) 4f940: 508f addql #8,%sp 4f942: 4a80 tstl %d0 4f944: 6604 bnes 4f94a <== NEVER TAKEN 4f946: 2442 moveal %d2,%a2 4f948: 60c2 bras 4f90c if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4f94a: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4f94c: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4f952: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00049fd4 : const char *path, int pathlen, char *token, int *token_len ) { 49fd4: 4e56 ffec linkw %fp,#-20 49fd8: 206e 0008 moveal %fp@(8),%a0 49fdc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49fe0: 226e 000c moveal %fp@(12),%a1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49fe4: 742f moveq #47,%d2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 49fe6: 1210 moveb %a0@,%d1 const char *path, int pathlen, char *token, int *token_len ) { 49fe8: 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) ) { 49fec: 1001 moveb %d1,%d0 const char *path, int pathlen, char *token, int *token_len ) { 49fee: 286e 0014 moveal %fp@(20),%a4 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49ff2: 49c0 extbl %d0 49ff4: b480 cmpl %d0,%d2 49ff6: 6700 00ac beqw 4a0a4 49ffa: 765c moveq #92,%d3 49ffc: b680 cmpl %d0,%d3 49ffe: 6700 00a4 beqw 4a0a4 4a002: 4a01 tstb %d1 4a004: 6700 00bc beqw 4a0c2 4a008: 4a89 tstl %a1 4a00a: 6f00 0098 blew 4a0a4 token[i] = c; 4a00e: 4280 clrl %d0 4a010: 1481 moveb %d1,%a2@ return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4a012: 5280 addql #1,%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) ) { 4a014: 762f moveq #47,%d3 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4a016: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4a01a: 1401 moveb %d1,%d2 4a01c: 49c2 extbl %d2 4a01e: b682 cmpl %d2,%d3 4a020: 6726 beqs 4a048 4a022: 163c 005c moveb #92,%d3 4a026: b682 cmpl %d2,%d3 4a028: 671e beqs 4a048 4a02a: 4a01 tstb %d1 4a02c: 671a beqs 4a048 4a02e: b089 cmpl %a1,%d0 4a030: 6c16 bges 4a048 token[i] = c; 4a032: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) if ( i == IMFS_NAME_MAX ) 4a036: 7220 moveq #32,%d1 4a038: b280 cmpl %d0,%d1 4a03a: 66d6 bnes 4a012 4a03c: 7004 moveq #4,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4a03e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a044: 4e5e unlk %fp 4a046: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4a048: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 4a04c: 6706 beqs 4a054 <== NEVER TAKEN token[i] = '\0'; 4a04e: 4201 clrb %d1 4a050: 1581 0800 moveb %d1,%a2@(00000000,%d0: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 ) 4a054: 4879 0005 c908 pea 5c908 <__FUNCTION__.5390+0x17> 4a05a: 47f9 0004 fafc lea 4fafc ,%a3 /* * Set token_len to the number of characters copied. */ *token_len = i; 4a060: 2880 movel %d0,%a4@ * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4a062: 2f0a movel %a2,%sp@- 4a064: 4e93 jsr %a3@ 4a066: 508f addql #8,%sp 4a068: 4a80 tstl %d0 4a06a: 671e beqs 4a08a type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4a06c: 4879 0005 c909 pea 5c909 <__FUNCTION__.5390+0x18> 4a072: 2f0a movel %a2,%sp@- 4a074: 4e93 jsr %a3@ 4a076: 508f addql #8,%sp 4a078: 4a80 tstl %d0 4a07a: 661c bnes 4a098 4a07c: 103c 0001 moveb #1,%d0 type = IMFS_CURRENT_DIR; } return type; } 4a080: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a086: 4e5e unlk %fp 4a088: 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 ) 4a08a: 103c 0002 moveb #2,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4a08e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a094: 4e5e unlk %fp 4a096: 4e75 rts */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4a098: 7003 moveq #3,%d0 type = IMFS_CURRENT_DIR; } return type; } 4a09a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a0a0: 4e5e unlk %fp 4a0a2: 4e75 rts /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 4a0a4: 1481 moveb %d1,%a2@ if ( (token[i] != '\0') && pathlen ) { 4a0a6: 4a89 tstl %a1 4a0a8: 6710 beqs 4a0ba type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4a0aa: 7001 moveq #1,%d0 4a0ac: 7201 moveq #1,%d1 /* * Set token_len to the number of characters copied. */ *token_len = i; 4a0ae: 2881 movel %d1,%a4@ else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4a0b0: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a0b6: 4e5e unlk %fp 4a0b8: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4a0ba: 4281 clrl %d1 4a0bc: 4280 clrl %d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4a0be: 2881 movel %d1,%a4@ 4a0c0: 60ee bras 4a0b0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 4a0c2: 4280 clrl %d0 4a0c4: 4281 clrl %d1 4a0c6: 4212 clrb %a2@ 4a0c8: 60e4 bras 4a0ae ... =============================================================================== 0004a0cc : int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4a0cc: 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 ) { 4a0ce: 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, 4a0d2: 2079 0005 d718 moveal 5d718 ,%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 ) { 4a0d8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a0dc: 246e 0008 moveal %fp@(8),%a2 4a0e0: 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) { 4a0e4: b088 cmpl %a0,%d0 4a0e6: 6716 beqs 4a0fe <== NEVER TAKEN 4a0e8: 4200 clrb %d0 4a0ea: 7220 moveq #32,%d1 4a0ec: 5280 addql #1,%d0 4a0ee: b288 cmpl %a0,%d1 4a0f0: 670c beqs 4a0fe 4a0f2: 7605 moveq #5,%d3 4a0f4: d281 addl %d1,%d1 4a0f6: b680 cmpl %d0,%d3 4a0f8: 66f2 bnes 4a0ec <== ALWAYS TAKEN 4a0fa: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4a0fe: 23c8 0005 e71c movel %a0,5e71c /* * 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(); 4a104: 4eb9 0004 d1f2 jsr 4d1f2 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 ) ); 4a10a: 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; 4a10e: 41f9 0005 cc86 lea 5cc86 ,%a0 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4a114: 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; 4a118: 2550 0038 movel %a0@,%a2@(56) 4a11c: 41f9 0005 cc8a lea 5cc8a ,%a0 4a122: 2550 003c movel %a0@,%a2@(60) 4a126: 41f9 0005 cc8e lea 5cc8e ,%a0 4a12c: 2550 0040 movel %a0@,%a2@(64) 4a130: 41f9 0005 cc92 lea 5cc92 ,%a0 4a136: 2550 0044 movel %a0@,%a2@(68) 4a13a: 41f9 0005 cc96 lea 5cc96 ,%a0 4a140: 2550 0048 movel %a0@,%a2@(72) 4a144: 41f9 0005 cc9a lea 5cc9a ,%a0 4a14a: 2550 004c movel %a0@,%a2@(76) 4a14e: 41f9 0005 cc9e lea 5cc9e ,%a0 4a154: 2550 0050 movel %a0@,%a2@(80) 4a158: 41f9 0005 cca2 lea 5cca2 ,%a0 4a15e: 2550 0054 movel %a0@,%a2@(84) 4a162: 41f9 0005 cca6 lea 5cca6 ,%a0 4a168: 2550 0058 movel %a0@,%a2@(88) 4a16c: 41f9 0005 ccaa lea 5ccaa ,%a0 4a172: 2550 005c movel %a0@,%a2@(92) 4a176: 41f9 0005 ccae lea 5ccae ,%a0 4a17c: 2550 0060 movel %a0@,%a2@(96) 4a180: 41f9 0005 ccb2 lea 5ccb2 ,%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; 4a186: 256e 000c 0028 movel %fp@(12),%a2@(40) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4a18c: 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(); 4a190: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4a194: 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 ) ); 4a198: 4eb9 0004 a608 jsr 4a608 if ( !fs_info ) { 4a19e: 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 ) ); 4a1a0: 2040 moveal %d0,%a0 if ( !fs_info ) { 4a1a2: 4a80 tstl %d0 4a1a4: 6742 beqs 4a1e8 <== NEVER TAKEN /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 4a1a6: 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; 4a1a8: 7601 moveq #1,%d3 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 4a1aa: 2140 0004 movel %d0,%a0@(4) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 4a1ae: 2039 0005 e720 movel 5e720 ,%d0 4a1b4: 2200 movel %d0,%d1 4a1b6: 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; 4a1b8: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 4a1bc: 23c1 0005 e720 movel %d1,5e720 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 4a1c2: 216e 0010 0008 movel %fp@(16),%a0@(8) fs_info->directory_handlers = directory_handlers; 4a1c8: 2142 000c movel %d2,%a0@(12) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4a1cc: 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; 4a1d0: 2548 0034 movel %a0,%a2@(52) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 4a1d4: 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(); 4a1d6: 4eb9 0004 c70e jsr 4c70e return 0; } 4a1dc: 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(); 4a1e2: 4280 clrl %d0 return 0; } 4a1e4: 4e5e unlk %fp 4a1e6: 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); 4a1e8: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 4a1ec: 4eb9 0004 a6f4 jsr 4a6f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4a1f2: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 4a1f8: 588f addql #4,%sp <== NOT EXECUTED 4a1fa: 720c moveq #12,%d1 <== NOT EXECUTED 4a1fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a1fe: 70ff moveq #-1,%d0 <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4a200: 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); 4a206: 2081 movel %d1,%a0@ <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4a208: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000433b0 : /* * 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 ) 433b0: 4280 clrl %d0 433b2: 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 */ ) { 433b4: 4e56 ffbc linkw %fp,#-68 433b8: 206e 0008 moveal %fp@(8),%a0 433bc: 2f03 movel %d3,%sp@- int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 433be: 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 */ ) { 433c0: 2f02 movel %d2,%sp@- 433c2: 242e 0010 movel %fp@(16),%d2 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 433c6: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 433ca: 3028 0032 movew %a0@(50),%d0 433ce: b280 cmpl %d0,%d1 433d0: 6578 bcss 4344a 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 ); 433d2: 2f02 movel %d2,%sp@- 433d4: 260e movel %fp,%d3 433d6: 0683 ffff ffbf addil #-65,%d3 433dc: 4eb9 0005 580c jsr 5580c 433e2: 588f addql #4,%sp 433e4: 486e fffc pea %fp@(-4) 433e8: 2f03 movel %d3,%sp@- 433ea: 2f00 movel %d0,%sp@- 433ec: 2f02 movel %d2,%sp@- 433ee: 4eb9 0004 fa00 jsr 4fa00 * 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( 433f4: 486e ffe0 pea %fp@(-32) 433f8: 2f3c 0000 a1ff movel #41471,%sp@- 433fe: 2f03 movel %d3,%sp@- 43400: 4878 0003 pea 3 43404: 2f2e 000c movel %fp@(12),%sp@- 43408: 4eb9 0004 ebc4 jsr 4ebc4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 4340e: 4fef 0024 lea %sp@(36),%sp 43412: 4a80 tstl %d0 43414: 674e beqs 43464 <== 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++; 43416: 206e ffe0 moveal %fp@(-32),%a0 4341a: 3028 0032 movew %a0@(50),%d0 4341e: 5280 addql #1,%d0 43420: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 43424: 42a7 clrl %sp@- 43426: 486e fff4 pea %fp@(-12) 4342a: 4eb9 0004 40b4 jsr 440b4 43430: 206e ffe0 moveal %fp@(-32),%a0 return 0; 43434: 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 ); 43436: 4280 clrl %d0 43438: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 4343e: 242e ffb4 movel %fp@(-76),%d2 43442: 262e ffb8 movel %fp@(-72),%d3 43446: 4e5e unlk %fp 43448: 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 ); 4344a: 4eb9 0005 4490 jsr 54490 <__errno> 43450: 741f moveq #31,%d2 43452: 2040 moveal %d0,%a0 43454: 70ff moveq #-1,%d0 43456: 2082 movel %d2,%a0@ */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 43458: 242e ffb4 movel %fp@(-76),%d2 4345c: 262e ffb8 movel %fp@(-72),%d3 43460: 4e5e unlk %fp 43462: 4e75 rts ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43464: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 4346a: 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 ); 4346e: 2040 moveal %d0,%a0 <== NOT EXECUTED 43470: 720c moveq #12,%d1 <== NOT EXECUTED 43472: 70ff moveq #-1,%d0 <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 43474: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 43478: 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 ); 4347a: 2081 movel %d1,%a0@ <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } ... =============================================================================== 000525dc : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 525dc: 4e56 0000 linkw %fp,#0 525e0: 206e 0008 moveal %fp@(8),%a0 525e4: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 525e6: 4a88 tstl %a0 525e8: 6764 beqs 5264e <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 525ea: 7005 moveq #5,%d0 525ec: b0a8 0048 cmpl %a0@(72),%d0 525f0: 6640 bnes 52632 <== 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 ); 525f2: 4878 0001 pea 1 525f6: 2f2e 000c movel %fp@(12),%sp@- 525fa: 2f08 movel %a0,%sp@- 525fc: 4eb9 0005 20f8 jsr 520f8 if ( *block_entry_ptr ) 52602: 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 ); 52606: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 52608: 4a92 tstl %a2@ 5260a: 670a beqs 52616 #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 5260c: 4280 clrl %d0 return 0; } 5260e: 246e fffc moveal %fp@(-4),%a2 52612: 4e5e unlk %fp 52614: 4e75 rts #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 52616: 4eb9 0005 20d4 jsr 520d4 if ( !memory ) 5261c: 4a80 tstl %d0 5261e: 6706 beqs 52626 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 52620: 2480 movel %d0,%a2@ 52622: 4280 clrl %d0 52624: 60e8 bras 5260e return 0; } 52626: 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 ) 5262a: 103c 0001 moveb #1,%d0 <== NOT EXECUTED return 1; *block_entry_ptr = memory; return 0; } 5262e: 4e5e unlk %fp <== NOT EXECUTED 52630: 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 ); 52632: 4879 0006 2cc0 pea 62cc0 <== NOT EXECUTED 52638: 4879 0006 2dd9 pea 62dd9 <__FUNCTION__.6024> <== NOT EXECUTED 5263e: 4878 016d pea 16d <== NOT EXECUTED 52642: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52648: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 5264e: 4879 0006 2c70 pea 62c70 <== NOT EXECUTED 52654: 4879 0006 2dd9 pea 62dd9 <__FUNCTION__.6024> <== NOT EXECUTED 5265a: 4878 0169 pea 169 <== NOT EXECUTED 5265e: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52664: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED =============================================================================== 0005266a : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 5266a: 4e56 ffdc linkw %fp,#-36 5266e: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 52672: 246e 0008 moveal %fp@(8),%a2 52676: 262e 000c movel %fp@(12),%d3 5267a: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 5267e: 4a8a tstl %a2 52680: 6700 0102 beqw 52784 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 52684: 7005 moveq #5,%d0 52686: b0aa 0048 cmpl %a2@(72),%d0 5268a: 6600 0114 bnew 527a0 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 5268e: 2439 0006 4734 movel 64734 ,%d2 52694: 2202 movel %d2,%d1 52696: e489 lsrl #2,%d1 52698: 2001 movel %d1,%d0 5269a: 5280 addql #1,%d0 5269c: 4c01 0800 mulsl %d1,%d0 526a0: 4285 clrl %d5 526a2: 5280 addql #1,%d0 526a4: 4c01 0800 mulsl %d1,%d0 526a8: 5380 subql #1,%d0 526aa: 4c02 0800 mulsl %d2,%d0 526ae: 2c00 movel %d0,%d6 526b0: 2005 movel %d5,%d0 526b2: 2206 movel %d6,%d1 526b4: 9284 subl %d4,%d1 526b6: 9183 subxl %d3,%d0 526b8: 6f00 00b2 blew 5276c rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 526bc: 2a2a 004c movel %a2@(76),%d5 526c0: 2c2a 0050 movel %a2@(80),%d6 526c4: 2003 movel %d3,%d0 526c6: 2204 movel %d4,%d1 526c8: 9286 subl %d6,%d1 526ca: 9185 subxl %d5,%d0 526cc: 6f62 bles 52730 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 526ce: 47f9 0006 0064 lea 60064 <__divdi3>,%a3 526d4: 2202 movel %d2,%d1 526d6: 5bc0 smi %d0 526d8: 49c0 extbl %d0 526da: 2840 moveal %d0,%a4 526dc: 2a41 moveal %d1,%a5 526de: 2f0d movel %a5,%sp@- 526e0: 2f00 movel %d0,%sp@- 526e2: 2f04 movel %d4,%sp@- 526e4: 2f03 movel %d3,%sp@- 526e6: 4e93 jsr %a3@ 526e8: 4fef 0010 lea %sp@(16),%sp 526ec: 2401 movel %d1,%d2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 526ee: 2f0d movel %a5,%sp@- 526f0: 2f0c movel %a4,%sp@- 526f2: 2f06 movel %d6,%sp@- 526f4: 2f05 movel %d5,%sp@- 526f6: 4e93 jsr %a3@ 526f8: 4fef 0010 lea %sp@(16),%sp 526fc: 2841 moveal %d1,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 526fe: b282 cmpl %d2,%d1 52700: 621a bhis 5271c <== NEVER TAKEN 52702: 2a01 movel %d1,%d5 52704: 47f9 0005 25dc lea 525dc ,%a3 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 5270a: 2f05 movel %d5,%sp@- 5270c: 2f0a movel %a2,%sp@- 5270e: 4e93 jsr %a3@ 52710: 508f addql #8,%sp 52712: 4a80 tstl %d0 52714: 6626 bnes 5273c <== NEVER TAKEN /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 52716: 5285 addql #1,%d5 52718: ba82 cmpl %d2,%d5 5271a: 63ee blss 5270a /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 5271c: 4280 clrl %d0 5271e: 2543 004c movel %d3,%a2@(76) 52722: 2544 0050 movel %d4,%a2@(80) return 0; } 52726: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 5272c: 4e5e unlk %fp 5272e: 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 ) 52730: 4280 clrl %d0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 52732: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52738: 4e5e unlk %fp 5273a: 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-- ) { 5273c: ba8c cmpl %a4,%d5 <== NOT EXECUTED 5273e: 6514 bcss 52754 <== NOT EXECUTED 52740: 47f9 0005 235c lea 5235c ,%a3 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 52746: 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-- ) { 52748: 5385 subql #1,%d5 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 5274a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5274c: 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-- ) { 5274e: 508f addql #8,%sp <== NOT EXECUTED 52750: ba8c cmpl %a4,%d5 <== NOT EXECUTED 52752: 64f2 bccs 52746 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 52754: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 5275a: 721c moveq #28,%d1 <== NOT EXECUTED 5275c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5275e: 70ff moveq #-1,%d0 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 52760: 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 ); 52766: 2081 movel %d1,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 52768: 4e5e unlk %fp <== NOT EXECUTED 5276a: 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 ); 5276c: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 52772: 7416 moveq #22,%d2 <== NOT EXECUTED 52774: 2040 moveal %d0,%a0 <== NOT EXECUTED 52776: 70ff moveq #-1,%d0 <== NOT EXECUTED 52778: 2082 movel %d2,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 5277a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 52780: 4e5e unlk %fp <== NOT EXECUTED 52782: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 52784: 4879 0006 2c70 pea 62c70 <== NOT EXECUTED 5278a: 4879 0006 2def pea 62def <__FUNCTION__.5975> <== NOT EXECUTED 52790: 4878 0131 pea 131 <== NOT EXECUTED 52794: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 5279a: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 527a0: 4879 0006 2cc0 pea 62cc0 <== NOT EXECUTED 527a6: 4879 0006 2def pea 62def <__FUNCTION__.5975> <== NOT EXECUTED 527ac: 4878 0135 pea 135 <== NOT EXECUTED 527b0: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 527b6: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED =============================================================================== 000520f8 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 520f8: 4e56 fff0 linkw %fp,#-16 520fc: 48d7 041c moveml %d2-%d4/%a2,%sp@ 52100: 246e 0008 moveal %fp@(8),%a2 52104: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 52108: 4a8a tstl %a2 5210a: 6700 01b2 beqw 522be if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 5210e: 7005 moveq #5,%d0 52110: b0aa 0048 cmpl %a2@(72),%d0 52114: 6600 01c4 bnew 522da /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 52118: 2239 0006 4734 movel 64734 ,%d1 5211e: e489 lsrl #2,%d1 52120: 2001 movel %d1,%d0 52122: 5380 subql #1,%d0 52124: b082 cmpl %d2,%d0 52126: 6446 bccs 5216e <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 52128: 2001 movel %d1,%d0 <== NOT EXECUTED 5212a: 5280 addql #1,%d0 <== NOT EXECUTED 5212c: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 52130: 2040 moveal %d0,%a0 <== NOT EXECUTED 52132: 5388 subql #1,%a0 <== NOT EXECUTED 52134: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 52136: 6500 00c2 bcsw 521fa <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 5213a: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 5213c: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 52140: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 52144: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 52148: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 5214c: 6700 0086 beqw 521d4 <== NOT EXECUTED if ( !p ) { 52150: 4a88 tstl %a0 <== NOT EXECUTED 52152: 6750 beqs 521a4 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 52154: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 52158: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 5215a: 4a88 tstl %a0 <== NOT EXECUTED 5215c: 6760 beqs 521be <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 5215e: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 52162: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 52164: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5216a: 4e5e unlk %fp <== NOT EXECUTED 5216c: 4e75 rts <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 5216e: 206a 0054 moveal %a2@(84),%a0 if ( malloc_it ) { 52172: 4aae 0010 tstl %fp@(16) 52176: 6776 beqs 521ee if ( !p ) { 52178: 4a88 tstl %a0 5217a: 6710 beqs 5218c } if ( !p ) return 0; return &info->indirect[ my_block ]; 5217c: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 52180: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 52182: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 52188: 4e5e unlk %fp 5218a: 4e75 rts p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 5218c: 4eb9 0005 20d4 jsr 520d4 52192: 2040 moveal %d0,%a0 if ( !p ) 52194: 4a80 tstl %d0 52196: 674a beqs 521e2 <== NEVER TAKEN return 0; info->indirect = p; 52198: 2540 0054 movel %d0,%a2@(84) } if ( !p ) return 0; return &info->indirect[ my_block ]; 5219c: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 521a0: 2008 movel %a0,%d0 521a2: 60de bras 52182 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 521a4: 4eb9 0005 20d4 jsr 520d4 <== NOT EXECUTED 521aa: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 521ac: 4a80 tstl %d0 <== NOT EXECUTED 521ae: 6732 beqs 521e2 <== NOT EXECUTED return 0; info->doubly_indirect = p; 521b0: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 521b4: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 521b8: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 521ba: 4a88 tstl %a0 <== NOT EXECUTED 521bc: 66a0 bnes 5215e <== NOT EXECUTED p1 = memfile_alloc_block(); 521be: 4eb9 0005 20d4 jsr 520d4 <== NOT EXECUTED 521c4: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 521c6: 4a80 tstl %d0 <== NOT EXECUTED 521c8: 6718 beqs 521e2 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 521ca: 2480 movel %d0,%a2@ <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 521cc: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 521d0: 2008 movel %a0,%d0 <== NOT EXECUTED 521d2: 6090 bras 52164 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 521d4: 4a88 tstl %a0 <== NOT EXECUTED 521d6: 670a beqs 521e2 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 521d8: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 521dc: 4a88 tstl %a0 <== NOT EXECUTED 521de: 6600 ff7e bnew 5215e <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 521e2: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 521e4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 521ea: 4e5e unlk %fp <== NOT EXECUTED 521ec: 4e75 rts <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 521ee: 4a88 tstl %a0 521f0: 67f0 beqs 521e2 <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; 521f2: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 521f6: 2008 movel %a0,%d0 521f8: 6088 bras 52182 #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 521fa: 2600 movel %d0,%d3 <== NOT EXECUTED 521fc: 5283 addql #1,%d3 <== NOT EXECUTED 521fe: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 52202: 5383 subql #1,%d3 <== NOT EXECUTED 52204: b682 cmpl %d2,%d3 <== NOT EXECUTED 52206: 65da bcss 521e2 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 52208: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 5220a: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 5220e: 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; 52212: 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; 52216: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 5221a: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 5221e: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 52222: 6778 beqs 5229c <== NOT EXECUTED if ( !p ) { 52224: 4a88 tstl %a0 <== NOT EXECUTED 52226: 6756 beqs 5227e <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 52228: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 5222c: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 5222e: 4a88 tstl %a0 <== NOT EXECUTED 52230: 6730 beqs 52262 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 52232: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 52236: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 52238: 4a88 tstl %a0 <== NOT EXECUTED 5223a: 6710 beqs 5224c <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 5223c: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 52240: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 52242: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 52248: 4e5e unlk %fp <== NOT EXECUTED 5224a: 4e75 rts <== NOT EXECUTED p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 5224c: 4eb9 0005 20d4 jsr 520d4 <== NOT EXECUTED 52252: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p2 ) 52254: 4a80 tstl %d0 <== NOT EXECUTED 52256: 678a beqs 521e2 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 52258: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 5225a: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 5225e: 2008 movel %a0,%d0 <== NOT EXECUTED 52260: 60e0 bras 52242 <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 52262: 4eb9 0005 20d4 jsr 520d4 <== NOT EXECUTED 52268: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 5226a: 4a80 tstl %d0 <== NOT EXECUTED 5226c: 6700 ff74 beqw 521e2 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 52270: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 52272: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 52276: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 52278: 4a88 tstl %a0 <== NOT EXECUTED 5227a: 66c0 bnes 5223c <== NOT EXECUTED 5227c: 60ce bras 5224c <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 5227e: 4eb9 0005 20d4 jsr 520d4 <== NOT EXECUTED 52284: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 52286: 4a80 tstl %d0 <== NOT EXECUTED 52288: 6700 ff58 beqw 521e2 <== NOT EXECUTED return 0; info->triply_indirect = p; 5228c: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 52290: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 52294: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 52296: 4a88 tstl %a0 <== NOT EXECUTED 52298: 6698 bnes 52232 <== NOT EXECUTED 5229a: 60c6 bras 52262 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 5229c: 4a88 tstl %a0 <== NOT EXECUTED 5229e: 6700 ff42 beqw 521e2 <== 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 ]; 522a2: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p1 ) 522a6: 4a88 tstl %a0 <== NOT EXECUTED 522a8: 6700 ff38 beqw 521e2 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 522ac: 2004 movel %d4,%d0 <== NOT EXECUTED 522ae: e588 lsll #2,%d0 <== NOT EXECUTED 522b0: d0b0 3c00 addl %a0@(00000000,%d3:l:4),%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 522b4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 522ba: 4e5e unlk %fp <== NOT EXECUTED 522bc: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 522be: 4879 0006 2c70 pea 62c70 <== NOT EXECUTED 522c4: 4879 0006 2d4a pea 62d4a <__FUNCTION__.6334> <== NOT EXECUTED 522ca: 4878 0388 pea 388 <== NOT EXECUTED 522ce: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 522d4: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 522da: 4879 0006 2cc0 pea 62cc0 <== NOT EXECUTED 522e0: 4879 0006 2d4a pea 62d4a <__FUNCTION__.6334> <== NOT EXECUTED 522e6: 4878 038c pea 38c <== NOT EXECUTED 522ea: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 522f0: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED =============================================================================== 00052c74 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 52c74: 4e56 ffc0 linkw %fp,#-64 52c78: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52c7c: 246e 0008 moveal %fp@(8),%a2 52c80: 2a6e 0014 moveal %fp@(20),%a5 52c84: 262e 0018 movel %fp@(24),%d3 52c88: 282e 000c movel %fp@(12),%d4 52c8c: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 52c90: 4a8a tstl %a2 52c92: 6700 0266 beqw 52efa if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 52c96: 202a 0048 movel %a2@(72),%d0 52c9a: 2040 moveal %d0,%a0 52c9c: 5b88 subql #5,%a0 52c9e: 7c01 moveq #1,%d6 52ca0: bc88 cmpl %a0,%d6 52ca2: 6500 023a bcsw 52ede /* * Error checks on arguments */ assert( dest ); 52ca6: 4a8d tstl %a5 52ca8: 6700 01fc beqw 52ea6 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 52cac: 4a83 tstl %d3 52cae: 6700 01c2 beqw 52e72 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 52cb2: 7e06 moveq #6,%d7 52cb4: be80 cmpl %d0,%d7 52cb6: 6700 0136 beqw 52dee * 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 ) 52cba: 2043 moveal %d3,%a0 52cbc: d1c5 addal %d5,%a0 52cbe: 2408 movel %a0,%d2 52cc0: 4281 clrl %d1 52cc2: 206a 004c moveal %a2@(76),%a0 52cc6: 226a 0050 moveal %a2@(80),%a1 52cca: 2c08 movel %a0,%d6 52ccc: 2e09 movel %a1,%d7 52cce: 9e82 subl %d2,%d7 52cd0: 9d81 subxl %d1,%d6 52cd2: 6c04 bges 52cd8 my_length = the_jnode->info.file.size - start; 52cd4: 2609 movel %a1,%d3 52cd6: 9685 subl %d5,%d3 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 52cd8: 2439 0006 4734 movel 64734 ,%d2 52cde: 2202 movel %d2,%d1 52ce0: 5bc0 smi %d0 52ce2: 49c0 extbl %d0 52ce4: 2640 moveal %d0,%a3 52ce6: 2841 moveal %d1,%a4 52ce8: 2f0c movel %a4,%sp@- 52cea: 2f00 movel %d0,%sp@- 52cec: 2f05 movel %d5,%sp@- 52cee: 2f04 movel %d4,%sp@- 52cf0: 4eb9 0006 041c jsr 6041c <__moddi3> 52cf6: 4fef 0010 lea %sp@(16),%sp 52cfa: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 52cfc: 2f0c movel %a4,%sp@- 52cfe: 2f0b movel %a3,%sp@- 52d00: 2f05 movel %d5,%sp@- 52d02: 2f04 movel %d4,%sp@- 52d04: 4eb9 0006 0064 jsr 60064 <__divdi3> 52d0a: 4fef 0010 lea %sp@(16),%sp 52d0e: 2801 movel %d1,%d4 if ( start_offset ) { 52d10: 4a87 tstl %d7 52d12: 6700 00d2 beqw 52de6 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 ); 52d16: 42a7 clrl %sp@- 52d18: 2f01 movel %d1,%sp@- 52d1a: 2f0a movel %a2,%sp@- 52d1c: 4eb9 0005 20f8 jsr 520f8 assert( block_ptr ); 52d22: 4fef 000c lea %sp@(12),%sp 52d26: 4a80 tstl %d0 52d28: 6700 01ec beqw 52f16 */ 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; 52d2c: 9487 subl %d7,%d2 52d2e: 2643 moveal %d3,%a3 52d30: b483 cmpl %d3,%d2 52d32: 6500 0116 bcsw 52e4a 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 ); 52d36: 2f0b movel %a3,%sp@- 52d38: 2040 moveal %d0,%a0 52d3a: de90 addl %a0@,%d7 dest += to_copy; block++; 52d3c: 5284 addql #1,%d4 my_length -= to_copy; 52d3e: 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 ); 52d40: 2f07 movel %d7,%sp@- dest += to_copy; 52d42: 2e0d movel %a5,%d7 52d44: 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 ); 52d46: 2f0d movel %a5,%sp@- 52d48: 4eb9 0005 4cb0 jsr 54cb0 dest += to_copy; block++; my_length -= to_copy; 52d4e: 2439 0006 4734 movel 64734 ,%d2 52d54: 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 ) { 52d58: b483 cmpl %d3,%d2 52d5a: 623c bhis 52d98 52d5c: 49f9 0005 20f8 lea 520f8 ,%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 ); 52d62: 4bf9 0005 4cb0 lea 54cb0 ,%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 ); 52d68: 42a7 clrl %sp@- 52d6a: 2f04 movel %d4,%sp@- 52d6c: 2f0a movel %a2,%sp@- 52d6e: 4e94 jsr %a4@ assert( block_ptr ); 52d70: 4fef 000c lea %sp@(12),%sp 52d74: 4a80 tstl %d0 52d76: 6700 0112 beqw 52e8a if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 52d7a: 2040 moveal %d0,%a0 dest += to_copy; block++; 52d7c: 5284 addql #1,%d4 my_length -= to_copy; 52d7e: 9682 subl %d2,%d3 copied += to_copy; 52d80: 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 ); 52d82: 2f02 movel %d2,%sp@- 52d84: 2f10 movel %a0@,%sp@- 52d86: 2f07 movel %d7,%sp@- dest += to_copy; 52d88: 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 ); 52d8a: 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 ) { 52d8c: 4fef 000c lea %sp@(12),%sp 52d90: b6b9 0006 4734 cmpl 64734 ,%d3 52d96: 64d0 bccs 52d68 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 52d98: 4a83 tstl %d3 52d9a: 672a beqs 52dc6 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 52d9c: 42a7 clrl %sp@- 52d9e: 2f04 movel %d4,%sp@- 52da0: 2f0a movel %a2,%sp@- 52da2: 4eb9 0005 20f8 jsr 520f8 assert( block_ptr ); 52da8: 4fef 000c lea %sp@(12),%sp 52dac: 4a80 tstl %d0 52dae: 6700 0112 beqw 52ec2 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 52db2: 2040 moveal %d0,%a0 copied += my_length; 52db4: 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 ); 52db6: 2f03 movel %d3,%sp@- 52db8: 2f10 movel %a0@,%sp@- 52dba: 2f07 movel %d7,%sp@- 52dbc: 4eb9 0005 4cb0 jsr 54cb0 copied += my_length; 52dc2: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 52dc6: 42a7 clrl %sp@- 52dc8: 486e fff8 pea %fp@(-8) 52dcc: 4eb9 0004 40b4 jsr 440b4 52dd2: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 52dd8: 200b movel %a3,%d0 52dda: 508f addql #8,%sp } 52ddc: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 52de2: 4e5e unlk %fp 52de4: 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 ) { 52de6: 2e0d movel %a5,%d7 52de8: 97cb subal %a3,%a3 52dea: 6000 ff6c braw 52d58 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)) 52dee: 2843 moveal %d3,%a4 <== NOT EXECUTED 52df0: 97cb subal %a3,%a3 <== NOT EXECUTED 52df2: 202a 004c movel %a2@(76),%d0 <== NOT EXECUTED 52df6: 222a 0050 movel %a2@(80),%d1 <== NOT EXECUTED 52dfa: 2c0b movel %a3,%d6 <== NOT EXECUTED 52dfc: 2e0c movel %a4,%d7 <== NOT EXECUTED 52dfe: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 52e02: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED 52e06: 9285 subl %d5,%d1 <== NOT EXECUTED 52e08: 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; 52e0a: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 52e0e: 9e81 subl %d1,%d7 <== NOT EXECUTED 52e10: 9d80 subxl %d0,%d6 <== NOT EXECUTED 52e12: 6f06 bles 52e1a <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 52e14: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 52e18: 9685 subl %d5,%d3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 52e1a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52e1c: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 52e20: 2f0d movel %a5,%sp@- <== NOT EXECUTED 52e22: 4eb9 0005 4cb0 jsr 54cb0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 52e28: 42a7 clrl %sp@- <== NOT EXECUTED 52e2a: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 52e2e: 4eb9 0004 40b4 jsr 440b4 <== NOT EXECUTED 52e34: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 52e3a: 2003 movel %d3,%d0 <== NOT EXECUTED 52e3c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 52e40: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52e46: 4e5e unlk %fp <== NOT EXECUTED 52e48: 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; 52e4a: 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 ); 52e4c: 2040 moveal %d0,%a0 dest += to_copy; block++; 52e4e: 5284 addql #1,%d4 my_length -= to_copy; 52e50: 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 ); 52e52: 2f0b movel %a3,%sp@- 52e54: de90 addl %a0@,%d7 52e56: 2f07 movel %d7,%sp@- dest += to_copy; 52e58: 2e0d movel %a5,%d7 52e5a: 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 ); 52e5c: 2f0d movel %a5,%sp@- 52e5e: 4eb9 0005 4cb0 jsr 54cb0 dest += to_copy; block++; my_length -= to_copy; 52e64: 2439 0006 4734 movel 64734 ,%d2 52e6a: 4fef 000c lea %sp@(12),%sp 52e6e: 6000 fee8 braw 52d58 * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 52e72: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 52e78: 7e16 moveq #22,%d7 <== NOT EXECUTED 52e7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 52e7c: 70ff moveq #-1,%d0 <== NOT EXECUTED 52e7e: 2087 movel %d7,%a0@ <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 52e80: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52e86: 4e5e unlk %fp <== NOT EXECUTED 52e88: 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 ); 52e8a: 4879 0006 2cf0 pea 62cf0 <== NOT EXECUTED 52e90: 4879 0006 2d7c pea 62d7c <__FUNCTION__.6161> <== NOT EXECUTED 52e96: 4878 02a7 pea 2a7 <== NOT EXECUTED 52e9a: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52ea0: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 52ea6: 4879 0006 2d45 pea 62d45 <== NOT EXECUTED 52eac: 4879 0006 2d7c pea 62d7c <__FUNCTION__.6161> <== NOT EXECUTED 52eb2: 4878 025a pea 25a <== NOT EXECUTED 52eb6: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52ebc: 4eb9 0004 fd00 jsr 4fd00 <__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 ); 52ec2: 4879 0006 2cf0 pea 62cf0 <== NOT EXECUTED 52ec8: 4879 0006 2d7c pea 62d7c <__FUNCTION__.6161> <== NOT EXECUTED 52ece: 4878 02b9 pea 2b9 <== NOT EXECUTED 52ed2: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52ed8: 4eb9 0004 fd00 jsr 4fd00 <__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 || 52ede: 4879 0006 2cfa pea 62cfa <== NOT EXECUTED 52ee4: 4879 0006 2d7c pea 62d7c <__FUNCTION__.6161> <== NOT EXECUTED 52eea: 4878 0251 pea 251 <== NOT EXECUTED 52eee: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52ef4: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 52efa: 4879 0006 2c70 pea 62c70 <== NOT EXECUTED 52f00: 4879 0006 2d7c pea 62d7c <__FUNCTION__.6161> <== NOT EXECUTED 52f06: 4878 024c pea 24c <== NOT EXECUTED 52f0a: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52f10: 4eb9 0004 fd00 jsr 4fd00 <__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 ); 52f16: 4879 0006 2cf0 pea 62cf0 <== NOT EXECUTED 52f1c: 4879 0006 2d7c pea 62d7c <__FUNCTION__.6161> <== NOT EXECUTED 52f22: 4878 0296 pea 296 <== NOT EXECUTED 52f26: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52f2c: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED =============================================================================== 000523a8 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 523a8: 4e56 ffe0 linkw %fp,#-32 523ac: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 523b0: 286e 0008 moveal %fp@(8),%a4 /* * Perform internal consistency checks */ assert( the_jnode ); 523b4: 4a8c tstl %a4 523b6: 6700 010c beqw 524c4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 523ba: 7005 moveq #5,%d0 523bc: b0ac 0048 cmpl %a4@(72),%d0 523c0: 6600 011e bnew 524e0 /* * 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; 523c4: 2839 0006 4734 movel 64734 ,%d4 523ca: e48c lsrl #2,%d4 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 523cc: 4aac 0054 tstl %a4@(84) 523d0: 670e beqs 523e0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 523d2: 2f04 movel %d4,%sp@- 523d4: 486c 0054 pea %a4@(84) 523d8: 4eb9 0005 22f6 jsr 522f6 523de: 508f addql #8,%sp } if ( info->doubly_indirect ) { 523e0: 206c 0058 moveal %a4@(88),%a0 523e4: 4a88 tstl %a0 523e6: 674a beqs 52432 <== ALWAYS TAKEN for ( i=0 ; i,%d1<== NOT EXECUTED 523ee: 2001 movel %d1,%d0 <== NOT EXECUTED 523f0: 47f9 0005 22f6 lea 522f6 ,%a3<== NOT EXECUTED 523f6: e488 lsrl #2,%d0 <== NOT EXECUTED 523f8: 672e beqs 52428 <== NOT EXECUTED 523fa: 4280 clrl %d0 <== NOT EXECUTED 523fc: 4282 clrl %d2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 523fe: e588 lsll #2,%d0 <== NOT EXECUTED 52400: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 52404: 6710 beqs 52416 <== NOT EXECUTED memfile_free_blocks_in_table( 52406: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52408: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 5240c: 4e93 jsr %a3@ <== NOT EXECUTED 5240e: 2239 0006 4734 movel 64734 ,%d1<== NOT EXECUTED 52414: 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 52422: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 52426: 60d6 bras 523fe <== 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 ); 52428: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5242a: 486c 0058 pea %a4@(88) <== NOT EXECUTED 5242e: 4e93 jsr %a3@ <== NOT EXECUTED 52430: 508f addql #8,%sp <== NOT EXECUTED } if ( info->triply_indirect ) { 52432: 206c 005c moveal %a4@(92),%a0 52436: 4a88 tstl %a0 52438: 677e beqs 524b8 <== ALWAYS TAKEN for ( i=0 ; i,%d1<== NOT EXECUTED 52440: 2001 movel %d1,%d0 <== NOT EXECUTED 52442: 47f9 0005 22f6 lea 522f6 ,%a3<== NOT EXECUTED 52448: e488 lsrl #2,%d0 <== NOT EXECUTED 5244a: 6762 beqs 524ae <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 5244c: 2450 moveal %a0@,%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 5244e: 4a8a tstl %a2 <== NOT EXECUTED 52450: 675c beqs 524ae <== NOT EXECUTED 52452: 4286 clrl %d6 <== NOT EXECUTED 52454: 4285 clrl %d5 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 5245a: 4280 clrl %d0 <== NOT EXECUTED 5245c: 4282 clrl %d2 <== NOT EXECUTED if ( p[j] ) { 5245e: e588 lsll #2,%d0 <== NOT EXECUTED 52460: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 52464: 6710 beqs 52476 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 52466: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52468: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 5246c: 4e93 jsr %a3@ <== NOT EXECUTED 5246e: 2239 0006 4734 movel 64734 ,%d1<== NOT EXECUTED 52474: 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( 52482: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52484: 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 52494: 2001 movel %d1,%d0 <== NOT EXECUTED 52496: 508f addql #8,%sp <== NOT EXECUTED 52498: e488 lsrl #2,%d0 <== NOT EXECUTED 5249a: ba80 cmpl %d0,%d5 <== NOT EXECUTED 5249c: 6410 bccs 524ae <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 5249e: 2c05 movel %d5,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 524a0: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 524a4: e58e lsll #2,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 524a6: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 524aa: 4a8a tstl %a2 <== NOT EXECUTED 524ac: 66a8 bnes 52456 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 524ae: 2f04 movel %d4,%sp@- <== NOT EXECUTED 524b0: 486c 005c pea %a4@(92) <== NOT EXECUTED 524b4: 4e93 jsr %a3@ <== NOT EXECUTED 524b6: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 524b8: 4280 clrl %d0 524ba: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 524c0: 4e5e unlk %fp 524c2: 4e75 rts /* * Perform internal consistency checks */ assert( the_jnode ); 524c4: 4879 0006 2c70 pea 62c70 <== NOT EXECUTED 524ca: 4879 0006 2d8e pea 62d8e <__FUNCTION__.6086> <== NOT EXECUTED 524d0: 4878 01ee pea 1ee <== NOT EXECUTED 524d4: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 524da: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 524e0: 4879 0006 2cc0 pea 62cc0 <== NOT EXECUTED 524e6: 4879 0006 2d8e pea 62d8e <__FUNCTION__.6086> <== NOT EXECUTED 524ec: 4878 01f2 pea 1f2 <== NOT EXECUTED 524f0: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 524f6: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED =============================================================================== 0005235c : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 5235c: 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 ); 52360: 42a7 clrl %sp@- <== NOT EXECUTED 52362: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 52366: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 5236a: 4eb9 0005 20f8 jsr 520f8 <== NOT EXECUTED assert( block_ptr ); 52370: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52374: 4a80 tstl %d0 <== NOT EXECUTED 52376: 6714 beqs 5238c <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 52378: 2040 moveal %d0,%a0 <== NOT EXECUTED 5237a: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 5237c: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 5237e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52380: 4eb9 0005 20ba jsr 520ba <== NOT EXECUTED } return 1; } 52386: 7001 moveq #1,%d0 <== NOT EXECUTED 52388: 4e5e unlk %fp <== NOT EXECUTED 5238a: 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 ); 5238c: 4879 0006 2cf0 pea 62cf0 <== NOT EXECUTED 52392: 4879 0006 2dbf pea 62dbf <__FUNCTION__.6050> <== NOT EXECUTED 52398: 4878 0196 pea 196 <== NOT EXECUTED 5239c: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 523a2: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED =============================================================================== 000528e2 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 528e2: 4e56 ffd0 linkw %fp,#-48 528e6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 528ea: 246e 0008 moveal %fp@(8),%a2 528ee: 2a6e 0014 moveal %fp@(20),%a5 528f2: 262e 0018 movel %fp@(24),%d3 528f6: 282e 000c movel %fp@(12),%d4 528fa: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 528fe: 4a8a tstl %a2 52900: 6700 01f8 beqw 52afa if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 52904: 7405 moveq #5,%d2 52906: b4aa 0048 cmpl %a2@(72),%d2 5290a: 6600 01d2 bnew 52ade /* * Error check arguments */ assert( source ); 5290e: 4a8d tstl %a5 52910: 6700 0204 beqw 52b16 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 52914: 4a83 tstl %d3 52916: 6700 0190 beqw 52aa8 * 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 ) { 5291a: 2043 moveal %d3,%a0 5291c: d1c5 addal %d5,%a0 5291e: 2208 movel %a0,%d1 52920: 4280 clrl %d0 52922: 2c2a 004c movel %a2@(76),%d6 52926: 2e2a 0050 movel %a2@(80),%d7 5292a: 9e81 subl %d1,%d7 5292c: 9d80 subxl %d0,%d6 5292e: 6d00 011e bltw 52a4e /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 52932: 2439 0006 4734 movel 64734 ,%d2 52938: 2202 movel %d2,%d1 5293a: 5bc0 smi %d0 5293c: 49c0 extbl %d0 5293e: 2640 moveal %d0,%a3 52940: 2841 moveal %d1,%a4 52942: 2f0c movel %a4,%sp@- 52944: 2f00 movel %d0,%sp@- 52946: 2f05 movel %d5,%sp@- 52948: 2f04 movel %d4,%sp@- 5294a: 4eb9 0006 041c jsr 6041c <__moddi3> 52950: 4fef 0010 lea %sp@(16),%sp 52954: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 52956: 2f0c movel %a4,%sp@- 52958: 2f0b movel %a3,%sp@- 5295a: 2f05 movel %d5,%sp@- 5295c: 2f04 movel %d4,%sp@- 5295e: 4eb9 0006 0064 jsr 60064 <__divdi3> 52964: 4fef 0010 lea %sp@(16),%sp 52968: 2801 movel %d1,%d4 if ( start_offset ) { 5296a: 4a87 tstl %d7 5296c: 6700 00d8 beqw 52a46 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 ); 52970: 42a7 clrl %sp@- 52972: 2f01 movel %d1,%sp@- 52974: 2f0a movel %a2,%sp@- 52976: 4eb9 0005 20f8 jsr 520f8 assert( block_ptr ); 5297c: 4fef 000c lea %sp@(12),%sp 52980: 4a80 tstl %d0 52982: 6700 01ca beqw 52b4e */ 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; 52986: 9487 subl %d7,%d2 52988: b682 cmpl %d2,%d3 5298a: 6500 00f2 bcsw 52a7e 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 ); 5298e: 2f02 movel %d2,%sp@- 52990: 2040 moveal %d0,%a0 src += to_copy; 52992: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 block++; my_length -= to_copy; 52996: 9682 subl %d2,%d3 copied += to_copy; 52998: 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++; 5299a: 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 ); 5299c: 2f0d movel %a5,%sp@- 5299e: de90 addl %a0@,%d7 529a0: 2f07 movel %d7,%sp@- 529a2: 4eb9 0005 4cb0 jsr 54cb0 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 529a8: 2439 0006 4734 movel 64734 ,%d2 529ae: 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 ) { 529b2: b483 cmpl %d3,%d2 529b4: 623c bhis 529f2 529b6: 49f9 0005 20f8 lea 520f8 ,%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 ); 529bc: 4bf9 0005 4cb0 lea 54cb0 ,%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 ); 529c2: 42a7 clrl %sp@- 529c4: 2f04 movel %d4,%sp@- 529c6: 2f0a movel %a2,%sp@- 529c8: 4e94 jsr %a4@ assert( block_ptr ); 529ca: 4fef 000c lea %sp@(12),%sp 529ce: 4a80 tstl %d0 529d0: 6700 00f0 beqw 52ac2 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 ); 529d4: 2f02 movel %d2,%sp@- 529d6: 2040 moveal %d0,%a0 src += to_copy; block++; 529d8: 5284 addql #1,%d4 my_length -= to_copy; 529da: 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( 529dc: 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 ); 529de: 2f0b movel %a3,%sp@- 529e0: 2f10 movel %a0@,%sp@- src += to_copy; 529e2: 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 ); 529e4: 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 ) { 529e6: 4fef 000c lea %sp@(12),%sp 529ea: b6b9 0006 4734 cmpl 64734 ,%d3 529f0: 64d0 bccs 529c2 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 529f2: 4a83 tstl %d3 529f4: 672a beqs 52a20 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 529f6: 42a7 clrl %sp@- 529f8: 2f04 movel %d4,%sp@- 529fa: 2f0a movel %a2,%sp@- 529fc: 4eb9 0005 20f8 jsr 520f8 assert( block_ptr ); 52a02: 4fef 000c lea %sp@(12),%sp 52a06: 4a80 tstl %d0 52a08: 6700 0128 beqw 52b32 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 ); 52a0c: 2f03 movel %d3,%sp@- 52a0e: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 52a10: 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 ); 52a12: 2f0b movel %a3,%sp@- 52a14: 2f10 movel %a0@,%sp@- 52a16: 4eb9 0005 4cb0 jsr 54cb0 my_length = 0; copied += to_copy; 52a1c: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 52a20: 42a7 clrl %sp@- 52a22: 486e fff8 pea %fp@(-8) 52a26: 4eb9 0004 40b4 jsr 440b4 52a2c: 202e fff8 movel %fp@(-8),%d0 return copied; 52a30: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 52a32: 2540 0044 movel %d0,%a2@(68) 52a36: 2540 0040 movel %d0,%a2@(64) return copied; } 52a3a: 2005 movel %d5,%d0 52a3c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 52a42: 4e5e unlk %fp 52a44: 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 ) { 52a46: 264d moveal %a5,%a3 52a48: 4285 clrl %d5 52a4a: 6000 ff66 braw 529b2 * 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 ); 52a4e: 2f08 movel %a0,%sp@- 52a50: 2f00 movel %d0,%sp@- 52a52: 2f0a movel %a2,%sp@- 52a54: 4eb9 0005 266a jsr 5266a if ( status ) 52a5a: 4fef 000c lea %sp@(12),%sp 52a5e: 4a80 tstl %d0 52a60: 6700 fed0 beqw 52932 rtems_set_errno_and_return_minus_one( ENOSPC ); 52a64: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 52a6a: 7aff moveq #-1,%d5 <== NOT EXECUTED 52a6c: 781c moveq #28,%d4 <== NOT EXECUTED 52a6e: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52a70: 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 ); 52a72: 2084 movel %d4,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52a74: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52a7a: 4e5e unlk %fp <== NOT EXECUTED 52a7c: 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; 52a7e: 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 ); 52a80: 2040 moveal %d0,%a0 src += to_copy; 52a82: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 block++; my_length -= to_copy; 52a86: 9682 subl %d2,%d3 copied += to_copy; 52a88: 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++; 52a8a: 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 ); 52a8c: 2f02 movel %d2,%sp@- 52a8e: 2f0d movel %a5,%sp@- 52a90: de90 addl %a0@,%d7 52a92: 2f07 movel %d7,%sp@- 52a94: 4eb9 0005 4cb0 jsr 54cb0 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 52a9a: 2439 0006 4734 movel 64734 ,%d2 52aa0: 4fef 000c lea %sp@(12),%sp 52aa4: 6000 ff0c braw 529b2 * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 52aa8: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 52aae: 7aff moveq #-1,%d5 <== NOT EXECUTED 52ab0: 7c16 moveq #22,%d6 <== NOT EXECUTED 52ab2: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52ab4: 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 ); 52ab6: 2086 movel %d6,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52ab8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52abe: 4e5e unlk %fp <== NOT EXECUTED 52ac0: 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 ); 52ac2: 4879 0006 2cf0 pea 62cf0 <== NOT EXECUTED 52ac8: 4879 0006 2d69 pea 62d69 <__FUNCTION__.6253> <== NOT EXECUTED 52ace: 4878 0330 pea 330 <== NOT EXECUTED 52ad2: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52ad8: 4eb9 0004 fd00 jsr 4fd00 <__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 ); 52ade: 4879 0006 2cc0 pea 62cc0 <== NOT EXECUTED 52ae4: 4879 0006 2d69 pea 62d69 <__FUNCTION__.6253> <== NOT EXECUTED 52aea: 4878 02e7 pea 2e7 <== NOT EXECUTED 52aee: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52af4: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 52afa: 4879 0006 2c70 pea 62c70 <== NOT EXECUTED 52b00: 4879 0006 2d69 pea 62d69 <__FUNCTION__.6253> <== NOT EXECUTED 52b06: 4878 02e3 pea 2e3 <== NOT EXECUTED 52b0a: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52b10: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 52b16: 4879 0006 23d3 pea 623d3 <== NOT EXECUTED 52b1c: 4879 0006 2d69 pea 62d69 <__FUNCTION__.6253> <== NOT EXECUTED 52b22: 4878 02ef pea 2ef <== NOT EXECUTED 52b26: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52b2c: 4eb9 0004 fd00 jsr 4fd00 <__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 ); 52b32: 4879 0006 2cf0 pea 62cf0 <== NOT EXECUTED 52b38: 4879 0006 2d69 pea 62d69 <__FUNCTION__.6253> <== NOT EXECUTED 52b3e: 4878 0346 pea 346 <== NOT EXECUTED 52b42: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52b48: 4eb9 0004 fd00 jsr 4fd00 <__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 ); 52b4e: 4879 0006 2cf0 pea 62cf0 <== NOT EXECUTED 52b54: 4879 0006 2d69 pea 62d69 <__FUNCTION__.6253> <== NOT EXECUTED 52b5a: 4878 031c pea 31c <== NOT EXECUTED 52b5e: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52b64: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED =============================================================================== 0004a20c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a20c: 4e56 ffb0 linkw %fp,#-80 4a210: 48d7 007c moveml %d2-%d6,%sp@ 4a214: 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 ); 4a218: 260e movel %fp,%d3 4a21a: 0683 ffff ffc7 addil #-57,%d3 4a220: 2f02 movel %d2,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a222: 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 ); 4a226: 4eb9 0004 ffc0 jsr 4ffc0 4a22c: 588f addql #4,%sp 4a22e: 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 */ ) { 4a232: 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 ); 4a236: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a238: 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 ); 4a23c: 2f00 movel %d0,%sp@- 4a23e: 2f02 movel %d2,%sp@- 4a240: 4eb9 0004 9fd4 jsr 49fd4 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4a246: 4fef 0010 lea %sp@(16),%sp 4a24a: 2004 movel %d4,%d0 4a24c: 0280 0000 f000 andil #61440,%d0 4a252: 0c80 0000 4000 cmpil #16384,%d0 4a258: 675e beqs 4a2b8 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4a25a: 0c80 0000 8000 cmpil #32768,%d0 4a260: 6750 beqs 4a2b2 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4a262: 0c80 0000 6000 cmpil #24576,%d0 4a268: 673c beqs 4a2a6 4a26a: 0c80 0000 2000 cmpil #8192,%d0 4a270: 6734 beqs 4a2a6 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 4a272: 0c80 0000 1000 cmpil #4096,%d0 4a278: 6642 bnes 4a2bc <== NEVER TAKEN 4a27a: 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( 4a27e: 486e ffe8 pea %fp@(-24) 4a282: 2f04 movel %d4,%sp@- 4a284: 2f03 movel %d3,%sp@- 4a286: 2f00 movel %d0,%sp@- 4a288: 2f2e 0018 movel %fp@(24),%sp@- 4a28c: 4eb9 0004 d22c jsr 4d22c new_name, mode, &info ); if ( !new_node ) 4a292: 4fef 0014 lea %sp@(20),%sp 4a296: 4a80 tstl %d0 4a298: 673a beqs 4a2d4 <== NEVER TAKEN 4a29a: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4a29c: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 4a2a2: 4e5e unlk %fp 4a2a4: 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 ); 4a2a6: 2d46 ffe8 movel %d6,%fp@(-24) 4a2aa: 7002 moveq #2,%d0 4a2ac: 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) ) { 4a2b0: 60cc bras 4a27e /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4a2b2: 303c 0005 movew #5,%d0 4a2b6: 60c6 bras 4a27e 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 ); 4a2b8: 7001 moveq #1,%d0 4a2ba: 60c2 bras 4a27e 4a2bc: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 4a2c2: 7416 moveq #22,%d2 <== NOT EXECUTED 4a2c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a2c6: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a2c8: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4a2ca: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 4a2d0: 4e5e unlk %fp <== NOT EXECUTED 4a2d2: 4e75 rts <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4a2d4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 4a2da: 720c moveq #12,%d1 <== NOT EXECUTED 4a2dc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a2de: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4a2e0: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4a2e6: 2081 movel %d1,%a0@ <== NOT EXECUTED return 0; } 4a2e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043560 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 43560: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 43562: 4e56 0000 linkw %fp,#0 43566: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4356a: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4356e: b0a8 0048 cmpl %a0@(72),%d0 43572: 660a bnes 4357e <== 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; 43574: 2149 0058 movel %a1,%a0@(88) 43578: 4280 clrl %d0 return 0; } 4357a: 4e5e unlk %fp 4357c: 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 ); 4357e: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 43584: 7214 moveq #20,%d1 <== NOT EXECUTED 43586: 2040 moveal %d0,%a0 <== NOT EXECUTED 43588: 70ff moveq #-1,%d0 <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 4358a: 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 ); 4358c: 2081 movel %d1,%a0@ <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } =============================================================================== 000443f6 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 443f6: 4e56 0000 linkw %fp,#0 443fa: 2f0a movel %a2,%sp@- 443fc: 246e 0008 moveal %fp@(8),%a2 assert( the_jnode ); 44400: 4a8a tstl %a2 44402: 6700 01ee beqw 445f2 fprintf(stdout, "%s", the_jnode->name ); 44406: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 4440c: 2f28 0008 movel %a0@(8),%sp@- 44410: 486a 000c pea %a2@(12) 44414: 4eb9 0005 45d0 jsr 545d0 switch( the_jnode->type ) { 4441a: 202a 0048 movel %a2@(72),%d0 4441e: 508f addql #8,%sp 44420: 7207 moveq #7,%d1 44422: b280 cmpl %d0,%d1 44424: 6434 bccs 4445a <== ALWAYS TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 44426: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44428: 4879 0006 3a2e pea 63a2e <== NOT EXECUTED 4442e: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 <== NOT EXECUTED 44434: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44438: 4eb9 0005 4464 jsr 54464 <== NOT EXECUTED assert(0); 4443e: 4879 0006 2c29 pea 62c29 <== NOT EXECUTED 44444: 4879 0006 3b1e pea 63b1e <__FUNCTION__.6573> <== NOT EXECUTED 4444a: 4878 006c pea 6c <== NOT EXECUTED 4444e: 4879 0006 3990 pea 63990 <== NOT EXECUTED 44454: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 4445a: 323b 0a08 movew %pc@(44464 ,%d0:l:2),%d1 4445e: 48c1 extl %d1 44460: 4efb 1802 jmp %pc@(44464 ,%d1:l) 44464: ffc2 0177702 <== NOT EXECUTED 44466: 0162 bchg %d0,%a2@- <== NOT EXECUTED 44468: 012a 00f0 btst %d0,%a2@(240) <== NOT EXECUTED 4446c: 00b6 0082 004a oril #8519754,%d6 <== NOT EXECUTED 44472: 0010 020 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 44474: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 <== NOT EXECUTED 4447a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4447e: 4878 0012 pea 12 <== NOT EXECUTED 44482: 4878 0001 pea 1 <== NOT EXECUTED 44486: 4879 0006 3a1b pea 63a1b <== NOT EXECUTED 4448c: 4eb9 0005 5198 jsr 55198 <== NOT EXECUTED assert(0); 44492: 4879 0006 2c29 pea 62c29 <== NOT EXECUTED 44498: 4879 0006 3b1e pea 63b1e <__FUNCTION__.6573> <== NOT EXECUTED 4449e: 4878 0067 pea 67 <== NOT EXECUTED 444a2: 4879 0006 3990 pea 63990 <== NOT EXECUTED 444a8: 4eb9 0004 503c jsr 4503c <__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)", 444ae: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 444b2: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 444b6: 4879 0006 39ec pea 639ec <== NOT EXECUTED 444bc: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 <== NOT EXECUTED 444c2: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 444c6: 4eb9 0005 4464 jsr 54464 <== NOT EXECUTED fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 444cc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 444d0: 203c 0006 4168 movel #409960,%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; 444d6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 444da: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 444de: 4e5e unlk %fp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 444e0: 4ef9 0005 5ec8 jmp 55ec8 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 444e6: 2f2a 0050 movel %a2@(80),%sp@- 444ea: 4879 0006 39fb pea 639fb 444f0: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 444f6: 2f28 0008 movel %a0@(8),%sp@- 444fa: 4eb9 0005 4464 jsr 54464 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 44500: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44504: 203c 0006 4168 movel #409960,%d0 ); #else fprintf(stdout, " (file %" PRId32 ")", (uint32_t)the_jnode->info.file.size ); #endif break; 4450a: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 4450e: 2d40 0008 movel %d0,%fp@(8) } 44512: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 44514: 4ef9 0005 5ec8 jmp 55ec8 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 4451a: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 <== NOT EXECUTED 44520: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44524: 4878 0013 pea 13 <== NOT EXECUTED 44528: 4878 0001 pea 1 <== NOT EXECUTED 4452c: 4879 0006 3a07 pea 63a07 <== NOT EXECUTED 44532: 4eb9 0005 5198 jsr 55198 <== NOT EXECUTED assert(0); 44538: 4879 0006 2c29 pea 62c29 <== NOT EXECUTED 4453e: 4879 0006 3b1e pea 63b1e <__FUNCTION__.6573> <== NOT EXECUTED 44544: 4878 0062 pea 62 <== NOT EXECUTED 44548: 4879 0006 3990 pea 63990 <== NOT EXECUTED 4454e: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 44554: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 <== NOT EXECUTED 4455a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4455e: 4878 0013 pea 13 <== NOT EXECUTED 44562: 4878 0001 pea 1 <== NOT EXECUTED 44566: 4879 0006 3a07 pea 63a07 <== NOT EXECUTED 4456c: 4eb9 0005 5198 jsr 55198 <== NOT EXECUTED assert(0); 44572: 4879 0006 2c29 pea 62c29 <== NOT EXECUTED 44578: 4879 0006 3b1e pea 63b1e <__FUNCTION__.6573> <== NOT EXECUTED 4457e: 4878 005d pea 5d <== NOT EXECUTED 44582: 4879 0006 3990 pea 63990 <== NOT EXECUTED 44588: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4458e: 2f2a 0050 movel %a2@(80),%sp@- 44592: 2f2a 004c movel %a2@(76),%sp@- 44596: 4879 0006 39d9 pea 639d9 4459c: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 445a2: 2f28 0008 movel %a0@(8),%sp@- 445a6: 4eb9 0005 4464 jsr 54464 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 445ac: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445b0: 203c 0006 4168 movel #409960,%d0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; 445b6: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445ba: 2d40 0008 movel %d0,%fp@(8) } 445be: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445c0: 4ef9 0005 5ec8 jmp 55ec8 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 445c6: 2079 0006 5560 moveal 65560 <_impure_ptr>,%a0 445cc: 2f28 0008 movel %a0@(8),%sp@- 445d0: 4878 002f pea 2f 445d4: 4eb9 0005 44a4 jsr 544a4 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 445da: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445de: 203c 0006 4168 movel #409960,%d0 fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; 445e4: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445e6: 2d40 0008 movel %d0,%fp@(8) } 445ea: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 445ec: 4ef9 0005 5ec8 jmp 55ec8 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 445f2: 4879 0006 3986 pea 63986 <== NOT EXECUTED 445f8: 4879 0006 3b1e pea 63b1e <__FUNCTION__.6573> <== NOT EXECUTED 445fe: 4878 0038 pea 38 <== NOT EXECUTED 44602: 4879 0006 3990 pea 63990 <== NOT EXECUTED 44608: 4eb9 0004 503c jsr 4503c <__assert_func> <== NOT EXECUTED =============================================================================== 000435a4 : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 435a4: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 435a6: 4e56 fff4 linkw %fp,#-12 435aa: 206e 0008 moveal %fp@(8),%a0 435ae: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ IMFS_jnode_t *node; int i; node = loc->node_access; 435b2: 2450 moveal %a0@,%a2 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 435b4: 266e 000c moveal %fp@(12),%a3 435b8: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 435bc: b0aa 0048 cmpl %a2@(72),%d0 435c0: 663c bnes 435fe <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 435c2: 4a82 tstl %d2 435c4: 672c beqs 435f2 <== NEVER TAKEN 435c6: 206a 004c moveal %a2@(76),%a0 435ca: 1210 moveb %a0@,%d1 435cc: 6724 beqs 435f2 <== NEVER TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 435ce: 91c8 subal %a0,%a0 435d0: 4280 clrl %d0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 435d2: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 435d4: 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++ ) 435d8: 2040 moveal %d0,%a0 435da: b082 cmpl %d2,%d0 435dc: 640a bccs 435e8 435de: 226a 004c moveal %a2@(76),%a1 435e2: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 435e6: 66ea bnes 435d2 buf[i] = node->info.sym_link.name[i]; return i; } 435e8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 435ee: 4e5e unlk %fp 435f0: 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++ ) 435f2: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 435f4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 435fa: 4e5e unlk %fp <== NOT EXECUTED 435fc: 4e75 rts <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 435fe: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 43604: 7216 moveq #22,%d1 <== NOT EXECUTED 43606: 2040 moveal %d0,%a0 <== NOT EXECUTED 43608: 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; } 4360a: 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 ); 43610: 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; } 43612: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00043618 : 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 */ ) { 43618: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 4361c: 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 */ ) { 43620: 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 ); 43622: 4878 0020 pea 20 43626: 2f2e 0014 movel %fp@(20),%sp@- ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 4362a: 2450 moveal %a0@,%a2 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 4362c: 486a 000c pea %a2@(12) 43630: 4eb9 0005 5824 jsr 55824 if ( the_jnode->Parent != NULL ) 43636: 4fef 000c lea %sp@(12),%sp 4363a: 4aaa 0008 tstl %a2@(8) 4363e: 670a beqs 4364a <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 43640: 2f0a movel %a2,%sp@- 43642: 4eb9 0004 8774 jsr 48774 <_Chain_Extract> 43648: 588f addql #4,%sp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 4364a: 206e 0010 moveal %fp@(16),%a0 4364e: 2050 moveal %a0@,%a0 the_jnode->Parent = new_parent; 43650: 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 ); 43654: 2f0a movel %a2,%sp@- 43656: 4868 004c pea %a0@(76) 4365a: 4eb9 0004 873c jsr 4873c <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 43660: 42a7 clrl %sp@- 43662: 486e fff8 pea %fp@(-8) 43666: 4eb9 0004 40b4 jsr 440b4 4366c: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 43672: 4280 clrl %d0 43674: 246e fff4 moveal %fp@(-12),%a2 43678: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a300 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4a300: 4e56 fff8 linkw %fp,#-8 4a304: 2f0b movel %a3,%sp@- 4a306: 266e 000c moveal %fp@(12),%a3 4a30a: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4a30c: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4a30e: 4aaa 0008 tstl %a2@(8) 4a312: 670e beqs 4a322 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4a314: 2f0a movel %a2,%sp@- 4a316: 4eb9 0004 b998 jsr 4b998 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4a31c: 588f addql #4,%sp 4a31e: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4a322: 302a 0032 movew %a2@(50),%d0 4a326: 5380 subql #1,%d0 4a328: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4a32c: 42a7 clrl %sp@- 4a32e: 486e fff8 pea %fp@(-8) 4a332: 4eb9 0004 a894 jsr 4a894 4a338: 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) ) { 4a33e: 2f0a movel %a2,%sp@- 4a340: 4eb9 0004 a96e jsr 4a96e 4a346: 4fef 000c lea %sp@(12),%sp 4a34a: 4a80 tstl %d0 4a34c: 6628 bnes 4a376 <== NEVER TAKEN 4a34e: 4a6a 0032 tstw %a2@(50) 4a352: 6622 bnes 4a376 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4a354: 2079 0005 d824 moveal 5d824 ,%a0 4a35a: 2653 moveal %a3@,%a3 4a35c: b7e8 0004 cmpal %a0@(4),%a3 4a360: 6736 beqs 4a398 <== NEVER TAKEN 4a362: 47f9 0004 a6f4 lea 4a6f4 ,%a3 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4a368: 7004 moveq #4,%d0 4a36a: b0aa 0048 cmpl %a2@(72),%d0 4a36e: 6714 beqs 4a384 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 4a370: 2f0a movel %a2,%sp@- 4a372: 4e93 jsr %a3@ 4a374: 588f addql #4,%sp } return 0; } 4a376: 246e fff0 moveal %fp@(-16),%a2 4a37a: 4280 clrl %d0 4a37c: 266e fff4 moveal %fp@(-12),%a3 4a380: 4e5e unlk %fp 4a382: 4e75 rts /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4a384: 202a 004c movel %a2@(76),%d0 4a388: 67e6 beqs 4a370 <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 4a38a: 2f00 movel %d0,%sp@- 4a38c: 4e93 jsr %a3@ 4a38e: 588f addql #4,%sp } free( the_jnode ); 4a390: 2f0a movel %a2,%sp@- 4a392: 4e93 jsr %a3@ 4a394: 588f addql #4,%sp 4a396: 60de bras 4a376 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 4a398: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED 4a39c: 47f9 0004 a6f4 lea 4a6f4 ,%a3 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4a3a2: 7004 moveq #4,%d0 <== NOT EXECUTED 4a3a4: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4a3a8: 66c6 bnes 4a370 <== NOT EXECUTED 4a3aa: 60d8 bras 4a384 <== NOT EXECUTED =============================================================================== 0004a3ac : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4a3ac: 7007 moveq #7,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4a3ae: 4e56 0000 linkw %fp,#0 4a3b2: 206e 000c moveal %fp@(12),%a0 4a3b6: 2f0a movel %a2,%sp@- 4a3b8: 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; 4a3bc: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 4a3be: b0a9 0048 cmpl %a1@(72),%d0 4a3c2: 6418 bccs 4a3dc <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a3c4: 4eb9 0004 ebf4 jsr 4ebf4 <__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; } 4a3ca: 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 ); 4a3ce: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a3d0: 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; } 4a3d2: 4e5e unlk %fp <== NOT EXECUTED case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a3d4: 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; } 4a3da: 4e75 rts <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4a3dc: 2029 0048 movel %a1@(72),%d0 4a3e0: d080 addl %d0,%d0 4a3e2: 303b 0808 movew %pc@(4a3ec ,%d0:l),%d0 4a3e6: 48c0 extl %d0 4a3e8: 4efb 0802 jmp %pc@(4a3ec ,%d0:l) 4a3ec: ffd8 0177730 <== NOT EXECUTED 4a3ee: ffd8 0177730 <== NOT EXECUTED 4a3f0: 00c2 bitrev %d2 <== NOT EXECUTED 4a3f2: ffd8 0177730 <== NOT EXECUTED 4a3f4: 0010 020 <== NOT EXECUTED 4a3f6: 006a 0152 <== NOT EXECUTED 4a3f8: 006a 0152 <== NOT EXECUTED 4a3fa: 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 ); 4a3fc: 246a 0010 moveal %a2@(16),%a2 <== NOT EXECUTED buf->st_mode = the_jnode->st_mode; 4a400: 2169 002e 000c movel %a1@(46),%a0@(12) <== NOT EXECUTED buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a406: 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 ); 4a40c: 246a 0034 moveal %a2@(52),%a2 <== NOT EXECUTED buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4a410: 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; 4a416: 4280 clrl %d0 <== NOT EXECUTED 4a418: 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; 4a41a: 2169 003c 0026 movel %a1@(60),%a0@(38) <== NOT EXECUTED buf->st_mtime = the_jnode->stat_mtime; 4a420: 2169 0040 002e movel %a1@(64),%a0@(46) <== NOT EXECUTED buf->st_ctime = the_jnode->stat_ctime; 4a426: 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; 4a42c: 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; 4a432: 2140 001e movel %d0,%a0@(30) <== NOT EXECUTED 4a436: 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 ); 4a43a: 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; 4a43c: 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; 4a43e: 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 = 4a444: 2141 0004 movel %d1,%a0@(4) <== NOT EXECUTED 4a448: 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; } 4a44e: 246e fffc moveal %fp@(-4),%a2 4a452: 4e5e unlk %fp 4a454: 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 ); 4a456: 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; 4a45a: 2029 004c movel %a1@(76),%d0 4a45e: 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; 4a462: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a468: 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; 4a46e: 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 ); 4a474: 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; 4a478: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4a47e: 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; 4a484: 2140 001e movel %d0,%a0@(30) 4a488: 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; 4a48c: 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 ); 4a492: 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; 4a494: 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; 4a496: 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 = 4a49c: 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; 4a4a0: 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 = 4a4a6: 20bc 0000 fffe movel #65534,%a0@ 4a4ac: 60a0 bras 4a44e switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4a4ae: 2029 0050 movel %a1@(80),%d0 4a4b2: 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; 4a4b8: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a4be: 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 ); 4a4c4: 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; 4a4c8: 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 ); 4a4ce: 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; 4a4d2: 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 ); 4a4d8: 2212 movel %a2@,%d1 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4a4da: 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; 4a4e0: 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; 4a4e6: 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 ); 4a4ec: 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; 4a4f0: 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 = 4a4f2: 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; 4a4f6: 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 = 4a4fc: 20bc 0000 fffe movel #65534,%a0@ 4a502: 6000 ff4a braw 4a44e ... =============================================================================== 0004367c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4367c: 4e56 ffc4 linkw %fp,#-60 43680: 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 ); 43682: 260e movel %fp,%d3 43684: 0683 ffff ffc7 addil #-57,%d3 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4368a: 2f02 movel %d2,%sp@- 4368c: 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 ); 43690: 2f02 movel %d2,%sp@- 43692: 4eb9 0005 580c jsr 5580c 43698: 588f addql #4,%sp 4369a: 486e fffc pea %fp@(-4) 4369e: 2f03 movel %d3,%sp@- 436a0: 2f00 movel %d0,%sp@- 436a2: 2f02 movel %d2,%sp@- 436a4: 4eb9 0004 fa00 jsr 4fa00 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 436aa: 2f2e 000c movel %fp@(12),%sp@- 436ae: 4eb9 0005 537c jsr 5537c if (info.sym_link.name == NULL) { 436b4: 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); 436b8: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 436bc: 6730 beqs 436ee <== 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( 436be: 486e ffe8 pea %fp@(-24) 436c2: 2f3c 0000 a1ff movel #41471,%sp@- 436c8: 2f03 movel %d3,%sp@- 436ca: 4878 0004 pea 4 436ce: 2f2e 0008 movel %fp@(8),%sp@- 436d2: 4eb9 0004 ebc4 jsr 4ebc4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 436d8: 4fef 0014 lea %sp@(20),%sp 436dc: 4a80 tstl %d0 436de: 6728 beqs 43708 <== NEVER TAKEN free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 436e0: 242e ffbc movel %fp@(-68),%d2 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 436e4: 4280 clrl %d0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 436e6: 262e ffc0 movel %fp@(-64),%d3 436ea: 4e5e unlk %fp 436ec: 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); 436ee: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 436f4: 740c moveq #12,%d2 <== NOT EXECUTED 436f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 436f8: 70ff moveq #-1,%d0 <== NOT EXECUTED 436fa: 2082 movel %d2,%a0@ <== NOT EXECUTED free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 436fc: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 43700: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 43704: 4e5e unlk %fp <== NOT EXECUTED 43706: 4e75 rts <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 43708: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 4370c: 4eb9 0004 4024 jsr 44024 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 43712: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED } return 0; } 43718: 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); 4371c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4371e: 720c moveq #12,%d1 <== NOT EXECUTED 43720: 588f addql #4,%sp <== NOT EXECUTED 43722: 70ff moveq #-1,%d0 <== NOT EXECUTED } return 0; } 43724: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 43728: 4e5e unlk %fp <== NOT EXECUTED &info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); 4372a: 2081 movel %d1,%a0@ <== NOT EXECUTED } return 0; } ... =============================================================================== 00043730 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 43730: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 43732: 4e56 ffd0 linkw %fp,#-48 43736: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4373a: 246e 000c moveal %fp@(12),%a2 4373e: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 43742: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 43744: b0ab 0048 cmpl %a3@(72),%d0 43748: 671a beqs 43764 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 4374a: 2f0a movel %a2,%sp@- 4374c: 206a 0008 moveal %a2@(8),%a0 43750: 2f02 movel %d2,%sp@- 43752: 2068 0034 moveal %a0@(52),%a0 43756: 4e90 jsr %a0@ return result; 43758: 508f addql #8,%sp } 4375a: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 43760: 4e5e unlk %fp 43762: 4e75 rts * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 43764: 202b 004c movel %a3@(76),%d0 43768: 6700 0090 beqw 437fa rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 4376c: 41ea 0004 lea %a2@(4),%a0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 43770: 260e movel %fp,%d3 43772: 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) 43778: 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; 4377a: 2d58 ffe8 movel %a0@+,%fp@(-24) 4377e: 2d58 ffec movel %a0@+,%fp@(-20) 43782: 2d58 fff0 movel %a0@+,%fp@(-16) 43786: 2d50 fff4 movel %a0@,%fp@(-12) the_link.node_access = node->info.hard_link.link_node; 4378a: 2d40 ffe4 movel %d0,%fp@(-28) IMFS_Set_handlers( &the_link ); 4378e: 2f03 movel %d3,%sp@- 43790: 4eb9 0004 edcc jsr 4edcc /* * 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) 43796: 206b 004c moveal %a3@(76),%a0 4379a: 4281 clrl %d1 4379c: 588f addql #4,%sp 4379e: 3028 0032 movew %a0@(50),%d0 437a2: 3200 movew %d0,%d1 437a4: b881 cmpl %d1,%d4 437a6: 6730 beqs 437d8 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 437a8: 5380 subql #1,%d0 437aa: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 437ae: 42a7 clrl %sp@- 437b0: 486e fff8 pea %fp@(-8) 437b4: 4eb9 0004 40b4 jsr 440b4 437ba: 206b 004c moveal %a3@(76),%a0 437be: 508f addql #8,%sp 437c0: 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 ); 437c6: 2f0a movel %a2,%sp@- 437c8: 206a 0008 moveal %a2@(8),%a0 437cc: 2f02 movel %d2,%sp@- 437ce: 2068 0034 moveal %a0@(52),%a0 437d2: 4e90 jsr %a0@ return result; 437d4: 508f addql #8,%sp 437d6: 6082 bras 4375a * 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 ); 437d8: 2f03 movel %d3,%sp@- 437da: 2f02 movel %d2,%sp@- 437dc: 206e ffec moveal %fp@(-20),%a0 437e0: 2068 0034 moveal %a0@(52),%a0 437e4: 4e90 jsr %a0@ if ( result != 0 ) 437e6: 508f addql #8,%sp 437e8: 4a80 tstl %d0 437ea: 6700 ff5e beqw 4374a 437ee: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 437f0: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 437f6: 4e5e unlk %fp 437f8: 4e75 rts */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 437fa: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 43800: 7216 moveq #22,%d1 <== NOT EXECUTED 43802: 2040 moveal %d0,%a0 <== NOT EXECUTED 43804: 70ff moveq #-1,%d0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 43806: 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 ); 4380c: 2081 movel %d1,%a0@ <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 4380e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00043814 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 43814: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 43816: 4e56 0000 linkw %fp,#0 4381a: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4381e: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 43822: b0a8 0048 cmpl %a0@(72),%d0 43826: 6610 bnes 43838 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 43828: 4aa8 0058 tstl %a0@(88) 4382c: 671c beqs 4384a <== 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; 4382e: 42a8 0058 clrl %a0@(88) 43832: 4280 clrl %d0 return 0; } 43834: 4e5e unlk %fp 43836: 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 ); 43838: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 4383e: 7214 moveq #20,%d1 <== NOT EXECUTED 43840: 2040 moveal %d0,%a0 <== NOT EXECUTED 43842: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 43844: 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 ); 43846: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 43848: 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 */ 4384a: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 43850: 7216 moveq #22,%d1 <== NOT EXECUTED 43852: 2040 moveal %d0,%a0 <== NOT EXECUTED 43854: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 43856: 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 */ 43858: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } =============================================================================== 000428b4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 428b4: 4e56 0000 linkw %fp,#0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 428b8: 2079 0005 dda6 moveal 5dda6 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 428be: 2f03 movel %d3,%sp@- 428c0: 262e 0008 movel %fp@(8),%d3 428c4: 2f02 movel %d2,%sp@- 428c6: 242e 000c movel %fp@(12),%d2 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 428ca: 4a88 tstl %a0 428cc: 6704 beqs 428d2 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 428ce: 2050 moveal %a0@,%a0 <== NOT EXECUTED 428d0: 4e90 jsr %a0@ <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 428d2: 4eb9 0004 ac10 jsr 4ac10 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 428d8: 2079 0005 ddaa moveal 5ddaa ,%a0 428de: 4a88 tstl %a0 428e0: 6712 beqs 428f4 <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 428e2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 428e6: 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)( 428e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 428ea: 2050 moveal %a0@,%a0 <== NOT EXECUTED 428ec: 4e90 jsr %a0@ <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 428ee: 508f addql #8,%sp <== NOT EXECUTED 428f0: 9480 subl %d0,%d2 <== NOT EXECUTED 428f2: 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 ( 428f4: 4a39 0005 dda5 tstb 5dda5 428fa: 6624 bnes 42920 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 428fc: 4a39 0005 d7ec tstb 5d7ec 42902: 6644 bnes 42948 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 42904: 4878 0004 pea 4 42908: 2f02 movel %d2,%sp@- 4290a: 2f03 movel %d3,%sp@- 4290c: 2f39 0005 d720 movel 5d720 ,%sp@- 42912: 4eb9 0004 6c60 jsr 46c60 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42918: 4fef 0010 lea %sp@(16),%sp 4291c: 4a80 tstl %d0 4291e: 675c beqs 4297c <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42920: 2f39 0005 d720 movel 5d720 ,%sp@- 42926: 2439 0005 ee24 movel 5ee24 ,%d2 4292c: 4eb9 0004 7824 jsr 47824 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42932: 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) ); 42936: d082 addl %d2,%d0 42938: 588f addql #4,%sp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 4293a: 242e fff8 movel %fp@(-8),%d2 4293e: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42940: 23c0 0005 ee24 movel %d0,5ee24 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42946: 4e75 rts if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 42948: 2f02 movel %d2,%sp@- 4294a: 42a7 clrl %sp@- 4294c: 2f03 movel %d3,%sp@- 4294e: 4eb9 0004 f484 jsr 4f484 * 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 ) { 42954: 4fef 000c lea %sp@(12),%sp 42958: 4a39 0005 dda5 tstb 5dda5 4295e: 66c0 bnes 42920 <== NEVER TAKEN 42960: 4878 0004 pea 4 42964: 2f02 movel %d2,%sp@- 42966: 2f03 movel %d3,%sp@- 42968: 2f39 0005 d720 movel 5d720 ,%sp@- 4296e: 4eb9 0004 6c60 jsr 46c60 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42974: 4fef 0010 lea %sp@(16),%sp 42978: 4a80 tstl %d0 4297a: 66a4 bnes 42920 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 4297c: 4878 001a pea 1a <== NOT EXECUTED 42980: 4eb9 0004 6458 jsr 46458 <== 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 ecdc moveal 5ecdc ,%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 00be lea %a2@(190),%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 00fe movel %a2@(254),%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 5f54 jsr 45f54 <== NOT EXECUTED 42170: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42172: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42176: 4879 0005 c716 pea 5c716 <== NOT EXECUTED 4217c: 2f39 0005 ecd8 movel 5ecd8 ,%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 c731 pea 5c731 <== NOT EXECUTED 421a0: 2f39 0005 ecd8 movel 5ecd8 ,%sp@- <== NOT EXECUTED 421a6: 2079 0005 ecdc moveal 5ecdc ,%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 ecd4 tstl 5ecd4 <== 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 c75c pea 5c75c <== NOT EXECUTED 421c2: 2f39 0005 ecd8 movel 5ecd8 ,%sp@- <== NOT EXECUTED 421c8: 2079 0005 ecdc moveal 5ecdc ,%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 c74f pea 5c74f <== NOT EXECUTED 421e4: 2f39 0005 ecd8 movel 5ecd8 ,%sp@- <== NOT EXECUTED 421ea: 2079 0005 ecdc moveal 5ecdc ,%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 0005 f4f4 tstl 5f4f4 <== NOT EXECUTED 42204: 67ce beqs 421d4 <== NOT EXECUTED 42206: 47f9 0005 f4f0 lea 5f4f0 ,%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 c723 pea 5c723 <== NOT EXECUTED 42246: 2f39 0005 ecd8 movel 5ecd8 ,%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 c731 pea 5c731 <== NOT EXECUTED 4226a: 2f39 0005 ecd8 movel 5ecd8 ,%sp@- <== NOT EXECUTED 42270: 2079 0005 ecdc moveal 5ecdc ,%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 ecd4 tstl 5ecd4 <== 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 ecd4 tstl 5ecd4 424d2: 6656 bnes 4252a 424d4: 41f9 0005 f4e0 lea 5f4e0 ,%a0 424da: 4280 clrl %d0 424dc: 43f9 0005 c894 lea 5c894 ,%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 0005 f66c movel 5f66c <_CPU_Interrupt_stack_low>,%d0 424f8: 6728 beqs 42522 <== NEVER TAKEN 424fa: 2239 0005 f610 movel 5f610 <_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 0005 f4f4 movel %d0,5f4f4 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 0005 f4f0 movel %d1,5f4f0 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42518: 4eb9 0004 fa60 jsr 4fa60 4251e: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 42522: 7001 moveq #1,%d0 42524: 23c0 0005 ecd4 movel %d0,5ecd4 } 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 c7c3 pea 5c7c3 <== NOT EXECUTED 42312: 47f9 0004 385c lea 4385c ,%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 00c2 moveal %a2@(194),%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 c7d3 pea 5c7d3 <== 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 c7f0 pea 5c7f0 <== NOT EXECUTED 4233a: 4e93 jsr %a3@ <== NOT EXECUTED printk( 4233c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 42340: 4879 0005 c802 pea 5c802 <== 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 5f54 jsr 45f54 <== NOT EXECUTED 4235a: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 4235e: 2e80 movel %d0,%sp@ <== NOT EXECUTED 42360: 4879 0005 c816 pea 5c816 <== 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 00be movel %a2@(190),%d0 <== NOT EXECUTED 4236c: 206a 00c2 moveal %a2@(194),%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 c82c pea 5c82c <== 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 68dc jsr 468dc <== 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 c85d pea 5c85d <== 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 68dc jsr 468dc <== NOT EXECUTED =============================================================================== 0004a6b2 : *************************************************************************/ int Untar_FromFile( const char *tar_name ) { 4a6b2: 4e56 fef4 linkw %fp,#-268 <== NOT EXECUTED 4a6b6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED unsigned long size; unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); 4a6ba: 4878 0200 pea 200 <== NOT EXECUTED 4a6be: 4eb9 0004 3900 jsr 43900 <== NOT EXECUTED if (bufr == NULL) 4a6c4: 588f addql #4,%sp <== NOT EXECUTED unsigned long size; unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); 4a6c6: 2440 moveal %d0,%a2 <== NOT EXECUTED if (bufr == NULL) 4a6c8: 4a80 tstl %d0 <== NOT EXECUTED 4a6ca: 6700 02a4 beqw 4a970 <== NOT EXECUTED { return(UNTAR_FAIL); } fd = open(tar_name, O_RDONLY); 4a6ce: 42a7 clrl %sp@- <== NOT EXECUTED 4a6d0: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 4a6d4: 2600 movel %d0,%d3 <== NOT EXECUTED if ((n = read(fd, bufr, 512)) != 512) { break; } if (strncmp(&bufr[257], "ustar ", 7)) 4a6d6: 41ea 0101 lea %a2@(257),%a0 <== NOT EXECUTED } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; 4a6da: 4bea 007c lea %a2@(124),%a5 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 4a6de: 2800 movel %d0,%d4 <== NOT EXECUTED 4a6e0: 47f9 0004 440c lea 4440c ,%a3 <== NOT EXECUTED if (strncmp(&bufr[257], "ustar ", 7)) { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 4a6e6: 49f9 0005 2f7c lea 52f7c ,%a4 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 4a6ec: 0683 0000 0088 addil #136,%d3 <== NOT EXECUTED 4a6f2: 0684 0000 009c addil #156,%d4 <== NOT EXECUTED if ((n = read(fd, bufr, 512)) != 512) { break; } if (strncmp(&bufr[257], "ustar ", 7)) 4a6f8: 2d48 ff34 movel %a0,%fp@(-204) <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4a6fc: 41ea 0094 lea %a2@(148),%a0 <== NOT EXECUTED } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; 4a700: 2d4d ff30 movel %a5,%fp@(-208) <== NOT EXECUTED * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 4a704: 4bea 009d lea %a2@(157),%a5 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4a708: 2d48 ff2c movel %a0,%fp@(-212) <== NOT EXECUTED * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 4a70c: 2d4d ff24 movel %a5,%fp@(-220) <== NOT EXECUTED if (bufr == NULL) { return(UNTAR_FAIL); } fd = open(tar_name, O_RDONLY); 4a710: 4eb9 0004 416c jsr 4416c <== NOT EXECUTED 4a716: 508f addql #8,%sp <== NOT EXECUTED 4a718: 2c00 movel %d0,%d6 <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) 4a71a: 4878 0200 pea 200 <== NOT EXECUTED 4a71e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a720: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4a722: 4e93 jsr %a3@ <== NOT EXECUTED 4a724: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a728: 0c80 0000 0200 cmpil #512,%d0 <== NOT EXECUTED 4a72e: 6600 010e bnew 4a83e <== NOT EXECUTED { break; } if (strncmp(&bufr[257], "ustar ", 7)) 4a732: 4878 0007 pea 7 <== NOT EXECUTED 4a736: 4879 0005 fd7e pea 5fd7e <_CPU_m68k_BFFFO_table+0x100> <== NOT EXECUTED 4a73c: 2f2e ff34 movel %fp@(-204),%sp@- <== NOT EXECUTED 4a740: 4eb9 0005 2eb4 jsr 52eb4 <== NOT EXECUTED 4a746: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a74a: 4a80 tstl %d0 <== NOT EXECUTED 4a74c: 6600 00f0 bnew 4a83e <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 4a750: 4878 0063 pea 63 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 4a754: 4282 clrl %d2 <== NOT EXECUTED if (strncmp(&bufr[257], "ustar ", 7)) { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 4a756: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a758: 486e ff9c pea %fp@(-100) <== NOT EXECUTED 4a75c: 4e94 jsr %a4@ <== NOT EXECUTED fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; 4a75e: 206e ff30 moveal %fp@(-208),%a0 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 4a762: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; 4a766: 4200 clrb %d0 <== NOT EXECUTED 4a768: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED linkflag = bufr[156]; 4a76c: 122a 009c moveb %a2@(156),%d1 <== NOT EXECUTED 4a770: 3241 moveaw %d1,%a1 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a772: 2a02 movel %d2,%d5 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a774: 7e09 moveq #9,%d7 <== NOT EXECUTED 4a776: 1010 moveb %a0@,%d0 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a778: e78d lsll #3,%d5 <== NOT EXECUTED 4a77a: 5288 addql #1,%a0 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a77c: 2200 movel %d0,%d1 <== NOT EXECUTED 4a77e: 0681 ffff ffd0 addil #-48,%d1 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a784: 49c0 extbl %d0 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a786: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 4a78c: be81 cmpl %d1,%d7 <== NOT EXECUTED 4a78e: 6508 bcss 4a798 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a790: 2a45 moveal %d5,%a5 <== NOT EXECUTED 4a792: 4bf5 08d0 lea %a5@(ffffffd0,%d0:l),%a5 <== NOT EXECUTED 4a796: 240d movel %a5,%d2 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4a798: b688 cmpl %a0,%d3 <== NOT EXECUTED 4a79a: 66d6 bnes 4a772 <== NOT EXECUTED 4a79c: 206e ff2c moveal %fp@(-212),%a0 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 4a7a0: 4285 clrl %d5 <== NOT EXECUTED 4a7a2: 2d42 ff28 movel %d2,%fp@(-216) <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a7a6: 2e05 movel %d5,%d7 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a7a8: 7409 moveq #9,%d2 <== NOT EXECUTED 4a7aa: 1010 moveb %a0@,%d0 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a7ac: e78f lsll #3,%d7 <== NOT EXECUTED 4a7ae: 5288 addql #1,%a0 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a7b0: 2200 movel %d0,%d1 <== NOT EXECUTED 4a7b2: 0681 ffff ffd0 addil #-48,%d1 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a7b8: 49c0 extbl %d0 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a7ba: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 4a7c0: b481 cmpl %d1,%d2 <== NOT EXECUTED 4a7c2: 6508 bcss 4a7cc <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a7c4: 2a47 moveal %d7,%a5 <== NOT EXECUTED 4a7c6: 4bf5 08d0 lea %a5@(ffffffd0,%d0:l),%a5 <== NOT EXECUTED 4a7ca: 2a0d movel %a5,%d5 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4a7cc: b888 cmpl %a0,%d4 <== NOT EXECUTED 4a7ce: 66d6 bnes 4a7a6 <== NOT EXECUTED 4a7d0: 242e ff28 movel %fp@(-216),%d2 <== NOT EXECUTED 4a7d4: 4281 clrl %d1 <== NOT EXECUTED 4a7d6: 4280 clrl %d0 <== NOT EXECUTED int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) 4a7d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7da: 41e8 ff6c lea %a0@(-148),%a0 <== NOT EXECUTED 4a7de: 7e07 moveq #7,%d7 <== NOT EXECUTED 4a7e0: be88 cmpl %a0,%d7 <== NOT EXECUTED 4a7e2: 657a bcss 4a85e <== NOT EXECUTED sum += 0xff & ' '; 4a7e4: 0681 0000 0020 addil #32,%d1 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4a7ea: 5280 addql #1,%d0 <== NOT EXECUTED 4a7ec: 0c80 0000 0200 cmpil #512,%d0 <== NOT EXECUTED 4a7f2: 66e4 bnes 4a7d8 <== NOT EXECUTED * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) 4a7f4: b285 cmpl %d5,%d1 <== NOT EXECUTED 4a7f6: 6600 0160 bnew 4a958 <== NOT EXECUTED /****************************************************************** * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) 4a7fa: 4280 clrl %d0 <== NOT EXECUTED 4a7fc: 7e32 moveq #50,%d7 <== NOT EXECUTED 4a7fe: 3209 movew %a1,%d1 <== NOT EXECUTED 4a800: 1001 moveb %d1,%d0 <== NOT EXECUTED 4a802: be80 cmpl %d0,%d7 <== NOT EXECUTED 4a804: 676e beqs 4a874 <== NOT EXECUTED { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname,fname); } else if (linkflag == REGTYPE) 4a806: 7230 moveq #48,%d1 <== NOT EXECUTED 4a808: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a80a: 6700 0092 beqw 4a89e <== NOT EXECUTED write(out_fd, bufr, n); } close(out_fd); } } else if (linkflag == DIRTYPE) 4a80e: 7235 moveq #53,%d1 <== NOT EXECUTED 4a810: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a812: 6600 ff06 bnew 4a71a <== NOT EXECUTED { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); 4a816: 4878 01ff pea 1ff <== NOT EXECUTED 4a81a: 486e ff9c pea %fp@(-100) <== NOT EXECUTED 4a81e: 4eb9 0004 39d0 jsr 439d0 <== NOT EXECUTED 4a824: 508f addql #8,%sp <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) 4a826: 4878 0200 pea 200 <== NOT EXECUTED 4a82a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a82c: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4a82e: 4e93 jsr %a3@ <== NOT EXECUTED 4a830: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a834: 0c80 0000 0200 cmpil #512,%d0 <== NOT EXECUTED 4a83a: 6700 fef6 beqw 4a732 <== NOT EXECUTED else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); } } free(bufr); 4a83e: 2f0a movel %a2,%sp@- <== NOT EXECUTED close(out_fd); } } else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); 4a840: 4282 clrl %d2 <== NOT EXECUTED } } free(bufr); 4a842: 4eb9 0004 3160 jsr 43160 <== NOT EXECUTED close(fd); 4a848: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4a84a: 4eb9 0004 2bc4 jsr 42bc4 <== NOT EXECUTED return(retval); 4a850: 508f addql #8,%sp <== NOT EXECUTED } 4a852: 2002 movel %d2,%d0 <== NOT EXECUTED 4a854: 4cee 3cfc fef4 moveml %fp@(-268),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a85a: 4e5e unlk %fp <== NOT EXECUTED 4a85c: 4e75 rts <== NOT EXECUTED for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; 4a85e: 4287 clrl %d7 <== NOT EXECUTED 4a860: 1e32 0800 moveb %a2@(00000000,%d0:l),%d7 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4a864: 5280 addql #1,%d0 <== NOT EXECUTED { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; 4a866: d287 addl %d7,%d1 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4a868: 0c80 0000 0200 cmpil #512,%d0 <== NOT EXECUTED 4a86e: 6600 ff68 bnew 4a7d8 <== NOT EXECUTED 4a872: 6080 bras 4a7f4 <== NOT EXECUTED * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 4a874: 4878 0063 pea 63 <== NOT EXECUTED 4a878: 2f2e ff24 movel %fp@(-220),%sp@- <== NOT EXECUTED 4a87c: 486e ff38 pea %fp@(-200) <== NOT EXECUTED 4a880: 4e94 jsr %a4@ <== NOT EXECUTED linkname[MAX_NAME_FIELD_SIZE] = '\0'; 4a882: 4200 clrb %d0 <== NOT EXECUTED 4a884: 1d40 ff9b moveb %d0,%fp@(-101) <== NOT EXECUTED symlink(linkname,fname); 4a888: 486e ff9c pea %fp@(-100) <== NOT EXECUTED 4a88c: 486e ff38 pea %fp@(-200) <== NOT EXECUTED 4a890: 4eb9 0004 cb98 jsr 4cb98 <== NOT EXECUTED 4a896: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4a89a: 6000 fe7e braw 4a71a <== NOT EXECUTED * Read out the data. There are nblocks of data where nblocks * is the size rounded to the nearest 512-byte boundary. *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) 4a89e: 4878 01a4 pea 1a4 <== NOT EXECUTED /****************************************************************** * Read out the data. There are nblocks of data where nblocks * is the size rounded to the nearest 512-byte boundary. *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; 4a8a2: 2e02 movel %d2,%d7 <== NOT EXECUTED if ((out_fd = creat(fname, 0644)) == -1) 4a8a4: 486e ff9c pea %fp@(-100) <== NOT EXECUTED /****************************************************************** * Read out the data. There are nblocks of data where nblocks * is the size rounded to the nearest 512-byte boundary. *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; 4a8a8: 7009 moveq #9,%d0 <== NOT EXECUTED 4a8aa: 0687 0000 01ff addil #511,%d7 <== NOT EXECUTED 4a8b0: e0af lsrl %d0,%d7 <== NOT EXECUTED if ((out_fd = creat(fname, 0644)) == -1) 4a8b2: 4eb9 0005 0ea8 jsr 50ea8 <== NOT EXECUTED 4a8b8: 508f addql #8,%sp <== NOT EXECUTED 4a8ba: 2200 movel %d0,%d1 <== NOT EXECUTED 4a8bc: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a8be: b081 cmpl %d1,%d0 <== NOT EXECUTED 4a8c0: 6760 beqs 4a922 <== NOT EXECUTED n = read(fd, bufr, 512); } } else { for (i=0; i <== NOT EXECUTED 4a8c6: 2d44 ff20 movel %d4,%fp@(-224) <== NOT EXECUTED 4a8ca: 2803 movel %d3,%d4 <== NOT EXECUTED *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) { for (i=0; i,%a5 <== NOT EXECUTED 4a8d4: 2601 movel %d1,%d3 <== NOT EXECUTED } else { for (i=0; i <== NOT EXECUTED n = read(fd, bufr, 512); } } else { for (i=0; i <== NOT EXECUTED 4a8ee: 2002 movel %d2,%d0 <== NOT EXECUTED 4a8f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED n = read(fd, bufr, 512); } } else { for (i=0; i <== NOT EXECUTED 4a90e: 2604 movel %d4,%d3 <== NOT EXECUTED 4a910: 282e ff20 movel %fp@(-224),%d4 <== NOT EXECUTED { n = read(fd, bufr, 512); n = MIN(n, size - i*512); write(out_fd, bufr, n); } close(out_fd); 4a914: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a916: 4eb9 0004 2bc4 jsr 42bc4 <== NOT EXECUTED 4a91c: 588f addql #4,%sp <== NOT EXECUTED 4a91e: 6000 fdfa braw 4a71a <== NOT EXECUTED *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) { for (i=0; i <== NOT EXECUTED 4a928: 4282 clrl %d2 <== NOT EXECUTED { n = read(fd, bufr, 512); 4a92a: 4878 0200 pea 200 <== NOT EXECUTED *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) { for (i=0; i <== NOT EXECUTED { n = read(fd, bufr, 512); 4a940: 4878 0200 pea 200 <== NOT EXECUTED *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) { for (i=0; i <== NOT EXECUTED 4a954: 6000 fdc4 braw 4a71a <== NOT EXECUTED else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); } } free(bufr); 4a958: 2f0a movel %a2,%sp@- <== NOT EXECUTED * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) 4a95a: 7402 moveq #2,%d2 <== NOT EXECUTED else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); } } free(bufr); 4a95c: 4eb9 0004 3160 jsr 43160 <== NOT EXECUTED close(fd); 4a962: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4a964: 4eb9 0004 2bc4 jsr 42bc4 <== NOT EXECUTED return(retval); 4a96a: 508f addql #8,%sp <== NOT EXECUTED 4a96c: 6000 fee4 braw 4a852 <== NOT EXECUTED unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); if (bufr == NULL) 4a970: 7401 moveq #1,%d2 <== NOT EXECUTED } free(bufr); close(fd); return(retval); } 4a972: 2002 movel %d2,%d0 <== NOT EXECUTED 4a974: 4cee 3cfc fef4 moveml %fp@(-268),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a97a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a97e : int Untar_FromMemory( void *tar_buf, size_t size ) { 4a97e: 4e56 ff08 linkw %fp,#-248 4a982: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ FILE *fp; const char *tar_ptr = (const char *)tar_buf; 4a986: 95ca subal %a2,%a2 ptr = 0; while (1) { if (ptr + 512 > size) 4a988: 260a movel %a2,%d3 { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 4a98a: 47f9 0005 2f7c lea 52f7c ,%a3 ptr = 0; while (1) { if (ptr + 512 > size) 4a990: 0683 0000 0200 addil #512,%d3 int Untar_FromMemory( void *tar_buf, size_t size ) { 4a996: 286e 0008 moveal %fp@(8),%a4 ptr = 0; while (1) { if (ptr + 512 > size) 4a99a: b6ae 000c cmpl %fp@(12),%d3 4a99e: 6200 00f6 bhiw 4aa96 } /* Read the header */ bufr = &tar_ptr[ptr]; ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) 4a9a2: 4878 0007 pea 7 retval = UNTAR_SUCCESSFUL; break; } /* Read the header */ bufr = &tar_ptr[ptr]; 4a9a6: 45f4 a800 lea %a4@(00000000,%a2:l),%a2 ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) 4a9aa: 4879 0005 fd7e pea 5fd7e <_CPU_m68k_BFFFO_table+0x100> 4a9b0: 486a 0101 pea %a2@(257) 4a9b4: 4eb9 0005 2eb4 jsr 52eb4 4a9ba: 4fef 000c lea %sp@(12),%sp 4a9be: 4a80 tstl %d0 4a9c0: 6600 00d4 bnew 4aa96 { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 4a9c4: 4878 0063 pea 63 * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( 4a9c8: 4282 clrl %d2 { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 4a9ca: 2f0a movel %a2,%sp@- 4a9cc: 486e ff9c pea %fp@(-100) 4a9d0: 4e93 jsr %a3@ * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( 4a9d2: 4fef 000c lea %sp@(12),%sp } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; 4a9d6: 41ea 007c lea %a2@(124),%a0 * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( 4a9da: 43ea 0088 lea %a2@(136),%a1 retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; 4a9de: 4200 clrb %d0 4a9e0: 1d40 ffff moveb %d0,%fp@(-1) linkflag = bufr[156]; 4a9e4: 1c2a 009c moveb %a2@(156),%d6 { if ((octascii[i] < '0') || (octascii[i] > '9')) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a9e8: 2802 movel %d2,%d4 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a9ea: 7a09 moveq #9,%d5 4a9ec: 1010 moveb %a0@,%d0 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a9ee: e78c lsll #3,%d4 4a9f0: 5288 addql #1,%a0 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a9f2: 2200 movel %d0,%d1 4a9f4: 0681 ffff ffd0 addil #-48,%d1 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a9fa: 49c0 extbl %d0 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a9fc: 0281 0000 00ff andil #255,%d1 4aa02: ba81 cmpl %d1,%d5 4aa04: 6508 bcss 4aa0e { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4aa06: 2a44 moveal %d4,%a5 4aa08: 4bf5 08d0 lea %a5@(ffffffd0,%d0:l),%a5 4aa0c: 240d movel %a5,%d2 { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4aa0e: b3c8 cmpal %a0,%a1 4aa10: 66d6 bnes 4a9e8 4aa12: 41ea 0094 lea %a2@(148),%a0 * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( 4aa16: 43ea 009c lea %a2@(156),%a1 4aa1a: 4284 clrl %d4 { if ((octascii[i] < '0') || (octascii[i] > '9')) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4aa1c: 2a04 movel %d4,%d5 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4aa1e: 7e09 moveq #9,%d7 4aa20: 1010 moveb %a0@,%d0 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4aa22: e78d lsll #3,%d5 4aa24: 5288 addql #1,%a0 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4aa26: 2200 movel %d0,%d1 4aa28: 0681 ffff ffd0 addil #-48,%d1 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4aa2e: 49c0 extbl %d0 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4aa30: 0281 0000 00ff andil #255,%d1 4aa36: be81 cmpl %d1,%d7 4aa38: 6508 bcss 4aa42 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4aa3a: 2a45 moveal %d5,%a5 4aa3c: 4bf5 08d0 lea %a5@(ffffffd0,%d0:l),%a5 4aa40: 280d movel %a5,%d4 { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4aa42: b3c8 cmpal %a0,%a1 4aa44: 66d6 bnes 4aa1c 4aa46: 4281 clrl %d1 4aa48: 4280 clrl %d0 int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) 4aa4a: 2040 moveal %d0,%a0 4aa4c: 41e8 ff6c lea %a0@(-148),%a0 4aa50: 7a07 moveq #7,%d5 4aa52: ba88 cmpl %a0,%d5 4aa54: 6560 bcss 4aab6 sum += 0xff & ' '; 4aa56: 0681 0000 0020 addil #32,%d1 ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4aa5c: 5280 addql #1,%d0 4aa5e: 0c80 0000 0200 cmpil #512,%d0 4aa64: 66e4 bnes 4aa4a <== ALWAYS TAKEN * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) 4aa66: b284 cmpl %d4,%d1 4aa68: 6600 0130 bnew 4ab9a /****************************************************************** * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) 4aa6c: 7e32 moveq #50,%d7 4aa6e: 0286 0000 00ff andil #255,%d6 4aa74: be86 cmpl %d6,%d7 4aa76: 6752 beqs 4aaca { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) 4aa78: 7230 moveq #48,%d1 4aa7a: b286 cmpl %d6,%d1 4aa7c: 6776 beqs 4aaf4 sizeToGo -= n; } fclose(fp); } } else if (linkflag == DIRTYPE) 4aa7e: 7a35 moveq #53,%d5 4aa80: ba86 cmpl %d6,%d5 4aa82: 671e beqs 4aaa2 <== ALWAYS TAKEN void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 4aa84: 2443 moveal %d3,%a2 <== NOT EXECUTED ptr = 0; while (1) { if (ptr + 512 > size) 4aa86: 260a movel %a2,%d3 4aa88: 0683 0000 0200 addil #512,%d3 4aa8e: b6ae 000c cmpl %fp@(12),%d3 4aa92: 6300 ff0e blsw 4a9a2 fclose(fp); } } else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); 4aa96: 4280 clrl %d0 } } return(retval); } 4aa98: 4cee 3cfc ff08 moveml %fp@(-248),%d2-%d7/%a2-%a5 4aa9e: 4e5e unlk %fp 4aaa0: 4e75 rts fclose(fp); } } else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); 4aaa2: 4878 01ff pea 1ff void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 4aaa6: 2443 moveal %d3,%a2 fclose(fp); } } else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); 4aaa8: 486e ff9c pea %fp@(-100) 4aaac: 4eb9 0004 39d0 jsr 439d0 4aab2: 508f addql #8,%sp 4aab4: 60d0 bras 4aa86 for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; 4aab6: 4285 clrl %d5 4aab8: 1a32 0800 moveb %a2@(00000000,%d0:l),%d5 ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4aabc: 5280 addql #1,%d0 { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; 4aabe: d285 addl %d5,%d1 ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4aac0: 0c80 0000 0200 cmpil #512,%d0 4aac6: 6682 bnes 4aa4a 4aac8: 609c bras 4aa66 * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 4aaca: 4878 0063 pea 63 4aace: 486a 009d pea %a2@(157) void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 4aad2: 2443 moveal %d3,%a2 * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 4aad4: 486e ff38 pea %fp@(-200) 4aad8: 4e93 jsr %a3@ linkname[MAX_NAME_FIELD_SIZE] = '\0'; 4aada: 4200 clrb %d0 4aadc: 1d40 ff9b moveb %d0,%fp@(-101) symlink(linkname, fname); 4aae0: 486e ff9c pea %fp@(-100) 4aae4: 486e ff38 pea %fp@(-200) 4aae8: 4eb9 0004 cb98 jsr 4cb98 4aaee: 4fef 0014 lea %sp@(20),%sp 4aaf2: 6092 bras 4aa86 } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) 4aaf4: 4879 0005 fd86 pea 5fd86 <_CPU_m68k_BFFFO_table+0x108> linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; 4aafa: 2442 moveal %d2,%a2 if ((fp = fopen(fname, "w")) == NULL) 4aafc: 486e ff9c pea %fp@(-100) linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; 4ab00: 45ea 01ff lea %a2@(511),%a2 4ab04: 2a0a movel %a2,%d5 4ab06: 7e09 moveq #9,%d7 4ab08: eead lsrl %d7,%d5 4ab0a: 2445 moveal %d5,%a2 if ((fp = fopen(fname, "w")) == NULL) 4ab0c: 4eb9 0005 1684 jsr 51684 4ab12: 508f addql #8,%sp 4ab14: 2e00 movel %d0,%d7 4ab16: 6700 0090 beqw 4aba8 /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i <== NEVER TAKEN { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) { printk("Untar: failed to create file %s\n", fname); ptr += 512 * nblocks; 4ab1e: 2c0c movel %a4,%d6 4ab20: dc83 addl %d3,%d6 4ab22: 4285 clrl %d5 4ab24: 4bf9 0005 1eac lea 51eac ,%a5 4ab2a: 2d4c ff30 movel %a4,%fp@(-208) 4ab2e: 2840 moveal %d0,%a4 /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i <== ALWAYS TAKEN 4ab3c: 283c 0000 0200 movel #512,%d4 <== NOT EXECUTED n = fwrite(&tar_ptr[ptr], 1, len, fp); 4ab42: 2f0c movel %a4,%sp@- { printk("untar: Error during write\n"); break; } ptr += 512; sizeToGo -= n; 4ab44: 9484 subl %d4,%d2 * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i 4ab4c: 2f06 movel %d6,%sp@- /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i <== NEVER TAKEN { printk("untar: Error during write\n"); break; } ptr += 512; 4ab5e: 0683 0000 0200 addil #512,%d3 /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i <== NEVER TAKEN 4ab68: 286e ff30 moveal %fp@(-208),%a4 break; } ptr += 512; sizeToGo -= n; } fclose(fp); 4ab6c: 2f07 movel %d7,%sp@- 4ab6e: 4eb9 0005 1002 jsr 51002 4ab74: 588f addql #4,%sp void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 4ab76: 2443 moveal %d3,%a2 4ab78: 6000 ff0c braw 4aa86 4ab7c: 286e ff30 moveal %fp@(-208),%a4 <== NOT EXECUTED { len = ((sizeToGo < 512L)?(sizeToGo):(512L)); n = fwrite(&tar_ptr[ptr], 1, len, fp); if (n != len) { printk("untar: Error during write\n"); 4ab80: 4879 0005 fda9 pea 5fda9 <_CPU_m68k_BFFFO_table+0x12b> <== NOT EXECUTED 4ab86: 4eb9 0004 43f4 jsr 443f4 <== NOT EXECUTED break; 4ab8c: 588f addql #4,%sp <== NOT EXECUTED } ptr += 512; sizeToGo -= n; } fclose(fp); 4ab8e: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4ab90: 4eb9 0005 1002 jsr 51002 <== NOT EXECUTED 4ab96: 588f addql #4,%sp <== NOT EXECUTED 4ab98: 60dc bras 4ab76 <== NOT EXECUTED mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); } } return(retval); } 4ab9a: 4cee 3cfc ff08 moveml %fp@(-248),%d2-%d7/%a2-%a5 <== NOT EXECUTED * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) 4aba0: 303c 0002 movew #2,%d0 <== NOT EXECUTED mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); } } return(retval); } 4aba4: 4e5e unlk %fp <== NOT EXECUTED 4aba6: 4e75 rts <== NOT EXECUTED else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) { printk("Untar: failed to create file %s\n", fname); 4aba8: 486e ff9c pea %fp@(-100) <== NOT EXECUTED 4abac: 4879 0005 fd88 pea 5fd88 <_CPU_m68k_BFFFO_table+0x10a> <== NOT EXECUTED 4abb2: 4eb9 0004 43f4 jsr 443f4 <== NOT EXECUTED ptr += 512 * nblocks; 4abb8: 508f addql #8,%sp <== NOT EXECUTED 4abba: 2005 movel %d5,%d0 <== NOT EXECUTED 4abbc: 7209 moveq #9,%d1 <== NOT EXECUTED 4abbe: e3a8 lsll %d1,%d0 <== NOT EXECUTED 4abc0: d680 addl %d0,%d3 <== NOT EXECUTED void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 4abc2: 2443 moveal %d3,%a2 <== NOT EXECUTED 4abc4: 6000 fec0 braw 4aa86 <== NOT EXECUTED =============================================================================== 00046764 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 46764: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46768: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 4676e: 5280 addql #1,%d0 46770: 206e 0008 moveal %fp@(8),%a0 46774: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 4677a: 42a7 clrl %sp@- 4677c: 2f28 0008 movel %a0@(8),%sp@- 46780: 4868 0010 pea %a0@(16) 46784: 4eb9 0004 6a08 jsr 46a08 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4678a: 4fef 000c lea %sp@(12),%sp } 4678e: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46790: 4ef9 0004 7dbc jmp 47dbc <_Thread_Enable_dispatch> ... =============================================================================== 00046624 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 46624: 4e56 0000 linkw %fp,#0 46628: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4662a: 2479 0005 f118 moveal 5f118 <_API_extensions_List>,%a2 46630: b5fc 0005 f11c cmpal #389404,%a2 46636: 6710 beqs 46648 <_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)(); 46638: 206a 0008 moveal %a2@(8),%a0 4663c: 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 ) { 4663e: 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 ; 46640: b5fc 0005 f11c cmpal #389404,%a2 46646: 66f0 bnes 46638 <_API_extensions_Run_postdriver+0x14> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 46648: 246e fffc moveal %fp@(-4),%a2 4664c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046650 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 46650: 4e56 0000 linkw %fp,#0 46654: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46656: 2479 0005 f118 moveal 5f118 <_API_extensions_List>,%a2 4665c: b5fc 0005 f11c cmpal #389404,%a2 46662: 6718 beqs 4667c <_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 ); 46664: 2f39 0005 f032 movel 5f032 <_Thread_Executing>,%sp@- 4666a: 206a 000c moveal %a2@(12),%a0 4666e: 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 ) { 46670: 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 ; 46672: 588f addql #4,%sp 46674: b5fc 0005 f11c cmpal #389404,%a2 4667a: 66e8 bnes 46664 <_API_extensions_Run_postswitch+0x14> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 4667c: 246e fffc moveal %fp@(-4),%a2 46680: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048b1c <_CORE_RWLock_Obtain_for_reading>: * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 48b1c: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 48b22: 4e56 ffe8 linkw %fp,#-24 48b26: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 48b2a: 246e 0008 moveal %fp@(8),%a2 48b2e: 2a2e 000c movel %fp@(12),%d5 48b32: 282e 0014 movel %fp@(20),%d4 48b36: 162e 0013 moveb %fp@(19),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 48b3a: 2679 0006 1d86 moveal 61d86 <_Thread_Executing>,%a3 * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 48b40: 40c2 movew %sr,%d2 48b42: 8082 orl %d2,%d0 48b44: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 48b46: 202a 0044 movel %a2@(68),%d0 48b4a: 661a bnes 48b66 <_CORE_RWLock_Obtain_for_reading+0x4a> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; the_rwlock->number_of_readers += 1; 48b4c: 52aa 0048 addql #1,%a2@(72) */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 48b50: 7001 moveq #1,%d0 48b52: 2540 0044 movel %d0,%a2@(68) the_rwlock->number_of_readers += 1; _ISR_Enable( level ); 48b56: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48b58: 42ab 0034 clrl %a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48b5c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 48b62: 4e5e unlk %fp 48b64: 4e75 rts * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 48b66: 7201 moveq #1,%d1 48b68: b280 cmpl %d0,%d1 48b6a: 674e beqs 48bba <_CORE_RWLock_Obtain_for_reading+0x9e> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 48b6c: 4a03 tstb %d3 48b6e: 6612 bnes 48b82 <_CORE_RWLock_Obtain_for_reading+0x66> _ISR_Enable( level ); 48b70: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48b72: 7202 moveq #2,%d1 48b74: 2741 0034 movel %d1,%a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48b78: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 48b7e: 4e5e unlk %fp 48b80: 4e75 rts 48b82: 7001 moveq #1,%d0 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; 48b84: 2745 0020 movel %d5,%a3@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48b88: 42ab 0034 clrl %a3@(52) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 48b8c: 274a 0044 movel %a2,%a3@(68) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 48b90: 42ab 0030 clrl %a3@(48) 48b94: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 48b98: 46c2 movew %d2,%sr _Thread_queue_Enqueue_with_handler( 48b9a: 2d44 000c movel %d4,%fp@(12) 48b9e: 223c 0004 8d48 movel #298312,%d1 48ba4: 2d4a 0008 movel %a2,%fp@(8) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48ba8: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 48bae: 2d41 0010 movel %d1,%fp@(16) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48bb2: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 48bb4: 4ef9 0004 a5c4 jmp 4a5c4 <_Thread_queue_Enqueue_with_handler> executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 48bba: 2f0a movel %a2,%sp@- 48bbc: 4eb9 0004 a92c jsr 4a92c <_Thread_queue_First> if ( !waiter ) { 48bc2: 588f addql #4,%sp 48bc4: 4a80 tstl %d0 48bc6: 66a4 bnes 48b6c <_CORE_RWLock_Obtain_for_reading+0x50><== NEVER TAKEN the_rwlock->number_of_readers += 1; 48bc8: 52aa 0048 addql #1,%a2@(72) _ISR_Enable( level ); 48bcc: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48bce: 42ab 0034 clrl %a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48bd2: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 48bd8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048bdc <_CORE_RWLock_Obtain_for_writing>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 48bdc: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 48be2: 4e56 fff4 linkw %fp,#-12 48be6: 206e 0008 moveal %fp@(8),%a0 48bea: 48d7 001c moveml %d2-%d4,%sp@ 48bee: 282e 000c movel %fp@(12),%d4 48bf2: 242e 0010 movel %fp@(16),%d2 48bf6: 262e 0014 movel %fp@(20),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 48bfa: 2279 0006 1d86 moveal 61d86 <_Thread_Executing>,%a1 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 48c00: 40c1 movew %sr,%d1 48c02: 8081 orl %d1,%d0 48c04: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 48c06: 4aa8 0044 tstl %a0@(68) 48c0a: 6614 bnes 48c20 <_CORE_RWLock_Obtain_for_writing+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 48c0c: 7002 moveq #2,%d0 48c0e: 2140 0044 movel %d0,%a0@(68) _ISR_Enable( level ); 48c12: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48c14: 42a9 0034 clrl %a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48c18: 4cd7 001c moveml %sp@,%d2-%d4 48c1c: 4e5e unlk %fp 48c1e: 4e75 rts /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 48c20: 4a02 tstb %d2 48c22: 6610 bnes 48c34 <_CORE_RWLock_Obtain_for_writing+0x58> _ISR_Enable( level ); 48c24: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48c26: 7002 moveq #2,%d0 _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48c28: 4cd7 001c moveml %sp@,%d2-%d4 * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48c2c: 2340 0034 movel %d0,%a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48c30: 4e5e unlk %fp 48c32: 4e75 rts */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 48c34: 7001 moveq #1,%d0 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; 48c36: 2344 0020 movel %d4,%a1@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48c3a: 42a9 0034 clrl %a1@(52) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 48c3e: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 48c42: 2340 0030 movel %d0,%a1@(48) 48c46: 2140 0030 movel %d0,%a0@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 48c4a: 46c1 movew %d1,%sr _Thread_queue_Enqueue_with_handler( 48c4c: 2d43 000c movel %d3,%fp@(12) 48c50: 203c 0004 8d48 movel #298312,%d0 48c56: 2d48 0008 movel %a0,%fp@(8) 48c5a: 2d40 0010 movel %d0,%fp@(16) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48c5e: 4cd7 001c moveml %sp@,%d2-%d4 48c62: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 48c64: 4ef9 0004 a5c4 jmp 4a5c4 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00048c6c <_CORE_RWLock_Release>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 48c6c: 203c 0000 0700 movel #1792,%d0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 48c72: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 48c76: 2079 0006 1d86 moveal 61d86 <_Thread_Executing>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 48c7c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48c80: 246e 0008 moveal %fp@(8),%a2 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 48c84: 40c1 movew %sr,%d1 48c86: 8081 orl %d1,%d0 48c88: 46c0 movew %d0,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 48c8a: 202a 0044 movel %a2@(68),%d0 48c8e: 6700 0090 beqw 48d20 <_CORE_RWLock_Release+0xb4> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 48c92: 7401 moveq #1,%d2 48c94: b480 cmpl %d0,%d2 48c96: 676e beqs 48d06 <_CORE_RWLock_Release+0x9a> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48c98: 42a8 0034 clrl %a0@(52) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 48c9c: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 48ca0: 46c1 movew %d1,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 48ca2: 2f0a movel %a2,%sp@- 48ca4: 4eb9 0004 a464 jsr 4a464 <_Thread_queue_Dequeue> if ( next ) { 48caa: 588f addql #4,%sp 48cac: 4a80 tstl %d0 48cae: 674a beqs 48cfa <_CORE_RWLock_Release+0x8e> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 48cb0: 7201 moveq #1,%d1 48cb2: 2040 moveal %d0,%a0 48cb4: b2a8 0030 cmpl %a0@(48),%d1 48cb8: 677c beqs 48d36 <_CORE_RWLock_Release+0xca> /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 48cba: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 48cbc: 52aa 0048 addql #1,%a2@(72) 48cc0: 47f9 0004 a92c lea 4a92c <_Thread_queue_First>,%a3 next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 48cc6: 49f9 0004 a7d8 lea 4a7d8 <_Thread_queue_Extract>,%a4 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 48ccc: 2541 0044 movel %d1,%a2@(68) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 48cd0: 2f0a movel %a2,%sp@- 48cd2: 4e93 jsr %a3@ if ( !next || 48cd4: 588f addql #4,%sp 48cd6: 4a80 tstl %d0 48cd8: 6720 beqs 48cfa <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 48cda: 7401 moveq #1,%d2 48cdc: 2040 moveal %d0,%a0 48cde: b4a8 0030 cmpl %a0@(48),%d2 48ce2: 6716 beqs 48cfa <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 48ce4: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 48ce8: 2f00 movel %d0,%sp@- 48cea: 2f0a movel %a2,%sp@- 48cec: 4e94 jsr %a4@ } 48cee: 508f addql #8,%sp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 48cf0: 2f0a movel %a2,%sp@- 48cf2: 4e93 jsr %a3@ if ( !next || 48cf4: 588f addql #4,%sp 48cf6: 4a80 tstl %d0 48cf8: 66e0 bnes 48cda <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48cfa: 4280 clrl %d0 48cfc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48d02: 4e5e unlk %fp 48d04: 4e75 rts _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 48d06: 202a 0048 movel %a2@(72),%d0 48d0a: 5380 subql #1,%d0 48d0c: 2540 0048 movel %d0,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 48d10: 6786 beqs 48c98 <_CORE_RWLock_Release+0x2c> /* must be unlocked again */ _ISR_Enable( level ); 48d12: 46c1 movew %d1,%sr } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48d14: 4280 clrl %d0 48d16: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48d1c: 4e5e unlk %fp 48d1e: 4e75 rts * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 48d20: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48d22: 103c 0002 moveb #2,%d0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48d26: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48d2c: 2140 0034 movel %d0,%a0@(52) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48d30: 4280 clrl %d0 48d32: 4e5e unlk %fp 48d34: 4e75 rts next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 48d36: 7002 moveq #2,%d0 48d38: 2540 0044 movel %d0,%a2@(68) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48d3c: 4280 clrl %d0 48d3e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48d44: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048d48 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 48d48: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48d4c: 486e fffc pea %fp@(-4) 48d50: 2f2e 0008 movel %fp@(8),%sp@- 48d54: 4eb9 0004 a090 jsr 4a090 <_Thread_Get> switch ( location ) { 48d5a: 508f addql #8,%sp 48d5c: 4aae fffc tstl %fp@(-4) 48d60: 6618 bnes 48d7a <_CORE_RWLock_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 48d62: 2f00 movel %d0,%sp@- 48d64: 4eb9 0004 aa34 jsr 4aa34 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 48d6a: 588f addql #4,%sp 48d6c: 2039 0006 1ccc movel 61ccc <_Thread_Dispatch_disable_level>,%d0 48d72: 5380 subql #1,%d0 48d74: 23c0 0006 1ccc movel %d0,61ccc <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 48d7a: 4e5e unlk %fp ... =============================================================================== 0004df24 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4df24: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4df2a: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4df2e: 2279 0005 f032 moveal 5f032 <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4df34: 48d7 001c moveml %d2-%d4,%sp@ 4df38: 242e 000c movel %fp@(12),%d2 4df3c: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4df40: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4df44: 206e 0008 moveal %fp@(8),%a0 4df48: 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 ); 4df4c: 40c1 movew %sr,%d1 4df4e: 8081 orl %d1,%d0 4df50: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4df52: 2028 0048 movel %a0@(72),%d0 4df56: 5280 addql #1,%d0 4df58: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4df5c: 4aa8 0040 tstl %a0@(64) 4df60: 6606 bnes 4df68 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4df62: b0a8 0044 cmpl %a0@(68),%d0 4df66: 672e beqs 4df96 <_CORE_barrier_Wait+0x72> 4df68: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4df6a: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4df6e: 2348 0044 movel %a0,%a1@(68) 4df72: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4df76: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4df78: 2d43 000c movel %d3,%fp@(12) 4df7c: 203c 0004 8678 movel #296568,%d0 4df82: 2d48 0008 movel %a0,%fp@(8) 4df86: 2d40 0010 movel %d0,%fp@(16) } 4df8a: 4cd7 001c moveml %sp@,%d2-%d4 4df8e: 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 ); 4df90: 4ef9 0004 8318 jmp 48318 <_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; 4df96: 7001 moveq #1,%d0 4df98: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4df9c: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4df9e: 2d44 0010 movel %d4,%fp@(16) 4dfa2: 2d42 000c movel %d2,%fp@(12) 4dfa6: 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 ); } 4dfaa: 4cd7 001c moveml %sp@,%d2-%d4 4dfae: 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 ); 4dfb0: 4ef9 0004 dee8 jmp 4dee8 <_CORE_barrier_Release> ... =============================================================================== 00059f8c <_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 ) { 59f8c: 4e56 ffe0 linkw %fp,#-32 59f90: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59f94: 266e 0008 moveal %fp@(8),%a3 59f98: 282e 000c movel %fp@(12),%d4 59f9c: 242e 0010 movel %fp@(16),%d2 59fa0: 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 ) { 59fa4: b4ab 004c cmpl %a3@(76),%d2 59fa8: 6262 bhis 5a00c <_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 ) { 59faa: 4aab 0048 tstl %a3@(72) 59fae: 664c bnes 59ffc <_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))) { 59fb0: 2f0b movel %a3,%sp@- 59fb2: 49f9 0005 c6ec lea 5c6ec <_Thread_queue_Dequeue>,%a4 59fb8: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 59fba: 4bf9 0006 3654 lea 63654 ,%a5 59fc0: 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 = 59fc2: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59fc4: 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 = 59fc6: 4a80 tstl %d0 59fc8: 6722 beqs 59fec <_CORE_message_queue_Broadcast+0x60> 59fca: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 59fcc: 5283 addql #1,%d3 59fce: 2f04 movel %d4,%sp@- 59fd0: 2f2a 002c movel %a2@(44),%sp@- 59fd4: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 59fd6: 206a 0028 moveal %a2@(40),%a0 59fda: 4fef 000c lea %sp@(12),%sp 59fde: 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))) { 59fe0: 2f0b movel %a3,%sp@- 59fe2: 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 = 59fe4: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59fe6: 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 = 59fe8: 4a80 tstl %d0 59fea: 66de bnes 59fca <_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; 59fec: 2045 moveal %d5,%a0 59fee: 4280 clrl %d0 59ff0: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59ff2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59ff8: 4e5e unlk %fp 59ffa: 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; 59ffc: 2045 moveal %d5,%a0 59ffe: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a000: 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; 5a006: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a008: 4e5e unlk %fp 5a00a: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 5a00c: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a00e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5a014: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dd90 <_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 ) { 4dd90: 4e56 0000 linkw %fp,#0 4dd94: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4dd96: 2f2e 0010 movel %fp@(16),%sp@- 4dd9a: 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 ) { 4dd9e: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4dda2: 2f0a movel %a2,%sp@- 4dda4: 4eb9 0004 ff54 jsr 4ff54 <_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 ) 4ddaa: 4fef 000c lea %sp@(12),%sp 4ddae: 4aaa 0048 tstl %a2@(72) 4ddb2: 6612 bnes 4ddc6 <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4ddb4: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 4ddba: 246e fffc moveal %fp@(-4),%a2 4ddbe: 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 ); 4ddc0: 4ef9 0005 0d10 jmp 50d10 <_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 ); 4ddc6: 2f0a movel %a2,%sp@- 4ddc8: 4eb9 0004 dde4 jsr 4dde4 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 4ddce: 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 ); 4ddd4: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 4ddd6: 246e fffc moveal %fp@(-4),%a2 4ddda: 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 ); 4dddc: 4ef9 0005 0d10 jmp 50d10 <_Workspace_Free> ... =============================================================================== 0004febc <_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)) { 4febc: 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 ) { 4febe: 4e56 fff4 linkw %fp,#-12 4fec2: 202e 0014 movel %fp@(20),%d0 4fec6: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4feca: 246e 0008 moveal %fp@(8),%a2 4fece: 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)) { 4fed2: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4fed4: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4fed8: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4fedc: 2540 004c movel %d0,%a2@(76) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4fee0: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 4fee4: 42aa 0064 clrl %a2@(100) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fee8: 4a81 tstl %d1 4feea: 6620 bnes 4ff0c <_CORE_message_queue_Initialize+0x50> 4feec: 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)); 4feee: 2601 movel %d1,%d3 4fef0: 0683 0000 0014 addil #20,%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 * 4fef6: 2003 movel %d3,%d0 4fef8: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4fefc: b280 cmpl %d0,%d1 4fefe: 631c blss 4ff1c <_CORE_message_queue_Initialize+0x60><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ff00: 4200 clrb %d0 } 4ff02: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ff08: 4e5e unlk %fp 4ff0a: 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); 4ff0c: 2200 movel %d0,%d1 4ff0e: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4ff10: 76fc moveq #-4,%d3 4ff12: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4ff14: b280 cmpl %d0,%d1 4ff16: 64d6 bccs 4feee <_CORE_message_queue_Initialize+0x32><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ff18: 4200 clrb %d0 <== NOT EXECUTED 4ff1a: 60e6 bras 4ff02 <_CORE_message_queue_Initialize+0x46><== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4ff1c: 2f00 movel %d0,%sp@- 4ff1e: 4eb9 0005 2d4c jsr 52d4c <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4ff24: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4ff26: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4ff2a: 67d4 beqs 4ff00 <_CORE_message_queue_Initialize+0x44> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4ff2c: 2f03 movel %d3,%sp@- 4ff2e: 2f02 movel %d2,%sp@- 4ff30: 2f00 movel %d0,%sp@- 4ff32: 486a 0068 pea %a2@(104) 4ff36: 4eb9 0005 52bc jsr 552bc <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4ff3c: 4878 0006 pea 6 4ff40: 7001 moveq #1,%d0 4ff42: 206e 000c moveal %fp@(12),%a0 4ff46: b090 cmpl %a0@,%d0 4ff48: 57c0 seq %d0 4ff4a: 4878 0080 pea 80 4ff4e: 49c0 extbl %d0 4ff50: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4ff52: 41ea 0054 lea %a2@(84),%a0 4ff56: 2f00 movel %d0,%sp@- 4ff58: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4ff5c: 41ea 0050 lea %a2@(80),%a0 4ff60: 2548 0058 movel %a0,%a2@(88) 4ff64: 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; 4ff66: 42aa 0054 clrl %a2@(84) 4ff6a: 4eb9 0005 20ec jsr 520ec <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ff70: 4fef 0020 lea %sp@(32),%sp } 4ff74: 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( 4ff7a: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4ff7c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00055304 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 55304: 4e56 0000 linkw %fp,#0 55308: 226e 000c moveal %fp@(12),%a1 5530c: 2f0b movel %a3,%sp@- 5530e: 202e 0010 movel %fp@(16),%d0 55312: 206e 0008 moveal %fp@(8),%a0 55316: 2f0a movel %a2,%sp@- 55318: 2340 0008 movel %d0,%a1@(8) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 5531c: 0c80 7fff ffff cmpil #2147483647,%d0 55322: 6760 beqs 55384 <_CORE_message_queue_Insert_message+0x80> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 55324: 0c80 8000 0000 cmpil #-2147483648,%d0 5532a: 6700 008e beqw 553ba <_CORE_message_queue_Insert_message+0xb6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5532e: 2208 movel %a0,%d1 55330: 0681 0000 0054 addil #84,%d1 Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 55336: 2468 0050 moveal %a0@(80),%a2 while ( !_Chain_Is_tail( the_header, the_node ) ) { 5533a: b28a cmpl %a2,%d1 5533c: 670c beqs 5534a <_CORE_message_queue_Insert_message+0x46> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 5533e: b0aa 0008 cmpl %a2@(8),%d0 55342: 6d06 blts 5534a <_CORE_message_queue_Insert_message+0x46> the_node = the_node->next; 55344: 2452 moveal %a2@,%a2 int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 55346: b28a cmpl %a2,%d1 55348: 66f4 bnes 5533e <_CORE_message_queue_Insert_message+0x3a> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 5534a: 203c 0000 0700 movel #1792,%d0 55350: 40c1 movew %sr,%d1 55352: 8081 orl %d1,%d0 55354: 46c0 movew %d0,%sr SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 55356: 246a 0004 moveal %a2@(4),%a2 } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 5535a: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 5535e: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 55360: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 55364: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 55366: 2749 0004 movel %a1,%a3@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 5536a: 228b movel %a3,%a1@ _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 5536c: 46c1 movew %d1,%sr /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 5536e: 2268 0060 moveal %a0@(96),%a1 55372: 4a89 tstl %a1 55374: 673c beqs 553b2 <_CORE_message_queue_Insert_message+0xae> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 55376: 2d68 0064 0008 movel %a0@(100),%fp@(8) #endif } 5537c: 245f moveal %sp@+,%a2 5537e: 265f moveal %sp@+,%a3 55380: 4e5e unlk %fp * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 55382: 4ed1 jmp %a1@ else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 55384: 203c 0000 0700 movel #1792,%d0 5538a: 40c1 movew %sr,%d1 5538c: 8081 orl %d1,%d0 5538e: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 55390: 45e8 0054 lea %a0@(84),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55394: 52a8 0048 addql #1,%a0@(72) 55398: 228a movel %a2,%a1@ old_last_node = the_chain->last; 5539a: 2468 0058 moveal %a0@(88),%a2 the_chain->last = the_node; 5539e: 2149 0058 movel %a1,%a0@(88) old_last_node->next = the_node; the_node->previous = old_last_node; 553a2: 234a 0004 movel %a2,%a1@(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; 553a6: 2489 movel %a1,%a2@ _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 553a8: 46c1 movew %d1,%sr /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 553aa: 2268 0060 moveal %a0@(96),%a1 553ae: 4a89 tstl %a1 553b0: 66c4 bnes 55376 <_CORE_message_queue_Insert_message+0x72><== NEVER TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 553b2: 245f moveal %sp@+,%a2 553b4: 265f moveal %sp@+,%a3 553b6: 4e5e unlk %fp 553b8: 4e75 rts SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 553ba: 203c 0000 0700 movel #1792,%d0 553c0: 40c1 movew %sr,%d1 553c2: 8081 orl %d1,%d0 553c4: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 553c6: 45e8 0050 lea %a0@(80),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 553ca: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 553ce: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 553d0: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 553d4: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 553d6: 2749 0004 movel %a1,%a3@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 553da: 228b movel %a3,%a1@ _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 553dc: 46c1 movew %d1,%sr 553de: 608e bras 5536e <_CORE_message_queue_Insert_message+0x6a> =============================================================================== 0004ff80 <_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 ); 4ff80: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ff86: 4e56 ffe8 linkw %fp,#-24 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4ff8a: 2279 0006 98a6 moveal 698a6 <_Thread_Executing>,%a1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ff90: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4ff94: 282e 000c movel %fp@(12),%d4 4ff98: 286e 001c moveal %fp@(28),%a4 4ff9c: 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; 4ffa0: 42a9 0034 clrl %a1@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ffa4: 262e 0010 movel %fp@(16),%d3 4ffa8: 206e 0014 moveal %fp@(20),%a0 4ffac: 242e 0018 movel %fp@(24),%d2 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 ); 4ffb0: 40c1 movew %sr,%d1 4ffb2: 8081 orl %d1,%d0 4ffb4: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ffb6: 200a movel %a2,%d0 4ffb8: 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)); 4ffbe: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ffc2: b08b cmpl %a3,%d0 4ffc4: 6700 0088 beqw 5004e <_CORE_message_queue_Seize+0xce> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4ffc8: 2253 moveal %a3@,%a1 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 4ffca: 53aa 0048 subql #1,%a2@(72) the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4ffce: 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; 4ffd2: 2549 0050 movel %a1,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4ffd6: 234c 0004 movel %a4,%a1@(4) _ISR_Enable( level ); 4ffda: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4ffdc: 2279 0006 98a6 moveal 698a6 <_Thread_Executing>,%a1 _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 4ffe2: 240b movel %a3,%d2 4ffe4: 0682 0000 0010 addil #16,%d2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ffea: 49f9 0005 8a20 lea 58a20 ,%a4 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 4fff0: 20ab 000c movel %a3@(12),%a0@ _Thread_Executing->Wait.count = 4fff4: 236b 0008 0024 movel %a3@(8),%a1@(36) 4fffa: 2f10 movel %a0@,%sp@- 4fffc: 2f02 movel %d2,%sp@- 4fffe: 2f03 movel %d3,%sp@- 50000: 4e94 jsr %a4@ * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50002: 2f0a movel %a2,%sp@- 50004: 4eb9 0005 1d10 jsr 51d10 <_Thread_queue_Dequeue> if ( !the_thread ) { 5000a: 4fef 0010 lea %sp@(16),%sp * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 5000e: 2040 moveal %d0,%a0 if ( !the_thread ) { 50010: 4a80 tstl %d0 50012: 6700 0088 beqw 5009c <_CORE_message_queue_Seize+0x11c> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 50016: 2028 0030 movel %a0@(48),%d0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 5001a: 2768 0024 0008 movel %a0@(36),%a3@(8) 50020: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50024: 2f00 movel %d0,%sp@- 50026: 2f28 002c movel %a0@(44),%sp@- 5002a: 2f02 movel %d2,%sp@- 5002c: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 5002e: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 50034: 4fef 000c lea %sp@(12),%sp 50038: 2d4b 000c movel %a3,%fp@(12) 5003c: 2d4a 0008 movel %a2,%fp@(8) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 50040: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50046: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 50048: 4ef9 0005 5304 jmp 55304 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 5004e: 4a02 tstb %d2 50050: 6612 bnes 50064 <_CORE_message_queue_Seize+0xe4> _ISR_Enable( level ); 50052: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 50054: 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 ); } 50056: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 5005c: 2340 0034 movel %d0,%a1@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 50060: 4e5e unlk %fp 50062: 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; 50064: 7001 moveq #1,%d0 50066: 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; 5006a: 2348 0028 movel %a0,%a1@(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; 5006e: 2343 002c movel %d3,%a1@(44) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 50072: 2344 0020 movel %d4,%a1@(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; 50076: 234a 0044 movel %a2,%a1@(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 ); 5007a: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 5007c: 2d4c 000c movel %a4,%fp@(12) 50080: 49f9 0005 21d0 lea 521d0 <_Thread_queue_Timeout>,%a4 50086: 2d4a 0008 movel %a2,%fp@(8) 5008a: 2d4c 0010 movel %a4,%fp@(16) } 5008e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50094: 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 ); 50096: 4ef9 0005 1e70 jmp 51e70 <_Thread_queue_Enqueue_with_handler> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 5009c: 45ea 0068 lea %a2@(104),%a2 500a0: 2d4b 000c movel %a3,%fp@(12) 500a4: 2d4a 0008 movel %a2,%fp@(8) } 500a8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 500ae: 4e5e unlk %fp 500b0: 4ef9 0004 fdf0 jmp 4fdf0 <_Chain_Append> ... =============================================================================== 000500b8 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 500b8: 4e56 ffec linkw %fp,#-20 500bc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 500c0: 246e 0008 moveal %fp@(8),%a2 500c4: 242e 0010 movel %fp@(16),%d2 500c8: 282e 001c movel %fp@(28),%d4 500cc: 162e 0023 moveb %fp@(35),%d3 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 500d0: b4aa 004c cmpl %a2@(76),%d2 500d4: 6228 bhis 500fe <_CORE_message_queue_Submit+0x46> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 500d6: 202a 0048 movel %a2@(72),%d0 500da: 672e beqs 5010a <_CORE_message_queue_Submit+0x52> /* * 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 ) { 500dc: b0aa 0044 cmpl %a2@(68),%d0 500e0: 6500 00ba bcsw 5019c <_CORE_message_queue_Submit+0xe4> /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 500e4: 4a03 tstb %d3 500e6: 6700 00f4 beqw 501dc <_CORE_message_queue_Submit+0x124> /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 500ea: 2039 0006 9886 movel 69886 <_ISR_Nest_level>,%d0 500f0: 6754 beqs 50146 <_CORE_message_queue_Submit+0x8e><== NEVER TAKEN 500f2: 7003 moveq #3,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 500f4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 500fa: 4e5e unlk %fp 500fc: 4e75 rts ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 500fe: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50100: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50106: 4e5e unlk %fp 50108: 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 ); 5010a: 2f0a movel %a2,%sp@- 5010c: 4eb9 0005 1d10 jsr 51d10 <_Thread_queue_Dequeue> if ( the_thread ) { 50112: 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 ); 50114: 2640 moveal %d0,%a3 if ( the_thread ) { 50116: 4a80 tstl %d0 50118: 6700 00ce beqw 501e8 <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5011c: 2f02 movel %d2,%sp@- 5011e: 2f2e 000c movel %fp@(12),%sp@- 50122: 2f2b 002c movel %a3@(44),%sp@- 50126: 4eb9 0005 8a20 jsr 58a20 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 5012c: 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; 50130: 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; 50134: 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; 50136: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 50138: 2744 0024 movel %d4,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5013c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50142: 4e5e unlk %fp 50144: 4e75 rts * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 50146: 2079 0006 98a6 moveal 698a6 <_Thread_Executing>,%a0 ISR_Level level; _ISR_Disable( level ); 5014c: 203c 0000 0700 movel #1792,%d0 50152: 40c1 movew %sr,%d1 50154: 8081 orl %d1,%d0 50156: 46c0 movew %d0,%sr 50158: 7001 moveq #1,%d0 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 5015a: 216e 0014 0020 movel %fp@(20),%a0@(32) 50160: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_argument_second.immutable_object = buffer; 50164: 202e 000c movel %fp@(12),%d0 executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 50168: 2144 0024 movel %d4,%a0@(36) _ISR_Disable( level ); _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.immutable_object = buffer; 5016c: 2140 002c movel %d0,%a0@(44) executing->Wait.option = (uint32_t) size; 50170: 2142 0030 movel %d2,%a0@(48) Thread_Control *executing = _Thread_Executing; ISR_Level level; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 50174: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 50178: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 5017a: 4879 0005 21d0 pea 521d0 <_Thread_queue_Timeout> 50180: 2f2e 0024 movel %fp@(36),%sp@- 50184: 2f0a movel %a2,%sp@- 50186: 4eb9 0005 1e70 jsr 51e70 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 5018c: 4fef 000c lea %sp@(12),%sp executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50190: 7007 moveq #7,%d0 } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50192: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50198: 4e5e unlk %fp 5019a: 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 *) 5019c: 486a 0068 pea %a2@(104) 501a0: 4eb9 0004 fe50 jsr 4fe50 <_Chain_Get> 501a6: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 501a8: 2f02 movel %d2,%sp@- 501aa: 2f2e 000c movel %fp@(12),%sp@- 501ae: 486b 0010 pea %a3@(16) 501b2: 4eb9 0005 8a20 jsr 58a20 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 501b8: 2742 000c movel %d2,%a3@(12) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 501bc: 2744 0008 movel %d4,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 501c0: 2f04 movel %d4,%sp@- 501c2: 2f0b movel %a3,%sp@- 501c4: 2f0a movel %a2,%sp@- 501c6: 4eb9 0005 5304 jsr 55304 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 501cc: 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( 501d0: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 501d2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 501d8: 4e5e unlk %fp 501da: 4e75 rts /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 501dc: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 501de: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 501e4: 4e5e unlk %fp 501e6: 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 ) { 501e8: 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 ) { 501ec: b0aa 0044 cmpl %a2@(68),%d0 501f0: 6400 fef2 bccw 500e4 <_CORE_message_queue_Submit+0x2c> 501f4: 60a6 bras 5019c <_CORE_message_queue_Submit+0xe4> ... =============================================================================== 00046958 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 46958: 4e56 0000 linkw %fp,#0 4695c: 202e 0010 movel %fp@(16),%d0 46960: 2f0a movel %a2,%sp@- 46962: 246e 0008 moveal %fp@(8),%a2 46966: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46968: 2239 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 4696e: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46970: 4a81 tstl %d1 46972: 6704 beqs 46978 <_CORE_mutex_Seize+0x20> 46974: 4a00 tstb %d0 46976: 6634 bnes 469ac <_CORE_mutex_Seize+0x54> <== ALWAYS TAKEN 46978: 486e 0018 pea %fp@(24) 4697c: 2f0a movel %a2,%sp@- 4697e: 4eb9 0004 ba44 jsr 4ba44 <_CORE_mutex_Seize_interrupt_trylock> 46984: 508f addql #8,%sp 46986: 4a80 tstl %d0 46988: 6716 beqs 469a0 <_CORE_mutex_Seize+0x48> 4698a: 4a02 tstb %d2 4698c: 6636 bnes 469c4 <_CORE_mutex_Seize+0x6c> 4698e: 202e 0018 movel %fp@(24),%d0 46992: 46c0 movew %d0,%sr 46994: 2079 0005 f032 moveal 5f032 <_Thread_Executing>,%a0 4699a: 7001 moveq #1,%d0 4699c: 2140 0034 movel %d0,%a0@(52) } 469a0: 242e fff8 movel %fp@(-8),%d2 469a4: 246e fffc moveal %fp@(-4),%a2 469a8: 4e5e unlk %fp 469aa: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 469ac: 7001 moveq #1,%d0 469ae: b0b9 0005 f100 cmpl 5f100 <_System_state_Current>,%d0 469b4: 64c2 bccs 46978 <_CORE_mutex_Seize+0x20> 469b6: 4878 0013 pea 13 469ba: 42a7 clrl %sp@- 469bc: 42a7 clrl %sp@- 469be: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> 469c4: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 469ca: 5280 addql #1,%d0 469cc: 2079 0005 f032 moveal 5f032 <_Thread_Executing>,%a0 469d2: 216e 000c 0020 movel %fp@(12),%a0@(32) 469d8: 23c0 0005 ef78 movel %d0,5ef78 <_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; 469de: 7001 moveq #1,%d0 469e0: 214a 0044 movel %a2,%a0@(68) 469e4: 2540 0030 movel %d0,%a2@(48) 469e8: 202e 0018 movel %fp@(24),%d0 469ec: 46c0 movew %d0,%sr 469ee: 2f2e 0014 movel %fp@(20),%sp@- 469f2: 2f0a movel %a2,%sp@- 469f4: 4eb9 0004 68cc jsr 468cc <_CORE_mutex_Seize_interrupt_blocking> } 469fa: 242e fff8 movel %fp@(-8),%d2 bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 469fe: 508f addql #8,%sp } 46a00: 246e fffc moveal %fp@(-4),%a2 46a04: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046a08 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 46a08: 4e56 0000 linkw %fp,#0 46a0c: 2f0a movel %a2,%sp@- 46a0e: 246e 0008 moveal %fp@(8),%a2 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 46a12: 206a 005a moveal %a2@(90),%a0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 46a16: 4a2a 0044 tstb %a2@(68) 46a1a: 6712 beqs 46a2e <_CORE_mutex_Surrender+0x26> if ( !_Thread_Is_executing( holder ) ) 46a1c: b1f9 0005 f032 cmpal 5f032 <_Thread_Executing>,%a0 46a22: 670a beqs 46a2e <_CORE_mutex_Surrender+0x26> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a24: 246e fffc moveal %fp@(-4),%a2 * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { if ( !_Thread_Is_executing( holder ) ) 46a28: 7003 moveq #3,%d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a2a: 4e5e unlk %fp 46a2c: 4e75 rts return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 46a2e: 202a 0052 movel %a2@(82),%d0 46a32: 6768 beqs 46a9c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 46a34: 5380 subql #1,%d0 46a36: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 46a3a: 6660 bnes 46a9c <_CORE_mutex_Surrender+0x94> <== NEVER TAKEN 46a3c: 202a 0046 movel %a2@(70),%d0 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 46a40: 7202 moveq #2,%d1 46a42: b280 cmpl %d0,%d1 46a44: 6700 0084 beqw 46aca <_CORE_mutex_Surrender+0xc2> 46a48: 123c 0003 moveb #3,%d1 46a4c: b280 cmpl %d0,%d1 46a4e: 677a beqs 46aca <_CORE_mutex_Surrender+0xc2> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 46a50: 42aa 005a clrl %a2@(90) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 46a54: 7202 moveq #2,%d1 first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0; 46a56: 42aa 005e clrl %a2@(94) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 46a5a: b280 cmpl %d0,%d1 46a5c: 6748 beqs 46aa6 <_CORE_mutex_Surrender+0x9e> 46a5e: 123c 0003 moveb #3,%d1 46a62: b280 cmpl %d0,%d1 46a64: 6740 beqs 46aa6 <_CORE_mutex_Surrender+0x9e> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 46a66: 2f0a movel %a2,%sp@- 46a68: 4eb9 0004 81b8 jsr 481b8 <_Thread_queue_Dequeue> 46a6e: 588f addql #4,%sp 46a70: 2040 moveal %d0,%a0 46a72: 4a80 tstl %d0 46a74: 6700 0090 beqw 46b06 <_CORE_mutex_Surrender+0xfe> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 46a78: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 46a7a: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a80: 202a 0046 movel %a2@(70),%d0 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 46a84: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 46a88: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 46a8c: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a90: b280 cmpl %d0,%d1 46a92: 6764 beqs 46af8 <_CORE_mutex_Surrender+0xf0> 46a94: 123c 0003 moveb #3,%d1 46a98: b280 cmpl %d0,%d1 46a9a: 6734 beqs 46ad0 <_CORE_mutex_Surrender+0xc8> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a9c: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46aa0: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aa2: 4e5e unlk %fp 46aa4: 4e75 rts _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 46aa6: 4aa8 001c tstl %a0@(28) 46aaa: 66ba bnes 46a66 <_CORE_mutex_Surrender+0x5e> holder->real_priority != holder->current_priority ) { 46aac: 2028 0018 movel %a0@(24),%d0 46ab0: b0a8 0014 cmpl %a0@(20),%d0 46ab4: 67b0 beqs 46a66 <_CORE_mutex_Surrender+0x5e> _Thread_Change_priority( holder, holder->real_priority, true ); 46ab6: 4878 0001 pea 1 46aba: 2f00 movel %d0,%sp@- 46abc: 2f08 movel %a0,%sp@- 46abe: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> 46ac4: 4fef 000c lea %sp@(12),%sp 46ac8: 609c bras 46a66 <_CORE_mutex_Surrender+0x5e> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 46aca: 53a8 001c subql #1,%a0@(28) 46ace: 6080 bras 46a50 <_CORE_mutex_Surrender+0x48> case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 46ad0: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 46ad4: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 46ad8: b0a8 0014 cmpl %a0@(20),%d0 46adc: 64be bccs 46a9c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 46ade: 42a7 clrl %sp@- 46ae0: 2f00 movel %d0,%sp@- 46ae2: 2f08 movel %a0,%sp@- 46ae4: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aea: 246e fffc moveal %fp@(-4),%a2 the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ _Thread_Change_priority( 46aee: 4fef 000c lea %sp@(12),%sp 46af2: 4280 clrl %d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46af4: 4e5e unlk %fp 46af6: 4e75 rts 46af8: 246e fffc moveal %fp@(-4),%a2 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 46afc: 4280 clrl %d0 46afe: 52a8 001c addql #1,%a0@(28) } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b02: 4e5e unlk %fp 46b04: 4e75 rts } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46b06: 7001 moveq #1,%d0 46b08: 2540 004e movel %d0,%a2@(78) return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b0c: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46b10: 4200 clrb %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b12: 4e5e unlk %fp ... =============================================================================== 00046b6c <_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 ) { 46b6c: 4e56 0000 linkw %fp,#0 46b70: 2f0a movel %a2,%sp@- 46b72: 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)) ) { 46b76: 2f0a movel %a2,%sp@- 46b78: 4eb9 0004 81b8 jsr 481b8 <_Thread_queue_Dequeue> 46b7e: 588f addql #4,%sp 46b80: 4a80 tstl %d0 46b82: 670a beqs 46b8e <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b84: 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)) ) { 46b88: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b8a: 4e5e unlk %fp 46b8c: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b8e: 203c 0000 0700 movel #1792,%d0 46b94: 40c1 movew %sr,%d1 46b96: 8081 orl %d1,%d0 46b98: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b9a: 202a 0048 movel %a2@(72),%d0 46b9e: b0aa 0040 cmpl %a2@(64),%d0 46ba2: 6412 bccs 46bb6 <_CORE_semaphore_Surrender+0x4a> <== NEVER TAKEN the_semaphore->count += 1; 46ba4: 5280 addql #1,%d0 46ba6: 2540 0048 movel %d0,%a2@(72) 46baa: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46bac: 46c1 movew %d1,%sr } return status; } 46bae: 246e fffc moveal %fp@(-4),%a2 46bb2: 4e5e unlk %fp 46bb4: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46bb6: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46bb8: 46c1 movew %d1,%sr <== NOT EXECUTED 46bba: 60f2 bras 46bae <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED =============================================================================== 0004b9fc <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4b9fc: 4e56 0000 linkw %fp,#0 4ba00: 202e 0010 movel %fp@(16),%d0 4ba04: 2f0a movel %a2,%sp@- 4ba06: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4ba0a: 224a moveal %a2,%a1 4ba0c: 2f02 movel %d2,%sp@- 4ba0e: 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; 4ba12: 42aa 0004 clrl %a2@(4) next = starting_address; while ( count-- ) { 4ba16: 4a80 tstl %d0 4ba18: 6718 beqs 4ba32 <_Chain_Initialize+0x36> <== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 4ba1a: 206e 000c moveal %fp@(12),%a0 while ( count-- ) { current->next = next; next->previous = current; 4ba1e: 2149 0004 movel %a1,%a0@(4) 4ba22: 2208 movel %a0,%d1 4ba24: d282 addl %d2,%d1 current = next; next = (Chain_Node *) 4ba26: 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; 4ba28: 2288 movel %a0,%a1@ next->previous = current; current = next; next = (Chain_Node *) 4ba2a: 2248 moveal %a0,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4ba2c: 2041 moveal %d1,%a0 4ba2e: 4a80 tstl %d0 4ba30: 66ec bnes 4ba1e <_Chain_Initialize+0x22> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 4ba32: 200a movel %a2,%d0 4ba34: 5880 addql #4,%d0 4ba36: 2280 movel %d0,%a1@ the_chain->last = current; } 4ba38: 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; 4ba3a: 2549 0008 movel %a1,%a2@(8) } 4ba3e: 245f moveal %sp@+,%a2 4ba40: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000456d0 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 456d0: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456d6: 4e56 ffec linkw %fp,#-20 456da: 222e 0008 movel %fp@(8),%d1 456de: 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; 456e2: 2479 0005 f032 moveal 5f032 <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456e8: 242e 000c movel %fp@(12),%d2 456ec: 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; 456f0: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456f4: 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 ]; 456f8: 206a 010a moveal %a2@(266),%a0 _ISR_Disable( level ); 456fc: 40c4 movew %sr,%d4 456fe: 8084 orl %d4,%d0 45700: 46c0 movew %d0,%sr pending_events = api->pending_events; 45702: 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 ); 45704: 2001 movel %d1,%d0 45706: c083 andl %d3,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 45708: 670c beqs 45716 <_Event_Seize+0x46> 4570a: b081 cmpl %d1,%d0 4570c: 6700 0084 beqw 45792 <_Event_Seize+0xc2> 45710: 0802 0001 btst #1,%d2 45714: 667c bnes 45792 <_Event_Seize+0xc2> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 45716: 0802 0000 btst #0,%d2 4571a: 6662 bnes 4577e <_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; 4571c: 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; 45720: 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; 45722: 2541 0024 movel %d1,%a2@(36) executing->Wait.return_argument = event_out; 45726: 2549 0028 movel %a1,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4572a: 23c2 0005 f7c6 movel %d2,5f7c6 <_Event_Sync_state> _ISR_Enable( level ); 45730: 46c4 movew %d4,%sr if ( ticks ) { 45732: 4a85 tstl %d5 45734: 6672 bnes 457a8 <_Event_Seize+0xd8> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 45736: 4878 0100 pea 100 4573a: 2f0a movel %a2,%sp@- 4573c: 4eb9 0004 8720 jsr 48720 <_Thread_Set_state> _ISR_Disable( level ); 45742: 203c 0000 0700 movel #1792,%d0 45748: 40c1 movew %sr,%d1 4574a: 8081 orl %d1,%d0 4574c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4574e: 7401 moveq #1,%d2 45750: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 45752: 2039 0005 f7c6 movel 5f7c6 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 45758: 42b9 0005 f7c6 clrl 5f7c6 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4575e: b480 cmpl %d0,%d2 45760: 6700 00a4 beqw 45806 <_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 ); 45764: 2d4a 000c movel %a2,%fp@(12) 45768: 2d41 0010 movel %d1,%fp@(16) } 4576c: 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 ); 45772: 2d40 0008 movel %d0,%fp@(8) } 45776: 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 ); 45778: 4ef9 0004 7834 jmp 47834 <_Thread_blocking_operation_Cancel> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4577e: 46c4 movew %d4,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 45780: 720d moveq #13,%d1 45782: 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 ); } 45786: 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; 4578c: 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 ); } 4578e: 4e5e unlk %fp 45790: 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 = 45792: 2200 movel %d0,%d1 45794: 4681 notl %d1 45796: c283 andl %d3,%d1 45798: 2081 movel %d1,%a0@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 4579a: 46c4 movew %d4,%sr *event_out = seized_events; 4579c: 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 ); } 4579e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 457a4: 4e5e unlk %fp 457a6: 4e75 rts _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 457a8: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457ac: 223c 0004 599c movel #285084,%d1 the_watchdog->id = id; 457b2: 2540 0068 movel %d0,%a2@(104) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457b6: 2541 0064 movel %d1,%a2@(100) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 457ba: 2545 0054 movel %d5,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 457be: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 457c2: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 457c6: 486a 0048 pea %a2@(72) 457ca: 4879 0005 f050 pea 5f050 <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8f5c jsr 48f5c <_Watchdog_Insert> 457d6: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 457d8: 4878 0100 pea 100 457dc: 2f0a movel %a2,%sp@- 457de: 4eb9 0004 8720 jsr 48720 <_Thread_Set_state> _ISR_Disable( level ); 457e4: 203c 0000 0700 movel #1792,%d0 457ea: 40c1 movew %sr,%d1 457ec: 8081 orl %d1,%d0 457ee: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 457f0: 7401 moveq #1,%d2 457f2: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 457f4: 2039 0005 f7c6 movel 5f7c6 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 457fa: 42b9 0005 f7c6 clrl 5f7c6 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 45800: b480 cmpl %d0,%d2 45802: 6600 ff60 bnew 45764 <_Event_Seize+0x94> _ISR_Enable( level ); 45806: 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 ); } 45808: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4580e: 4e5e unlk %fp ... =============================================================================== 00045870 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 45870: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 45876: 4e56 ffec linkw %fp,#-20 4587a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4587e: 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 ]; 45882: 206a 010a moveal %a2@(266),%a0 option_set = (rtems_option) the_thread->Wait.option; 45886: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 4588a: 40c3 movew %sr,%d3 4588c: 8083 orl %d3,%d0 4588e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 45890: 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 ); 45894: 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; 45896: 2410 movel %a0@,%d2 45898: 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 ) ) { 4589a: 6778 beqs 45914 <_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() && 4589c: 2279 0005 f012 moveal 5f012 <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1 458a4: 670a beqs 458b0 <_Event_Surrender+0x40> 458a6: b5f9 0005 f032 cmpal 5f032 <_Thread_Executing>,%a2 458ac: 6700 00a0 beqw 4594e <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 458b0: 2a2a 0010 movel %a2@(16),%d5 458b4: 0285 0000 0100 andil #256,%d5 458ba: 674c beqs 45908 <_Event_Surrender+0x98> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 458bc: b081 cmpl %d1,%d0 458be: 6706 beqs 458c6 <_Event_Surrender+0x56> 458c0: 0804 0001 btst #1,%d4 458c4: 6742 beqs 45908 <_Event_Surrender+0x98> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 458c6: 2200 movel %d0,%d1 458c8: 4681 notl %d1 458ca: c282 andl %d2,%d1 458cc: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458ce: 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; 458d2: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458d6: 2080 movel %d0,%a0@ _ISR_Flash( level ); 458d8: 203c 0000 0700 movel #1792,%d0 458de: 46c3 movew %d3,%sr 458e0: 8083 orl %d3,%d0 458e2: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 458e4: 7a02 moveq #2,%d5 458e6: baaa 0050 cmpl %a2@(80),%d5 458ea: 6734 beqs 45920 <_Event_Surrender+0xb0> _ISR_Enable( level ); 458ec: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 458ee: 2f3c 1003 fff8 movel #268697592,%sp@- 458f4: 2f0a movel %a2,%sp@- 458f6: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> 458fc: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 458fe: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45904: 4e5e unlk %fp 45906: 4e75 rts _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 45908: 46c3 movew %d3,%sr } 4590a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45910: 4e5e unlk %fp 45912: 4e75 rts /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 45914: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45916: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4591c: 4e5e unlk %fp 4591e: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 45920: 7003 moveq #3,%d0 45922: 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 ); 45926: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 45928: 486a 0048 pea %a2@(72) 4592c: 4eb9 0004 90a4 jsr 490a4 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> 45940: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 45944: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4594a: 4e5e unlk %fp 4594c: 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) || 4594e: 2279 0005 f7c6 moveal 5f7c6 <_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() && 45954: 7a02 moveq #2,%d5 45956: ba89 cmpl %a1,%d5 45958: 6710 beqs 4596a <_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)) ) { 4595a: 2279 0005 f7c6 moveal 5f7c6 <_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() && 45960: 1a3c 0001 moveb #1,%d5 45964: ba89 cmpl %a1,%d5 45966: 6600 ff48 bnew 458b0 <_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) ) { 4596a: b081 cmpl %d1,%d0 4596c: 6706 beqs 45974 <_Event_Surrender+0x104> 4596e: 0804 0001 btst #1,%d4 45972: 671a beqs 4598e <_Event_Surrender+0x11e> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 45974: 2200 movel %d0,%d1 45976: 4681 notl %d1 45978: c282 andl %d2,%d1 4597a: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4597c: 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; 45980: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45984: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 45986: 7003 moveq #3,%d0 45988: 23c0 0005 f7c6 movel %d0,5f7c6 <_Event_Sync_state> } _ISR_Enable( level ); 4598e: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45990: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45996: 4e5e unlk %fp ... =============================================================================== 0004599c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4599c: 4e56 fffc linkw %fp,#-4 459a0: 2f03 movel %d3,%sp@- 459a2: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 459a4: 486e fffc pea %fp@(-4) 459a8: 2f2e 0008 movel %fp@(8),%sp@- 459ac: 4eb9 0004 7de4 jsr 47de4 <_Thread_Get> switch ( location ) { 459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4) 459b8: 6642 bnes 459fc <_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 ); 459ba: 223c 0000 0700 movel #1792,%d1 459c0: 40c2 movew %sr,%d2 459c2: 8282 orl %d2,%d1 459c4: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 459c6: 2040 moveal %d0,%a0 459c8: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 459cc: b0b9 0005 f032 cmpl 5f032 <_Thread_Executing>,%d0 459d2: 6734 beqs 45a08 <_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; 459d4: 7606 moveq #6,%d3 459d6: 2040 moveal %d0,%a0 459d8: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 459dc: 46c2 movew %d2,%sr 459de: 2f3c 1003 fff8 movel #268697592,%sp@- 459e4: 2f00 movel %d0,%sp@- 459e6: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 459ec: 508f addql #8,%sp 459ee: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 459fc: 242e fff4 movel %fp@(-12),%d2 45a00: 262e fff8 movel %fp@(-8),%d3 45a04: 4e5e unlk %fp 45a06: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45a08: 2239 0005 f7c6 movel 5f7c6 <_Event_Sync_state>,%d1 45a0e: 7601 moveq #1,%d3 45a10: b681 cmpl %d1,%d3 45a12: 66c0 bnes 459d4 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a14: 7606 moveq #6,%d3 45a16: 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; 45a18: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a1a: 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; 45a1e: 23c1 0005 f7c6 movel %d1,5f7c6 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 45a24: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45a26: 2f3c 1003 fff8 movel #268697592,%sp@- 45a2c: 2f00 movel %d0,%sp@- 45a2e: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 45a34: 508f addql #8,%sp 45a36: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 45a3c: 5380 subql #1,%d0 45a3e: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> 45a44: 60b6 bras 459fc <_Event_Timeout+0x60> ... =============================================================================== 0004bcc0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4bcc0: 4e56 ffcc linkw %fp,#-52 4bcc4: 226e 000c moveal %fp@(12),%a1 4bcc8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4bccc: 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; 4bcd0: 2c09 movel %a1,%d6 4bcd2: 5886 addql #4,%d6 uintptr_t const page_size = heap->page_size; 4bcd4: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4bcd8: 222e 0010 movel %fp@(16),%d1 4bcdc: 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; 4bce0: 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; 4bce4: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4bce8: bc89 cmpl %a1,%d6 4bcea: 6500 0146 bcsw 4be32 <_Heap_Allocate_aligned_with_boundary+0x172> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4bcee: 4a84 tstl %d4 4bcf0: 6600 013c bnew 4be2e <_Heap_Allocate_aligned_with_boundary+0x16e> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4bcf4: b1ca cmpal %a2,%a0 4bcf6: 6700 0152 beqw 4be4a <_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; 4bcfa: 242e fffc movel %fp@(-4),%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bcfe: 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; 4bd00: 5e82 addql #7,%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bd02: 9a89 subl %a1,%d5 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4bd04: 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; 4bd06: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bd0a: 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 ) { 4bd0e: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4bd12: 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 ) { 4bd14: b086 cmpl %d6,%d0 4bd16: 630e blss 4bd26 <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4bd18: 4a81 tstl %d1 4bd1a: 6628 bnes 4bd44 <_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; 4bd1c: 2408 movel %a0,%d2 4bd1e: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4bd20: 4a82 tstl %d2 4bd22: 6600 00ee bnew 4be12 <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4bd26: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4bd2a: b1ca cmpal %a2,%a0 4bd2c: 66e0 bnes 4bd0e <_Heap_Allocate_aligned_with_boundary+0x4e> 4bd2e: 4280 clrl %d0 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4bd30: b6aa 0044 cmpl %a2@(68),%d3 4bd34: 6304 blss 4bd3a <_Heap_Allocate_aligned_with_boundary+0x7a> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4bd36: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4bd3a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4bd40: 4e5e unlk %fp 4bd42: 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; 4bd44: 7efe moveq #-2,%d7 4bd46: 4be8 0008 lea %a0@(8),%a5 4bd4a: 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; 4bd4c: 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; 4bd50: 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; 4bd52: 2a2e fff8 movel %fp@(-8),%d5 4bd56: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bd58: 242e fff4 movel %fp@(-12),%d2 4bd5c: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4bd5e: 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; 4bd60: d085 addl %d5,%d0 4bd62: 4c41 7005 remul %d1,%d5,%d7 4bd66: 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 ) { 4bd68: b480 cmpl %d0,%d2 4bd6a: 630a blss 4bd76 <_Heap_Allocate_aligned_with_boundary+0xb6> 4bd6c: 2a00 movel %d0,%d5 4bd6e: 4c41 5002 remul %d1,%d2,%d5 4bd72: 9082 subl %d2,%d0 4bd74: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4bd76: 4a84 tstl %d4 4bd78: 676c beqs 4bde6 <_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; 4bd7a: 2002 movel %d2,%d0 4bd7c: d089 addl %a1,%d0 4bd7e: 2e00 movel %d0,%d7 4bd80: 4c44 7005 remul %d4,%d5,%d7 4bd84: 2e00 movel %d0,%d7 4bd86: 9e85 subl %d5,%d7 4bd88: 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 ) { 4bd8a: be82 cmpl %d2,%d7 4bd8c: 6358 blss 4bde6 <_Heap_Allocate_aligned_with_boundary+0x126> 4bd8e: be80 cmpl %d0,%d7 4bd90: 6454 bccs 4bde6 <_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; 4bd92: 2e0d movel %a5,%d7 4bd94: 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 ) { 4bd96: ba87 cmpl %d7,%d5 4bd98: 658c bcss 4bd26 <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4bd9a: 9a89 subl %a1,%d5 4bd9c: 2005 movel %d5,%d0 4bd9e: 2647 moveal %d7,%a3 4bda0: 4c41 0002 remul %d1,%d2,%d0 4bda4: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4bda6: 2005 movel %d5,%d0 4bda8: d089 addl %a1,%d0 4bdaa: 2405 movel %d5,%d2 4bdac: 2e00 movel %d0,%d7 4bdae: 4c44 7005 remul %d4,%d5,%d7 4bdb2: 2e00 movel %d0,%d7 4bdb4: 9e85 subl %d5,%d7 4bdb6: 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 ) { 4bdb8: be82 cmpl %d2,%d7 4bdba: 632a blss 4bde6 <_Heap_Allocate_aligned_with_boundary+0x126> 4bdbc: be80 cmpl %d0,%d7 4bdbe: 6426 bccs 4bde6 <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4bdc0: ba8b cmpl %a3,%d5 4bdc2: 6500 ff62 bcsw 4bd26 <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4bdc6: 9a89 subl %a1,%d5 4bdc8: 2005 movel %d5,%d0 4bdca: 4c41 0002 remul %d1,%d2,%d0 4bdce: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4bdd0: 2005 movel %d5,%d0 4bdd2: d089 addl %a1,%d0 4bdd4: 2405 movel %d5,%d2 4bdd6: 2e00 movel %d0,%d7 4bdd8: 4c44 7005 remul %d4,%d5,%d7 4bddc: 2e00 movel %d0,%d7 4bdde: 9e85 subl %d5,%d7 4bde0: 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 ) { 4bde2: be82 cmpl %d2,%d7 4bde4: 62d6 bhis 4bdbc <_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 ) { 4bde6: b48d cmpl %a5,%d2 4bde8: 6500 ff3c bcsw 4bd26 <_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; 4bdec: 70f8 moveq #-8,%d0 4bdee: 9088 subl %a0,%d0 4bdf0: 2a40 moveal %d0,%a5 4bdf2: 2e02 movel %d2,%d7 4bdf4: dbc2 addal %d2,%a5 4bdf6: 202e fffc movel %fp@(-4),%d0 4bdfa: 4c40 7005 remul %d0,%d5,%d7 4bdfe: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4be00: bbcc cmpal %a4,%a5 4be02: 6400 ff1c bccw 4bd20 <_Heap_Allocate_aligned_with_boundary+0x60> 4be06: 4a8d tstl %a5 4be08: 6600 ff1c bnew 4bd26 <_Heap_Allocate_aligned_with_boundary+0x66> boundary ); } } if ( alloc_begin != 0 ) { 4be0c: 4a82 tstl %d2 4be0e: 6700 ff16 beqw 4bd26 <_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 ); 4be12: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4be14: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4be18: 2f02 movel %d2,%sp@- 4be1a: 2f08 movel %a0,%sp@- 4be1c: 2f0a movel %a2,%sp@- 4be1e: 4eb9 0004 6e94 jsr 46e94 <_Heap_Block_allocate> 4be24: 4fef 0010 lea %sp@(16),%sp 4be28: 2002 movel %d2,%d0 4be2a: 6000 ff04 braw 4bd30 <_Heap_Allocate_aligned_with_boundary+0x70> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4be2e: b889 cmpl %a1,%d4 4be30: 640c bccs 4be3e <_Heap_Allocate_aligned_with_boundary+0x17e> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4be32: 4280 clrl %d0 } return (void *) alloc_begin; } 4be34: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4be3a: 4e5e unlk %fp 4be3c: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4be3e: 4a81 tstl %d1 4be40: 6600 feb2 bnew 4bcf4 <_Heap_Allocate_aligned_with_boundary+0x34> 4be44: 2200 movel %d0,%d1 4be46: 6000 feac braw 4bcf4 <_Heap_Allocate_aligned_with_boundary+0x34> alignment = page_size; } } while ( block != free_list_tail ) { 4be4a: 4283 clrl %d3 4be4c: 4280 clrl %d0 4be4e: 6000 fee0 braw 4bd30 <_Heap_Allocate_aligned_with_boundary+0x70> ... =============================================================================== 00046e94 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e94: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e96: 4e56 ffe0 linkw %fp,#-32 46e9a: 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; 46e9e: 2041 moveal %d1,%a0 46ea0: 5188 subql #8,%a0 46ea2: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46ea6: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46eaa: 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; 46eac: 2848 moveal %a0,%a4 46eae: 240a movel %a2,%d2 46eb0: 99ca subal %a2,%a4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46eb2: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46eb6: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46eba: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46ebe: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46ec2: 4a03 tstb %d3 46ec4: 6600 00aa bnew 46f70 <_Heap_Block_allocate+0xdc> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 46ec8: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46ecc: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 46ece: 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; 46ed2: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 46ed6: 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; 46ed8: 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 ); 46edc: 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; 46ee0: 2340 0008 movel %d0,%a1@(8) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46ee4: 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 ); 46ee8: 97ab 0030 subl %d3,%a3@(48) next->prev = prev; 46eec: 2b49 000c movel %a1,%a5@(12) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46ef0: b08c cmpl %a4,%d0 46ef2: 6200 0088 bhiw 46f7c <_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; 46ef6: 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 ) 46efa: 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 ) ) { 46efe: 7201 moveq #1,%d1 46f00: 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; 46f02: 2008 movel %a0,%d0 46f04: 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; 46f06: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 46f0a: c2aa 0004 andl %a2@(4),%d1 46f0e: 6700 0082 beqw 46f92 <_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; 46f12: 78fe moveq #-2,%d4 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 46f14: 52ab 0038 addql #1,%a3@(56) 46f18: 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; 46f1a: 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; 46f1e: 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; 46f20: 7801 moveq #1,%d4 46f22: 8880 orl %d0,%d4 new_block->next = next; 46f24: 254c 0008 movel %a4,%a2@(8) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f28: d483 addl %d3,%d2 46f2a: 9488 subl %a0,%d2 new_block->prev = block_before; 46f2c: 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; 46f30: 2544 0004 movel %d4,%a2@(4) block_before->next = new_block; 46f34: 234a 0008 movel %a2,%a1@(8) next->prev = new_block; 46f38: 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 ); 46f3c: 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; 46f3e: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46f40: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f44: 2f05 movel %d5,%sp@- 46f46: 2f01 movel %d1,%sp@- 46f48: 2f08 movel %a0,%sp@- 46f4a: 2f0b movel %a3,%sp@- 46f4c: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46f52: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 46f56: 202b 0030 movel %a3@(48),%d0 Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 46f5a: b0ab 0034 cmpl %a3@(52),%d0 46f5e: 6404 bccs 46f64 <_Heap_Block_allocate+0xd0> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 46f60: 2740 0034 movel %d0,%a3@(52) } return block; } 46f64: 200a movel %a2,%d0 46f66: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f6c: 4e5e unlk %fp 46f6e: 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 ) { 46f70: 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 ); 46f74: 224b moveal %a3,%a1 } if ( alloc_area_offset < heap->page_size ) { 46f76: b08c cmpl %a4,%d0 46f78: 6300 ff7c blsw 46ef6 <_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 ); 46f7c: 4874 5800 pea %a4@(00000000,%d5:l) 46f80: 2f09 movel %a1,%sp@- 46f82: 2f0a movel %a2,%sp@- 46f84: 2f0b movel %a3,%sp@- 46f86: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46f8c: 4fef 0010 lea %sp@(16),%sp 46f90: 60c4 bras 46f56 <_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); 46f92: 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; 46f94: 78fe moveq #-2,%d4 46f96: 2209 movel %a1,%d1 46f98: c8aa 0004 andl %a2@(4),%d4 46f9c: 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; 46f9e: 78fe moveq #-2,%d4 46fa0: 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; 46fa2: 7801 moveq #1,%d4 46fa4: 8880 orl %d0,%d4 new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46fa6: d483 addl %d3,%d2 46fa8: 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; 46faa: 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 ); 46fae: 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; 46fb0: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46fb2: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46fb6: 2f05 movel %d5,%sp@- 46fb8: 2f01 movel %d1,%sp@- 46fba: 2f08 movel %a0,%sp@- 46fbc: 2f0b movel %a3,%sp@- 46fbe: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46fc4: 4fef 0010 lea %sp@(16),%sp 46fc8: 608c bras 46f56 <_Heap_Block_allocate+0xc2> ... =============================================================================== 00050dc4 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50dc4: 4e56 fff4 linkw %fp,#-12 50dc8: 206e 0008 moveal %fp@(8),%a0 50dcc: 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; 50dd0: 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; 50dd4: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50dd8: 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; 50ddc: b0a8 0018 cmpl %a0@(24),%d0 50de0: 6410 bccs 50df2 <_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 ) { 50de2: b280 cmpl %d0,%d1 50de4: 671c beqs 50e02 <_Heap_Extend+0x3e> 50de6: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 50de8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50dee: 4e5e unlk %fp 50df0: 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 ) { 50df2: b280 cmpl %d0,%d1 50df4: 63ec blss 50de2 <_Heap_Extend+0x1e> 50df6: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 50df8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50dfe: 4e5e unlk %fp 50e00: 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; 50e02: 2200 movel %d0,%d1 50e04: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 50e08: 70f8 moveq #-8,%d0 50e0a: 9089 subl %a1,%d0 50e0c: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 50e0e: 2600 movel %d0,%d3 50e10: 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; 50e16: 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; 50e1a: 246e 0014 moveal %fp@(20),%a2 50e1e: 9082 subl %d2,%d0 50e20: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 50e22: b0a8 0014 cmpl %a0@(20),%d0 50e26: 640c bccs 50e34 <_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 )); 50e28: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 50e2a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50e30: 4e5e unlk %fp 50e32: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50e34: 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); 50e36: 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; 50e3a: 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 = 50e3e: 2228 0020 movel %a0@(32),%d1 50e42: 928a subl %a2,%d1 50e44: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 50e46: 214a 0024 movel %a2,%a0@(36) 50e4a: 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 = 50e4e: 7401 moveq #1,%d2 50e50: 8481 orl %d1,%d2 50e52: 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 )); 50e56: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 50e5a: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 50e5e: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 50e62: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50e66: 2f08 movel %a0,%sp@- 50e68: 4eb9 0004 b5e8 jsr 4b5e8 <_Heap_Free> 50e6e: 508f addql #8,%sp 50e70: 4280 clrl %d0 50e72: 60b6 bras 50e2a <_Heap_Extend+0x66> =============================================================================== 0004be54 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4be54: 4e56 ffe4 linkw %fp,#-28 4be58: 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 ) 4be5c: 2040 moveal %d0,%a0 4be5e: 5188 subql #8,%a0 4be60: 226e 0008 moveal %fp@(8),%a1 4be64: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4be6a: 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; 4be6e: 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 ) 4be72: 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 4be74: b088 cmpl %a0,%d0 4be76: 6200 00a0 bhiw 4bf18 <_Heap_Free+0xc4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 4be7a: 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 4be7e: b288 cmpl %a0,%d1 4be80: 6500 0096 bcsw 4bf18 <_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; 4be84: 2628 0004 movel %a0@(4),%d3 4be88: 74fe moveq #-2,%d2 4be8a: 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); 4be8c: 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 4be90: b5c0 cmpal %d0,%a2 4be92: 6500 0084 bcsw 4bf18 <_Heap_Free+0xc4> 4be96: b5c1 cmpal %d1,%a2 4be98: 627e bhis 4bf18 <_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; 4be9a: 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 ) ) { 4be9e: 7a01 moveq #1,%d5 4bea0: ca84 andl %d4,%d5 4bea2: 4a05 tstb %d5 4bea4: 6772 beqs 4bf18 <_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; 4bea6: 7afe moveq #-2,%d5 4bea8: c885 andl %d5,%d4 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4beaa: b5c1 cmpal %d1,%a2 4beac: 6700 00fa beqw 4bfa8 <_Heap_Free+0x154> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4beb0: 7a01 moveq #1,%d5 4beb2: 7c01 moveq #1,%d6 4beb4: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4beb8: 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 ) ) { 4beba: 7c01 moveq #1,%d6 4bebc: c686 andl %d6,%d3 4bebe: 4a03 tstb %d3 4bec0: 6660 bnes 4bf22 <_Heap_Free+0xce> uintptr_t const prev_size = block->prev_size; 4bec2: 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); 4bec4: 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 4bec6: b1c0 cmpal %d0,%a0 4bec8: 654e bcss 4bf18 <_Heap_Free+0xc4> <== NEVER TAKEN 4beca: b1c1 cmpal %d1,%a0 4becc: 624a bhis 4bf18 <_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) ) { 4bece: 7001 moveq #1,%d0 4bed0: c0a8 0004 andl %a0@(4),%d0 4bed4: 4a00 tstb %d0 4bed6: 6740 beqs 4bf18 <_Heap_Free+0xc4> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4bed8: 4a05 tstb %d5 4beda: 6700 00d2 beqw 4bfae <_Heap_Free+0x15a> } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4bede: 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; 4bee2: 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; 4bee6: d882 addl %d2,%d4 4bee8: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4beea: 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; 4beec: 246a 0008 moveal %a2@(8),%a2 4bef0: 8083 orl %d3,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4bef2: 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; 4bef6: 2140 0004 movel %d0,%a0@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4befa: 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; 4befe: 274a 0008 movel %a2,%a3@(8) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bf02: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4bf06: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4bf0a: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4bf0e: 7001 moveq #1,%d0 return( true ); } 4bf10: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4bf14: 4e5e unlk %fp 4bf16: 4e75 rts 4bf18: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4bf1c: 4200 clrb %d0 } 4bf1e: 4e5e unlk %fp 4bf20: 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 */ 4bf22: 4a05 tstb %d5 4bf24: 6736 beqs 4bf5c <_Heap_Free+0x108> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4bf26: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4bf2a: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4bf2c: 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; 4bf2e: 246a 0008 moveal %a2@(8),%a2 4bf32: 8084 orl %d4,%d0 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4bf34: 2184 4800 movel %d4,%a0@(00000000,%d4:l) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4bf38: 214b 000c movel %a3,%a0@(12) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4bf3c: 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; 4bf40: 2140 0004 movel %d0,%a0@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bf44: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4bf48: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4bf4c: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4bf50: 7001 moveq #1,%d0 new_block->prev = prev; next->prev = new_block; 4bf52: 2548 000c movel %a0,%a2@(12) prev->next = new_block; 4bf56: 2748 0008 movel %a0,%a3@(8) 4bf5a: 60b4 bras 4bf10 <_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; 4bf5c: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4bf5e: 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; 4bf60: 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; 4bf62: 2669 0008 moveal %a1@(8),%a3 4bf66: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4bf6a: cdaa 0004 andl %d6,%a2@(4) next_block->prev_size = block_size; 4bf6e: 2482 movel %d2,%a2@ /* Statistics */ ++stats->free_blocks; 4bf70: 2029 0038 movel %a1@(56),%d0 4bf74: 5280 addql #1,%d0 new_block->next = next; 4bf76: 214b 0008 movel %a3,%a0@(8) new_block->prev = block_before; 4bf7a: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4bf7e: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 4bf82: 2748 000c movel %a0,%a3@(12) 4bf86: 2340 0038 movel %d0,%a1@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4bf8a: b0a9 003c cmpl %a1@(60),%d0 4bf8e: 6300 ff72 blsw 4bf02 <_Heap_Free+0xae> } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bf92: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4bf96: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4bf9a: 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; 4bf9e: 2340 003c movel %d0,%a1@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bfa2: 7001 moveq #1,%d0 4bfa4: 6000 ff6a braw 4bf10 <_Heap_Free+0xbc> _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4bfa8: 4205 clrb %d5 4bfaa: 6000 ff0e braw 4beba <_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; 4bfae: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4bfb0: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4bfb2: 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; 4bfb4: 8a83 orl %d3,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4bfb6: 2483 movel %d3,%a2@ } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bfb8: 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; 4bfba: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4bfbe: cdaa 0004 andl %d6,%a2@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bfc2: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4bfc6: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4bfca: 52a9 0050 addql #1,%a1@(80) 4bfce: 6000 ff40 braw 4bf10 <_Heap_Free+0xbc> ... =============================================================================== 00050e74 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 50e74: 4e56 fff4 linkw %fp,#-12 50e78: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50e7c: 266e 0008 moveal %fp@(8),%a3 50e80: 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; 50e84: 206b 0008 moveal %a3@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 50e88: 4292 clrl %a2@ info->largest = 0; 50e8a: 42aa 0004 clrl %a2@(4) info->total = 0; 50e8e: 42aa 0008 clrl %a2@(8) for(the_block = _Heap_Free_list_first(the_heap); 50e92: b1cb cmpal %a3,%a0 50e94: 672e beqs 50ec4 <_Heap_Get_free_information+0x50><== NEVER TAKEN 50e96: 327c 0001 moveaw #1,%a1 50e9a: 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; 50e9c: 70fe moveq #-2,%d0 the_block != tail; the_block = the_block->next) 50e9e: 2409 movel %a1,%d2 50ea0: 5282 addql #1,%d2 50ea2: 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; 50ea6: d280 addl %d0,%d1 if ( info->largest < the_size ) 50ea8: b0aa 0004 cmpl %a2@(4),%d0 50eac: 6304 blss 50eb2 <_Heap_Get_free_information+0x3e> info->largest = the_size; 50eae: 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) 50eb2: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 50eb6: b1cb cmpal %a3,%a0 50eb8: 6704 beqs 50ebe <_Heap_Get_free_information+0x4a> 50eba: 2242 moveal %d2,%a1 50ebc: 60de bras 50e9c <_Heap_Get_free_information+0x28> 50ebe: 2541 0008 movel %d1,%a2@(8) 50ec2: 2489 movel %a1,%a2@ info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 50ec4: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 50ec8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050ecc <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 50ecc: 4e56 fff4 linkw %fp,#-12 50ed0: 206e 0008 moveal %fp@(8),%a0 50ed4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 50ed8: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 50edc: 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; 50ee0: 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; 50ee4: 4292 clrl %a2@ the_info->Free.total = 0; 50ee6: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 50eea: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 50eee: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 50ef2: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 50ef6: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 50efa: b489 cmpl %a1,%d2 50efc: 6746 beqs 50f44 <_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; 50efe: 260a movel %a2,%d3 50f00: 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 ) { 50f06: 2229 0004 movel %a1@(4),%d1 50f0a: 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) ) 50f0c: 204a moveal %a2,%a0 50f0e: 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); 50f10: 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; 50f12: 2229 0004 movel %a1@(4),%d1 50f16: 0801 0000 btst #0,%d1 50f1a: 6702 beqs 50f1e <_Heap_Get_information+0x52> 50f1c: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 50f1e: 5290 addql #1,%a0@ info->total += the_size; 50f20: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 50f24: b0a8 0004 cmpl %a0@(4),%d0 50f28: 6304 blss 50f2e <_Heap_Get_information+0x62> info->largest = the_size; 50f2a: 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 ) { 50f2e: b3c2 cmpal %d2,%a1 50f30: 66d8 bnes 50f0a <_Heap_Get_information+0x3e> 50f32: 202a 0014 movel %a2@(20),%d0 50f36: 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; 50f38: 2540 0014 movel %d0,%a2@(20) } 50f3c: 4cd7 040c moveml %sp@,%d2-%d3/%a2 50f40: 4e5e unlk %fp 50f42: 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 ) { 50f44: 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; 50f46: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 50f4a: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 50f4e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00046c60 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 46c60: 4e56 ffe8 linkw %fp,#-24 46c64: 206e 0008 moveal %fp@(8),%a0 46c68: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 46c6c: 226e 000c moveal %fp@(12),%a1 46c70: 242e 0010 movel %fp@(16),%d2 46c74: 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 ) { 46c78: 6600 00ce bnew 46d48 <_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; 46c7c: 2009 movel %a1,%d0 46c7e: 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 ) { 46c80: 123c 0004 moveb #4,%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46c84: 2a00 movel %d0,%d5 46c86: 7610 moveq #16,%d3 46c88: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46c8c: 4a84 tstl %d4 46c8e: 6704 beqs 46c94 <_Heap_Initialize+0x34> <== ALWAYS TAKEN return value - remainder + alignment; 46c90: d081 addl %d1,%d0 46c92: 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; 46c94: 2809 movel %a1,%d4 46c96: 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 ( 46c98: b889 cmpl %a1,%d4 46c9a: 6500 00bc bcsw 46d58 <_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); 46c9e: 2a00 movel %d0,%d5 46ca0: 2440 moveal %d0,%a2 46ca2: 9a89 subl %a1,%d5 46ca4: 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 ( 46ca6: ba82 cmpl %d2,%d5 46ca8: 6400 00ae bccw 46d58 <_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; 46cac: 9485 subl %d5,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 46cae: 2a02 movel %d2,%d5 46cb0: 4c41 5000 remul %d1,%d0,%d5 46cb4: 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 ( 46cb6: b483 cmpl %d3,%d2 46cb8: 6500 009e bcsw 46d58 <_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; 46cbc: 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); 46cbe: 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; 46cc2: 2002 movel %d2,%d0 46cc4: 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; 46cc6: 8a82 orl %d2,%d5 return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 46cc8: 2481 movel %d1,%a2@ first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 46cca: 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; 46cce: 2a0a movel %a2,%d5 46cd0: 9a8b subl %a3,%d5 46cd2: 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++; 46cd6: 2a39 0005 e714 movel 5e714 ,%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; 46cdc: 2682 movel %d2,%a3@ last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; 46cde: 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; 46ce2: 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 ); 46ce4: 2548 0008 movel %a0,%a2@(8) first_block->prev = _Heap_Free_list_head( heap ); 46ce8: 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; 46cec: 2143 0014 movel %d3,%a0@(20) heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; 46cf0: 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; 46cf4: 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++; 46cf8: 2145 0028 movel %d5,%a0@(40) 46cfc: 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; 46cfe: 2142 002c movel %d2,%a0@(44) stats->free_size = first_block_size; 46d02: 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; 46d06: 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; 46d0a: 2141 0038 movel %d1,%a0@(56) stats->max_free_blocks = 1; 46d0e: 2141 003c movel %d1,%a0@(60) stats->used_blocks = 0; 46d12: 42a8 0040 clrl %a0@(64) stats->max_search = 0; 46d16: 42a8 0044 clrl %a0@(68) stats->allocs = 0; 46d1a: 42a8 0048 clrl %a0@(72) stats->searches = 0; 46d1e: 42a8 004c clrl %a0@(76) stats->frees = 0; 46d22: 42a8 0050 clrl %a0@(80) stats->resizes = 0; 46d26: 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; 46d2a: 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++; 46d2e: 23c5 0005 e714 movel %d5,5e714 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; 46d34: 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; 46d38: 214a 0020 movel %a2,%a0@(32) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 46d3c: 214a 0008 movel %a2,%a0@(8) _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 46d40: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46d44: 4e5e unlk %fp 46d46: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d48: 7003 moveq #3,%d0 46d4a: c081 andl %d1,%d0 if ( remainder != 0 ) { 46d4c: 6704 beqs 46d52 <_Heap_Initialize+0xf2> return value - remainder + alignment; 46d4e: 5881 addql #4,%d1 46d50: 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 ) { 46d52: 7003 moveq #3,%d0 46d54: b081 cmpl %d1,%d0 46d56: 650a bcss 46d62 <_Heap_Initialize+0x102> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 46d58: 4280 clrl %d0 } 46d5a: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46d5e: 4e5e unlk %fp 46d60: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d62: 7610 moveq #16,%d3 46d64: 4c41 3000 remul %d1,%d0,%d3 if ( remainder != 0 ) { 46d68: 4a80 tstl %d0 46d6a: 671e beqs 46d8a <_Heap_Initialize+0x12a> return value - remainder + alignment; 46d6c: 2601 movel %d1,%d3 46d6e: 0683 0000 0010 addil #16,%d3 46d74: 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; 46d76: 2009 movel %a1,%d0 46d78: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d7a: 2a00 movel %d0,%d5 46d7c: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46d80: 4a84 tstl %d4 46d82: 6700 ff10 beqw 46c94 <_Heap_Initialize+0x34> 46d86: 6000 ff08 braw 46c90 <_Heap_Initialize+0x30> 46d8a: 2009 movel %a1,%d0 46d8c: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d8e: 2a00 movel %d0,%d5 if ( remainder != 0 ) { 46d90: 7610 moveq #16,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d92: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46d96: 4a84 tstl %d4 46d98: 6700 fefa beqw 46c94 <_Heap_Initialize+0x34> 46d9c: 6000 fef2 braw 46c90 <_Heap_Initialize+0x30> =============================================================================== 0005bb3c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5bb3c: 4e56 0000 linkw %fp,#0 5bb40: 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 ) 5bb44: 2040 moveal %d0,%a0 5bb46: 5188 subql #8,%a0 5bb48: 226e 0008 moveal %fp@(8),%a1 5bb4c: 2f02 movel %d2,%sp@- 5bb4e: 2400 movel %d0,%d2 5bb50: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5bb56: 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; 5bb58: 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 5bb5c: b288 cmpl %a0,%d1 5bb5e: 6238 bhis 5bb98 <_Heap_Size_of_alloc_area+0x5c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 5bb60: 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 5bb64: b3c8 cmpal %a0,%a1 5bb66: 6530 bcss 5bb98 <_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); 5bb68: 74fe moveq #-2,%d2 5bb6a: c4a8 0004 andl %a0@(4),%d2 5bb6e: 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 5bb70: b1c1 cmpal %d1,%a0 5bb72: 6524 bcss 5bb98 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 5bb74: b1c9 cmpal %a1,%a0 5bb76: 6220 bhis 5bb98 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5bb78: 7201 moveq #1,%d1 5bb7a: c2a8 0004 andl %a0@(4),%d1 5bb7e: 4a01 tstb %d1 5bb80: 6716 beqs 5bb98 <_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; 5bb82: 7204 moveq #4,%d1 5bb84: 9280 subl %d0,%d1 5bb86: 2001 movel %d1,%d0 5bb88: d088 addl %a0,%d0 5bb8a: 226e 0010 moveal %fp@(16),%a1 return true; } 5bb8e: 241f movel %sp@+,%d2 5bb90: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5bb92: 2280 movel %d0,%a1@ 5bb94: 7001 moveq #1,%d0 return true; } 5bb96: 4e75 rts 5bb98: 241f movel %sp@+,%d2 5bb9a: 4e5e unlk %fp return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 5bb9c: 4200 clrb %d0 <== NOT EXECUTED } =============================================================================== 000479bc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 479bc: 4e56 ffc8 linkw %fp,#-56 479c0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 479c4: 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; 479c8: 4bfa 0496 lea %pc@(47e60 <_Heap_Walk_print>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 479cc: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 479d0: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 479d4: 282a 0014 movel %a2@(20),%d4 Heap_Block *const last_block = heap->last_block; 479d8: 2a2a 0024 movel %a2@(36),%d5 Heap_Block *block = heap->first_block; 479dc: 266a 0020 moveal %a2@(32),%a3 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 479e0: 4a2e 0013 tstb %fp@(19) 479e4: 6604 bnes 479ea <_Heap_Walk+0x2e> 479e6: 4bfa ffcc lea %pc@(479b4 <_Heap_Walk_print_nothing>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 479ea: 7003 moveq #3,%d0 479ec: b0b9 0006 1608 cmpl 61608 <_System_state_Current>,%d0 479f2: 670c beqs 47a00 <_Heap_Walk+0x44> block = next_block; } return true; } 479f4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 479fa: 7001 moveq #1,%d0 block = next_block; } return true; } 479fc: 4e5e unlk %fp 479fe: 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)( 47a00: 2f2a 000c movel %a2@(12),%sp@- 47a04: 2f2a 0008 movel %a2@(8),%sp@- 47a08: 2f05 movel %d5,%sp@- 47a0a: 2f0b movel %a3,%sp@- 47a0c: 2f2a 001c movel %a2@(28),%sp@- 47a10: 2f2a 0018 movel %a2@(24),%sp@- 47a14: 2f04 movel %d4,%sp@- 47a16: 2f03 movel %d3,%sp@- 47a18: 4879 0005 d784 pea 5d784 <_Status_Object_name_errors_to_status+0x14> 47a1e: 42a7 clrl %sp@- 47a20: 2f02 movel %d2,%sp@- 47a22: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 47a24: 4fef 002c lea %sp@(44),%sp 47a28: 4a83 tstl %d3 47a2a: 6700 0154 beqw 47b80 <_Heap_Walk+0x1c4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 47a2e: 7003 moveq #3,%d0 47a30: c083 andl %d3,%d0 47a32: 6600 016a bnew 47b9e <_Heap_Walk+0x1e2> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 47a36: 2204 movel %d4,%d1 47a38: 4c43 1000 remul %d3,%d0,%d1 47a3c: 4a80 tstl %d0 47a3e: 6600 0176 bnew 47bb6 <_Heap_Walk+0x1fa> ); return false; } if ( 47a42: 200b movel %a3,%d0 47a44: 5080 addql #8,%d0 47a46: 4c43 0001 remul %d3,%d1,%d0 47a4a: 4a81 tstl %d1 47a4c: 6600 0180 bnew 47bce <_Heap_Walk+0x212> 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; 47a50: 2c2b 0004 movel %a3@(4),%d6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 47a54: 7201 moveq #1,%d1 47a56: c286 andl %d6,%d1 47a58: 2d46 fff0 movel %d6,%fp@(-16) 47a5c: 4a01 tstb %d1 47a5e: 6700 0186 beqw 47be6 <_Heap_Walk+0x22a> ); return false; } if ( first_block->prev_size != page_size ) { 47a62: 2053 moveal %a3@,%a0 47a64: b1c3 cmpal %d3,%a0 47a66: 6600 00de bnew 47b46 <_Heap_Walk+0x18a> ); return false; } if ( _Heap_Is_free( last_block ) ) { 47a6a: 2045 moveal %d5,%a0 47a6c: 7cfe moveq #-2,%d6 47a6e: 7001 moveq #1,%d0 47a70: cca8 0004 andl %a0@(4),%d6 47a74: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 47a78: 4a00 tstb %d0 47a7a: 6700 0180 beqw 47bfc <_Heap_Walk+0x240> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 47a7e: 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; 47a82: 206a 0008 moveal %a2@(8),%a0 47a86: 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 ) { 47a8a: b1ca cmpal %a2,%a0 47a8c: 6700 0192 beqw 47c20 <_Heap_Walk+0x264> 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; 47a90: 2e2a 0020 movel %a2@(32),%d7 47a94: 2d47 fff4 movel %d7,%fp@(-12) 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 47a98: b1c7 cmpal %d7,%a0 47a9a: 6500 00c4 bcsw 47b60 <_Heap_Walk+0x1a4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 47a9e: 286a 0024 moveal %a2@(36),%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 47aa2: b1cc cmpal %a4,%a0 47aa4: 6200 00ba bhiw 47b60 <_Heap_Walk+0x1a4> ); return false; } if ( 47aa8: 2248 moveal %a0,%a1 47aaa: 5089 addql #8,%a1 47aac: 2009 movel %a1,%d0 47aae: 4c46 0007 remul %d6,%d7,%d0 47ab2: 2d49 fff8 movel %a1,%fp@(-8) 47ab6: 4a87 tstl %d7 47ab8: 6600 0372 bnew 47e2c <_Heap_Walk+0x470> ); return false; } if ( _Heap_Is_used( free_block ) ) { 47abc: 7efe moveq #-2,%d7 47abe: 7001 moveq #1,%d0 47ac0: cea8 0004 andl %a0@(4),%d7 47ac4: c0b0 7804 andl %a0@(00000004,%d7:l),%d0 47ac8: 6600 037c bnew 47e46 <_Heap_Walk+0x48a> ); return false; } if ( free_block->prev != prev_block ) { 47acc: 2e28 000c movel %a0@(12),%d7 47ad0: be8a cmpl %a2,%d7 47ad2: 6650 bnes 47b24 <_Heap_Walk+0x168> <== NEVER TAKEN 47ad4: 202e fff0 movel %fp@(-16),%d0 47ad8: 2241 moveal %d1,%a1 47ada: 2c2e fff4 movel %fp@(-12),%d6 47ade: 2d40 fff8 movel %d0,%fp@(-8) 47ae2: 2d43 fff4 movel %d3,%fp@(-12) (*printer)( 47ae6: 2008 movel %a0,%d0 return false; } prev_block = free_block; free_block = free_block->next; 47ae8: 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 ) { 47aec: b1ca cmpal %a2,%a0 47aee: 6700 0122 beqw 47c12 <_Heap_Walk+0x256> 47af2: bc88 cmpl %a0,%d6 47af4: 626a bhis 47b60 <_Heap_Walk+0x1a4> ); return false; } if ( 47af6: 2e08 movel %a0,%d7 47af8: 5087 addql #8,%d7 47afa: b1cc cmpal %a4,%a0 47afc: 6262 bhis 47b60 <_Heap_Walk+0x1a4> <== NEVER TAKEN 47afe: 262e fffc movel %fp@(-4),%d3 47b02: 4c43 7001 remul %d3,%d1,%d7 47b06: 4a81 tstl %d1 47b08: 6600 0322 bnew 47e2c <_Heap_Walk+0x470> ); return false; } if ( _Heap_Is_used( free_block ) ) { 47b0c: 72fe moveq #-2,%d1 47b0e: 7e01 moveq #1,%d7 47b10: c2a8 0004 andl %a0@(4),%d1 47b14: ceb0 1804 andl %a0@(00000004,%d1:l),%d7 47b18: 6600 032c bnew 47e46 <_Heap_Walk+0x48a> ); return false; } if ( free_block->prev != prev_block ) { 47b1c: 2e28 000c movel %a0@(12),%d7 47b20: b087 cmpl %d7,%d0 47b22: 67c2 beqs 47ae6 <_Heap_Walk+0x12a> (*printer)( 47b24: 2f07 movel %d7,%sp@- 47b26: 2f08 movel %a0,%sp@- 47b28: 4879 0005 d975 pea 5d975 <_Status_Object_name_errors_to_status+0x205> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b2e: 4878 0001 pea 1 47b32: 2f02 movel %d2,%sp@- 47b34: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47b36: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b3a: 4200 clrb %d0 block = next_block; } return true; } 47b3c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b42: 4e5e unlk %fp 47b44: 4e75 rts return false; } if ( first_block->prev_size != page_size ) { (*printer)( 47b46: 2f03 movel %d3,%sp@- 47b48: 2f08 movel %a0,%sp@- 47b4a: 4879 0005 d8c9 pea 5d8c9 <_Status_Object_name_errors_to_status+0x159> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b50: 4878 0001 pea 1 47b54: 2f02 movel %d2,%sp@- 47b56: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47b58: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b5c: 4200 clrb %d0 47b5e: 60dc bras 47b3c <_Heap_Walk+0x180> 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)( 47b60: 2f08 movel %a0,%sp@- 47b62: 4879 0005 d909 pea 5d909 <_Status_Object_name_errors_to_status+0x199> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b68: 4878 0001 pea 1 47b6c: 2f02 movel %d2,%sp@- 47b6e: 4e95 jsr %a5@ 47b70: 4fef 0010 lea %sp@(16),%sp 47b74: 4200 clrb %d0 block = next_block; } return true; } 47b76: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b7c: 4e5e unlk %fp 47b7e: 4e75 rts first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 47b80: 4879 0005 d815 pea 5d815 <_Status_Object_name_errors_to_status+0xa5> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47b86: 4878 0001 pea 1 47b8a: 2f02 movel %d2,%sp@- 47b8c: 4e95 jsr %a5@ 47b8e: 4fef 000c lea %sp@(12),%sp 47b92: 4200 clrb %d0 block = next_block; } return true; } 47b94: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b9a: 4e5e unlk %fp 47b9c: 4e75 rts return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 47b9e: 2f03 movel %d3,%sp@- 47ba0: 4879 0005 d828 pea 5d828 <_Status_Object_name_errors_to_status+0xb8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47ba6: 4878 0001 pea 1 47baa: 2f02 movel %d2,%sp@- 47bac: 4e95 jsr %a5@ 47bae: 4fef 0010 lea %sp@(16),%sp 47bb2: 4200 clrb %d0 47bb4: 60c0 bras 47b76 <_Heap_Walk+0x1ba> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 47bb6: 2f04 movel %d4,%sp@- 47bb8: 4879 0005 d846 pea 5d846 <_Status_Object_name_errors_to_status+0xd6> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47bbe: 4878 0001 pea 1 47bc2: 2f02 movel %d2,%sp@- 47bc4: 4e95 jsr %a5@ 47bc6: 4fef 0010 lea %sp@(16),%sp 47bca: 4200 clrb %d0 47bcc: 60a8 bras 47b76 <_Heap_Walk+0x1ba> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 47bce: 2f0b movel %a3,%sp@- 47bd0: 4879 0005 d86a pea 5d86a <_Status_Object_name_errors_to_status+0xfa> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47bd6: 4878 0001 pea 1 47bda: 2f02 movel %d2,%sp@- 47bdc: 4e95 jsr %a5@ 47bde: 4fef 0010 lea %sp@(16),%sp 47be2: 4200 clrb %d0 47be4: 6090 bras 47b76 <_Heap_Walk+0x1ba> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47be6: 4879 0005 d89b pea 5d89b <_Status_Object_name_errors_to_status+0x12b> 47bec: 4878 0001 pea 1 47bf0: 2f02 movel %d2,%sp@- 47bf2: 4e95 jsr %a5@ 47bf4: 4fef 000c lea %sp@(12),%sp 47bf8: 4200 clrb %d0 47bfa: 6098 bras 47b94 <_Heap_Walk+0x1d8> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 47bfc: 4879 0005 d8f4 pea 5d8f4 <_Status_Object_name_errors_to_status+0x184> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47c02: 4878 0001 pea 1 47c06: 2f02 movel %d2,%sp@- 47c08: 4e95 jsr %a5@ 47c0a: 4fef 000c lea %sp@(12),%sp 47c0e: 4200 clrb %d0 47c10: 6082 bras 47b94 <_Heap_Walk+0x1d8> 47c12: 262e fff8 movel %fp@(-8),%d3 47c16: 2209 movel %a1,%d1 47c18: 2d43 fff0 movel %d3,%fp@(-16) 47c1c: 262e fff4 movel %fp@(-12),%d3 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47c20: b7c5 cmpal %d5,%a3 47c22: 6700 fdd0 beqw 479f4 <_Heap_Walk+0x38> 47c26: 2c2e fff0 movel %fp@(-16),%d6 - 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; 47c2a: 7efe moveq #-2,%d7 47c2c: cc87 andl %d7,%d6 47c2e: 2d43 fff8 movel %d3,%fp@(-8) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47c32: 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 ) { 47c36: 4a01 tstb %d1 47c38: 6700 0126 beqw 47d60 <_Heap_Walk+0x3a4> (*printer)( 47c3c: 2f06 movel %d6,%sp@- 47c3e: 2f0b movel %a3,%sp@- 47c40: 4879 0005 d9a7 pea 5d9a7 <_Status_Object_name_errors_to_status+0x237> 47c46: 42a7 clrl %sp@- 47c48: 2f02 movel %d2,%sp@- 47c4a: 4e95 jsr %a5@ 47c4c: 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 47c50: b9ea 0020 cmpal %a2@(32),%a4 47c54: 6500 00d0 bcsw 47d26 <_Heap_Walk+0x36a> 47c58: b9ea 0024 cmpal %a2@(36),%a4 47c5c: 6200 00c8 bhiw 47d26 <_Heap_Walk+0x36a> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 47c60: 262e fff8 movel %fp@(-8),%d3 47c64: 2206 movel %d6,%d1 47c66: 4c43 1000 remul %d3,%d0,%d1 47c6a: 4a80 tstl %d0 47c6c: 6600 0162 bnew 47dd0 <_Heap_Walk+0x414> ); return false; } if ( block_size < min_block_size ) { 47c70: bc84 cmpl %d4,%d6 47c72: 6500 0178 bcsw 47dec <_Heap_Walk+0x430> ); return false; } if ( next_block_begin <= block_begin ) { 47c76: b9cb cmpal %a3,%a4 47c78: 6300 0196 blsw 47e10 <_Heap_Walk+0x454> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 47c7c: 7001 moveq #1,%d0 47c7e: c0ac 0004 andl %a4@(4),%d0 47c82: 4a00 tstb %d0 47c84: 6600 00bc bnew 47d42 <_Heap_Walk+0x386> 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; 47c88: 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; 47c8c: 7cfe moveq #-2,%d6 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 47c8e: 43f9 0005 da9d lea 5da9d <_Status_Object_name_errors_to_status+0x32d>,%a1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47c94: 2e2a 0008 movel %a2@(8),%d7 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 47c98: 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; 47c9a: 2d47 fffc movel %d7,%fp@(-4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47c9e: 2e0b movel %a3,%d7 47ca0: 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)( 47ca2: 222b 0008 movel %a3@(8),%d1 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; 47ca6: b2aa 000c cmpl %a2@(12),%d1 47caa: 6710 beqs 47cbc <_Heap_Walk+0x300> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 47cac: 43f9 0005 daa7 lea 5daa7 <_Status_Object_name_errors_to_status+0x337>,%a1 47cb2: b5c1 cmpal %d1,%a2 47cb4: 6706 beqs 47cbc <_Heap_Walk+0x300> 47cb6: 43f9 0005 d6e2 lea 5d6e2 ,%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)( 47cbc: 202b 000c movel %a3@(12),%d0 47cc0: 41f9 0005 dab1 lea 5dab1 <_Status_Object_name_errors_to_status+0x341>,%a0 47cc6: b0ae fffc cmpl %fp@(-4),%d0 47cca: 6710 beqs 47cdc <_Heap_Walk+0x320> "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)" : ""), 47ccc: 41f9 0005 dabc lea 5dabc <_Status_Object_name_errors_to_status+0x34c>,%a0 47cd2: b5c0 cmpal %d0,%a2 47cd4: 6706 beqs 47cdc <_Heap_Walk+0x320> 47cd6: 41f9 0005 d6e2 lea 5d6e2 ,%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)( 47cdc: 2f09 movel %a1,%sp@- 47cde: 2f01 movel %d1,%sp@- 47ce0: 2f08 movel %a0,%sp@- 47ce2: 2f00 movel %d0,%sp@- 47ce4: 2f0b movel %a3,%sp@- 47ce6: 4879 0005 dac6 pea 5dac6 <_Status_Object_name_errors_to_status+0x356> 47cec: 42a7 clrl %sp@- 47cee: 2f02 movel %d2,%sp@- 47cf0: 4e95 jsr %a5@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 47cf2: 4fef 0020 lea %sp@(32),%sp 47cf6: 2047 moveal %d7,%a0 47cf8: 2010 movel %a0@,%d0 47cfa: b086 cmpl %d6,%d0 47cfc: 6700 0082 beqw 47d80 <_Heap_Walk+0x3c4> (*printer)( 47d00: 2f07 movel %d7,%sp@- 47d02: 2f00 movel %d0,%sp@- 47d04: 2f06 movel %d6,%sp@- 47d06: 2f0b movel %a3,%sp@- 47d08: 4879 0005 daf2 pea 5daf2 <_Status_Object_name_errors_to_status+0x382> 47d0e: 4878 0001 pea 1 47d12: 2f02 movel %d2,%sp@- 47d14: 4e95 jsr %a5@ 47d16: 4fef 001c lea %sp@(28),%sp block = next_block; } return true; } 47d1a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 47d20: 4200 clrb %d0 block = next_block; } return true; } 47d22: 4e5e unlk %fp 47d24: 4e75 rts block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 47d26: 2f0c movel %a4,%sp@- 47d28: 2f0b movel %a3,%sp@- 47d2a: 4879 0005 d9e3 pea 5d9e3 <_Status_Object_name_errors_to_status+0x273> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47d30: 4878 0001 pea 1 47d34: 2f02 movel %d2,%sp@- 47d36: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47d38: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47d3c: 4200 clrb %d0 47d3e: 6000 fdfc braw 47b3c <_Heap_Walk+0x180> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47d42: b9c5 cmpal %d5,%a4 47d44: 6700 fcae beqw 479f4 <_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 ) { 47d48: 2c2c 0004 movel %a4@(4),%d6 47d4c: 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; 47d4e: 7efe moveq #-2,%d7 47d50: 264c moveal %a4,%a3 47d52: c286 andl %d6,%d1 47d54: cc87 andl %d7,%d6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47d56: 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 ) { 47d5a: 4a01 tstb %d1 47d5c: 6600 fede bnew 47c3c <_Heap_Walk+0x280> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 47d60: 2f13 movel %a3@,%sp@- 47d62: 2f06 movel %d6,%sp@- 47d64: 2f0b movel %a3,%sp@- 47d66: 4879 0005 d9be pea 5d9be <_Status_Object_name_errors_to_status+0x24e> 47d6c: 42a7 clrl %sp@- 47d6e: 2f02 movel %d2,%sp@- 47d70: 4e95 jsr %a5@ 47d72: 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 47d76: b9ea 0020 cmpal %a2@(32),%a4 47d7a: 65aa bcss 47d26 <_Heap_Walk+0x36a> <== NEVER TAKEN 47d7c: 6000 feda braw 47c58 <_Heap_Walk+0x29c> ); return false; } if ( !prev_used ) { 47d80: 7001 moveq #1,%d0 47d82: c680 andl %d0,%d3 47d84: 4a03 tstb %d3 47d86: 672e beqs 47db6 <_Heap_Walk+0x3fa> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47d88: 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 ) { 47d8c: b5c8 cmpal %a0,%a2 47d8e: 670c beqs 47d9c <_Heap_Walk+0x3e0> <== NEVER TAKEN if ( free_block == block ) { 47d90: b7c8 cmpal %a0,%a3 47d92: 67ae beqs 47d42 <_Heap_Walk+0x386> return true; } free_block = free_block->next; 47d94: 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 ) { 47d98: b5c8 cmpal %a0,%a2 47d9a: 66f4 bnes 47d90 <_Heap_Walk+0x3d4> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47d9c: 2f0b movel %a3,%sp@- 47d9e: 4879 0005 db5a pea 5db5a <_Status_Object_name_errors_to_status+0x3ea> 47da4: 4878 0001 pea 1 47da8: 2f02 movel %d2,%sp@- 47daa: 4e95 jsr %a5@ 47dac: 4fef 0010 lea %sp@(16),%sp 47db0: 4200 clrb %d0 47db2: 6000 fdc2 braw 47b76 <_Heap_Walk+0x1ba> return false; } if ( !prev_used ) { (*printer)( 47db6: 2f0b movel %a3,%sp@- 47db8: 4879 0005 db2b pea 5db2b <_Status_Object_name_errors_to_status+0x3bb> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47dbe: 4878 0001 pea 1 47dc2: 2f02 movel %d2,%sp@- 47dc4: 4e95 jsr %a5@ 47dc6: 4fef 0010 lea %sp@(16),%sp 47dca: 4200 clrb %d0 47dcc: 6000 fda8 braw 47b76 <_Heap_Walk+0x1ba> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 47dd0: 2f06 movel %d6,%sp@- 47dd2: 2f0b movel %a3,%sp@- 47dd4: 4879 0005 da10 pea 5da10 <_Status_Object_name_errors_to_status+0x2a0> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47dda: 4878 0001 pea 1 47dde: 2f02 movel %d2,%sp@- 47de0: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47de2: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47de6: 4200 clrb %d0 47de8: 6000 fd52 braw 47b3c <_Heap_Walk+0x180> return false; } if ( block_size < min_block_size ) { (*printer)( 47dec: 2f04 movel %d4,%sp@- 47dee: 2f06 movel %d6,%sp@- 47df0: 2f0b movel %a3,%sp@- 47df2: 4879 0005 da3e pea 5da3e <_Status_Object_name_errors_to_status+0x2ce> 47df8: 4878 0001 pea 1 47dfc: 2f02 movel %d2,%sp@- 47dfe: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 47e00: 4fef 0018 lea %sp@(24),%sp block = next_block; } return true; } 47e04: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 return false; } if ( block_size < min_block_size ) { (*printer)( 47e0a: 4200 clrb %d0 block = next_block; } return true; } 47e0c: 4e5e unlk %fp 47e0e: 4e75 rts return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47e10: 2f0c movel %a4,%sp@- 47e12: 2f0b movel %a3,%sp@- 47e14: 4879 0005 da69 pea 5da69 <_Status_Object_name_errors_to_status+0x2f9> 47e1a: 4878 0001 pea 1 47e1e: 2f02 movel %d2,%sp@- 47e20: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47e22: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47e26: 4200 clrb %d0 47e28: 6000 fd12 braw 47b3c <_Heap_Walk+0x180> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 47e2c: 2f08 movel %a0,%sp@- 47e2e: 4879 0005 d929 pea 5d929 <_Status_Object_name_errors_to_status+0x1b9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47e34: 4878 0001 pea 1 47e38: 2f02 movel %d2,%sp@- 47e3a: 4e95 jsr %a5@ 47e3c: 4fef 0010 lea %sp@(16),%sp 47e40: 4200 clrb %d0 47e42: 6000 fd32 braw 47b76 <_Heap_Walk+0x1ba> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 47e46: 2f08 movel %a0,%sp@- 47e48: 4879 0005 d959 pea 5d959 <_Status_Object_name_errors_to_status+0x1e9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47e4e: 4878 0001 pea 1 47e52: 2f02 movel %d2,%sp@- 47e54: 4e95 jsr %a5@ 47e56: 4fef 0010 lea %sp@(16),%sp 47e5a: 4200 clrb %d0 47e5c: 6000 fd18 braw 47b76 <_Heap_Walk+0x1ba> =============================================================================== 0004646c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 4646c: 4e56 0000 linkw %fp,#0 46470: 2f0a movel %a2,%sp@- 46472: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46474: 4ab9 0005 f804 tstl 5f804 <_IO_Number_of_drivers> 4647a: 671e beqs 4649a <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 4647c: 4282 clrl %d2 4647e: 45f9 0004 b93c lea 4b93c ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 46484: 42a7 clrl %sp@- 46486: 42a7 clrl %sp@- 46488: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 4648a: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 4648c: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 4648e: 4fef 000c lea %sp@(12),%sp 46492: b4b9 0005 f804 cmpl 5f804 <_IO_Number_of_drivers>,%d2 46498: 65ea bcss 46484 <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 4649a: 242e fff8 movel %fp@(-8),%d2 4649e: 246e fffc moveal %fp@(-4),%a2 464a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000464a6 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 464a6: 4e56 fff0 linkw %fp,#-16 464aa: 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; 464ae: 2639 0005 d7f6 movel 5d7f6 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 464b4: 2439 0005 d7f2 movel 5d7f2 ,%d2 number_of_drivers = Configuration.maximum_drivers; 464ba: 2839 0005 d7ee movel 5d7ee ,%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 ) 464c0: b882 cmpl %d2,%d4 464c2: 6216 bhis 464da <_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; 464c4: 23c3 0005 f808 movel %d3,5f808 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 464ca: 23c2 0005 f804 movel %d2,5f804 <_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; } 464d0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464d6: 4e5e unlk %fp 464d8: 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 *) 464da: 2004 movel %d4,%d0 464dc: 2a04 movel %d4,%d5 464de: e788 lsll #3,%d0 464e0: eb8d lsll #5,%d5 464e2: 9a80 subl %d0,%d5 464e4: 2f05 movel %d5,%sp@- 464e6: 4eb9 0004 91c0 jsr 491c0 <_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( 464ec: 2f05 movel %d5,%sp@- 464ee: 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; 464f0: 23c4 0005 f804 movel %d4,5f804 <_IO_Number_of_drivers> memset( 464f6: 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 *) 464f8: 23c0 0005 f808 movel %d0,5f808 <_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( 464fe: 4eb9 0004 f484 jsr 4f484 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46504: 4fef 0010 lea %sp@(16),%sp 46508: 4a82 tstl %d2 4650a: 67c4 beqs 464d0 <_IO_Manager_initialization+0x2a><== NEVER TAKEN 4650c: 2839 0005 f808 movel 5f808 <_IO_Driver_address_table>,%d4 46512: 4280 clrl %d0 46514: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 46516: 2243 moveal %d3,%a1 46518: 2044 moveal %d4,%a0 4651a: d3c0 addal %d0,%a1 4651c: 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++ ) 4651e: 5281 addql #1,%d1 46520: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46526: 20d9 movel %a1@+,%a0@+ 46528: 20d9 movel %a1@+,%a0@+ 4652a: 20d9 movel %a1@+,%a0@+ 4652c: 20d9 movel %a1@+,%a0@+ 4652e: 20d9 movel %a1@+,%a0@+ 46530: 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++ ) 46532: b282 cmpl %d2,%d1 46534: 649a bccs 464d0 <_IO_Manager_initialization+0x2a> _IO_Driver_address_table[index] = driver_table[index]; 46536: 2243 moveal %d3,%a1 46538: 2044 moveal %d4,%a0 4653a: d3c0 addal %d0,%a1 4653c: 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++ ) 4653e: 5281 addql #1,%d1 46540: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46546: 20d9 movel %a1@+,%a0@+ 46548: 20d9 movel %a1@+,%a0@+ 4654a: 20d9 movel %a1@+,%a0@+ 4654c: 20d9 movel %a1@+,%a0@+ 4654e: 20d9 movel %a1@+,%a0@+ 46550: 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++ ) 46552: b282 cmpl %d2,%d1 46554: 65c0 bcss 46516 <_IO_Manager_initialization+0x70><== NEVER TAKEN 46556: 6000 ff78 braw 464d0 <_IO_Manager_initialization+0x2a> ... =============================================================================== 00046fcc <_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 ); 46fcc: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46fce: 4e56 0000 linkw %fp,#0 46fd2: 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 ); 46fd6: 1001 moveb %d1,%d0 46fd8: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46fda: 2f03 movel %d3,%sp@- 46fdc: 202e 0008 movel %fp@(8),%d0 46fe0: 2f02 movel %d2,%sp@- 46fe2: 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 ); 46fe6: 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; 46fe8: 13c1 0005 f022 moveb %d1,5f022 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fee: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46ff0: 23c0 0005 f01e movel %d0,5f01e <_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 ); 46ff6: 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; 46ff8: 23c2 0005 f024 movel %d2,5f024 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46ffe: 4eb9 0004 8df2 jsr 48df2 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47004: 307c 0700 moveaw #1792,%a0 47008: 2608 movel %a0,%d3 4700a: 40c0 movew %sr,%d0 4700c: 8083 orl %d3,%d0 4700e: 46c0 movew %d0,%sr 47010: 2002 movel %d2,%d0 <== NOT EXECUTED 47012: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47018: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 4701a: 7005 moveq #5,%d0 4701c: 4fef 000c lea %sp@(12),%sp 47020: 23c0 0005 f100 movel %d0,5f100 <_System_state_Current> 47026: 60fe bras 47026 <_Internal_error_Occurred+0x5a> =============================================================================== 00047090 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47090: 4e56 fff0 linkw %fp,#-16 47094: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47098: 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 ) 4709c: 4aaa 0014 tstl %a2@(20) 470a0: 660c bnes 470ae <_Objects_Allocate+0x1e> <== ALWAYS TAKEN 470a2: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 470a4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470aa: 4e5e unlk %fp 470ac: 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 ); 470ae: 240a movel %a2,%d2 470b0: 0682 0000 001c addil #28,%d2 470b6: 47f9 0004 b9c0 lea 4b9c0 <_Chain_Get>,%a3 470bc: 2f02 movel %d2,%sp@- 470be: 4e93 jsr %a3@ if ( information->auto_extend ) { 470c0: 588f addql #4,%sp 470c2: 4a2a 0010 tstb %a2@(16) 470c6: 67dc beqs 470a4 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 470c8: 4a80 tstl %d0 470ca: 6738 beqs 47104 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470cc: 2040 moveal %d0,%a0 470ce: 4281 clrl %d1 470d0: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470d2: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470d4: 362a 0008 movew %a2@(8),%d3 470d8: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 470dc: 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 ]--; 470e0: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470e4: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 470e6: 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 ]--; 470e8: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 470ec: 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 ]--; 470f0: 206a 002a moveal %a2@(42),%a0 470f4: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 470f6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470fc: 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 ]--; 470fe: d1c1 addal %d1,%a0 47100: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 47102: 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 ); 47104: 2f0a movel %a2,%sp@- 47106: 4eb9 0004 714c jsr 4714c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 4710c: 2f02 movel %d2,%sp@- 4710e: 4e93 jsr %a3@ } if ( the_object ) { 47110: 508f addql #8,%sp 47112: 4a80 tstl %d0 47114: 66b6 bnes 470cc <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 47116: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4711c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047120 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47120: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 47122: 4e56 0000 linkw %fp,#0 47126: 226e 000c moveal %fp@(12),%a1 4712a: 206e 0008 moveal %fp@(8),%a0 4712e: 2f0a movel %a2,%sp@- 47130: 2468 0018 moveal %a0@(24),%a2 47134: 3029 000a movew %a1@(10),%d0 47138: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 4713c: 2d49 000c movel %a1,%fp@(12) } 47140: 245f moveal %sp@+,%a2 47142: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47144: 4ef9 0004 76a8 jmp 476a8 <_Objects_Namespace_remove> ... =============================================================================== 0004714c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 4714c: 4e56 ffcc linkw %fp,#-52 47150: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47154: 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 ); 47158: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4715a: 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 ); 4715e: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47162: 4a88 tstl %a0 47164: 6700 022c beqw 47392 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 47168: 322a 000e movew %a2@(14),%d1 4716c: 302a 0012 movew %a2@(18),%d0 47170: 3801 movew %d1,%d4 47172: 0284 0000 ffff andil #65535,%d4 47178: 88c0 divuw %d0,%d4 4717a: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47180: 6700 0224 beqw 473a6 <_Objects_Extend_information+0x25a> if ( information->object_blocks[ block ] == NULL ) 47184: 4a90 tstl %a0@ 47186: 6700 021e beqw 473a6 <_Objects_Extend_information+0x25a> 4718a: 5888 addql #4,%a0 4718c: 2605 movel %d5,%d3 4718e: 4282 clrl %d2 47190: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 47196: 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++ ) { 47198: 5282 addql #1,%d2 4719a: b484 cmpl %d4,%d2 4719c: 6404 bccs 471a2 <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 4719e: 4a98 tstl %a0@+ 471a0: 66f4 bnes 47196 <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 471a2: 0281 0000 ffff andil #65535,%d1 471a8: 2641 moveal %d1,%a3 471aa: 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 ) { 471ac: b7fc 0000 ffff cmpal #65535,%a3 471b2: 6200 0186 bhiw 4733a <_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; 471b6: 41ea 0014 lea %a2@(20),%a0 471ba: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 471be: 4a2a 0010 tstb %a2@(16) 471c2: 6700 0180 beqw 47344 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 471c6: 2f00 movel %d0,%sp@- 471c8: 4eb9 0004 91f4 jsr 491f4 <_Workspace_Allocate> if ( !new_object_block ) 471ce: 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 ); 471d0: 2c00 movel %d0,%d6 if ( !new_object_block ) 471d2: 6700 0166 beqw 4733a <_Objects_Extend_information+0x1ee> } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 471d6: 4280 clrl %d0 471d8: 302a 000e movew %a2@(14),%d0 471dc: b083 cmpl %d3,%d0 471de: 6200 00c4 bhiw 472a4 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 471e2: 2a44 moveal %d4,%a5 471e4: 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 ); 471e6: 200b movel %a3,%d0 471e8: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 471ec: d088 addl %a0,%d0 471ee: d085 addl %d5,%d0 471f0: e588 lsll #2,%d0 471f2: 2f00 movel %d0,%sp@- 471f4: 4eb9 0004 91f4 jsr 491f4 <_Workspace_Allocate> if ( !object_blocks ) { 471fa: 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 ); 471fc: 2840 moveal %d0,%a4 if ( !object_blocks ) { 471fe: 4a80 tstl %d0 47200: 6700 01b2 beqw 473b4 <_Objects_Extend_information+0x268> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47204: 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 ) { 47206: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47208: 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 ) { 4720a: 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); 4720e: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47212: de8d addl %a5,%d7 47214: b085 cmpl %d5,%d0 47216: 6200 013c bhiw 47354 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 4721a: 4a85 tstl %d5 4721c: 670c beqs 4722a <_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, 4721e: 2047 moveal %d7,%a0 47220: 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; 47222: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47224: 5280 addql #1,%d0 47226: b085 cmpl %d5,%d0 47228: 65f8 bcss 47222 <_Objects_Extend_information+0xd6><== NEVER TAKEN 4722a: 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 ); 4722c: 4281 clrl %d1 4722e: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 47232: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 47236: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 47238: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 4723c: b283 cmpl %d3,%d1 4723e: 6310 blss 47250 <_Objects_Extend_information+0x104><== NEVER TAKEN 47240: 2247 moveal %d7,%a1 47242: 2003 movel %d3,%d0 47244: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 47248: 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++ ) { 4724a: 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 ; 4724c: b280 cmpl %d0,%d1 4724e: 62f8 bhis 47248 <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 47250: 203c 0000 0700 movel #1792,%d0 47256: 40c4 movew %sr,%d4 47258: 8084 orl %d4,%d0 4725a: 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( 4725c: 2012 movel %a2@,%d0 4725e: 7218 moveq #24,%d1 47260: 4285 clrl %d5 47262: e3a8 lsll %d1,%d0 47264: 3a0b movew %a3,%d5 47266: 4281 clrl %d1 47268: 2245 moveal %d5,%a1 4726a: 7a1b moveq #27,%d5 4726c: 322a 0004 movew %a2@(4),%d1 47270: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47274: 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( 47278: 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; 4727a: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 4727e: 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( 47282: 8081 orl %d1,%d0 47284: 2209 movel %a1,%d1 47286: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 47288: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4728c: 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; 47290: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47294: 46c4 movew %d4,%sr if ( old_tables ) 47296: 4a88 tstl %a0 47298: 670a beqs 472a4 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 4729a: 2f08 movel %a0,%sp@- 4729c: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 472a2: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472a4: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472a8: 4280 clrl %d0 472aa: 280e movel %fp,%d4 472ac: 0684 ffff fff4 addil #-12,%d4 472b2: 47f9 0004 b9c0 lea 4b9c0 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472b8: 2a0a movel %a2,%d5 472ba: 0685 0000 001c addil #28,%d5 472c0: 49f9 0004 6798 lea 46798 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472c6: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472c8: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472cc: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472d0: 2f2a 0014 movel %a2@(20),%sp@- 472d4: 2f00 movel %d0,%sp@- 472d6: 2f06 movel %d6,%sp@- 472d8: 2f04 movel %d4,%sp@- 472da: 4eb9 0004 b9fc jsr 4b9fc <_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 ) { 472e0: 4fef 0010 lea %sp@(16),%sp 472e4: 2f04 movel %d4,%sp@- 472e6: 4e93 jsr %a3@ 472e8: 588f addql #4,%sp 472ea: 4a80 tstl %d0 472ec: 6732 beqs 47320 <_Objects_Extend_information+0x1d4><== NEVER TAKEN the_object->id = _Objects_Build_id( 472ee: 2212 movel %a2@,%d1 472f0: 7c18 moveq #24,%d6 472f2: 7e1b moveq #27,%d7 472f4: 2040 moveal %d0,%a0 472f6: eda9 lsll %d6,%d1 472f8: 4286 clrl %d6 472fa: 3c2a 0004 movew %a2@(4),%d6 472fe: 08c1 0010 bset #16,%d1 47302: efae lsll %d7,%d6 47304: 8286 orl %d6,%d1 47306: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 47308: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 4730a: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4730e: 2f00 movel %d0,%sp@- 47310: 2f05 movel %d5,%sp@- 47312: 4e94 jsr %a4@ index++; 47314: 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 ) { 47316: 2f04 movel %d4,%sp@- 47318: 4e93 jsr %a3@ 4731a: 588f addql #4,%sp 4731c: 4a80 tstl %d0 4731e: 66ce bnes 472ee <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47320: 4280 clrl %d0 information->inactive = 47322: 322a 0028 movew %a2@(40),%d1 47326: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4732a: 206a 002a moveal %a2@(42),%a0 information->inactive = 4732e: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47330: 3009 movew %a1,%d0 information->inactive = 47332: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47336: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 4733a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47340: 4e5e unlk %fp 47342: 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 ); 47344: 2f00 movel %d0,%sp@- 47346: 4eb9 0004 91c0 jsr 491c0 <_Workspace_Allocate_or_fatal_error> 4734c: 588f addql #4,%sp 4734e: 2c00 movel %d0,%d6 47350: 6000 fe84 braw 471d6 <_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, 47354: e58c lsll #2,%d4 47356: 2f04 movel %d4,%sp@- 47358: 2f2a 002e movel %a2@(46),%sp@- 4735c: 2f0c movel %a4,%sp@- 4735e: 4eb9 0004 f414 jsr 4f414 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47364: 2f04 movel %d4,%sp@- 47366: 2f2a 002a movel %a2@(42),%sp@- 4736a: 2f0d movel %a5,%sp@- 4736c: 4eb9 0004 f414 jsr 4f414 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47372: 4280 clrl %d0 47374: 302a 000e movew %a2@(14),%d0 47378: da80 addl %d0,%d5 4737a: e58d lsll #2,%d5 4737c: 2f05 movel %d5,%sp@- 4737e: 2f2a 0018 movel %a2@(24),%sp@- 47382: 2f07 movel %d7,%sp@- 47384: 4eb9 0004 f414 jsr 4f414 4738a: 4fef 0024 lea %sp@(36),%sp 4738e: 6000 fe9c braw 4722c <_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 ) 47392: 4280 clrl %d0 47394: 2605 movel %d5,%d3 47396: 4282 clrl %d2 47398: 4284 clrl %d4 4739a: 322a 000e movew %a2@(14),%d1 4739e: 302a 0012 movew %a2@(18),%d0 473a2: 6000 fdfe braw 471a2 <_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 ) 473a6: 2605 movel %d5,%d3 <== NOT EXECUTED 473a8: 4282 clrl %d2 <== NOT EXECUTED 473aa: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 473b0: 6000 fdf0 braw 471a2 <_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 ); 473b4: 2f06 movel %d6,%sp@- 473b6: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> return; 473bc: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 473be: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 473c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047478 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 47478: 4e56 0000 linkw %fp,#0 4747c: 2f02 movel %d2,%sp@- 4747e: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47482: 660a bnes 4748e <_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 ) 47484: 4280 clrl %d0 return NULL; #endif return info; } 47486: 242e fffc movel %fp@(-4),%d2 4748a: 4e5e unlk %fp 4748c: 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 ); 4748e: 2f2e 0008 movel %fp@(8),%sp@- 47492: 4eb9 0004 bfd4 jsr 4bfd4 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 47498: 588f addql #4,%sp 4749a: 4a80 tstl %d0 4749c: 67e6 beqs 47484 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 4749e: b082 cmpl %d2,%d0 474a0: 65e2 bcss 47484 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 474a2: 202e 0008 movel %fp@(8),%d0 474a6: 41f9 0005 ef30 lea 5ef30 <_Objects_Information_table>,%a0 474ac: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 474b0: 4a88 tstl %a0 474b2: 67d0 beqs 47484 <_Objects_Get_information+0xc> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 474b4: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 474b8: 67cc beqs 47486 <_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 ) 474ba: 2040 moveal %d0,%a0 474bc: 4a68 000e tstw %a0@(14) 474c0: 67c2 beqs 47484 <_Objects_Get_information+0xc> return NULL; #endif return info; } 474c2: 242e fffc movel %fp@(-4),%d2 474c6: 4e5e unlk %fp ... =============================================================================== 00049000 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 49000: 4e56 ffe0 linkw %fp,#-32 49004: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49008: 262e 000c movel %fp@(12),%d3 4900c: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 49010: 4a83 tstl %d3 49012: 660e bnes 49022 <_Objects_Get_name_as_string+0x22> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 49014: 4282 clrl %d2 } return NULL; /* unreachable path */ } 49016: 2002 movel %d2,%d0 49018: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 4901e: 4e5e unlk %fp 49020: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 49022: 4a82 tstl %d2 49024: 67f0 beqs 49016 <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49026: 4aae 0008 tstl %fp@(8) 4902a: 6700 0092 beqw 490be <_Objects_Get_name_as_string+0xbe> 4902e: 282e 0008 movel %fp@(8),%d4 information = _Objects_Get_information_id( tmpId ); 49032: 2f04 movel %d4,%sp@- 49034: 4eb9 0004 8f20 jsr 48f20 <_Objects_Get_information_id> if ( !information ) 4903a: 588f addql #4,%sp if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); 4903c: 2440 moveal %d0,%a2 if ( !information ) 4903e: 4a80 tstl %d0 49040: 67d2 beqs 49014 <_Objects_Get_name_as_string+0x14> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 49042: 486e fffc pea %fp@(-4) 49046: 2f04 movel %d4,%sp@- 49048: 2f00 movel %d0,%sp@- 4904a: 4eb9 0004 9100 jsr 49100 <_Objects_Get> switch ( location ) { 49050: 4fef 000c lea %sp@(12),%sp 49054: 4aae fffc tstl %fp@(-4) 49058: 66ba bnes 49014 <_Objects_Get_name_as_string+0x14> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 4905a: 4a2a 0032 tstb %a2@(50) 4905e: 676c beqs 490cc <_Objects_Get_name_as_string+0xcc> s = the_object->name.name_p; 49060: 2040 moveal %d0,%a0 49062: 2468 000c moveal %a0@(12),%a2 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 49066: 4a8a tstl %a2 49068: 6748 beqs 490b2 <_Objects_Get_name_as_string+0xb2> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4906a: 5383 subql #1,%d3 4906c: 6744 beqs 490b2 <_Objects_Get_name_as_string+0xb2><== NEVER TAKEN 4906e: 1012 moveb %a2@,%d0 49070: 6740 beqs 490b2 <_Objects_Get_name_as_string+0xb2> 49072: 2042 moveal %d2,%a0 49074: 4281 clrl %d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 49076: 4284 clrl %d4 49078: 1800 moveb %d0,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4907a: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 4907c: 2279 0006 015c moveal 6015c <__ctype_ptr__>,%a1 49082: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 49086: 49c4 extbl %d4 49088: 0284 0000 0097 andil #151,%d4 4908e: 6602 bnes 49092 <_Objects_Get_name_as_string+0x92> 49090: 702a moveq #42,%d0 49092: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49094: b681 cmpl %d1,%d3 49096: 6306 blss 4909e <_Objects_Get_name_as_string+0x9e> 49098: 1032 1800 moveb %a2@(00000000,%d1:l),%d0 4909c: 66d8 bnes 49076 <_Objects_Get_name_as_string+0x76> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 4909e: 4210 clrb %a0@ _Thread_Enable_dispatch(); 490a0: 4eb9 0004 9910 jsr 49910 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 490a6: 2002 movel %d2,%d0 490a8: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 490ae: 4e5e unlk %fp 490b0: 4e75 rts s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 490b2: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 490b4: 4210 clrb %a0@ _Thread_Enable_dispatch(); 490b6: 4eb9 0004 9910 jsr 49910 <_Thread_Enable_dispatch> 490bc: 60e8 bras 490a6 <_Objects_Get_name_as_string+0xa6> return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 490be: 2079 0006 9652 moveal 69652 <_Thread_Executing>,%a0 490c4: 2828 0008 movel %a0@(8),%d4 490c8: 6000 ff68 braw 49032 <_Objects_Get_name_as_string+0x32> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 490cc: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 490ce: 7218 moveq #24,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 490d0: 45ee fff7 lea %fp@(-9),%a2 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 490d4: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 490d8: 2a00 movel %d0,%d5 490da: e2ad lsrl %d1,%d5 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 490dc: 2200 movel %d0,%d1 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 490de: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 490e0: e089 lsrl #8,%d1 lname[ 3 ] = (u32_name >> 0) & 0xff; 490e2: 1d40 fffa moveb %d0,%fp@(-6) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 490e6: 4244 clrw %d4 490e8: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 490ea: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 490ec: 1d45 fff7 moveb %d5,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; 490f0: 1d44 fff8 moveb %d4,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; 490f4: 1d41 fff9 moveb %d1,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 490f8: 1d40 fffb moveb %d0,%fp@(-5) 490fc: 6000 ff6c braw 4906a <_Objects_Get_name_as_string+0x6a> =============================================================================== 0005b968 <_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; 5b968: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5b96a: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b96c: 4e56 0000 linkw %fp,#0 5b970: 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; 5b974: 90a8 0006 subl %a0@(6),%d0 5b978: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5b97c: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b980: 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 ) { 5b984: b280 cmpl %d0,%d1 5b986: 6510 bcss 5b998 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5b988: 2068 0018 moveal %a0@(24),%a0 5b98c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5b990: 6706 beqs 5b998 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 5b992: 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; } 5b994: 4e5e unlk %fp 5b996: 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; 5b998: 7001 moveq #1,%d0 return NULL; } 5b99a: 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; 5b99c: 2280 movel %d0,%a1@ 5b99e: 4280 clrl %d0 return NULL; } ... =============================================================================== 00048ccc <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 48ccc: 4e56 fffc linkw %fp,#-4 48cd0: 222e 0008 movel %fp@(8),%d1 48cd4: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48cd6: 4a81 tstl %d1 48cd8: 660a bnes 48ce4 <_Objects_Id_to_name+0x18> 48cda: 2079 0006 0d5a moveal 60d5a <_Thread_Executing>,%a0 48ce0: 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); 48ce4: 7418 moveq #24,%d2 48ce6: 2001 movel %d1,%d0 48ce8: e4a8 lsrl %d2,%d0 48cea: 143c 0007 moveb #7,%d2 48cee: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 48cf0: 143c 0003 moveb #3,%d2 48cf4: 2040 moveal %d0,%a0 48cf6: 5388 subql #1,%a0 48cf8: b488 cmpl %a0,%d2 48cfa: 6522 bcss 48d1e <_Objects_Id_to_name+0x52> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 48cfc: 41f9 0006 0c58 lea 60c58 <_Objects_Information_table>,%a0 48d02: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 48d06: 4a88 tstl %a0 48d08: 6714 beqs 48d1e <_Objects_Id_to_name+0x52> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 48d0a: 2001 movel %d1,%d0 48d0c: 741b moveq #27,%d2 48d0e: e4a8 lsrl %d2,%d0 48d10: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 48d14: 4a88 tstl %a0 48d16: 6706 beqs 48d1e <_Objects_Id_to_name+0x52> <== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 48d18: 4a28 0032 tstb %a0@(50) 48d1c: 670a beqs 48d28 <_Objects_Id_to_name+0x5c> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48d1e: 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; 48d22: 7003 moveq #3,%d0 } 48d24: 4e5e unlk %fp 48d26: 4e75 rts #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 ); 48d28: 486e fffc pea %fp@(-4) 48d2c: 2f01 movel %d1,%sp@- 48d2e: 2f08 movel %a0,%sp@- 48d30: 4eb9 0004 8c60 jsr 48c60 <_Objects_Get> if ( !the_object ) 48d36: 4fef 000c lea %sp@(12),%sp 48d3a: 4a80 tstl %d0 48d3c: 67e0 beqs 48d1e <_Objects_Id_to_name+0x52> return OBJECTS_INVALID_ID; *name = the_object->name; 48d3e: 206e 000c moveal %fp@(12),%a0 48d42: 2240 moveal %d0,%a1 48d44: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 48d48: 4eb9 0004 957c jsr 4957c <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48d4e: 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(); 48d52: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48d54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000476d8 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 476d8: 4e56 fff4 linkw %fp,#-12 476dc: 206e 0008 moveal %fp@(8),%a0 476e0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 476e4: 222e 000c movel %fp@(12),%d1 476e8: 202e 0010 movel %fp@(16),%d0 476ec: 246e 0014 moveal %fp@(20),%a2 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 476f0: 4a8a tstl %a2 476f2: 675a beqs 4774e <_Objects_Name_to_id_u32+0x76> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 476f4: 4a81 tstl %d1 476f6: 6718 beqs 47710 <_Objects_Name_to_id_u32+0x38> <== NEVER TAKEN return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 476f8: 3428 000e movew %a0@(14),%d2 476fc: 6712 beqs 47710 <_Objects_Name_to_id_u32+0x38> 476fe: 4a80 tstl %d0 47700: 6718 beqs 4771a <_Objects_Name_to_id_u32+0x42> 47702: 0c80 7fff ffff cmpil #2147483647,%d0 47708: 6710 beqs 4771a <_Objects_Name_to_id_u32+0x42> 4770a: 7601 moveq #1,%d3 4770c: b680 cmpl %d0,%d3 4770e: 670a beqs 4771a <_Objects_Name_to_id_u32+0x42> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 47710: 7001 moveq #1,%d0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 47712: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47716: 4e5e unlk %fp 47718: 4e75 rts search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 4771a: 2068 0018 moveal %a0@(24),%a0 4771e: 7001 moveq #1,%d0 47720: 5888 addql #4,%a0 47722: 0282 0000 ffff andil #65535,%d2 the_object = information->local_table[ index ]; 47728: 2250 moveal %a0@,%a1 search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 4772a: 5280 addql #1,%d0 4772c: 5888 addql #4,%a0 the_object = information->local_table[ index ]; if ( !the_object ) 4772e: 4a89 tstl %a1 47730: 6706 beqs 47738 <_Objects_Name_to_id_u32+0x60> continue; if ( name == the_object->name.name_u32 ) { 47732: b2a9 000c cmpl %a1@(12),%d1 47736: 6708 beqs 47740 <_Objects_Name_to_id_u32+0x68> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 47738: b082 cmpl %d2,%d0 4773a: 63ec blss 47728 <_Objects_Name_to_id_u32+0x50> 4773c: 7001 moveq #1,%d0 4773e: 60d2 bras 47712 <_Objects_Name_to_id_u32+0x3a> the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 47740: 24a9 0008 movel %a1@(8),%a2@ 47744: 4280 clrl %d0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 47746: 4cd7 040c moveml %sp@,%d2-%d3/%a2 4774a: 4e5e unlk %fp 4774c: 4e75 rts Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 4774e: 7002 moveq #2,%d0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 47750: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47754: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047ad8 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47ad8: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47ada: 4e56 fff0 linkw %fp,#-16 47ade: 48d7 3c00 moveml %a2-%a5,%sp@ 47ae2: 286e 0008 moveal %fp@(8),%a4 47ae6: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47aea: 302c 0034 movew %a4@(52),%d0 47aee: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47af0: 2a6e 000c moveal %fp@(12),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47af4: 2f0a movel %a2,%sp@- 47af6: 4eb9 0005 08a0 jsr 508a0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47afc: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47afe: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47b00: 4a2c 0032 tstb %a4@(50) 47b04: 6662 bnes 47b68 <_Objects_Set_name+0x90> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47b06: 7018 moveq #24,%d0 47b08: 1212 moveb %a2@,%d1 47b0a: 49c1 extbl %d1 47b0c: e1a9 lsll %d0,%d1 47b0e: 103c 0001 moveb #1,%d0 47b12: b08b cmpl %a3,%d0 47b14: 643c bccs 47b52 <_Objects_Set_name+0x7a> 47b16: 102a 0001 moveb %a2@(1),%d0 47b1a: 49c0 extbl %d0 47b1c: 4840 swap %d0 47b1e: 4240 clrw %d0 47b20: 8081 orl %d1,%d0 47b22: 7202 moveq #2,%d1 47b24: b28b cmpl %a3,%d1 47b26: 6730 beqs 47b58 <_Objects_Set_name+0x80> 47b28: 122a 0002 moveb %a2@(2),%d1 47b2c: 49c1 extbl %d1 47b2e: e189 lsll #8,%d1 47b30: 8081 orl %d1,%d0 47b32: 7203 moveq #3,%d1 47b34: b28b cmpl %a3,%d1 47b36: 6700 0088 beqw 47bc0 <_Objects_Set_name+0xe8> 47b3a: 122a 0003 moveb %a2@(3),%d1 47b3e: 49c1 extbl %d1 47b40: 8081 orl %d1,%d0 47b42: 2b40 000c movel %d0,%a5@(12) 47b46: 7001 moveq #1,%d0 ); } return true; } 47b48: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47b4e: 4e5e unlk %fp 47b50: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47b52: 2001 movel %d1,%d0 47b54: 08c0 0015 bset #21,%d0 47b58: 7220 moveq #32,%d1 47b5a: 08c0 000d bset #13,%d0 47b5e: 8081 orl %d1,%d0 47b60: 2b40 000c movel %d0,%a5@(12) 47b64: 7001 moveq #1,%d0 47b66: 60e0 bras 47b48 <_Objects_Set_name+0x70> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 47b68: 486b 0001 pea %a3@(1) 47b6c: 4eb9 0004 966c jsr 4966c <_Workspace_Allocate> if ( !d ) 47b72: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 47b74: 2840 moveal %d0,%a4 if ( !d ) 47b76: 4a80 tstl %d0 47b78: 673a beqs 47bb4 <_Objects_Set_name+0xdc> <== NEVER TAKEN return false; if ( the_object->name.name_p ) { 47b7a: 202d 000c movel %a5@(12),%d0 47b7e: 670e beqs 47b8e <_Objects_Set_name+0xb6> _Workspace_Free( (void *)the_object->name.name_p ); 47b80: 2f00 movel %d0,%sp@- 47b82: 4eb9 0004 9688 jsr 49688 <_Workspace_Free> the_object->name.name_p = NULL; 47b88: 588f addql #4,%sp 47b8a: 42ad 000c clrl %a5@(12) } strncpy( d, name, length ); 47b8e: 2f0b movel %a3,%sp@- 47b90: 2f0a movel %a2,%sp@- 47b92: 2f0c movel %a4,%sp@- 47b94: 4eb9 0005 0818 jsr 50818 d[length] = '\0'; the_object->name.name_p = d; 47b9a: 4fef 000c lea %sp@(12),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; 47b9e: 4200 clrb %d0 47ba0: 1980 b800 moveb %d0,%a4@(00000000,%a3:l) the_object->name.name_p = d; 47ba4: 7001 moveq #1,%d0 47ba6: 2b4c 000c movel %a4,%a5@(12) ); } return true; } 47baa: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47bb0: 4e5e unlk %fp 47bb2: 4e75 rts 47bb4: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 47bba: 4200 clrb %d0 <== NOT EXECUTED ); } return true; } 47bbc: 4e5e unlk %fp <== NOT EXECUTED 47bbe: 4e75 rts <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47bc0: 123c 0020 moveb #32,%d1 47bc4: 8081 orl %d1,%d0 47bc6: 2b40 000c movel %d0,%a5@(12) 47bca: 7001 moveq #1,%d0 47bcc: 6000 ff7a braw 47b48 <_Objects_Set_name+0x70> =============================================================================== 00047758 <_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) / 47758: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 4775a: 4e56 ffec linkw %fp,#-20 4775e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47762: 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 ); 47766: 4283 clrl %d3 block_count = (information->maximum - index_base) / 47768: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 4776a: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 4776e: 382a 000e movew %a2@(14),%d4 47772: 322a 0012 movew %a2@(18),%d1 47776: 9883 subl %d3,%d4 47778: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 4777c: 672c beqs 477aa <_Objects_Shrink_information+0x52><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 4777e: 226a 002a moveal %a2@(42),%a1 47782: b291 cmpl %a1@,%d1 47784: 672e beqs 477b4 <_Objects_Shrink_information+0x5c><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47786: 7404 moveq #4,%d2 47788: 4280 clrl %d0 } index_base += information->allocation_size; 4778a: 2042 moveal %d2,%a0 4778c: d681 addl %d1,%d3 4778e: 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++ ) { 47790: 5280 addql #1,%d0 47792: b084 cmpl %d4,%d0 47794: 6414 bccs 477aa <_Objects_Shrink_information+0x52><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 47796: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4779a: 671a beqs 477b6 <_Objects_Shrink_information+0x5e> 4779c: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4779e: 2042 moveal %d2,%a0 477a0: d681 addl %d1,%d3 477a2: 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++ ) { 477a4: 5280 addql #1,%d0 477a6: b084 cmpl %d4,%d0 477a8: 65ec bcss 47796 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 477aa: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 477b0: 4e5e unlk %fp 477b2: 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 ] == 477b4: 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; 477b6: 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 ); 477ba: 47f9 0004 b998 lea 4b998 <_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 ); 477c0: 4280 clrl %d0 477c2: 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; 477c6: 2810 movel %a0@,%d4 if ((index >= index_base) && 477c8: b680 cmpl %d0,%d3 477ca: 620c bhis 477d8 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 477cc: 4281 clrl %d1 477ce: 322a 0012 movew %a2@(18),%d1 477d2: d283 addl %d3,%d1 477d4: b280 cmpl %d0,%d1 477d6: 623e bhis 47816 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 477d8: 2044 moveal %d4,%a0 477da: 4a84 tstl %d4 477dc: 66e2 bnes 477c0 <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 477de: 206a 002e moveal %a2@(46),%a0 477e2: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 477e6: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> information->object_blocks[ block ] = NULL; 477ec: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 477f0: 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; 477f2: 302a 0028 movew %a2@(40),%d0 477f6: 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; 477fa: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 477fe: 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; 47800: 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; 47804: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47808: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4780c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47812: 4e5e unlk %fp 47814: 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 ); 47816: 2f08 movel %a0,%sp@- 47818: 4e93 jsr %a3@ 4781a: 588f addql #4,%sp } } while ( the_object ); 4781c: 2044 moveal %d4,%a0 4781e: 4a84 tstl %d4 47820: 669e bnes 477c0 <_Objects_Shrink_information+0x68> 47822: 60ba bras 477de <_Objects_Shrink_information+0x86> =============================================================================== 00046bc8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bc8: 4e56 ffe8 linkw %fp,#-24 46bcc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46bd0: 240e movel %fp,%d2 46bd2: 5982 subql #4,%d2 46bd4: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bd6: 246e 000c moveal %fp@(12),%a2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46bda: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bdc: 266e 0008 moveal %fp@(8),%a3 46be0: 162e 0017 moveb %fp@(23),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46be4: 4eb9 0004 6dbe jsr 46dbe <_POSIX_Mutex_Get> 46bea: 508f addql #8,%sp 46bec: 4a80 tstl %d0 46bee: 6764 beqs 46c54 <_POSIX_Condition_variables_Wait_support+0x8c><== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 46bf0: 2039 0006 19d8 movel 619d8 <_Thread_Dispatch_disable_level>,%d0 46bf6: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46bf8: 2f02 movel %d2,%sp@- 46bfa: 23c0 0006 19d8 movel %d0,619d8 <_Thread_Dispatch_disable_level> 46c00: 2f0b movel %a3,%sp@- 46c02: 4eb9 0004 69b4 jsr 469b4 <_POSIX_Condition_variables_Get> switch ( location ) { 46c08: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46c0a: 2840 moveal %d0,%a4 switch ( location ) { 46c0c: 4aae fffc tstl %fp@(-4) 46c10: 6642 bnes 46c54 <_POSIX_Condition_variables_Wait_support+0x8c> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 46c12: 202c 0014 movel %a4@(20),%d0 46c16: 6718 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> 46c18: b092 cmpl %a2@,%d0 46c1a: 6714 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> _Thread_Enable_dispatch(); 46c1c: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> 46c22: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 46c24: 2002 movel %d2,%d0 46c26: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c2c: 4e5e unlk %fp 46c2e: 4e75 rts if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 46c30: 2f0a movel %a2,%sp@- 46c32: 4eb9 0004 700c jsr 4700c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 46c38: 588f addql #4,%sp 46c3a: 4a03 tstb %d3 46c3c: 6724 beqs 46c62 <_POSIX_Condition_variables_Wait_support+0x9a> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 46c3e: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> 46c44: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 46c46: 2f0a movel %a2,%sp@- 46c48: 4eb9 0004 6f70 jsr 46f70 if ( mutex_status ) 46c4e: 588f addql #4,%sp 46c50: 4a80 tstl %d0 46c52: 67d0 beqs 46c24 <_POSIX_Condition_variables_Wait_support+0x5c> 46c54: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 46c56: 2002 movel %d2,%d0 46c58: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c5e: 4e5e unlk %fp 46c60: 4e75 rts return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 46c62: 2952 0014 movel %a2@,%a4@(20) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 46c66: 200c movel %a4,%d0 46c68: 0680 0000 0018 addil #24,%d0 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; 46c6e: 7201 moveq #1,%d1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 46c70: 2079 0006 1a92 moveal 61a92 <_Thread_Executing>,%a0 46c76: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 46c7a: 2153 0020 movel %a3@,%a0@(32) if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 46c7e: 2140 0044 movel %d0,%a0@(68) 46c82: 2941 0048 movel %d1,%a4@(72) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 46c86: 4879 0004 a920 pea 4a920 <_Thread_queue_Timeout> 46c8c: 2f2e 0010 movel %fp@(16),%sp@- 46c90: 2f00 movel %d0,%sp@- 46c92: 4eb9 0004 a564 jsr 4a564 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 46c98: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 46c9e: 2079 0006 1a92 moveal 61a92 <_Thread_Executing>,%a0 if ( status && status != ETIMEDOUT ) 46ca4: 4fef 000c lea %sp@(12),%sp /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 46ca8: 2428 0034 movel %a0@(52),%d2 if ( status && status != ETIMEDOUT ) 46cac: 6798 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e> 46cae: 7074 moveq #116,%d0 46cb0: b082 cmpl %d2,%d0 46cb2: 6792 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e><== ALWAYS TAKEN case OBJECTS_ERROR: break; } return EINVAL; } 46cb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46cb6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 46cbc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d620 <_POSIX_Keys_Run_destructors>: */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4d620: 7018 moveq #24,%d0 4d622: 7207 moveq #7,%d1 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4d624: 4e56 ffe8 linkw %fp,#-24 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4d628: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4d62c: 48d7 047c moveml %d2-%d6/%a2,%sp@ uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4d630: 2628 0008 movel %a0@(8),%d3 4d634: 2803 movel %d3,%d4 4d636: e0ac lsrl %d0,%d4 if ( !the_key ) continue; if ( !the_key->destructor ) continue; value = the_key->Values[ thread_api ][ thread_index ]; 4d638: 4286 clrl %d6 4d63a: 0283 0000 ffff andil #65535,%d3 4d640: c881 andl %d1,%d4 4d642: 3039 0005 f31a movew 5f31a <_POSIX_Keys_Information+0xe>,%d0 4d648: e58b lsll #2,%d3 4d64a: 5a84 addql #5,%d4 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4d64c: 4a40 tstw %d0 4d64e: 6752 beqs 4d6a2 <_POSIX_Keys_Run_destructors+0x82> 4d650: 7401 moveq #1,%d2 4d652: 7a01 moveq #1,%d5 the_key = (POSIX_Keys_Control *) 4d654: 2079 0005 f324 moveal 5f324 <_POSIX_Keys_Information+0x18>,%a0 4d65a: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4d65e: 5282 addql #1,%d2 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( !the_key ) 4d660: 4a8a tstl %a2 4d662: 6724 beqs 4d688 <_POSIX_Keys_Run_destructors+0x68> continue; if ( !the_key->destructor ) 4d664: 206a 0010 moveal %a2@(16),%a0 4d668: 4a88 tstl %a0 4d66a: 671c beqs 4d688 <_POSIX_Keys_Run_destructors+0x68><== NEVER TAKEN continue; value = the_key->Values[ thread_api ][ thread_index ]; 4d66c: 2272 4c00 moveal %a2@(00000000,%d4:l:4),%a1 4d670: 2031 3800 movel %a1@(00000000,%d3:l),%d0 if ( value ) { 4d674: 6712 beqs 4d688 <_POSIX_Keys_Run_destructors+0x68><== NEVER TAKEN (*the_key->destructor)( value ); 4d676: 2f00 movel %d0,%sp@- 4d678: 4e90 jsr %a0@ if ( the_key->Values[ thread_api ][ thread_index ] ) 4d67a: 588f addql #4,%sp 4d67c: 2072 4c00 moveal %a2@(00000000,%d4:l:4),%a0 4d680: 4ab0 3800 tstl %a0@(00000000,%d3:l) 4d684: 57c0 seq %d0 4d686: ca80 andl %d0,%d5 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4d688: 4281 clrl %d1 4d68a: 3039 0005 f31a movew 5f31a <_POSIX_Keys_Information+0xe>,%d0 4d690: 3200 movew %d0,%d1 4d692: b481 cmpl %d1,%d2 4d694: 63be blss 4d654 <_POSIX_Keys_Run_destructors+0x34> if ( the_key->Values[ thread_api ][ thread_index ] ) are_all_null = false; } } if ( are_all_null == true ) 4d696: 4a05 tstb %d5 4d698: 6608 bnes 4d6a2 <_POSIX_Keys_Run_destructors+0x82> return; iterations++; 4d69a: 5286 addql #1,%d6 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 4d69c: 7204 moveq #4,%d1 4d69e: b286 cmpl %d6,%d1 4d6a0: 66aa bnes 4d64c <_POSIX_Keys_Run_destructors+0x2c> return; } } 4d6a2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4d6a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bac4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4bac4: 4e56 ffe8 linkw %fp,#-24 4bac8: 48d7 041c moveml %d2-%d4/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 4bacc: 486e fffc pea %fp@(-4) 4bad0: 242e 0008 movel %fp@(8),%d2 4bad4: 2f02 movel %d2,%sp@- 4bad6: 4879 0006 8f90 pea 68f90 <_POSIX_Message_queue_Information_fds> 4badc: 246e 0014 moveal %fp@(20),%a2 4bae0: 262e 0018 movel %fp@(24),%d3 4bae4: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4baea: 4fef 000c lea %sp@(12),%sp 4baee: 2040 moveal %d0,%a0 4baf0: 4aae fffc tstl %fp@(-4) 4baf4: 671a beqs 4bb10 <_POSIX_Message_queue_Receive_support+0x4c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4baf6: 4eb9 0005 66ec jsr 566ec <__errno> 4bafc: 72ff moveq #-1,%d1 4bafe: 2040 moveal %d0,%a0 4bb00: 7009 moveq #9,%d0 } 4bb02: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bb08: 2080 movel %d0,%a0@ } 4bb0a: 2001 movel %d1,%d0 4bb0c: 4e5e unlk %fp 4bb0e: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4bb10: 2028 0014 movel %a0@(20),%d0 4bb14: 7203 moveq #3,%d1 4bb16: 7801 moveq #1,%d4 4bb18: c280 andl %d0,%d1 4bb1a: b881 cmpl %d1,%d4 4bb1c: 6700 00f2 beqw 4bc10 <_POSIX_Message_queue_Receive_support+0x14c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4bb20: 2068 0010 moveal %a0@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4bb24: 222e 0010 movel %fp@(16),%d1 4bb28: b2a8 0066 cmpl %a0@(102),%d1 4bb2c: 6500 0098 bcsw 4bbc6 <_POSIX_Message_queue_Receive_support+0x102> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bb30: 4a03 tstb %d3 4bb32: 6756 beqs 4bb8a <_POSIX_Message_queue_Receive_support+0xc6><== NEVER TAKEN 4bb34: 720e moveq #14,%d1 4bb36: e2a8 lsrl %d1,%d0 4bb38: 7801 moveq #1,%d4 4bb3a: b980 eorl %d4,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb3c: 2f2e 001c movel %fp@(28),%sp@- length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bb40: c084 andl %d4,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb42: 2f00 movel %d0,%sp@- 4bb44: 486e fff8 pea %fp@(-8) /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4bb48: 70ff moveq #-1,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb4a: 2f2e 000c movel %fp@(12),%sp@- 4bb4e: 2f02 movel %d2,%sp@- 4bb50: 4868 001a pea %a0@(26) /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4bb54: 2d40 fff8 movel %d0,%fp@(-8) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb58: 4eb9 0004 de40 jsr 4de40 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4bb5e: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4bb64: 2079 0006 8c0e moveal 68c0e <_Thread_Executing>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4bb6a: 24a8 0024 movel %a0@(36),%a2@ 4bb6e: 6d4e blts 4bbbe <_POSIX_Message_queue_Receive_support+0xfa> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4bb70: 4fef 0018 lea %sp@(24),%sp 4bb74: 4aa8 0034 tstl %a0@(52) 4bb78: 666c bnes 4bbe6 <_POSIX_Message_queue_Receive_support+0x122> return length_out; 4bb7a: 222e fff8 movel %fp@(-8),%d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bb7e: 2001 movel %d1,%d0 4bb80: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bb86: 4e5e unlk %fp 4bb88: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb8a: 2f2e 001c movel %fp@(28),%sp@- <== NOT EXECUTED length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bb8e: 4280 clrl %d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb90: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bb92: 486e fff8 pea %fp@(-8) <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4bb96: 70ff moveq #-1,%d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bb98: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4bb9c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4bb9e: 4868 001a pea %a0@(26) <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4bba2: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4bba6: 4eb9 0004 de40 jsr 4de40 <_CORE_message_queue_Seize> <== NOT EXECUTED &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4bbac: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> <== NOT EXECUTED *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4bbb2: 2079 0006 8c0e moveal 68c0e <_Thread_Executing>,%a0 <== NOT EXECUTED do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4bbb8: 24a8 0024 movel %a0@(36),%a2@ <== NOT EXECUTED 4bbbc: 6cb2 bges 4bb70 <_POSIX_Message_queue_Receive_support+0xac><== NOT EXECUTED 4bbbe: 2212 movel %a2@,%d1 4bbc0: 4481 negl %d1 4bbc2: 2481 movel %d1,%a2@ 4bbc4: 60aa bras 4bb70 <_POSIX_Message_queue_Receive_support+0xac> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 4bbc6: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4bbcc: 747a moveq #122,%d2 4bbce: 4eb9 0005 66ec jsr 566ec <__errno> 4bbd4: 72ff moveq #-1,%d1 4bbd6: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bbd8: 2001 movel %d1,%d0 the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4bbda: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bbdc: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bbe2: 4e5e unlk %fp 4bbe4: 4e75 rts _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4bbe6: 4eb9 0005 66ec jsr 566ec <__errno> 4bbec: 2079 0006 8c0e moveal 68c0e <_Thread_Executing>,%a0 4bbf2: 2440 moveal %d0,%a2 4bbf4: 2f28 0034 movel %a0@(52),%sp@- 4bbf8: 4eb9 0004 bec4 jsr 4bec4 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4bbfe: 588f addql #4,%sp 4bc00: 72ff moveq #-1,%d1 4bc02: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc04: 2001 movel %d1,%d0 4bc06: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bc0c: 4e5e unlk %fp 4bc0e: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 4bc10: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4bc16: 7609 moveq #9,%d3 4bc18: 4eb9 0005 66ec jsr 566ec <__errno> 4bc1e: 72ff moveq #-1,%d1 4bc20: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc22: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4bc24: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc26: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bc2c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bc54 <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4bc54: 7020 moveq #32,%d0 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 4bc56: 4e56 ffec linkw %fp,#-20 4bc5a: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4bc5e: 262e 0008 movel %fp@(8),%d3 4bc62: 242e 0014 movel %fp@(20),%d2 4bc66: 282e 0018 movel %fp@(24),%d4 /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4bc6a: b082 cmpl %d2,%d0 4bc6c: 6500 00e2 bcsw 4bd50 <_POSIX_Message_queue_Send_support+0xfc> 4bc70: 486e fffc pea %fp@(-4) 4bc74: 2f03 movel %d3,%sp@- 4bc76: 4879 0006 8f90 pea 68f90 <_POSIX_Message_queue_Information_fds> 4bc7c: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4bc82: 4fef 000c lea %sp@(12),%sp 4bc86: 2040 moveal %d0,%a0 4bc88: 4aae fffc tstl %fp@(-4) 4bc8c: 6600 00a8 bnew 4bd36 <_POSIX_Message_queue_Send_support+0xe2> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4bc90: 2028 0014 movel %a0@(20),%d0 4bc94: 7203 moveq #3,%d1 4bc96: c280 andl %d0,%d1 4bc98: 6700 00d0 beqw 4bd6a <_POSIX_Message_queue_Send_support+0x116> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4bc9c: 2068 0010 moveal %a0@(16),%a0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bca0: 4a04 tstb %d4 4bca2: 6752 beqs 4bcf6 <_POSIX_Message_queue_Send_support+0xa2> 4bca4: 720e moveq #14,%d1 4bca6: e2a8 lsrl %d1,%d0 4bca8: 123c 0001 moveb #1,%d1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bcac: 4482 negl %d2 the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bcae: b380 eorl %d1,%d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bcb0: 2f2e 001c movel %fp@(28),%sp@- the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bcb4: c081 andl %d1,%d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bcb6: 2f00 movel %d0,%sp@- 4bcb8: 2f02 movel %d2,%sp@- 4bcba: 42a7 clrl %sp@- 4bcbc: 2f03 movel %d3,%sp@- 4bcbe: 2f2e 0010 movel %fp@(16),%sp@- 4bcc2: 2f2e 000c movel %fp@(12),%sp@- 4bcc6: 4868 001a pea %a0@(26) 4bcca: 4eb9 0004 df78 jsr 4df78 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4bcd0: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bcd4: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4bcd6: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4bcdc: 7007 moveq #7,%d0 4bcde: b082 cmpl %d2,%d0 4bce0: 6748 beqs 4bd2a <_POSIX_Message_queue_Send_support+0xd6> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4bce2: 4a82 tstl %d2 4bce4: 6600 00a4 bnew 4bd8a <_POSIX_Message_queue_Send_support+0x136> 4bce8: 4281 clrl %d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bcea: 2001 movel %d1,%d0 4bcec: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4bcf2: 4e5e unlk %fp 4bcf4: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bcf6: 2f2e 001c movel %fp@(28),%sp@- the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bcfa: 4280 clrl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bcfc: 4482 negl %d2 4bcfe: 2f00 movel %d0,%sp@- 4bd00: 2f02 movel %d2,%sp@- 4bd02: 42a7 clrl %sp@- 4bd04: 2f03 movel %d3,%sp@- 4bd06: 2f2e 0010 movel %fp@(16),%sp@- 4bd0a: 2f2e 000c movel %fp@(12),%sp@- 4bd0e: 4868 001a pea %a0@(26) 4bd12: 4eb9 0004 df78 jsr 4df78 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4bd18: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bd1c: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4bd1e: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4bd24: 7007 moveq #7,%d0 4bd26: b082 cmpl %d2,%d0 4bd28: 66b8 bnes 4bce2 <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN msg_status = _Thread_Executing->Wait.return_code; 4bd2a: 2079 0006 8c0e moveal 68c0e <_Thread_Executing>,%a0 4bd30: 2428 0034 movel %a0@(52),%d2 4bd34: 60ac bras 4bce2 <_POSIX_Message_queue_Send_support+0x8e> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bd36: 4eb9 0005 66ec jsr 566ec <__errno> 4bd3c: 72ff moveq #-1,%d1 4bd3e: 2040 moveal %d0,%a0 4bd40: 7009 moveq #9,%d0 } 4bd42: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bd48: 2080 movel %d0,%a0@ } 4bd4a: 2001 movel %d1,%d0 4bd4c: 4e5e unlk %fp 4bd4e: 4e75 rts * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4bd50: 4eb9 0005 66ec jsr 566ec <__errno> 4bd56: 7616 moveq #22,%d3 4bd58: 72ff moveq #-1,%d1 4bd5a: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bd5c: 2001 movel %d1,%d0 * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4bd5e: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bd60: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4bd66: 4e5e unlk %fp 4bd68: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 4bd6a: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4bd70: 7409 moveq #9,%d2 4bd72: 4eb9 0005 66ec jsr 566ec <__errno> 4bd78: 72ff moveq #-1,%d1 4bd7a: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bd7c: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4bd7e: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bd80: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4bd86: 4e5e unlk %fp 4bd88: 4e75 rts msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 4bd8a: 4eb9 0005 66ec jsr 566ec <__errno> 4bd90: 2440 moveal %d0,%a2 4bd92: 2f02 movel %d2,%sp@- 4bd94: 4eb9 0004 bec4 jsr 4bec4 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4bd9a: 588f addql #4,%sp 4bd9c: 72ff moveq #-1,%d1 4bd9e: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bda0: 2001 movel %d1,%d0 4bda2: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4bda8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ef94 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4ef94: 4e56 0000 linkw %fp,#0 4ef98: 2f0a movel %a2,%sp@- 4ef9a: 2f02 movel %d2,%sp@- 4ef9c: 242e 0008 movel %fp@(8),%d2 POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 4efa0: 4aae 000c tstl %fp@(12) 4efa4: 6600 0112 bnew 4f0b8 <_POSIX_Semaphore_Create_support+0x124> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 4efa8: 4a82 tstl %d2 4efaa: 6718 beqs 4efc4 <_POSIX_Semaphore_Create_support+0x30> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 4efac: 4878 00ff pea ff 4efb0: 2f02 movel %d2,%sp@- 4efb2: 4eb9 0005 4134 jsr 54134 4efb8: 508f addql #8,%sp 4efba: 0c80 0000 00fe cmpil #254,%d0 4efc0: 6200 00dc bhiw 4f09e <_POSIX_Semaphore_Create_support+0x10a> 4efc4: 2039 0006 4024 movel 64024 <_Thread_Dispatch_disable_level>,%d0 4efca: 5280 addql #1,%d0 4efcc: 23c0 0006 4024 movel %d0,64024 <_Thread_Dispatch_disable_level> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4efd2: 4879 0006 427e pea 6427e <_POSIX_Semaphore_Information> 4efd8: 4eb9 0004 a6e8 jsr 4a6e8 <_Objects_Allocate> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4efde: 588f addql #4,%sp 4efe0: 2440 moveal %d0,%a2 4efe2: 4a80 tstl %d0 4efe4: 6700 00ec beqw 4f0d2 <_POSIX_Semaphore_Create_support+0x13e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 4efe8: 42aa 0010 clrl %a2@(16) if ( name ) { 4efec: 4a82 tstl %d2 4efee: 675c beqs 4f04c <_POSIX_Semaphore_Create_support+0xb8><== NEVER TAKEN the_semaphore->named = true; the_semaphore->open_count = 1; 4eff0: 7001 moveq #1,%d0 4eff2: 2540 0016 movel %d0,%a2@(22) } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = true; 4eff6: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 1; the_semaphore->linked = true; 4effa: 1540 0015 moveb %d0,%a2@(21) the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4effe: 70ff moveq #-1,%d0 * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 4f000: 42aa 005e clrl %a2@(94) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4f004: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4f008: 2f2e 0010 movel %fp@(16),%sp@- 4f00c: 486a 005a pea %a2@(90) 4f010: 486a 001a pea %a2@(26) 4f014: 4eb9 0004 a17c jsr 4a17c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4f01a: 2079 0006 4296 moveal 64296 <_POSIX_Semaphore_Information+0x18>,%a0 4f020: 4280 clrl %d0 4f022: 302a 000a movew %a2@(10),%d0 4f026: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4f02a: 2542 000c movel %d2,%a2@(12) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4f02e: 206e 0014 moveal %fp@(20),%a0 4f032: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4f034: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> return 0; 4f03a: 4fef 000c lea %sp@(12),%sp name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch(); 4f03e: 4280 clrl %d0 return 0; } 4f040: 242e fff8 movel %fp@(-8),%d2 4f044: 246e fffc moveal %fp@(-4),%a2 4f048: 4e5e unlk %fp 4f04a: 4e75 rts the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; the_semaphore->open_count = 0; 4f04c: 42aa 0016 clrl %a2@(22) if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4f050: 4200 clrb %d0 * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 4f052: 42aa 005e clrl %a2@(94) if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4f056: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 0; the_semaphore->linked = false; 4f05a: 1540 0015 moveb %d0,%a2@(21) the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4f05e: 70ff moveq #-1,%d0 4f060: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4f064: 2f2e 0010 movel %fp@(16),%sp@- 4f068: 486a 005a pea %a2@(90) 4f06c: 486a 001a pea %a2@(26) 4f070: 4eb9 0004 a17c jsr 4a17c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4f076: 2079 0006 4296 moveal 64296 <_POSIX_Semaphore_Information+0x18>,%a0 4f07c: 4280 clrl %d0 4f07e: 302a 000a movew %a2@(10),%d0 4f082: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4f086: 2542 000c movel %d2,%a2@(12) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4f08a: 206e 0014 moveal %fp@(20),%a0 4f08e: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4f090: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> return 0; 4f096: 4fef 000c lea %sp@(12),%sp name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch(); 4f09a: 4280 clrl %d0 4f09c: 60a2 bras 4f040 <_POSIX_Semaphore_Create_support+0xac> if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4f09e: 4eb9 0005 2c24 jsr 52c24 <__errno> 4f0a4: 745b moveq #91,%d2 4f0a6: 2040 moveal %d0,%a0 4f0a8: 70ff moveq #-1,%d0 4f0aa: 2082 movel %d2,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f0ac: 242e fff8 movel %fp@(-8),%d2 4f0b0: 246e fffc moveal %fp@(-4),%a2 4f0b4: 4e5e unlk %fp 4f0b6: 4e75 rts CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4f0b8: 4eb9 0005 2c24 jsr 52c24 <__errno> *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f0be: 242e fff8 movel %fp@(-8),%d2 CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4f0c2: 2040 moveal %d0,%a0 4f0c4: 7258 moveq #88,%d1 4f0c6: 70ff moveq #-1,%d0 *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f0c8: 246e fffc moveal %fp@(-4),%a2 4f0cc: 4e5e unlk %fp CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4f0ce: 2081 movel %d1,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f0d0: 4e75 rts _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 4f0d2: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 4f0d8: 4eb9 0005 2c24 jsr 52c24 <__errno> *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f0de: 242e fff8 movel %fp@(-8),%d2 the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 4f0e2: 2040 moveal %d0,%a0 4f0e4: 721c moveq #28,%d1 4f0e6: 70ff moveq #-1,%d0 *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4f0e8: 246e fffc moveal %fp@(-4),%a2 4f0ec: 4e5e unlk %fp the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 4f0ee: 2081 movel %d1,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } ... =============================================================================== 0004b0c8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 4b0c8: 4e56 0000 linkw %fp,#0 4b0cc: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b0d0: 2069 010e moveal %a1@(270),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4b0d4: 4aa8 00d4 tstl %a0@(212) 4b0d8: 6608 bnes 4b0e2 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 4b0da: 7001 moveq #1,%d0 4b0dc: b0a8 00d8 cmpl %a0@(216),%d0 4b0e0: 6708 beqs 4b0ea <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4b0e2: 4e5e unlk %fp thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 4b0e4: 4ef9 0004 8128 jmp 48128 <_Thread_Enable_dispatch> thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { 4b0ea: 4aa8 00dc tstl %a0@(220) 4b0ee: 67f2 beqs 4b0e2 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 4b0f0: 4878 ffff pea ffffffff */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4b0f4: 2039 0005 f78c movel 5f78c <_Thread_Dispatch_disable_level>,%d0 4b0fa: 5380 subql #1,%d0 4b0fc: 2f09 movel %a1,%sp@- 4b0fe: 23c0 0005 f78c movel %d0,5f78c <_Thread_Dispatch_disable_level> 4b104: 4eb9 0004 b860 jsr 4b860 <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4b10a: 508f addql #8,%sp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4b10c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c668 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4c668: 4e56 ffe8 linkw %fp,#-24 4c66c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4c670: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4c674: 47f9 0004 c644 lea 4c644 <_POSIX_Priority_Is_valid>,%a3 4c67a: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4c67c: 242e 0008 movel %fp@(8),%d2 4c680: 286e 0010 moveal %fp@(16),%a4 4c684: 2a6e 0014 moveal %fp@(20),%a5 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4c688: 4e93 jsr %a3@ 4c68a: 588f addql #4,%sp 4c68c: 4a00 tstb %d0 4c68e: 671e beqs 4c6ae <_POSIX_Thread_Translate_sched_param+0x46><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4c690: 4294 clrl %a4@ *budget_callout = NULL; 4c692: 4295 clrl %a5@ if ( policy == SCHED_OTHER ) { 4c694: 4a82 tstl %d2 4c696: 6722 beqs 4c6ba <_POSIX_Thread_Translate_sched_param+0x52> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 4c698: 7001 moveq #1,%d0 4c69a: b082 cmpl %d2,%d0 4c69c: 6700 0084 beqw 4c722 <_POSIX_Thread_Translate_sched_param+0xba> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 4c6a0: 7002 moveq #2,%d0 4c6a2: b082 cmpl %d2,%d0 4c6a4: 6700 008a beqw 4c730 <_POSIX_Thread_Translate_sched_param+0xc8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 4c6a8: 7004 moveq #4,%d0 4c6aa: b082 cmpl %d2,%d0 4c6ac: 671c beqs 4c6ca <_POSIX_Thread_Translate_sched_param+0x62> if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 4c6ae: 7016 moveq #22,%d0 } return EINVAL; } 4c6b0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c6b6: 4e5e unlk %fp 4c6b8: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4c6ba: 7201 moveq #1,%d1 4c6bc: 4280 clrl %d0 4c6be: 2881 movel %d1,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c6c0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c6c6: 4e5e unlk %fp 4c6c8: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && 4c6ca: 4aaa 0008 tstl %a2@(8) 4c6ce: 6606 bnes 4c6d6 <_POSIX_Thread_Translate_sched_param+0x6e> (param->sched_ss_repl_period.tv_nsec == 0) ) 4c6d0: 4aaa 000c tstl %a2@(12) 4c6d4: 67d8 beqs 4c6ae <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 4c6d6: 4aaa 0010 tstl %a2@(16) 4c6da: 6606 bnes 4c6e2 <_POSIX_Thread_Translate_sched_param+0x7a> (param->sched_ss_init_budget.tv_nsec == 0) ) 4c6dc: 4aaa 0014 tstl %a2@(20) 4c6e0: 67cc beqs 4c6ae <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4c6e2: 486a 0008 pea %a2@(8) 4c6e6: 243c 0004 a064 movel #303204,%d2 4c6ec: 2042 moveal %d2,%a0 4c6ee: 4e90 jsr %a0@ 4c6f0: 486a 0010 pea %a2@(16) 4c6f4: 2600 movel %d0,%d3 4c6f6: 2042 moveal %d2,%a0 4c6f8: 4e90 jsr %a0@ 4c6fa: 508f addql #8,%sp 4c6fc: b083 cmpl %d3,%d0 4c6fe: 62ae bhis 4c6ae <_POSIX_Thread_Translate_sched_param+0x46> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 4c700: 2f2a 0004 movel %a2@(4),%sp@- 4c704: 4e93 jsr %a3@ 4c706: 588f addql #4,%sp 4c708: 4a00 tstb %d0 4c70a: 67a2 beqs 4c6ae <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4c70c: 7003 moveq #3,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4c70e: 2abc 0004 6678 movel #288376,%a5@ return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4c714: 2880 movel %d0,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4c716: 4280 clrl %d0 return 0; } return EINVAL; } 4c718: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c71e: 4e5e unlk %fp 4c720: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4c722: 4294 clrl %a4@ 4c724: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c726: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c72c: 4e5e unlk %fp 4c72e: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4c730: 2880 movel %d0,%a4@ 4c732: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c734: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c73a: 4e5e unlk %fp ... =============================================================================== 0004635c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 4635c: 4e56 ff9c linkw %fp,#-100 46360: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 46364: 2479 0005 ebee moveal 5ebee ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 4636a: 2839 0005 ebea movel 5ebea ,%d4 if ( !user_threads || maximum == 0 ) 46370: 4a8a tstl %a2 46372: 675a beqs 463ce <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN 46374: 4a84 tstl %d4 46376: 6756 beqs 463ce <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN 46378: 240e movel %fp,%d2 4637a: 2a0e movel %fp,%d5 4637c: 4283 clrl %d3 4637e: 0682 ffff ffc0 addil #-64,%d2 46384: 2c3c 0004 c740 movel #313152,%d6 4638a: 4bf9 0004 c770 lea 4c770 ,%a5 46390: 49f9 0004 c7b0 lea 4c7b0 ,%a4 46396: 5985 subql #4,%d5 46398: 47f9 0004 5fb0 lea 45fb0 ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 4639e: 2f02 movel %d2,%sp@- 463a0: 2046 moveal %d6,%a0 463a2: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 463a4: 4878 0002 pea 2 463a8: 2f02 movel %d2,%sp@- 463aa: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 463ac: 2f2a 0004 movel %a2@(4),%sp@- 463b0: 2f02 movel %d2,%sp@- 463b2: 4e94 jsr %a4@ status = pthread_create( 463b4: 42a7 clrl %sp@- 463b6: 2f12 movel %a2@,%sp@- 463b8: 2f02 movel %d2,%sp@- 463ba: 2f05 movel %d5,%sp@- 463bc: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 463be: 4fef 0024 lea %sp@(36),%sp 463c2: 4a80 tstl %d0 463c4: 6612 bnes 463d8 <_POSIX_Threads_Initialize_user_threads_body+0x7c> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 463c6: 5283 addql #1,%d3 463c8: 508a addql #8,%a2 463ca: b684 cmpl %d4,%d3 463cc: 65d0 bcss 4639e <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 463ce: 4cee 3c7c ff9c moveml %fp@(-100),%d2-%d6/%a2-%a5 463d4: 4e5e unlk %fp 463d6: 4e75 rts &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 463d8: 2f00 movel %d0,%sp@- 463da: 4878 0001 pea 1 463de: 4878 0002 pea 2 463e2: 4eb9 0004 8394 jsr 48394 <_Internal_error_Occurred> =============================================================================== 0004b3d0 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 4b3d0: 4e56 fff4 linkw %fp,#-12 4b3d4: 48d7 1c00 moveml %a2-%a4,%sp@ 4b3d8: 266e 000c moveal %fp@(12),%a3 the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4b3dc: 49f9 0004 c4a0 lea 4c4a0 <_Timespec_To_ticks>,%a4 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b3e2: 246b 010e moveal %a3@(270),%a2 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4b3e6: 486a 0094 pea %a2@(148) 4b3ea: 4e94 jsr %a4@ */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4b3ec: 588f addql #4,%sp 4b3ee: 4281 clrl %d1 4b3f0: 1239 0005 d7c2 moveb 5d7c2 ,%d1 4b3f6: 92aa 0084 subl %a2@(132),%d1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; 4b3fa: 2740 0076 movel %d0,%a3@(118) new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 4b3fe: 2741 0018 movel %d1,%a3@(24) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4b402: 4aab 001c tstl %a3@(28) 4b406: 6606 bnes 4b40e <_POSIX_Threads_Sporadic_budget_TSR+0x3e><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 4b408: b2ab 0014 cmpl %a3@(20),%d1 4b40c: 652c bcss 4b43a <_POSIX_Threads_Sporadic_budget_TSR+0x6a> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4b40e: 486a 008c pea %a2@(140) 4b412: 4e94 jsr %a4@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4b414: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4b416: 2540 00b0 movel %d0,%a2@(176) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4b41a: 45ea 00a4 lea %a2@(164),%a2 4b41e: 203c 0005 f050 movel #389200,%d0 4b424: 2d4a 000c movel %a2,%fp@(12) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 4b428: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4b42e: 2d40 0008 movel %d0,%fp@(8) 4b432: 4e5e unlk %fp 4b434: 4ef9 0004 8f5c jmp 48f5c <_Watchdog_Insert> if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4b43a: 4878 0001 pea 1 4b43e: 2f01 movel %d1,%sp@- 4b440: 2f0b movel %a3,%sp@- 4b442: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> 4b448: 4fef 000c lea %sp@(12),%sp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4b44c: 486a 008c pea %a2@(140) 4b450: 4e94 jsr %a4@ 4b452: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4b454: 2540 00b0 movel %d0,%a2@(176) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4b458: 45ea 00a4 lea %a2@(164),%a2 4b45c: 203c 0005 f050 movel #389200,%d0 4b462: 2d4a 000c movel %a2,%fp@(12) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 4b466: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4b46c: 2d40 0008 movel %d0,%fp@(8) 4b470: 4e5e unlk %fp 4b472: 4ef9 0004 8f5c jmp 48f5c <_Watchdog_Insert> =============================================================================== 0004b388 <_POSIX_Threads_Sporadic_budget_callout>: RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4b388: 4280 clrl %d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4b38a: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4b38c: 4e56 0000 linkw %fp,#0 4b390: 206e 0008 moveal %fp@(8),%a0 4b394: 1039 0005 d7c2 moveb 5d7c2 ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b39a: 2268 010e moveal %a0@(270),%a1 4b39e: 90a9 0088 subl %a1@(136),%d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4b3a2: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4b3a6: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4b3aa: 4aa8 001c tstl %a0@(28) 4b3ae: 6606 bnes 4b3b6 <_POSIX_Threads_Sporadic_budget_callout+0x2e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4b3b0: b0a8 0014 cmpl %a0@(20),%d0 4b3b4: 6204 bhis 4b3ba <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 4b3b6: 4e5e unlk %fp <== NOT EXECUTED 4b3b8: 4e75 rts <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4b3ba: 4878 0001 pea 1 4b3be: 2f00 movel %d0,%sp@- 4b3c0: 2f08 movel %a0,%sp@- 4b3c2: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> 4b3c8: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4b3cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d5b8 <_POSIX_Threads_cancel_run>: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4d5b8: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4d5ba: 4e56 ffec linkw %fp,#-20 4d5be: 206e 0008 moveal %fp@(8),%a0 4d5c2: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4d5c6: 2668 010e moveal %a0@(270),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d5ca: 45eb 00e4 lea %a3@(228),%a2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4d5ce: 2740 00d4 movel %d0,%a3@(212) POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 4d5d2: b5eb 00e0 cmpal %a3@(224),%a2 4d5d6: 673c beqs 4d614 <_POSIX_Threads_cancel_run+0x5c> 4d5d8: 49f9 0004 9210 lea 49210 <_Workspace_Free>,%a4 thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4d5de: 243c 0000 0700 movel #1792,%d2 4d5e4: 2002 movel %d2,%d0 4d5e6: 40c1 movew %sr,%d1 4d5e8: 8081 orl %d1,%d0 4d5ea: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4d5ec: 2a6a 0004 moveal %a2@(4),%a5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4d5f0: 2055 moveal %a5@,%a0 previous = the_node->previous; 4d5f2: 226d 0004 moveal %a5@(4),%a1 next->previous = previous; previous->next = next; 4d5f6: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4d5f8: 2149 0004 movel %a1,%a0@(4) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4d5fc: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4d5fe: 2f2d 000c movel %a5@(12),%sp@- 4d602: 206d 0008 moveal %a5@(8),%a0 4d606: 4e90 jsr %a0@ _Workspace_Free( handler ); 4d608: 2f0d movel %a5,%sp@- 4d60a: 4e94 jsr %a4@ POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 4d60c: 508f addql #8,%sp 4d60e: b5eb 00e0 cmpal %a3@(224),%a2 4d612: 66d0 bnes 4d5e4 <_POSIX_Threads_cancel_run+0x2c> <== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4d614: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d61a: 4e5e unlk %fp ... =============================================================================== 00045cc0 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 45cc0: 4e56 0000 linkw %fp,#0 45cc4: 2f0a movel %a2,%sp@- 45cc6: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 45cca: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 45cce: 4aaa 0052 tstl %a2@(82) 45cd2: 6606 bnes 45cda <_POSIX_Timer_TSR+0x1a> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 45cd4: 4aaa 0056 tstl %a2@(86) 45cd8: 672a beqs 45d04 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN activated = _POSIX_Timer_Insert_helper( 45cda: 2f0a movel %a2,%sp@- 45cdc: 4879 0004 5cc0 pea 45cc0 <_POSIX_Timer_TSR> 45ce2: 2f2a 0008 movel %a2@(8),%sp@- 45ce6: 2f2a 0062 movel %a2@(98),%sp@- 45cea: 486a 0010 pea %a2@(16) 45cee: 4eb9 0004 bf48 jsr 4bf48 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 45cf4: 4fef 0014 lea %sp@(20),%sp 45cf8: 4a00 tstb %d0 45cfa: 662a bnes 45d26 <_POSIX_Timer_TSR+0x66> <== ALWAYS TAKEN /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 45cfc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 45d00: 4e5e unlk %fp <== NOT EXECUTED 45d02: 4e75 rts <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45d04: 7004 moveq #4,%d0 <== NOT EXECUTED 45d06: 1540 003c moveb %d0,%a2@(60) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 45d0a: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 45d0e: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 45d12: 4eb9 0004 ba5c jsr 4ba5c <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 45d18: 508f addql #8,%sp <== NOT EXECUTED 45d1a: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED } 45d1e: 246e fffc moveal %fp@(-4),%a2 45d22: 4e5e unlk %fp 45d24: 4e75 rts ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 45d26: 486a 006a pea %a2@(106) 45d2a: 4eb9 0004 7470 jsr 47470 <_TOD_Get> /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 45d30: 588f addql #4,%sp /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45d32: 7003 moveq #3,%d0 45d34: 1540 003c moveb %d0,%a2@(60) /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 45d38: 2f2a 0042 movel %a2@(66),%sp@- 45d3c: 2f2a 0038 movel %a2@(56),%sp@- 45d40: 4eb9 0004 ba5c jsr 4ba5c } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 45d46: 508f addql #8,%sp 45d48: 42aa 0066 clrl %a2@(102) 45d4c: 60d0 bras 45d1e <_POSIX_Timer_TSR+0x5e> ... =============================================================================== 0004d6c4 <_POSIX_signals_Check_signal>: ) { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d6c4: 4280 clrl %d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d6c6: 4e56 ffdc linkw %fp,#-36 4d6ca: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d6ce: 4878 0001 pea 1 4d6d2: 102e 0013 moveb %fp@(19),%d0 4d6d6: 260e movel %fp,%d3 4d6d8: 0683 ffff fff4 addil #-12,%d3 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d6de: 242e 000c movel %fp@(12),%d2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d6e2: 2f00 movel %d0,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d6e4: 246e 0008 moveal %fp@(8),%a2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d6e8: 2f03 movel %d3,%sp@- 4d6ea: 2f02 movel %d2,%sp@- 4d6ec: 2f0a movel %a2,%sp@- 4d6ee: 4eb9 0004 d770 jsr 4d770 <_POSIX_signals_Clear_signals> 4d6f4: 4fef 0014 lea %sp@(20),%sp 4d6f8: 4a00 tstb %d0 4d6fa: 6766 beqs 4d762 <_POSIX_signals_Check_signal+0x9e> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4d6fc: 2202 movel %d2,%d1 4d6fe: 2002 movel %d2,%d0 4d700: 43f9 0005 f426 lea 5f426 <_POSIX_signals_Vectors>,%a1 4d706: e589 lsll #2,%d1 4d708: e988 lsll #4,%d0 4d70a: 9081 subl %d1,%d0 4d70c: 2040 moveal %d0,%a0 4d70e: d1fc 0005 f42e addal #390190,%a0 4d714: 7201 moveq #1,%d1 4d716: 2050 moveal %a0@,%a0 4d718: b288 cmpl %a0,%d1 4d71a: 6746 beqs 4d762 <_POSIX_signals_Check_signal+0x9e><== NEVER TAKEN /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4d71c: 2842 moveal %d2,%a4 4d71e: 47f4 2a01 lea %a4@(00000001,%d2:l:2),%a3 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4d722: 282a 00cc movel %a2@(204),%d4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4d726: 2231 bc00 movel %a1@(00000000,%a3:l:4),%d1 4d72a: 8284 orl %d4,%d1 4d72c: 2541 00cc movel %d1,%a2@(204) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4d730: 7202 moveq #2,%d1 4d732: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1 4d736: 6716 beqs 4d74e <_POSIX_signals_Check_signal+0x8a> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4d738: 2f02 movel %d2,%sp@- 4d73a: 4e90 jsr %a0@ 4d73c: 588f addql #4,%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4d73e: 7001 moveq #1,%d0 4d740: 2544 00cc movel %d4,%a2@(204) return true; } 4d744: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 4d74a: 4e5e unlk %fp 4d74c: 4e75 rts /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4d74e: 42a7 clrl %sp@- 4d750: 2f03 movel %d3,%sp@- 4d752: 2f02 movel %d2,%sp@- 4d754: 4e90 jsr %a0@ signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 4d756: 4fef 000c lea %sp@(12),%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4d75a: 2544 00cc movel %d4,%a2@(204) 4d75e: 7001 moveq #1,%d0 4d760: 60e2 bras 4d744 <_POSIX_signals_Check_signal+0x80> return true; } 4d762: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 4d768: 4200 clrb %d0 } 4d76a: 4e5e unlk %fp ... =============================================================================== 0004e8dc <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4e8dc: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4e8e2: 4e56 0000 linkw %fp,#0 4e8e6: 222e 0008 movel %fp@(8),%d1 4e8ea: 2f03 movel %d3,%sp@- 4e8ec: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4e8ee: 40c2 movew %sr,%d2 4e8f0: 8082 orl %d2,%d0 4e8f2: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4e8f4: 2601 movel %d1,%d3 4e8f6: 2001 movel %d1,%d0 4e8f8: 41f9 0005 f426 lea 5f426 <_POSIX_signals_Vectors>,%a0 4e8fe: e58b lsll #2,%d3 4e900: e988 lsll #4,%d0 4e902: 9083 subl %d3,%d0 4e904: 7602 moveq #2,%d3 4e906: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4e90a: 6726 beqs 4e932 <_POSIX_signals_Clear_process_signals+0x56> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4e90c: 5381 subql #1,%d1 4e90e: 7001 moveq #1,%d0 4e910: e3a8 lsll %d1,%d0 4e912: 4680 notl %d0 4e914: c0b9 0005 f61a andl 5f61a <_POSIX_signals_Pending>,%d0 4e91a: 23c0 0005 f61a movel %d0,5f61a <_POSIX_signals_Pending> if ( !_POSIX_signals_Pending ) 4e920: 6606 bnes 4e928 <_POSIX_signals_Clear_process_signals+0x4c><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 4e922: 53b9 0005 f01a subql #1,5f01a <_Thread_Do_post_task_switch_extension> } _ISR_Enable( level ); 4e928: 46c2 movew %d2,%sr } 4e92a: 241f movel %sp@+,%d2 4e92c: 261f movel %sp@+,%d3 4e92e: 4e5e unlk %fp 4e930: 4e75 rts ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4e932: 0680 0005 f61e addil #390686,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4e938: 2040 moveal %d0,%a0 4e93a: 5888 addql #4,%a0 4e93c: 2240 moveal %d0,%a1 4e93e: b1d1 cmpal %a1@,%a0 4e940: 67ca beqs 4e90c <_POSIX_signals_Clear_process_signals+0x30><== ALWAYS TAKEN if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 4e942: 46c2 movew %d2,%sr <== NOT EXECUTED } 4e944: 241f movel %sp@+,%d2 <== NOT EXECUTED 4e946: 261f movel %sp@+,%d3 <== NOT EXECUTED 4e948: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d770 <_POSIX_signals_Clear_signals>: static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4d770: 7001 moveq #1,%d0 int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4d772: 4e56 ffe8 linkw %fp,#-24 4d776: 206e 0008 moveal %fp@(8),%a0 4d77a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4d77e: 242e 000c movel %fp@(12),%d2 4d782: 2202 movel %d2,%d1 4d784: 5381 subql #1,%d1 4d786: 1a2e 0017 moveb %fp@(23),%d5 4d78a: e3a8 lsll %d1,%d0 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 4d78c: 4a2e 001b tstb %fp@(27) 4d790: 664e bnes 4d7e0 <_POSIX_signals_Clear_signals+0x70> 4d792: 78ff moveq #-1,%d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4d794: 223c 0000 0700 movel #1792,%d1 4d79a: 40c3 movew %sr,%d3 4d79c: 8283 orl %d3,%d1 4d79e: 46c1 movew %d1,%sr if ( is_global ) { 4d7a0: 4a05 tstb %d5 4d7a2: 6752 beqs 4d7f6 <_POSIX_signals_Clear_signals+0x86> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4d7a4: c0b9 0005 f61a andl 5f61a <_POSIX_signals_Pending>,%d0 4d7aa: c084 andl %d4,%d0 4d7ac: 676a beqs 4d818 <_POSIX_signals_Clear_signals+0xa8> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4d7ae: 2202 movel %d2,%d1 4d7b0: 2002 movel %d2,%d0 4d7b2: 47f9 0004 e8dc lea 4e8dc <_POSIX_signals_Clear_process_signals>,%a3 4d7b8: 41f9 0005 f426 lea 5f426 <_POSIX_signals_Vectors>,%a0 4d7be: e589 lsll #2,%d1 4d7c0: e988 lsll #4,%d0 4d7c2: 9081 subl %d1,%d0 4d7c4: 7202 moveq #2,%d1 4d7c6: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1 4d7ca: 675a beqs 4d826 <_POSIX_signals_Clear_signals+0xb6> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4d7cc: 2f02 movel %d2,%sp@- 4d7ce: 4e93 jsr %a3@ 4d7d0: 588f addql #4,%sp 4d7d2: 7001 moveq #1,%d0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4d7d4: 46c3 movew %d3,%sr return do_callout; } 4d7d6: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d7dc: 4e5e unlk %fp 4d7de: 4e75 rts /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 4d7e0: 2828 00cc movel %a0@(204),%d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4d7e4: 223c 0000 0700 movel #1792,%d1 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 4d7ea: 4684 notl %d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4d7ec: 40c3 movew %sr,%d3 4d7ee: 8283 orl %d3,%d1 4d7f0: 46c1 movew %d1,%sr if ( is_global ) { 4d7f2: 4a05 tstb %d5 4d7f4: 66ae bnes 4d7a4 <_POSIX_signals_Clear_signals+0x34> } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4d7f6: 2428 00d0 movel %a0@(208),%d2 4d7fa: 2200 movel %d0,%d1 4d7fc: c282 andl %d2,%d1 4d7fe: c284 andl %d4,%d1 4d800: 6716 beqs 4d818 <_POSIX_signals_Clear_signals+0xa8> api->signals_pending &= ~mask; 4d802: 4680 notl %d0 4d804: c082 andl %d2,%d0 4d806: 2140 00d0 movel %d0,%a0@(208) 4d80a: 7001 moveq #1,%d0 do_callout = true; } } _ISR_Enable( level ); 4d80c: 46c3 movew %d3,%sr return do_callout; } 4d80e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d814: 4e5e unlk %fp 4d816: 4e75 rts _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4d818: 4200 clrb %d0 do_callout = true; } } _ISR_Enable( level ); 4d81a: 46c3 movew %d3,%sr return do_callout; } 4d81c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d822: 4e5e unlk %fp 4d824: 4e75 rts _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4d826: 0680 0005 f61e addil #390686,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4d82c: 2040 moveal %d0,%a0 4d82e: 2458 moveal %a0@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d830: b1ca cmpal %a2,%a0 4d832: 6744 beqs 4d878 <_POSIX_signals_Clear_signals+0x108> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4d834: 2052 moveal %a2@,%a0 the_chain->first = new_first; 4d836: 2240 moveal %d0,%a1 4d838: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4d83a: 2140 0004 movel %d0,%a0@(4) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 4d83e: 2f02 movel %d2,%sp@- 4d840: 4e93 jsr %a3@ * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { *info = psiginfo->Info; 4d842: 206e 0010 moveal %fp@(16),%a0 the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; the_node->previous = old_last_node; 4d846: 588f addql #4,%sp 4d848: 20ea 0008 movel %a2@(8),%a0@+ 4d84c: 20ea 000c movel %a2@(12),%a0@+ 4d850: 20aa 0010 movel %a2@(16),%a0@ Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4d854: 24bc 0005 f5aa movel #390570,%a2@ old_last_node = the_chain->last; 4d85a: 2279 0005 f5ae moveal 5f5ae <_POSIX_signals_Inactive_siginfo+0x8>,%a1 the_chain->last = the_node; 4d860: 23ca 0005 f5ae movel %a2,5f5ae <_POSIX_signals_Inactive_siginfo+0x8> old_last_node->next = the_node; the_node->previous = old_last_node; 4d866: 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; 4d86a: 228a movel %a2,%a1@ &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4d86c: 2f02 movel %d2,%sp@- 4d86e: 4e93 jsr %a3@ 4d870: 588f addql #4,%sp 4d872: 7001 moveq #1,%d0 4d874: 6000 ff5e braw 4d7d4 <_POSIX_signals_Clear_signals+0x64> if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 4d878: 2f02 movel %d2,%sp@- 4d87a: 4e93 jsr %a3@ 4d87c: 588f addql #4,%sp &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4d87e: 2f02 movel %d2,%sp@- 4d880: 4e93 jsr %a3@ 4d882: 588f addql #4,%sp 4d884: 7001 moveq #1,%d0 4d886: 6000 ff4c braw 4d7d4 <_POSIX_signals_Clear_signals+0x64> ... =============================================================================== 00046a94 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 46a94: 701b moveq #27,%d0 46a96: 4e56 fff4 linkw %fp,#-12 46a9a: 48d7 001c moveml %d2-%d4,%sp@ 46a9e: 242e 0008 movel %fp@(8),%d2 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 46aa2: 7601 moveq #1,%d3 46aa4: 2200 movel %d0,%d1 46aa6: 5381 subql #1,%d1 46aa8: 2803 movel %d3,%d4 46aaa: e3ac lsll %d1,%d4 46aac: 2204 movel %d4,%d1 46aae: c282 andl %d2,%d1 46ab0: 6626 bnes 46ad8 <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 46ab2: 5280 addql #1,%d0 46ab4: 123c 0020 moveb #32,%d1 46ab8: b280 cmpl %d0,%d1 46aba: 66e8 bnes 46aa4 <_POSIX_signals_Get_highest+0x10> 46abc: 7001 moveq #1,%d0 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 46abe: 7601 moveq #1,%d3 46ac0: 2200 movel %d0,%d1 46ac2: 5381 subql #1,%d1 46ac4: 2803 movel %d3,%d4 46ac6: e3ac lsll %d1,%d4 46ac8: 2204 movel %d4,%d1 46aca: c282 andl %d2,%d1 46acc: 660a bnes 46ad8 <_POSIX_signals_Get_highest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 46ace: 5280 addql #1,%d0 46ad0: 123c 001b moveb #27,%d1 46ad4: b280 cmpl %d0,%d1 46ad6: 66e8 bnes 46ac0 <_POSIX_signals_Get_highest+0x2c><== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 46ad8: 4cd7 001c moveml %sp@,%d2-%d4 46adc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b010 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4b010: 4e56 fff0 linkw %fp,#-16 POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b014: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4b018: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b01c: 2468 010e moveal %a0@(270),%a2 * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 4b020: 263c 0000 0700 movel #1792,%d3 4b026: 47f9 0004 d6c4 lea 4d6c4 <_POSIX_signals_Check_signal>,%a3 4b02c: 2003 movel %d3,%d0 4b02e: 40c1 movew %sr,%d1 4b030: 8081 orl %d1,%d0 4b032: 46c0 movew %d0,%sr if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 4b034: 2039 0005 f61a movel 5f61a <_POSIX_signals_Pending>,%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4b03a: 242a 00cc movel %a2@(204),%d2 4b03e: 4682 notl %d2 (api->signals_pending | _POSIX_signals_Pending)) ) { 4b040: 80aa 00d0 orl %a2@(208),%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4b044: c082 andl %d2,%d0 4b046: 6762 beqs 4b0aa <_POSIX_signals_Post_switch_extension+0x9a> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 4b048: 46c1 movew %d1,%sr 4b04a: 741b moveq #27,%d2 for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 4b04c: 42a7 clrl %sp@- 4b04e: 2f02 movel %d2,%sp@- 4b050: 2f0a movel %a2,%sp@- 4b052: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4b054: 4878 0001 pea 1 4b058: 2f02 movel %d2,%sp@- _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4b05a: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4b05c: 2f0a movel %a2,%sp@- 4b05e: 4e93 jsr %a3@ _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4b060: 4fef 0018 lea %sp@(24),%sp 4b064: 7020 moveq #32,%d0 4b066: b082 cmpl %d2,%d0 4b068: 66e2 bnes 4b04c <_POSIX_signals_Post_switch_extension+0x3c> 4b06a: 7401 moveq #1,%d2 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 4b06c: 42a7 clrl %sp@- 4b06e: 2f02 movel %d2,%sp@- 4b070: 2f0a movel %a2,%sp@- 4b072: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4b074: 4878 0001 pea 1 4b078: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4b07a: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4b07c: 2f0a movel %a2,%sp@- 4b07e: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4b080: 4fef 0018 lea %sp@(24),%sp 4b084: 701b moveq #27,%d0 4b086: b082 cmpl %d2,%d0 4b088: 67a2 beqs 4b02c <_POSIX_signals_Post_switch_extension+0x1c><== NEVER TAKEN _POSIX_signals_Check_signal( api, signo, false ); 4b08a: 42a7 clrl %sp@- 4b08c: 2f02 movel %d2,%sp@- 4b08e: 2f0a movel %a2,%sp@- 4b090: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4b092: 4878 0001 pea 1 4b096: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4b098: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4b09a: 2f0a movel %a2,%sp@- 4b09c: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4b09e: 4fef 0018 lea %sp@(24),%sp 4b0a2: 701b moveq #27,%d0 4b0a4: b082 cmpl %d2,%d0 4b0a6: 66c4 bnes 4b06c <_POSIX_signals_Post_switch_extension+0x5c> 4b0a8: 6082 bras 4b02c <_POSIX_signals_Post_switch_extension+0x1c> */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4b0aa: 46c1 movew %d1,%sr for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 4b0ac: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b0b2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045b88 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 45b88: 4e56 0000 linkw %fp,#0 /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 45b8c: 4eb9 0004 2a2c jsr 42a2c 45b92: 4878 000e pea e 45b96: 2f00 movel %d0,%sp@- 45b98: 4eb9 0004 5884 jsr 45884 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 45b9e: 4879 0006 114e pea 6114e <_POSIX_signals_Ualarm_timer> 45ba4: 4eb9 0004 96fc jsr 496fc <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45baa: 4fef 000c lea %sp@(12),%sp 45bae: 203c 0006 114e movel #397646,%d0 45bb4: 2d40 000c movel %d0,%fp@(12) 45bb8: 203c 0006 0a00 movel #395776,%d0 45bbe: 2d40 0008 movel %d0,%fp@(8) /* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); } 45bc2: 4e5e unlk %fp 45bc4: 4ef9 0004 95b4 jmp 495b4 <_Watchdog_Insert> ... =============================================================================== 0004e97c <_POSIX_signals_Unblock_thread>: 4e97c: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4e97e: 4e56 fff4 linkw %fp,#-12 4e982: 222e 000c movel %fp@(12),%d1 4e986: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4e98a: 246e 0008 moveal %fp@(8),%a2 4e98e: 2601 movel %d1,%d3 4e990: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4e992: 242a 0010 movel %a2@(16),%d2 4e996: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4e99c: 226e 0010 moveal %fp@(16),%a1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e9a0: 206a 010e moveal %a2@(270),%a0 4e9a4: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4e9a6: 0c82 1000 8000 cmpil #268468224,%d2 4e9ac: 6772 beqs 4ea20 <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 4e9ae: 2228 00cc movel %a0@(204),%d1 4e9b2: 4681 notl %d1 4e9b4: c081 andl %d1,%d0 4e9b6: 675c beqs 4ea14 <_POSIX_signals_Unblock_thread+0x98> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4e9b8: 202a 0010 movel %a2@(16),%d0 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 4e9bc: 7201 moveq #1,%d1 4e9be: 1541 0074 moveb %d1,%a2@(116) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4e9c2: 0800 001c btst #28,%d0 4e9c6: 6736 beqs 4e9fe <_POSIX_signals_Unblock_thread+0x82> the_thread->Wait.return_code = EINTR; 4e9c8: 7004 moveq #4,%d0 4e9ca: 2540 0034 movel %d0,%a2@(52) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 4e9ce: 103c 0008 moveb #8,%d0 4e9d2: c0aa 0010 andl %a2@(16),%d0 4e9d6: 673c beqs 4ea14 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4e9d8: 7202 moveq #2,%d1 4e9da: b2aa 0050 cmpl %a2@(80),%d1 4e9de: 6700 00a4 beqw 4ea84 <_POSIX_signals_Unblock_thread+0x108> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4e9e2: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 4e9e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e9ea: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> <== NOT EXECUTED 4e9f0: 508f addql #8,%sp <== NOT EXECUTED 4e9f2: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 4e9f4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e9fa: 4e5e unlk %fp 4e9fc: 4e75 rts if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 4e9fe: 4a80 tstl %d0 4ea00: 6612 bnes 4ea14 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4ea02: 2039 0005 f012 movel 5f012 <_ISR_Nest_level>,%d0 4ea08: 670a beqs 4ea14 <_POSIX_signals_Unblock_thread+0x98> 4ea0a: b5f9 0005 f032 cmpal 5f032 <_Thread_Executing>,%a2 4ea10: 6700 0094 beqw 4eaa6 <_POSIX_signals_Unblock_thread+0x12a> _ISR_Signals_to_thread_executing = true; } } return false; } 4ea14: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4ea1a: 4200 clrb %d0 } } return false; } 4ea1c: 4e5e unlk %fp 4ea1e: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 4ea20: 2400 movel %d0,%d2 4ea22: c4aa 0030 andl %a2@(48),%d2 4ea26: 672a beqs 4ea52 <_POSIX_signals_Unblock_thread+0xd6> the_thread->Wait.return_code = EINTR; 4ea28: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4ea2a: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 4ea2e: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4ea32: 4a89 tstl %a1 4ea34: 6734 beqs 4ea6a <_POSIX_signals_Unblock_thread+0xee> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 4ea36: 20d9 movel %a1@+,%a0@+ 4ea38: 20d9 movel %a1@+,%a0@+ 4ea3a: 2091 movel %a1@,%a0@ } _Thread_queue_Extract_with_proxy( the_thread ); 4ea3c: 2f0a movel %a2,%sp@- 4ea3e: 4eb9 0004 852c jsr 4852c <_Thread_queue_Extract_with_proxy> return true; 4ea44: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ea46: 7001 moveq #1,%d0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 4ea48: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ea4e: 4e5e unlk %fp 4ea50: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 4ea52: 2428 00cc movel %a0@(204),%d2 4ea56: 4682 notl %d2 4ea58: c082 andl %d2,%d0 4ea5a: 67b8 beqs 4ea14 <_POSIX_signals_Unblock_thread+0x98> the_thread->Wait.return_code = EINTR; 4ea5c: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4ea5e: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 4ea62: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4ea66: 4a89 tstl %a1 4ea68: 66cc bnes 4ea36 <_POSIX_signals_Unblock_thread+0xba><== ALWAYS TAKEN the_info->si_signo = signo; 4ea6a: 2081 movel %d1,%a0@ the_info->si_code = SI_USER; 4ea6c: 7201 moveq #1,%d1 the_info->si_value.sival_int = 0; 4ea6e: 42a8 0008 clrl %a0@(8) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 4ea72: 2141 0004 movel %d1,%a0@(4) the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ea76: 2f0a movel %a2,%sp@- 4ea78: 4eb9 0004 852c jsr 4852c <_Thread_queue_Extract_with_proxy> return true; 4ea7e: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ea80: 7001 moveq #1,%d0 4ea82: 60c4 bras 4ea48 <_POSIX_signals_Unblock_thread+0xcc> _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4ea84: 486a 0048 pea %a2@(72) 4ea88: 4eb9 0004 90a4 jsr 490a4 <_Watchdog_Remove> 4ea8e: 588f addql #4,%sp 4ea90: 2f3c 1003 fff8 movel #268697592,%sp@- 4ea96: 2f0a movel %a2,%sp@- 4ea98: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> 4ea9e: 508f addql #8,%sp 4eaa0: 4200 clrb %d0 4eaa2: 6000 ff50 braw 4e9f4 <_POSIX_signals_Unblock_thread+0x78> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4eaa6: 7001 moveq #1,%d0 } } return false; } 4eaa8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4eaae: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4eab0: 13c0 0005 f0c0 moveb %d0,5f0c0 <_ISR_Signals_to_thread_executing> 4eab6: 4200 clrb %d0 } } return false; } ... =============================================================================== 0004b822 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4b822: 4e56 0000 linkw %fp,#0 4b826: 2f0a movel %a2,%sp@- 4b828: 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() ) 4b82c: 4a39 0005 d794 tstb 5d794 4b832: 665c bnes 4b890 <_RTEMS_tasks_Create_extension+0x6e> 4b834: 701e moveq #30,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4b836: 2f00 movel %d0,%sp@- 4b838: 4eb9 0004 91f4 jsr 491f4 <_Workspace_Allocate> if ( !api ) 4b83e: 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 ); 4b840: 2040 moveal %d0,%a0 if ( !api ) 4b842: 4a80 tstl %d0 4b844: 675c beqs 4b8a2 <_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; 4b846: 42aa 011a clrl %a2@(282) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4b84a: 4200 clrb %d0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4b84c: 2548 010a movel %a0,%a2@(266) 4b850: 1140 0008 moveb %d0,%a0@(8) api->pending_events = EVENT_SETS_NONE_PENDING; 4b854: 4290 clrl %a0@ api->event_condition = 0; 4b856: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4b85a: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4b85e: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4b862: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4b866: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4b86a: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 4b86e: 4a39 0005 d794 tstb 5d794 4b874: 6710 beqs 4b886 <_RTEMS_tasks_Create_extension+0x64> 4b876: 41e8 001e lea %a0@(30),%a0 4b87a: 4280 clrl %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4b87c: 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++) 4b87e: 5280 addql #1,%d0 4b880: 7210 moveq #16,%d1 4b882: b280 cmpl %d0,%d1 4b884: 66f6 bnes 4b87c <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4b886: 246e fffc moveal %fp@(-4),%a2 4b88a: 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++) 4b88c: 7001 moveq #1,%d0 api->Notepads[i] = 0; } return true; } 4b88e: 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() ) 4b890: 705e moveq #94,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4b892: 2f00 movel %d0,%sp@- 4b894: 4eb9 0004 91f4 jsr 491f4 <_Workspace_Allocate> if ( !api ) 4b89a: 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 ); 4b89c: 2040 moveal %d0,%a0 if ( !api ) 4b89e: 4a80 tstl %d0 4b8a0: 66a4 bnes 4b846 <_RTEMS_tasks_Create_extension+0x24> for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4b8a2: 246e fffc moveal %fp@(-4),%a2 4b8a6: 4e5e unlk %fp if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) 4b8a8: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 00046150 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46150: 4e56 ffe4 linkw %fp,#-28 46154: 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; 46158: 2479 0005 d7ba moveal 5d7ba ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 4615e: 2639 0005 d7b6 movel 5d7b6 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46164: 4a8a tstl %a2 46166: 6754 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46168: 4a83 tstl %d3 4616a: 6750 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 4616c: 280e movel %fp,%d4 4616e: 4282 clrl %d2 46170: 5984 subql #4,%d4 46172: 47f9 0004 5f24 lea 45f24 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46178: 49f9 0004 61d8 lea 461d8 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 4617e: 2f04 movel %d4,%sp@- 46180: 2f2a 000c movel %a2@(12),%sp@- 46184: 2f2a 0014 movel %a2@(20),%sp@- 46188: 2f2a 0004 movel %a2@(4),%sp@- 4618c: 2f2a 0008 movel %a2@(8),%sp@- 46190: 2f12 movel %a2@,%sp@- 46192: 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 ) ) 46194: 4fef 0018 lea %sp@(24),%sp 46198: 4a80 tstl %d0 4619a: 662a bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 4619c: 2f2a 0018 movel %a2@(24),%sp@- 461a0: 2f2a 0010 movel %a2@(16),%sp@- 461a4: 2f2e fffc movel %fp@(-4),%sp@- 461a8: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 461aa: 4fef 000c lea %sp@(12),%sp 461ae: 4a80 tstl %d0 461b0: 6614 bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 461b2: 5282 addql #1,%d2 461b4: 45ea 001c lea %a2@(28),%a2 461b8: b483 cmpl %d3,%d2 461ba: 65c2 bcss 4617e <_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 ); } } 461bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 461c2: 4e5e unlk %fp 461c4: 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 ); 461c6: 2f00 movel %d0,%sp@- 461c8: 4878 0001 pea 1 461cc: 4878 0001 pea 1 461d0: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> ... =============================================================================== 0004b75e <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4b75e: 4e56 ffec linkw %fp,#-20 4b762: 206e 0008 moveal %fp@(8),%a0 4b766: 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 ]; 4b76a: 2468 010a moveal %a0@(266),%a2 if ( !api ) 4b76e: 4a8a tstl %a2 4b770: 671a beqs 4b78c <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4b772: 203c 0000 0700 movel #1792,%d0 4b778: 40c1 movew %sr,%d1 4b77a: 8081 orl %d1,%d0 4b77c: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4b77e: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4b782: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4b786: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4b788: 4a82 tstl %d2 4b78a: 660a bnes 4b796 <_RTEMS_tasks_Post_switch_extension+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4b78c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b792: 4e5e unlk %fp 4b794: 4e75 rts if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4b796: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4b79a: 260e movel %fp,%d3 4b79c: 5983 subql #4,%d3 4b79e: 47f9 0004 db68 lea 4db68 ,%a3 4b7a4: 2f03 movel %d3,%sp@- 4b7a6: 2f3c 0000 ffff movel #65535,%sp@- 4b7ac: 2f2a 000e movel %a2@(14),%sp@- 4b7b0: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4b7b2: 2f02 movel %d2,%sp@- 4b7b4: 206a 000a moveal %a2@(10),%a0 4b7b8: 4e90 jsr %a0@ asr->nest_level -= 1; 4b7ba: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4b7be: 2f03 movel %d3,%sp@- 4b7c0: 2f3c 0000 ffff movel #65535,%sp@- 4b7c6: 2f2e fffc movel %fp@(-4),%sp@- 4b7ca: 4e93 jsr %a3@ 4b7cc: 4fef 001c lea %sp@(28),%sp } 4b7d0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b7d6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b6ba <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4b6ba: 4e56 0000 linkw %fp,#0 4b6be: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4b6c2: 2068 011a moveal %a0@(282),%a0 while (tvp) { 4b6c6: 4a88 tstl %a0 4b6c8: 6712 beqs 4b6dc <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4b6ca: 2268 0004 moveal %a0@(4),%a1 4b6ce: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4b6d2: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4b6d6: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4b6d8: 4a88 tstl %a0 4b6da: 66ee bnes 4b6ca <_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; 4b6dc: 206e 000c moveal %fp@(12),%a0 4b6e0: 2068 011a moveal %a0@(282),%a0 while (tvp) { 4b6e4: 4a88 tstl %a0 4b6e6: 6712 beqs 4b6fa <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4b6e8: 2268 0004 moveal %a0@(4),%a1 4b6ec: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4b6f0: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4b6f4: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4b6f6: 4a88 tstl %a0 4b6f8: 66ee bnes 4b6e8 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4b6fa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047224 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 47224: 4e56 fffc linkw %fp,#-4 47228: 2f0a movel %a2,%sp@- 4722a: 486e fffc pea %fp@(-4) 4722e: 2f2e 0008 movel %fp@(8),%sp@- 47232: 4879 0006 0fc0 pea 60fc0 <_Rate_monotonic_Information> 47238: 4eb9 0004 9074 jsr 49074 <_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 ) { 4723e: 4fef 000c lea %sp@(12),%sp 47242: 2440 moveal %d0,%a2 47244: 4aae fffc tstl %fp@(-4) 47248: 6636 bnes 47280 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 4724a: 206a 0040 moveal %a2@(64),%a0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 4724e: 2028 0010 movel %a0@(16),%d0 47252: 0280 0000 4000 andil #16384,%d0 47258: 670a beqs 47264 <_Rate_monotonic_Timeout+0x40> the_thread->Wait.id == the_period->Object.id ) { 4725a: 202a 0008 movel %a2@(8),%d0 4725e: b0a8 0020 cmpl %a0@(32),%d0 47262: 675e beqs 472c2 <_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 ) { 47264: 7001 moveq #1,%d0 47266: b0aa 0038 cmpl %a2@(56),%d0 4726a: 671c beqs 47288 <_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; 4726c: 7004 moveq #4,%d0 4726e: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47272: 2039 0006 10c4 movel 610c4 <_Thread_Dispatch_disable_level>,%d0 47278: 5380 subql #1,%d0 4727a: 23c0 0006 10c4 movel %d0,610c4 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 47280: 246e fff8 moveal %fp@(-8),%a2 47284: 4e5e unlk %fp 47286: 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; 47288: 103c 0003 moveb #3,%d0 4728c: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 47290: 2f0a movel %a2,%sp@- 47292: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47298: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4729e: 486a 0010 pea %a2@(16) 472a2: 4879 0006 119c pea 6119c <_Watchdog_Ticks_chain> 472a8: 4eb9 0004 abcc jsr 4abcc <_Watchdog_Insert> 472ae: 4fef 000c lea %sp@(12),%sp 472b2: 2039 0006 10c4 movel 610c4 <_Thread_Dispatch_disable_level>,%d0 472b8: 5380 subql #1,%d0 472ba: 23c0 0006 10c4 movel %d0,610c4 <_Thread_Dispatch_disable_level> 472c0: 60be bras 47280 <_Rate_monotonic_Timeout+0x5c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 472c2: 2f3c 1003 fff8 movel #268697592,%sp@- 472c8: 2f08 movel %a0,%sp@- 472ca: 4eb9 0004 9530 jsr 49530 <_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 ); 472d0: 2f0a movel %a2,%sp@- 472d2: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 472d8: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 472de: 486a 0010 pea %a2@(16) 472e2: 4879 0006 119c pea 6119c <_Watchdog_Ticks_chain> 472e8: 4eb9 0004 abcc jsr 4abcc <_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 ) && 472ee: 4fef 0014 lea %sp@(20),%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 472f2: 2039 0006 10c4 movel 610c4 <_Thread_Dispatch_disable_level>,%d0 472f8: 5380 subql #1,%d0 472fa: 23c0 0006 10c4 movel %d0,610c4 <_Thread_Dispatch_disable_level> 47300: 6000 ff7e braw 47280 <_Rate_monotonic_Timeout+0x5c> =============================================================================== 000485c8 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 485c8: 4e56 0000 linkw %fp,#0 485cc: 2039 0006 9598 movel 69598 <_Thread_Dispatch_disable_level>,%d0 485d2: 5280 addql #1,%d0 485d4: 2f0a movel %a2,%sp@- 485d6: 246e 0008 moveal %fp@(8),%a2 485da: 23c0 0006 9598 movel %d0,69598 <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 485e0: 2039 0006 962a movel 6962a <_TOD_Now>,%d0 if ( time->tv_sec < seconds ) 485e6: 2212 movel %a2@,%d1 485e8: b280 cmpl %d0,%d1 485ea: 6d38 blts 48624 <_TOD_Set+0x5c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 485ec: 9280 subl %d0,%d1 485ee: 2f01 movel %d1,%sp@- 485f0: 42a7 clrl %sp@- 485f2: 4879 0006 9664 pea 69664 <_Watchdog_Seconds_chain> 485f8: 4eb9 0004 acbc jsr 4acbc <_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 ); 485fe: 23d2 0006 962a movel %a2@,6962a <_TOD_Now> 48604: 588a addql #4,%a2 48606: 4fef 000c lea %sp@(12),%sp 4860a: 23d2 0006 962e movel %a2@,6962e <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 48610: 246e fffc moveal %fp@(-4),%a2 48614: 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; 48616: 7001 moveq #1,%d0 48618: 13c0 0006 95ac moveb %d0,695ac <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 4861e: 4ef9 0004 9910 jmp 49910 <_Thread_Enable_dispatch> 48624: 9081 subl %d1,%d0 48626: 2f00 movel %d0,%sp@- 48628: 4878 0001 pea 1 4862c: 4879 0006 9664 pea 69664 <_Watchdog_Seconds_chain> 48632: 4eb9 0004 acbc jsr 4acbc <_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 ); 48638: 23d2 0006 962a movel %a2@,6962a <_TOD_Now> 4863e: 588a addql #4,%a2 48640: 4fef 000c lea %sp@(12),%sp 48644: 23d2 0006 962e movel %a2@,6962e <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 4864a: 246e fffc moveal %fp@(-4),%a2 4864e: 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; 48650: 7001 moveq #1,%d0 48652: 13c0 0006 95ac moveb %d0,695ac <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 48658: 4ef9 0004 9910 jmp 49910 <_Thread_Enable_dispatch> ... =============================================================================== 00046c3c <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46c3c: 4e56 0000 linkw %fp,#0 46c40: 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(); 46c44: 2039 0006 0020 movel 60020 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46c4a: 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) || 46c4c: 4a88 tstl %a0 46c4e: 6762 beqs 46cb2 <_TOD_Validate+0x76> <== NEVER TAKEN 46c50: 243c 000f 4240 movel #1000000,%d2 46c56: 4c40 2002 remul %d0,%d2,%d2 (the_tod->ticks >= ticks_per_second) || 46c5a: b4a8 0018 cmpl %a0@(24),%d2 46c5e: 6352 blss 46cb2 <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 46c60: 703b moveq #59,%d0 46c62: b0a8 0014 cmpl %a0@(20),%d0 46c66: 654a bcss 46cb2 <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 46c68: b0a8 0010 cmpl %a0@(16),%d0 46c6c: 6544 bcss 46cb2 <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || 46c6e: 7217 moveq #23,%d1 46c70: b2a8 000c cmpl %a0@(12),%d1 46c74: 653c bcss 46cb2 <_TOD_Validate+0x76> (the_tod->month == 0) || 46c76: 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) || 46c7a: 6736 beqs 46cb2 <_TOD_Validate+0x76> <== NEVER TAKEN 46c7c: 740c moveq #12,%d2 46c7e: b480 cmpl %d0,%d2 46c80: 6530 bcss 46cb2 <_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) || 46c82: 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) || 46c84: 0c81 0000 07c3 cmpil #1987,%d1 46c8a: 6326 blss 46cb2 <_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) ) 46c8c: 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) || 46c90: 4a88 tstl %a0 46c92: 671e beqs 46cb2 <_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 ) 46c94: 143c 0003 moveb #3,%d2 46c98: c282 andl %d2,%d1 46c9a: 661e bnes 46cba <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 46c9c: 43f9 0005 ee0e lea 5ee0e <_TOD_Days_per_month>,%a1 46ca2: 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( 46ca6: b1c0 cmpal %d0,%a0 46ca8: 53c0 sls %d0 46caa: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46cac: 241f movel %sp@+,%d2 46cae: 4e5e unlk %fp 46cb0: 4e75 rts 46cb2: 241f movel %sp@+,%d2 46cb4: 4e5e unlk %fp * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 46cb6: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46cb8: 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 ]; 46cba: 43f9 0005 ee0e lea 5ee0e <_TOD_Days_per_month>,%a1 46cc0: 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( 46cc4: b1c0 cmpal %d0,%a0 46cc6: 53c0 sls %d0 46cc8: 4480 negl %d0 46cca: 60e0 bras 46cac <_TOD_Validate+0x70> =============================================================================== 0004789c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4789c: 4e56 fff0 linkw %fp,#-16 478a0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 478a4: 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 ); 478a8: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 478aa: 242e 000c movel %fp@(12),%d2 */ /* * Save original state */ original_state = the_thread->current_state; 478ae: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 478b2: 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 ); 478b6: 4eb9 0004 8834 jsr 48834 <_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 ) 478bc: 588f addql #4,%sp 478be: b4aa 0014 cmpl %a2@(20),%d2 478c2: 670c beqs 478d0 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 478c4: 2f02 movel %d2,%sp@- 478c6: 2f0a movel %a2,%sp@- 478c8: 4eb9 0004 86b0 jsr 486b0 <_Thread_Set_priority> 478ce: 508f addql #8,%sp _ISR_Disable( level ); 478d0: 203c 0000 0700 movel #1792,%d0 478d6: 40c1 movew %sr,%d1 478d8: 8081 orl %d1,%d0 478da: 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; 478dc: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 478e0: 7404 moveq #4,%d2 478e2: b480 cmpl %d0,%d2 478e4: 6738 beqs 4791e <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 478e6: 44c3 movew %d3,%ccr 478e8: 6708 beqs 478f2 <_Thread_Change_priority+0x56> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 478ea: 74fb moveq #-5,%d2 478ec: c480 andl %d0,%d2 478ee: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 478f2: 46c1 movew %d1,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 478f4: 0280 0003 bee0 andil #245472,%d0 478fa: 660a bnes 47906 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 478fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47902: 4e5e unlk %fp 47904: 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 ); 47906: 2d4a 000c movel %a2,%fp@(12) 4790a: 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 ); } 47910: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47916: 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 ); 47918: 4ef9 0004 8604 jmp 48604 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 4791e: 44c3 movew %d3,%ccr 47920: 673c beqs 4795e <_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; 47922: 206a 008e moveal %a2@(142),%a0 47926: 302a 0094 movew %a2@(148),%d0 4792a: 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 ); 4792c: 42aa 0010 clrl %a2@(16) 47930: 8082 orl %d2,%d0 47932: 3080 movew %d0,%a0@ _Priority_Major_bit_map |= the_priority_map->ready_major; 47934: 3439 0005 f028 movew 5f028 <_Priority_Major_bit_map>,%d2 4793a: 302a 0092 movew %a2@(146),%d0 4793e: 8082 orl %d2,%d0 47940: 33c0 0005 f028 movew %d0,5f028 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 47946: 4a04 tstb %d4 47948: 6700 0082 beqw 479cc <_Thread_Change_priority+0x130> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4794c: 206a 008a moveal %a2@(138),%a0 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 47950: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 47952: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 47956: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 47958: 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; 4795c: 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 ); 4795e: 203c 0000 0700 movel #1792,%d0 47964: 46c1 movew %d1,%sr 47966: 8081 orl %d1,%d0 47968: 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 ); 4796a: 3039 0005 f028 movew 5f028 <_Priority_Major_bit_map>,%d0 47970: 4840 swap %d0 47972: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 47974: 4282 clrl %d2 47976: 41f9 0005 f098 lea 5f098 <_Priority_Bit_map>,%a0 4797c: 3400 movew %d0,%d2 4797e: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 47982: 4840 swap %d0 47984: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47986: 4283 clrl %d3 47988: e98a lsll #4,%d2 4798a: 3600 movew %d0,%d3 4798c: 2279 0005 ef24 moveal 5ef24 <_Thread_Ready_chain>,%a1 47992: 2002 movel %d2,%d0 47994: d083 addl %d3,%d0 47996: 2400 movel %d0,%d2 47998: e58a lsll #2,%d2 4799a: 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 ); 4799c: 2079 0005 f032 moveal 5f032 <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 479a2: 93c2 subal %d2,%a1 479a4: 2031 0800 movel %a1@(00000000,%d0:l),%d0 479a8: 23c0 0005 f006 movel %d0,5f006 <_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() && 479ae: b1c0 cmpal %d0,%a0 479b0: 670e beqs 479c0 <_Thread_Change_priority+0x124> _Thread_Executing->is_preemptible ) 479b2: 4a28 0075 tstb %a0@(117) 479b6: 6708 beqs 479c0 <_Thread_Change_priority+0x124> _Context_Switch_necessary = true; 479b8: 7401 moveq #1,%d2 479ba: 13c2 0005 f042 moveb %d2,5f042 <_Context_Switch_necessary> _ISR_Enable( level ); 479c0: 46c1 movew %d1,%sr } 479c2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 479c8: 4e5e unlk %fp 479ca: 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 ); 479cc: 206a 008a moveal %a2@(138),%a0 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 479d0: 2008 movel %a0,%d0 479d2: 5880 addql #4,%d0 479d4: 2480 movel %d0,%a2@ old_last_node = the_chain->last; 479d6: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 479da: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 479de: 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; 479e2: 228a movel %a2,%a1@ 479e4: 6000 ff78 braw 4795e <_Thread_Change_priority+0xc2> =============================================================================== 000479e8 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 479e8: 327c 0700 moveaw #1792,%a1 479ec: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 479ee: 4e56 ffec linkw %fp,#-20 479f2: 206e 0008 moveal %fp@(8),%a0 479f6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 479fa: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 479fe: 40c3 movew %sr,%d3 47a00: 8083 orl %d3,%d0 47a02: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47a04: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47a08: 2002 movel %d2,%d0 47a0a: c081 andl %d1,%d0 47a0c: 6776 beqs 47a84 <_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); 47a0e: 2002 movel %d2,%d0 47a10: 4680 notl %d0 47a12: c081 andl %d1,%d0 current_state = 47a14: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 47a18: 666a bnes 47a84 <_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; 47a1a: 2868 008e moveal %a0@(142),%a4 47a1e: 3028 0094 movew %a0@(148),%d0 47a22: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 47a24: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47a28: 240a movel %a2,%d2 47a2a: 5882 addql #4,%d2 47a2c: 8081 orl %d1,%d0 47a2e: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 47a30: 266a 0008 moveal %a2@(8),%a3 47a34: 3880 movew %d0,%a4@ the_chain->last = the_node; 47a36: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 47a3a: 3239 0005 f028 movew 5f028 <_Priority_Major_bit_map>,%d1 47a40: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 47a44: 214b 0004 movel %a3,%a0@(4) 47a48: 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; 47a4a: 2688 movel %a0,%a3@ 47a4c: 33c0 0005 f028 movew %d0,5f028 <_Priority_Major_bit_map> _ISR_Flash( level ); 47a52: 2009 movel %a1,%d0 47a54: 46c3 movew %d3,%sr 47a56: 8083 orl %d3,%d0 47a58: 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 ) { 47a5a: 2028 0014 movel %a0@(20),%d0 47a5e: 2279 0005 f006 moveal 5f006 <_Thread_Heir>,%a1 47a64: b0a9 0014 cmpl %a1@(20),%d0 47a68: 641a bccs 47a84 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 47a6a: 23c8 0005 f006 movel %a0,5f006 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 47a70: 2079 0005 f032 moveal 5f032 <_Thread_Executing>,%a0 47a76: 4a28 0075 tstb %a0@(117) 47a7a: 6712 beqs 47a8e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a7c: 7001 moveq #1,%d0 47a7e: 13c0 0005 f042 moveb %d0,5f042 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a84: 46c3 movew %d3,%sr } 47a86: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a8a: 4e5e unlk %fp 47a8c: 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 || 47a8e: 4a80 tstl %d0 47a90: 66f2 bnes 47a84 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a92: 7001 moveq #1,%d0 <== NOT EXECUTED 47a94: 13c0 0005 f042 moveb %d0,5f042 <_Context_Switch_necessary> <== NOT EXECUTED 47a9a: 60e8 bras 47a84 <_Thread_Clear_state+0x9c> <== NOT EXECUTED =============================================================================== 00047a9c <_Thread_Close>: 47a9c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47a9e: 4e56 0000 linkw %fp,#0 47aa2: 2f0b movel %a3,%sp@- 47aa4: 266e 0008 moveal %fp@(8),%a3 47aa8: 2f0a movel %a2,%sp@- 47aaa: 246e 000c moveal %fp@(12),%a2 47aae: 206b 0018 moveal %a3@(24),%a0 47ab2: 302a 000a movew %a2@(10),%d0 47ab6: 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; 47aba: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 47ac0: 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 ); 47ac2: 2f0a movel %a2,%sp@- 47ac4: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> 47aca: 4eb9 0004 8e90 jsr 48e90 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47ad0: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 47ad6: 5280 addql #1,%d0 47ad8: 23c0 0005 ef78 movel %d0,5ef78 <_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 ); 47ade: 2f0a movel %a2,%sp@- 47ae0: 2f0b movel %a3,%sp@- 47ae2: 4eb9 0004 7120 jsr 47120 <_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 ); 47ae8: 4878 0001 pea 1 47aec: 2f0a movel %a2,%sp@- 47aee: 4eb9 0004 8720 jsr 48720 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47af4: 2f0a movel %a2,%sp@- 47af6: 4eb9 0004 852c jsr 4852c <_Thread_queue_Extract_with_proxy> 47afc: 4fef 0018 lea %sp@(24),%sp 47b00: 4a00 tstb %d0 47b02: 6608 bnes 47b0c <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47b04: 7002 moveq #2,%d0 47b06: b0aa 0050 cmpl %a2@(80),%d0 47b0a: 6756 beqs 47b62 <_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 ) ) 47b0c: b5f9 0005 effe cmpal 5effe <_Thread_Allocated_fp>,%a2 47b12: 6746 beqs 47b5a <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47b14: 202a 00c6 movel %a2@(198),%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; 47b18: 42aa 0102 clrl %a2@(258) if ( the_thread->Start.fp_context ) 47b1c: 4a80 tstl %d0 47b1e: 670a beqs 47b2a <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47b20: 2f00 movel %d0,%sp@- 47b22: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 47b28: 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 ); 47b2a: 2f0a movel %a2,%sp@- 47b2c: 4eb9 0004 891c jsr 4891c <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47b32: 202a 0116 movel %a2@(278),%d0 47b36: 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; 47b38: 42aa 00ca clrl %a2@(202) if ( the_thread->extensions ) 47b3c: 4a80 tstl %d0 47b3e: 670a beqs 47b4a <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47b40: 2f00 movel %d0,%sp@- 47b42: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 47b48: 588f addql #4,%sp the_thread->extensions = NULL; 47b4a: 42aa 0116 clrl %a2@(278) } 47b4e: 246e fff8 moveal %fp@(-8),%a2 47b52: 266e fffc moveal %fp@(-4),%a3 47b56: 4e5e unlk %fp 47b58: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47b5a: 42b9 0005 effe clrl 5effe <_Thread_Allocated_fp> 47b60: 60b2 bras 47b14 <_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 ); 47b62: 486a 0048 pea %a2@(72) 47b66: 4eb9 0004 90a4 jsr 490a4 <_Watchdog_Remove> 47b6c: 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 ) ) 47b6e: b5f9 0005 effe cmpal 5effe <_Thread_Allocated_fp>,%a2 47b74: 669e bnes 47b14 <_Thread_Close+0x78> <== ALWAYS TAKEN 47b76: 60e2 bras 47b5a <_Thread_Close+0xbe> <== NOT EXECUTED =============================================================================== 00047c28 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 47c28: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47c2c: 486e fffc pea %fp@(-4) 47c30: 2f2e 0008 movel %fp@(8),%sp@- 47c34: 4eb9 0004 7de4 jsr 47de4 <_Thread_Get> switch ( location ) { 47c3a: 508f addql #8,%sp 47c3c: 4aae fffc tstl %fp@(-4) 47c40: 661e bnes 47c60 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 47c42: 2f3c 1000 0018 movel #268435480,%sp@- 47c48: 2f00 movel %d0,%sp@- 47c4a: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> 47c50: 508f addql #8,%sp 47c52: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 47c58: 5380 subql #1,%d0 47c5a: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 47c60: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047c64 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 47c64: 4e56 ffc8 linkw %fp,#-56 47c68: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 47c6c: 2e3c 0000 0700 movel #1792,%d7 47c72: 2007 movel %d7,%d0 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 47c74: 2479 0005 f032 moveal 5f032 <_Thread_Executing>,%a2 _ISR_Disable( level ); 47c7a: 40c1 movew %sr,%d1 47c7c: 8081 orl %d1,%d0 47c7e: 46c0 movew %d0,%sr while ( _Context_Switch_necessary == true ) { 47c80: 1039 0005 f042 moveb 5f042 <_Context_Switch_necessary>,%d0 47c86: 6700 00fa beqw 47d82 <_Thread_Dispatch+0x11e> 47c8a: 260e movel %fp,%d3 47c8c: 240e movel %fp,%d2 47c8e: 5183 subql #8,%d3 47c90: 2c3c 0004 bc24 movel #310308,%d6 47c96: 0682 ffff fff0 addil #-16,%d2 47c9c: 2a3c 0004 8c5c movel #298076,%d5 47ca2: 283c 0004 8c14 movel #298004,%d4 47ca8: 4bf9 0004 8f1c lea 48f1c <_User_extensions_Thread_switch>,%a5 47cae: 49f9 0004 9290 lea 49290 <_CPU_Context_switch>,%a4 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 47cb4: 7001 moveq #1,%d0 47cb6: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 47cbc: 2679 0005 f006 moveal 5f006 <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 47cc2: 4200 clrb %d0 _Thread_Executing = heir; 47cc4: 23cb 0005 f032 movel %a3,5f032 <_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; 47cca: 13c0 0005 f042 moveb %d0,5f042 <_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 ) 47cd0: 7001 moveq #1,%d0 47cd2: b0ab 007a cmpl %a3@(122),%d0 47cd6: 6700 00d6 beqw 47dae <_Thread_Dispatch+0x14a> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 47cda: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47cdc: 2f03 movel %d3,%sp@- 47cde: 2046 moveal %d6,%a0 47ce0: 4e90 jsr %a0@ _Timestamp_Subtract( 47ce2: 2045 moveal %d5,%a0 47ce4: 2f02 movel %d2,%sp@- 47ce6: 2f03 movel %d3,%sp@- 47ce8: 4879 0005 f03a pea 5f03a <_Thread_Time_of_last_context_switch> 47cee: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47cf0: 2044 moveal %d4,%a0 47cf2: 2f02 movel %d2,%sp@- 47cf4: 486a 0082 pea %a2@(130) 47cf8: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47cfa: 2079 0005 f002 moveal 5f002 <_Thread_libc_reent>,%a0 47d00: 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; 47d04: 202e fff8 movel %fp@(-8),%d0 47d08: 222e fffc movel %fp@(-4),%d1 47d0c: 23c0 0005 f03a movel %d0,5f03a <_Thread_Time_of_last_context_switch> 47d12: 23c1 0005 f03e movel %d1,5f03e <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47d18: 4a88 tstl %a0 47d1a: 6708 beqs 47d24 <_Thread_Dispatch+0xc0> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 47d1c: 2550 0106 movel %a0@,%a2@(262) *_Thread_libc_reent = heir->libc_reent; 47d20: 20ab 0106 movel %a3@(262),%a0@ } _User_extensions_Thread_switch( executing, heir ); 47d24: 2f0b movel %a3,%sp@- 47d26: 2f0a movel %a2,%sp@- 47d28: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 47d2a: 486b 00ce pea %a3@(206) 47d2e: 486a 00ce pea %a2@(206) 47d32: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 47d34: 4fef 0010 lea %sp@(16),%sp 47d38: 4aaa 0102 tstl %a2@(258) 47d3c: 672c beqs 47d6a <_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 ); 47d3e: 2079 0005 effe moveal 5effe <_Thread_Allocated_fp>,%a0 47d44: b1ca cmpal %a2,%a0 47d46: 6722 beqs 47d6a <_Thread_Dispatch+0x106> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 47d48: 4a88 tstl %a0 47d4a: 670c beqs 47d58 <_Thread_Dispatch+0xf4> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 47d4c: 4868 0102 pea %a0@(258) 47d50: 4eb9 0004 93c6 jsr 493c6 <_CPU_Context_save_fp> 47d56: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 47d58: 486a 0102 pea %a2@(258) 47d5c: 4eb9 0004 93fe jsr 493fe <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 47d62: 588f addql #4,%sp 47d64: 23ca 0005 effe movel %a2,5effe <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 47d6a: 2479 0005 f032 moveal 5f032 <_Thread_Executing>,%a2 _ISR_Disable( level ); 47d70: 2007 movel %d7,%d0 47d72: 40c1 movew %sr,%d1 47d74: 8081 orl %d1,%d0 47d76: 46c0 movew %d0,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 47d78: 1039 0005 f042 moveb 5f042 <_Context_Switch_necessary>,%d0 47d7e: 6600 ff34 bnew 47cb4 <_Thread_Dispatch+0x50> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 47d82: 42b9 0005 ef78 clrl 5ef78 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 47d88: 46c1 movew %d1,%sr if ( _Thread_Do_post_task_switch_extension || 47d8a: 4ab9 0005 f01a tstl 5f01a <_Thread_Do_post_task_switch_extension> 47d90: 6606 bnes 47d98 <_Thread_Dispatch+0x134> executing->do_post_task_switch_extension ) { 47d92: 4a2a 0074 tstb %a2@(116) 47d96: 670c beqs 47da4 <_Thread_Dispatch+0x140> executing->do_post_task_switch_extension = false; 47d98: 4201 clrb %d1 47d9a: 1541 0074 moveb %d1,%a2@(116) _API_extensions_Run_postswitch(); 47d9e: 4eb9 0004 6650 jsr 46650 <_API_extensions_Run_postswitch> } } 47da4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47daa: 4e5e unlk %fp 47dac: 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; 47dae: 41f9 0005 ef28 lea 5ef28 <_Thread_Ticks_per_timeslice>,%a0 47db4: 2750 0076 movel %a0@,%a3@(118) 47db8: 6000 ff20 braw 47cda <_Thread_Dispatch+0x76> =============================================================================== 00047dbc <_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 ) { 47dbc: 4e56 0000 linkw %fp,#0 if ( --_Thread_Dispatch_disable_level ) 47dc0: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 47dc6: 5380 subql #1,%d0 47dc8: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> 47dce: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 47dd4: 6704 beqs 47dda <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 47dd6: 4e5e unlk %fp 47dd8: 4e75 rts 47dda: 4e5e unlk %fp (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 47ddc: 4ef9 0004 7c64 jmp 47c64 <_Thread_Dispatch> ... =============================================================================== 0004dfd0 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4dfd0: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4dfd4: 2079 0005 f032 moveal 5f032 <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4dfda: 4aa8 0010 tstl %a0@(16) 4dfde: 660e bnes 4dfee <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN 4dfe0: b1f9 0005 f006 cmpal 5f006 <_Thread_Heir>,%a0 4dfe6: 6712 beqs 4dffa <_Thread_Evaluate_mode+0x2a> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4dfe8: 4a28 0075 tstb %a0@(117) 4dfec: 670c beqs 4dffa <_Thread_Evaluate_mode+0x2a> <== NEVER TAKEN _Context_Switch_necessary = true; return true; } return false; } 4dfee: 4e5e unlk %fp executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; 4dff0: 7001 moveq #1,%d0 4dff2: 13c0 0005 f042 moveb %d0,5f042 <_Context_Switch_necessary> return true; } return false; } 4dff8: 4e75 rts 4dffa: 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; 4dffc: 4200 clrb %d0 <== NOT EXECUTED } return false; } =============================================================================== 0004e000 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e000: 4e56 0000 linkw %fp,#0 4e004: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4e006: 2479 0005 f032 moveal 5f032 <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e00c: 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; 4e00e: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4e012: 40c0 movew %sr,%d0 4e014: e189 lsll #8,%d1 4e016: 0280 0000 f8ff andil #63743,%d0 4e01c: 8081 orl %d1,%d0 4e01e: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4e020: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4e022: 1439 0005 e728 moveb 5e728 ,%d2 doneConstructors = 1; 4e028: 13c0 0005 e728 moveb %d0,5e728 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4e02e: 4aaa 0102 tstl %a2@(258) 4e032: 6720 beqs 4e054 <_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 ); 4e034: 2079 0005 effe moveal 5effe <_Thread_Allocated_fp>,%a0 4e03a: b1ca cmpal %a2,%a0 4e03c: 6716 beqs 4e054 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4e03e: 4a88 tstl %a0 4e040: 670c beqs 4e04e <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4e042: 4868 0102 pea %a0@(258) 4e046: 4eb9 0004 93c6 jsr 493c6 <_CPU_Context_save_fp> 4e04c: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4e04e: 23ca 0005 effe movel %a2,5effe <_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 ); 4e054: 2f0a movel %a2,%sp@- 4e056: 4eb9 0004 8d74 jsr 48d74 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4e05c: 4eb9 0004 7dbc jsr 47dbc <_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) */ { 4e062: 588f addql #4,%sp 4e064: 4a02 tstb %d2 4e066: 6724 beqs 4e08c <_Thread_Handler+0x8c> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e068: 202a 009e movel %a2@(158),%d0 4e06c: 672a beqs 4e098 <_Thread_Handler+0x98> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4e06e: 7201 moveq #1,%d1 4e070: b280 cmpl %d0,%d1 4e072: 674c beqs 4e0c0 <_Thread_Handler+0xc0> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4e074: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e076: 4eb9 0004 8db2 jsr 48db2 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4e07c: 4878 0006 pea 6 <== NOT EXECUTED 4e080: 4878 0001 pea 1 <== NOT EXECUTED 4e084: 42a7 clrl %sp@- <== NOT EXECUTED 4e086: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4e08c: 4eb9 0005 bc38 jsr 5bc38 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e092: 202a 009e movel %a2@(158),%d0 4e096: 66d6 bnes 4e06e <_Thread_Handler+0x6e> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4e098: 2f2a 00a6 movel %a2@(166),%sp@- 4e09c: 206a 009a moveal %a2@(154),%a0 4e0a0: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4e0a2: 588f addql #4,%sp 4e0a4: 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 ); 4e0a8: 2f0a movel %a2,%sp@- 4e0aa: 4eb9 0004 8db2 jsr 48db2 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e0b0: 4878 0006 pea 6 4e0b4: 4878 0001 pea 1 4e0b8: 42a7 clrl %sp@- 4e0ba: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4e0c0: 2f2a 00a2 movel %a2@(162),%sp@- 4e0c4: 206a 009a moveal %a2@(154),%a0 4e0c8: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4e0ca: 588f addql #4,%sp 4e0cc: 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 ); 4e0d0: 2f0a movel %a2,%sp@- 4e0d2: 4eb9 0004 8db2 jsr 48db2 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e0d8: 4878 0006 pea 6 <== NOT EXECUTED 4e0dc: 4878 0001 pea 1 <== NOT EXECUTED 4e0e0: 42a7 clrl %sp@- <== NOT EXECUTED 4e0e2: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> <== NOT EXECUTED =============================================================================== 000480d8 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 480d8: 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) 480dc: 4ab9 0005 d7e8 tstl 5d7e8 480e2: 57c0 seq %d0 480e4: 4ab9 0005 d7e4 tstl 5d7e4 480ea: 57c1 seq %d1 480ec: 4480 negl %d0 480ee: 4481 negl %d1 480f0: b380 eorl %d1,%d0 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 480f2: 2239 0005 d7d4 movel 5d7d4 ,%d1 maximum_extensions = Configuration.maximum_extensions; 480f8: 2079 0005 d7cc moveal 5d7cc ,%a0 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 480fe: 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) 48100: 4a00 tstb %d0 48102: 6600 00a2 bnew 481a6 <_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( 48106: 4280 clrl %d0 48108: 1039 0005 d7c2 moveb 5d7c2 ,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 4810e: 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( 48110: 5280 addql #1,%d0 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 48112: 23c1 0005 ef28 movel %d1,5ef28 <_Thread_Ticks_per_timeslice> _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48118: 2200 movel %d0,%d1 4811a: e588 lsll #2,%d0 4811c: e989 lsll #4,%d1 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 4811e: 23c8 0005 f016 movel %a0,5f016 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48124: 9280 subl %d0,%d1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 48126: 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( 48128: 2f01 movel %d1,%sp@- INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 4812a: 13c0 0005 f042 moveb %d0,5f042 <_Context_Switch_necessary> _Thread_Executing = NULL; 48130: 42b9 0005 f032 clrl 5f032 <_Thread_Executing> _Thread_Heir = NULL; 48136: 42b9 0005 f006 clrl 5f006 <_Thread_Heir> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 4813c: 42b9 0005 effe clrl 5effe <_Thread_Allocated_fp> #endif _Thread_Do_post_task_switch_extension = 0; 48142: 42b9 0005 f01a clrl 5f01a <_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( 48148: 4eb9 0004 91c0 jsr 491c0 <_Workspace_Allocate_or_fatal_error> (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 4814e: 588f addql #4,%sp 48150: 1439 0005 d7c2 moveb 5d7c2 ,%d2 48156: 2040 moveal %d0,%a0 48158: 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( 4815a: 23c0 0005 ef24 movel %d0,5ef24 <_Thread_Ready_chain> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48160: 2008 movel %a0,%d0 48162: 5880 addql #4,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48164: 5281 addql #1,%d1 48166: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 48168: 42a8 0004 clrl %a0@(4) the_chain->last = _Chain_Head(the_chain); 4816c: 2148 0008 movel %a0,%a0@(8) 48170: 41e8 000c lea %a0@(12),%a0 48174: b481 cmpl %d1,%d2 48176: 64e8 bccs 48160 <_Thread_Handler_initialization+0x88> /* * Initialize this class of objects. */ _Objects_Initialize_information( 48178: 4878 0008 pea 8 4817c: 42a7 clrl %sp@- 4817e: 4878 011e pea 11e 48182: 4878 0001 pea 1 48186: 4878 0001 pea 1 4818a: 4878 0001 pea 1 4818e: 4879 0005 f0c6 pea 5f0c6 <_Thread_Internal_information> 48194: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4819a: 242e fffc movel %fp@(-4),%d2 /* * Initialize this class of objects. */ _Objects_Initialize_information( 4819e: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 481a2: 4e5e unlk %fp 481a4: 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( 481a6: 4878 000f pea f 481aa: 4878 0001 pea 1 481ae: 42a7 clrl %sp@- 481b0: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> ... =============================================================================== 00047e80 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e80: 4e56 ffe8 linkw %fp,#-24 47e84: 202e 0010 movel %fp@(16),%d0 47e88: 48d7 047c moveml %d2-%d6/%a2,%sp@ 47e8c: 246e 000c moveal %fp@(12),%a2 47e90: 282e 0014 movel %fp@(20),%d4 47e94: 242e 001c movel %fp@(28),%d2 47e98: 262e 0024 movel %fp@(36),%d3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47e9c: 42aa 010a clrl %a2@(266) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47ea0: 1a2e 001b moveb %fp@(27),%d5 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47ea4: 42aa 010e clrl %a2@(270) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47ea8: 1c2e 0023 moveb %fp@(35),%d6 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47eac: 42aa 0112 clrl %a2@(274) extensions_area = NULL; the_thread->libc_reent = NULL; 47eb0: 42aa 0106 clrl %a2@(262) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 47eb4: 4a80 tstl %d0 47eb6: 6700 01f0 beqw 480a8 <_Thread_Initialize+0x228> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 47eba: 2204 movel %d4,%d1 47ebc: 4204 clrb %d4 47ebe: 1544 00bc moveb %d4,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 47ec2: 2540 00c2 movel %d0,%a2@(194) the_stack->size = size; 47ec6: 2541 00be movel %d1,%a2@(190) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 47eca: 4a05 tstb %d5 47ecc: 6600 017e bnew 4804c <_Thread_Initialize+0x1cc> 47ed0: 4280 clrl %d0 47ed2: 4285 clrl %d5 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47ed4: 2239 0005 f016 movel 5f016 <_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; 47eda: 2540 00c6 movel %d0,%a2@(198) 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; 47ede: 2540 0102 movel %d0,%a2@(258) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47ee2: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 47ee6: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 47eea: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 47eee: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47ef2: 4a81 tstl %d1 47ef4: 6600 0178 bnew 4806e <_Thread_Initialize+0x1ee> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 47ef8: 42aa 0116 clrl %a2@(278) 47efc: 4284 clrl %d4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 47efe: 2543 00ac movel %d3,%a2@(172) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 47f02: 7002 moveq #2,%d0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 47f04: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 47f0a: 1546 00aa moveb %d6,%a2@(170) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 47f0e: b083 cmpl %d3,%d0 47f10: 6700 00d6 beqw 47fe8 <_Thread_Initialize+0x168> #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 ); 47f14: 2f02 movel %d2,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 47f16: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 47f1c: 7001 moveq #1,%d0 #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 ); 47f1e: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47f20: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 47f24: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 47f28: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 47f2c: 2542 0018 movel %d2,%a2@(24) the_thread->Start.initial_priority = priority; 47f30: 2542 00b8 movel %d2,%a2@(184) _Thread_Set_priority( the_thread, priority ); 47f34: 4eb9 0004 86b0 jsr 486b0 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47f3a: 206e 0008 moveal %fp@(8),%a0 47f3e: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 47f40: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47f46: 2068 0018 moveal %a0@(24),%a0 47f4a: 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 ); 47f4e: 42aa 0082 clrl %a2@(130) 47f52: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 47f56: 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 ); 47f5a: 2f0a movel %a2,%sp@- 47f5c: 4eb9 0004 8e44 jsr 48e44 <_User_extensions_Thread_create> if ( extension_status ) 47f62: 4fef 000c lea %sp@(12),%sp 47f66: 4a00 tstb %d0 47f68: 6672 bnes 47fdc <_Thread_Initialize+0x15c> return true; failed: if ( the_thread->libc_reent ) 47f6a: 202a 0106 movel %a2@(262),%d0 47f6e: 670a beqs 47f7a <_Thread_Initialize+0xfa> _Workspace_Free( the_thread->libc_reent ); 47f70: 2f00 movel %d0,%sp@- 47f72: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 47f78: 588f addql #4,%sp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 47f7a: 202a 010a movel %a2@(266),%d0 47f7e: 670a beqs 47f8a <_Thread_Initialize+0x10a> _Workspace_Free( the_thread->API_Extensions[i] ); 47f80: 2f00 movel %d0,%sp@- 47f82: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 47f88: 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] ) 47f8a: 202a 010e movel %a2@(270),%d0 47f8e: 670a beqs 47f9a <_Thread_Initialize+0x11a> _Workspace_Free( the_thread->API_Extensions[i] ); 47f90: 2f00 movel %d0,%sp@- 47f92: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 47f98: 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] ) 47f9a: 202a 0112 movel %a2@(274),%d0 47f9e: 670a beqs 47faa <_Thread_Initialize+0x12a> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 47fa0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47fa2: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> <== NOT EXECUTED 47fa8: 588f addql #4,%sp <== NOT EXECUTED if ( extensions_area ) 47faa: 4a84 tstl %d4 47fac: 670a beqs 47fb8 <_Thread_Initialize+0x138> (void) _Workspace_Free( extensions_area ); 47fae: 2f04 movel %d4,%sp@- 47fb0: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 47fb6: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 47fb8: 4a85 tstl %d5 47fba: 670a beqs 47fc6 <_Thread_Initialize+0x146> (void) _Workspace_Free( fp_area ); 47fbc: 2f05 movel %d5,%sp@- 47fbe: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 47fc4: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 47fc6: 2f0a movel %a2,%sp@- 47fc8: 4eb9 0004 891c jsr 4891c <_Thread_Stack_Free> return false; 47fce: 588f addql #4,%sp } 47fd0: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 47fd6: 4200 clrb %d0 return false; } 47fd8: 4e5e unlk %fp 47fda: 4e75 rts 47fdc: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%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 ) 47fe2: 7001 moveq #1,%d0 _Thread_Stack_Free( the_thread ); return false; } 47fe4: 4e5e unlk %fp 47fe6: 4e75 rts case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 47fe8: 41f9 0005 ef28 lea 5ef28 <_Thread_Ticks_per_timeslice>,%a0 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47fee: 7001 moveq #1,%d0 case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 47ff0: 2550 0076 movel %a0@,%a2@(118) #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 ); 47ff4: 2f02 movel %d2,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 47ff6: 256e 002c 00b4 movel %fp@(44),%a2@(180) #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 ); 47ffc: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47ffe: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 48002: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 48006: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 4800a: 2542 0018 movel %d2,%a2@(24) the_thread->Start.initial_priority = priority; 4800e: 2542 00b8 movel %d2,%a2@(184) _Thread_Set_priority( the_thread, priority ); 48012: 4eb9 0004 86b0 jsr 486b0 <_Thread_Set_priority> 48018: 206e 0008 moveal %fp@(8),%a0 4801c: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4801e: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48024: 2068 0018 moveal %a0@(24),%a0 48028: 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 ); 4802c: 42aa 0082 clrl %a2@(130) 48030: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 48034: 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 ); 48038: 2f0a movel %a2,%sp@- 4803a: 4eb9 0004 8e44 jsr 48e44 <_User_extensions_Thread_create> if ( extension_status ) 48040: 4fef 000c lea %sp@(12),%sp 48044: 4a00 tstb %d0 48046: 6700 ff22 beqw 47f6a <_Thread_Initialize+0xea> 4804a: 6090 bras 47fdc <_Thread_Initialize+0x15c> /* * 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 ); 4804c: 4878 001c pea 1c 48050: 4eb9 0004 91f4 jsr 491f4 <_Workspace_Allocate> if ( !fp_area ) 48056: 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 ); 48058: 2a00 movel %d0,%d5 if ( !fp_area ) 4805a: 6600 fe78 bnew 47ed4 <_Thread_Initialize+0x54> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 4805e: 202a 0106 movel %a2@(262),%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 ) 48062: 4284 clrl %d4 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 48064: 4a80 tstl %d0 48066: 6600 ff08 bnew 47f70 <_Thread_Initialize+0xf0> 4806a: 6000 ff0e braw 47f7a <_Thread_Initialize+0xfa> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 4806e: e589 lsll #2,%d1 48070: 2041 moveal %d1,%a0 48072: 4868 0004 pea %a0@(4) 48076: 4eb9 0004 91f4 jsr 491f4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 4807c: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 4807e: 2800 movel %d0,%d4 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 48080: 6700 fee8 beqw 47f6a <_Thread_Initialize+0xea> goto failed; } the_thread->extensions = (void **) extensions_area; 48084: 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++ ) 48086: 4281 clrl %d1 48088: 4280 clrl %d0 4808a: 2279 0005 f016 moveal 5f016 <_Thread_Maximum_extensions>,%a1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 48090: 2544 0116 movel %d4,%a2@(278) * 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; 48094: 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++ ) 48098: 5280 addql #1,%d0 4809a: 2200 movel %d0,%d1 4809c: b089 cmpl %a1,%d0 4809e: 6200 fe5e bhiw 47efe <_Thread_Initialize+0x7e> 480a2: 206a 0116 moveal %a2@(278),%a0 480a6: 60ec bras 48094 <_Thread_Initialize+0x214> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 480a8: 2f04 movel %d4,%sp@- 480aa: 2f0a movel %a2,%sp@- 480ac: 4eb9 0004 88b8 jsr 488b8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 480b2: 508f addql #8,%sp return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 480b4: 2200 movel %d0,%d1 if ( !actual_stack_size || actual_stack_size < stack_size ) 480b6: 6712 beqs 480ca <_Thread_Initialize+0x24a> 480b8: b084 cmpl %d4,%d0 480ba: 650e bcss 480ca <_Thread_Initialize+0x24a> <== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 480bc: 202a 00ca movel %a2@(202),%d0 the_thread->Start.core_allocated_stack = true; 480c0: 7801 moveq #1,%d4 480c2: 1544 00bc moveb %d4,%a2@(188) 480c6: 6000 fdfa braw 47ec2 <_Thread_Initialize+0x42> _Thread_Stack_Free( the_thread ); return false; } 480ca: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 480d0: 4200 clrb %d0 } 480d2: 4e5e unlk %fp ... =============================================================================== 0004d100 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4d100: 4e56 0000 linkw %fp,#0 4d104: 2f0a movel %a2,%sp@- 4d106: 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; 4d10a: 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; 4d110: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4d116: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4d11c: 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; 4d122: 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; 4d128: 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 ) ) { 4d12c: 2f0a movel %a2,%sp@- 4d12e: 4eb9 0004 9140 jsr 49140 <_Thread_queue_Extract_with_proxy> 4d134: 588f addql #4,%sp 4d136: 4a00 tstb %d0 4d138: 6608 bnes 4d142 <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4d13a: 7002 moveq #2,%d0 4d13c: b0aa 0050 cmpl %a2@(80),%d0 4d140: 672a beqs 4d16c <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4d142: 202a 00b8 movel %a2@(184),%d0 4d146: b0aa 0014 cmpl %a2@(20),%d0 4d14a: 6718 beqs 4d164 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d14c: 2d4a 0008 movel %a2,%fp@(8) 4d150: 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; 4d154: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 4d158: 246e fffc moveal %fp@(-4),%a2 4d15c: 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 ); 4d15e: 4ef9 0004 9350 jmp 49350 <_Thread_Set_priority> } } 4d164: 246e fffc moveal %fp@(-4),%a2 4d168: 4e5e unlk %fp 4d16a: 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 ); 4d16c: 486a 0048 pea %a2@(72) 4d170: 4eb9 0004 9d88 jsr 49d88 <_Watchdog_Remove> 4d176: 588f addql #4,%sp 4d178: 60c8 bras 4d142 <_Thread_Reset+0x42> ... =============================================================================== 000492c4 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 492c4: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 492c6: 4e56 0000 linkw %fp,#0 492ca: 2f0a movel %a2,%sp@- 492cc: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 492d0: c0aa 0010 andl %a2@(16),%d0 492d4: 4a00 tstb %d0 492d6: 670a beqs 492e2 <_Thread_Restart+0x1e> return true; } return false; } 492d8: 246e fffc moveal %fp@(-4),%a2 492dc: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 492de: 4200 clrb %d0 return true; } return false; } 492e0: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 492e2: 2f0a movel %a2,%sp@- 492e4: 4eb9 0004 94d4 jsr 494d4 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 492ea: 2f2e 0010 movel %fp@(16),%sp@- 492ee: 2f2e 000c movel %fp@(12),%sp@- 492f2: 2f0a movel %a2,%sp@- 492f4: 4eb9 0004 d100 jsr 4d100 <_Thread_Reset> _Thread_Load_environment( the_thread ); 492fa: 2f0a movel %a2,%sp@- 492fc: 4eb9 0004 cd54 jsr 4cd54 <_Thread_Load_environment> _Thread_Ready( the_thread ); 49302: 2f0a movel %a2,%sp@- 49304: 4eb9 0004 d040 jsr 4d040 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 4930a: 2f0a movel %a2,%sp@- 4930c: 4eb9 0004 9b78 jsr 49b78 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 49312: 4fef 001c lea %sp@(28),%sp 49316: b5f9 0005 ffca cmpal 5ffca <_Thread_Executing>,%a2 4931c: 670a beqs 49328 <_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 ); 4931e: 7001 moveq #1,%d0 return true; } return false; } 49320: 246e fffc moveal %fp@(-4),%a2 49324: 4e5e unlk %fp 49326: 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 ) 49328: 4aaa 0102 tstl %a2@(258) 4932c: 6712 beqs 49340 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 4932e: 486a 0102 pea %a2@(258) 49332: 4eb9 0004 a0e2 jsr 4a0e2 <_CPU_Context_restore_fp> 49338: 2479 0005 ffca moveal 5ffca <_Thread_Executing>,%a2 4933e: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49340: 486a 00ce pea %a2@(206) 49344: 4eb9 0004 9f8a jsr 49f8a <_CPU_Context_Restart_self> 4934a: 588f addql #4,%sp <== NOT EXECUTED 4934c: 7001 moveq #1,%d0 <== NOT EXECUTED 4934e: 60d0 bras 49320 <_Thread_Restart+0x5c> <== NOT EXECUTED =============================================================================== 0004c84c <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c84c: 327c 0700 moveaw #1792,%a1 4c850: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c852: 4e56 ffec linkw %fp,#-20 4c856: 206e 0008 moveal %fp@(8),%a0 4c85a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c85e: 40c1 movew %sr,%d1 4c860: 8081 orl %d1,%d0 4c862: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c864: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c868: 0800 0001 btst #1,%d0 4c86c: 6774 beqs 4c8e2 <_Thread_Resume+0x96> <== NEVER TAKEN 4c86e: 74fd moveq #-3,%d2 4c870: c082 andl %d2,%d0 current_state = 4c872: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c876: 666a bnes 4c8e2 <_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; 4c878: 2868 008e moveal %a0@(142),%a4 4c87c: 3028 0094 movew %a0@(148),%d0 4c880: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c882: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c886: 260a movel %a2,%d3 4c888: 5883 addql #4,%d3 4c88a: 8082 orl %d2,%d0 4c88c: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c88e: 266a 0008 moveal %a2@(8),%a3 4c892: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c894: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c898: 3439 0006 4d10 movew 64d10 <_Priority_Major_bit_map>,%d2 4c89e: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c8a2: 214b 0004 movel %a3,%a0@(4) 4c8a6: 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; 4c8a8: 2688 movel %a0,%a3@ 4c8aa: 33c0 0006 4d10 movew %d0,64d10 <_Priority_Major_bit_map> _ISR_Flash( level ); 4c8b0: 2009 movel %a1,%d0 4c8b2: 46c1 movew %d1,%sr 4c8b4: 8081 orl %d1,%d0 4c8b6: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c8b8: 2028 0014 movel %a0@(20),%d0 4c8bc: 2279 0006 4cee moveal 64cee <_Thread_Heir>,%a1 4c8c2: b0a9 0014 cmpl %a1@(20),%d0 4c8c6: 641a bccs 4c8e2 <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c8c8: 23c8 0006 4cee movel %a0,64cee <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c8ce: 2079 0006 4d1a moveal 64d1a <_Thread_Executing>,%a0 4c8d4: 4a28 0075 tstb %a0@(117) 4c8d8: 6712 beqs 4c8ec <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c8da: 7001 moveq #1,%d0 4c8dc: 13c0 0006 4d2a moveb %d0,64d2a <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c8e2: 46c1 movew %d1,%sr } 4c8e4: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c8e8: 4e5e unlk %fp 4c8ea: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c8ec: 4a80 tstl %d0 4c8ee: 66f2 bnes 4c8e2 <_Thread_Resume+0x96> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c8f0: 7001 moveq #1,%d0 <== NOT EXECUTED 4c8f2: 13c0 0006 4d2a moveb %d0,64d2a <_Context_Switch_necessary> <== NOT EXECUTED 4c8f8: 60e8 bras 4c8e2 <_Thread_Resume+0x96> <== NOT EXECUTED ... =============================================================================== 000489f8 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 489f8: 203c 0000 0700 movel #1792,%d0 */ void _Thread_Suspend( Thread_Control *the_thread ) { 489fe: 4e56 fff4 linkw %fp,#-12 48a02: 206e 0008 moveal %fp@(8),%a0 48a06: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 48a0a: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48a0e: 40c1 movew %sr,%d1 48a10: 8081 orl %d1,%d0 48a12: 46c0 movew %d0,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 48a14: 2028 0010 movel %a0@(16),%d0 48a18: 6642 bnes 48a5c <_Thread_Suspend+0x64> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 48a1a: 7002 moveq #2,%d0 if ( _Chain_Has_only_one_node( ready ) ) { 48a1c: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 48a20: 2140 0010 movel %d0,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 48a24: b491 cmpl %a1@,%d2 48a26: 6700 0098 beqw 48ac0 <_Thread_Suspend+0xc8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48a2a: 2250 moveal %a0@,%a1 previous = the_node->previous; 48a2c: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 48a30: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48a32: 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 ); 48a36: 203c 0000 0700 movel #1792,%d0 48a3c: 46c1 movew %d1,%sr 48a3e: 8081 orl %d1,%d0 48a40: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 48a42: b1f9 0005 f006 cmpal 5f006 <_Thread_Heir>,%a0 48a48: 6730 beqs 48a7a <_Thread_Suspend+0x82> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 48a4a: b1f9 0005 f032 cmpal 5f032 <_Thread_Executing>,%a0 48a50: 671c beqs 48a6e <_Thread_Suspend+0x76> <== NEVER TAKEN _Context_Switch_necessary = true; _ISR_Enable( level ); 48a52: 46c1 movew %d1,%sr } 48a54: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48a58: 4e5e unlk %fp 48a5a: 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 = 48a5c: 7402 moveq #2,%d2 48a5e: 8480 orl %d0,%d2 48a60: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 48a64: 46c1 movew %d1,%sr if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 48a66: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48a6a: 4e5e unlk %fp 48a6c: 4e75 rts if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 48a6e: 7401 moveq #1,%d2 48a70: 13c2 0005 f042 moveb %d2,5f042 <_Context_Switch_necessary> _ISR_Enable( level ); 48a76: 46c1 movew %d1,%sr 48a78: 60da bras 48a54 <_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 ); 48a7a: 3039 0005 f028 movew 5f028 <_Priority_Major_bit_map>,%d0 48a80: 4840 swap %d0 48a82: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 48a84: 4282 clrl %d2 48a86: 43f9 0005 f098 lea 5f098 <_Priority_Bit_map>,%a1 48a8c: 3400 movew %d0,%d2 48a8e: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 48a92: 4840 swap %d0 48a94: 04c0 ff1 %d0 48a96: 4283 clrl %d3 48a98: e98a lsll #4,%d2 48a9a: 3600 movew %d0,%d3 48a9c: 2279 0005 ef24 moveal 5ef24 <_Thread_Ready_chain>,%a1 48aa2: 2002 movel %d2,%d0 48aa4: d083 addl %d3,%d0 48aa6: 2400 movel %d0,%d2 48aa8: e58a lsll #2,%d2 48aaa: e988 lsll #4,%d0 48aac: 93c2 subal %d2,%a1 48aae: d3c0 addal %d0,%a1 48ab0: 23d1 0005 f006 movel %a1@,5f006 <_Thread_Heir> _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 48ab6: b1f9 0005 f032 cmpal 5f032 <_Thread_Executing>,%a0 48abc: 6694 bnes 48a52 <_Thread_Suspend+0x5a> <== NEVER TAKEN 48abe: 60ae bras 48a6e <_Thread_Suspend+0x76> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48ac0: 2009 movel %a1,%d0 48ac2: 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; 48ac4: 2468 008e moveal %a0@(142),%a2 48ac8: 2280 movel %d0,%a1@ 48aca: 3412 movew %a2@,%d2 48acc: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48ad0: 2349 0008 movel %a1,%a1@(8) 48ad4: 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; 48ad6: 42a9 0004 clrl %a1@(4) 48ada: 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 ); 48adc: 6600 ff58 bnew 48a36 <_Thread_Suspend+0x3e> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 48ae0: 3439 0005 f028 movew 5f028 <_Priority_Major_bit_map>,%d2 48ae6: 3028 0096 movew %a0@(150),%d0 48aea: c082 andl %d2,%d0 48aec: 33c0 0005 f028 movew %d0,5f028 <_Priority_Major_bit_map> } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 48af2: 203c 0000 0700 movel #1792,%d0 48af8: 46c1 movew %d1,%sr 48afa: 8081 orl %d1,%d0 48afc: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 48afe: b1f9 0005 f006 cmpal 5f006 <_Thread_Heir>,%a0 48b04: 6600 ff44 bnew 48a4a <_Thread_Suspend+0x52> 48b08: 6000 ff70 braw 48a7a <_Thread_Suspend+0x82> =============================================================================== 00048b0c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 48b0c: 4e56 0000 linkw %fp,#0 48b10: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 48b12: 2479 0005 f032 moveal 5f032 <_Thread_Executing>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 48b18: 4a2a 0075 tstb %a2@(117) 48b1c: 6720 beqs 48b3e <_Thread_Tickle_timeslice+0x32> return; if ( !_States_Is_ready( executing->current_state ) ) 48b1e: 4aaa 0010 tstl %a2@(16) 48b22: 661a bnes 48b3e <_Thread_Tickle_timeslice+0x32> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 48b24: 202a 007a movel %a2@(122),%d0 48b28: 7201 moveq #1,%d1 48b2a: b280 cmpl %d0,%d1 48b2c: 6210 bhis 48b3e <_Thread_Tickle_timeslice+0x32> 48b2e: 123c 0002 moveb #2,%d1 48b32: b280 cmpl %d0,%d1 48b34: 642e bccs 48b64 <_Thread_Tickle_timeslice+0x58> 48b36: 123c 0003 moveb #3,%d1 48b3a: b280 cmpl %d0,%d1 48b3c: 6708 beqs 48b46 <_Thread_Tickle_timeslice+0x3a> <== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 48b3e: 246e fffc moveal %fp@(-4),%a2 48b42: 4e5e unlk %fp 48b44: 4e75 rts } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 48b46: 202a 0076 movel %a2@(118),%d0 48b4a: 5380 subql #1,%d0 48b4c: 2540 0076 movel %d0,%a2@(118) 48b50: 66ec bnes 48b3e <_Thread_Tickle_timeslice+0x32> (*executing->budget_callout)( executing ); 48b52: 2f0a movel %a2,%sp@- 48b54: 206a 007e moveal %a2@(126),%a0 48b58: 4e90 jsr %a0@ break; #endif } } 48b5a: 246e fffc moveal %fp@(-4),%a2 break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); 48b5e: 588f addql #4,%sp break; #endif } } 48b60: 4e5e unlk %fp 48b62: 4e75 rts case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 48b64: 202a 0076 movel %a2@(118),%d0 48b68: 5380 subql #1,%d0 48b6a: 2540 0076 movel %d0,%a2@(118) 48b6e: 6ece bgts 48b3e <_Thread_Tickle_timeslice+0x32> _Thread_Reset_timeslice(); 48b70: 4eb9 0004 c41c jsr 4c41c <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 48b76: 41f9 0005 ef28 lea 5ef28 <_Thread_Ticks_per_timeslice>,%a0 48b7c: 2550 0076 movel %a0@,%a2@(118) if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 48b80: 246e fffc moveal %fp@(-4),%a2 48b84: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048b88 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48b88: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48b8c: 2079 0005 f032 moveal 5f032 <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48b92: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48b96: 243c 0000 0700 movel #1792,%d2 48b9c: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48b9e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48ba2: 40c1 movew %sr,%d1 48ba4: 8081 orl %d1,%d0 48ba6: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48ba8: 2029 0008 movel %a1@(8),%d0 48bac: b091 cmpl %a1@,%d0 48bae: 6750 beqs 48c00 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48bb0: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48bb2: 2009 movel %a1,%d0 48bb4: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48bb6: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48bba: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48bbc: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48bc0: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48bc2: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48bc6: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48bca: 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; 48bce: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48bd0: 46c1 movew %d1,%sr 48bd2: 8481 orl %d1,%d2 48bd4: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48bd6: b1f9 0005 f006 cmpal 5f006 <_Thread_Heir>,%a0 48bdc: 6712 beqs 48bf0 <_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; 48bde: 7001 moveq #1,%d0 <== NOT EXECUTED 48be0: 13c0 0005 f042 moveb %d0,5f042 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48be6: 46c1 movew %d1,%sr } 48be8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48bec: 4e5e unlk %fp 48bee: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48bf0: 23d1 0005 f006 movel %a1@,5f006 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48bf6: 7001 moveq #1,%d0 48bf8: 13c0 0005 f042 moveb %d0,5f042 <_Context_Switch_necessary> 48bfe: 60e6 bras 48be6 <_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 ) ) 48c00: b1f9 0005 f006 cmpal 5f006 <_Thread_Heir>,%a0 48c06: 67de beqs 48be6 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN _Context_Switch_necessary = true; 48c08: 7001 moveq #1,%d0 <== NOT EXECUTED 48c0a: 13c0 0005 f042 moveb %d0,5f042 <_Context_Switch_necessary> <== NOT EXECUTED 48c10: 60d4 bras 48be6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... =============================================================================== 00047834 <_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 ) ) { 47834: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 47836: 4e56 0000 linkw %fp,#0 4783a: 202e 0010 movel %fp@(16),%d0 4783e: 2f0a movel %a2,%sp@- 47840: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 47844: 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 ) ) { 47848: b2aa 0050 cmpl %a2@(80),%d1 4784c: 671c beqs 4786a <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4784e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47850: 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 } 47854: 246e fffc moveal %fp@(-4),%a2 47858: 203c 1003 fff8 movel #268697592,%d0 4785e: 2d40 000c movel %d0,%fp@(12) 47862: 4e5e unlk %fp 47864: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4786a: 123c 0003 moveb #3,%d1 4786e: 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 ); 47872: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 47874: 486a 0048 pea %a2@(72) 47878: 4eb9 0004 90a4 jsr 490a4 <_Watchdog_Remove> 4787e: 588f addql #4,%sp 47880: 203c 1003 fff8 movel #268697592,%d0 47886: 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 } 4788a: 246e fffc moveal %fp@(-4),%a2 4788e: 2d40 000c movel %d0,%fp@(12) 47892: 4e5e unlk %fp 47894: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> ... =============================================================================== 000483b4 <_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 ) { 483b4: 4e56 ffe4 linkw %fp,#-28 483b8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 483bc: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 483c0: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 483c4: 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; 483ca: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 483ce: 2401 movel %d1,%d2 483d0: ec8a lsrl #6,%d2 483d2: 2002 movel %d2,%d0 483d4: e58a lsll #2,%d2 483d6: 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 ) { 483d8: 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 ]; 483dc: 9082 subl %d2,%d0 483de: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 483e2: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 483e6: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 483ea: 242c 0038 movel %a4@(56),%d2 483ee: 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; 483f2: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 483f6: 0801 0005 btst #5,%d1 483fa: 6656 bnes 48452 <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 483fc: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 483fe: 2803 movel %d3,%d4 48400: 5885 addql #4,%d5 48402: 2004 movel %d4,%d0 48404: 40c3 movew %sr,%d3 48406: 8083 orl %d3,%d0 48408: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 4840a: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4840c: ba88 cmpl %a0,%d5 4840e: 6700 010a beqw 4851a <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 48412: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 48416: b3c1 cmpal %d1,%a1 48418: 6418 bccs 48432 <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4841a: 2004 movel %d4,%d0 4841c: 46c3 movew %d3,%sr 4841e: 8083 orl %d3,%d0 48420: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48422: 2002 movel %d2,%d0 48424: c0a8 0010 andl %a0@(16),%d0 48428: 6700 0092 beqw 484bc <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 4842c: 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 ) ) { 4842e: ba88 cmpl %a0,%d5 48430: 66e0 bnes 48412 <_Thread_queue_Enqueue_priority+0x5e> 48432: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48434: 7001 moveq #1,%d0 48436: b0ac 0030 cmpl %a4@(48),%d0 4843a: 6700 0094 beqw 484d0 <_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; 4843e: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 48442: 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; 48446: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48448: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 4844c: 4e5e unlk %fp 4844e: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48450: 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; 48452: 4284 clrl %d4 48454: 1839 0005 d7c2 moveb 5d7c2 ,%d4 _ISR_Disable( level ); 4845a: 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; 4845c: 2244 moveal %d4,%a1 4845e: 5289 addql #1,%a1 _ISR_Disable( level ); 48460: 40c4 movew %sr,%d4 48462: 8084 orl %d4,%d0 48464: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 48466: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4846a: b5c8 cmpal %a0,%a2 4846c: 6720 beqs 4848e <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 4846e: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 48472: b3c1 cmpal %d1,%a1 48474: 6318 blss 4848e <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 48476: 2003 movel %d3,%d0 48478: 46c4 movew %d4,%sr 4847a: 8084 orl %d4,%d0 4847c: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4847e: 2002 movel %d2,%d0 48480: c0a8 0010 andl %a0@(16),%d0 48484: 67ca beqs 48450 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 48486: 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 ) ) { 4848a: b5c8 cmpal %a0,%a2 4848c: 66e0 bnes 4846e <_Thread_queue_Enqueue_priority+0xba> 4848e: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48490: 7001 moveq #1,%d0 48492: b0ac 0030 cmpl %a4@(48),%d0 48496: 66a6 bnes 4843e <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48498: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 4849c: b3c1 cmpal %d1,%a1 4849e: 6756 beqs 484f6 <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 484a0: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 484a2: 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; 484a6: 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; 484a8: 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; 484ac: 208b movel %a3,%a0@ next_node->previous = the_node; 484ae: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484b2: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 484b4: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484b8: 4e5e unlk %fp 484ba: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 484bc: 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 ); 484be: 2004 movel %d4,%d0 <== NOT EXECUTED 484c0: 40c3 movew %sr,%d3 <== NOT EXECUTED 484c2: 8083 orl %d3,%d0 <== NOT EXECUTED 484c4: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 484c6: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 484c8: ba88 cmpl %a0,%d5 <== NOT EXECUTED 484ca: 6600 ff46 bnew 48412 <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 484ce: 604a bras 4851a <_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; 484d0: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 484d4: b3c1 cmpal %d1,%a1 484d6: 671e beqs 484f6 <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 484d8: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 484dc: 2688 movel %a0,%a3@ the_node->previous = previous_node; 484de: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 484e2: 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; 484e6: 228b movel %a3,%a1@ search_node->previous = the_node; 484e8: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484ec: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 484ee: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484f2: 4e5e unlk %fp 484f4: 4e75 rts 484f6: 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; 484fa: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 484fe: 2688 movel %a0,%a3@ the_node->previous = previous_node; 48500: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48504: 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; 48508: 228b movel %a3,%a1@ search_node->previous = the_node; 4850a: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4850e: 46c2 movew %d2,%sr 48510: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 48512: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48516: 4e5e unlk %fp 48518: 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 ) ) { 4851a: 2403 movel %d3,%d2 4851c: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48520: 7001 moveq #1,%d0 48522: b0ac 0030 cmpl %a4@(48),%d0 48526: 6600 ff16 bnew 4843e <_Thread_queue_Enqueue_priority+0x8a> 4852a: 60a4 bras 484d0 <_Thread_queue_Enqueue_priority+0x11c> =============================================================================== 00048318 <_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 ) { 48318: 4e56 fff0 linkw %fp,#-16 4831c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48320: 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 ); 48324: 2f2b 0038 movel %a3@(56),%sp@- Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 48328: 2479 0005 f032 moveal 5f032 <_Thread_Executing>,%a2 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 4832e: 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 ); 48332: 2f0a movel %a2,%sp@- 48334: 4eb9 0004 8720 jsr 48720 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 4833a: 508f addql #8,%sp 4833c: 4a82 tstl %d2 4833e: 6644 bnes 48384 <_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 ) 48340: 41f9 0004 83b4 lea 483b4 <_Thread_queue_Enqueue_priority>,%a0 48346: 7001 moveq #1,%d0 48348: b0ab 0034 cmpl %a3@(52),%d0 4834c: 6706 beqs 48354 <_Thread_queue_Enqueue_with_handler+0x3c> 4834e: 41f9 0004 c190 lea 4c190 <_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 ); 48354: 486e fffc pea %fp@(-4) 48358: 2f0a movel %a2,%sp@- 4835a: 2f0b movel %a3,%sp@- 4835c: 4e90 jsr %a0@ if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 4835e: 4fef 000c lea %sp@(12),%sp 48362: 7201 moveq #1,%d1 48364: b280 cmpl %d0,%d1 48366: 6712 beqs 4837a <_Thread_queue_Enqueue_with_handler+0x62> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 48368: 2f2e fffc movel %fp@(-4),%sp@- 4836c: 2f0a movel %a2,%sp@- 4836e: 2f00 movel %d0,%sp@- 48370: 4eb9 0004 7834 jsr 47834 <_Thread_blocking_operation_Cancel> 48376: 4fef 000c lea %sp@(12),%sp } 4837a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48380: 4e5e unlk %fp 48382: 4e75 rts /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 48384: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 48388: 256e 0010 0064 movel %fp@(16),%a2@(100) the_watchdog->id = id; 4838e: 2540 0068 movel %d0,%a2@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 48392: 2542 0054 movel %d2,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 48396: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4839a: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4839e: 486a 0048 pea %a2@(72) 483a2: 4879 0005 f050 pea 5f050 <_Watchdog_Ticks_chain> 483a8: 4eb9 0004 8f5c jsr 48f5c <_Watchdog_Insert> 483ae: 508f addql #8,%sp 483b0: 608e bras 48340 <_Thread_queue_Enqueue_with_handler+0x28> ... =============================================================================== 0004e0e8 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4e0e8: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4e0ee: 4e56 0000 linkw %fp,#0 4e0f2: 2f0a movel %a2,%sp@- 4e0f4: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4e0f8: 40c1 movew %sr,%d1 4e0fa: 8081 orl %d1,%d0 4e0fc: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4e0fe: 202a 0010 movel %a2@(16),%d0 4e102: 0280 0003 bee0 andil #245472,%d0 4e108: 6734 beqs 4e13e <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4e10a: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4e10c: 7002 moveq #2,%d0 previous = the_node->previous; 4e10e: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4e112: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4e116: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4e118: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4e11c: b0aa 0050 cmpl %a2@(80),%d0 4e120: 6726 beqs 4e148 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4e122: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4e124: 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 } 4e128: 246e fffc moveal %fp@(-4),%a2 4e12c: 203c 1003 fff8 movel #268697592,%d0 4e132: 2d40 000c movel %d0,%fp@(12) 4e136: 4e5e unlk %fp 4e138: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4e13e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4e140: 246e fffc moveal %fp@(-4),%a2 4e144: 4e5e unlk %fp 4e146: 4e75 rts 4e148: 7003 moveq #3,%d0 4e14a: 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 ); 4e14e: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4e150: 486a 0048 pea %a2@(72) 4e154: 4eb9 0004 90a4 jsr 490a4 <_Watchdog_Remove> 4e15a: 588f addql #4,%sp 4e15c: 203c 1003 fff8 movel #268697592,%d0 4e162: 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 } 4e166: 246e fffc moveal %fp@(-4),%a2 4e16a: 2d40 000c movel %d0,%fp@(12) 4e16e: 4e5e unlk %fp 4e170: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> ... =============================================================================== 0004c224 <_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 ); 4c224: 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 ) { 4c22a: 4e56 ffec linkw %fp,#-20 4c22e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4c232: 246e 000c moveal %fp@(12),%a2 4c236: 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 ); 4c23a: 40c1 movew %sr,%d1 4c23c: 8081 orl %d1,%d0 4c23e: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4c240: 202a 0010 movel %a2@(16),%d0 4c244: 0280 0003 bee0 andil #245472,%d0 4c24a: 677e beqs 4c2ca <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c24c: 200a movel %a2,%d0 4c24e: 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; 4c254: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4c256: 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)); 4c25a: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c25e: b088 cmpl %a0,%d0 4c260: 6774 beqs 4c2d6 <_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; 4c262: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4c266: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4c268: 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; 4c26c: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4c26e: 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; 4c272: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4c274: 202a 0040 movel %a2@(64),%d0 4c278: b0aa 0038 cmpl %a2@(56),%d0 4c27c: 6716 beqs 4c294 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 4c27e: 43e8 0038 lea %a0@(56),%a1 4c282: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4c286: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4c28a: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4c28e: 41e8 003c lea %a0@(60),%a0 4c292: 2888 movel %a0,%a4@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c294: 4a02 tstb %d2 4c296: 6626 bnes 4c2be <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c298: 7002 moveq #2,%d0 4c29a: b0aa 0050 cmpl %a2@(80),%d0 4c29e: 6742 beqs 4c2e2 <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4c2a0: 46c1 movew %d1,%sr 4c2a2: 2d4a 0008 movel %a2,%fp@(8) 4c2a6: 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 } 4c2ac: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c2b2: 2d49 000c movel %a1,%fp@(12) 4c2b6: 4e5e unlk %fp 4c2b8: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4c2be: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c2c0: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c2c6: 4e5e unlk %fp 4c2c8: 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 ); 4c2ca: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c2cc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c2d2: 4e5e unlk %fp 4c2d4: 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; 4c2d6: 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; 4c2da: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c2dc: 4a02 tstb %d2 4c2de: 67b8 beqs 4c298 <_Thread_queue_Extract_priority_helper+0x74> 4c2e0: 60dc bras 4c2be <_Thread_queue_Extract_priority_helper+0x9a> 4c2e2: 7003 moveq #3,%d0 4c2e4: 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 ); 4c2e8: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c2ea: 486a 0048 pea %a2@(72) 4c2ee: 4eb9 0004 90a4 jsr 490a4 <_Watchdog_Remove> 4c2f4: 588f addql #4,%sp 4c2f6: 227c 1003 fff8 moveal #268697592,%a1 4c2fc: 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 } 4c300: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c306: 2d49 000c movel %a1,%fp@(12) 4c30a: 4e5e unlk %fp 4c30c: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state> ... =============================================================================== 00048594 <_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 ) { 48594: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 48596: 4e56 0000 linkw %fp,#0 4859a: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 4859e: 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 ) { 485a4: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 485a8: 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; 485ae: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 485b2: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 485b6: b280 cmpl %d0,%d1 485b8: 6712 beqs 485cc <_Thread_queue_Initialize+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485ba: 2008 movel %a0,%d0 485bc: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485be: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485c2: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 485c4: 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 ); } } 485c8: 4e5e unlk %fp 485ca: 4e75 rts * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 485cc: 2008 movel %a0,%d0 485ce: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485d4: 2208 movel %a0,%d1 485d6: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 485d8: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485dc: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485de: 2148 0008 movel %a0,%a0@(8) 485e2: 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 ; 485e6: b088 cmpl %a0,%d0 485e8: 67de beqs 485c8 <_Thread_queue_Initialize+0x34> <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485ea: 2208 movel %a0,%d1 485ec: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 485ee: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485f2: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485f4: 2148 0008 movel %a0,%a0@(8) 485f8: 41e8 000c lea %a0@(12),%a0 485fc: b088 cmpl %a0,%d0 485fe: 66d4 bnes 485d4 <_Thread_queue_Initialize+0x40> 48600: 60c6 bras 485c8 <_Thread_queue_Initialize+0x34> ... =============================================================================== 0004c314 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4c314: 4e56 0000 linkw %fp,#0 4c318: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4c31c: 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 && 4c320: 2029 0030 movel %a1@(48),%d0 4c324: 6708 beqs 4c32e <_Thread_queue_Process_timeout+0x1a> 4c326: b1f9 0005 f032 cmpal 5f032 <_Thread_Executing>,%a0 4c32c: 6718 beqs 4c346 <_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; 4c32e: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4c334: 2f08 movel %a0,%sp@- 4c336: 2f28 0044 movel %a0@(68),%sp@- 4c33a: 4eb9 0004 c1ec jsr 4c1ec <_Thread_queue_Extract> 4c340: 508f addql #8,%sp } } 4c342: 4e5e unlk %fp 4c344: 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 ) { 4c346: 7203 moveq #3,%d1 4c348: b280 cmpl %d0,%d1 4c34a: 67f6 beqs 4c342 <_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; 4c34c: 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 ); } } 4c34e: 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; 4c350: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4c356: 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 ); } } =============================================================================== 00048604 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 48604: 4e56 fff0 linkw %fp,#-16 48608: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4860c: 246e 0008 moveal %fp@(8),%a2 48610: 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 ) 48614: 4a8a tstl %a2 48616: 6708 beqs 48620 <_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 ) { 48618: 7001 moveq #1,%d0 4861a: b0aa 0034 cmpl %a2@(52),%d0 4861e: 670a beqs 4862a <_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 ); } } 48620: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 48626: 4e5e unlk %fp <== NOT EXECUTED 48628: 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 ); 4862a: 303c 0700 movew #1792,%d0 4862e: 40c2 movew %sr,%d2 48630: 8082 orl %d2,%d0 48632: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 48634: 202b 0010 movel %a3@(16),%d0 48638: 0280 0003 bee0 andil #245472,%d0 4863e: 660c bnes 4864c <_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 ); 48640: 46c2 movew %d2,%sr <== NOT EXECUTED } } 48642: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48648: 4e5e unlk %fp 4864a: 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 ); 4864c: 4878 0001 pea 1 48650: 7001 moveq #1,%d0 48652: 2f0b movel %a3,%sp@- 48654: 2540 0030 movel %d0,%a2@(48) 48658: 2f0a movel %a2,%sp@- 4865a: 4eb9 0004 c224 jsr 4c224 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48660: 486e fffc pea %fp@(-4) 48664: 2f0b movel %a3,%sp@- 48666: 2f0a movel %a2,%sp@- 48668: 4eb9 0004 83b4 jsr 483b4 <_Thread_queue_Enqueue_priority> 4866e: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 48672: 46c2 movew %d2,%sr 48674: 60cc bras 48642 <_Thread_queue_Requeue+0x3e> ... =============================================================================== 00048678 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 48678: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4867c: 486e fffc pea %fp@(-4) 48680: 2f2e 0008 movel %fp@(8),%sp@- 48684: 4eb9 0004 7de4 jsr 47de4 <_Thread_Get> switch ( location ) { 4868a: 508f addql #8,%sp 4868c: 4aae fffc tstl %fp@(-4) 48690: 6618 bnes 486aa <_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 ); 48692: 2f00 movel %d0,%sp@- 48694: 4eb9 0004 c314 jsr 4c314 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4869a: 588f addql #4,%sp 4869c: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 486a2: 5380 subql #1,%d0 486a4: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 486aa: 4e5e unlk %fp ... =============================================================================== 0005944c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 5944c: 4e56 ffb0 linkw %fp,#-80 59450: 41ee ffec lea %fp@(-20),%a0 59454: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59458: 246e 0008 moveal %fp@(8),%a2 5945c: 2c0e movel %fp,%d6 5945e: 260e movel %fp,%d3 59460: 5186 subql #8,%d6 59462: 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 ); 59468: 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 ); 5946a: 2a0a movel %a2,%d5 5946c: 4bf9 0005 d70c lea 5d70c <_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 ); 59472: 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 ); 59478: 0685 0000 0068 addil #104,%d5 5947e: 47f9 0005 9f08 lea 59f08 <_Chain_Get>,%a3 59484: 49f9 0005 d79c lea 5d79c <_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 ); 5948a: 283c 0000 0700 movel #1792,%d4 59490: 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 ); 59494: 41ea 0008 lea %a2@(8),%a0 59498: 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 ); 5949c: 41ea 0040 lea %a2@(64),%a0 594a0: 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); 594a4: 41ee fff4 lea %fp@(-12),%a0 594a8: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 594ac: 41ee ffec lea %fp@(-20),%a0 594b0: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 594b4: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 594b8: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 594bc: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 594c0: 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; 594c4: 41ee fff4 lea %fp@(-12),%a0 594c8: 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; 594cc: 2039 0007 e910 movel 7e910 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 594d2: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 594d6: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 594da: 9081 subl %d1,%d0 594dc: 2f03 movel %d3,%sp@- 594de: 2f00 movel %d0,%sp@- 594e0: 2f02 movel %d2,%sp@- 594e2: 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(); 594e4: 2039 0007 e85e movel 7e85e <_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 ) { 594ea: 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; 594ee: 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 ) { 594f2: b280 cmpl %d0,%d1 594f4: 6500 0086 bcsw 5957c <_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 ) { 594f8: b280 cmpl %d0,%d1 594fa: 6200 00a4 bhiw 595a0 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 594fe: 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 ); 59502: 202a 0078 movel %a2@(120),%d0 59506: 2f00 movel %d0,%sp@- 59508: 4e93 jsr %a3@ if ( timer == NULL ) { 5950a: 588f addql #4,%sp 5950c: 4a80 tstl %d0 5950e: 672e beqs 5953e <_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 ) { 59510: 2040 moveal %d0,%a0 <== NOT EXECUTED 59512: 7e01 moveq #1,%d7 <== NOT EXECUTED 59514: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59518: be81 cmpl %d1,%d7 <== NOT EXECUTED 5951a: 6700 00a8 beqw 595c4 <_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 ) { 5951e: 7e03 moveq #3,%d7 <== NOT EXECUTED 59520: be81 cmpl %d1,%d7 <== NOT EXECUTED 59522: 66de bnes 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59524: 2040 moveal %d0,%a0 <== NOT EXECUTED 59526: 4868 0010 pea %a0@(16) <== NOT EXECUTED 5952a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5952c: 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 ); 5952e: 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 ); 59532: 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 ); 59534: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59536: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 59538: 588f addql #4,%sp <== NOT EXECUTED 5953a: 4a80 tstl %d0 <== NOT EXECUTED 5953c: 66d2 bnes 59510 <_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 ); 5953e: 2004 movel %d4,%d0 59540: 40c1 movew %sr,%d1 59542: 8081 orl %d1,%d0 59544: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 59546: bcae fff4 cmpl %fp@(-12),%d6 5954a: 6700 0086 beqw 595d2 <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 5954e: 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; 59550: 2039 0007 e910 movel 7e910 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 59556: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 5955a: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5955e: 9081 subl %d1,%d0 <== NOT EXECUTED 59560: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59562: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59564: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59566: 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(); 59568: 2039 0007 e85e movel 7e85e <_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 ) { 5956e: 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; 59572: 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 ) { 59576: b280 cmpl %d0,%d1 <== NOT EXECUTED 59578: 6400 ff7e bccw 594f8 <_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 ); 5957c: 2f03 movel %d3,%sp@- 5957e: 2e00 movel %d0,%d7 59580: 9e81 subl %d1,%d7 59582: 2f07 movel %d7,%sp@- 59584: 2d40 ffdc movel %d0,%fp@(-36) 59588: 2f05 movel %d5,%sp@- 5958a: 4eb9 0005 d70c jsr 5d70c <_Watchdog_Adjust_to_chain> 59590: 202e ffdc movel %fp@(-36),%d0 59594: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 59598: 2540 0074 movel %d0,%a2@(116) 5959c: 6000 ff64 braw 59502 <_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 ); 595a0: 9280 subl %d0,%d1 595a2: 2f01 movel %d1,%sp@- 595a4: 4878 0001 pea 1 595a8: 2d40 ffdc movel %d0,%fp@(-36) 595ac: 2f05 movel %d5,%sp@- 595ae: 4eb9 0005 d678 jsr 5d678 <_Watchdog_Adjust> 595b4: 202e ffdc movel %fp@(-36),%d0 595b8: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 595bc: 2540 0074 movel %d0,%a2@(116) 595c0: 6000 ff40 braw 59502 <_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 ); 595c4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 595c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 595ca: 4e94 jsr %a4@ <== NOT EXECUTED 595cc: 508f addql #8,%sp <== NOT EXECUTED 595ce: 6000 ff32 braw 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 595d2: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 595d6: 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 ) ) { 595d8: 202e ffd8 movel %fp@(-40),%d0 595dc: b0ae ffe8 cmpl %fp@(-24),%d0 595e0: 6752 beqs 59634 <_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 ); 595e2: 2204 movel %d4,%d1 595e4: 40c0 movew %sr,%d0 595e6: 8280 orl %d0,%d1 595e8: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 595ea: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 595ee: b1ee ffd8 cmpal %fp@(-40),%a0 595f2: 6732 beqs 59626 <_Timer_server_Body+0x1da> <== NEVER TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 595f4: 2250 moveal %a0@,%a1 the_chain->first = new_first; 595f6: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 595fa: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 595fe: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 59602: 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 ); 59604: 2f28 0024 movel %a0@(36),%sp@- 59608: 2f28 0020 movel %a0@(32),%sp@- 5960c: 2068 001c moveal %a0@(28),%a0 59610: 4e90 jsr %a0@ } 59612: 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 ); 59614: 2204 movel %d4,%d1 59616: 40c0 movew %sr,%d0 59618: 8280 orl %d0,%d1 5961a: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5961c: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 59620: b1ee ffd8 cmpal %fp@(-40),%a0 59624: 66ce bnes 595f4 <_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 ); 59626: 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; 59628: 41ee fff4 lea %fp@(-12),%a0 5962c: 2548 0078 movel %a0,%a2@(120) 59630: 6000 fe9a braw 594cc <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 59634: 4207 clrb %d7 59636: 1547 007c moveb %d7,%a2@(124) 5963a: 2039 0007 e7cc movel 7e7cc <_Thread_Dispatch_disable_level>,%d0 59640: 5280 addql #1,%d0 59642: 23c0 0007 e7cc movel %d0,7e7cc <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 59648: 4878 0008 pea 8 5964c: 2f12 movel %a2@,%sp@- 5964e: 4eb9 0005 cd90 jsr 5cd90 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 59654: 2f0a movel %a2,%sp@- 59656: 4eba fd1c jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5965a: 2f0a movel %a2,%sp@- 5965c: 4eba fd80 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 59660: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> ts->active = true; 59666: 7001 moveq #1,%d0 59668: 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 ); 5966c: 2f2e ffe0 movel %fp@(-32),%sp@- 59670: 4eb9 0005 d8e4 jsr 5d8e4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 59676: 2f2e ffe4 movel %fp@(-28),%sp@- 5967a: 4eb9 0005 d8e4 jsr 5d8e4 <_Watchdog_Remove> 59680: 4fef 0018 lea %sp@(24),%sp 59684: 6000 fe3e braw 594c4 <_Timer_server_Body+0x78> =============================================================================== 00059688 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 59688: 4e56 fff0 linkw %fp,#-16 5968c: 206e 000c moveal %fp@(12),%a0 59690: 48d7 041c moveml %d2-%d4/%a2,%sp@ 59694: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 59698: 202a 0078 movel %a2@(120),%d0 5969c: 671a beqs 596b8 <_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 ); 5969e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 596a2: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 596a6: 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 ); 596ac: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 596b0: 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 ); 596b2: 4ef9 0005 9ed0 jmp 59ed0 <_Chain_Append> <== NOT EXECUTED 596b8: 2039 0007 e7cc movel 7e7cc <_Thread_Dispatch_disable_level>,%d0 596be: 5280 addql #1,%d0 596c0: 23c0 0007 e7cc movel %d0,7e7cc <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 596c6: 2028 0038 movel %a0@(56),%d0 596ca: 7201 moveq #1,%d1 596cc: b280 cmpl %d0,%d1 596ce: 6700 0088 beqw 59758 <_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 ) { 596d2: 7203 moveq #3,%d1 596d4: b280 cmpl %d0,%d1 596d6: 670e beqs 596e6 <_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 ); } } 596d8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596de: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 596e0: 4ef9 0005 c2c0 jmp 5c2c0 <_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 ); 596e6: 203c 0000 0700 movel #1792,%d0 596ec: 40c2 movew %sr,%d2 596ee: 8082 orl %d2,%d0 596f0: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 596f2: 260a movel %a2,%d3 596f4: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 596fa: 2039 0007 e85e movel 7e85e <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 59700: 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)); 59704: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59708: b689 cmpl %a1,%d3 5970a: 671a beqs 59726 <_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; 5970c: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 59710: b280 cmpl %d0,%d1 59712: 6400 00b8 bccw 597cc <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 59716: 2800 movel %d0,%d4 59718: 9881 subl %d1,%d4 if (delta_interval > delta) { 5971a: b883 cmpl %d3,%d4 5971c: 6500 00ba bcsw 597d8 <_Timer_server_Schedule_operation_method+0x150> 59720: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59722: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 59726: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 5972a: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5972c: 4868 0010 pea %a0@(16) 59730: 486a 0068 pea %a2@(104) 59734: 4eb9 0005 d79c jsr 5d79c <_Watchdog_Insert> if ( !ts->active ) { 5973a: 508f addql #8,%sp 5973c: 102a 007c moveb %a2@(124),%d0 59740: 6696 bnes 596d8 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 59742: 2f0a movel %a2,%sp@- 59744: 4eba fc98 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) 59748: 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 ); } } 5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59750: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 59752: 4ef9 0005 c2c0 jmp 5c2c0 <_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 ); 59758: 203c 0000 0700 movel #1792,%d0 5975e: 40c3 movew %sr,%d3 59760: 8083 orl %d3,%d0 59762: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59764: 2039 0007 e910 movel 7e910 <_Watchdog_Ticks_since_boot>,%d0 5976a: 240a movel %a2,%d2 5976c: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 59772: 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)); 59776: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5977a: b489 cmpl %a1,%d2 5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5977e: 2800 movel %d0,%d4 59780: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 59782: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59786: b484 cmpl %d4,%d2 59788: 623a bhis 597c4 <_Timer_server_Schedule_operation_method+0x13c> 5978a: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5978c: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 59790: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59794: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59796: 4868 0010 pea %a0@(16) 5979a: 486a 0030 pea %a2@(48) 5979e: 4eb9 0005 d79c jsr 5d79c <_Watchdog_Insert> if ( !ts->active ) { 597a4: 508f addql #8,%sp 597a6: 102a 007c moveb %a2@(124),%d0 597aa: 6600 ff2c bnew 596d8 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 597ae: 2f0a movel %a2,%sp@- 597b0: 4eba fbc2 jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) 597b4: 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 ); } } 597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 597bc: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 597be: 4ef9 0005 c2c0 jmp 5c2c0 <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 597c4: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 597c6: 2342 0010 movel %d2,%a1@(16) 597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x108> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 597cc: d283 addl %d3,%d1 delta_interval += delta; 597ce: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 597d0: 2341 0010 movel %d1,%a1@(16) 597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0x9e> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 597d8: 9684 subl %d4,%d3 597da: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 597dc: 2341 0010 movel %d1,%a1@(16) 597e0: 6000 ff44 braw 59726 <_Timer_server_Schedule_operation_method+0x9e> =============================================================================== 00048df2 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48df2: 4e56 fff0 linkw %fp,#-16 48df6: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48dfa: 242e 0008 movel %fp@(8),%d2 48dfe: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e02: 2479 0005 f114 moveal 5f114 <_User_extensions_List+0x8>,%a2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48e08: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e0c: b5fc 0005 f10c cmpal #389388,%a2 48e12: 6726 beqs 48e3a <_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 ); 48e14: 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 ) 48e1a: 206a 0030 moveal %a2@(48),%a0 48e1e: 4a88 tstl %a0 48e20: 670c beqs 48e2e <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 48e22: 2f03 movel %d3,%sp@- 48e24: 2f04 movel %d4,%sp@- 48e26: 2f02 movel %d2,%sp@- 48e28: 4e90 jsr %a0@ 48e2a: 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 ) { 48e2e: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e32: b5fc 0005 f10c cmpal #389388,%a2 48e38: 66e0 bnes 48e1a <_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 ); } } 48e3a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48e40: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048cb0 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48cb0: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48cb4: 203c 0005 f110 movel #389392,%d0 48cba: 23c0 0005 f10c movel %d0,5f10c <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48cc0: 203c 0005 f10c movel #389388,%d0 48cc6: 23c0 0005 f114 movel %d0,5f114 <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48ccc: 203c 0005 ef80 movel #388992,%d0 48cd2: 23c0 0005 ef7c movel %d0,5ef7c <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48cd8: 203c 0005 ef7c movel #388988,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48cde: 42b9 0005 f110 clrl 5f110 <_User_extensions_List+0x4> 48ce4: 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; 48ce8: 2439 0005 d7fa movel 5d7fa ,%d2 initial_extensions = Configuration.User_extension_table; 48cee: 2639 0005 d7fe movel 5d7fe ,%d3 48cf4: 42b9 0005 ef80 clrl 5ef80 <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 48cfa: 23c0 0005 ef84 movel %d0,5ef84 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48d00: 4a83 tstl %d3 48d02: 6764 beqs 48d68 <_User_extensions_Handler_initialization+0xb8> extension = (User_extensions_Control *) 48d04: 7834 moveq #52,%d4 48d06: 4c02 4800 mulsl %d2,%d4 48d0a: 2f04 movel %d4,%sp@- 48d0c: 4eb9 0004 91c0 jsr 491c0 <_Workspace_Allocate_or_fatal_error> 48d12: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48d14: 2f04 movel %d4,%sp@- 48d16: 42a7 clrl %sp@- 48d18: 2f00 movel %d0,%sp@- 48d1a: 4eb9 0004 f484 jsr 4f484 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48d20: 4fef 0010 lea %sp@(16),%sp 48d24: 4a82 tstl %d2 48d26: 6740 beqs 48d68 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN 48d28: 4284 clrl %d4 48d2a: 47f9 0004 c500 lea 4c500 <_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; 48d30: 2043 moveal %d3,%a0 48d32: 5284 addql #1,%d4 48d34: 0683 0000 0020 addil #32,%d3 48d3a: 2558 0014 movel %a0@+,%a2@(20) 48d3e: 2558 0018 movel %a0@+,%a2@(24) 48d42: 2558 001c movel %a0@+,%a2@(28) 48d46: 2558 0020 movel %a0@+,%a2@(32) 48d4a: 2558 0024 movel %a0@+,%a2@(36) 48d4e: 2558 0028 movel %a0@+,%a2@(40) 48d52: 2558 002c movel %a0@+,%a2@(44) 48d56: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 48d5a: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 48d5c: 45ea 0034 lea %a2@(52),%a2 48d60: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48d62: 588f addql #4,%sp 48d64: b882 cmpl %d2,%d4 48d66: 65c8 bcss 48d30 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 48d68: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48d6e: 4e5e unlk %fp ... =============================================================================== 00048d74 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 48d74: 4e56 0000 linkw %fp,#0 48d78: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48d7a: 2479 0005 f10c moveal 5f10c <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 48d80: 2f02 movel %d2,%sp@- 48d82: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48d86: b5fc 0005 f110 cmpal #389392,%a2 48d8c: 6718 beqs 48da6 <_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 ) 48d8e: 206a 0028 moveal %a2@(40),%a0 48d92: 4a88 tstl %a0 48d94: 6706 beqs 48d9c <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 48d96: 2f02 movel %d2,%sp@- 48d98: 4e90 jsr %a0@ 48d9a: 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 ) { 48d9c: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48d9e: b5fc 0005 f110 cmpal #389392,%a2 48da4: 66e8 bnes 48d8e <_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 ); } } 48da6: 242e fff8 movel %fp@(-8),%d2 48daa: 246e fffc moveal %fp@(-4),%a2 48dae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048e44 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48e44: 4e56 0000 linkw %fp,#0 48e48: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e4a: 2479 0005 f10c moveal 5f10c <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48e50: 2f02 movel %d2,%sp@- 48e52: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e56: b5fc 0005 f110 cmpal #389392,%a2 48e5c: 6722 beqs 48e80 <_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 ) { 48e5e: 206a 0014 moveal %a2@(20),%a0 48e62: 4a88 tstl %a0 48e64: 6710 beqs 48e76 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 48e66: 2f02 movel %d2,%sp@- 48e68: 2f39 0005 f032 movel 5f032 <_Thread_Executing>,%sp@- 48e6e: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 48e70: 508f addql #8,%sp 48e72: 4a00 tstb %d0 48e74: 670c beqs 48e82 <_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 ) { 48e76: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e78: b5fc 0005 f110 cmpal #389392,%a2 48e7e: 66de bnes 48e5e <_User_extensions_Thread_create+0x1a> 48e80: 7001 moveq #1,%d0 return false; } } return true; } 48e82: 242e fff8 movel %fp@(-8),%d2 48e86: 246e fffc moveal %fp@(-4),%a2 48e8a: 4e5e unlk %fp ... =============================================================================== 00048e90 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48e90: 4e56 0000 linkw %fp,#0 48e94: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e96: 2479 0005 f114 moveal 5f114 <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48e9c: 2f02 movel %d2,%sp@- 48e9e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48ea2: b5fc 0005 f10c cmpal #389388,%a2 48ea8: 6720 beqs 48eca <_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 ) 48eaa: 206a 0020 moveal %a2@(32),%a0 48eae: 4a88 tstl %a0 48eb0: 670c beqs 48ebe <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 48eb2: 2f02 movel %d2,%sp@- 48eb4: 2f39 0005 f032 movel 5f032 <_Thread_Executing>,%sp@- 48eba: 4e90 jsr %a0@ 48ebc: 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 ) { 48ebe: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48ec2: b5fc 0005 f10c cmpal #389388,%a2 48ec8: 66e0 bnes 48eaa <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 48eca: 242e fff8 movel %fp@(-8),%d2 48ece: 246e fffc moveal %fp@(-4),%a2 48ed2: 4e5e unlk %fp ... =============================================================================== 00048db2 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48db2: 4e56 0000 linkw %fp,#0 48db6: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48db8: 2479 0005 f114 moveal 5f114 <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48dbe: 2f02 movel %d2,%sp@- 48dc0: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48dc4: b5fc 0005 f10c cmpal #389388,%a2 48dca: 671a beqs 48de6 <_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 ) 48dcc: 206a 002c moveal %a2@(44),%a0 48dd0: 4a88 tstl %a0 48dd2: 6706 beqs 48dda <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 48dd4: 2f02 movel %d2,%sp@- 48dd6: 4e90 jsr %a0@ 48dd8: 588f addql #4,%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 ) { 48dda: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48dde: b5fc 0005 f10c cmpal #389388,%a2 48de4: 66e6 bnes 48dcc <_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 ); } } 48de6: 242e fff8 movel %fp@(-8),%d2 48dea: 246e fffc moveal %fp@(-4),%a2 48dee: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049b78 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 49b78: 4e56 0000 linkw %fp,#0 49b7c: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49b7e: 2479 0006 00a4 moveal 600a4 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 49b84: 2f02 movel %d2,%sp@- 49b86: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49b8a: b5fc 0006 00a8 cmpal #393384,%a2 49b90: 671e beqs 49bb0 <_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 ) 49b92: 206a 001c moveal %a2@(28),%a0 49b96: 4a88 tstl %a0 49b98: 670c beqs 49ba6 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 49b9a: 2f02 movel %d2,%sp@- 49b9c: 2f39 0005 ffca movel 5ffca <_Thread_Executing>,%sp@- 49ba2: 4e90 jsr %a0@ 49ba4: 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 ) { 49ba6: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49ba8: b5fc 0006 00a8 cmpal #393384,%a2 49bae: 66e2 bnes 49b92 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 49bb0: 242e fff8 movel %fp@(-8),%d2 49bb4: 246e fffc moveal %fp@(-4),%a2 49bb8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048ed8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 48ed8: 4e56 0000 linkw %fp,#0 48edc: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48ede: 2479 0005 f10c moveal 5f10c <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 48ee4: 2f02 movel %d2,%sp@- 48ee6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48eea: b5fc 0005 f110 cmpal #389392,%a2 48ef0: 671e beqs 48f10 <_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 ) 48ef2: 206a 0018 moveal %a2@(24),%a0 48ef6: 4a88 tstl %a0 48ef8: 670c beqs 48f06 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 48efa: 2f02 movel %d2,%sp@- 48efc: 2f39 0005 f032 movel 5f032 <_Thread_Executing>,%sp@- 48f02: 4e90 jsr %a0@ 48f04: 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 ) { 48f06: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48f08: b5fc 0005 f110 cmpal #389392,%a2 48f0e: 66e2 bnes 48ef2 <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 48f10: 242e fff8 movel %fp@(-8),%d2 48f14: 246e fffc moveal %fp@(-4),%a2 48f18: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048f1c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 48f1c: 4e56 fff4 linkw %fp,#-12 48f20: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48f24: 262e 0008 movel %fp@(8),%d3 48f28: 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 ; 48f2c: 2479 0005 ef7c moveal 5ef7c <_User_extensions_Switches_list>,%a2 48f32: b5fc 0005 ef80 cmpal #388992,%a2 48f38: 6716 beqs 48f50 <_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 ); 48f3a: 2f02 movel %d2,%sp@- 48f3c: 2f03 movel %d3,%sp@- 48f3e: 206a 0008 moveal %a2@(8),%a0 48f42: 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 ) { 48f44: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48f46: 508f addql #8,%sp 48f48: b5fc 0005 ef80 cmpal #388992,%a2 48f4e: 66ea bnes 48f3a <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 48f50: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48f56: 4e5e unlk %fp ... =============================================================================== 0004acbc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4acbc: 4e56 ffe8 linkw %fp,#-24 4acc0: 226e 000c moveal %fp@(12),%a1 4acc4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4acc8: 283c 0000 0700 movel #1792,%d4 4acce: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4acd0: 266e 0008 moveal %fp@(8),%a3 4acd4: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4acd8: 40c1 movew %sr,%d1 4acda: 8081 orl %d1,%d0 4acdc: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4acde: 244b moveal %a3,%a2 4ace0: 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 ) ) { 4ace2: b5c8 cmpal %a0,%a2 4ace4: 6748 beqs 4ad2e <_Watchdog_Adjust+0x72> switch ( direction ) { 4ace6: 4a89 tstl %a1 4ace8: 6650 bnes 4ad3a <_Watchdog_Adjust+0x7e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4acea: 4a82 tstl %d2 4acec: 6740 beqs 4ad2e <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4acee: 2628 0010 movel %a0@(16),%d3 4acf2: 49f9 0004 af38 lea 4af38 <_Watchdog_Tickle>,%a4 4acf8: b682 cmpl %d2,%d3 4acfa: 622c bhis 4ad28 <_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; 4acfc: 7001 moveq #1,%d0 4acfe: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4ad02: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4ad04: 2f0b movel %a3,%sp@- 4ad06: 4e94 jsr %a4@ _ISR_Disable( level ); 4ad08: 2004 movel %d4,%d0 4ad0a: 40c1 movew %sr,%d1 4ad0c: 8081 orl %d1,%d0 4ad0e: 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; 4ad10: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4ad12: 588f addql #4,%sp 4ad14: 2013 movel %a3@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 4ad16: 2040 moveal %d0,%a0 4ad18: b08a cmpl %a2,%d0 4ad1a: 6712 beqs 4ad2e <_Watchdog_Adjust+0x72> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4ad1c: 4a82 tstl %d2 4ad1e: 670e beqs 4ad2e <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4ad20: 2628 0010 movel %a0@(16),%d3 4ad24: b483 cmpl %d3,%d2 4ad26: 64d4 bccs 4acfc <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4ad28: 9682 subl %d2,%d3 4ad2a: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4ad2e: 46c1 movew %d1,%sr } 4ad30: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4ad36: 4e5e unlk %fp 4ad38: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4ad3a: 7001 moveq #1,%d0 4ad3c: b089 cmpl %a1,%d0 4ad3e: 66ee bnes 4ad2e <_Watchdog_Adjust+0x72> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4ad40: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4ad44: 46c1 movew %d1,%sr } 4ad46: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4ad4c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d70c <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5d70c: 4e56 ffe4 linkw %fp,#-28 5d710: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5d714: 2a6e 0008 moveal %fp@(8),%a5 5d718: 282e 000c movel %fp@(12),%d4 5d71c: 266e 0010 moveal %fp@(16),%a3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 5d720: 675e beqs 5d780 <_Watchdog_Adjust_to_chain+0x74> return; } _ISR_Disable( level ); 5d722: 263c 0000 0700 movel #1792,%d3 5d728: 2003 movel %d3,%d0 5d72a: 40c1 movew %sr,%d1 5d72c: 8081 orl %d1,%d0 5d72e: 46c0 movew %d0,%sr 5d730: 284d moveal %a5,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d732: 240b movel %a3,%d2 5d734: 5882 addql #4,%d2 5d736: 205c moveal %a4@+,%a0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 5d738: b1cc cmpal %a4,%a0 5d73a: 6742 beqs 5d77e <_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 ) { 5d73c: 2028 0010 movel %a0@(16),%d0 5d740: b880 cmpl %d0,%d4 5d742: 654c bcss 5d790 <_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; 5d744: 9880 subl %d0,%d4 first->delta_interval = 0; 5d746: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5d74a: 2250 moveal %a0@,%a1 previous = the_node->previous; 5d74c: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 5d750: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 5d752: 234a 0004 movel %a2,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5d756: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 5d758: 226b 0008 moveal %a3@(8),%a1 the_chain->last = the_node; 5d75c: 2748 0008 movel %a0,%a3@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 5d760: 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; 5d764: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5d766: 2003 movel %d3,%d0 5d768: 46c1 movew %d1,%sr 5d76a: 8081 orl %d1,%d0 5d76c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5d76e: 2055 moveal %a5@,%a0 if ( _Chain_Is_empty( header ) ) 5d770: b1cc cmpal %a4,%a0 5d772: 6714 beqs 5d788 <_Watchdog_Adjust_to_chain+0x7c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5d774: 4aa8 0010 tstl %a0@(16) 5d778: 67d0 beqs 5d74a <_Watchdog_Adjust_to_chain+0x3e> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d77a: 4a84 tstl %d4 5d77c: 66ba bnes 5d738 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d77e: 46c1 movew %d1,%sr } 5d780: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d784: 4e5e unlk %fp 5d786: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d788: 204c moveal %a4,%a0 } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d78a: 4a84 tstl %d4 5d78c: 66aa bnes 5d738 <_Watchdog_Adjust_to_chain+0x2c> 5d78e: 60ee bras 5d77e <_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; 5d790: 9084 subl %d4,%d0 5d792: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d796: 46c1 movew %d1,%sr 5d798: 60e6 bras 5d780 <_Watchdog_Adjust_to_chain+0x74> ... =============================================================================== 00048f5c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 48f5c: 4e56 ffec linkw %fp,#-20 48f60: 226e 000c moveal %fp@(12),%a1 48f64: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48f68: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 48f6c: 2a3c 0000 0700 movel #1792,%d5 48f72: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 48f74: 2839 0005 f012 movel 5f012 <_ISR_Nest_level>,%d4 _ISR_Disable( level ); 48f7a: 40c3 movew %sr,%d3 48f7c: 8083 orl %d3,%d0 48f7e: 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 ) { 48f80: 4aa9 0008 tstl %a1@(8) 48f84: 6600 00c6 bnew 4904c <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 48f88: 2039 0005 f0b8 movel 5f0b8 <_Watchdog_Sync_count>,%d0 48f8e: 5280 addql #1,%d0 48f90: 23c0 0005 f0b8 movel %d0,5f0b8 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 48f96: 7001 moveq #1,%d0 48f98: 2340 0008 movel %d0,%a1@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 48f9c: 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 ; 48fa0: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48fa2: 6764 beqs 49008 <_Watchdog_Insert+0xac> 48fa4: 4a90 tstl %a0@ 48fa6: 6760 beqs 49008 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48fa8: 2228 0010 movel %a0@(16),%d1 48fac: b280 cmpl %d0,%d1 48fae: 6252 bhis 49002 <_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 ); 48fb0: 2405 movel %d5,%d2 48fb2: 46c3 movew %d3,%sr 48fb4: 8483 orl %d3,%d2 48fb6: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48fb8: 7401 moveq #1,%d2 48fba: b4a9 0008 cmpl %a1@(8),%d2 48fbe: 666e bnes 4902e <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48fc0: 2439 0005 f02e movel 5f02e <_Watchdog_Sync_level>,%d2 48fc6: b484 cmpl %d4,%d2 48fc8: 6230 bhis 48ffa <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48fca: 9081 subl %d1,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48fcc: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48fce: 4a80 tstl %d0 48fd0: 6736 beqs 49008 <_Watchdog_Insert+0xac> 48fd2: 4a90 tstl %a0@ 48fd4: 6732 beqs 49008 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48fd6: 2228 0010 movel %a0@(16),%d1 48fda: b081 cmpl %d1,%d0 48fdc: 6524 bcss 49002 <_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 ); 48fde: 2405 movel %d5,%d2 48fe0: 46c3 movew %d3,%sr 48fe2: 8483 orl %d3,%d2 48fe4: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48fe6: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48fe8: 7201 moveq #1,%d1 48fea: b2a9 0008 cmpl %a1@(8),%d1 48fee: 663e bnes 4902e <_Watchdog_Insert+0xd2> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48ff0: 2239 0005 f02e movel 5f02e <_Watchdog_Sync_level>,%d1 48ff6: b284 cmpl %d4,%d1 48ff8: 63d2 blss 48fcc <_Watchdog_Insert+0x70> _Watchdog_Sync_level = insert_isr_nest_level; 48ffa: 23c4 0005 f02e movel %d4,5f02e <_Watchdog_Sync_level> goto restart; 49000: 609a bras 48f9c <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 49002: 9280 subl %d0,%d1 49004: 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 ); 49008: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 4900c: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4900e: 2450 moveal %a0@,%a2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 49010: 2239 0005 f0bc movel 5f0bc <_Watchdog_Ticks_since_boot>,%d1 after_node->next = the_node; 49016: 2089 movel %a1,%a0@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 49018: 2348 0004 movel %a0,%a1@(4) 4901c: 2341 0014 movel %d1,%a1@(20) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 49020: 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; 49024: 2549 0004 movel %a1,%a2@(4) 49028: 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; 4902c: 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; 4902e: 23c4 0005 f02e movel %d4,5f02e <_Watchdog_Sync_level> _Watchdog_Sync_count--; 49034: 2039 0005 f0b8 movel 5f0b8 <_Watchdog_Sync_count>,%d0 4903a: 5380 subql #1,%d0 4903c: 23c0 0005 f0b8 movel %d0,5f0b8 <_Watchdog_Sync_count> _ISR_Enable( level ); 49042: 46c3 movew %d3,%sr } 49044: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49048: 4e5e unlk %fp 4904a: 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 ); 4904c: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 4904e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49052: 4e5e unlk %fp ... =============================================================================== 000490a4 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 490a4: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 490aa: 4e56 0000 linkw %fp,#0 490ae: 206e 0008 moveal %fp@(8),%a0 490b2: 2f0a movel %a2,%sp@- 490b4: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 490b6: 40c1 movew %sr,%d1 490b8: 8081 orl %d1,%d0 490ba: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 490bc: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 490c0: 7401 moveq #1,%d2 490c2: b480 cmpl %d0,%d2 490c4: 6764 beqs 4912a <_Watchdog_Remove+0x86> 490c6: 6314 blss 490dc <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 490c8: 2279 0005 f0bc moveal 5f0bc <_Watchdog_Ticks_since_boot>,%a1 490ce: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 490d2: 46c1 movew %d1,%sr return( previous_state ); } 490d4: 241f movel %sp@+,%d2 490d6: 245f moveal %sp@+,%a2 490d8: 4e5e unlk %fp 490da: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 490dc: 143c 0003 moveb #3,%d2 490e0: b480 cmpl %d0,%d2 490e2: 65e4 bcss 490c8 <_Watchdog_Remove+0x24> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 490e4: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 490e6: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 490ea: 4a91 tstl %a1@ 490ec: 6708 beqs 490f6 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 490ee: 2428 0010 movel %a0@(16),%d2 490f2: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 490f6: 2479 0005 f0b8 moveal 5f0b8 <_Watchdog_Sync_count>,%a2 490fc: 4a8a tstl %a2 490fe: 670c beqs 4910c <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 49100: 2479 0005 f012 moveal 5f012 <_ISR_Nest_level>,%a2 49106: 23ca 0005 f02e movel %a2,5f02e <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4910c: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 49110: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 49112: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49116: 2279 0005 f0bc moveal 5f0bc <_Watchdog_Ticks_since_boot>,%a1 4911c: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49120: 46c1 movew %d1,%sr return( previous_state ); } 49122: 241f movel %sp@+,%d2 49124: 245f moveal %sp@+,%a2 49126: 4e5e unlk %fp 49128: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4912a: 2279 0005 f0bc moveal 5f0bc <_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; 49130: 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; 49134: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49138: 46c1 movew %d1,%sr return( previous_state ); } 4913a: 241f movel %sp@+,%d2 4913c: 245f moveal %sp@+,%a2 4913e: 4e5e unlk %fp ... =============================================================================== 0004a64c <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a64c: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4a652: 4e56 ffe8 linkw %fp,#-24 4a656: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a65a: 242e 0008 movel %fp@(8),%d2 4a65e: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a662: 40c3 movew %sr,%d3 4a664: 8083 orl %d3,%d0 4a666: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4a668: 2f0b movel %a3,%sp@- 4a66a: 4bf9 0004 4084 lea 44084 ,%a5 4a670: 2f02 movel %d2,%sp@- 4a672: 4879 0005 e7a2 pea 5e7a2 <_Status_Object_name_errors_to_status+0x14> 4a678: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a67a: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4a67c: 4fef 000c lea %sp@(12),%sp 4a680: b7ca cmpal %a2,%a3 4a682: 672c beqs 4a6b0 <_Watchdog_Report_chain+0x64> 4a684: 49f9 0004 a6c8 lea 4a6c8 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4a68a: 2f0a movel %a2,%sp@- 4a68c: 42a7 clrl %sp@- 4a68e: 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 ) 4a690: 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 ; 4a692: 508f addql #8,%sp 4a694: b7ca cmpal %a2,%a3 4a696: 66f2 bnes 4a68a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4a698: 2f02 movel %d2,%sp@- 4a69a: 4879 0005 e7b9 pea 5e7b9 <_Status_Object_name_errors_to_status+0x2b> 4a6a0: 4e95 jsr %a5@ 4a6a2: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4a6a4: 46c3 movew %d3,%sr } 4a6a6: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a6ac: 4e5e unlk %fp 4a6ae: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4a6b0: 4879 0005 e7c8 pea 5e7c8 <_Status_Object_name_errors_to_status+0x3a> 4a6b6: 4e95 jsr %a5@ 4a6b8: 588f addql #4,%sp } _ISR_Enable( level ); 4a6ba: 46c3 movew %d3,%sr } 4a6bc: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a6c2: 4e5e unlk %fp ... =============================================================================== 00049144 <_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 ); 49144: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 4914a: 4e56 ffe8 linkw %fp,#-24 4914e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49152: 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 ); 49156: 40c2 movew %sr,%d2 49158: 8082 orl %d2,%d0 4915a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4915c: 264c moveal %a4,%a3 4915e: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 49160: b7ca cmpal %a2,%a3 49162: 673e beqs 491a2 <_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) { 49164: 202a 0010 movel %a2@(16),%d0 49168: 4bf9 0004 90a4 lea 490a4 <_Watchdog_Remove>,%a5 4916e: 6708 beqs 49178 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 49170: 5380 subql #1,%d0 49172: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 49176: 662a bnes 491a2 <_Watchdog_Tickle+0x5e> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49178: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4917e: 2f0a movel %a2,%sp@- 49180: 4e95 jsr %a5@ _ISR_Enable( level ); 49182: 46c2 movew %d2,%sr switch( watchdog_state ) { 49184: 7202 moveq #2,%d1 49186: 588f addql #4,%sp 49188: b280 cmpl %d0,%d1 4918a: 6722 beqs 491ae <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4918c: 2003 movel %d3,%d0 4918e: 40c2 movew %sr,%d2 49190: 8082 orl %d2,%d0 49192: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49194: 2014 movel %a4@,%d0 49196: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 49198: b08b cmpl %a3,%d0 4919a: 6706 beqs 491a2 <_Watchdog_Tickle+0x5e> 4919c: 4aaa 0010 tstl %a2@(16) 491a0: 67dc beqs 4917e <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 491a2: 46c2 movew %d2,%sr } 491a4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 491aa: 4e5e unlk %fp 491ac: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 491ae: 2f2a 0024 movel %a2@(36),%sp@- 491b2: 2f2a 0020 movel %a2@(32),%sp@- 491b6: 206a 001c moveal %a2@(28),%a0 491ba: 4e90 jsr %a0@ 491bc: 508f addql #8,%sp 491be: 60cc bras 4918c <_Watchdog_Tickle+0x48> =============================================================================== 00049228 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 49228: 4e56 0000 linkw %fp,#0 4922c: 2f03 movel %d3,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; 4922e: 2639 0005 d7c8 movel 5d7c8 ,%d3 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 49234: 2f02 movel %d2,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 49236: 2439 0005 d7c4 movel 5d7c4 ,%d2 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) 4923c: 4a39 0005 d7ec tstb 5d7ec 49242: 6628 bnes 4926c <_Workspace_Handler_initialization+0x44> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 49244: 4878 0004 pea 4 49248: 2f03 movel %d3,%sp@- 4924a: 2f02 movel %d2,%sp@- 4924c: 4879 0005 ef9a pea 5ef9a <_Workspace_Area> 49252: 4eb9 0004 6c60 jsr 46c60 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 49258: 4fef 0010 lea %sp@(16),%sp 4925c: 4a80 tstl %d0 4925e: 671e beqs 4927e <_Workspace_Handler_initialization+0x56> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 49260: 242e fff8 movel %fp@(-8),%d2 49264: 262e fffc movel %fp@(-4),%d3 49268: 4e5e unlk %fp 4926a: 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 ); 4926c: 2f03 movel %d3,%sp@- 4926e: 42a7 clrl %sp@- 49270: 2f02 movel %d2,%sp@- 49272: 4eb9 0004 f484 jsr 4f484 49278: 4fef 000c lea %sp@(12),%sp 4927c: 60c6 bras 49244 <_Workspace_Handler_initialization+0x1c> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4927e: 4878 0003 pea 3 49282: 4878 0001 pea 1 49286: 42a7 clrl %sp@- 49288: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> ... =============================================================================== 0005b3c0 <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5b3c0: 4e56 0000 linkw %fp,#0 5b3c4: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5b3c8: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5b3ce: 2d40 0008 movel %d0,%fp@(8) } 5b3d2: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 5b3d4: 4ef9 0004 a608 jmp 4a608 ... =============================================================================== 00042e0a <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 42e0a: 4e56 0000 linkw %fp,#0 42e0e: 4eb9 0005 bc4c jsr 5bc4c <_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(); 42e14: 4eb9 0004 2da4 jsr 42da4 rtems_shutdown_executive(status); 42e1a: 2f2e 0008 movel %fp@(8),%sp@- 42e1e: 4eb9 0004 63fc jsr 463fc 42e24: 588f addql #4,%sp <== NOT EXECUTED 42e26: 60fe bras 42e26 <_exit+0x1c> <== NOT EXECUTED =============================================================================== 00043b2c <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 43b2c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43b30: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 43b34: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 43b38: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 43b3e: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 43b42: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43b46: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 43b48: 4ef9 0004 3908 jmp 43908 <== NOT EXECUTED ... =============================================================================== 0005b3dc <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5b3dc: 4e56 0000 linkw %fp,#0 free( ptr ); 5b3e0: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5b3e6: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5b3e8: 4ef9 0004 a6f4 jmp 4a6f4 ... =============================================================================== 0004d5ae <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4d5ae: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 4d5b0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 4d5b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a8f8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 4a8f8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 4a8fc: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4a8fe: 4ef9 0004 a894 jmp 4a894 <== NOT EXECUTED =============================================================================== 0004a904 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 4a904: 4e56 0000 linkw %fp,#0 4a908: 202e 000c movel %fp@(12),%d0 return gettimeofday( tp, tzp ); 4a90c: 2d6e 0010 000c movel %fp@(16),%fp@(12) 4a912: 2d40 0008 movel %d0,%fp@(8) } 4a916: 4e5e unlk %fp struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4a918: 4ef9 0004 a894 jmp 4a894 ... =============================================================================== 0005b4cc <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5b4cc: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5b4d0: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5b4d6: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5b4d8: 4ef9 0005 bba0 jmp 5bba0 ... =============================================================================== 0004472c <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 4472c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44730: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 44734: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 4473a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 4473e: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 44740: 4ef9 0004 4510 jmp 44510 <== NOT EXECUTED ... =============================================================================== 0005b684 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5b684: 4e56 0000 linkw %fp,#0 return malloc( size ); 5b688: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5b68e: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5b690: 4ef9 0004 ac8c jmp 4ac8c ... =============================================================================== 0005b788 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5b788: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5b78c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 5b790: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5b796: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 5b79a: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5b79c: 4ef9 0005 b7e4 jmp 5b7e4 <== NOT EXECUTED ... =============================================================================== 00046c8c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 46c8c: 4e56 ffa0 linkw %fp,#-96 46c90: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46c94: 246e 000c moveal %fp@(12),%a2 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 46c98: 2f0a movel %a2,%sp@- int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 46c9a: 2a2e 0010 movel %fp@(16),%d5 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 46c9e: 4eb9 0004 5660 jsr 45660 if ( old_parent_pathlen == 0 ) 46ca4: 588f addql #4,%sp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 46ca6: 2400 movel %d0,%d2 if ( old_parent_pathlen == 0 ) 46ca8: 6600 0334 bnew 46fde <_rename_r+0x352> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 46cac: 762f moveq #47,%d3 46cae: 1212 moveb %a2@,%d1 46cb0: 1001 moveb %d1,%d0 46cb2: 49c0 extbl %d0 46cb4: b680 cmpl %d0,%d3 46cb6: 670e beqs 46cc6 <_rename_r+0x3a> <== NEVER TAKEN 46cb8: 163c 005c moveb #92,%d3 46cbc: b680 cmpl %d0,%d3 46cbe: 6706 beqs 46cc6 <_rename_r+0x3a> <== NEVER TAKEN 46cc0: 4a01 tstb %d1 46cc2: 6600 01ac bnew 46e70 <_rename_r+0x1e4> 46cc6: 2079 0006 5494 moveal 65494 ,%a0 <== NOT EXECUTED 46ccc: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 46cd0: 220e movel %fp,%d1 <== NOT EXECUTED 46cd2: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 46cd8: 2841 moveal %d1,%a4 <== NOT EXECUTED 46cda: 200e movel %fp,%d0 <== NOT EXECUTED 46cdc: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 46ce2: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 46ce6: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 46cea: 26a8 0018 movel %a0@(24),%a3@ <== NOT EXECUTED 46cee: 28a8 001c movel %a0@(28),%a4@ <== NOT EXECUTED 46cf2: 2840 moveal %d0,%a4 <== NOT EXECUTED 46cf4: 28a8 0020 movel %a0@(32),%a4@ <== NOT EXECUTED 46cf8: 2aa8 0024 movel %a0@(36),%a5@ <== NOT EXECUTED 46cfc: 22a8 0028 movel %a0@(40),%a1@ <== NOT EXECUTED 46d00: 4204 clrb %d4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 46d02: 2041 moveal %d1,%a0 46d04: 2840 moveal %d0,%a4 name = old + old_parent_pathlen; 46d06: d48a addl %a2,%d2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46d08: 45f9 0005 6bac lea 56bac ,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 46d0e: 260e movel %fp,%d3 46d10: 0683 ffff ffe8 addil #-24,%d3 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 46d16: 2d50 ffec movel %a0@,%fp@(-20) 46d1a: 2d51 fff8 movel %a1@,%fp@(-8) 46d1e: 2d54 fff0 movel %a4@,%fp@(-16) 46d22: 2d55 fff4 movel %a5@,%fp@(-12) 46d26: 2d53 ffe8 movel %a3@,%fp@(-24) name = old + old_parent_pathlen; 46d2a: 2d42 fffc movel %d2,%fp@(-4) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46d2e: 2f02 movel %d2,%sp@- 46d30: 4e92 jsr %a2@ 46d32: 2e80 movel %d0,%sp@ 46d34: 2f02 movel %d2,%sp@- 46d36: 4eb9 0004 5618 jsr 45618 46d3c: d480 addl %d0,%d2 46d3e: 2d42 fffc movel %d2,%fp@(-4) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 46d42: 2f02 movel %d2,%sp@- 46d44: 4e92 jsr %a2@ 46d46: 4297 clrl %sp@ 46d48: 2f03 movel %d3,%sp@- 46d4a: 42a7 clrl %sp@- 46d4c: 2f00 movel %d0,%sp@- 46d4e: 2f02 movel %d2,%sp@- 46d50: 4eb9 0004 56d2 jsr 456d2 0, &old_loc, false ); if ( result != 0 ) { 46d56: 4fef 001c lea %sp@(28),%sp 46d5a: 4a80 tstl %d0 46d5c: 6600 01aa bnew 46f08 <_rename_r+0x27c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 46d60: 2245 moveal %d5,%a1 46d62: 742f moveq #47,%d2 46d64: 1211 moveb %a1@,%d1 46d66: 1001 moveb %d1,%d0 46d68: 49c0 extbl %d0 46d6a: b480 cmpl %d0,%d2 46d6c: 6700 00d6 beqw 46e44 <_rename_r+0x1b8> 46d70: 143c 005c moveb #92,%d2 46d74: b480 cmpl %d0,%d2 46d76: 6700 00cc beqw 46e44 <_rename_r+0x1b8> 46d7a: 4a01 tstb %d1 46d7c: 6700 00c6 beqw 46e44 <_rename_r+0x1b8> 46d80: 2079 0006 5494 moveal 65494 ,%a0 46d86: 45ee ffc0 lea %fp@(-64),%a2 46d8a: 5888 addql #4,%a0 46d8c: 4280 clrl %d0 46d8e: 2498 movel %a0@+,%a2@ 46d90: 2d58 ffc4 movel %a0@+,%fp@(-60) 46d94: 2d58 ffc8 movel %a0@+,%fp@(-56) 46d98: 2d58 ffcc movel %a0@+,%fp@(-52) 46d9c: 2d50 ffd0 movel %a0@,%fp@(-48) if ( !new_parent_loc.ops->evalformake_h ) { 46da0: 206e ffcc moveal %fp@(-52),%a0 46da4: 2068 0004 moveal %a0@(4),%a0 46da8: 4a88 tstl %a0 46daa: 6700 01e6 beqw 46f92 <_rename_r+0x306> 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 ); 46dae: 486e fffc pea %fp@(-4) 46db2: 2245 moveal %d5,%a1 46db4: 2f0a movel %a2,%sp@- 46db6: 4871 0800 pea %a1@(00000000,%d0:l) 46dba: 4e90 jsr %a0@ if ( result != 0 ) { 46dbc: 4fef 000c lea %sp@(12),%sp 46dc0: 4a80 tstl %d0 46dc2: 6600 017a bnew 46f3e <_rename_r+0x2b2> /* * 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 ) { 46dc6: 202e ffd0 movel %fp@(-48),%d0 46dca: b0ae ffe4 cmpl %fp@(-28),%d0 46dce: 6600 00d8 bnew 46ea8 <_rename_r+0x21c> 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 ) { 46dd2: 226e ffcc moveal %fp@(-52),%a1 46dd6: 2069 0040 moveal %a1@(64),%a0 46dda: 4a88 tstl %a0 46ddc: 6700 023e beqw 4701c <_rename_r+0x390> 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 ); 46de0: 2f2e fffc movel %fp@(-4),%sp@- 46de4: 2f0a movel %a2,%sp@- 46de6: 2f03 movel %d3,%sp@- 46de8: 2f0b movel %a3,%sp@- 46dea: 4e90 jsr %a0@ rtems_filesystem_freenode( &new_parent_loc ); 46dec: 206e ffcc moveal %fp@(-52),%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 ); 46df0: 2400 movel %d0,%d2 rtems_filesystem_freenode( &new_parent_loc ); 46df2: 4fef 0010 lea %sp@(16),%sp 46df6: 4a88 tstl %a0 46df8: 670e beqs 46e08 <_rename_r+0x17c> <== NEVER TAKEN 46dfa: 2068 001c moveal %a0@(28),%a0 46dfe: 4a88 tstl %a0 46e00: 6706 beqs 46e08 <_rename_r+0x17c> <== NEVER TAKEN 46e02: 2f0a movel %a2,%sp@- 46e04: 4e90 jsr %a0@ 46e06: 588f addql #4,%sp if ( free_old_parentloc ) 46e08: 4a04 tstb %d4 46e0a: 6716 beqs 46e22 <_rename_r+0x196> rtems_filesystem_freenode( &old_parent_loc ); 46e0c: 206e ffe0 moveal %fp@(-32),%a0 46e10: 4a88 tstl %a0 46e12: 670e beqs 46e22 <_rename_r+0x196> <== NEVER TAKEN 46e14: 2068 001c moveal %a0@(28),%a0 46e18: 4a88 tstl %a0 46e1a: 6706 beqs 46e22 <_rename_r+0x196> <== NEVER TAKEN 46e1c: 2f0b movel %a3,%sp@- 46e1e: 4e90 jsr %a0@ 46e20: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46e22: 206e fff4 moveal %fp@(-12),%a0 46e26: 4a88 tstl %a0 46e28: 670e beqs 46e38 <_rename_r+0x1ac> <== NEVER TAKEN 46e2a: 2068 001c moveal %a0@(28),%a0 46e2e: 4a88 tstl %a0 46e30: 6706 beqs 46e38 <_rename_r+0x1ac> <== NEVER TAKEN 46e32: 2f03 movel %d3,%sp@- 46e34: 4e90 jsr %a0@ 46e36: 588f addql #4,%sp return result; } 46e38: 2002 movel %d2,%d0 46e3a: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 46e40: 4e5e unlk %fp 46e42: 4e75 rts /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 46e44: 2079 0006 5494 moveal 65494 ,%a0 46e4a: 45ee ffc0 lea %fp@(-64),%a2 46e4e: 7001 moveq #1,%d0 46e50: 24a8 0018 movel %a0@(24),%a2@ 46e54: 2d68 001c ffc4 movel %a0@(28),%fp@(-60) 46e5a: 2d68 0020 ffc8 movel %a0@(32),%fp@(-56) 46e60: 2d68 0024 ffcc movel %a0@(36),%fp@(-52) 46e66: 2d68 0028 ffd0 movel %a0@(40),%fp@(-48) 46e6c: 6000 ff32 braw 46da0 <_rename_r+0x114> */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 46e70: 2079 0006 5494 moveal 65494 ,%a0 46e76: 47ee ffd4 lea %fp@(-44),%a3 46e7a: 5888 addql #4,%a0 46e7c: 220e movel %fp,%d1 46e7e: 0681 ffff ffd8 addil #-40,%d1 46e84: 2841 moveal %d1,%a4 46e86: 200e movel %fp,%d0 46e88: 0680 ffff ffdc addil #-36,%d0 46e8e: 4bee ffe0 lea %fp@(-32),%a5 46e92: 43ee ffe4 lea %fp@(-28),%a1 46e96: 2698 movel %a0@+,%a3@ 46e98: 2898 movel %a0@+,%a4@ 46e9a: 2840 moveal %d0,%a4 46e9c: 2898 movel %a0@+,%a4@ 46e9e: 2a98 movel %a0@+,%a5@ 46ea0: 2290 movel %a0@,%a1@ 46ea2: 4204 clrb %d4 46ea4: 6000 fe5c braw 46d02 <_rename_r+0x76> * 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 ); 46ea8: 206e ffcc moveal %fp@(-52),%a0 46eac: 4a88 tstl %a0 46eae: 670e beqs 46ebe <_rename_r+0x232> <== NEVER TAKEN 46eb0: 2068 001c moveal %a0@(28),%a0 46eb4: 4a88 tstl %a0 46eb6: 6706 beqs 46ebe <_rename_r+0x232> <== NEVER TAKEN 46eb8: 2f0a movel %a2,%sp@- 46eba: 4e90 jsr %a0@ 46ebc: 588f addql #4,%sp if ( free_old_parentloc ) 46ebe: 4a04 tstb %d4 46ec0: 6716 beqs 46ed8 <_rename_r+0x24c> rtems_filesystem_freenode( &old_parent_loc ); 46ec2: 206e ffe0 moveal %fp@(-32),%a0 46ec6: 4a88 tstl %a0 46ec8: 670e beqs 46ed8 <_rename_r+0x24c> <== NEVER TAKEN 46eca: 2068 001c moveal %a0@(28),%a0 46ece: 4a88 tstl %a0 46ed0: 6706 beqs 46ed8 <_rename_r+0x24c> <== NEVER TAKEN 46ed2: 2f0b movel %a3,%sp@- 46ed4: 4e90 jsr %a0@ 46ed6: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46ed8: 206e fff4 moveal %fp@(-12),%a0 46edc: 4a88 tstl %a0 46ede: 670e beqs 46eee <_rename_r+0x262> <== NEVER TAKEN 46ee0: 2068 001c moveal %a0@(28),%a0 46ee4: 4a88 tstl %a0 46ee6: 6706 beqs 46eee <_rename_r+0x262> <== NEVER TAKEN 46ee8: 2f03 movel %d3,%sp@- 46eea: 4e90 jsr %a0@ 46eec: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 46eee: 4eb9 0005 3b44 jsr 53b44 <__errno> 46ef4: 74ff moveq #-1,%d2 46ef6: 2040 moveal %d0,%a0 46ef8: 7012 moveq #18,%d0 46efa: 2080 movel %d0,%a0@ if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 46efc: 2002 movel %d2,%d0 46efe: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 46f04: 4e5e unlk %fp 46f06: 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 ) 46f08: 4a04 tstb %d4 46f0a: 660e bnes 46f1a <_rename_r+0x28e> <== 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 ); 46f0c: 74ff moveq #-1,%d2 <== NOT EXECUTED return result; } 46f0e: 2002 movel %d2,%d0 <== NOT EXECUTED 46f10: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 46f16: 4e5e unlk %fp <== NOT EXECUTED 46f18: 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 ); 46f1a: 206e ffe0 moveal %fp@(-32),%a0 46f1e: 4a88 tstl %a0 46f20: 67ea beqs 46f0c <_rename_r+0x280> <== NEVER TAKEN 46f22: 2028 001c movel %a0@(28),%d0 46f26: 67e4 beqs 46f0c <_rename_r+0x280> <== NEVER TAKEN 46f28: 2f0b movel %a3,%sp@- 46f2a: 2040 moveal %d0,%a0 46f2c: 74ff moveq #-1,%d2 46f2e: 4e90 jsr %a0@ 46f30: 588f addql #4,%sp if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 46f32: 2002 movel %d2,%d0 46f34: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 46f3a: 4e5e unlk %fp 46f3c: 4e75 rts 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 ); 46f3e: 206e ffcc moveal %fp@(-52),%a0 46f42: 4a88 tstl %a0 46f44: 670e beqs 46f54 <_rename_r+0x2c8> <== NEVER TAKEN 46f46: 2068 001c moveal %a0@(28),%a0 46f4a: 4a88 tstl %a0 46f4c: 6706 beqs 46f54 <_rename_r+0x2c8> <== NEVER TAKEN 46f4e: 2f0a movel %a2,%sp@- 46f50: 4e90 jsr %a0@ 46f52: 588f addql #4,%sp if ( free_old_parentloc ) 46f54: 4a04 tstb %d4 46f56: 6716 beqs 46f6e <_rename_r+0x2e2> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 46f58: 206e ffe0 moveal %fp@(-32),%a0 46f5c: 4a88 tstl %a0 46f5e: 670e beqs 46f6e <_rename_r+0x2e2> <== NEVER TAKEN 46f60: 2068 001c moveal %a0@(28),%a0 46f64: 4a88 tstl %a0 46f66: 6706 beqs 46f6e <_rename_r+0x2e2> <== NEVER TAKEN 46f68: 2f0b movel %a3,%sp@- 46f6a: 4e90 jsr %a0@ 46f6c: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46f6e: 206e fff4 moveal %fp@(-12),%a0 46f72: 4a88 tstl %a0 46f74: 6796 beqs 46f0c <_rename_r+0x280> <== NEVER TAKEN 46f76: 2028 001c movel %a0@(28),%d0 46f7a: 6790 beqs 46f0c <_rename_r+0x280> <== NEVER TAKEN 46f7c: 2f03 movel %d3,%sp@- 46f7e: 2840 moveal %d0,%a4 46f80: 74ff moveq #-1,%d2 46f82: 4e94 jsr %a4@ 46f84: 588f addql #4,%sp if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 46f86: 2002 movel %d2,%d0 46f88: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 46f8e: 4e5e unlk %fp 46f90: 4e75 rts */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) 46f92: 4a04 tstb %d4 46f94: 6716 beqs 46fac <_rename_r+0x320> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 46f96: 206e ffe0 moveal %fp@(-32),%a0 46f9a: 4a88 tstl %a0 46f9c: 670e beqs 46fac <_rename_r+0x320> <== NEVER TAKEN 46f9e: 2068 001c moveal %a0@(28),%a0 46fa2: 4a88 tstl %a0 46fa4: 6706 beqs 46fac <_rename_r+0x320> <== NEVER TAKEN 46fa6: 2f0b movel %a3,%sp@- 46fa8: 4e90 jsr %a0@ 46faa: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46fac: 206e fff4 moveal %fp@(-12),%a0 46fb0: 4a88 tstl %a0 46fb2: 670e beqs 46fc2 <_rename_r+0x336> <== NEVER TAKEN 46fb4: 2068 001c moveal %a0@(28),%a0 46fb8: 4a88 tstl %a0 46fba: 6706 beqs 46fc2 <_rename_r+0x336> <== NEVER TAKEN 46fbc: 2f03 movel %d3,%sp@- 46fbe: 4e90 jsr %a0@ 46fc0: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTSUP ); 46fc2: 4eb9 0005 3b44 jsr 53b44 <__errno> 46fc8: 74ff moveq #-1,%d2 46fca: 2040 moveal %d0,%a0 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 46fcc: 2002 movel %d2,%d0 46fce: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 46fd4: 20bc 0000 0086 movel #134,%a0@ if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 46fda: 4e5e unlk %fp 46fdc: 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, 46fde: 42a7 clrl %sp@- 46fe0: 47ee ffd4 lea %fp@(-44),%a3 46fe4: 2f0b movel %a3,%sp@- 46fe6: 4878 0002 pea 2 46fea: 2f00 movel %d0,%sp@- 46fec: 2f0a movel %a2,%sp@- 46fee: 4eb9 0004 57dc jsr 457dc RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 46ff4: 4fef 0014 lea %sp@(20),%sp 46ff8: 4a80 tstl %d0 46ffa: 6600 ff10 bnew 46f0c <_rename_r+0x280> 46ffe: 220e movel %fp,%d1 47000: 200e movel %fp,%d0 47002: 0681 ffff ffd8 addil #-40,%d1 47008: 0680 ffff ffdc addil #-36,%d0 4700e: 4bee ffe0 lea %fp@(-32),%a5 47012: 43ee ffe4 lea %fp@(-28),%a1 47016: 7801 moveq #1,%d4 47018: 6000 fce8 braw 46d02 <_rename_r+0x76> 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 ); 4701c: 2069 001c moveal %a1@(28),%a0 47020: 4a88 tstl %a0 47022: 6706 beqs 4702a <_rename_r+0x39e> <== NEVER TAKEN 47024: 2f0a movel %a2,%sp@- 47026: 4e90 jsr %a0@ 47028: 588f addql #4,%sp if ( free_old_parentloc ) 4702a: 4a04 tstb %d4 4702c: 6716 beqs 47044 <_rename_r+0x3b8> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 4702e: 206e ffe0 moveal %fp@(-32),%a0 47032: 4a88 tstl %a0 47034: 670e beqs 47044 <_rename_r+0x3b8> <== NEVER TAKEN 47036: 2068 001c moveal %a0@(28),%a0 4703a: 4a88 tstl %a0 4703c: 6706 beqs 47044 <_rename_r+0x3b8> <== NEVER TAKEN 4703e: 2f0b movel %a3,%sp@- 47040: 4e90 jsr %a0@ 47042: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 47044: 206e fff4 moveal %fp@(-12),%a0 47048: 4a88 tstl %a0 4704a: 670e beqs 4705a <_rename_r+0x3ce> <== NEVER TAKEN 4704c: 2068 001c moveal %a0@(28),%a0 47050: 4a88 tstl %a0 47052: 6706 beqs 4705a <_rename_r+0x3ce> <== NEVER TAKEN 47054: 2f03 movel %d3,%sp@- 47056: 4e90 jsr %a0@ 47058: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTSUP ); 4705a: 4eb9 0005 3b44 jsr 53b44 <__errno> 47060: 74ff moveq #-1,%d2 47062: 2240 moveal %d0,%a1 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 47064: 2002 movel %d2,%d0 47066: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 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 ); 4706c: 22bc 0000 0086 movel #134,%a1@ if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 47072: 4e5e unlk %fp ... =============================================================================== 0004a618 <_rtems_octal2ulong>: unsigned long _rtems_octal2ulong( const char *octascii, size_t len ) { 4a618: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 4a61c: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4a620: 48d7 043c moveml %d2-%d5/%a2,%sp@ <== NOT EXECUTED 4a624: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4a628: 4a88 tstl %a0 <== NOT EXECUTED 4a62a: 6738 beqs 4a664 <_rtems_octal2ulong+0x4c> <== NOT EXECUTED 4a62c: 4280 clrl %d0 <== NOT EXECUTED 4a62e: 4281 clrl %d1 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a630: 2800 movel %d0,%d4 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a632: 7a09 moveq #9,%d5 <== NOT EXECUTED 4a634: 1431 1800 moveb %a1@(00000000,%d1:l),%d2 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a638: e78c lsll #3,%d4 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4a63a: 5281 addql #1,%d1 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a63c: 2602 movel %d2,%d3 <== NOT EXECUTED 4a63e: 0683 ffff ffd0 addil #-48,%d3 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a644: 49c2 extbl %d2 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 4a646: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED 4a64c: ba83 cmpl %d3,%d5 <== NOT EXECUTED 4a64e: 6508 bcss 4a658 <_rtems_octal2ulong+0x40> <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 4a650: 2444 moveal %d4,%a2 <== NOT EXECUTED 4a652: 45f2 28d0 lea %a2@(ffffffd0,%d2:l),%a2 <== NOT EXECUTED 4a656: 200a movel %a2,%d0 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4a658: b288 cmpl %a0,%d1 <== NOT EXECUTED 4a65a: 65d4 bcss 4a630 <_rtems_octal2ulong+0x18> <== NOT EXECUTED continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); } return(num); } 4a65c: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 4a660: 4e5e unlk %fp <== NOT EXECUTED 4a662: 4e75 rts <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 4a664: 4280 clrl %d0 <== NOT EXECUTED continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); } return(num); } 4a666: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 4a66a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a66e <_rtems_tar_header_checksum>: ************************************************************************/ int _rtems_tar_header_checksum( const char *bufr ) { 4a66e: 4280 clrl %d0 <== NOT EXECUTED 4a670: 4281 clrl %d1 <== NOT EXECUTED 4a672: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4a676: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4a67a: 2f02 movel %d2,%sp@- <== NOT EXECUTED int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) 4a67c: 2041 moveal %d1,%a0 <== NOT EXECUTED 4a67e: 41e8 ff6c lea %a0@(-148),%a0 <== NOT EXECUTED 4a682: 7407 moveq #7,%d2 <== NOT EXECUTED 4a684: b488 cmpl %a0,%d2 <== NOT EXECUTED 4a686: 6516 bcss 4a69e <_rtems_tar_header_checksum+0x30><== NOT EXECUTED sum += 0xff & ' '; 4a688: 0680 0000 0020 addil #32,%d0 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4a68e: 5281 addql #1,%d1 <== NOT EXECUTED 4a690: 0c81 0000 0200 cmpil #512,%d1 <== NOT EXECUTED 4a696: 66e4 bnes 4a67c <_rtems_tar_header_checksum+0xe> <== NOT EXECUTED sum += 0xff & ' '; else sum += 0xff & bufr[i]; } return(sum); } 4a698: 241f movel %sp@+,%d2 <== NOT EXECUTED 4a69a: 4e5e unlk %fp <== NOT EXECUTED 4a69c: 4e75 rts <== NOT EXECUTED for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; 4a69e: 4282 clrl %d2 <== NOT EXECUTED 4a6a0: 1431 1800 moveb %a1@(00000000,%d1:l),%d2 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4a6a4: 5281 addql #1,%d1 <== NOT EXECUTED { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; 4a6a6: d082 addl %d2,%d0 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) 4a6a8: 0c81 0000 0200 cmpil #512,%d1 <== NOT EXECUTED 4a6ae: 66cc bnes 4a67c <_rtems_tar_header_checksum+0xe> <== NOT EXECUTED 4a6b0: 60e6 bras 4a698 <_rtems_tar_header_checksum+0x2a><== NOT EXECUTED =============================================================================== 00045246 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 45246: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4524a: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 4524e: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 45254: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 45258: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 4525a: 4ef9 0004 5160 jmp 45160 <== NOT EXECUTED =============================================================================== 0004e630 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4e630: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4e634: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4e63a: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4e63c: 4ef9 0004 e3c8 jmp 4e3c8 <== NOT EXECUTED ... =============================================================================== 0005b7a4 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5b7a4: 4e56 0000 linkw %fp,#0 5b7a8: 222e 0010 movel %fp@(16),%d1 5b7ac: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 5b7b0: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5b7b6: 2d41 000c movel %d1,%fp@(12) 5b7ba: 2d40 0008 movel %d0,%fp@(8) } 5b7be: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5b7c0: 4ef9 0005 b900 jmp 5b900 ... =============================================================================== 0004481c : int access( const char *path, int amode ) { 4481c: 4e56 ffb8 linkw %fp,#-72 44820: 2f02 movel %d2,%sp@- struct stat statbuf; if ( stat(path, &statbuf) ) 44822: 486e ffba pea %fp@(-70) 44826: 2f2e 0008 movel %fp@(8),%sp@- int access( const char *path, int amode ) { 4482a: 242e 000c movel %fp@(12),%d2 struct stat statbuf; if ( stat(path, &statbuf) ) 4482e: 4eb9 0004 66cc jsr 466cc 44834: 508f addql #8,%sp 44836: 4a80 tstl %d0 44838: 6626 bnes 44860 return -1; if ( amode & R_OK ) { 4483a: 44c2 movew %d2,%ccr 4483c: 6716 beqs 44854 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 4483e: 0802 0001 btst #1,%d2 44842: 6626 bnes 4486a if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 44844: 0802 0000 btst #0,%d2 44848: 6632 bnes 4487c if ( !( statbuf.st_mode & S_IEXEC ) ) 4484a: 4280 clrl %d0 return -1; } return 0; } 4484c: 242e ffb4 movel %fp@(-76),%d2 44850: 4e5e unlk %fp 44852: 4e75 rts if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 44854: 202e ffc6 movel %fp@(-58),%d0 44858: 0280 0000 0100 andil #256,%d0 4485e: 66de bnes 4483e if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 44860: 242e ffb4 movel %fp@(-76),%d2 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 44864: 70ff moveq #-1,%d0 return -1; } return 0; } 44866: 4e5e unlk %fp 44868: 4e75 rts if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 4486a: 202e ffc6 movel %fp@(-58),%d0 4486e: 0280 0000 0080 andil #128,%d0 44874: 67ea beqs 44860 return -1; } if ( amode & X_OK ) { 44876: 0802 0000 btst #0,%d2 4487a: 67ce beqs 4484a <== NEVER TAKEN if ( !( statbuf.st_mode & S_IEXEC ) ) 4487c: 7040 moveq #64,%d0 4487e: c0ae ffc6 andl %fp@(-58),%d0 44882: 67dc beqs 44860 44884: 4280 clrl %d0 44886: 60c4 bras 4484c =============================================================================== 00045cfc : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 45cfc: 4e56 ffec linkw %fp,#-20 45d00: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 45d04: 246e 0008 moveal %fp@(8),%a2 45d08: 266e 000c moveal %fp@(12),%a3 long adjustment; /* * Simple validations */ if ( !delta ) 45d0c: 4a8a tstl %a2 45d0e: 6700 00ec beqw 45dfc rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 45d12: 202a 0004 movel %a2@(4),%d0 45d16: 0c80 000f 423f cmpil #999999,%d0 45d1c: 6200 00de bhiw 45dfc rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 45d20: 4a8b tstl %a3 45d22: 670a beqs 45d2e olddelta->tv_sec = 0; olddelta->tv_usec = 0; 45d24: 42ab 0004 clrl %a3@(4) 45d28: 202a 0004 movel %a2@(4),%d0 if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; 45d2c: 4293 clrl %a3@ olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 45d2e: 223c 000f 4240 movel #1000000,%d1 45d34: 4c12 1800 mulsl %a2@,%d1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 45d38: d081 addl %d1,%d0 45d3a: b0b9 0005 ed10 cmpl 5ed10 ,%d0 45d40: 640c bccs 45d4e _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 45d42: 4280 clrl %d0 return 0; } 45d44: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 45d4a: 4e5e unlk %fp 45d4c: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45d4e: 2039 0006 05f0 movel 605f0 <_Thread_Dispatch_disable_level>,%d0 45d54: 5280 addql #1,%d0 45d56: 23c0 0006 05f0 movel %d0,605f0 <_Thread_Dispatch_disable_level> * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 45d5c: 240e movel %fp,%d2 45d5e: 5182 subql #8,%d2 45d60: 2f02 movel %d2,%sp@- 45d62: 4eb9 0004 7690 jsr 47690 <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 45d68: 202a 0004 movel %a2@(4),%d0 45d6c: 223c 0000 03e8 movel #1000,%d1 45d72: 4c01 0800 mulsl %d1,%d0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 45d76: 588f addql #4,%sp _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 45d78: 2212 movel %a2@,%d1 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 45d7a: d0ae fffc addl %fp@(-4),%d0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 45d7e: d3ae fff8 addl %d1,%fp@(-8) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 45d82: 2d40 fffc movel %d0,%fp@(-4) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 45d86: 0c80 3b9a c9ff cmpil #999999999,%d0 45d8c: 631c blss 45daa 45d8e: 222e fff8 movel %fp@(-8),%d1 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 45d92: 5281 addql #1,%d1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 45d94: 0680 c465 3600 addil #-1000000000,%d0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 45d9a: 0c80 3b9a c9ff cmpil #999999999,%d0 45da0: 62f0 bhis 45d92 <== NEVER TAKEN 45da2: 2d41 fff8 movel %d1,%fp@(-8) 45da6: 2d40 fffc movel %d0,%fp@(-4) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 45daa: 0c80 c465 3600 cmpil #-1000000000,%d0 45db0: 621c bhis 45dce <== NEVER TAKEN 45db2: 222e fff8 movel %fp@(-8),%d1 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 45db6: 5381 subql #1,%d1 ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 45db8: 0680 3b9a ca00 addil #1000000000,%d0 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 45dbe: 0c80 c465 3600 cmpil #-1000000000,%d0 45dc4: 63f0 blss 45db6 45dc6: 2d40 fffc movel %d0,%fp@(-4) 45dca: 2d41 fff8 movel %d1,%fp@(-8) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 45dce: 2f02 movel %d2,%sp@- 45dd0: 4eb9 0004 775c jsr 4775c <_TOD_Set> _Thread_Enable_dispatch(); 45dd6: 4eb9 0004 8944 jsr 48944 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 45ddc: 588f addql #4,%sp 45dde: 4a8b tstl %a3 45de0: 6700 ff60 beqw 45d42 *olddelta = *delta; 45de4: 4280 clrl %d0 45de6: 2212 movel %a2@,%d1 45de8: 242a 0004 movel %a2@(4),%d2 45dec: 2681 movel %d1,%a3@ 45dee: 2742 0004 movel %d2,%a3@(4) return 0; } 45df2: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 45df8: 4e5e unlk %fp 45dfa: 4e75 rts */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 45dfc: 4eb9 0004 f78c jsr 4f78c <__errno> 45e02: 7216 moveq #22,%d1 45e04: 2040 moveal %d0,%a0 45e06: 70ff moveq #-1,%d0 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 45e08: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 45e0e: 2081 movel %d1,%a0@ /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 45e10: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047c80 : } unsigned int alarm( unsigned int seconds ) { 47c80: 4e56 fff4 linkw %fp,#-12 47c84: 48d7 001c moveml %d2-%d4,%sp@ 47c88: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 47c8c: 4ab9 0006 3e10 tstl 63e10 <_POSIX_signals_Alarm_timer+0x1c> 47c92: 674e beqs 47ce2 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 47c94: 4879 0006 3df4 pea 63df4 <_POSIX_signals_Alarm_timer> 47c9a: 4eb9 0004 ca20 jsr 4ca20 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 47ca0: 588f addql #4,%sp 47ca2: 7201 moveq #1,%d1 47ca4: 5580 subql #2,%d0 47ca6: b280 cmpl %d0,%d1 47ca8: 645e bccs 47d08 47caa: 4283 clrl %d3 remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 47cac: 4a82 tstl %d2 47cae: 660c bnes 47cbc <== NEVER TAKEN _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 47cb0: 2003 movel %d3,%d0 47cb2: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 47cb8: 4e5e unlk %fp 47cba: 4e75 rts ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 47cbc: 4879 0006 3df4 pea 63df4 <_POSIX_signals_Alarm_timer> 47cc2: 4879 0006 415c pea 6415c <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47cc8: 23c2 0006 3e00 movel %d2,63e00 <_POSIX_signals_Alarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 47cce: 4eb9 0004 c8d8 jsr 4c8d8 <_Watchdog_Insert> 47cd4: 508f addql #8,%sp 47cd6: 2003 movel %d3,%d0 47cd8: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 47cde: 4e5e unlk %fp 47ce0: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47ce2: 42b9 0006 3dfc clrl 63dfc <_POSIX_signals_Alarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 47ce8: 4283 clrl %d3 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47cea: 203c 0004 7d2c movel #294188,%d0 the_watchdog->id = id; 47cf0: 42b9 0006 3e14 clrl 63e14 <_POSIX_signals_Alarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47cf6: 23c0 0006 3e10 movel %d0,63e10 <_POSIX_signals_Alarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 47cfc: 42b9 0006 3e18 clrl 63e18 <_POSIX_signals_Alarm_timer+0x24> remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 47d02: 4a82 tstl %d2 47d04: 67aa beqs 47cb0 <== NEVER TAKEN 47d06: 60b4 bras 47cbc * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 47d08: 2839 0006 3e0c movel 63e0c <_POSIX_signals_Alarm_timer+0x18>,%d4 47d0e: 98b9 0006 3e08 subl 63e08 <_POSIX_signals_Alarm_timer+0x14>,%d4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 47d14: 2639 0006 3e00 movel 63e00 <_POSIX_signals_Alarm_timer+0xc>,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 47d1a: 4eb9 0004 a4e0 jsr 4a4e0 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 47d20: 4c40 4004 remul %d0,%d4,%d4 47d24: 9684 subl %d4,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 47d26: 4a82 tstl %d2 47d28: 6786 beqs 47cb0 <== NEVER TAKEN 47d2a: 6090 bras 47cbc =============================================================================== 0004a608 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a608: 4e56 0000 linkw %fp,#0 length = nelem * elsize; 4a60c: 41ee 0008 lea %fp@(8),%a0 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a610: 52b9 0005 ee38 addql #1,5ee38 4a616: 2f03 movel %d3,%sp@- length = nelem * elsize; 4a618: 262e 000c movel %fp@(12),%d3 4a61c: 4c10 3800 mulsl %a0@,%d3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a620: 2f02 movel %d2,%sp@- length = nelem * elsize; cptr = malloc( length ); 4a622: 2f03 movel %d3,%sp@- 4a624: 4eb9 0004 ac8c jsr 4ac8c if ( cptr ) 4a62a: 588f addql #4,%sp size_t length; MSBUMP(calloc_calls, 1); length = nelem * elsize; cptr = malloc( length ); 4a62c: 2400 movel %d0,%d2 if ( cptr ) 4a62e: 6710 beqs 4a640 <== NEVER TAKEN memset( cptr, '\0', length ); 4a630: 2f03 movel %d3,%sp@- 4a632: 42a7 clrl %sp@- 4a634: 2f00 movel %d0,%sp@- 4a636: 4eb9 0004 f484 jsr 4f484 4a63c: 4fef 000c lea %sp@(12),%sp MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ return cptr; } 4a640: 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 */ 4a642: 53b9 0005 ee28 subql #1,5ee28 return cptr; } 4a648: 242e fff8 movel %fp@(-8),%d2 4a64c: 262e fffc movel %fp@(-4),%d3 4a650: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cb24 : #include int chdir( const char *pathname ) { 4cb24: 4e56 ffec linkw %fp,#-20 4cb28: 2f0a movel %a2,%sp@- 4cb2a: 2f02 movel %d2,%sp@- 4cb2c: 242e 0008 movel %fp@(8),%d2 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 4cb30: 6700 0098 beqw 4cbca /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4cb34: 2f02 movel %d2,%sp@- rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4cb36: 45ee ffec lea %fp@(-20),%a2 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4cb3a: 4eb9 0005 21ac jsr 521ac rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4cb40: 7201 moveq #1,%d1 4cb42: 2e81 movel %d1,%sp@ 4cb44: 2f0a movel %a2,%sp@- 4cb46: 4878 0001 pea 1 4cb4a: 2f00 movel %d0,%sp@- 4cb4c: 2f02 movel %d2,%sp@- 4cb4e: 4eb9 0004 326c jsr 4326c pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4cb54: 4fef 0014 lea %sp@(20),%sp 4cb58: 4a80 tstl %d0 4cb5a: 6660 bnes 4cbbc return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4cb5c: 226e fff8 moveal %fp@(-8),%a1 4cb60: 2069 0010 moveal %a1@(16),%a0 4cb64: 4a88 tstl %a0 4cb66: 6700 00ac beqw 4cc14 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4cb6a: 2f0a movel %a2,%sp@- 4cb6c: 4e90 jsr %a0@ 4cb6e: 588f addql #4,%sp 4cb70: 7201 moveq #1,%d1 4cb72: b280 cmpl %d0,%d1 4cb74: 666e bnes 4cbe4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 4cb76: 2079 0006 045c moveal 6045c ,%a0 4cb7c: 2268 0010 moveal %a0@(16),%a1 4cb80: 4a89 tstl %a1 4cb82: 6716 beqs 4cb9a <== NEVER TAKEN 4cb84: 2269 001c moveal %a1@(28),%a1 4cb88: 4a89 tstl %a1 4cb8a: 670e beqs 4cb9a <== NEVER TAKEN 4cb8c: 4868 0004 pea %a0@(4) 4cb90: 4e91 jsr %a1@ 4cb92: 2079 0006 045c moveal 6045c ,%a0 4cb98: 588f addql #4,%sp rtems_filesystem_current = loc; 4cb9a: 5888 addql #4,%a0 4cb9c: 4280 clrl %d0 4cb9e: 20d2 movel %a2@,%a0@+ 4cba0: 20ee fff0 movel %fp@(-16),%a0@+ 4cba4: 20ee fff4 movel %fp@(-12),%a0@+ 4cba8: 20ee fff8 movel %fp@(-8),%a0@+ return 0; } 4cbac: 242e ffe4 movel %fp@(-28),%d2 rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 4cbb0: 20ae fffc movel %fp@(-4),%a0@ return 0; } 4cbb4: 246e ffe8 moveal %fp@(-24),%a2 4cbb8: 4e5e unlk %fp 4cbba: 4e75 rts 4cbbc: 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 ) 4cbc0: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4cbc2: 246e ffe8 moveal %fp@(-24),%a2 4cbc6: 4e5e unlk %fp 4cbc8: 4e75 rts { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 4cbca: 4eb9 0005 0e30 jsr 50e30 <__errno> 4cbd0: 740e moveq #14,%d2 4cbd2: 2040 moveal %d0,%a0 4cbd4: 70ff moveq #-1,%d0 4cbd6: 2082 movel %d2,%a0@ rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4cbd8: 242e ffe4 movel %fp@(-28),%d2 4cbdc: 246e ffe8 moveal %fp@(-24),%a2 4cbe0: 4e5e unlk %fp 4cbe2: 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 ); 4cbe4: 206e fff8 moveal %fp@(-8),%a0 4cbe8: 4a88 tstl %a0 4cbea: 670e beqs 4cbfa <== NEVER TAKEN 4cbec: 2068 001c moveal %a0@(28),%a0 4cbf0: 4a88 tstl %a0 4cbf2: 6706 beqs 4cbfa <== NEVER TAKEN 4cbf4: 2f0a movel %a2,%sp@- 4cbf6: 4e90 jsr %a0@ 4cbf8: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 4cbfa: 4eb9 0005 0e30 jsr 50e30 <__errno> rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4cc00: 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 ); 4cc04: 2040 moveal %d0,%a0 4cc06: 7214 moveq #20,%d1 4cc08: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4cc0a: 246e ffe8 moveal %fp@(-24),%a2 4cc0e: 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 ); 4cc10: 2081 movel %d1,%a0@ rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4cc12: 4e75 rts /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 4cc14: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4cc18: 4a88 tstl %a0 <== NOT EXECUTED 4cc1a: 6706 beqs 4cc22 <== NOT EXECUTED 4cc1c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4cc1e: 4e90 jsr %a0@ <== NOT EXECUTED 4cc20: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4cc22: 4eb9 0005 0e30 jsr 50e30 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4cc28: 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 ); 4cc2c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cc2e: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 4cc30: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 4cc34: 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 ); 4cc36: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } ... =============================================================================== 00044b20 : int chmod( const char *path, mode_t mode ) { 44b20: 4e56 ffec linkw %fp,#-20 44b24: 2f03 movel %d3,%sp@- 44b26: 262e 0008 movel %fp@(8),%d3 44b2a: 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 ); 44b2c: 240e movel %fp,%d2 44b2e: 0682 ffff ffec addil #-20,%d2 44b34: 2f03 movel %d3,%sp@- 44b36: 4eb9 0005 4e94 jsr 54e94 44b3c: 7201 moveq #1,%d1 44b3e: 2e81 movel %d1,%sp@ 44b40: 2f02 movel %d2,%sp@- 44b42: 42a7 clrl %sp@- 44b44: 2f00 movel %d0,%sp@- 44b46: 2f03 movel %d3,%sp@- 44b48: 4eb9 0004 50cc jsr 450cc if ( status != 0 ) 44b4e: 4fef 0014 lea %sp@(20),%sp 44b52: 4a80 tstl %d0 44b54: 6640 bnes 44b96 return -1; if ( !loc.handlers ){ 44b56: 206e fff4 moveal %fp@(-12),%a0 44b5a: 4a88 tstl %a0 44b5c: 677c beqs 44bda <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 44b5e: 2068 001c moveal %a0@(28),%a0 44b62: 4a88 tstl %a0 44b64: 6740 beqs 44ba6 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 44b66: 2f2e 000c movel %fp@(12),%sp@- 44b6a: 2f02 movel %d2,%sp@- 44b6c: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 44b6e: 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 ); 44b72: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 44b74: 508f addql #8,%sp 44b76: 4a88 tstl %a0 44b78: 670e beqs 44b88 <== NEVER TAKEN 44b7a: 2068 001c moveal %a0@(28),%a0 44b7e: 4a88 tstl %a0 44b80: 6706 beqs 44b88 <== NEVER TAKEN 44b82: 2f02 movel %d2,%sp@- 44b84: 4e90 jsr %a0@ 44b86: 588f addql #4,%sp return result; } 44b88: 2003 movel %d3,%d0 44b8a: 242e ffe4 movel %fp@(-28),%d2 44b8e: 262e ffe8 movel %fp@(-24),%d3 44b92: 4e5e unlk %fp 44b94: 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 ) 44b96: 76ff moveq #-1,%d3 result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44b98: 2003 movel %d3,%d0 44b9a: 242e ffe4 movel %fp@(-28),%d2 44b9e: 262e ffe8 movel %fp@(-24),%d3 44ba2: 4e5e unlk %fp 44ba4: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 44ba6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44baa: 4a88 tstl %a0 <== NOT EXECUTED 44bac: 670e beqs 44bbc <== NOT EXECUTED 44bae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44bb2: 4a88 tstl %a0 <== NOT EXECUTED 44bb4: 6706 beqs 44bbc <== NOT EXECUTED 44bb6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44bb8: 4e90 jsr %a0@ <== NOT EXECUTED 44bba: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44bbc: 4eb9 0005 3480 jsr 53480 <__errno> <== NOT EXECUTED 44bc2: 76ff moveq #-1,%d3 <== NOT EXECUTED 44bc4: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44bc6: 2003 movel %d3,%d0 <== NOT EXECUTED 44bc8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 44bcc: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 44bd0: 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 ); 44bd2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44bd8: 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 ); 44bda: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44bde: 4a88 tstl %a0 <== NOT EXECUTED 44be0: 670e beqs 44bf0 <== NOT EXECUTED 44be2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44be6: 4a88 tstl %a0 <== NOT EXECUTED 44be8: 6706 beqs 44bf0 <== NOT EXECUTED 44bea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44bec: 4e90 jsr %a0@ <== NOT EXECUTED 44bee: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 44bf0: 4eb9 0005 3480 jsr 53480 <__errno> <== NOT EXECUTED 44bf6: 76ff moveq #-1,%d3 <== NOT EXECUTED 44bf8: 2040 moveal %d0,%a0 <== NOT EXECUTED 44bfa: 7009 moveq #9,%d0 <== NOT EXECUTED 44bfc: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44bfe: 2003 movel %d3,%d0 <== NOT EXECUTED 44c00: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 44c04: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 44c08: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044c0c : int chown( const char *path, uid_t owner, gid_t group ) { 44c0c: 4e56 ffdc linkw %fp,#-36 44c10: 48d7 003c moveml %d2-%d5,%sp@ 44c14: 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 ) ) 44c18: 240e movel %fp,%d2 44c1a: 0682 ffff ffec addil #-20,%d2 44c20: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 44c22: 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 ) ) 44c26: 4eb9 0005 4e94 jsr 54e94 44c2c: 7201 moveq #1,%d1 44c2e: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 44c30: 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 ) ) 44c34: 2f02 movel %d2,%sp@- 44c36: 42a7 clrl %sp@- 44c38: 2f00 movel %d0,%sp@- 44c3a: 2f03 movel %d3,%sp@- 44c3c: 4eb9 0004 50cc jsr 450cc 44c42: 4fef 0014 lea %sp@(20),%sp 44c46: 4a80 tstl %d0 44c48: 6640 bnes 44c8a return -1; if ( !loc.ops->chown_h ) { 44c4a: 226e fff8 moveal %fp@(-8),%a1 44c4e: 2069 0018 moveal %a1@(24),%a0 44c52: 4a88 tstl %a0 44c54: 6742 beqs 44c98 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 44c56: 3f05 movew %d5,%sp@- 44c58: 4267 clrw %sp@- 44c5a: 3f04 movew %d4,%sp@- 44c5c: 4267 clrw %sp@- 44c5e: 2f02 movel %d2,%sp@- 44c60: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 44c62: 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 ); 44c66: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 44c68: 4fef 000c lea %sp@(12),%sp 44c6c: 4a88 tstl %a0 44c6e: 670e beqs 44c7e <== NEVER TAKEN 44c70: 2068 001c moveal %a0@(28),%a0 44c74: 4a88 tstl %a0 44c76: 6706 beqs 44c7e <== NEVER TAKEN 44c78: 2f02 movel %d2,%sp@- 44c7a: 4e90 jsr %a0@ 44c7c: 588f addql #4,%sp return result; } 44c7e: 2003 movel %d3,%d0 44c80: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 44c86: 4e5e unlk %fp 44c88: 4e75 rts ) { rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 44c8a: 76ff moveq #-1,%d3 result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 44c8c: 2003 movel %d3,%d0 44c8e: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 44c94: 4e5e unlk %fp 44c96: 4e75 rts if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 44c98: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 44c9c: 4a88 tstl %a0 <== NOT EXECUTED 44c9e: 6706 beqs 44ca6 <== NOT EXECUTED 44ca0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44ca2: 4e90 jsr %a0@ <== NOT EXECUTED 44ca4: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44ca6: 4eb9 0005 3480 jsr 53480 <__errno> <== NOT EXECUTED 44cac: 76ff moveq #-1,%d3 <== NOT EXECUTED 44cae: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 44cb0: 2003 movel %d3,%d0 <== NOT EXECUTED 44cb2: 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 ); 44cb8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 44cbe: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042cd8 : #include int chroot( const char *pathname ) { 42cd8: 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) { 42cdc: 203c 0006 1ab8 movel #400056,%d0 #include int chroot( const char *pathname ) { 42ce2: 2f0b movel %a3,%sp@- 42ce4: 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) { 42ce6: b0b9 0006 045c cmpl 6045c ,%d0 42cec: 6700 0086 beqw 42d74 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); 42cf0: 2f2e 0008 movel %fp@(8),%sp@- 42cf4: 4eb9 0004 cb24 jsr 4cb24 if (result) { 42cfa: 588f addql #4,%sp 42cfc: 4a80 tstl %d0 42cfe: 6600 00a6 bnew 42da6 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 42d02: 42a7 clrl %sp@- 42d04: 45ee ffec lea %fp@(-20),%a2 42d08: 2f0a movel %a2,%sp@- 42d0a: 42a7 clrl %sp@- 42d0c: 4878 0001 pea 1 42d10: 4879 0005 f4d5 pea 5f4d5 <__FUNCTION__.5390+0x18> 42d16: 4eb9 0004 326c jsr 4326c 42d1c: 4fef 0014 lea %sp@(20),%sp 42d20: 4a80 tstl %d0 42d22: 6600 0082 bnew 42da6 /* 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); 42d26: 2079 0006 045c moveal 6045c ,%a0 42d2c: 2268 0024 moveal %a0@(36),%a1 42d30: 4a89 tstl %a1 42d32: 6716 beqs 42d4a <== NEVER TAKEN 42d34: 2269 001c moveal %a1@(28),%a1 42d38: 4a89 tstl %a1 42d3a: 670e beqs 42d4a <== NEVER TAKEN 42d3c: 4868 0018 pea %a0@(24) 42d40: 4e91 jsr %a1@ 42d42: 2079 0006 045c moveal 6045c ,%a0 42d48: 588f addql #4,%sp rtems_filesystem_root = loc; 42d4a: 2152 0018 movel %a2@,%a0@(24) 42d4e: 4280 clrl %d0 42d50: 216e fff0 001c movel %fp@(-16),%a0@(28) 42d56: 216e fff4 0020 movel %fp@(-12),%a0@(32) 42d5c: 216e fff8 0024 movel %fp@(-8),%a0@(36) return 0; } 42d62: 246e ffe4 moveal %fp@(-28),%a2 42d66: 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; 42d6a: 216e fffc 0028 movel %fp@(-4),%a0@(40) return 0; } 42d70: 4e5e unlk %fp 42d72: 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*/ 42d74: 4eb9 0004 4580 jsr 44580 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 42d7a: 203c 0006 1ab8 movel #400056,%d0 42d80: b0b9 0006 045c cmpl 6045c ,%d0 42d86: 6600 ff68 bnew 42cf0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 42d8a: 4eb9 0005 0e30 jsr 50e30 <__errno> <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42d90: 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 ); 42d94: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d96: 70ff moveq #-1,%d0 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42d98: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42d9c: 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 ); 42d9e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42da4: 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 ); 42da6: 45f9 0005 0e30 lea 50e30 <__errno>,%a2 <== NOT EXECUTED 42dac: 4e92 jsr %a2@ <== NOT EXECUTED 42dae: 2640 moveal %d0,%a3 <== NOT EXECUTED 42db0: 4e92 jsr %a2@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42db2: 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 ); 42db6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42db8: 70ff moveq #-1,%d0 <== NOT EXECUTED 42dba: 2690 movel %a0@,%a3@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 42dbc: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42dc0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045c38 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 45c38: 4e56 0000 linkw %fp,#0 45c3c: 202e 0008 movel %fp@(8),%d0 45c40: 222e 000c movel %fp@(12),%d1 45c44: 2f02 movel %d2,%sp@- if ( !tp ) 45c46: 4a81 tstl %d1 45c48: 6718 beqs 45c62 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 45c4a: 7401 moveq #1,%d2 45c4c: b480 cmpl %d0,%d2 45c4e: 6752 beqs 45ca2 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 45c50: 7404 moveq #4,%d2 45c52: b480 cmpl %d0,%d2 45c54: 6738 beqs 45c8e <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 45c56: 7402 moveq #2,%d2 45c58: b480 cmpl %d0,%d2 45c5a: 6732 beqs 45c8e return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 45c5c: 7203 moveq #3,%d1 45c5e: b280 cmpl %d0,%d1 45c60: 6716 beqs 45c78 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c62: 4eb9 0004 fc54 jsr 4fc54 <__errno> return 0; } 45c68: 242e fffc movel %fp@(-4),%d2 #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c6c: 2040 moveal %d0,%a0 45c6e: 7216 moveq #22,%d1 45c70: 70ff moveq #-1,%d0 return 0; } 45c72: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c74: 2081 movel %d1,%a0@ return 0; } 45c76: 4e75 rts } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 45c78: 4eb9 0004 fc54 jsr 4fc54 <__errno> 45c7e: 7458 moveq #88,%d2 45c80: 2040 moveal %d0,%a0 45c82: 70ff moveq #-1,%d0 45c84: 2082 movel %d2,%a0@ #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c86: 242e fffc movel %fp@(-4),%d2 45c8a: 4e5e unlk %fp 45c8c: 4e75 rts } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 45c8e: 2f01 movel %d1,%sp@- 45c90: 4eb9 0004 7d80 jsr 47d80 <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c96: 242e fffc movel %fp@(-4),%d2 #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); return 0; 45c9a: 588f addql #4,%sp } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 45c9c: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c9e: 4e5e unlk %fp 45ca0: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 45ca2: 2f01 movel %d1,%sp@- 45ca4: 4eb9 0004 7ce4 jsr 47ce4 <_TOD_Get> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45caa: 242e fffc movel %fp@(-4),%d2 if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0; 45cae: 588f addql #4,%sp { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 45cb0: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45cb2: 4e5e unlk %fp ... =============================================================================== 00045cb8 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 45cb8: 4e56 0000 linkw %fp,#0 45cbc: 202e 0008 movel %fp@(8),%d0 45cc0: 206e 000c moveal %fp@(12),%a0 if ( !tp ) 45cc4: 4a88 tstl %a0 45cc6: 6712 beqs 45cda <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 45cc8: 7201 moveq #1,%d1 45cca: b280 cmpl %d0,%d1 45ccc: 6730 beqs 45cfe _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 45cce: 7202 moveq #2,%d1 45cd0: b280 cmpl %d0,%d1 45cd2: 6718 beqs 45cec rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 45cd4: 7203 moveq #3,%d1 45cd6: b280 cmpl %d0,%d1 45cd8: 6712 beqs 45cec rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 45cda: 4eb9 0004 fc54 jsr 4fc54 <__errno> 45ce0: 7216 moveq #22,%d1 45ce2: 2040 moveal %d0,%a0 45ce4: 70ff moveq #-1,%d0 return 0; } 45ce6: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 45ce8: 2081 movel %d1,%a0@ return 0; } 45cea: 4e75 rts else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 45cec: 4eb9 0004 fc54 jsr 4fc54 <__errno> 45cf2: 7258 moveq #88,%d1 45cf4: 2040 moveal %d0,%a0 45cf6: 70ff moveq #-1,%d0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45cf8: 4e5e unlk %fp else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 45cfa: 2081 movel %d1,%a0@ #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45cfc: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 45cfe: 203c 21da e4ff movel #567993599,%d0 45d04: b090 cmpl %a0@,%d0 45d06: 64d2 bccs 45cda rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45d08: 2039 0006 0ed8 movel 60ed8 <_Thread_Dispatch_disable_level>,%d0 45d0e: 5280 addql #1,%d0 45d10: 23c0 0006 0ed8 movel %d0,60ed8 <_Thread_Dispatch_disable_level> rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 45d16: 2f08 movel %a0,%sp@- 45d18: 4eb9 0004 7dd8 jsr 47dd8 <_TOD_Set> _Thread_Enable_dispatch(); 45d1e: 4eb9 0004 8fc0 jsr 48fc0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 45d24: 588f addql #4,%sp if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 45d26: 4280 clrl %d0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45d28: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a654 : #include int close( int fd ) { 4a654: 4e56 0000 linkw %fp,#0 4a658: 202e 0008 movel %fp@(8),%d0 4a65c: 2f0a movel %a2,%sp@- 4a65e: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 4a660: b0b9 0005 d714 cmpl 5d714 ,%d0 4a666: 645e bccs 4a6c6 iop = rtems_libio_iop(fd); 4a668: 2479 0005 ee18 moveal 5ee18 ,%a2 4a66e: ed88 lsll #6,%d0 4a670: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a672: 202a 0014 movel %a2@(20),%d0 4a676: 0280 0000 0100 andil #256,%d0 4a67c: 6748 beqs 4a6c6 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4a67e: 206a 003c moveal %a2@(60),%a0 4a682: 2068 0004 moveal %a0@(4),%a0 4a686: 4a88 tstl %a0 4a688: 6738 beqs 4a6c2 <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 4a68a: 2f0a movel %a2,%sp@- 4a68c: 4e90 jsr %a0@ 4a68e: 588f addql #4,%sp 4a690: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 4a692: 206a 0024 moveal %a2@(36),%a0 4a696: 4a88 tstl %a0 4a698: 6710 beqs 4a6aa <== NEVER TAKEN 4a69a: 2068 001c moveal %a0@(28),%a0 4a69e: 4a88 tstl %a0 4a6a0: 6708 beqs 4a6aa 4a6a2: 486a 0018 pea %a2@(24) 4a6a6: 4e90 jsr %a0@ 4a6a8: 588f addql #4,%sp rtems_libio_free( iop ); 4a6aa: 2f0a movel %a2,%sp@- 4a6ac: 4eb9 0004 aa6a jsr 4aa6a return rc; } 4a6b2: 246e fffc moveal %fp@(-4),%a2 4a6b6: 2002 movel %d2,%d0 rc = (*iop->handlers->close_h)( iop ); rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; 4a6b8: 588f addql #4,%sp } 4a6ba: 242e fff8 movel %fp@(-8),%d2 4a6be: 4e5e unlk %fp 4a6c0: 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 ) 4a6c2: 4282 clrl %d2 <== NOT EXECUTED 4a6c4: 60cc bras 4a692 <== 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); 4a6c6: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 4a6cc: 74ff moveq #-1,%d2 4a6ce: 2040 moveal %d0,%a0 4a6d0: 7009 moveq #9,%d0 4a6d2: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; } 4a6d4: 2002 movel %d2,%d0 4a6d6: 242e fff8 movel %fp@(-8),%d2 4a6da: 246e fffc moveal %fp@(-4),%a2 4a6de: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000497ec : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 497ec: 4e56 fff4 linkw %fp,#-12 497f0: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 497f4: 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; 497f8: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 497fc: 42ae fff8 clrl %fp@(-8) args.mode = 0; 49800: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 49804: 2f29 000c movel %a1@(12),%sp@- 49808: 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; 4980c: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 49810: 4eb9 0004 ac7c jsr 4ac7c np->major, np->minor, (void *) &args ); if ( status ) { 49816: 4fef 000c lea %sp@(12),%sp 4981a: 4a80 tstl %d0 4981c: 6604 bnes 49822 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 4981e: 4e5e unlk %fp 49820: 4e75 rts np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 49822: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49824: 4eb9 0004 98fc jsr 498fc <== NOT EXECUTED 4982a: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4982c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049842 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 49842: 4e56 ffdc linkw %fp,#-36 49846: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4984a: 286e 0014 moveal %fp@(20),%a4 4984e: 2c2e 0008 movel %fp@(8),%d6 49852: 262e 000c movel %fp@(12),%d3 assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 49856: 2814 movel %a4@,%d4 if (!device_name_table) 49858: 6700 008a beqw 498e4 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4985c: 2a39 0005 acf8 movel 5acf8 ,%d5 49862: 673c beqs 498a0 <== NEVER 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 ); 49864: 4280 clrl %d0 49866: 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) 49868: 4bf9 0004 d354 lea 4d354 ,%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) 4986e: 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++) { 49870: 5282 addql #1,%d2 if (!device_name_table[i].device_name) 49872: e989 lsll #4,%d1 49874: 2041 moveal %d1,%a0 49876: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4987a: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 4987e: 2453 moveal %a3@,%a2 49880: 4a8a tstl %a2 49882: 6716 beqs 4989a continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 49884: 2f03 movel %d3,%sp@- 49886: 2f0a movel %a2,%sp@- 49888: 2f06 movel %d6,%sp@- 4988a: 4e95 jsr %a5@ 4988c: 4fef 000c lea %sp@(12),%sp 49890: 4a80 tstl %d0 49892: 6606 bnes 4989a continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 49894: 4a32 3800 tstb %a2@(00000000,%d3:l) 49898: 671e beqs 498b8 <== 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++) { 4989a: 2002 movel %d2,%d0 4989c: b485 cmpl %d5,%d2 4989e: 65ce bcss 4986e pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 498a0: 4eb9 0004 c04c jsr 4c04c <__errno> 498a6: 7202 moveq #2,%d1 498a8: 2040 moveal %d0,%a0 498aa: 70ff moveq #-1,%d0 } 498ac: 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 ); 498b2: 2081 movel %d1,%a0@ } 498b4: 4e5e unlk %fp 498b6: 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; 498b8: 2079 0005 ae70 moveal 5ae70 ,%a0 498be: 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; 498c4: 223c 0005 ae24 movel #372260,%d1 pathloc->ops = &devFS_ops; 498ca: 41f9 0005 addc lea 5addc ,%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; 498d0: 2941 0008 movel %d1,%a4@(8) pathloc->ops = &devFS_ops; 498d4: 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]; 498d8: 288b movel %a3,%a4@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 498da: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 498e0: 4e5e unlk %fp 498e2: 4e75 rts } /* 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 ); 498e4: 4eb9 0004 c04c jsr 4c04c <__errno> <== NOT EXECUTED 498ea: 740e moveq #14,%d2 <== NOT EXECUTED 498ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 498ee: 70ff moveq #-1,%d0 <== NOT EXECUTED 498f0: 2082 movel %d2,%a0@ <== NOT EXECUTED return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 498f2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 498f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042028 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 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 acf8 movel 5acf8 ,%d0 42032: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 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 ) { 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 95a8 jsr 495a8 <_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 acf8 movel 5acf8 ,%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 c89c jsr 4c89c 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 ae24 movel #372260,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 42074: 41f9 0005 addc lea 5addc ,%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 c04c jsr 4c04c <__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 6730 jsr 46730 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 98fc jsr 498fc <== 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 acf8 movel 5acf8 ,%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 ce78 lea 4ce78 ,%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 d33c jsr 4d33c 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 c04c jsr 4c04c <__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 c04c jsr 4c04c <__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 c04c jsr 4c04c <__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 c04c jsr 4c04c <__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 687c jsr 4687c 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 98fc jsr 498fc <== 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 68d8 jsr 468d8 <== 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 98fc jsr 498fc <== 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 c04c jsr 4c04c <__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 6934 jsr 46934 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 98fc jsr 498fc <== NOT EXECUTED 423c0: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 423c2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004c676 : */ int device_close( rtems_libio_t *iop ) { 4c676: 4e56 fff4 linkw %fp,#-12 4c67a: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4c67e: 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; 4c682: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4c686: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4c68a: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4c68e: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4c692: 2f28 0050 movel %a0@(80),%sp@- 4c696: 2f28 004c movel %a0@(76),%sp@- 4c69a: 4eb9 0004 dce0 jsr 4dce0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4c6a0: 4fef 000c lea %sp@(12),%sp 4c6a4: 4a80 tstl %d0 4c6a6: 6604 bnes 4c6ac <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 4c6a8: 4e5e unlk %fp 4c6aa: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4c6ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c6ae: 4eb9 0004 e348 jsr 4e348 <== NOT EXECUTED 4c6b4: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4c6b6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c55e : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4c55e: 4e56 fff0 linkw %fp,#-16 4c562: 226e 0008 moveal %fp@(8),%a1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4c566: 486e fff0 pea %fp@(-16) rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4c56a: 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; 4c570: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4c576: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4c57a: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4c57e: 2f28 0050 movel %a0@(80),%sp@- 4c582: 2f28 004c movel %a0@(76),%sp@- 4c586: 4eb9 0004 dd3c jsr 4dd3c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c58c: 4fef 000c lea %sp@(12),%sp 4c590: 4a80 tstl %d0 4c592: 6608 bnes 4c59c <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 4c594: 202e fffc movel %fp@(-4),%d0 } 4c598: 4e5e unlk %fp 4c59a: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4c59c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c59e: 4eb9 0004 e348 jsr 4e348 <== NOT EXECUTED 4c5a4: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4c5a6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c6ba : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4c6ba: 4e56 fff4 linkw %fp,#-12 4c6be: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4c6c2: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4c6c6: 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; 4c6cc: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4c6d0: 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; 4c6d6: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4c6da: 2f29 0050 movel %a1@(80),%sp@- 4c6de: 2f29 004c movel %a1@(76),%sp@- 4c6e2: 4eb9 0004 dd98 jsr 4dd98 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c6e8: 4fef 000c lea %sp@(12),%sp 4c6ec: 4a80 tstl %d0 4c6ee: 6604 bnes 4c6f4 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 4c6f0: 4e5e unlk %fp 4c6f2: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4c6f4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c6f6: 4eb9 0004 e348 jsr 4e348 <== NOT EXECUTED 4c6fc: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4c6fe: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004c610 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4c610: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4c614: 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( 4c618: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4c61c: 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; 4c622: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4c628: 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; 4c62e: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4c632: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4c636: 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; 4c63a: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4c63e: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4c642: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4c646: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4c64a: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4c64e: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4c652: 4eb9 0004 ddf4 jsr 4ddf4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c658: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c65c: 4a80 tstl %d0 <== NOT EXECUTED 4c65e: 6608 bnes 4c668 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4c660: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4c664: 4e5e unlk %fp <== NOT EXECUTED 4c666: 4e75 rts <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4c668: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c66a: 4eb9 0004 e348 jsr 4e348 <== NOT EXECUTED 4c670: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4c672: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c5aa : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4c5aa: 4e56 ffe4 linkw %fp,#-28 4c5ae: 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( 4c5b2: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4c5b6: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4c5bc: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4c5c2: 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; 4c5c8: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4c5cc: 2028 000c movel %a0@(12),%d0 4c5d0: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4c5d4: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4c5d8: 2d40 ffe8 movel %d0,%fp@(-24) 4c5dc: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4c5e0: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4c5e4: 2f29 0050 movel %a1@(80),%sp@- 4c5e8: 2f29 004c movel %a1@(76),%sp@- 4c5ec: 4eb9 0004 de50 jsr 4de50 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c5f2: 4fef 000c lea %sp@(12),%sp 4c5f6: 4a80 tstl %d0 4c5f8: 6608 bnes 4c602 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4c5fa: 202e fffc movel %fp@(-4),%d0 } 4c5fe: 4e5e unlk %fp 4c600: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4c602: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c604: 4eb9 0004 e348 jsr 4e348 <== NOT EXECUTED 4c60a: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4c60c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000443aa : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 443aa: 4e56 fff4 linkw %fp,#-12 443ae: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 443b2: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 443b6: 4aaa 00b4 tstl %a2@(180) 443ba: 6750 beqs 4440c rtems_interrupt_disable (level); 443bc: 243c 0000 0700 movel #1792,%d2 443c2: 2002 movel %d2,%d0 443c4: 40c1 movew %sr,%d1 443c6: 8081 orl %d1,%d0 443c8: 46c0 movew %d0,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 443ca: 206a 0084 moveal %a2@(132),%a0 443ce: 202a 0080 movel %a2@(128),%d0 443d2: b088 cmpl %a0,%d0 443d4: 6734 beqs 4440a 443d6: 47f9 0004 5d2c lea 45d2c ,%a3 tty->rawOutBufState = rob_wait; 443dc: 7002 moveq #2,%d0 443de: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 443e2: 46c1 movew %d1,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 443e4: 42a7 clrl %sp@- 443e6: 42a7 clrl %sp@- 443e8: 2f2a 008c movel %a2@(140),%sp@- 443ec: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 443ee: 4fef 000c lea %sp@(12),%sp 443f2: 4a80 tstl %d0 443f4: 6620 bnes 44416 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 443f6: 2002 movel %d2,%d0 443f8: 40c1 movew %sr,%d1 443fa: 8081 orl %d1,%d0 443fc: 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) { 443fe: 206a 0084 moveal %a2@(132),%a0 44402: 202a 0080 movel %a2@(128),%d0 44406: b088 cmpl %a0,%d0 44408: 66d2 bnes 443dc RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 4440a: 46c1 movew %d1,%sr } } 4440c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44412: 4e5e unlk %fp 44414: 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); 44416: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44418: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED =============================================================================== 00043394 : int dup2( int fildes, int fildes2 ) { 43394: 4e56 ffac linkw %fp,#-84 43398: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 4339c: 240e movel %fp,%d2 4339e: 0682 ffff ffba addil #-70,%d2 433a4: 45f9 0004 3d70 lea 43d70 ,%a2 433aa: 2f02 movel %d2,%sp@- int dup2( int fildes, int fildes2 ) { 433ac: 262e 0008 movel %fp@(8),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 433b0: 2f03 movel %d3,%sp@- 433b2: 4e92 jsr %a2@ if ( status == -1 ) 433b4: 508f addql #8,%sp 433b6: 72ff moveq #-1,%d1 433b8: b280 cmpl %d0,%d1 433ba: 660c bnes 433c8 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433bc: 70ff moveq #-1,%d0 } 433be: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 433c4: 4e5e unlk %fp 433c6: 4e75 rts /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 433c8: 2f02 movel %d2,%sp@- 433ca: 2f2e 000c movel %fp@(12),%sp@- 433ce: 4e92 jsr %a2@ if ( status == -1 ) 433d0: 508f addql #8,%sp 433d2: 72ff moveq #-1,%d1 433d4: b280 cmpl %d0,%d1 433d6: 67e4 beqs 433bc <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433d8: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 433dc: 42a7 clrl %sp@- <== NOT EXECUTED 433de: 2f03 movel %d3,%sp@- <== NOT EXECUTED 433e0: 4eb9 0004 3908 jsr 43908 <== NOT EXECUTED 433e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 433ea: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 433f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043dcc : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43dcc: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 43dd0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43dd2: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 43dd6: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43dd8: 242a 003c movel %a2@(60),%d2 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43ddc: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43de0: 0282 0000 0200 andil #512,%d2 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43de6: 1001 moveb %d1,%d0 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43de8: 4a82 tstl %d2 <== NOT EXECUTED 43dea: 673e beqs 43e2a <== NOT EXECUTED 43dec: 1001 moveb %d1,%d0 <== NOT EXECUTED 43dee: 2079 0005 d8ec moveal 5d8ec <__ctype_ptr__>,%a0 <== NOT EXECUTED 43df4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43dfa: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 <== NOT EXECUTED 43dfe: 49c2 extbl %d2 <== NOT EXECUTED 43e00: 0802 0005 btst #5,%d2 <== NOT EXECUTED 43e04: 670e beqs 43e14 <== NOT EXECUTED 43e06: 7409 moveq #9,%d2 <== NOT EXECUTED 43e08: b480 cmpl %d0,%d2 <== NOT EXECUTED 43e0a: 6708 beqs 43e14 <== NOT EXECUTED 43e0c: 143c 000a moveb #10,%d2 <== NOT EXECUTED 43e10: b480 cmpl %d0,%d2 <== NOT EXECUTED 43e12: 662a bnes 43e3e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 43e14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e18: 4eba fdd2 jsr %pc@(43bec ) <== NOT EXECUTED 43e1c: 508f addql #8,%sp <== NOT EXECUTED } } 43e1e: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 43e22: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43e26: 4e5e unlk %fp <== NOT EXECUTED 43e28: 4e75 rts <== NOT EXECUTED 43e2a: 1001 moveb %d1,%d0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 43e2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e2e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43e34: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e36: 4eba fdb4 jsr %pc@(43bec ) <== NOT EXECUTED 43e3a: 508f addql #8,%sp <== NOT EXECUTED 43e3c: 60e0 bras 43e1e <== 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); 43e3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e40: 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; 43e44: 7040 moveq #64,%d0 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 43e46: 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; 43e4a: 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] = '^'; 43e4c: 745e moveq #94,%d2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 43e4e: 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] = '^'; 43e52: 1d42 fffe moveb %d2,%fp@(-2) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 43e56: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 43e5c: 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; 43e60: 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')) { 43e64: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 43e68: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43e6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000430a0 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 430a0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 430a4: 2039 0006 1de6 movel 61de6 ,%d0 <== NOT EXECUTED 430aa: 670a beqs 430b6 <== NOT EXECUTED fclose(group_fp); 430ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 430ae: 4eb9 0005 0dba jsr 50dba <== NOT EXECUTED 430b4: 588f addql #4,%sp <== NOT EXECUTED } 430b6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000430ba : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 430ba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 430be: 2039 0006 1cfe movel 61cfe ,%d0 <== NOT EXECUTED 430c4: 670a beqs 430d0 <== NOT EXECUTED fclose(passwd_fp); 430c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 430c8: 4eb9 0005 0dba jsr 50dba <== NOT EXECUTED 430ce: 588f addql #4,%sp <== NOT EXECUTED } 430d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043e70 : * 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) { 43e70: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 43e74: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 43e78: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 43e7c: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED if (tty->ccount == 0) 43e80: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43e84: 6732 beqs 43eb8 <== NOT EXECUTED return; if (lineFlag) { 43e86: 4a84 tstl %d4 <== NOT EXECUTED 43e88: 6738 beqs 43ec2 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 43e8a: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43e8e: 44c3 movew %d3,%ccr <== NOT EXECUTED 43e90: 6a00 01ae bplw 44040 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 43e94: 0803 0004 btst #4,%d3 <== NOT EXECUTED 43e98: 662c bnes 43ec6 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 43e9a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e9c: 4280 clrl %d0 <== NOT EXECUTED 43e9e: 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; 43ea2: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 43ea6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ea8: 4eba ff22 jsr %pc@(43dcc ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 43eac: 508f addql #8,%sp <== NOT EXECUTED 43eae: 7020 moveq #32,%d0 <== NOT EXECUTED 43eb0: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43eb4: 6600 0198 bnew 4404e <== NOT EXECUTED } } if (!lineFlag) break; } } 43eb8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 43ebe: 4e5e unlk %fp <== NOT EXECUTED 43ec0: 4e75 rts <== NOT EXECUTED 43ec2: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43ec6: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 43ecc: 5381 subql #1,%d1 <== NOT EXECUTED 43ece: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED 43ed2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 43ed6: 1031 1800 moveb %a1@(00000000,%d1:l),%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43eda: 44c3 movew %d3,%ccr <== NOT EXECUTED 43edc: 6a36 bpls 43f14 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 43ede: 4a84 tstl %d4 <== NOT EXECUTED 43ee0: 6608 bnes 43eea <== NOT EXECUTED 43ee2: 0803 0004 btst #4,%d3 <== NOT EXECUTED 43ee6: 6700 013e beqw 44026 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 43eea: 7409 moveq #9,%d2 <== NOT EXECUTED 43eec: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43ef2: b480 cmpl %d0,%d2 <== NOT EXECUTED 43ef4: 6700 008e beqw 43f84 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 43ef8: 2400 movel %d0,%d2 <== NOT EXECUTED 43efa: 5282 addql #1,%d2 <== NOT EXECUTED 43efc: 2079 0005 d8ec moveal 5d8ec <__ctype_ptr__>,%a0 <== NOT EXECUTED 43f02: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43f06: 49c0 extbl %d0 <== NOT EXECUTED 43f08: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43f0c: 6752 beqs 43f60 <== NOT EXECUTED 43f0e: 0803 0009 btst #9,%d3 <== NOT EXECUTED 43f12: 6610 bnes 43f24 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 43f14: 4a84 tstl %d4 <== NOT EXECUTED 43f16: 67a0 beqs 43eb8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 43f18: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43f1c: 679a beqs 43eb8 <== NOT EXECUTED 43f1e: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43f22: 60a8 bras 43ecc <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 43f24: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43f26: 4878 0003 pea 3 <== NOT EXECUTED 43f2a: 4879 0005 c67b pea 5c67b <== NOT EXECUTED 43f30: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 43f32: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43f36: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43f3a: 6706 beqs 43f42 <== NOT EXECUTED tty->column--; 43f3c: 5380 subql #1,%d0 <== NOT EXECUTED 43f3e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 43f42: 2079 0005 d8ec moveal 5d8ec <__ctype_ptr__>,%a0 <== NOT EXECUTED 43f48: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43f4c: 49c0 extbl %d0 <== NOT EXECUTED 43f4e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43f52: 670c beqs 43f60 <== NOT EXECUTED 43f54: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43f58: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 43f5e: 67b4 beqs 43f14 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43f60: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43f62: 4878 0003 pea 3 <== NOT EXECUTED 43f66: 4879 0005 c67b pea 5c67b <== NOT EXECUTED 43f6c: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED if (tty->column) 43f72: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43f76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43f7a: 6798 beqs 43f14 <== NOT EXECUTED tty->column--; 43f7c: 5380 subql #1,%d0 <== NOT EXECUTED 43f7e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 43f82: 6090 bras 43f14 <== 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; 43f84: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 43f88: 4a81 tstl %d1 <== NOT EXECUTED 43f8a: 6734 beqs 43fc0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 43f8c: 2879 0005 d8ec moveal 5d8ec <__ctype_ptr__>,%a4 <== NOT EXECUTED 43f92: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43f94: 0283 0000 0200 andil #512,%d3 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 43f9a: 4285 clrl %d5 <== NOT EXECUTED 43f9c: 1a31 0800 moveb %a1@(00000000,%d0:l),%d5 <== NOT EXECUTED 43fa0: 5280 addql #1,%d0 <== NOT EXECUTED 43fa2: 2045 moveal %d5,%a0 <== NOT EXECUTED if (c == '\t') { 43fa4: 7a09 moveq #9,%d5 <== NOT EXECUTED 43fa6: ba88 cmpl %a0,%d5 <== NOT EXECUTED 43fa8: 676c beqs 44016 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 43faa: 1a34 8801 moveb %a4@(00000001,%a0:l),%d5 <== NOT EXECUTED 43fae: 49c5 extbl %d5 <== NOT EXECUTED 43fb0: 0805 0005 btst #5,%d5 <== NOT EXECUTED 43fb4: 6758 beqs 4400e <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43fb6: 4a83 tstl %d3 <== NOT EXECUTED 43fb8: 6702 beqs 43fbc <== NOT EXECUTED col += 2; 43fba: 5482 addql #2,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 43fbc: b081 cmpl %d1,%d0 <== NOT EXECUTED 43fbe: 66da bnes 43f9a <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fc0: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 43fc4: 6c00 ff4e bgew 43f14 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 43fc8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fca: 4878 0001 pea 1 <== NOT EXECUTED 43fce: 4879 0005 c67d pea 5c67d <== NOT EXECUTED 43fd4: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43fd6: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43fda: 5380 subql #1,%d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fdc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 43fe0: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fe4: b082 cmpl %d2,%d0 <== NOT EXECUTED 43fe6: 6f00 ff2c blew 43f14 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 43fea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fec: 4878 0001 pea 1 <== NOT EXECUTED 43ff0: 4879 0005 c67d pea 5c67d <== NOT EXECUTED 43ff6: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43ff8: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43ffc: 5380 subql #1,%d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43ffe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 44002: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 44006: b082 cmpl %d2,%d0 <== NOT EXECUTED 44008: 6ebe bgts 43fc8 <== NOT EXECUTED 4400a: 6000 ff08 braw 43f14 <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 4400e: 5282 addql #1,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 44010: b081 cmpl %d1,%d0 <== NOT EXECUTED 44012: 6686 bnes 43f9a <== NOT EXECUTED 44014: 60aa bras 43fc0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 44016: 1a3c 0007 moveb #7,%d5 <== NOT EXECUTED 4401a: 8485 orl %d5,%d2 <== NOT EXECUTED 4401c: 5282 addql #1,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4401e: b081 cmpl %d1,%d0 <== NOT EXECUTED 44020: 6600 ff78 bnew 43f9a <== NOT EXECUTED 44024: 609a bras 43fc0 <== 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); 44026: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4402a: 4280 clrl %d0 <== NOT EXECUTED 4402c: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 44030: 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); 44036: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 4403a: 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); 4403c: 6000 fd8e braw 43dcc <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 44040: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED } } if (!lineFlag) break; } } 44044: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4404a: 4e5e unlk %fp <== NOT EXECUTED 4404c: 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); 4404e: 700a moveq #10,%d0 <== NOT EXECUTED 44050: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } } if (!lineFlag) break; } } 44054: 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); 4405a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 4405e: 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); 44060: 6000 fd6a braw 43dcc <== NOT EXECUTED =============================================================================== 00043908 : int fcntl( int fd, int cmd, ... ) { 43908: 4e56 fff4 linkw %fp,#-12 4390c: 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, ...)); 43910: 41ee 0010 lea %fp@(16),%a0 43914: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43918: 242e 000c movel %fp@(12),%d2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4391c: 2239 0006 1664 movel 61664 ,%d1 43922: b280 cmpl %d0,%d1 43924: 6300 0192 blsw 43ab8 iop = rtems_libio_iop( fd ); 43928: 2279 0006 2d6c moveal 62d6c ,%a1 4392e: ed88 lsll #6,%d0 43930: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 43934: 202a 0014 movel %a2@(20),%d0 43938: 0800 0008 btst #8,%d0 4393c: 6700 017a beqw 43ab8 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 43940: 7609 moveq #9,%d3 43942: b682 cmpl %d2,%d3 43944: 641a bccs 43960 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 43946: 4eb9 0005 1618 jsr 51618 <__errno> 4394c: 76ff moveq #-1,%d3 4394e: 2040 moveal %d0,%a0 43950: 7016 moveq #22,%d0 43952: 2080 movel %d0,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43954: 2003 movel %d3,%d0 43956: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4395c: 4e5e unlk %fp 4395e: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 43960: 363b 2a08 movew %pc@(4396a ,%d2:l:2),%d3 43964: 48c3 extl %d3 43966: 4efb 3802 jmp %pc@(4396a ,%d3:l) 4396a: 00b8 00ac 009c oril #11272348,%d0 <== NOT EXECUTED 43970: 0082 0030 0014 oril #3145748,%d2 <== NOT EXECUTED 43976: 0014 024 <== NOT EXECUTED 43978: 0014 024 <== NOT EXECUTED 4397a: 0014 024 <== NOT EXECUTED 4397c: 0014 024 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4397e: 4eb9 0005 1618 jsr 51618 <__errno> 43984: 76ff moveq #-1,%d3 43986: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43988: 2003 movel %d3,%d0 4398a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 43990: 20bc 0000 0086 movel #134,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43996: 4e5e unlk %fp 43998: 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 ) ); 4399a: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 4399c: 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 ) ); 4399e: 4eb9 0004 4280 jsr 44280 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 439a4: 222a 0014 movel %a2@(20),%d1 439a8: 588f addql #4,%sp 439aa: 0280 0000 0201 andil #513,%d0 439b0: 0281 ffff fdfe andil #-514,%d1 439b6: 8081 orl %d1,%d0 439b8: 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) { 439bc: 206a 003c moveal %a2@(60),%a0 439c0: 2068 0030 moveal %a0@(48),%a0 439c4: 4a88 tstl %a0 439c6: 678c beqs 43954 <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 439c8: 2f0a movel %a2,%sp@- 439ca: 2f02 movel %d2,%sp@- 439cc: 4e90 jsr %a0@ if (err) { 439ce: 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 ); 439d0: 2400 movel %d0,%d2 if (err) { 439d2: 6780 beqs 43954 <== ALWAYS TAKEN errno = err; 439d4: 4eb9 0005 1618 jsr 51618 <__errno> <== NOT EXECUTED 439da: 76ff moveq #-1,%d3 <== NOT EXECUTED 439dc: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 439de: 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; 439e0: 2082 movel %d2,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 439e2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 439e8: 4e5e unlk %fp <== NOT EXECUTED 439ea: 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 ); 439ec: 2f00 movel %d0,%sp@- 439ee: 4eb9 0004 3ff0 jsr 43ff0 439f4: 588f addql #4,%sp 439f6: 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) { 439f8: 6cc2 bges 439bc <== ALWAYS TAKEN va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 439fa: 2003 movel %d3,%d0 <== NOT EXECUTED 439fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43a02: 4e5e unlk %fp <== NOT EXECUTED 43a04: 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 ) ) 43a06: 4a90 tstl %a0@ 43a08: 6766 beqs 43a70 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 43a0a: 4283 clrl %d3 43a0c: 08c0 000b bset #11,%d0 43a10: 2540 0014 movel %d0,%a2@(20) 43a14: 60a6 bras 439bc 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); 43a16: 2600 movel %d0,%d3 43a18: 720b moveq #11,%d1 43a1a: e2ab lsrl %d1,%d3 43a1c: 7001 moveq #1,%d0 43a1e: c680 andl %d0,%d3 43a20: 609a bras 439bc * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 43a22: 2010 movel %a0@,%d0 if ( fd2 ) 43a24: 6700 00ac beqw 43ad2 diop = rtems_libio_iop( fd2 ); 43a28: b081 cmpl %d1,%d0 <== NOT EXECUTED 43a2a: 6452 bccs 43a7e <== NOT EXECUTED 43a2c: ed88 lsll #6,%d0 <== NOT EXECUTED 43a2e: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 43a32: 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); 43a34: 9689 subl %a1,%d3 <== NOT EXECUTED 43a36: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43a38: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 43a3e: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 43a44: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 43a4a: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 43a50: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43a56: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 43a5c: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 43a62: 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) { 43a68: 4a83 tstl %d3 43a6a: 6c00 ff50 bgew 439bc 43a6e: 608a bras 439fa <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 43a70: 4283 clrl %d3 <== NOT EXECUTED 43a72: 0880 000b bclr #11,%d0 <== NOT EXECUTED 43a76: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED 43a7a: 6000 ff40 braw 439bc <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 43a7e: 91c8 subal %a0,%a0 <== NOT EXECUTED 43a80: 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); 43a82: 9689 subl %a1,%d3 <== NOT EXECUTED 43a84: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43a86: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 43a8c: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 43a92: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 43a98: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 43a9e: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43aa4: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 43aaa: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 43ab0: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED 43ab6: 60b0 bras 43a68 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43ab8: 4eb9 0005 1618 jsr 51618 <__errno> <== NOT EXECUTED 43abe: 76ff moveq #-1,%d3 <== NOT EXECUTED 43ac0: 7209 moveq #9,%d1 <== NOT EXECUTED 43ac2: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43ac4: 2003 movel %d3,%d0 <== NOT EXECUTED 43ac6: 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); 43acc: 2081 movel %d1,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43ace: 4e5e unlk %fp <== NOT EXECUTED 43ad0: 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(); 43ad2: 4eb9 0004 41c8 jsr 441c8 43ad8: 2040 moveal %d0,%a0 if ( diop == 0 ) { 43ada: 4a80 tstl %d0 43adc: 6740 beqs 43b1e <== NEVER TAKEN 43ade: 2279 0006 2d6c moveal 62d6c ,%a1 43ae4: 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); 43ae6: 9689 subl %a1,%d3 43ae8: ec83 asrl #6,%d3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43aea: 216a 0018 0018 movel %a2@(24),%a0@(24) 43af0: 216a 001c 001c movel %a2@(28),%a0@(28) 43af6: 216a 0020 0020 movel %a2@(32),%a0@(32) 43afc: 216a 0024 0024 movel %a2@(36),%a0@(36) ret = -1; break; } } diop->handlers = iop->handlers; 43b02: 216a 003c 003c movel %a2@(60),%a0@(60) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 43b08: 216a 0028 0028 movel %a2@(40),%a0@(40) break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 43b0e: 216a 0038 0038 movel %a2@(56),%a0@(56) diop->flags = iop->flags; 43b14: 216a 0014 0014 movel %a2@(20),%a0@(20) 43b1a: 6000 ff4c braw 43a68 if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); if ( diop == 0 ) { 43b1e: 76ff moveq #-1,%d3 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 43b20: 2003 movel %d3,%d0 <== NOT EXECUTED 43b22: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43b28: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043b50 : #include int fdatasync( int fd ) { 43b50: 4e56 0000 linkw %fp,#0 43b54: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43b58: b0b9 0006 1664 cmpl 61664 ,%d0 43b5e: 642c bccs 43b8c iop = rtems_libio_iop( fd ); 43b60: 2079 0006 2d6c moveal 62d6c ,%a0 43b66: ed88 lsll #6,%d0 43b68: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43b6a: 2028 0014 movel %a0@(20),%d0 43b6e: 0800 0008 btst #8,%d0 43b72: 6718 beqs 43b8c <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43b74: 44c0 movew %d0,%ccr 43b76: 6626 bnes 43b9e /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 43b78: 2268 003c moveal %a0@(60),%a1 43b7c: 2269 002c moveal %a1@(44),%a1 43b80: 4a89 tstl %a1 43b82: 672c beqs 43bb0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43b84: 2d48 0008 movel %a0,%fp@(8) } 43b88: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43b8a: 4ed1 jmp %a1@ { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43b8c: 4eb9 0005 1618 jsr 51618 <__errno> 43b92: 7209 moveq #9,%d1 43b94: 2040 moveal %d0,%a0 if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b96: 70ff moveq #-1,%d0 43b98: 4e5e unlk %fp { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43b9a: 2081 movel %d1,%a0@ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b9c: 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 ); 43b9e: 4eb9 0005 1618 jsr 51618 <__errno> if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43ba4: 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 ); 43ba6: 2040 moveal %d0,%a0 43ba8: 7016 moveq #22,%d0 43baa: 2080 movel %d0,%a0@ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43bac: 70ff moveq #-1,%d0 43bae: 4e75 rts /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43bb0: 4eb9 0005 1618 jsr 51618 <__errno> return (*iop->handlers->fdatasync_h)( iop ); } 43bb6: 4e5e unlk %fp /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43bb8: 2040 moveal %d0,%a0 return (*iop->handlers->fdatasync_h)( iop ); } 43bba: 70ff moveq #-1,%d0 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43bbc: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fdatasync_h)( iop ); } =============================================================================== 0004cce8 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4cce8: 4e56 ffdc linkw %fp,#-36 4ccec: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4ccf0: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4ccf2: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4ccf6: 47f9 0004 5d2c lea 45d2c ,%a3 4ccfc: 42a7 clrl %sp@- 4ccfe: 2f39 0005 e724 movel 5e724 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4cd04: 262e 000c movel %fp@(12),%d3 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4cd08: 4e93 jsr %a3@ 4cd0a: 4fef 000c lea %sp@(12),%sp 4cd0e: 4a80 tstl %d0 4cd10: 6710 beqs 4cd22 <== NEVER TAKEN 4cd12: 347c fffc moveaw #-4,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4cd16: 200a movel %a2,%d0 4cd18: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4cd1e: 4e5e unlk %fp 4cd20: 4e75 rts if (rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4cd22: 2414 movel %a4@,%d2 <== NOT EXECUTED if (pipe == NULL) { 4cd24: 6700 00ea beqw 4ce10 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4cd28: 42a7 clrl %sp@- <== NOT EXECUTED 4cd2a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cd2c: 42a7 clrl %sp@- <== NOT EXECUTED 4cd2e: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4cd32: 4e93 jsr %a3@ <== NOT EXECUTED 4cd34: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cd38: 4a80 tstl %d0 <== NOT EXECUTED 4cd3a: 6758 beqs 4cd94 <== NOT EXECUTED 4cd3c: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4cd40: 4a94 tstl %a4@ <== NOT EXECUTED 4cd42: 6700 020e beqw 4cf52 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4cd46: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4cd4c: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED 4cd52: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4cd54: 588f addql #4,%sp <== NOT EXECUTED 4cd56: 4a8a tstl %a2 <== NOT EXECUTED 4cd58: 66bc bnes 4cd16 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4cd5a: 2043 moveal %d3,%a0 <== NOT EXECUTED 4cd5c: 7006 moveq #6,%d0 <== NOT EXECUTED 4cd5e: 7404 moveq #4,%d2 <== NOT EXECUTED 4cd60: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4cd64: c081 andl %d1,%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4cd66: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4cd68: b480 cmpl %d0,%d2 <== NOT EXECUTED 4cd6a: 6700 0212 beqw 4cf7e <== NOT EXECUTED 4cd6e: 7206 moveq #6,%d1 <== NOT EXECUTED 4cd70: b280 cmpl %d0,%d1 <== NOT EXECUTED 4cd72: 6700 0232 beqw 4cfa6 <== NOT EXECUTED 4cd76: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 4cd7a: b480 cmpl %d0,%d2 <== NOT EXECUTED 4cd7c: 6720 beqs 4cd9e <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4cd7e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cd82: 95ca subal %a2,%a2 <== NOT EXECUTED 4cd84: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4cd86: 588f addql #4,%sp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 4cd88: 200a movel %a2,%d0 <== NOT EXECUTED 4cd8a: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4cd90: 4e5e unlk %fp <== NOT EXECUTED 4cd92: 4e75 rts <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4cd94: 95ca subal %a2,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4cd96: 4a94 tstl %a4@ <== NOT EXECUTED 4cd98: 66ac bnes 4cd46 <== NOT EXECUTED 4cd9a: 6000 01b6 braw 4cf52 <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4cd9e: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4cda2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cda4: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4cda6: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4cdaa: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4cdae: 4a80 tstl %d0 <== NOT EXECUTED 4cdb0: 6700 02a6 beqw 4d058 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4cdb4: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4cdb8: 66c4 bnes 4cd7e <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4cdba: 7001 moveq #1,%d0 <== NOT EXECUTED 4cdbc: 2043 moveal %d3,%a0 <== NOT EXECUTED 4cdbe: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4cdc2: 66ba bnes 4cd7e <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4cdc4: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 4cdc8: 243c 0004 dafc movel #318204,%d2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4cdce: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cdd2: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4cdd4: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cdd6: 42a7 clrl %sp@- <== NOT EXECUTED 4cdd8: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cddc: 4e90 jsr %a0@ <== NOT EXECUTED 4cdde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cde2: 4a80 tstl %d0 <== NOT EXECUTED 4cde4: 6600 0344 bnew 4d12a <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4cde8: 42a7 clrl %sp@- <== NOT EXECUTED 4cdea: 42a7 clrl %sp@- <== NOT EXECUTED 4cdec: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cdf0: 4e93 jsr %a3@ <== NOT EXECUTED 4cdf2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cdf6: 4a80 tstl %d0 <== NOT EXECUTED 4cdf8: 6600 0330 bnew 4d12a <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4cdfc: b8aa 0024 cmpl %a2@(36),%d4 <== NOT EXECUTED 4ce00: 67cc beqs 4cdce <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4ce02: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ce06: 95ca subal %a2,%a2 <== NOT EXECUTED 4ce08: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4ce0a: 588f addql #4,%sp <== NOT EXECUTED 4ce0c: 6000 ff7a braw 4cd88 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4ce10: 4878 0034 pea 34 <== NOT EXECUTED 4ce14: 45f9 0004 ac8c lea 4ac8c ,%a2 <== NOT EXECUTED 4ce1a: 4e92 jsr %a2@ <== NOT EXECUTED if (pipe == NULL) 4ce1c: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4ce1e: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4ce20: 2400 movel %d0,%d2 <== NOT EXECUTED if (pipe == NULL) 4ce22: 6700 031a beqw 4d13e <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4ce26: 4878 0200 pea 200 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4ce2a: 2040 moveal %d0,%a0 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4ce2c: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4ce32: 4298 clrl %a0@+ <== NOT EXECUTED 4ce34: 5888 addql #4,%a0 <== NOT EXECUTED 4ce36: 4298 clrl %a0@+ <== NOT EXECUTED 4ce38: 4298 clrl %a0@+ <== NOT EXECUTED 4ce3a: 4298 clrl %a0@+ <== NOT EXECUTED 4ce3c: 4298 clrl %a0@+ <== NOT EXECUTED 4ce3e: 4298 clrl %a0@+ <== NOT EXECUTED 4ce40: 4298 clrl %a0@+ <== NOT EXECUTED 4ce42: 4298 clrl %a0@+ <== NOT EXECUTED 4ce44: 4298 clrl %a0@+ <== NOT EXECUTED 4ce46: 4298 clrl %a0@+ <== NOT EXECUTED 4ce48: 4298 clrl %a0@+ <== NOT EXECUTED 4ce4a: 4290 clrl %a0@ <== NOT EXECUTED pipe->Size = PIPE_BUF; 4ce4c: 2b40 0004 movel %d0,%a5@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4ce50: 4e92 jsr %a2@ <== NOT EXECUTED if (! pipe->Buffer) 4ce52: 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); 4ce54: 2a80 movel %d0,%a5@ <== NOT EXECUTED if (! pipe->Buffer) 4ce56: 6700 0304 beqw 4d15c <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4ce5a: 486d 002c pea %a5@(44) <== NOT EXECUTED 4ce5e: 45f9 0004 d918 lea 4d918 ,%a2 <== NOT EXECUTED 4ce64: 1039 0005 d8b0 moveb 5d8b0 ,%d0 <== NOT EXECUTED 4ce6a: 42a7 clrl %sp@- <== NOT EXECUTED 4ce6c: 49c0 extbl %d0 <== NOT EXECUTED 4ce6e: 42a7 clrl %sp@- <== NOT EXECUTED 4ce70: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4ce76: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ce78: 4e92 jsr %a2@ <== NOT EXECUTED 4ce7a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4ce7e: 4a80 tstl %d0 <== NOT EXECUTED 4ce80: 6600 0226 bnew 4d0a8 <== 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( 4ce84: 486d 0030 pea %a5@(48) <== NOT EXECUTED 4ce88: 283c 0004 da14 movel #317972,%d4 <== NOT EXECUTED 4ce8e: 1039 0005 d8b0 moveb 5d8b0 ,%d0 <== NOT EXECUTED 4ce94: 42a7 clrl %sp@- <== NOT EXECUTED 4ce96: 49c0 extbl %d0 <== NOT EXECUTED 4ce98: 42a7 clrl %sp@- <== NOT EXECUTED 4ce9a: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4cea0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cea2: 4e92 jsr %a2@ <== NOT EXECUTED 4cea4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4cea8: 4a80 tstl %d0 <== NOT EXECUTED 4ceaa: 6600 01f2 bnew 4d09e <== 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( 4ceae: 486d 0028 pea %a5@(40) <== NOT EXECUTED 4ceb2: 1039 0005 d8b0 moveb 5d8b0 ,%d0 <== NOT EXECUTED 4ceb8: 42a7 clrl %sp@- <== NOT EXECUTED 4ceba: 4878 0010 pea 10 <== NOT EXECUTED 4cebe: 49c0 extbl %d0 <== NOT EXECUTED 4cec0: 4878 0001 pea 1 <== NOT EXECUTED 4cec4: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4ceca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cecc: 4eb9 0004 5a8c jsr 45a8c <== NOT EXECUTED 4ced2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4ced6: 4a80 tstl %d0 <== NOT EXECUTED 4ced8: 6600 01ba bnew 4d094 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4cedc: 280e movel %fp,%d4 <== NOT EXECUTED 4cede: 5184 subql #8,%d4 <== NOT EXECUTED 4cee0: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cee2: 4bf9 0004 752c lea 4752c <_Objects_Get>,%a5 <== NOT EXECUTED { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4cee8: 45f9 0004 7dbc lea 47dbc <_Thread_Enable_dispatch>,%a2 <== NOT EXECUTED 4ceee: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4cef0: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4cef4: 4879 0005 f80c pea 5f80c <_Barrier_Information> <== NOT EXECUTED 4cefa: 4e95 jsr %a5@ <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 4cefc: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4cf02: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cf04: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4cf08: 4e92 jsr %a2@ <== NOT EXECUTED 4cf0a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cf0c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4cf0e: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4cf12: 4879 0005 f80c pea 5f80c <_Barrier_Information> <== NOT EXECUTED 4cf18: 4e95 jsr %a5@ <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4cf1a: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4cf20: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cf22: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4cf26: 4e92 jsr %a2@ <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4cf28: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4cf2c: 1039 0005 d8b0 moveb 5d8b0 ,%d0 <== NOT EXECUTED 4cf32: 49c0 extbl %d0 <== NOT EXECUTED 4cf34: 2200 movel %d0,%d1 <== NOT EXECUTED 4cf36: 5281 addql #1,%d1 <== NOT EXECUTED 4cf38: 13c1 0005 d8b0 moveb %d1,5d8b0 <== NOT EXECUTED 4cf3e: 727a moveq #122,%d1 <== NOT EXECUTED 4cf40: b280 cmpl %d0,%d1 <== NOT EXECUTED 4cf42: 6600 fde4 bnew 4cd28 <== NOT EXECUTED c = 'a'; 4cf46: 7061 moveq #97,%d0 <== NOT EXECUTED 4cf48: 13c0 0005 d8b0 moveb %d0,5d8b0 <== NOT EXECUTED 4cf4e: 6000 fdd8 braw 4cd28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4cf52: 4a8a tstl %a2 <== NOT EXECUTED 4cf54: 6600 0186 bnew 4d0dc <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4cf58: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4cf5e: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4cf64: 2882 movel %d2,%a4@ <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4cf66: 7404 moveq #4,%d2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4cf68: 4e95 jsr %a5@ <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4cf6a: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4cf6c: 2043 moveal %d3,%a0 <== NOT EXECUTED 4cf6e: 7006 moveq #6,%d0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4cf70: 588f addql #4,%sp <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4cf72: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4cf76: c081 andl %d1,%d0 <== NOT EXECUTED 4cf78: b480 cmpl %d0,%d2 <== NOT EXECUTED 4cf7a: 6600 fdf2 bnew 4cd6e <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4cf7e: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4cf82: 666c bnes 4cff0 <== NOT EXECUTED 4cf84: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4cf88: 6766 beqs 4cff0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4cf8a: 2f03 movel %d3,%sp@- <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4cf8c: 347c fffa moveaw #-6,%a2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4cf90: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4cf92: 4eb9 0004 cbc8 jsr 4cbc8 <== NOT EXECUTED return err; 4cf98: 508f addql #8,%sp <== NOT EXECUTED } 4cf9a: 200a movel %a2,%d0 <== NOT EXECUTED 4cf9c: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4cfa2: 4e5e unlk %fp <== NOT EXECUTED 4cfa4: 4e75 rts <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4cfa6: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4cfaa: 2200 movel %d0,%d1 <== NOT EXECUTED 4cfac: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4cfae: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4cfb2: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4cfb6: 4a80 tstl %d0 <== NOT EXECUTED 4cfb8: 6700 00b2 beqw 4d06c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4cfbc: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4cfc0: 2400 movel %d0,%d2 <== NOT EXECUTED 4cfc2: 5282 addql #1,%d2 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4cfc4: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4cfc8: 2542 0014 movel %d2,%a2@(20) <== NOT EXECUTED 4cfcc: 4a80 tstl %d0 <== NOT EXECUTED 4cfce: 6600 fdae bnew 4cd7e <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4cfd2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cfd6: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cfda: 4eb9 0004 da84 jsr 4da84 <== NOT EXECUTED 4cfe0: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4cfe2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cfe6: 95ca subal %a2,%a2 <== NOT EXECUTED 4cfe8: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4cfea: 588f addql #4,%sp <== NOT EXECUTED 4cfec: 6000 fd9a braw 4cd88 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4cff0: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4cff4: 2200 movel %d0,%d1 <== NOT EXECUTED 4cff6: 5281 addql #1,%d1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4cff8: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4cffc: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4d000: 4a80 tstl %d0 <== NOT EXECUTED 4d002: 677c beqs 4d080 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 4d004: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4d008: 6600 fd74 bnew 4cd7e <== NOT EXECUTED prevCounter = pipe->readerCounter; 4d00c: 282a 0020 movel %a2@(32),%d4 <== NOT EXECUTED 4d010: 243c 0004 dafc movel #318204,%d2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4d016: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d01a: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4d01c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d01e: 42a7 clrl %sp@- <== NOT EXECUTED 4d020: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4d024: 4e90 jsr %a0@ <== NOT EXECUTED 4d026: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d02a: 4a80 tstl %d0 <== NOT EXECUTED 4d02c: 6600 00fc bnew 4d12a <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4d030: 42a7 clrl %sp@- <== NOT EXECUTED 4d032: 42a7 clrl %sp@- <== NOT EXECUTED 4d034: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d038: 4e93 jsr %a3@ <== NOT EXECUTED 4d03a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d03e: 4a80 tstl %d0 <== NOT EXECUTED 4d040: 6600 00e8 bnew 4d12a <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4d044: b8aa 0020 cmpl %a2@(32),%d4 <== NOT EXECUTED 4d048: 67cc beqs 4d016 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d04a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d04e: 95ca subal %a2,%a2 <== NOT EXECUTED 4d050: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4d052: 588f addql #4,%sp <== NOT EXECUTED 4d054: 6000 fd32 braw 4cd88 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4d058: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d05c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4d060: 4eb9 0004 da84 jsr 4da84 <== NOT EXECUTED 4d066: 508f addql #8,%sp <== NOT EXECUTED 4d068: 6000 fd4a braw 4cdb4 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4d06c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d070: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4d074: 4eb9 0004 da84 jsr 4da84 <== NOT EXECUTED 4d07a: 508f addql #8,%sp <== NOT EXECUTED 4d07c: 6000 ff3e braw 4cfbc <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4d080: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d084: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4d088: 4eb9 0004 da84 jsr 4da84 <== NOT EXECUTED 4d08e: 508f addql #8,%sp <== NOT EXECUTED 4d090: 6000 ff72 braw 4d004 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4d094: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4d098: 2044 moveal %d4,%a0 <== NOT EXECUTED 4d09a: 4e90 jsr %a0@ <== NOT EXECUTED 4d09c: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4d09e: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4d0a2: 2044 moveal %d4,%a0 <== NOT EXECUTED 4d0a4: 4e90 jsr %a0@ <== NOT EXECUTED 4d0a6: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4d0a8: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4d0aa: 243c 0004 a6f4 movel #304884,%d2 <== NOT EXECUTED 4d0b0: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d0b2: 4e90 jsr %a0@ <== NOT EXECUTED 4d0b4: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4d0b6: 2042 moveal %d2,%a0 <== NOT EXECUTED err_sem: rtems_barrier_delete(pipe->writeBarrier); err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); 4d0b8: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err_buf: free(pipe); 4d0bc: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4d0be: 4e90 jsr %a0@ <== NOT EXECUTED 4d0c0: 588f addql #4,%sp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d0c2: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4d0c8: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED 4d0ce: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4d0d0: 588f addql #4,%sp <== NOT EXECUTED 4d0d2: 4a8a tstl %a2 <== NOT EXECUTED 4d0d4: 6700 fc84 beqw 4cd5a <== NOT EXECUTED 4d0d8: 6000 fc3c braw 4cd16 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4d0dc: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d0de: 49f9 0004 da14 lea 4da14 ,%a4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4d0e4: 47f9 0004 a6f4 lea 4a6f4 ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4d0ea: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4d0ee: 4e94 jsr %a4@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4d0f0: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d0f2: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4d0f6: 4e94 jsr %a4@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4d0f8: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d0fa: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4d0fe: 4eb9 0004 5c54 jsr 45c54 <== NOT EXECUTED free(pipe->Buffer); 4d104: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d106: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4d108: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4d10a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d10c: 4e93 jsr %a3@ <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d10e: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4d114: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED 4d11a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4d11e: 200a movel %a2,%d0 <== NOT EXECUTED 4d120: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4d126: 4e5e unlk %fp <== NOT EXECUTED 4d128: 4e75 rts <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4d12a: 2f03 movel %d3,%sp@- <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4d12c: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4d130: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4d132: 4eb9 0004 cbc8 jsr 4cbc8 <== NOT EXECUTED return err; 4d138: 508f addql #8,%sp <== NOT EXECUTED 4d13a: 6000 fe5e braw 4cf9a <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d13e: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4d144: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) 4d14a: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d14e: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4d150: 588f addql #4,%sp <== NOT EXECUTED 4d152: 4a8a tstl %a2 <== NOT EXECUTED 4d154: 6700 fc04 beqw 4cd5a <== NOT EXECUTED 4d158: 6000 fbbc braw 4cd16 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4d15c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4d15e: 243c 0004 a6f4 movel #304884,%d2 <== NOT EXECUTED 4d164: 2042 moveal %d2,%a0 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); if (! pipe->Buffer) 4d166: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4d16a: 4e90 jsr %a0@ <== NOT EXECUTED 4d16c: 588f addql #4,%sp <== NOT EXECUTED 4d16e: 6000 ff52 braw 4d0c2 <== NOT EXECUTED ... =============================================================================== 00049574 : bool file_systems_below_this_mountpoint( const char *path __attribute__((unused)), rtems_filesystem_location_info_t *fs_root_loc, rtems_filesystem_mount_table_entry_t *fs_to_unmount __attribute__((unused)) ) { 49574: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 49578: 2079 0006 73b8 moveal 673b8 ,%a0<== NOT EXECUTED 4957e: b1fc 0006 73bc cmpal #422844,%a0 <== NOT EXECUTED 49584: 6724 beqs 495aa <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 49586: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4958a: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 4958e: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 49592: 6710 beqs 495a4 <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 49594: 2050 moveal %a0@,%a0 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 49596: b1fc 0006 73bc cmpal #422844,%a0 <== NOT EXECUTED 4959c: 670c beqs 495aa <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 4959e: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 495a2: 66f0 bnes 49594 <== NOT EXECUTED return true; } } return false; } 495a4: 4e5e unlk %fp <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 495a6: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } } return false; } 495a8: 4e75 rts <== NOT EXECUTED 495aa: 4e5e unlk %fp <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 495ac: 4200 clrb %d0 <== NOT EXECUTED return true; } } return false; } =============================================================================== 00043bc4 : long fpathconf( int fd, int name ) { 43bc4: 4e56 0000 linkw %fp,#0 43bc8: 202e 0008 movel %fp@(8),%d0 43bcc: 222e 000c movel %fp@(12),%d1 43bd0: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43bd2: b0b9 0006 1664 cmpl 61664 ,%d0 43bd8: 6400 00f0 bccw 43cca iop = rtems_libio_iop(fd); 43bdc: 2079 0006 2d6c moveal 62d6c ,%a0 43be2: ed88 lsll #6,%d0 43be4: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43be6: 2428 0014 movel %a0@(20),%d2 43bea: 0802 0008 btst #8,%d2 43bee: 6700 00da beqw 43cca rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 43bf2: 0802 0001 btst #1,%d2 43bf6: 670a beqs 43c02 <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43bf8: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 43bfc: 700b moveq #11,%d0 43bfe: b081 cmpl %d1,%d0 43c00: 6416 bccs 43c18 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43c02: 4eb9 0005 1618 jsr 51618 <__errno> break; } return return_value; } 43c08: 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 ); 43c0c: 2040 moveal %d0,%a0 43c0e: 7216 moveq #22,%d1 43c10: 70ff moveq #-1,%d0 break; } return return_value; } 43c12: 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 ); 43c14: 2081 movel %d1,%a0@ break; } return return_value; } 43c16: 4e75 rts * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 43c18: 303b 1a08 movew %pc@(43c22 ,%d1:l:2),%d0 43c1c: 48c0 extl %d0 43c1e: 4efb 0802 jmp %pc@(43c22 ,%d0:l) 43c22: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43c28: 006c 0154 <== NOT EXECUTED 43c2a: 0060 0140 <== NOT EXECUTED 43c2c: 0054 0124 <== NOT EXECUTED 43c2e: 0048 0110 <== NOT EXECUTED 43c30: 003c 074 <== NOT EXECUTED 43c32: 0030 060 <== NOT EXECUTED 43c34: 0024 044 <== NOT EXECUTED 43c36: 0018 030 <== NOT EXECUTED 43c38: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c3e: 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; 43c40: 2028 005c movel %a0@(92),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c44: 4e75 rts 43c46: 242e fffc movel %fp@(-4),%d2 43c4a: 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; 43c4c: 2028 0050 movel %a0@(80),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c50: 4e75 rts 43c52: 242e fffc movel %fp@(-4),%d2 43c56: 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; 43c58: 2028 0064 movel %a0@(100),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c5c: 4e75 rts 43c5e: 242e fffc movel %fp@(-4),%d2 43c62: 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; 43c64: 2028 0058 movel %a0@(88),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c68: 4e75 rts 43c6a: 242e fffc movel %fp@(-4),%d2 43c6e: 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; 43c70: 2028 0054 movel %a0@(84),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c74: 4e75 rts 43c76: 242e fffc movel %fp@(-4),%d2 43c7a: 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; 43c7c: 2028 004c movel %a0@(76),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c80: 4e75 rts 43c82: 242e fffc movel %fp@(-4),%d2 43c86: 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; 43c88: 2028 0048 movel %a0@(72),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c8c: 4e75 rts 43c8e: 242e fffc movel %fp@(-4),%d2 43c92: 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; 43c94: 2028 0044 movel %a0@(68),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c98: 4e75 rts 43c9a: 242e fffc movel %fp@(-4),%d2 43c9e: 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; 43ca0: 2028 0040 movel %a0@(64),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43ca4: 4e75 rts 43ca6: 242e fffc movel %fp@(-4),%d2 43caa: 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; 43cac: 2028 003c movel %a0@(60),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cb0: 4e75 rts 43cb2: 242e fffc movel %fp@(-4),%d2 43cb6: 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; 43cb8: 2028 0038 movel %a0@(56),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cbc: 4e75 rts 43cbe: 242e fffc movel %fp@(-4),%d2 43cc2: 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; 43cc4: 2028 0060 movel %a0@(96),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cc8: 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); 43cca: 4eb9 0005 1618 jsr 51618 <__errno> 43cd0: 7409 moveq #9,%d2 43cd2: 2040 moveal %d0,%a0 43cd4: 70ff moveq #-1,%d0 43cd6: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cd8: 242e fffc movel %fp@(-4),%d2 43cdc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a6f4 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4a6f4: 4e56 0000 linkw %fp,#0 4a6f8: 52b9 0005 ee30 addql #1,5ee30 4a6fe: 2f02 movel %d2,%sp@- 4a700: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 4a704: 6732 beqs 4a738 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4a706: 7003 moveq #3,%d0 4a708: b0b9 0005 f100 cmpl 5f100 <_System_state_Current>,%d0 4a70e: 6758 beqs 4a768 <== ALWAYS TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4a710: 2079 0005 dda6 moveal 5dda6 ,%a0 4a716: 4a88 tstl %a0 4a718: 670a beqs 4a724 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 4a71a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a71c: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 4a720: 4e90 jsr %a0@ <== NOT EXECUTED 4a722: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4a724: 2f02 movel %d2,%sp@- 4a726: 2f39 0005 d720 movel 5d720 ,%sp@- 4a72c: 4eb9 0004 c038 jsr 4c038 <_Protected_heap_Free> 4a732: 508f addql #8,%sp 4a734: 4a00 tstb %d0 4a736: 6708 beqs 4a740 <== NEVER TAKEN RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a738: 242e fffc movel %fp@(-4),%d2 4a73c: 4e5e unlk %fp 4a73e: 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 4a740: 2079 0005 d720 moveal 5d720 ,%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", 4a746: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 4a74a: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 4a74e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a750: 4879 0005 c9c2 pea 5c9c2 <== NOT EXECUTED 4a756: 4eb9 0004 33ac jsr 433ac <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a75c: 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", 4a760: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a764: 4e5e unlk %fp <== NOT EXECUTED 4a766: 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()) && 4a768: 4eb9 0004 abf0 jsr 4abf0 4a76e: 4a00 tstb %d0 4a770: 669e bnes 4a710 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4a772: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a776: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a77a: 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); 4a77c: 4ef9 0004 ac30 jmp 4ac30 <== NOT EXECUTED ... =============================================================================== 00044468 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 44468: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4446c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4446e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 44472: b5fc 0006 1ab8 cmpal #400056,%a2 <== NOT EXECUTED 44478: 6740 beqs 444ba <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 4447a: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 4447e: 4a88 tstl %a0 <== NOT EXECUTED 44480: 6710 beqs 44492 <== NOT EXECUTED 44482: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44486: 4a88 tstl %a0 <== NOT EXECUTED 44488: 6708 beqs 44492 <== NOT EXECUTED 4448a: 486a 0004 pea %a2@(4) <== NOT EXECUTED 4448e: 4e90 jsr %a0@ <== NOT EXECUTED 44490: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 44492: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 44496: 4a88 tstl %a0 <== NOT EXECUTED 44498: 6710 beqs 444aa <== NOT EXECUTED 4449a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4449e: 4a88 tstl %a0 <== NOT EXECUTED 444a0: 6708 beqs 444aa <== NOT EXECUTED 444a2: 486a 0018 pea %a2@(24) <== NOT EXECUTED 444a6: 4e90 jsr %a0@ <== NOT EXECUTED 444a8: 588f addql #4,%sp <== NOT EXECUTED free(env); 444aa: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 444ae: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 444b2: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 444b4: 4ef9 0004 3360 jmp 43360 <== NOT EXECUTED } } 444ba: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 444be: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005b3f0 : int fstat( int fd, struct stat *sbuf ) { 5b3f0: 4e56 0000 linkw %fp,#0 5b3f4: 202e 0008 movel %fp@(8),%d0 5b3f8: 2f0a movel %a2,%sp@- 5b3fa: 2f02 movel %d2,%sp@- 5b3fc: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5b400: 6700 0096 beqw 5b498 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5b404: b0b9 0005 d714 cmpl 5d714 ,%d0 5b40a: 6456 bccs 5b462 5b40c: 2479 0005 ee18 moveal 5ee18 ,%a2 5b412: ed88 lsll #6,%d0 5b414: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5b416: 202a 0014 movel %a2@(20),%d0 5b41a: 0280 0000 0100 andil #256,%d0 5b420: 6740 beqs 5b462 <== NEVER TAKEN if ( !iop->handlers ) 5b422: 206a 003c moveal %a2@(60),%a0 5b426: 4a88 tstl %a0 5b428: 6738 beqs 5b462 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 5b42a: 4aa8 0018 tstl %a0@(24) 5b42e: 674c beqs 5b47c <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5b430: 4878 0046 pea 46 5b434: 42a7 clrl %sp@- 5b436: 2f02 movel %d2,%sp@- 5b438: 4eb9 0004 f484 jsr 4f484 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5b43e: 206a 003c moveal %a2@(60),%a0 5b442: 45ea 0018 lea %a2@(24),%a2 5b446: 4fef 000c lea %sp@(12),%sp 5b44a: 2d42 000c movel %d2,%fp@(12) } 5b44e: 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 ); 5b452: 2d4a 0008 movel %a2,%fp@(8) } 5b456: 246e fffc moveal %fp@(-4),%a2 5b45a: 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 ); 5b45c: 2268 0018 moveal %a0@(24),%a1 5b460: 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 ); 5b462: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b468: 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 ); 5b46c: 2040 moveal %d0,%a0 5b46e: 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 ); } 5b470: 246e fffc moveal %fp@(-4),%a2 5b474: 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 ); 5b476: 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 ); } 5b478: 70ff moveq #-1,%d0 5b47a: 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 ); 5b47c: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b482: 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 ); 5b486: 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 ); } 5b488: 70ff moveq #-1,%d0 <== NOT EXECUTED 5b48a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5b48e: 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 ); 5b490: 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 ); } 5b496: 4e75 rts <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5b498: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b49e: 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 ); 5b4a2: 2040 moveal %d0,%a0 5b4a4: 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 ); } 5b4a6: 70ff moveq #-1,%d0 5b4a8: 246e fffc moveal %fp@(-4),%a2 5b4ac: 4e5e unlk %fp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5b4ae: 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 ); } =============================================================================== 00043e4c : #include int fsync( int fd ) { 43e4c: 4e56 0000 linkw %fp,#0 43e50: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43e54: b0b9 0006 1664 cmpl 61664 ,%d0 43e5a: 6430 bccs 43e8c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 43e5c: 2079 0006 2d6c moveal 62d6c ,%a0 43e62: ed88 lsll #6,%d0 43e64: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43e66: 2028 0014 movel %a0@(20),%d0 43e6a: 0800 0008 btst #8,%d0 43e6e: 671c beqs 43e8c <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43e70: 44c0 movew %d0,%ccr 43e72: 662a bnes 43e9e /* * Now process the fsync(). */ if ( !iop->handlers ) 43e74: 2268 003c moveal %a0@(60),%a1 43e78: 4a89 tstl %a1 43e7a: 6710 beqs 43e8c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 43e7c: 2269 0028 moveal %a1@(40),%a1 43e80: 4a89 tstl %a1 43e82: 672c beqs 43eb0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 43e84: 2d48 0008 movel %a0,%fp@(8) } 43e88: 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 ); 43e8a: 4ed1 jmp %a1@ /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 43e8c: 4eb9 0005 1618 jsr 51618 <__errno> <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 43e92: 4e5e unlk %fp <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 43e94: 2040 moveal %d0,%a0 <== NOT EXECUTED 43e96: 7009 moveq #9,%d0 <== NOT EXECUTED 43e98: 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 ); } 43e9a: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e9c: 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 ); 43e9e: 4eb9 0005 1618 jsr 51618 <__errno> 43ea4: 7216 moveq #22,%d1 43ea6: 2040 moveal %d0,%a0 if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 43ea8: 70ff moveq #-1,%d0 43eaa: 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 ); 43eac: 2081 movel %d1,%a0@ if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 43eae: 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 ); 43eb0: 4eb9 0005 1618 jsr 51618 <__errno> return (*iop->handlers->fsync_h)( iop ); } 43eb6: 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 ); 43eb8: 2040 moveal %d0,%a0 return (*iop->handlers->fsync_h)( iop ); } 43eba: 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 ); 43ebc: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fsync_h)( iop ); } =============================================================================== 0004a784 : int ftruncate( int fd, off_t length ) { 4a784: 4e56 ffec linkw %fp,#-20 4a788: 202e 0008 movel %fp@(8),%d0 4a78c: 2f0a movel %a2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4a78e: b0b9 0005 d714 cmpl 5d714 ,%d0 4a794: 647a bccs 4a810 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 4a796: 2479 0005 ee18 moveal 5ee18 ,%a2 4a79c: ed88 lsll #6,%d0 4a79e: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a7a0: 202a 0014 movel %a2@(20),%d0 4a7a4: 0280 0000 0100 andil #256,%d0 4a7aa: 6764 beqs 4a810 <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a7ac: 43ee ffec lea %fp@(-20),%a1 4a7b0: 22aa 0018 movel %a2@(24),%a1@ 4a7b4: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4a7ba: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4a7c0: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 4a7c6: 206e fff8 moveal %fp@(-8),%a0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a7ca: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 4a7d0: 2068 0010 moveal %a0@(16),%a0 4a7d4: 4a88 tstl %a0 4a7d6: 6764 beqs 4a83c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4a7d8: 2f09 movel %a1,%sp@- 4a7da: 4e90 jsr %a0@ 4a7dc: 588f addql #4,%sp 4a7de: 7201 moveq #1,%d1 4a7e0: b280 cmpl %d0,%d1 4a7e2: 6770 beqs 4a854 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a7e4: 7004 moveq #4,%d0 4a7e6: c0aa 0014 andl %a2@(20),%d0 4a7ea: 673a beqs 4a826 <== NEVER TAKEN if ( !iop->handlers->ftruncate_h ) 4a7ec: 206a 003c moveal %a2@(60),%a0 4a7f0: 2068 0020 moveal %a0@(32),%a0 4a7f4: 4a88 tstl %a0 4a7f6: 6744 beqs 4a83c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4a7f8: 2f2e 0010 movel %fp@(16),%sp@- 4a7fc: 2f2e 000c movel %fp@(12),%sp@- 4a800: 2f0a movel %a2,%sp@- 4a802: 4e90 jsr %a0@ } 4a804: 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 ); 4a808: 4fef 000c lea %sp@(12),%sp } 4a80c: 4e5e unlk %fp 4a80e: 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); 4a810: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a816: 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); 4a81a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a81c: 7209 moveq #9,%d1 <== NOT EXECUTED 4a81e: 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 ); } 4a820: 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); 4a822: 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 ); } 4a824: 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 ); 4a826: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a82c: 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 ); 4a830: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a832: 7216 moveq #22,%d1 <== NOT EXECUTED 4a834: 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 ); } 4a836: 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 ); 4a838: 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 ); } 4a83a: 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 ); 4a83c: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a842: 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 ); 4a846: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a848: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a84a: 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 ); 4a84c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a852: 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 ); 4a854: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a85a: 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 ); 4a85e: 2040 moveal %d0,%a0 4a860: 7215 moveq #21,%d1 4a862: 70ff moveq #-1,%d0 if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a864: 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 ); 4a866: 2081 movel %d1,%a0@ if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } ... =============================================================================== 0005f338 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5f338: 4e56 ffec linkw %fp,#-20 5f33c: 202e 0008 movel %fp@(8),%d0 5f340: 2f0a movel %a2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5f342: b0b9 0006 2104 cmpl 62104 ,%d0 5f348: 655e bcss 5f3a8 <== ALWAYS TAKEN 5f34a: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5f34c: 43ee ffec lea %fp@(-20),%a1 5f350: 22aa 0018 movel %a2@(24),%a1@ 5f354: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 5f35a: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 5f360: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 5f366: 206e fff8 moveal %fp@(-8),%a0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5f36a: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 5f370: 2068 0010 moveal %a0@(16),%a0 5f374: 4a88 tstl %a0 5f376: 6752 beqs 5f3ca <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5f378: 2f09 movel %a1,%sp@- 5f37a: 4e90 jsr %a0@ 5f37c: 588f addql #4,%sp 5f37e: 7201 moveq #1,%d1 5f380: b280 cmpl %d0,%d1 5f382: 6630 bnes 5f3b4 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 5f384: 206a 003c moveal %a2@(60),%a0 5f388: 2068 0008 moveal %a0@(8),%a0 5f38c: 4a88 tstl %a0 5f38e: 673a beqs 5f3ca <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5f390: 2f2e 0010 movel %fp@(16),%sp@- 5f394: 2f2e 000c movel %fp@(12),%sp@- 5f398: 2f0a movel %a2,%sp@- 5f39a: 4e90 jsr %a0@ } 5f39c: 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 ); 5f3a0: 4fef 000c lea %sp@(12),%sp } 5f3a4: 4e5e unlk %fp 5f3a6: 4e75 rts /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5f3a8: 2479 0006 392c moveal 6392c ,%a2 5f3ae: ed88 lsll #6,%d0 5f3b0: d5c0 addal %d0,%a2 5f3b2: 6098 bras 5f34c 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 ); 5f3b4: 4eb9 0005 1a54 jsr 51a54 <__errno> if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 5f3ba: 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 ); 5f3be: 2040 moveal %d0,%a0 5f3c0: 7214 moveq #20,%d1 5f3c2: 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 ); } 5f3c4: 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 ); 5f3c6: 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 ); } 5f3c8: 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 ); 5f3ca: 4eb9 0005 1a54 jsr 51a54 <__errno> <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 5f3d0: 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 ); 5f3d4: 2040 moveal %d0,%a0 <== NOT EXECUTED 5f3d6: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 5f3d8: 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 ); 5f3da: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } ... =============================================================================== 0004360e : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4360e: 4e56 ffe0 linkw %fp,#-32 43612: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43616: 242e 0008 movel %fp@(8),%d2 4361a: 47fa fc26 lea %pc@(43242 ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 4361e: 49f9 0005 26c0 lea 526c0 ,%a4 struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 43624: 2c2e 000c movel %fp@(12),%d6 43628: 246e 0010 moveal %fp@(16),%a2 4362c: 2a2e 0014 movel %fp@(20),%d5 43630: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 43634: 4eb9 0004 34ca jsr 434ca if ((fp = fopen("/etc/group", "r")) == NULL) { 4363a: 4879 0006 06b5 pea 606b5 <_global_impure_ptr+0xbf> 43640: 4879 0005 fbd8 pea 5fbd8 43646: 4eb9 0005 143c jsr 5143c 4364c: 508f addql #8,%sp 4364e: 2600 movel %d0,%d3 43650: 6778 beqs 436ca <== NEVER TAKEN errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 43652: 2f04 movel %d4,%sp@- 43654: 2f05 movel %d5,%sp@- 43656: 2f0a movel %a2,%sp@- 43658: 2f03 movel %d3,%sp@- 4365a: 4e93 jsr %a3@ 4365c: 4fef 0010 lea %sp@(16),%sp 43660: 4a80 tstl %d0 43662: 6744 beqs 436a8 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 43664: 4a82 tstl %d2 43666: 672e beqs 43696 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 43668: 2f02 movel %d2,%sp@- 4366a: 2f12 movel %a2@,%sp@- 4366c: 4e94 jsr %a4@ 4366e: 508f addql #8,%sp 43670: 4a80 tstl %d0 43672: 57c0 seq %d0 43674: 49c0 extbl %d0 43676: 4480 negl %d0 } else { match = (grp->gr_gid == gid); } if (match) { 43678: 67d8 beqs 43652 fclose(fp); 4367a: 2f03 movel %d3,%sp@- 4367c: 4eb9 0005 0dba jsr 50dba *result = grp; 43682: 206e 001c moveal %fp@(28),%a0 return 0; 43686: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 43688: 4280 clrl %d0 4368a: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 4368c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43692: 4e5e unlk %fp 43694: 4e75 rts } if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 43696: 4280 clrl %d0 <== NOT EXECUTED 43698: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 4369c: bc80 cmpl %d0,%d6 <== NOT EXECUTED 4369e: 57c0 seq %d0 <== NOT EXECUTED 436a0: 49c0 extbl %d0 <== NOT EXECUTED 436a2: 4480 negl %d0 <== NOT EXECUTED } if (match) { 436a4: 67ac beqs 43652 <== NOT EXECUTED 436a6: 60d2 bras 4367a <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 436a8: 4eb9 0005 0c7c jsr 50c7c <__errno> <== NOT EXECUTED 436ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 436b0: 7016 moveq #22,%d0 <== NOT EXECUTED 436b2: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 436b4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 436b6: 4eb9 0005 0dba jsr 50dba <== NOT EXECUTED return -1; 436bc: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 436be: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 436c0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 436c6: 4e5e unlk %fp <== NOT EXECUTED 436c8: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 436ca: 4eb9 0005 0c7c jsr 50c7c <__errno> <== NOT EXECUTED 436d0: 7216 moveq #22,%d1 <== NOT EXECUTED 436d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 436d4: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 436d6: 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; 436dc: 2081 movel %d1,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 436de: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004335e : return NULL; return p; } struct group *getgrent(void) { 4335e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 43362: 2039 0006 1de6 movel 61de6 ,%d0 <== NOT EXECUTED 43368: 6608 bnes 43372 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 4336a: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 4336c: 2001 movel %d1,%d0 <== NOT EXECUTED 4336e: 4e5e unlk %fp <== NOT EXECUTED 43370: 4e75 rts <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 43372: 4878 00c8 pea c8 <== NOT EXECUTED 43376: 4879 0006 1dea pea 61dea <== NOT EXECUTED 4337c: 4879 0006 1eb2 pea 61eb2 <== NOT EXECUTED 43382: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43384: 4eba febc jsr %pc@(43242 ) <== NOT EXECUTED 43388: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4338c: 223c 0006 1eb2 movel #401074,%d1 <== NOT EXECUTED 43392: 4a80 tstl %d0 <== NOT EXECUTED 43394: 67d4 beqs 4336a <== NOT EXECUTED return NULL; return &grent; } 43396: 2001 movel %d1,%d0 <== NOT EXECUTED 43398: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043708 : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 43708: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 4370a: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4370e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 43712: 4878 00c8 pea c8 <== NOT EXECUTED 43716: 4879 0006 1dea pea 61dea <== NOT EXECUTED 4371c: 4879 0006 1eb2 pea 61eb2 <== NOT EXECUTED 43722: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43726: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43728: 4eb9 0004 36e2 jsr 436e2 <== NOT EXECUTED 4372e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 43732: 4a80 tstl %d0 <== NOT EXECUTED 43734: 6608 bnes 4373e <== NOT EXECUTED return NULL; return p; 43736: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4373a: 4e5e unlk %fp <== NOT EXECUTED 4373c: 4e75 rts <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4373e: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 43740: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436e2 : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 436e2: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 436e4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 436e8: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 436ec: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 436f0: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 436f4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 436f8: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 436fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 436fe: 42a7 clrl %sp@- <== NOT EXECUTED 43700: 4eba ff0c jsr %pc@(4360e ) <== NOT EXECUTED } 43704: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043766 : struct group *getgrnam( const char *name ) { 43766: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 4376a: 486e fffc pea %fp@(-4) 4376e: 4878 00c8 pea c8 43772: 4879 0006 1dea pea 61dea 43778: 4879 0006 1eb2 pea 61eb2 4377e: 2f2e 0008 movel %fp@(8),%sp@- 43782: 4eb9 0004 3744 jsr 43744 43788: 4fef 0014 lea %sp@(20),%sp 4378c: 4a80 tstl %d0 4378e: 6608 bnes 43798 <== NEVER TAKEN return NULL; return p; 43790: 202e fffc movel %fp@(-4),%d0 } 43794: 4e5e unlk %fp 43796: 4e75 rts const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 43798: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 4379a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000437d8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 437d8: 4e56 ffe0 linkw %fp,#-32 437dc: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 437e0: 242e 0008 movel %fp@(8),%d2 437e4: 47fa fbb6 lea %pc@(4339c ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 437e8: 49f9 0005 26c0 lea 526c0 ,%a4 struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 437ee: 2c2e 000c movel %fp@(12),%d6 437f2: 246e 0010 moveal %fp@(16),%a2 437f6: 2a2e 0014 movel %fp@(20),%d5 437fa: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 437fe: 4eb9 0004 34ca jsr 434ca if ((fp = fopen("/etc/passwd", "r")) == NULL) { 43804: 4879 0006 06b5 pea 606b5 <_global_impure_ptr+0xbf> 4380a: 4879 0005 fb65 pea 5fb65 43810: 4eb9 0005 143c jsr 5143c 43816: 508f addql #8,%sp 43818: 2600 movel %d0,%d3 4381a: 6778 beqs 43894 <== NEVER TAKEN errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 4381c: 2f04 movel %d4,%sp@- 4381e: 2f05 movel %d5,%sp@- 43820: 2f0a movel %a2,%sp@- 43822: 2f03 movel %d3,%sp@- 43824: 4e93 jsr %a3@ 43826: 4fef 0010 lea %sp@(16),%sp 4382a: 4a80 tstl %d0 4382c: 6744 beqs 43872 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 4382e: 4a82 tstl %d2 43830: 672e beqs 43860 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 43832: 2f02 movel %d2,%sp@- 43834: 2f12 movel %a2@,%sp@- 43836: 4e94 jsr %a4@ 43838: 508f addql #8,%sp 4383a: 4a80 tstl %d0 4383c: 57c0 seq %d0 4383e: 49c0 extbl %d0 43840: 4480 negl %d0 } else { match = (pwd->pw_uid == uid); } if (match) { 43842: 67d8 beqs 4381c fclose(fp); 43844: 2f03 movel %d3,%sp@- 43846: 4eb9 0005 0dba jsr 50dba *result = pwd; 4384c: 206e 001c moveal %fp@(28),%a0 return 0; 43850: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 43852: 4280 clrl %d0 43854: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 43856: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 4385c: 4e5e unlk %fp 4385e: 4e75 rts } if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 43860: 4280 clrl %d0 <== NOT EXECUTED 43862: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 43866: bc80 cmpl %d0,%d6 <== NOT EXECUTED 43868: 57c0 seq %d0 <== NOT EXECUTED 4386a: 49c0 extbl %d0 <== NOT EXECUTED 4386c: 4480 negl %d0 <== NOT EXECUTED } if (match) { 4386e: 67ac beqs 4381c <== NOT EXECUTED 43870: 60d2 bras 43844 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 43872: 4eb9 0005 0c7c jsr 50c7c <__errno> <== NOT EXECUTED 43878: 7416 moveq #22,%d2 <== NOT EXECUTED 4387a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4387c: 2082 movel %d2,%a0@ <== NOT EXECUTED fclose(fp); 4387e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43880: 4eb9 0005 0dba jsr 50dba <== NOT EXECUTED return -1; 43886: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 43888: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 4388a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 43890: 4e5e unlk %fp <== NOT EXECUTED 43892: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 43894: 4eb9 0005 0c7c jsr 50c7c <__errno> <== NOT EXECUTED 4389a: 7616 moveq #22,%d3 <== NOT EXECUTED 4389c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4389e: 70ff moveq #-1,%d0 <== NOT EXECUTED 438a0: 2083 movel %d3,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 438a2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 438a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004348c : return NULL; return p; } struct passwd *getpwent(void) { 4348c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 43490: 2039 0006 1cfe movel 61cfe ,%d0 <== NOT EXECUTED 43496: 6608 bnes 434a0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 43498: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 4349a: 2001 movel %d1,%d0 <== NOT EXECUTED 4349c: 4e5e unlk %fp <== NOT EXECUTED 4349e: 4e75 rts <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 434a0: 4878 00c8 pea c8 <== NOT EXECUTED 434a4: 4879 0006 1d02 pea 61d02 <== NOT EXECUTED 434aa: 4879 0006 1dca pea 61dca <== NOT EXECUTED 434b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 434b2: 4eba fee8 jsr %pc@(4339c ) <== NOT EXECUTED 434b6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 434ba: 223c 0006 1dca movel #400842,%d1 <== NOT EXECUTED 434c0: 4a80 tstl %d0 <== NOT EXECUTED 434c2: 67d4 beqs 43498 <== NOT EXECUTED return NULL; return &pwent; } 434c4: 2001 movel %d1,%d0 <== NOT EXECUTED 434c6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043930 : struct passwd *getpwnam( const char *name ) { 43930: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 43934: 486e fffc pea %fp@(-4) 43938: 4878 00c8 pea c8 4393c: 4879 0006 1d02 pea 61d02 43942: 4879 0006 1dca pea 61dca 43948: 2f2e 0008 movel %fp@(8),%sp@- 4394c: 4eb9 0004 390e jsr 4390e 43952: 4fef 0014 lea %sp@(20),%sp 43956: 4a80 tstl %d0 43958: 6608 bnes 43962 <== NEVER TAKEN return NULL; return p; 4395a: 202e fffc movel %fp@(-4),%d0 } 4395e: 4e5e unlk %fp 43960: 4e75 rts const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 43962: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 43964: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000438d2 : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 438d2: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 438d4: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 438d8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 438dc: 4878 00c8 pea c8 <== NOT EXECUTED 438e0: 4879 0006 1d02 pea 61d02 <== NOT EXECUTED 438e6: 4879 0006 1dca pea 61dca <== NOT EXECUTED 438ec: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 438f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438f2: 4eb9 0004 38ac jsr 438ac <== NOT EXECUTED 438f8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 438fc: 4a80 tstl %d0 <== NOT EXECUTED 438fe: 6608 bnes 43908 <== NOT EXECUTED return NULL; return p; 43900: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 43904: 4e5e unlk %fp <== NOT EXECUTED 43906: 4e75 rts <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 43908: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 4390a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000438ac : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 438ac: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 438ae: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 438b2: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 438b6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 438ba: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 438be: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 438c2: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 438c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438c8: 42a7 clrl %sp@- <== NOT EXECUTED 438ca: 4eba ff0c jsr %pc@(437d8 ) <== NOT EXECUTED } 438ce: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a894 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4a894: 4e56 ffec linkw %fp,#-20 4a898: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a89c: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4a8a0: 4a8a tstl %a2 4a8a2: 673c beqs 4a8e0 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4a8a4: 203c 0000 0700 movel #1792,%d0 4a8aa: 40c2 movew %sr,%d2 4a8ac: 8082 orl %d2,%d0 4a8ae: 46c0 movew %d0,%sr _TOD_Get( &now ); 4a8b0: 486e fff8 pea %fp@(-8) 4a8b4: 4eb9 0004 bb88 jsr 4bb88 <_TOD_Get> _ISR_Enable(level); 4a8ba: 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; 4a8bc: 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; 4a8c2: 588f addql #4,%sp 4a8c4: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4a8c6: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4a8ca: 4c43 1801 remsl %d3,%d1,%d1 4a8ce: 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; 4a8d2: 24ae fff8 movel %fp@(-8),%a2@ } 4a8d6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4a8dc: 4e5e unlk %fp 4a8de: 4e75 rts void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4a8e0: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 4a8e6: 720e moveq #14,%d1 <== NOT EXECUTED 4a8e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a8ea: 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; } 4a8ec: 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; 4a8f2: 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; } 4a8f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000532e8 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 532e8: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 532ea: 4e56 0000 linkw %fp,#0 532ee: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 532f2: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 532f6: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 532f8: b0a9 0048 cmpl %a1@(72),%d0 532fc: 6708 beqs 53306 <== ALWAYS TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 532fe: 241f movel %sp@+,%d2 <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 53300: 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; } 53302: 4e5e unlk %fp <== NOT EXECUTED 53304: 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; 53306: 4280 clrl %d0 53308: 4281 clrl %d1 5330a: 4282 clrl %d2 5330c: 2141 000c movel %d1,%a0@(12) 53310: 2142 0010 movel %d2,%a0@(16) return 0; } 53314: 241f movel %sp@+,%d2 53316: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053456 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 53456: 4e56 fff8 linkw %fp,#-8 5345a: 2f0b movel %a3,%sp@- 5345c: 266e 000c moveal %fp@(12),%a3 53460: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 53462: 2453 moveal %a3@,%a2 53464: 200a movel %a2,%d0 53466: 0680 0000 0050 addil #80,%d0 5346c: b0aa 004c cmpl %a2@(76),%d0 53470: 6600 0090 bnew 53502 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 53474: 206b 0010 moveal %a3@(16),%a0 53478: b5e8 001c cmpal %a0@(28),%a2 5347c: 6700 009e beqw 5351c /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 53480: 4aaa 0058 tstl %a2@(88) 53484: 6600 0096 bnew 5351c /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 53488: 4aaa 0008 tstl %a2@(8) 5348c: 670e beqs 5349c 5348e: 2f0a movel %a2,%sp@- 53490: 4eb9 0004 8774 jsr 48774 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 53496: 588f addql #4,%sp 53498: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 5349c: 302a 0032 movew %a2@(50),%d0 534a0: 5380 subql #1,%d0 534a2: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 534a6: 42a7 clrl %sp@- 534a8: 486e fff8 pea %fp@(-8) 534ac: 4eb9 0004 40b4 jsr 440b4 534b2: 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) ) { 534b8: 2f0a movel %a2,%sp@- 534ba: 4eb9 0005 0012 jsr 50012 534c0: 4fef 000c lea %sp@(12),%sp 534c4: 4a80 tstl %d0 534c6: 662c bnes 534f4 534c8: 4a6a 0032 tstw %a2@(50) 534cc: 6626 bnes 534f4 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 534ce: 2079 0006 38fc moveal 638fc ,%a0 534d4: 2653 moveal %a3@,%a3 534d6: b7e8 0004 cmpal %a0@(4),%a3 534da: 675a beqs 53536 <== NEVER TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 534dc: 2f0a movel %a2,%sp@- 534de: 4eb9 0004 4024 jsr 44024 534e4: 588f addql #4,%sp 534e6: 4280 clrl %d0 } return 0; } 534e8: 246e fff0 moveal %fp@(-16),%a2 534ec: 266e fff4 moveal %fp@(-12),%a3 534f0: 4e5e unlk %fp 534f2: 4e75 rts 534f4: 246e fff0 moveal %fp@(-16),%a2 /* * Free memory associated with a memory file. */ free( the_jnode ); 534f8: 4280 clrl %d0 } return 0; } 534fa: 266e fff4 moveal %fp@(-12),%a3 534fe: 4e5e unlk %fp 53500: 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 ); 53502: 4eb9 0005 4490 jsr 54490 <__errno> free( the_jnode ); } return 0; } 53508: 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 ); 5350c: 2040 moveal %d0,%a0 5350e: 725a moveq #90,%d1 53510: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 53512: 266e fff4 moveal %fp@(-12),%a3 53516: 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 ); 53518: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 5351a: 4e75 rts /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 5351c: 4eb9 0005 4490 jsr 54490 <__errno> free( the_jnode ); } return 0; } 53522: 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 ); 53526: 2040 moveal %d0,%a0 53528: 7210 moveq #16,%d1 5352a: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 5352c: 266e fff4 moveal %fp@(-12),%a3 53530: 4e5e unlk %fp /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 53532: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 53534: 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; 53536: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 5353a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5353c: 4eb9 0004 4024 jsr 44024 <== NOT EXECUTED 53542: 588f addql #4,%sp <== NOT EXECUTED 53544: 4280 clrl %d0 <== NOT EXECUTED 53546: 60a0 bras 534e8 <== NOT EXECUTED =============================================================================== 000434ca : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 434ca: 4e56 0000 linkw %fp,#0 434ce: 2f0a movel %a2,%sp@- 434d0: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 434d2: 4a39 0006 1cfc tstb 61cfc 434d8: 670c beqs 434e6 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 434da: 242e fff8 movel %fp@(-8),%d2 434de: 246e fffc moveal %fp@(-4),%a2 434e2: 4e5e unlk %fp 434e4: 4e75 rts static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 434e6: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 434ea: 45f9 0005 143c lea 5143c ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 434f0: 4879 0005 fb60 pea 5fb60 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 434f6: 7001 moveq #1,%d0 434f8: 13c0 0006 1cfc moveb %d0,61cfc mkdir("/etc", 0777); 434fe: 4eb9 0004 3cd4 jsr 43cd4 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 43504: 4879 0006 06b5 pea 606b5 <_global_impure_ptr+0xbf> 4350a: 4879 0005 fb65 pea 5fb65 43510: 4e92 jsr %a2@ 43512: 4fef 0010 lea %sp@(16),%sp 43516: 4a80 tstl %d0 43518: 677e beqs 43598 <== ALWAYS TAKEN fclose(fp); 4351a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4351c: 4eb9 0005 0dba jsr 50dba <== NOT EXECUTED 43522: 588f addql #4,%sp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 43524: 4879 0006 06b5 pea 606b5 <_global_impure_ptr+0xbf> 4352a: 4879 0005 fbd8 pea 5fbd8 43530: 4e92 jsr %a2@ 43532: 508f addql #8,%sp 43534: 4a80 tstl %d0 43536: 6716 beqs 4354e <== ALWAYS TAKEN fclose(fp); 43538: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4353a: 4eb9 0005 0dba jsr 50dba <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 43540: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); 43544: 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); } } 43546: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4354a: 4e5e unlk %fp <== NOT EXECUTED 4354c: 4e75 rts <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 4354e: 4879 0005 f282 pea 5f282 <_rodata_start+0xf2> 43554: 4879 0005 fbd8 pea 5fbd8 4355a: 4eb9 0005 143c jsr 5143c 43560: 508f addql #8,%sp 43562: 2440 moveal %d0,%a2 43564: 4a80 tstl %d0 43566: 6700 ff72 beqw 434da fprintf( fp, "root:x:0:root\n" 4356a: 2f00 movel %d0,%sp@- 4356c: 4878 002a pea 2a 43570: 4878 0001 pea 1 43574: 4879 0005 fbe3 pea 5fbe3 4357a: 4eb9 0005 1c64 jsr 51c64 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 43580: 2f0a movel %a2,%sp@- 43582: 4eb9 0005 0dba jsr 50dba } } 43588: 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); 4358c: 4fef 0014 lea %sp@(20),%sp } } 43590: 246e fffc moveal %fp@(-4),%a2 43594: 4e5e unlk %fp 43596: 4e75 rts * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 43598: 4879 0005 f282 pea 5f282 <_rodata_start+0xf2> 4359e: 4879 0005 fb65 pea 5fb65 435a4: 4e92 jsr %a2@ 435a6: 508f addql #8,%sp 435a8: 2400 movel %d0,%d2 435aa: 6700 ff78 beqw 43524 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 435ae: 2f00 movel %d0,%sp@- 435b0: 4878 0066 pea 66 435b4: 4878 0001 pea 1 435b8: 4879 0005 fb71 pea 5fb71 435be: 4eb9 0005 1c64 jsr 51c64 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 435c4: 2f02 movel %d2,%sp@- 435c6: 4eb9 0005 0dba jsr 50dba 435cc: 4fef 0014 lea %sp@(20),%sp 435d0: 6000 ff52 braw 43524 =============================================================================== 000465fc : int ioctl( int fd, ioctl_command_t command, ... ) { 465fc: 4e56 0000 linkw %fp,#0 46600: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 46604: b0b9 0006 3a34 cmpl 63a34 ,%d0 4660a: 643c bccs 46648 iop = rtems_libio_iop( fd ); 4660c: 2079 0006 5208 moveal 65208 ,%a0 46612: ed88 lsll #6,%d0 46614: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 46616: 2028 0014 movel %a0@(20),%d0 4661a: 0280 0000 0100 andil #256,%d0 46620: 6726 beqs 46648 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 46622: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 46626: 2268 003c moveal %a0@(60),%a1 4662a: 4a89 tstl %a1 4662c: 671a beqs 46648 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 4662e: 2269 0010 moveal %a1@(16),%a1 46632: 4a89 tstl %a1 46634: 6724 beqs 4665a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 46636: 2f00 movel %d0,%sp@- 46638: 2f2e 000c movel %fp@(12),%sp@- 4663c: 2f08 movel %a0,%sp@- 4663e: 4e91 jsr %a1@ return rc; 46640: 4fef 000c lea %sp@(12),%sp } 46644: 4e5e unlk %fp 46646: 4e75 rts /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 46648: 4eb9 0005 466c jsr 5466c <__errno> 4664e: 7209 moveq #9,%d1 46650: 2040 moveal %d0,%a0 46652: 70ff moveq #-1,%d0 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 46654: 4e5e unlk %fp /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 46656: 2081 movel %d1,%a0@ rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 46658: 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 ); 4665a: 4eb9 0005 466c jsr 5466c <__errno> <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 46660: 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 ); 46662: 2040 moveal %d0,%a0 <== NOT EXECUTED 46664: 70ff moveq #-1,%d0 <== NOT EXECUTED 46666: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } ... =============================================================================== 00044064 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44064: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 44068: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 4406c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 44070: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 44074: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44078: 1401 moveb %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 4407a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4407e: 6704 beqs 44084 <== NOT EXECUTED c &= 0x7f; 44080: 747f moveq #127,%d2 <== NOT EXECUTED 44082: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 44084: 0800 0009 btst #9,%d0 <== NOT EXECUTED 44088: 6720 beqs 440aa <== NOT EXECUTED c = tolower (c); 4408a: 2079 0005 d8ec moveal 5d8ec <__ctype_ptr__>,%a0 <== NOT EXECUTED 44090: 7603 moveq #3,%d3 <== NOT EXECUTED 44092: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44098: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 4409c: 49c1 extbl %d1 <== NOT EXECUTED 4409e: c283 andl %d3,%d1 <== NOT EXECUTED 440a0: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 440a4: b681 cmpl %d1,%d3 <== NOT EXECUTED 440a6: 6700 00e0 beqw 44188 <== NOT EXECUTED if (c == '\r') { 440aa: 4281 clrl %d1 <== NOT EXECUTED 440ac: 1202 moveb %d2,%d1 <== NOT EXECUTED 440ae: 760d moveq #13,%d3 <== NOT EXECUTED 440b0: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b2: 6740 beqs 440f4 <== 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)) { 440b4: 760a moveq #10,%d3 <== NOT EXECUTED 440b6: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b8: 6700 00c4 beqw 4417e <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 440bc: 4a02 tstb %d2 <== NOT EXECUTED 440be: 664c bnes 4410c <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 440c0: 2039 0005 d814 movel 5d814 ,%d0 <== NOT EXECUTED 440c6: 5380 subql #1,%d0 <== NOT EXECUTED 440c8: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 440cc: b081 cmpl %d1,%d0 <== NOT EXECUTED 440ce: 6f28 bles 440f8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 440d0: 7008 moveq #8,%d0 <== NOT EXECUTED 440d2: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 440d6: 6600 00ba bnew 44192 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 440da: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 440de: 4280 clrl %d0 <== NOT EXECUTED 440e0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 440e4: 5281 addql #1,%d1 <== NOT EXECUTED 440e6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED } return 0; } 440ea: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 440f0: 4e5e unlk %fp <== NOT EXECUTED 440f2: 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) 440f4: 4a00 tstb %d0 <== NOT EXECUTED 440f6: 6c0c bges 44104 <== 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; 440f8: 4280 clrl %d0 <== NOT EXECUTED } return 0; } 440fa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44100: 4e5e unlk %fp <== NOT EXECUTED 44102: 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) 44104: 0800 0008 btst #8,%d0 <== NOT EXECUTED 44108: 6702 beqs 4410c <== NOT EXECUTED 4410a: 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)) { 4410c: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 44110: 0801 0001 btst #1,%d1 <== NOT EXECUTED 44114: 67aa beqs 440c0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 44116: 4283 clrl %d3 <== NOT EXECUTED 44118: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 4411c: 4280 clrl %d0 <== NOT EXECUTED 4411e: 1002 moveb %d2,%d0 <== NOT EXECUTED 44120: b083 cmpl %d3,%d0 <== NOT EXECUTED 44122: 6700 0122 beqw 44246 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 44126: 4283 clrl %d3 <== NOT EXECUTED 44128: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 4412c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4412e: 6700 00a8 beqw 441d8 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 44132: 4283 clrl %d3 <== NOT EXECUTED 44134: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 44138: b083 cmpl %d3,%d0 <== NOT EXECUTED 4413a: 6700 00fe beqw 4423a <== NOT EXECUTED return 1; } else if (c == '\n') { 4413e: 760a moveq #10,%d3 <== NOT EXECUTED 44140: b680 cmpl %d0,%d3 <== NOT EXECUTED 44142: 6700 00ac beqw 441f0 <== 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]) 44146: 4283 clrl %d3 <== NOT EXECUTED 44148: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 4414c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4414e: 670c beqs 4415c <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 44150: 4283 clrl %d3 <== NOT EXECUTED 44152: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 44156: b083 cmpl %d3,%d0 <== NOT EXECUTED 44158: 6600 ff66 bnew 440c0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 4415c: 44c1 movew %d1,%ccr <== NOT EXECUTED 4415e: 6b58 bmis 441b8 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 44160: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44164: 7001 moveq #1,%d0 <== NOT EXECUTED 44166: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4416a: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 4416e: 5281 addql #1,%d1 <== NOT EXECUTED 44170: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44174: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4417a: 4e5e unlk %fp <== NOT EXECUTED 4417c: 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)) { 4417e: 0800 0006 btst #6,%d0 <== NOT EXECUTED 44182: 6788 beqs 4410c <== NOT EXECUTED 44184: 740d moveq #13,%d2 <== NOT EXECUTED 44186: 6084 bras 4410c <== 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); 44188: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 4418e: 6000 ff1a braw 440aa <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 44192: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44194: 4280 clrl %d0 <== NOT EXECUTED 44196: 1002 moveb %d2,%d0 <== NOT EXECUTED 44198: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4419a: 4eba fc30 jsr %pc@(43dcc ) <== NOT EXECUTED 4419e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 441a2: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441a4: 4280 clrl %d0 <== NOT EXECUTED 441a6: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 441aa: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 441ae: 5281 addql #1,%d1 <== NOT EXECUTED 441b0: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 441b4: 6000 ff34 braw 440ea <== 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); 441b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 441bc: 4eba fc0e jsr %pc@(43dcc ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441c0: 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); 441c4: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441c6: 7001 moveq #1,%d0 <== NOT EXECUTED 441c8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 441cc: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 441d0: 5281 addql #1,%d1 <== NOT EXECUTED 441d2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 441d6: 609c bras 44174 <== 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); 441d8: 4878 0001 pea 1 <== NOT EXECUTED 441dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441de: 4eba fc90 jsr %pc@(43e70 ) <== NOT EXECUTED return 0; 441e2: 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); 441e4: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 441e6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 441ec: 4e5e unlk %fp <== NOT EXECUTED 441ee: 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)) 441f0: 7048 moveq #72,%d0 <== NOT EXECUTED 441f2: c280 andl %d0,%d1 <== NOT EXECUTED 441f4: 6620 bnes 44216 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 441f6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 441fa: 7001 moveq #1,%d0 <== NOT EXECUTED 441fc: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44200: 740a moveq #10,%d2 <== NOT EXECUTED 44202: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44206: 5281 addql #1,%d1 <== NOT EXECUTED 44208: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4420c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44212: 4e5e unlk %fp <== NOT EXECUTED 44214: 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); 44216: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44218: 4878 000a pea a <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 4421c: 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); 4421e: 4eba fbac jsr %pc@(43dcc ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44222: 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); 44226: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44228: 7001 moveq #1,%d0 <== NOT EXECUTED 4422a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4422e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44232: 5281 addql #1,%d1 <== NOT EXECUTED 44234: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44238: 60d2 bras 4420c <== NOT EXECUTED } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 4423a: 7001 moveq #1,%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4423c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44242: 4e5e unlk %fp <== NOT EXECUTED 44244: 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); 44246: 42a7 clrl %sp@- <== NOT EXECUTED 44248: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4424a: 4eba fc24 jsr %pc@(43e70 ) <== NOT EXECUTED return 0; 4424e: 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); 44250: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44252: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44258: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e644 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4e644: 4e56 ffd0 linkw %fp,#-48 4e648: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4e64c: 262e 000c movel %fp@(12),%d3 4e650: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 4e654: 4eb9 0004 d5a4 jsr 4d5a4 4e65a: b0ae 0008 cmpl %fp@(8),%d0 4e65e: 6600 022c bnew 4e88c rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 4e662: 4a83 tstl %d3 4e664: 6700 023e beqw 4e8a4 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 4e668: 2003 movel %d3,%d0 4e66a: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4e66c: 721f moveq #31,%d1 4e66e: b280 cmpl %d0,%d1 4e670: 6500 0232 bcsw 4e8a4 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 4e674: 2203 movel %d3,%d1 4e676: 2803 movel %d3,%d4 4e678: 7e01 moveq #1,%d7 4e67a: e589 lsll #2,%d1 4e67c: e98c lsll #4,%d4 4e67e: 9881 subl %d1,%d4 4e680: 2044 moveal %d4,%a0 4e682: d1fc 0005 f42e addal #390190,%a0 4e688: be90 cmpl %a0@,%d7 4e68a: 6700 00d4 beqw 4e760 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 4e68e: 7208 moveq #8,%d1 4e690: b283 cmpl %d3,%d1 4e692: 6700 00d8 beqw 4e76c 4e696: 7e04 moveq #4,%d7 4e698: be83 cmpl %d3,%d7 4e69a: 6700 00d0 beqw 4e76c 4e69e: 123c 000b moveb #11,%d1 4e6a2: b283 cmpl %d3,%d1 4e6a4: 6700 00c6 beqw 4e76c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4e6a8: 7401 moveq #1,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 4e6aa: 7e01 moveq #1,%d7 4e6ac: e1aa lsll %d0,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4e6ae: 2d43 fff4 movel %d3,%fp@(-12) siginfo->si_code = SI_USER; 4e6b2: 2d47 fff8 movel %d7,%fp@(-8) if ( !value ) { 4e6b6: 4a8a tstl %a2 4e6b8: 6700 01ca beqw 4e884 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 4e6bc: 2d52 fffc movel %a2@,%fp@(-4) 4e6c0: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 4e6c6: 5280 addql #1,%d0 4e6c8: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 4e6ce: 2479 0005 f032 moveal 5f032 <_Thread_Executing>,%a2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e6d4: 206a 010e moveal %a2@(270),%a0 4e6d8: 2028 00cc movel %a0@(204),%d0 4e6dc: 4680 notl %d0 4e6de: c082 andl %d2,%d0 4e6e0: 6642 bnes 4e724 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4e6e2: 2079 0005 f5b2 moveal 5f5b2 <_POSIX_signals_Wait_queue>,%a0 4e6e8: b1fc 0005 f5b6 cmpal #390582,%a0 4e6ee: 6700 00ec beqw 4e7dc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e6f2: 2002 movel %d2,%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 4e6f4: 2448 moveal %a0,%a2 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e6f6: c0a8 0030 andl %a0@(48),%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e6fa: 2268 010e moveal %a0@(270),%a1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e6fe: 6624 bnes 4e724 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 4e700: 2029 00cc movel %a1@(204),%d0 4e704: 4680 notl %d0 4e706: c082 andl %d2,%d0 4e708: 661a bnes 4e724 <== NEVER TAKEN the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 4e70a: 2050 moveal %a0@,%a0 the_thread = (Thread_Control *)the_node; 4e70c: 2448 moveal %a0,%a2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4e70e: b1fc 0005 f5b6 cmpal #390582,%a0 4e714: 6700 00c6 beqw 4e7dc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e718: 2002 movel %d2,%d0 <== NOT EXECUTED 4e71a: c0a8 0030 andl %a0@(48),%d0 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e71e: 2268 010e moveal %a0@(270),%a1 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e722: 67dc beqs 4e700 <== NOT EXECUTED * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4e724: 7001 moveq #1,%d0 4e726: 1540 0074 moveb %d0,%a2@(116) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 4e72a: 486e fff4 pea %fp@(-12) 4e72e: 2f03 movel %d3,%sp@- 4e730: 2f0a movel %a2,%sp@- 4e732: 4eb9 0004 e97c jsr 4e97c <_POSIX_signals_Unblock_thread> 4e738: 4fef 000c lea %sp@(12),%sp 4e73c: 4a00 tstb %d0 4e73e: 6600 008a bnew 4e7ca /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 4e742: 2f02 movel %d2,%sp@- 4e744: 4eb9 0004 e94c jsr 4e94c <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4e74a: 588f addql #4,%sp 4e74c: 41f9 0005 f426 lea 5f426 <_POSIX_signals_Vectors>,%a0 4e752: 7202 moveq #2,%d1 4e754: b2b0 4800 cmpl %a0@(00000000,%d4:l),%d1 4e758: 672e beqs 4e788 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4e75a: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e760: 4280 clrl %d0 return 0; } 4e762: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e768: 4e5e unlk %fp 4e76a: 4e75 rts * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 4e76c: 4eb9 0004 eb98 jsr 4eb98 4e772: 2f03 movel %d3,%sp@- 4e774: 2f00 movel %d0,%sp@- 4e776: 4eb9 0004 eabc jsr 4eabc 4e77c: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e77e: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e784: 4e5e unlk %fp 4e786: 4e75 rts */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4e788: 4879 0005 f5a6 pea 5f5a6 <_POSIX_signals_Inactive_siginfo> 4e78e: 4eb9 0004 b9c0 jsr 4b9c0 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4e794: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4e796: 2040 moveal %d0,%a0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4e798: 4a80 tstl %d0 4e79a: 6700 0120 beqw 4e8bc _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4e79e: 216e fff4 0008 movel %fp@(-12),%a0@(8) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4e7a4: 0684 0005 f61e addil #390686,%d4 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4e7aa: 216e fff8 000c movel %fp@(-8),%a0@(12) 4e7b0: 216e fffc 0010 movel %fp@(-4),%a0@(16) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4e7b6: 2f00 movel %d0,%sp@- 4e7b8: 2f04 movel %d4,%sp@- 4e7ba: 4eb9 0004 6798 jsr 46798 <_Chain_Append> 4e7c0: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4e7c2: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e7c8: 6096 bras 4e760 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 4e7ca: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e7d0: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e7d2: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e7d8: 4e5e unlk %fp 4e7da: 4e75 rts * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4e7dc: 4285 clrl %d5 4e7de: 1a39 0005 d7c2 moveb 5d7c2 ,%d5 4e7e4: 49f9 0005 ef38 lea 5ef38 <_Objects_Information_table+0x8>,%a4 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4e7ea: 95ca subal %a2,%a2 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4e7ec: 5285 addql #1,%d5 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 4e7ee: 2054 moveal %a4@,%a0 4e7f0: 4a88 tstl %a0 4e7f2: 675e beqs 4e852 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4e7f4: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 4e7f8: 4286 clrl %d6 4e7fa: 3c28 000e movew %a0@(14),%d6 object_table = the_info->local_table; 4e7fe: 2268 0018 moveal %a0@(24),%a1 for ( index = 1 ; index <= maximum ; index++ ) { 4e802: 4a86 tstl %d6 4e804: 674c beqs 4e852 4e806: 5889 addql #4,%a1 4e808: 7001 moveq #1,%d0 the_thread = (Thread_Control *) object_table[ index ]; 4e80a: 2051 moveal %a1@,%a0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4e80c: 5280 addql #1,%d0 4e80e: 5889 addql #4,%a1 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 4e810: 4a88 tstl %a0 4e812: 673a beqs 4e84e /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4e814: 2228 0014 movel %a0@(20),%d1 4e818: ba81 cmpl %d1,%d5 4e81a: 6532 bcss 4e84e DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e81c: 2668 010e moveal %a0@(270),%a3 4e820: 2e2b 00cc movel %a3@(204),%d7 4e824: 4687 notl %d7 4e826: ce82 andl %d2,%d7 4e828: 6724 beqs 4e84e * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 4e82a: ba81 cmpl %d1,%d5 4e82c: 621c bhis 4e84a * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 4e82e: 2e2a 0010 movel %a2@(16),%d7 4e832: 671a beqs 4e84e <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4e834: 2668 0010 moveal %a0@(16),%a3 4e838: 4a8b tstl %a3 4e83a: 670e beqs 4e84a continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4e83c: 0807 001c btst #28,%d7 4e840: 660c bnes 4e84e DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4e842: 2e0b movel %a3,%d7 4e844: 0807 001c btst #28,%d7 4e848: 6704 beqs 4e84e 4e84a: 2a01 movel %d1,%d5 4e84c: 2448 moveal %a0,%a2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4e84e: b086 cmpl %d6,%d0 4e850: 63b8 blss 4e80a 4e852: 588c addql #4,%a4 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 4e854: b9fc 0005 ef44 cmpal #388932,%a4 4e85a: 6692 bnes 4e7ee } } } } if ( interested ) { 4e85c: 4a8a tstl %a2 4e85e: 6700 fee2 beqw 4e742 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4e862: 7001 moveq #1,%d0 4e864: 1540 0074 moveb %d0,%a2@(116) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 4e868: 486e fff4 pea %fp@(-12) 4e86c: 2f03 movel %d3,%sp@- 4e86e: 2f0a movel %a2,%sp@- 4e870: 4eb9 0004 e97c jsr 4e97c <_POSIX_signals_Unblock_thread> 4e876: 4fef 000c lea %sp@(12),%sp 4e87a: 4a00 tstb %d0 4e87c: 6700 fec4 beqw 4e742 4e880: 6000 ff48 braw 4e7ca <== NOT EXECUTED */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 4e884: 42ae fffc clrl %fp@(-4) 4e888: 6000 fe36 braw 4e6c0 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 4e88c: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 4e892: 7603 moveq #3,%d3 4e894: 2040 moveal %d0,%a0 4e896: 70ff moveq #-1,%d0 4e898: 2083 movel %d3,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e89a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e8a0: 4e5e unlk %fp 4e8a2: 4e75 rts */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4e8a4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 4e8aa: 7416 moveq #22,%d2 4e8ac: 2040 moveal %d0,%a0 4e8ae: 70ff moveq #-1,%d0 4e8b0: 2082 movel %d2,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e8b2: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e8b8: 4e5e unlk %fp 4e8ba: 4e75 rts if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 4e8bc: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 4e8c2: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 4e8c8: 720b moveq #11,%d1 4e8ca: 2040 moveal %d0,%a0 4e8cc: 70ff moveq #-1,%d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e8ce: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 4e8d4: 2081 movel %d1,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e8d6: 4e5e unlk %fp ... =============================================================================== 00044510 : int link( const char *existing, const char *new ) { 44510: 4e56 ffc4 linkw %fp,#-60 44514: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 44518: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 4451c: 260e movel %fp,%d3 4451e: 0683 ffff ffe8 addil #-24,%d3 44524: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 44526: 266e 000c moveal %fp@(12),%a3 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 4452a: 4eb9 0005 2f00 jsr 52f00 44530: 7201 moveq #1,%d1 44532: 2e81 movel %d1,%sp@ 44534: 2f03 movel %d3,%sp@- 44536: 42a7 clrl %sp@- 44538: 2f00 movel %d0,%sp@- 4453a: 2f02 movel %d2,%sp@- 4453c: 4eb9 0004 3f90 jsr 43f90 0, &existing_loc, true ); if ( result != 0 ) 44542: 4fef 0014 lea %sp@(20),%sp 44546: 4a80 tstl %d0 44548: 6600 00cc bnew 44616 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 4454c: 742f moveq #47,%d2 4454e: 1213 moveb %a3@,%d1 44550: 1001 moveb %d1,%d0 44552: 49c0 extbl %d0 44554: b480 cmpl %d0,%d2 44556: 670e beqs 44566 44558: 143c 005c moveb #92,%d2 4455c: b480 cmpl %d0,%d2 4455e: 6706 beqs 44566 <== NEVER TAKEN 44560: 4a01 tstb %d1 44562: 6600 00c0 bnew 44624 44566: 2079 0006 2298 moveal 62298 ,%a0 4456c: 45ee ffd4 lea %fp@(-44),%a2 44570: 7001 moveq #1,%d0 44572: 24a8 0018 movel %a0@(24),%a2@ 44576: 2d68 001c ffd8 movel %a0@(28),%fp@(-40) 4457c: 2d68 0020 ffdc movel %a0@(32),%fp@(-36) 44582: 2d68 0024 ffe0 movel %a0@(36),%fp@(-32) 44588: 2d68 0028 ffe4 movel %a0@(40),%fp@(-28) if ( !parent_loc.ops->evalformake_h ) { 4458e: 206e ffe0 moveal %fp@(-32),%a0 44592: 2068 0004 moveal %a0@(4),%a0 44596: 4a88 tstl %a0 44598: 6700 0122 beqw 446bc 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 ); 4459c: 486e fffc pea %fp@(-4) 445a0: 2f0a movel %a2,%sp@- 445a2: 4873 0800 pea %a3@(00000000,%d0:l) 445a6: 4e90 jsr %a0@ if ( result != 0 ) { 445a8: 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 ); 445ac: 2640 moveal %d0,%a3 if ( result != 0 ) { 445ae: 4a80 tstl %d0 445b0: 6600 00dc bnew 4468e /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 445b4: 202e fff8 movel %fp@(-8),%d0 445b8: b0ae ffe4 cmpl %fp@(-28),%d0 445bc: 6600 008a bnew 44648 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 445c0: 226e ffe0 moveal %fp@(-32),%a1 445c4: 2069 0008 moveal %a1@(8),%a0 445c8: 4a88 tstl %a0 445ca: 6700 0122 beqw 446ee 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 ); 445ce: 2f2e fffc movel %fp@(-4),%sp@- 445d2: 2f0a movel %a2,%sp@- 445d4: 2f03 movel %d3,%sp@- 445d6: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 445d8: 206e fff4 moveal %fp@(-12),%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 ); 445dc: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 445de: 4fef 000c lea %sp@(12),%sp 445e2: 4a88 tstl %a0 445e4: 670e beqs 445f4 <== NEVER TAKEN 445e6: 2068 001c moveal %a0@(28),%a0 445ea: 4a88 tstl %a0 445ec: 6706 beqs 445f4 <== NEVER TAKEN 445ee: 2f03 movel %d3,%sp@- 445f0: 4e90 jsr %a0@ 445f2: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 445f4: 206e ffe0 moveal %fp@(-32),%a0 445f8: 4a88 tstl %a0 445fa: 670e beqs 4460a <== NEVER TAKEN 445fc: 2068 001c moveal %a0@(28),%a0 44600: 4a88 tstl %a0 44602: 6706 beqs 4460a <== NEVER TAKEN 44604: 2f0a movel %a2,%sp@- 44606: 4e90 jsr %a0@ 44608: 588f addql #4,%sp return result; } 4460a: 2002 movel %d2,%d0 4460c: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 44612: 4e5e unlk %fp 44614: 4e75 rts * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 0, &existing_loc, true ); if ( result != 0 ) 44616: 74ff moveq #-1,%d2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 44618: 2002 movel %d2,%d0 4461a: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 44620: 4e5e unlk %fp 44622: 4e75 rts /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 44624: 2079 0006 2298 moveal 62298 ,%a0 4462a: 45ee ffd4 lea %fp@(-44),%a2 4462e: 5888 addql #4,%a0 44630: 4280 clrl %d0 44632: 2498 movel %a0@+,%a2@ 44634: 2d58 ffd8 movel %a0@+,%fp@(-40) 44638: 2d58 ffdc movel %a0@+,%fp@(-36) 4463c: 2d58 ffe0 movel %a0@+,%fp@(-32) 44640: 2d50 ffe4 movel %a0@,%fp@(-28) 44644: 6000 ff48 braw 4458e * 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 ); 44648: 206e fff4 moveal %fp@(-12),%a0 4464c: 4a88 tstl %a0 4464e: 670e beqs 4465e <== NEVER TAKEN 44650: 2068 001c moveal %a0@(28),%a0 44654: 4a88 tstl %a0 44656: 6706 beqs 4465e <== NEVER TAKEN 44658: 2f03 movel %d3,%sp@- 4465a: 4e90 jsr %a0@ 4465c: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 4465e: 206e ffe0 moveal %fp@(-32),%a0 44662: 4a88 tstl %a0 44664: 670e beqs 44674 <== NEVER TAKEN 44666: 2068 001c moveal %a0@(28),%a0 4466a: 4a88 tstl %a0 4466c: 6706 beqs 44674 <== NEVER TAKEN 4466e: 2f0a movel %a2,%sp@- 44670: 4e90 jsr %a0@ 44672: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 44674: 4eb9 0005 1a54 jsr 51a54 <__errno> 4467a: 74ff moveq #-1,%d2 4467c: 2040 moveal %d0,%a0 4467e: 7012 moveq #18,%d0 44680: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 44682: 2002 movel %d2,%d0 44684: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 4468a: 4e5e unlk %fp 4468c: 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 ); 4468e: 206e fff4 moveal %fp@(-12),%a0 44692: 4a88 tstl %a0 44694: 670e beqs 446a4 <== NEVER TAKEN 44696: 2068 001c moveal %a0@(28),%a0 4469a: 4a88 tstl %a0 4469c: 6706 beqs 446a4 <== NEVER TAKEN 4469e: 2f03 movel %d3,%sp@- 446a0: 4e90 jsr %a0@ 446a2: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 446a4: 4eb9 0005 1a54 jsr 51a54 <__errno> 446aa: 74ff moveq #-1,%d2 446ac: 2040 moveal %d0,%a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446ae: 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 ); 446b0: 208b movel %a3,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446b2: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 446b8: 4e5e unlk %fp 446ba: 4e75 rts */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 446bc: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 446c0: 4a88 tstl %a0 <== NOT EXECUTED 446c2: 670e beqs 446d2 <== NOT EXECUTED 446c4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 446c8: 4a88 tstl %a0 <== NOT EXECUTED 446ca: 6706 beqs 446d2 <== NOT EXECUTED 446cc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 446ce: 4e90 jsr %a0@ <== NOT EXECUTED 446d0: 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 ); 446d2: 4eb9 0005 1a54 jsr 51a54 <__errno> <== NOT EXECUTED 446d8: 74ff moveq #-1,%d2 <== NOT EXECUTED 446da: 2040 moveal %d0,%a0 <== NOT EXECUTED 446dc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446e2: 2002 movel %d2,%d0 <== NOT EXECUTED 446e4: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 <== NOT EXECUTED 446ea: 4e5e unlk %fp <== NOT EXECUTED 446ec: 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 ); 446ee: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 446f2: 4a88 tstl %a0 <== NOT EXECUTED 446f4: 6712 beqs 44708 <== NOT EXECUTED 446f6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 446fa: 4a88 tstl %a0 <== NOT EXECUTED 446fc: 670a beqs 44708 <== NOT EXECUTED 446fe: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44700: 4e90 jsr %a0@ <== NOT EXECUTED 44702: 226e ffe0 moveal %fp@(-32),%a1 <== NOT EXECUTED 44706: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 44708: 4a89 tstl %a1 <== NOT EXECUTED 4470a: 67c6 beqs 446d2 <== NOT EXECUTED 4470c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 44710: 4a88 tstl %a0 <== NOT EXECUTED 44712: 67be beqs 446d2 <== NOT EXECUTED 44714: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44716: 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 ); 44718: 4e90 jsr %a0@ <== NOT EXECUTED 4471a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4471c: 4eb9 0005 1a54 jsr 51a54 <__errno> <== NOT EXECUTED 44722: 2040 moveal %d0,%a0 <== NOT EXECUTED 44724: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4472a: 60b6 bras 446e2 <== NOT EXECUTED =============================================================================== 0005b4e0 : off_t lseek( int fd, off_t offset, int whence ) { 5b4e0: 4e56 ffe4 linkw %fp,#-28 5b4e4: 222e 0008 movel %fp@(8),%d1 5b4e8: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 5b4ec: 202e 0014 movel %fp@(20),%d0 5b4f0: 282e 000c movel %fp@(12),%d4 5b4f4: 2a2e 0010 movel %fp@(16),%d5 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 5b4f8: b2b9 0005 d714 cmpl 5d714 ,%d1 5b4fe: 6400 0118 bccw 5b618 iop = rtems_libio_iop( fd ); 5b502: 2479 0005 ee18 moveal 5ee18 ,%a2 5b508: ed89 lsll #6,%d1 5b50a: d5c1 addal %d1,%a2 rtems_libio_check_is_open(iop); 5b50c: 222a 0014 movel %a2@(20),%d1 5b510: 0281 0000 0100 andil #256,%d1 5b516: 6700 0100 beqw 5b618 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 5b51a: 206a 003c moveal %a2@(60),%a0 5b51e: 4aa8 0014 tstl %a0@(20) 5b522: 6700 0112 beqw 5b636 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 5b526: 7201 moveq #1,%d1 /* * Now process the lseek(). */ old_offset = iop->offset; 5b528: 242a 000c movel %a2@(12),%d2 5b52c: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 5b530: b280 cmpl %d0,%d1 5b532: 6700 00ae beqw 5b5e2 5b536: 7c02 moveq #2,%d6 5b538: bc80 cmpl %d0,%d6 5b53a: 6752 beqs 5b58e 5b53c: 4a80 tstl %d0 5b53e: 6600 0084 bnew 5b5c4 case SEEK_SET: iop->offset = offset; 5b542: 2544 000c movel %d4,%a2@(12) 5b546: 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 ); 5b54a: 2f00 movel %d0,%sp@- 5b54c: 2f05 movel %d5,%sp@- 5b54e: 2f04 movel %d4,%sp@- 5b550: 2f0a movel %a2,%sp@- 5b552: 2068 0014 moveal %a0@(20),%a0 5b556: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5b558: 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 ); 5b55c: 2800 movel %d0,%d4 5b55e: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5b560: 70ff moveq #-1,%d0 5b562: 72ff moveq #-1,%d1 5b564: 9285 subl %d5,%d1 5b566: 9184 subxl %d4,%d0 5b568: 670e beqs 5b578 <== NEVER TAKEN /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b56a: 2205 movel %d5,%d1 5b56c: 2004 movel %d4,%d0 5b56e: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b574: 4e5e unlk %fp 5b576: 4e75 rts 5b578: 2205 movel %d5,%d1 5b57a: 2004 movel %d4,%d0 * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; 5b57c: 2542 000c movel %d2,%a2@(12) 5b580: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b584: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b58a: 4e5e unlk %fp 5b58c: 4e75 rts case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 5b58e: 2c2a 0004 movel %a2@(4),%d6 5b592: 2e2a 0008 movel %a2@(8),%d7 5b596: de85 addl %d5,%d7 5b598: dd84 addxl %d4,%d6 5b59a: 2546 000c movel %d6,%a2@(12) 5b59e: 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 ); 5b5a2: 2f00 movel %d0,%sp@- 5b5a4: 2f05 movel %d5,%sp@- 5b5a6: 2f04 movel %d4,%sp@- 5b5a8: 2f0a movel %a2,%sp@- 5b5aa: 2068 0014 moveal %a0@(20),%a0 5b5ae: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5b5b0: 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 ); 5b5b4: 2800 movel %d0,%d4 5b5b6: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5b5b8: 70ff moveq #-1,%d0 5b5ba: 72ff moveq #-1,%d1 5b5bc: 9285 subl %d5,%d1 5b5be: 9184 subxl %d4,%d0 5b5c0: 66a8 bnes 5b56a 5b5c2: 60b4 bras 5b578 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 5b5c4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 5b5ca: 2040 moveal %d0,%a0 5b5cc: 7016 moveq #22,%d0 5b5ce: 78ff moveq #-1,%d4 5b5d0: 7aff moveq #-1,%d5 5b5d2: 2080 movel %d0,%a0@ /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b5d4: 2205 movel %d5,%d1 5b5d6: 2004 movel %d4,%d0 5b5d8: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b5de: 4e5e unlk %fp 5b5e0: 4e75 rts case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 5b5e2: 2c04 movel %d4,%d6 5b5e4: 2e05 movel %d5,%d7 5b5e6: de83 addl %d3,%d7 5b5e8: dd82 addxl %d2,%d6 5b5ea: 2546 000c movel %d6,%a2@(12) 5b5ee: 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 ); 5b5f2: 2f00 movel %d0,%sp@- 5b5f4: 2f05 movel %d5,%sp@- 5b5f6: 2f04 movel %d4,%sp@- 5b5f8: 2f0a movel %a2,%sp@- 5b5fa: 2068 0014 moveal %a0@(20),%a0 5b5fe: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5b600: 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 ); 5b604: 2800 movel %d0,%d4 5b606: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5b608: 70ff moveq #-1,%d0 5b60a: 72ff moveq #-1,%d1 5b60c: 9285 subl %d5,%d1 5b60e: 9184 subxl %d4,%d0 5b610: 6600 ff58 bnew 5b56a 5b614: 6000 ff62 braw 5b578 <== 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); 5b618: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 5b61e: 7209 moveq #9,%d1 <== NOT EXECUTED 5b620: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b622: 78ff moveq #-1,%d4 <== NOT EXECUTED 5b624: 7aff moveq #-1,%d5 <== NOT EXECUTED 5b626: 2081 movel %d1,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b628: 2205 movel %d5,%d1 <== NOT EXECUTED 5b62a: 2004 movel %d4,%d0 <== NOT EXECUTED 5b62c: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5b632: 4e5e unlk %fp <== NOT EXECUTED 5b634: 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 ); 5b636: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 5b63c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b63e: 78ff moveq #-1,%d4 <== NOT EXECUTED 5b640: 7aff moveq #-1,%d5 <== NOT EXECUTED 5b642: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b648: 2205 movel %d5,%d1 <== NOT EXECUTED 5b64a: 2004 movel %d4,%d0 <== NOT EXECUTED 5b64c: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5b652: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ac8c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4ac8c: 4e56 fff4 linkw %fp,#-12 4ac90: 52b9 0005 ee28 addql #1,5ee28 4ac96: 48d7 001c moveml %d2-%d4,%sp@ 4ac9a: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4ac9e: 4eb9 0004 ac4a jsr 4ac4a /* * Validate the parameters */ if ( !size ) 4aca4: 4a83 tstl %d3 4aca6: 6766 beqs 4ad0e <== 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()) && 4aca8: 7003 moveq #3,%d0 4acaa: b0b9 0005 f100 cmpl 5f100 <_System_state_Current>,%d0 4acb0: 6752 beqs 4ad04 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4acb2: 42a7 clrl %sp@- 4acb4: 42a7 clrl %sp@- 4acb6: 2f03 movel %d3,%sp@- 4acb8: 2f39 0005 d720 movel 5d720 ,%sp@- 4acbe: 4eb9 0004 bff8 jsr 4bff8 <_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 ) { 4acc4: 4fef 0010 lea %sp@(16),%sp 4acc8: 2400 movel %d0,%d2 4acca: 675e beqs 4ad2a if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 4accc: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4acce: 2079 0005 ddae moveal 5ddae ,%a0 4acd4: 4a88 tstl %a0 4acd6: 670a beqs 4ace2 <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 4acd8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4acda: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4acdc: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4acde: 4e90 jsr %a0@ <== NOT EXECUTED 4ace0: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4ace2: 2079 0005 dda6 moveal 5dda6 ,%a0 4ace8: 4a88 tstl %a0 4acea: 6730 beqs 4ad1c <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4acec: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4acee: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4acf2: 2404 movel %d4,%d2 <== NOT EXECUTED 4acf4: 4e90 jsr %a0@ <== NOT EXECUTED 4acf6: 588f addql #4,%sp <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4acf8: 2002 movel %d2,%d0 <== NOT EXECUTED 4acfa: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ad00: 4e5e unlk %fp <== NOT EXECUTED 4ad02: 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()) && 4ad04: 4eb9 0004 abf0 jsr 4abf0 4ad0a: 4a00 tstb %d0 4ad0c: 66a4 bnes 4acb2 <== ALWAYS TAKEN /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4ad0e: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ad10: 2002 movel %d2,%d0 <== NOT EXECUTED 4ad12: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ad18: 4e5e unlk %fp <== NOT EXECUTED 4ad1a: 4e75 rts <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4ad1c: 2404 movel %d4,%d2 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ad1e: 2002 movel %d2,%d0 4ad20: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4ad26: 4e5e unlk %fp 4ad28: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 4ad2a: 2079 0005 ddaa moveal 5ddaa ,%a0 4ad30: 4a88 tstl %a0 4ad32: 670e beqs 4ad42 <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4ad34: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ad36: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4ad3a: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 4ad3c: 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 ); 4ad3e: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 4ad40: 668c bnes 4acce <== NOT EXECUTED errno = ENOMEM; 4ad42: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 4ad48: 2040 moveal %d0,%a0 4ad4a: 700c moveq #12,%d0 4ad4c: 2080 movel %d0,%a0@ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ad4e: 2002 movel %d2,%d0 4ad50: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4ad56: 4e5e unlk %fp ... =============================================================================== 0004ac30 : } void malloc_deferred_free( void *pointer ) { 4ac30: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4ac34: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4ac38: 4879 0005 f41a pea 5f41a <== NOT EXECUTED 4ac3e: 4eb9 0004 6798 jsr 46798 <_Chain_Append> <== NOT EXECUTED 4ac44: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 4ac46: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ac4a : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4ac4a: 4e56 0000 linkw %fp,#0 4ac4e: 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); 4ac50: 47f9 0004 a6f4 lea 4a6f4 ,%a3 { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4ac56: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4ac58: 4879 0005 f41a pea 5f41a 4ac5e: 45f9 0004 b9c0 lea 4b9c0 <_Chain_Get>,%a2 4ac64: 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) 4ac66: 588f addql #4,%sp 4ac68: 4a80 tstl %d0 4ac6a: 6714 beqs 4ac80 <== ALWAYS TAKEN free(to_be_freed); 4ac6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ac6e: 4e93 jsr %a3@ <== NOT EXECUTED 4ac70: 588f addql #4,%sp <== NOT EXECUTED 4ac72: 4879 0005 f41a pea 5f41a <== NOT EXECUTED 4ac78: 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) 4ac7a: 588f addql #4,%sp <== NOT EXECUTED 4ac7c: 4a80 tstl %d0 <== NOT EXECUTED 4ac7e: 66ec bnes 4ac6c <== NOT EXECUTED free(to_be_freed); } 4ac80: 246e fff8 moveal %fp@(-8),%a2 4ac84: 266e fffc moveal %fp@(-4),%a3 4ac88: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004abf0 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 4abf0: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 4abf4: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 4abfa: 660e bnes 4ac0a <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 4abfc: 2039 0005 f012 movel 5f012 <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4ac02: 57c0 seq %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4ac04: 4e5e unlk %fp #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4ac06: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4ac08: 4e75 rts 4ac0a: 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 ) 4ac0c: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Nest_level > 0 ) return false; return true; } =============================================================================== 000520d4 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 520d4: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 520d8: 2f39 0006 4734 movel 64734 ,%sp@- 520de: 4878 0001 pea 1 520e2: 4eb9 0004 3adc jsr 43adc if ( memory ) 520e8: 508f addql #8,%sp 520ea: 4a80 tstl %d0 520ec: 6706 beqs 520f4 <== NEVER TAKEN memfile_blocks_allocated++; 520ee: 52b9 0006 48d0 addql #1,648d0 return memory; } 520f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000524fc : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 524fc: 4e56 0000 linkw %fp,#0 52500: 2f0a movel %a2,%sp@- 52502: 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) ) { 52506: 2f0a movel %a2,%sp@- 52508: 4eb9 0005 0012 jsr 50012 5250e: 588f addql #4,%sp 52510: 4a80 tstl %d0 52512: 662e bnes 52542 52514: 4a6a 0032 tstw %a2@(50) 52518: 6628 bnes 52542 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 5251a: 2079 0006 38fc moveal 638fc ,%a0 52520: b5e8 0004 cmpal %a0@(4),%a2 52524: 6726 beqs 5254c <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 52526: 7006 moveq #6,%d0 52528: b0aa 0048 cmpl %a2@(72),%d0 5252c: 670a beqs 52538 <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 5252e: 2f0a movel %a2,%sp@- 52530: 4eb9 0005 23a8 jsr 523a8 52536: 588f addql #4,%sp free( the_jnode ); 52538: 2f0a movel %a2,%sp@- 5253a: 4eb9 0004 4024 jsr 44024 52540: 588f addql #4,%sp } return 0; } 52542: 246e fffc moveal %fp@(-4),%a2 52546: 4280 clrl %d0 52548: 4e5e unlk %fp 5254a: 4e75 rts /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 5254c: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 52550: 7006 moveq #6,%d0 <== NOT EXECUTED 52552: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 52556: 66d6 bnes 5252e <== NOT EXECUTED 52558: 60de bras 52538 <== NOT EXECUTED =============================================================================== 000522f6 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 522f6: 4e56 ffec linkw %fp,#-20 522fa: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 522fe: 286e 0008 moveal %fp@(8),%a4 52302: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 52306: 4a8c tstl %a4 52308: 6736 beqs 52340 <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 5230a: 2454 moveal %a4@,%a2 5230c: 47f9 0005 20ba lea 520ba ,%a3 for ( i=0 ; i<== NEVER TAKEN 52316: 4282 clrl %d2 if ( b[i] ) { 52318: 2012 movel %a2@,%d0 5231a: 6708 beqs 52324 memfile_free_block( b[i] ); 5231c: 2f00 movel %d0,%sp@- 5231e: 4e93 jsr %a3@ b[i] = 0; 52320: 588f addql #4,%sp 52322: 4292 clrl %a2@ * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 5232c: 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 ); 5232e: 2f0a movel %a2,%sp@- 52330: 4e93 jsr %a3@ *block_table = 0; 52332: 588f addql #4,%sp 52334: 4294 clrl %a4@ } 52336: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 5233c: 4e5e unlk %fp 5233e: 4e75 rts /* * Perform internal consistency checks */ assert( block_table ); 52340: 4879 0006 2ce4 pea 62ce4 <== NOT EXECUTED 52346: 4879 0006 2da2 pea 62da2 <__FUNCTION__.6063> <== NOT EXECUTED 5234c: 4878 01b3 pea 1b3 <== NOT EXECUTED 52350: 4879 0006 2c7a pea 62c7a <== NOT EXECUTED 52356: 4eb9 0004 fd00 jsr 4fd00 <__assert_func> <== NOT EXECUTED =============================================================================== 000527bc : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 527bc: 4e56 ffec linkw %fp,#-20 527c0: 206e 0008 moveal %fp@(8),%a0 527c4: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 527c8: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 527cc: 202e 000c movel %fp@(12),%d0 527d0: 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 ) 527d4: 242a 004c movel %a2@(76),%d2 527d8: 262a 0050 movel %a2@(80),%d3 527dc: 9681 subl %d1,%d3 527de: 9580 subxl %d0,%d2 527e0: 6d30 blts 52812 <== 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; 527e2: 2540 004c movel %d0,%a2@(76) 527e6: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 527ea: 2140 0004 movel %d0,%a0@(4) 527ee: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 527f2: 42a7 clrl %sp@- 527f4: 486e fff8 pea %fp@(-8) 527f8: 4eb9 0004 40b4 jsr 440b4 527fe: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 52804: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 52806: 4280 clrl %d0 return 0; } 52808: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 5280e: 4e5e unlk %fp 52810: 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 ); 52812: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52814: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52816: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52818: 4eb9 0005 266a jsr 5266a <== NOT EXECUTED 5281e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 52822: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 52828: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005282c : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 5282c: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 5282e: 4e56 ffe8 linkw %fp,#-24 52832: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 52836: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 5283a: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 5283e: b0ab 0048 cmpl %a3@(72),%d0 52842: 673e beqs 52882 <== 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 )) 52844: 2f2a 0010 movel %a2@(16),%sp@- 52848: 2f2a 000c movel %a2@(12),%sp@- 5284c: 2f0b movel %a3,%sp@- 5284e: 4eb9 0005 266a jsr 5266a 52854: 4fef 000c lea %sp@(12),%sp 52858: 4a80 tstl %d0 5285a: 6668 bnes 528c4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 5285c: 202b 004c movel %a3@(76),%d0 52860: 222b 0050 movel %a3@(80),%d1 52864: 242a 000c movel %a2@(12),%d2 52868: 262a 0010 movel %a2@(16),%d3 5286c: 2540 0004 movel %d0,%a2@(4) 52870: 2541 0008 movel %d1,%a2@(8) } return iop->offset; } 52874: 2203 movel %d3,%d1 52876: 2002 movel %d2,%d0 52878: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5287e: 4e5e unlk %fp 52880: 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) 52882: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 52886: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED 5288a: 242b 004c movel %a3@(76),%d2 <== NOT EXECUTED 5288e: 262b 0050 movel %a3@(80),%d3 <== NOT EXECUTED 52892: 2800 movel %d0,%d4 <== NOT EXECUTED 52894: 2a01 movel %d1,%d5 <== NOT EXECUTED 52896: 9a83 subl %d3,%d5 <== NOT EXECUTED 52898: 9982 subxl %d2,%d4 <== NOT EXECUTED 5289a: 6e12 bgts 528ae <== NOT EXECUTED 5289c: 2400 movel %d0,%d2 <== NOT EXECUTED 5289e: 2601 movel %d1,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 528a0: 2203 movel %d3,%d1 <== NOT EXECUTED 528a2: 2002 movel %d2,%d0 <== NOT EXECUTED 528a4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 528aa: 4e5e unlk %fp <== NOT EXECUTED 528ac: 4e75 rts <== NOT EXECUTED 528ae: 2203 movel %d3,%d1 <== NOT EXECUTED 528b0: 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; 528b2: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 528b6: 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; } 528ba: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 528c0: 4e5e unlk %fp <== NOT EXECUTED 528c2: 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 ); 528c4: 4eb9 0005 4490 jsr 54490 <__errno> <== NOT EXECUTED 528ca: 761c moveq #28,%d3 <== NOT EXECUTED 528cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 528ce: 2083 movel %d3,%a0@ <== NOT EXECUTED 528d0: 74ff moveq #-1,%d2 <== NOT EXECUTED 528d2: 76ff moveq #-1,%d3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; } return iop->offset; } 528d4: 2203 movel %d3,%d1 <== NOT EXECUTED 528d6: 2002 movel %d2,%d0 <== NOT EXECUTED 528d8: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 528de: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052bac : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 52bac: 4e56 fff0 linkw %fp,#-16 52bb0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 52bb4: 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)) 52bb8: 202a 0014 movel %a2@(20),%d0 52bbc: 2200 movel %d0,%d1 52bbe: 0281 0000 0204 andil #516,%d1 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 52bc4: 266a 0038 moveal %a2@(56),%a3 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 52bc8: 6708 beqs 52bd2 && (the_jnode->type == IMFS_LINEAR_FILE)) { 52bca: 7206 moveq #6,%d1 52bcc: b2ab 0048 cmpl %a3@(72),%d1 52bd0: 6732 beqs 52c04 <== 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) 52bd2: 222b 004c movel %a3@(76),%d1 52bd6: 242b 0050 movel %a3@(80),%d2 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 52bda: 0800 0009 btst #9,%d0 52bde: 6710 beqs 52bf0 iop->offset = the_jnode->info.file.size; 52be0: 2541 000c movel %d1,%a2@(12) 52be4: 2542 0010 movel %d2,%a2@(16) 52be8: 222b 004c movel %a3@(76),%d1 52bec: 242b 0050 movel %a3@(80),%d2 iop->size = the_jnode->info.file.size; 52bf0: 4280 clrl %d0 52bf2: 2541 0004 movel %d1,%a2@(4) 52bf6: 2542 0008 movel %d2,%a2@(8) return 0; } 52bfa: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 52c00: 4e5e unlk %fp 52c02: 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; 52c04: 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; 52c08: 4282 clrl %d2 <== NOT EXECUTED 52c0a: 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; 52c0c: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 52c10: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 52c14: 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; 52c18: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 52c1a: 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; 52c1e: 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; 52c22: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 52c26: 42ab 005c clrl %a3@(92) <== NOT EXECUTED if ((count != 0) 52c2a: 4a80 tstl %d0 <== NOT EXECUTED 52c2c: 6610 bnes 52c3e <== NOT EXECUTED 52c2e: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52c32: 4281 clrl %d1 <== NOT EXECUTED 52c34: 4282 clrl %d2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 52c36: 0800 0009 btst #9,%d0 <== NOT EXECUTED 52c3a: 67b4 beqs 52bf0 <== NOT EXECUTED 52c3c: 60a2 bras 52be0 <== 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)) 52c3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52c40: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52c42: 42a7 clrl %sp@- <== NOT EXECUTED 52c44: 42a7 clrl %sp@- <== NOT EXECUTED 52c46: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52c48: 4eb9 0005 28e2 jsr 528e2 <== 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) 52c4e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52c52: 72ff moveq #-1,%d1 <== NOT EXECUTED 52c54: b280 cmpl %d0,%d1 <== NOT EXECUTED 52c56: 6710 beqs 52c68 <== NOT EXECUTED 52c58: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52c5c: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED 52c60: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED 52c64: 6000 ff74 braw 52bda <== NOT EXECUTED 52c68: 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; } 52c6a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 52c70: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005255a : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 5255a: 4e56 fff8 linkw %fp,#-8 5255e: 206e 000c moveal %fp@(12),%a0 52562: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 52564: 2450 moveal %a0@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 52566: 4aaa 0008 tstl %a2@(8) 5256a: 670e beqs 5257a <== NEVER TAKEN 5256c: 2f0a movel %a2,%sp@- 5256e: 4eb9 0004 8774 jsr 48774 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 52574: 588f addql #4,%sp 52576: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 5257a: 302a 0032 movew %a2@(50),%d0 5257e: 5380 subql #1,%d0 52580: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 52584: 42a7 clrl %sp@- 52586: 486e fff8 pea %fp@(-8) 5258a: 4eb9 0004 40b4 jsr 440b4 52590: 256e fff8 0044 movel %fp@(-8),%a2@(68) return memfile_check_rmnod( the_jnode ); 52596: 2f0a movel %a2,%sp@- 52598: 4eb9 0005 24fc jsr 524fc } 5259e: 246e fff4 moveal %fp@(-12),%a2 525a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000429a8 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 429a8: 4e56 ffdc linkw %fp,#-36 429ac: 226e 0008 moveal %fp@(8),%a1 429b0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 429b4: 242e 000c movel %fp@(12),%d2 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 429b8: 2002 movel %d2,%d0 429ba: 0280 0000 f000 andil #61440,%d0 429c0: 6700 0108 beqw 42aca rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 429c4: 762f moveq #47,%d3 429c6: 1211 moveb %a1@,%d1 429c8: 1001 moveb %d1,%d0 429ca: 49c0 extbl %d0 429cc: b680 cmpl %d0,%d3 429ce: 670e beqs 429de 429d0: 163c 005c moveb #92,%d3 429d4: b680 cmpl %d0,%d3 429d6: 6706 beqs 429de <== NEVER TAKEN 429d8: 4a01 tstb %d1 429da: 6600 0096 bnew 42a72 429de: 2079 0005 d824 moveal 5d824 ,%a0 429e4: 45ee ffe8 lea %fp@(-24),%a2 429e8: 7001 moveq #1,%d0 429ea: 24a8 0018 movel %a0@(24),%a2@ 429ee: 2d68 001c ffec movel %a0@(28),%fp@(-20) 429f4: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 429fa: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 42a00: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) if ( !temp_loc.ops->evalformake_h ) { 42a06: 206e fff4 moveal %fp@(-12),%a0 42a0a: 2068 0004 moveal %a0@(4),%a0 42a0e: 4a88 tstl %a0 42a10: 6700 008e beqw 42aa0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 42a14: 486e fffc pea %fp@(-4) 42a18: 2f0a movel %a2,%sp@- 42a1a: 4871 0800 pea %a1@(00000000,%d0:l) 42a1e: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42a20: 4fef 000c lea %sp@(12),%sp 42a24: 4a80 tstl %d0 42a26: 6600 0094 bnew 42abc return -1; if ( !temp_loc.ops->mknod_h ) { 42a2a: 226e fff4 moveal %fp@(-12),%a1 42a2e: 2069 0014 moveal %a1@(20),%a0 42a32: 4a88 tstl %a0 42a34: 6700 00ae beqw 42ae4 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 ); 42a38: 2f0a movel %a2,%sp@- 42a3a: 2f2e 0014 movel %fp@(20),%sp@- 42a3e: 2f2e 0010 movel %fp@(16),%sp@- 42a42: 2f02 movel %d2,%sp@- 42a44: 2f2e fffc movel %fp@(-4),%sp@- 42a48: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 42a4a: 206e fff4 moveal %fp@(-12),%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 ); 42a4e: 2400 movel %d0,%d2 rtems_filesystem_freenode( &temp_loc ); 42a50: 4fef 0014 lea %sp@(20),%sp 42a54: 4a88 tstl %a0 42a56: 670e beqs 42a66 <== NEVER TAKEN 42a58: 2068 001c moveal %a0@(28),%a0 42a5c: 4a88 tstl %a0 42a5e: 6706 beqs 42a66 42a60: 2f0a movel %a2,%sp@- 42a62: 4e90 jsr %a0@ 42a64: 588f addql #4,%sp return result; } 42a66: 2002 movel %d2,%d0 42a68: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 42a6e: 4e5e unlk %fp 42a70: 4e75 rts int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42a72: 2079 0005 d824 moveal 5d824 ,%a0 42a78: 45ee ffe8 lea %fp@(-24),%a2 42a7c: 5888 addql #4,%a0 42a7e: 4280 clrl %d0 42a80: 2498 movel %a0@+,%a2@ 42a82: 2d58 ffec movel %a0@+,%fp@(-20) 42a86: 2d58 fff0 movel %a0@+,%fp@(-16) 42a8a: 2d58 fff4 movel %a0@+,%fp@(-12) 42a8e: 2d50 fff8 movel %a0@,%fp@(-8) if ( !temp_loc.ops->evalformake_h ) { 42a92: 206e fff4 moveal %fp@(-12),%a0 42a96: 2068 0004 moveal %a0@(4),%a0 42a9a: 4a88 tstl %a0 42a9c: 6600 ff76 bnew 42a14 if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 42aa0: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 42aa6: 74ff moveq #-1,%d2 <== NOT EXECUTED 42aa8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42aaa: 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; } 42ab0: 2002 movel %d2,%d0 <== NOT EXECUTED 42ab2: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 <== NOT EXECUTED 42ab8: 4e5e unlk %fp <== NOT EXECUTED 42aba: 4e75 rts <== NOT EXECUTED result = (*temp_loc.ops->evalformake_h)( &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42abc: 74ff moveq #-1,%d2 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42abe: 2002 movel %d2,%d0 42ac0: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 42ac6: 4e5e unlk %fp 42ac8: 4e75 rts 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 ); 42aca: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 42ad0: 74ff moveq #-1,%d2 <== NOT EXECUTED 42ad2: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ad4: 7016 moveq #22,%d0 <== NOT EXECUTED 42ad6: 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; } 42ad8: 2002 movel %d2,%d0 <== NOT EXECUTED 42ada: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 <== NOT EXECUTED 42ae0: 4e5e unlk %fp <== NOT EXECUTED 42ae2: 4e75 rts <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 42ae4: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42ae8: 4a88 tstl %a0 <== NOT EXECUTED 42aea: 67b4 beqs 42aa0 <== NOT EXECUTED 42aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42aee: 74ff moveq #-1,%d2 <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 42af0: 4e90 jsr %a0@ <== NOT EXECUTED 42af2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42af4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 42afa: 2040 moveal %d0,%a0 <== NOT EXECUTED 42afc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42b02: 60ac bras 42ab0 <== NOT EXECUTED =============================================================================== 00042b26 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 42b26: 4e56 ffd0 linkw %fp,#-48 42b2a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 42b2e: 286e 0008 moveal %fp@(8),%a4 42b32: 266e 000c moveal %fp@(12),%a3 42b36: 282e 0010 movel %fp@(16),%d4 42b3a: 242e 0014 movel %fp@(20),%d2 42b3e: 262e 0018 movel %fp@(24),%d3 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 42b42: 4a8b tstl %a3 42b44: 6700 01d2 beqw 42d18 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42b48: 7001 moveq #1,%d0 42b4a: b084 cmpl %d4,%d0 42b4c: 6500 01ca bcsw 42d18 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 42b50: 4aab 0024 tstl %a3@(36) 42b54: 6700 01f4 beqw 42d4a /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 42b58: 4a82 tstl %d2 42b5a: 6700 0188 beqw 42ce4 size += strlen( device ) + 1; 42b5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42b60: 4eb9 0004 ffc0 jsr 4ffc0 <== NOT EXECUTED 42b66: 588f addql #4,%sp <== NOT EXECUTED 42b68: 0680 0000 006d addil #109,%d0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 42b6e: 2f00 movel %d0,%sp@- 42b70: 4eb9 0004 ac8c jsr 4ac8c if ( !temp_mt_entry ) { 42b76: 588f addql #4,%sp */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 42b78: 2440 moveal %d0,%a2 42b7a: 2a00 movel %d0,%d5 if ( !temp_mt_entry ) { 42b7c: 6700 020e beqw 42d8c errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 42b80: 2544 0030 movel %d4,%a2@(48) if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 42b84: 2540 002c movel %d0,%a2@(44) temp_mt_entry->options = options; if ( device ) { 42b88: 4a82 tstl %d2 42b8a: 6700 0150 beqw 42cdc temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42b8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 42b90: 0680 0000 006c addil #108,%d0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 42b96: 2f00 movel %d0,%sp@- <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 42b98: 2540 0068 movel %d0,%a2@(104) <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42b9c: 4eb9 0004 fb74 jsr 4fb74 <== NOT EXECUTED 42ba2: 508f addql #8,%sp <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 42ba4: 4a83 tstl %d3 42ba6: 6700 0114 beqw 42cbc if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42baa: 2f03 movel %d3,%sp@- * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42bac: 7801 moveq #1,%d4 42bae: 240e movel %fp,%d2 42bb0: 0682 ffff ffec addil #-20,%d2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42bb6: 4eb9 0004 ffc0 jsr 4ffc0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42bbc: 2e84 movel %d4,%sp@ 42bbe: 2f02 movel %d2,%sp@- 42bc0: 4878 0007 pea 7 42bc4: 2f00 movel %d0,%sp@- 42bc6: 2f03 movel %d3,%sp@- 42bc8: 4eb9 0004 2720 jsr 42720 42bce: 4fef 0014 lea %sp@(20),%sp 42bd2: 72ff moveq #-1,%d1 42bd4: b280 cmpl %d0,%d1 42bd6: 6700 0182 beqw 42d5a /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 42bda: 206e fff8 moveal %fp@(-8),%a0 42bde: 2068 0010 moveal %a0@(16),%a0 42be2: 4a88 tstl %a0 42be4: 6700 018a beqw 42d70 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 42be8: 2f02 movel %d2,%sp@- 42bea: 4e90 jsr %a0@ 42bec: 588f addql #4,%sp 42bee: 7201 moveq #1,%d1 42bf0: b280 cmpl %d0,%d1 42bf2: 6600 013c bnew 42d30 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 42bf6: 2079 0005 ee50 moveal 5ee50 ,%a0 42bfc: b1fc 0005 ee54 cmpal #388692,%a0 42c02: 6758 beqs 42c5c <== NEVER TAKEN !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 42c04: 222e ffec movel %fp@(-20),%d1 42c08: b2a8 001c cmpl %a0@(28),%d1 42c0c: 6710 beqs 42c1e <== NEVER TAKEN * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 42c0e: 2050 moveal %a0@,%a0 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 42c10: b1fc 0005 ee54 cmpal #388692,%a0 42c16: 6748 beqs 42c60 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 42c18: b2a8 001c cmpl %a0@(28),%d1 42c1c: 66f0 bnes 42c0e /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 42c1e: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 42c24: 2240 moveal %d0,%a1 42c26: 7010 moveq #16,%d0 42c28: 2280 movel %d0,%a1@ return 0; cleanup_and_bail: free( temp_mt_entry ); 42c2a: 2f0a movel %a2,%sp@- 42c2c: 4eb9 0004 a6f4 jsr 4a6f4 42c32: 588f addql #4,%sp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 42c34: 2242 moveal %d2,%a1 42c36: 2069 000c moveal %a1@(12),%a0 42c3a: 4a88 tstl %a0 42c3c: 6700 00ce beqw 42d0c 42c40: 2028 001c movel %a0@(28),%d0 42c44: 6700 00c6 beqw 42d0c 42c48: 2f02 movel %d2,%sp@- 42c4a: 2040 moveal %d0,%a0 42c4c: 4e90 jsr %a0@ 42c4e: 588f addql #4,%sp 42c50: 70ff moveq #-1,%d0 return -1; } 42c52: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 42c58: 4e5e unlk %fp 42c5a: 4e75 rts cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 42c5c: 222e ffec movel %fp@(-20),%d1 <== NOT EXECUTED * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 42c60: 226e fff8 moveal %fp@(-8),%a1 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 42c64: 256e fff4 0010 movel %fp@(-12),%a2@(16) temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 42c6a: 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 ){ 42c70: 2069 0020 moveal %a1@(32),%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. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 42c74: 2541 0008 movel %d1,%a2@(8) temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 42c78: 2549 0014 movel %a1,%a2@(20) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 42c7c: 4a88 tstl %a0 42c7e: 6700 00f0 beqw 42d70 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 42c82: 2f0a movel %a2,%sp@- 42c84: 4e90 jsr %a0@ 42c86: 588f addql #4,%sp 42c88: 4a80 tstl %d0 42c8a: 669e bnes 42c2a <== NEVER TAKEN temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 42c8c: 2f0a movel %a2,%sp@- 42c8e: 206b 0024 moveal %a3@(36),%a0 42c92: 4e90 jsr %a0@ 42c94: 588f addql #4,%sp 42c96: 4a80 tstl %d0 42c98: 6650 bnes 42cea <== 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 ); 42c9a: 2f0a movel %a2,%sp@- 42c9c: 4879 0005 ee50 pea 5ee50 42ca2: 4eb9 0004 6798 jsr 46798 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 42ca8: 508f addql #8,%sp 42caa: 4a8c tstl %a4 42cac: 6702 beqs 42cb0 <== NEVER TAKEN *mt_entry = temp_mt_entry; 42cae: 288a movel %a2,%a4@ 42cb0: 4280 clrl %d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42cb2: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 42cb8: 4e5e unlk %fp 42cba: 4e75 rts * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 42cbc: 42aa 001c clrl %a2@(28) temp_mt_entry->mt_fs_root.ops = NULL; temp_mt_entry->mt_point_node.node_access = NULL; temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; 42cc0: 4282 clrl %d2 * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; temp_mt_entry->mt_fs_root.handlers = NULL; 42cc2: 42aa 0024 clrl %a2@(36) temp_mt_entry->mt_fs_root.ops = NULL; 42cc6: 42aa 0028 clrl %a2@(40) temp_mt_entry->mt_point_node.node_access = NULL; 42cca: 42aa 0008 clrl %a2@(8) temp_mt_entry->mt_point_node.handlers = NULL; 42cce: 42aa 0010 clrl %a2@(16) temp_mt_entry->mt_point_node.ops = NULL; 42cd2: 42aa 0014 clrl %a2@(20) temp_mt_entry->mt_point_node.mt_entry = NULL; 42cd6: 42aa 0018 clrl %a2@(24) 42cda: 60b0 bras 42c8c if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 42cdc: 42aa 0068 clrl %a2@(104) 42ce0: 6000 fec2 braw 42ba4 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 42ce4: 706c moveq #108,%d0 42ce6: 6000 fe86 braw 42b6e temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 42cea: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42cee: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42cf2: 4a88 tstl %a0 <== NOT EXECUTED 42cf4: 6706 beqs 42cfc <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 42cf6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cf8: 4e90 jsr %a0@ <== NOT EXECUTED 42cfa: 588f addql #4,%sp <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42cfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cfe: 4eb9 0004 a6f4 jsr 4a6f4 <== NOT EXECUTED if ( loc_to_free ) 42d04: 588f addql #4,%sp <== NOT EXECUTED 42d06: 4a82 tstl %d2 <== NOT EXECUTED 42d08: 6600 ff2a bnew 42c34 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 42d0c: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; } 42d0e: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42d14: 4e5e unlk %fp <== NOT EXECUTED 42d16: 4e75 rts <== NOT EXECUTED * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 42d18: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 42d1e: 7216 moveq #22,%d1 42d20: 2040 moveal %d0,%a0 42d22: 70ff moveq #-1,%d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d24: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 42d2a: 2081 movel %d1,%a0@ if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d2c: 4e5e unlk %fp 42d2e: 4e75 rts /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 42d30: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 42d36: 7214 moveq #20,%d1 42d38: 2040 moveal %d0,%a0 42d3a: 2081 movel %d1,%a0@ return 0; cleanup_and_bail: free( temp_mt_entry ); 42d3c: 2f0a movel %a2,%sp@- 42d3e: 4eb9 0004 a6f4 jsr 4a6f4 42d44: 588f addql #4,%sp 42d46: 6000 feec braw 42c34 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 42d4a: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 42d50: 4285 clrl %d5 <== NOT EXECUTED 42d52: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d54: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42d5a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 42d5c: 4eb9 0004 a6f4 jsr 4a6f4 <== NOT EXECUTED 42d62: 588f addql #4,%sp <== NOT EXECUTED 42d64: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d66: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42d6c: 4e5e unlk %fp <== NOT EXECUTED 42d6e: 4e75 rts <== NOT EXECUTED * 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; 42d70: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 42d76: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d78: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42d7e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42d80: 4eb9 0004 a6f4 jsr 4a6f4 <== NOT EXECUTED 42d86: 588f addql #4,%sp <== NOT EXECUTED 42d88: 6000 feaa braw 42c34 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 42d8c: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 42d92: 7a0c moveq #12,%d5 <== NOT EXECUTED 42d94: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d96: 70ff moveq #-1,%d0 <== NOT EXECUTED 42d98: 2085 movel %d5,%a0@ <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d9a: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42da0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042e30 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 42e30: 4e56 fff4 linkw %fp,#-12 42e34: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42e38: 262e 0008 movel %fp@(8),%d3 42e3c: 246e 000c moveal %fp@(12),%a2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 42e40: b5c3 cmpal %d3,%a2 42e42: 674c beqs 42e90 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 42e44: 242a 0106 movel %a2@(262),%d2 } if (ptr && ptr != _global_impure_ptr) { 42e48: 4a82 tstl %d2 42e4a: 6722 beqs 42e6e <== NEVER TAKEN 42e4c: b4b9 0005 cf0e cmpl 5cf0e <_global_impure_ptr>,%d2 42e52: 671a beqs 42e6e _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 42e54: 4879 0004 2e98 pea 42e98 42e5a: 2f02 movel %d2,%sp@- 42e5c: 4eb9 0004 f39a jsr 4f39a <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 42e62: 2f02 movel %d2,%sp@- 42e64: 4eb9 0004 9210 jsr 49210 <_Workspace_Free> 42e6a: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 42e6e: 42aa 0106 clrl %a2@(262) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 42e72: b5c3 cmpal %d3,%a2 42e74: 670a beqs 42e80 _REENT = 0; } } 42e76: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 42e7c: 4e5e unlk %fp 42e7e: 4e75 rts /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 42e80: 42b9 0005 d8f0 clrl 5d8f0 <_impure_ptr> } } 42e86: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 42e8c: 4e5e unlk %fp 42e8e: 4e75 rts /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 42e90: 2439 0005 d8f0 movel 5d8f0 <_impure_ptr>,%d2 42e96: 60b0 bras 42e48 =============================================================================== 00042e98 : */ int newlib_free_buffers( FILE *fp ) { 42e98: 4e56 0000 linkw %fp,#0 42e9c: 2f0a movel %a2,%sp@- 42e9e: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 42ea2: 2f0a movel %a2,%sp@- 42ea4: 4eb9 0004 ef88 jsr 4ef88 42eaa: 588f addql #4,%sp 42eac: 7202 moveq #2,%d1 42eae: b280 cmpl %d0,%d1 42eb0: 6414 bccs 42ec6 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 42eb2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42eb4: 4eb9 0004 ed32 jsr 4ed32 <== NOT EXECUTED 42eba: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 42ebc: 246e fffc moveal %fp@(-4),%a2 42ec0: 4280 clrl %d0 42ec2: 4e5e unlk %fp 42ec4: 4e75 rts { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 42ec6: 302a 000c movew %a2@(12),%d0 42eca: 48c0 extl %d0 42ecc: 4a00 tstb %d0 42ece: 6cec bges 42ebc <== ALWAYS TAKEN free( fp->_bf._base ); 42ed0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42ed4: 4eb9 0004 a6f4 jsr 4a6f4 <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; 42eda: 588f addql #4,%sp <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42edc: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 42ee0: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42ee4: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 42ee8: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42eea: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED break; default: fclose(fp); } return 0; } 42eee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 42ef2: 4280 clrl %d0 <== NOT EXECUTED 42ef4: 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 00cc tstb 600cc 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 00cc moveb %d0,600cc status = rtems_io_register_name( 43362: 2f02 movel %d2,%sp@- 43364: 4879 0005 dc34 pea 5dc34 4336a: 4eb9 0004 3492 jsr 43492 "/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 08f0 movel %d2,608f0 } 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 76e4 jsr 476e4 <== 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) <== NOT EXECUTED return NULL_SUCCESSFUL; } 4332c: 4280 clrl %d0 4332e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043124 : int open( const char *pathname, int flags, ... ) { 43124: 4e56 ffcc linkw %fp,#-52 43128: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4312c: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 43130: 2002 movel %d2,%d0 43132: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 43134: 282e 0008 movel %fp@(8),%d4 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 43138: 0800 0000 btst #0,%d0 4313c: 6600 00dc bnew 4321a 43140: 4283 clrl %d3 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 43142: 0800 0001 btst #1,%d0 43146: 6704 beqs 4314c eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 43148: 7002 moveq #2,%d0 4314a: 8680 orl %d0,%d3 va_start(ap, flags); mode = va_arg( ap, int ); 4314c: 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(); 43150: 4eb9 0004 aaf8 jsr 4aaf8 43156: 2440 moveal %d0,%a2 if ( iop == 0 ) { 43158: 4a80 tstl %d0 4315a: 6700 00c4 beqw 43220 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 4315e: 2f04 movel %d4,%sp@- 43160: 4bf9 0004 ffc0 lea 4ffc0 ,%a5 43166: 4e95 jsr %a5@ /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 43168: 47ee ffec lea %fp@(-20),%a3 4316c: 7201 moveq #1,%d1 4316e: 49f9 0004 2720 lea 42720 ,%a4 43174: 2e81 movel %d1,%sp@ 43176: 2f0b movel %a3,%sp@- 43178: 2f03 movel %d3,%sp@- 4317a: 2f00 movel %d0,%sp@- 4317c: 2f04 movel %d4,%sp@- 4317e: 4e94 jsr %a4@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 43180: 4fef 0014 lea %sp@(20),%sp 43184: 72ff moveq #-1,%d1 43186: b280 cmpl %d0,%d1 43188: 6700 016c beqw 432f6 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 4318c: 2002 movel %d2,%d0 4318e: 0280 0000 0a00 andil #2560,%d0 43194: 0c80 0000 0a00 cmpil #2560,%d0 4319a: 6700 00a0 beqw 4323c * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 4319e: 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; 431a2: 256e fff4 003c movel %fp@(-12),%a2@(60) iop->file_info = loc.node_access; 431a8: 256e ffec 0038 movel %fp@(-20),%a2@(56) iop->flags |= rtems_libio_fcntl_flags( flags ); 431ae: 2f02 movel %d2,%sp@- 431b0: 4eb9 0004 abb0 jsr 4abb0 iop->pathinfo = loc; 431b6: 2553 0018 movel %a3@,%a2@(24) if ( !iop->handlers || !iop->handlers->open_h ) { 431ba: 588f addql #4,%sp */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 431bc: 256e fff0 001c movel %fp@(-16),%a2@(28) 431c2: 256e fff4 0020 movel %fp@(-12),%a2@(32) 431c8: 256e fff8 0024 movel %fp@(-8),%a2@(36) if ( !iop->handlers || !iop->handlers->open_h ) { 431ce: 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 ); 431d2: 8083 orl %d3,%d0 iop->pathinfo = loc; 431d4: 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 ); 431da: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 431de: 4a88 tstl %a0 431e0: 6700 0104 beqw 432e6 431e4: 2050 moveal %a0@,%a0 431e6: 4a88 tstl %a0 431e8: 6700 00fc beqw 432e6 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 431ec: 2f05 movel %d5,%sp@- 431ee: 2f02 movel %d2,%sp@- 431f0: 2f04 movel %d4,%sp@- 431f2: 2f0a movel %a2,%sp@- 431f4: 4e90 jsr %a0@ if ( rc ) { 431f6: 4fef 0010 lea %sp@(16),%sp 431fa: 4a80 tstl %d0 431fc: 667a bnes 43278 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 431fe: 0802 000a btst #10,%d2 43202: 6600 0092 bnew 43296 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 43206: 200a movel %a2,%d0 43208: 90b9 0005 ee18 subl 5ee18 ,%d0 4320e: ec80 asrl #6,%d0 } 43210: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43216: 4e5e unlk %fp 43218: 4e75 rts * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 4321a: 7604 moveq #4,%d3 4321c: 6000 ff24 braw 43142 * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 43220: 7417 moveq #23,%d2 43222: 263c 0004 ebf4 movel #322548,%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 ); 43228: 2043 moveal %d3,%a0 4322a: 4e90 jsr %a0@ 4322c: 2040 moveal %d0,%a0 4322e: 70ff moveq #-1,%d0 43230: 2082 movel %d2,%a0@ } return iop - rtems_libio_iops; } 43232: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43238: 4e5e unlk %fp 4323a: 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)) { 4323c: 7411 moveq #17,%d2 4323e: 263c 0004 ebf4 movel #322548,%d3 done: va_end(ap); if ( rc ) { if ( iop ) 43244: 4a8a tstl %a2 43246: 670a beqs 43252 <== NEVER TAKEN rtems_libio_free( iop ); 43248: 2f0a movel %a2,%sp@- 4324a: 4eb9 0004 aa6a jsr 4aa6a 43250: 588f addql #4,%sp if ( loc_to_free ) 43252: 4a8b tstl %a3 43254: 67d2 beqs 43228 rtems_filesystem_freenode( loc_to_free ); 43256: 206b 000c moveal %a3@(12),%a0 4325a: 4a88 tstl %a0 4325c: 67ca beqs 43228 <== NEVER TAKEN 4325e: 2068 001c moveal %a0@(28),%a0 43262: 4a88 tstl %a0 43264: 67c2 beqs 43228 <== NEVER TAKEN 43266: 2f0b movel %a3,%sp@- 43268: 4e90 jsr %a0@ 4326a: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 4326c: 2043 moveal %d3,%a0 4326e: 4e90 jsr %a0@ 43270: 2040 moveal %d0,%a0 43272: 70ff moveq #-1,%d0 43274: 2082 movel %d2,%a0@ 43276: 60ba bras 43232 goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 43278: 263c 0004 ebf4 movel #322548,%d3 4327e: 2043 moveal %d3,%a0 43280: 4e90 jsr %a0@ 43282: 2040 moveal %d0,%a0 43284: 2410 movel %a0@,%d2 */ done: va_end(ap); if ( rc ) { 43286: 66bc bnes 43244 <== 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; 43288: 200a movel %a2,%d0 <== NOT EXECUTED 4328a: 90b9 0005 ee18 subl 5ee18 ,%d0 <== NOT EXECUTED 43290: ec80 asrl #6,%d0 <== NOT EXECUTED 43292: 6000 ff7c braw 43210 <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 43296: 200a movel %a2,%d0 43298: 90b9 0005 ee18 subl 5ee18 ,%d0 4329e: ec80 asrl #6,%d0 432a0: 42a7 clrl %sp@- 432a2: 42a7 clrl %sp@- 432a4: 2f00 movel %d0,%sp@- 432a6: 4eb9 0004 a784 jsr 4a784 if ( rc ) { 432ac: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 432b0: 2400 movel %d0,%d2 if ( rc ) { 432b2: 6700 ff52 beqw 43206 if(errno) rc = errno; 432b6: 263c 0004 ebf4 movel #322548,%d3 <== NOT EXECUTED 432bc: 2043 moveal %d3,%a0 <== NOT EXECUTED 432be: 4e90 jsr %a0@ <== NOT EXECUTED 432c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 432c2: 4a90 tstl %a0@ <== NOT EXECUTED 432c4: 6662 bnes 43328 <== NOT EXECUTED close( iop - rtems_libio_iops ); 432c6: 200a movel %a2,%d0 <== NOT EXECUTED 432c8: 90b9 0005 ee18 subl 5ee18 ,%d0 <== NOT EXECUTED 432ce: 97cb subal %a3,%a3 <== NOT EXECUTED 432d0: ec80 asrl #6,%d0 <== NOT EXECUTED 432d2: 95ca subal %a2,%a2 <== NOT EXECUTED 432d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432d6: 4eb9 0004 a654 jsr 4a654 <== NOT EXECUTED 432dc: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 432de: 4a82 tstl %d2 <== NOT EXECUTED 432e0: 67a6 beqs 43288 <== NOT EXECUTED 432e2: 6000 ff60 braw 43244 <== 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; 432e6: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 432ec: 263c 0004 ebf4 movel #322548,%d3 <== NOT EXECUTED 432f2: 6000 ff50 braw 43244 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 432f6: 263c 0004 ebf4 movel #322548,%d3 432fc: 2043 moveal %d3,%a0 432fe: 4e90 jsr %a0@ 43300: 7202 moveq #2,%d1 43302: 2040 moveal %d0,%a0 43304: b290 cmpl %a0@,%d1 43306: 6712 beqs 4331a } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 43308: 2043 moveal %d3,%a0 4330a: 97cb subal %a3,%a3 4330c: 4e90 jsr %a0@ 4330e: 2040 moveal %d0,%a0 43310: 2410 movel %a0@,%d2 */ done: va_end(ap); if ( rc ) { 43312: 6700 ff74 beqw 43288 43316: 6000 ff2c braw 43244 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 4331a: 0802 0009 btst #9,%d2 4331e: 662a bnes 4334a 43320: 97cb subal %a3,%a3 43322: 7402 moveq #2,%d2 43324: 6000 ff1e braw 43244 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 43328: 2043 moveal %d3,%a0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 4332a: 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; 4332c: 4e90 jsr %a0@ <== NOT EXECUTED 4332e: 2040 moveal %d0,%a0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 43330: 200a movel %a2,%d0 <== NOT EXECUTED 43332: 90b9 0005 ee18 subl 5ee18 ,%d0 <== NOT EXECUTED 43338: 95ca subal %a2,%a2 <== NOT EXECUTED 4333a: 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; 4333c: 2410 movel %a0@,%d2 <== NOT EXECUTED close( iop - rtems_libio_iops ); 4333e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43340: 4eb9 0004 a654 jsr 4a654 <== NOT EXECUTED 43346: 588f addql #4,%sp <== NOT EXECUTED 43348: 6094 bras 432de <== NOT EXECUTED rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 4334a: 42a7 clrl %sp@- 4334c: 2005 movel %d5,%d0 4334e: 42a7 clrl %sp@- 43350: 08c0 000f bset #15,%d0 43354: 2f00 movel %d0,%sp@- 43356: 2f04 movel %d4,%sp@- 43358: 4eb9 0004 29a8 jsr 429a8 if ( rc ) { 4335e: 4fef 0010 lea %sp@(16),%sp 43362: 4a80 tstl %d0 43364: 66a2 bnes 43308 <== 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 ); 43366: 2f04 movel %d4,%sp@- 43368: 4e95 jsr %a5@ 4336a: 7201 moveq #1,%d1 4336c: 2e81 movel %d1,%sp@ 4336e: 2f0b movel %a3,%sp@- 43370: 42a7 clrl %sp@- 43372: 2f00 movel %d0,%sp@- 43374: 2f04 movel %d4,%sp@- 43376: 4e94 jsr %a4@ if ( status != 0 ) { /* The file did not exist */ 43378: 4fef 0014 lea %sp@(20),%sp 4337c: 4a80 tstl %d0 4337e: 6700 fe1e beqw 4319e 43382: 97cb subal %a3,%a3 <== NOT EXECUTED 43384: 740d moveq #13,%d2 <== NOT EXECUTED 43386: 6000 febc braw 43244 <== NOT EXECUTED =============================================================================== 000430b0 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 430b0: 4e56 0000 linkw %fp,#0 430b4: 2f0a movel %a2,%sp@- int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 430b6: 45f9 0004 3124 lea 43124 ,%a2 430bc: 42a7 clrl %sp@- 430be: 42a7 clrl %sp@- 430c0: 4879 0005 c15c pea 5c15c 430c6: 4e92 jsr %a2@ 430c8: 4fef 000c lea %sp@(12),%sp 430cc: 72ff moveq #-1,%d1 430ce: b280 cmpl %d0,%d1 430d0: 6730 beqs 43102 /* * 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) 430d2: 42a7 clrl %sp@- 430d4: 4878 0001 pea 1 430d8: 4879 0005 c15c pea 5c15c 430de: 4e92 jsr %a2@ 430e0: 4fef 000c lea %sp@(12),%sp 430e4: 72ff moveq #-1,%d1 430e6: b280 cmpl %d0,%d1 430e8: 672c beqs 43116 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 430ea: 42a7 clrl %sp@- 430ec: 4878 0001 pea 1 430f0: 4879 0005 c15c pea 5c15c 430f6: 4e92 jsr %a2@ 430f8: 4fef 000c lea %sp@(12),%sp 430fc: 72ff moveq #-1,%d1 430fe: b280 cmpl %d0,%d1 43100: 6708 beqs 4310a <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 43102: 246e fffc moveal %fp@(-4),%a2 43106: 4e5e unlk %fp 43108: 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 */ 4310a: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 43110: 4eb9 0004 6458 jsr 46458 <== 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 */ 43116: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 4311c: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED ... =============================================================================== 00043bec : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43bec: 4e56 fff0 linkw %fp,#-16 43bf0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43bf4: 246e 000c moveal %fp@(12),%a2 43bf8: 47f9 0004 3ac4 lea 43ac4 ,%a3 43bfe: 202e 0008 movel %fp@(8),%d0 int i; if (tty->termios.c_oflag & OPOST) { 43c02: 222a 0034 movel %a2@(52),%d1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43c06: 1d40 fffe moveb %d0,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 43c0a: 0801 0000 btst #0,%d1 43c0e: 6744 beqs 43c54 <== NEVER TAKEN switch (c) { 43c10: 7409 moveq #9,%d2 43c12: 0280 0000 00ff andil #255,%d0 43c18: b480 cmpl %d0,%d2 43c1a: 6700 00f8 beqw 43d14 43c1e: 644e bccs 43c6e <== NEVER TAKEN 43c20: 740a moveq #10,%d2 43c22: b480 cmpl %d0,%d2 43c24: 6774 beqs 43c9a 43c26: 143c 000d moveb #13,%d2 43c2a: b480 cmpl %d0,%d2 43c2c: 6700 00a8 beqw 43cd6 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 43c30: 0801 0001 btst #1,%d1 43c34: 6600 011a bnew 43d50 43c38: 2079 0005 d8ec moveal 5d8ec <__ctype_ptr__>,%a0 43c3e: 47f9 0004 3ac4 lea 43ac4 ,%a3 c = toupper(c); if (!iscntrl(c)) 43c44: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 43c48: 49c0 extbl %d0 43c4a: 0800 0005 btst #5,%d0 43c4e: 6604 bnes 43c54 <== NEVER TAKEN tty->column++; 43c50: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 43c54: 2f0a movel %a2,%sp@- 43c56: 4878 0001 pea 1 43c5a: 486e fffe pea %fp@(-2) 43c5e: 4e93 jsr %a3@ 43c60: 4fef 000c lea %sp@(12),%sp } 43c64: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43c6a: 4e5e unlk %fp 43c6c: 4e75 rts oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 43c6e: 143c 0008 moveb #8,%d2 <== NOT EXECUTED 43c72: b480 cmpl %d0,%d2 <== NOT EXECUTED 43c74: 66ba bnes 43c30 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 43c76: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43c7a: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED 43c80: 6fd2 bles 43c54 <== NOT EXECUTED tty->column--; 43c82: 5380 subql #1,%d0 <== NOT EXECUTED 43c84: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43c88: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43c8a: 4878 0001 pea 1 <== NOT EXECUTED 43c8e: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43c92: 4e93 jsr %a3@ <== NOT EXECUTED 43c94: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43c98: 60ca bras 43c64 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 43c9a: 0801 0005 btst #5,%d1 43c9e: 6704 beqs 43ca4 <== ALWAYS TAKEN tty->column = 0; 43ca0: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 43ca4: 47f9 0004 3ac4 lea 43ac4 ,%a3 if (tty->termios.c_oflag & ONLCR) { 43caa: 44c1 movew %d1,%ccr 43cac: 66a6 bnes 43c54 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 43cae: 2f0a movel %a2,%sp@- 43cb0: 4878 0001 pea 1 43cb4: 4879 0005 c670 pea 5c670 43cba: 4e93 jsr %a3@ tty->column = 0; 43cbc: 4fef 000c lea %sp@(12),%sp 43cc0: 42aa 0028 clrl %a2@(40) if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43cc4: 2f0a movel %a2,%sp@- 43cc6: 4878 0001 pea 1 43cca: 486e fffe pea %fp@(-2) 43cce: 4e93 jsr %a3@ 43cd0: 4fef 000c lea %sp@(12),%sp 43cd4: 608e bras 43c64 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 43cd6: 0801 0004 btst #4,%d1 <== NOT EXECUTED 43cda: 6706 beqs 43ce2 <== NOT EXECUTED 43cdc: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 43ce0: 6782 beqs 43c64 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 43ce2: 44c1 movew %d1,%ccr <== NOT EXECUTED 43ce4: 6a00 0090 bplw 43d76 <== NOT EXECUTED 43ce8: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED c = '\n'; 43cee: 700a moveq #10,%d0 <== NOT EXECUTED 43cf0: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 43cf4: 0801 0005 btst #5,%d1 <== NOT EXECUTED 43cf8: 6700 ff5a beqw 43c54 <== NOT EXECUTED tty->column = 0; 43cfc: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d00: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d02: 4878 0001 pea 1 <== NOT EXECUTED 43d06: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d0a: 4e93 jsr %a3@ <== NOT EXECUTED 43d0c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d10: 6000 ff52 braw 43c64 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 43d14: 202a 0028 movel %a2@(40),%d0 43d18: 7407 moveq #7,%d2 43d1a: 307c 0008 moveaw #8,%a0 43d1e: c480 andl %d0,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43d20: 0281 0000 1800 andil #6144,%d1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 43d26: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43d28: 0c81 0000 1800 cmpil #6144,%d1 43d2e: 6778 beqs 43da8 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 43d30: d1c0 addal %d0,%a0 <== NOT EXECUTED 43d32: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED 43d38: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d3e: 4878 0001 pea 1 <== NOT EXECUTED 43d42: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d46: 4e93 jsr %a3@ <== NOT EXECUTED 43d48: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d4c: 6000 ff16 braw 43c64 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 43d50: 2079 0005 d8ec moveal 5d8ec <__ctype_ptr__>,%a0 <== NOT EXECUTED 43d56: 7403 moveq #3,%d2 <== NOT EXECUTED 43d58: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 43d5c: 49c1 extbl %d1 <== NOT EXECUTED 43d5e: c282 andl %d2,%d1 <== NOT EXECUTED 43d60: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 43d64: b481 cmpl %d1,%d2 <== NOT EXECUTED 43d66: 672c beqs 43d94 <== NOT EXECUTED 43d68: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 43d6c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43d72: 6000 feca braw 43c3e <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 43d76: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 43d7a: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d82: 4878 0001 pea 1 <== NOT EXECUTED 43d86: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d8a: 4e93 jsr %a3@ <== NOT EXECUTED 43d8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d90: 6000 fed2 braw 43c64 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 43d94: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 43d9a: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 43d9e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43da4: 6000 fe98 braw 43c3e <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); 43da8: 2f0a movel %a2,%sp@- break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 43daa: d088 addl %a0,%d0 43dac: 2540 0028 movel %d0,%a2@(40) rtems_termios_puts ( " ", i, tty); 43db0: 2f08 movel %a0,%sp@- 43db2: 4879 0005 c672 pea 5c672 43db8: 4eb9 0004 3ac4 jsr 43ac4 return; 43dbe: 4fef 000c lea %sp@(12),%sp tty->column++; break; } } rtems_termios_puts (&c, 1, tty); } 43dc2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43dc8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e178 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4e178: 4e56 ffcc linkw %fp,#-52 4e17c: 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) 4e180: 4878 0001 pea 1 4e184: 45ee ffdc lea %fp@(-36),%a2 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4e188: 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) 4e18c: 2f0a movel %a2,%sp@- 4e18e: 4878 0007 pea 7 4e192: 4878 0003 pea 3 4e196: 4879 0005 cd12 pea 5cd12 <__FUNCTION__.5853+0x11> 4e19c: 4eb9 0004 2720 jsr 42720 4e1a2: 4fef 0014 lea %sp@(20),%sp 4e1a6: 4a80 tstl %d0 4e1a8: 6600 00e0 bnew 4e28a return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 4e1ac: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4e1b0: 47f9 0004 ebf4 lea 4ebf4 <__errno>,%a3 <== NOT EXECUTED 4e1b6: 4a88 tstl %a0 <== NOT EXECUTED 4e1b8: 670e beqs 4e1c8 <== NOT EXECUTED 4e1ba: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e1be: 4a88 tstl %a0 <== NOT EXECUTED 4e1c0: 6706 beqs 4e1c8 <== NOT EXECUTED 4e1c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e1c4: 4e90 jsr %a0@ <== NOT EXECUTED 4e1c6: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e1c8: 45ee fff1 lea %fp@(-15),%a2 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e1cc: 3039 0005 e72c movew 5e72c ,%d0 <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e1d2: 24bc 2f74 6d70 movel #796159344,%a2@ <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e1d8: 2200 movel %d0,%d1 <== NOT EXECUTED 4e1da: 5281 addql #1,%d1 <== NOT EXECUTED 4e1dc: 3f00 movew %d0,%sp@- <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e1de: 203c 2f2e 6669 movel #791570025,%d0 <== NOT EXECUTED 4e1e4: 2d40 fff5 movel %d0,%fp@(-11) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e1e8: 4267 clrw %sp@- <== NOT EXECUTED 4e1ea: 33c1 0005 e72c movew %d1,5e72c <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e1f0: 323c 666f movew #26223,%d1 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e1f4: 4879 0005 cd17 pea 5cd17 <__FUNCTION__.5853+0x16> <== NOT EXECUTED 4e1fa: 486e fffb pea %fp@(-5) <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e1fe: 3d41 fff9 movew %d1,%fp@(-7) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e202: 4eb9 0004 f8ec jsr 4f8ec <== NOT EXECUTED /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4e208: 4878 0180 pea 180 <== NOT EXECUTED 4e20c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e20e: 4eb9 0004 e3a8 jsr 4e3a8 <== NOT EXECUTED 4e214: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4e218: 4a80 tstl %d0 <== NOT EXECUTED 4e21a: 6660 bnes 4e27c <== 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); 4e21c: 4878 4000 pea 4000 4e220: 4bf9 0004 3124 lea 43124 ,%a5 4e226: 2f0a movel %a2,%sp@- 4e228: 4e95 jsr %a5@ if (filsdes[0] < 0) { 4e22a: 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); 4e22c: 2880 movel %d0,%a4@ if (filsdes[0] < 0) { 4e22e: 6d00 00e0 bltw 4e310 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]); 4e232: b0b9 0005 d714 cmpl 5d714 ,%d0 <== NOT EXECUTED 4e238: 6400 00d0 bccw 4e30a <== NOT EXECUTED 4e23c: 2079 0005 ee18 moveal 5ee18 ,%a0 <== NOT EXECUTED 4e242: ed88 lsll #6,%d0 <== NOT EXECUTED 4e244: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4e246: 70fe moveq #-2,%d0 <== NOT EXECUTED 4e248: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4e24c: 4878 0001 pea 1 <== NOT EXECUTED 4e250: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e252: 4e95 jsr %a5@ <== NOT EXECUTED if (filsdes[1] < 0) { 4e254: 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); 4e256: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4e25a: 6d00 00ce bltw 4e32a <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4e25e: 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) { 4e260: 9bcd subal %a5,%a5 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4e262: 4eb9 0004 e3c8 jsr 4e3c8 <== NOT EXECUTED 4e268: 588f addql #4,%sp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4e26a: 4e93 jsr %a3@ <== NOT EXECUTED 4e26c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e26e: 208d movel %a5,%a0@ <== NOT EXECUTED } 4e270: 70ff moveq #-1,%d0 4e272: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 4e278: 4e5e unlk %fp 4e27a: 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){ 4e27c: 4e93 jsr %a3@ <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4e27e: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 <== NOT EXECUTED 4e284: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e286: 4e5e unlk %fp <== NOT EXECUTED 4e288: 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) 4e28a: 47f9 0004 ebf4 lea 4ebf4 <__errno>,%a3 4e290: 4e93 jsr %a3@ 4e292: 7202 moveq #2,%d1 4e294: 2040 moveal %d0,%a0 4e296: b290 cmpl %a0@,%d1 4e298: 66d6 bnes 4e270 <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4e29a: 4878 03ff pea 3ff 4e29e: 4879 0005 cd12 pea 5cd12 <__FUNCTION__.5853+0x11> 4e2a4: 4eb9 0004 2988 jsr 42988 4e2aa: 508f addql #8,%sp 4e2ac: 4a80 tstl %d0 4e2ae: 66c0 bnes 4e270 <== NEVER TAKEN else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e2b0: 45ee fff1 lea %fp@(-15),%a2 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e2b4: 3039 0005 e72c movew 5e72c ,%d0 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e2ba: 24bc 2f74 6d70 movel #796159344,%a2@ sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e2c0: 2200 movel %d0,%d1 4e2c2: 5281 addql #1,%d1 4e2c4: 3f00 movew %d0,%sp@- else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e2c6: 203c 2f2e 6669 movel #791570025,%d0 4e2cc: 2d40 fff5 movel %d0,%fp@(-11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e2d0: 4267 clrw %sp@- 4e2d2: 33c1 0005 e72c movew %d1,5e72c else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e2d8: 323c 666f movew #26223,%d1 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e2dc: 4879 0005 cd17 pea 5cd17 <__FUNCTION__.5853+0x16> 4e2e2: 486e fffb pea %fp@(-5) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e2e6: 3d41 fff9 movew %d1,%fp@(-7) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e2ea: 4eb9 0004 f8ec jsr 4f8ec /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4e2f0: 4878 0180 pea 180 4e2f4: 2f0a movel %a2,%sp@- 4e2f6: 4eb9 0004 e3a8 jsr 4e3a8 4e2fc: 4fef 0014 lea %sp@(20),%sp 4e300: 4a80 tstl %d0 4e302: 6700 ff18 beqw 4e21c 4e306: 6000 ff74 braw 4e27c <== 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]); 4e30a: 91c8 subal %a0,%a0 <== NOT EXECUTED 4e30c: 6000 ff38 braw 4e246 <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 4e310: 4e93 jsr %a3@ 4e312: 2040 moveal %d0,%a0 4e314: 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); 4e316: 2f0a movel %a2,%sp@- 4e318: 4eb9 0004 e3c8 jsr 4e3c8 4e31e: 588f addql #4,%sp close(filsdes[0]); } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); 4e320: 4e93 jsr %a3@ 4e322: 2040 moveal %d0,%a0 4e324: 208d movel %a5,%a0@ 4e326: 6000 ff48 braw 4e270 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4e32a: 4e93 jsr %a3@ <== NOT EXECUTED 4e32c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e32e: 2a50 moveal %a0@,%a5 <== NOT EXECUTED close(filsdes[0]); 4e330: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4e332: 4eb9 0004 a654 jsr 4a654 <== NOT EXECUTED 4e338: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4e33a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e33c: 4eb9 0004 e3c8 jsr 4e3c8 <== NOT EXECUTED 4e342: 588f addql #4,%sp <== NOT EXECUTED 4e344: 6000 ff24 braw 4e26a <== NOT EXECUTED =============================================================================== 0004c762 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4c762: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 4c766: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED 4c76c: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4c770: 6706 beqs 4c778 <== NOT EXECUTED 4c772: 70ea moveq #-22,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4c774: 4e5e unlk %fp <== NOT EXECUTED 4c776: 4e75 rts <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 4c778: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4c77c: 6606 bnes 4c784 <== NOT EXECUTED 4c77e: 70f2 moveq #-14,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4c780: 4e5e unlk %fp <== NOT EXECUTED 4c782: 4e75 rts <== NOT EXECUTED { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) 4c784: 42a7 clrl %sp@- <== NOT EXECUTED 4c786: 42a7 clrl %sp@- <== NOT EXECUTED 4c788: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4c78c: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c790: 4eb9 0004 5d2c jsr 45d2c <== NOT EXECUTED 4c796: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c79a: 4a80 tstl %d0 <== NOT EXECUTED 4c79c: 6706 beqs 4c7a4 <== NOT EXECUTED 4c79e: 70fc moveq #-4,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4c7a0: 4e5e unlk %fp <== NOT EXECUTED 4c7a2: 4e75 rts <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4c7a4: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4c7a8: 2f29 0028 movel %a1@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4c7ac: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4c7b0: 20a9 000c movel %a1@(12),%a0@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 4c7b4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return 0; 4c7ba: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4c7bc: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 4c7be: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c704 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4c704: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 4c706: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 4c70a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c7c2 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4c7c2: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 4c7c6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c7ca: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4c7cc: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c7d0: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4c7d6: 42a7 clrl %sp@- <== NOT EXECUTED 4c7d8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4c7dc: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED 4c7e0: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c7e4: 4e93 jsr %a3@ <== NOT EXECUTED 4c7e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c7ea: 4a80 tstl %d0 <== NOT EXECUTED 4c7ec: 6600 00ac bnew 4c89a <== NOT EXECUTED return -EINTR; while (read < count) { 4c7f0: 4a84 tstl %d4 <== NOT EXECUTED 4c7f2: 6700 01ac beqw 4c9a0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4c7f6: 4285 clrl %d5 <== NOT EXECUTED 4c7f8: 4283 clrl %d3 <== NOT EXECUTED 4c7fa: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4c800: 243c 0004 dafc movel #318204,%d2 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4c806: 2e3c 0004 da84 movel #318084,%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); 4c80c: 2c3c 0004 f414 movel #324628,%d6 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4c812: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4c816: 6600 0090 bnew 4c8a8 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4c81a: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c81e: 6700 010a beqw 4c92a <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4c822: 7001 moveq #1,%d0 <== NOT EXECUTED 4c824: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4c828: 6600 0110 bnew 4c93a <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4c82c: 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 ++; 4c830: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4c834: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4c836: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c838: 42a7 clrl %sp@- <== NOT EXECUTED 4c83a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c83e: 4e90 jsr %a0@ <== NOT EXECUTED 4c840: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c844: 4a80 tstl %d0 <== NOT EXECUTED 4c846: 673c beqs 4c884 <== NOT EXECUTED 4c848: 70fc moveq #-4,%d0 <== NOT EXECUTED 4c84a: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4c84e: 42a7 clrl %sp@- <== NOT EXECUTED 4c850: 42a7 clrl %sp@- <== NOT EXECUTED 4c852: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c856: 4e93 jsr %a3@ <== NOT EXECUTED 4c858: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c85c: 4a80 tstl %d0 <== NOT EXECUTED 4c85e: 6600 00ec bnew 4c94c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4c862: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4c866: 4aae fff8 tstl %fp@(-8) <== NOT EXECUTED 4c86a: 67a6 beqs 4c812 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c86c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c870: 4e94 jsr %a4@ <== NOT EXECUTED 4c872: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4c874: 4a83 tstl %d3 <== NOT EXECUTED 4c876: 6f12 bles 4c88a <== NOT EXECUTED return read; return ret; } 4c878: 2003 movel %d3,%d0 <== NOT EXECUTED 4c87a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c880: 4e5e unlk %fp <== NOT EXECUTED 4c882: 4e75 rts <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4c884: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 4c888: 60c4 bras 4c84e <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4c88a: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED return read; return ret; } 4c88e: 2003 movel %d3,%d0 <== NOT EXECUTED 4c890: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c896: 4e5e unlk %fp <== NOT EXECUTED 4c898: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c89a: 76fc moveq #-4,%d3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 4c89c: 2003 movel %d3,%d0 <== NOT EXECUTED 4c89e: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c8a4: 4e5e unlk %fp <== NOT EXECUTED 4c8a6: 4e75 rts <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4c8a8: 2004 movel %d4,%d0 <== NOT EXECUTED 4c8aa: 9085 subl %d5,%d0 <== NOT EXECUTED 4c8ac: b081 cmpl %d1,%d0 <== NOT EXECUTED 4c8ae: 6402 bccs 4c8b2 <== NOT EXECUTED 4c8b0: 2200 movel %d0,%d1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4c8b2: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 4c8b6: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4c8ba: 91c0 subal %d0,%a0 <== NOT EXECUTED if (chunk > chunk1) { 4c8bc: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4c8be: 6d00 009c bltw 4c95c <== 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); 4c8c2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4c8c4: d092 addl %a2@,%d0 <== NOT EXECUTED 4c8c6: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c8c8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c8ca: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c8ce: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c8d2: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c8d6: 4e91 jsr %a1@ <== NOT EXECUTED 4c8d8: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c8dc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4c8e0: 2041 moveal %d1,%a0 <== NOT EXECUTED 4c8e2: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4c8e6: 2008 movel %a0,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4c8e8: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 4c8ec: 93c1 subal %d1,%a1 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4c8ee: 4c6a 0005 0004 remul %a2@(4),%d5,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4c8f4: 2549 000c movel %a1,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4c8f8: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4c8fc: 4a89 tstl %a1 <== NOT EXECUTED 4c8fe: 6604 bnes 4c904 <== NOT EXECUTED pipe->Start = 0; 4c900: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4c904: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4c908: 6716 beqs 4c920 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4c90a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c90e: 2047 moveal %d7,%a0 <== NOT EXECUTED 4c910: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c914: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c918: 4e90 jsr %a0@ <== NOT EXECUTED 4c91a: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c91e: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4c920: d681 addl %d1,%d3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c922: 2a03 movel %d3,%d5 <== NOT EXECUTED 4c924: b883 cmpl %d3,%d4 <== NOT EXECUTED 4c926: 6200 feea bhiw 4c812 <== NOT EXECUTED 4c92a: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c92e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c932: 4e94 jsr %a4@ <== NOT EXECUTED 4c934: 588f addql #4,%sp <== NOT EXECUTED 4c936: 6000 ff3c braw 4c874 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 4c93a: 70f5 moveq #-11,%d0 <== NOT EXECUTED 4c93c: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c940: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c944: 4e94 jsr %a4@ <== NOT EXECUTED 4c946: 588f addql #4,%sp <== NOT EXECUTED 4c948: 6000 ff2a braw 4c874 <== 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)) { 4c94c: 7afc moveq #-4,%d5 <== NOT EXECUTED 4c94e: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4c952: 4a83 tstl %d3 <== NOT EXECUTED 4c954: 6e00 ff22 bgtw 4c878 <== NOT EXECUTED 4c958: 6000 ff30 braw 4c88a <== 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); 4c95c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4c95e: d092 addl %a2@,%d0 <== NOT EXECUTED 4c960: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c962: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4c966: 4871 5800 pea %a1@(00000000,%d5:l) <== NOT EXECUTED 4c96a: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c96c: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c970: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED 4c974: 4e91 jsr %a1@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4c976: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c97a: 2001 movel %d1,%d0 <== NOT EXECUTED 4c97c: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c97e: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4c982: 9088 subl %a0,%d0 <== NOT EXECUTED 4c984: da88 addl %a0,%d5 <== NOT EXECUTED 4c986: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c988: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c98a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c98e: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c992: 4e91 jsr %a1@ <== NOT EXECUTED 4c994: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c998: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4c99c: 6000 ff42 braw 4c8e0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c9a0: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c9a4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c9a8: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED 4c9ae: 4e94 jsr %a4@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c9b0: 4283 clrl %d3 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c9b2: 588f addql #4,%sp <== NOT EXECUTED 4c9b4: 6000 febe braw 4c874 <== NOT EXECUTED =============================================================================== 0004cbc8 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4cbc8: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4cbcc: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4cbd0: 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, 4cbd4: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4cbda: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4cbdc: 2454 moveal %a4@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4cbde: 42a7 clrl %sp@- <== NOT EXECUTED 4cbe0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cbe4: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4cbe6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cbea: 4a80 tstl %d0 <== NOT EXECUTED 4cbec: 6600 00f2 bnew 4cce0 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4cbf0: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cbf4: 7406 moveq #6,%d2 <== NOT EXECUTED 4cbf6: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4cbfa: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4cbfe: 6704 beqs 4cc04 <== NOT EXECUTED pipe->Readers --; 4cc00: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4cc04: 44c2 movew %d2,%ccr <== NOT EXECUTED 4cc06: 675a beqs 4cc62 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4cc08: 42a7 clrl %sp@- <== NOT EXECUTED 4cc0a: 42a7 clrl %sp@- <== NOT EXECUTED 4cc0c: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4cc12: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4cc14: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cc18: 4a80 tstl %d0 <== NOT EXECUTED 4cc1a: 6600 00c4 bnew 4cce0 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4cc1e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cc22: 47f9 0004 5e68 lea 45e68 ,%a3 <== NOT EXECUTED 4cc28: 4e93 jsr %a3@ <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4cc2a: 588f addql #4,%sp <== NOT EXECUTED 4cc2c: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4cc30: 6736 beqs 4cc68 <== 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) 4cc32: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4cc36: 6616 bnes 4cc4e <== NOT EXECUTED 4cc38: 7002 moveq #2,%d0 <== NOT EXECUTED 4cc3a: b082 cmpl %d2,%d0 <== NOT EXECUTED 4cc3c: 6710 beqs 4cc4e <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4cc3e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cc42: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cc46: 4eb9 0004 da84 jsr 4da84 <== NOT EXECUTED 4cc4c: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4cc4e: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4cc54: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4cc56: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4cc5c: 4280 clrl %d0 <== NOT EXECUTED 4cc5e: 4e5e unlk %fp <== NOT EXECUTED 4cc60: 4e75 rts <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 4cc62: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED 4cc66: 60a0 bras 4cc08 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4cc68: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4cc6c: 672a beqs 4cc98 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4cc6e: 7004 moveq #4,%d0 <== NOT EXECUTED 4cc70: b082 cmpl %d2,%d0 <== NOT EXECUTED 4cc72: 67da beqs 4cc4e <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4cc74: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cc78: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4cc7c: 4eb9 0004 da84 jsr 4da84 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4cc82: 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); 4cc84: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4cc8a: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4cc8c: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4cc92: 4280 clrl %d0 <== NOT EXECUTED 4cc94: 4e5e unlk %fp <== NOT EXECUTED 4cc96: 4e75 rts <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4cc98: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4cc9c: 4bf9 0004 a6f4 lea 4a6f4 ,%a5 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4cca2: 243c 0004 da14 movel #317972,%d2 <== NOT EXECUTED 4cca8: 2042 moveal %d2,%a0 <== NOT EXECUTED 4ccaa: 4e90 jsr %a0@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4ccac: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4ccb0: 2042 moveal %d2,%a0 <== NOT EXECUTED 4ccb2: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4ccb4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ccb8: 4eb9 0004 5c54 jsr 45c54 <== NOT EXECUTED free(pipe->Buffer); 4ccbe: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4ccc0: 4e95 jsr %a5@ <== NOT EXECUTED free(pipe); 4ccc2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ccc4: 4e95 jsr %a5@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4ccc6: 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; 4ccca: 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); 4cccc: 2f39 0005 e724 movel 5e724 ,%sp@- <== NOT EXECUTED 4ccd2: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4ccd4: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4ccda: 4280 clrl %d0 <== NOT EXECUTED 4ccdc: 4e5e unlk %fp <== NOT EXECUTED 4ccde: 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); 4cce0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cce2: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED =============================================================================== 0004c9b8 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4c9b8: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4c9bc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4c9c0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4c9c4: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4c9c8: 660e bnes 4c9d8 <== NOT EXECUTED 4c9ca: 4282 clrl %d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4c9cc: 2002 movel %d2,%d0 <== NOT EXECUTED 4c9ce: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c9d4: 4e5e unlk %fp <== NOT EXECUTED 4c9d6: 4e75 rts <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4c9d8: 42a7 clrl %sp@- <== NOT EXECUTED 4c9da: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4c9e0: 42a7 clrl %sp@- <== NOT EXECUTED 4c9e2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c9e6: 4e93 jsr %a3@ <== NOT EXECUTED 4c9e8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c9ec: 4a80 tstl %d0 <== NOT EXECUTED 4c9ee: 6600 00d2 bnew 4cac2 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4c9f2: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c9f6: 6700 0088 beqw 4ca80 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4c9fa: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4c9fe: b083 cmpl %d3,%d0 <== NOT EXECUTED 4ca00: 6500 00e0 bcsw 4cae2 <== NOT EXECUTED 4ca04: 2a03 movel %d3,%d5 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4ca06: 4286 clrl %d6 <== NOT EXECUTED 4ca08: 4282 clrl %d2 <== NOT EXECUTED 4ca0a: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4ca10: 4bf9 0004 dafc lea 4dafc ,%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); 4ca16: 2e3c 0004 f414 movel #324628,%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) { 4ca1c: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4ca20: 2800 movel %d0,%d4 <== NOT EXECUTED 4ca22: 9881 subl %d1,%d4 <== NOT EXECUTED 4ca24: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4ca26: 6300 00d6 blsw 4cafe <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 4ca2a: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4ca2e: 7001 moveq #1,%d0 <== NOT EXECUTED 4ca30: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4ca34: 6600 0144 bnew 4cb7a <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4ca38: 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 ++; 4ca3c: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4ca40: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4ca42: 42a7 clrl %sp@- <== NOT EXECUTED 4ca44: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4ca48: 4e95 jsr %a5@ <== NOT EXECUTED 4ca4a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ca4e: 4a80 tstl %d0 <== NOT EXECUTED 4ca50: 672a beqs 4ca7c <== NOT EXECUTED 4ca52: 78fc moveq #-4,%d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4ca54: 42a7 clrl %sp@- <== NOT EXECUTED 4ca56: 42a7 clrl %sp@- <== NOT EXECUTED 4ca58: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ca5c: 4e93 jsr %a3@ <== NOT EXECUTED 4ca5e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ca62: 4a80 tstl %d0 <== NOT EXECUTED 4ca64: 6600 010e bnew 4cb74 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4ca68: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 4ca6c: 4a84 tstl %d4 <== NOT EXECUTED 4ca6e: 661a bnes 4ca8a <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4ca70: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4ca74: 675a beqs 4cad0 <== NOT EXECUTED 4ca76: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4ca7a: 60a0 bras 4ca1c <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4ca7c: 4284 clrl %d4 <== NOT EXECUTED 4ca7e: 60d4 bras 4ca54 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4ca80: 78e0 moveq #-32,%d4 <== NOT EXECUTED 4ca82: 4282 clrl %d2 <== NOT EXECUTED 4ca84: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4ca8a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ca8e: 4e94 jsr %a4@ <== NOT EXECUTED 4ca90: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4ca92: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4ca94: b084 cmpl %d4,%d0 <== NOT EXECUTED 4ca96: 6714 beqs 4caac <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) 4ca98: 4a82 tstl %d2 <== NOT EXECUTED 4ca9a: 6e00 ff30 bgtw 4c9cc <== NOT EXECUTED 4ca9e: 2404 movel %d4,%d2 <== NOT EXECUTED return written; return ret; } 4caa0: 2002 movel %d2,%d0 <== NOT EXECUTED 4caa2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4caa8: 4e5e unlk %fp <== NOT EXECUTED 4caaa: 4e75 rts <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 4caac: 4eb9 0004 d5a4 jsr 4d5a4 <== NOT EXECUTED 4cab2: 4878 000d pea d <== NOT EXECUTED 4cab6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cab8: 4eb9 0004 d6ac jsr 4d6ac <== NOT EXECUTED 4cabe: 508f addql #8,%sp <== NOT EXECUTED 4cac0: 60d6 bras 4ca98 <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4cac2: 74fc moveq #-4,%d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4cac4: 2002 movel %d2,%d0 <== NOT EXECUTED 4cac6: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4cacc: 4e5e unlk %fp <== NOT EXECUTED 4cace: 4e75 rts <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cad0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4cad4: 78e0 moveq #-32,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cad6: 4e94 jsr %a4@ <== NOT EXECUTED 4cad8: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4cada: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4cadc: b084 cmpl %d4,%d0 <== NOT EXECUTED 4cade: 66b8 bnes 4ca98 <== NOT EXECUTED 4cae0: 60ca bras 4caac <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4cae2: 7a01 moveq #1,%d5 <== NOT EXECUTED 4cae4: 4286 clrl %d6 <== NOT EXECUTED 4cae6: 4282 clrl %d2 <== NOT EXECUTED 4cae8: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4caee: 4bf9 0004 dafc lea 4dafc ,%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); 4caf4: 2e3c 0004 f414 movel #324628,%d7 <== NOT EXECUTED 4cafa: 6000 ff20 braw 4ca1c <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4cafe: 2043 moveal %d3,%a0 <== NOT EXECUTED 4cb00: 91c6 subal %d6,%a0 <== NOT EXECUTED 4cb02: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 4cb04: 6402 bccs 4cb08 <== NOT EXECUTED 4cb06: 2808 movel %a0,%d4 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4cb08: 2a01 movel %d1,%d5 <== NOT EXECUTED 4cb0a: daaa 0008 addl %a2@(8),%d5 <== NOT EXECUTED 4cb0e: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED 4cb12: 2a00 movel %d0,%d5 <== NOT EXECUTED 4cb14: 9a81 subl %d1,%d5 <== NOT EXECUTED if (chunk > chunk1) { 4cb16: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4cb18: 6c76 bges 4cb90 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4cb1a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4cb1c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cb20: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4cb24: d292 addl %a2@,%d1 <== NOT EXECUTED 4cb26: 2047 moveal %d7,%a0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4cb28: 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); 4cb2a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4cb2c: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4cb2e: 2004 movel %d4,%d0 <== NOT EXECUTED 4cb30: 9085 subl %d5,%d0 <== NOT EXECUTED 4cb32: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cb34: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cb38: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4cb3c: 2047 moveal %d7,%a0 <== NOT EXECUTED 4cb3e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4cb40: 4e90 jsr %a0@ <== NOT EXECUTED 4cb42: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4cb46: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4cb4a: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4cb4e: 6612 bnes 4cb62 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4cb50: 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) { 4cb52: 2c02 movel %d2,%d6 <== NOT EXECUTED 4cb54: b483 cmpl %d3,%d2 <== NOT EXECUTED 4cb56: 645a bccs 4cbb2 <== NOT EXECUTED 4cb58: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4cb5c: 7a01 moveq #1,%d5 <== NOT EXECUTED 4cb5e: 6000 febc braw 4ca1c <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4cb62: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cb66: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cb6a: 4eb9 0004 da84 jsr 4da84 <== NOT EXECUTED 4cb70: 508f addql #8,%sp <== NOT EXECUTED 4cb72: 60dc bras 4cb50 <== 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)) { 4cb74: 78fc moveq #-4,%d4 <== NOT EXECUTED 4cb76: 6000 ff20 braw 4ca98 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cb7a: 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)) { 4cb7e: 78f5 moveq #-11,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cb80: 4e94 jsr %a4@ <== NOT EXECUTED 4cb82: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4cb84: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4cb86: b084 cmpl %d4,%d0 <== NOT EXECUTED 4cb88: 6600 ff0e bnew 4ca98 <== NOT EXECUTED 4cb8c: 6000 ff1e braw 4caac <== 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); 4cb90: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4cb92: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cb96: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4cb9a: d292 addl %a2@,%d1 <== NOT EXECUTED 4cb9c: 2047 moveal %d7,%a0 <== NOT EXECUTED 4cb9e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4cba0: 4e90 jsr %a0@ <== NOT EXECUTED 4cba2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4cba6: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4cbaa: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4cbae: 67a0 beqs 4cb50 <== NOT EXECUTED 4cbb0: 60b0 bras 4cb62 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cbb2: 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) { 4cbb6: 4284 clrl %d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cbb8: 4e94 jsr %a4@ <== NOT EXECUTED 4cbba: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4cbbc: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4cbbe: b084 cmpl %d4,%d0 <== NOT EXECUTED 4cbc0: 6600 fed6 bnew 4ca98 <== NOT EXECUTED 4cbc4: 6000 fee6 braw 4caac <== NOT EXECUTED =============================================================================== 00047550 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 47550: 4e56 0000 linkw %fp,#0 47554: 222e 000c movel %fp@(12),%d1 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 47558: 2001 movel %d1,%d0 4755a: 5380 subql #1,%d0 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 4755c: 52b9 0006 4fd8 addql #1,64fd8 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 47562: c081 andl %d1,%d0 47564: 6608 bnes 4756e <== NEVER TAKEN 47566: 103c 0003 moveb #3,%d0 4756a: b081 cmpl %d1,%d0 4756c: 6506 bcss 47574 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 4756e: 7016 moveq #22,%d0 47570: 4e5e unlk %fp 47572: 4e75 rts 47574: 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 ); 47576: 4ef9 0004 76c8 jmp 476c8 =============================================================================== 00049fe4 : int pthread_attr_getschedpolicy( const pthread_attr_t *attr, int *policy ) { 49fe4: 4e56 0000 linkw %fp,#0 49fe8: 206e 0008 moveal %fp@(8),%a0 49fec: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !policy ) 49ff0: 4a88 tstl %a0 49ff2: 6712 beqs 4a006 <== NEVER TAKEN 49ff4: 4a90 tstl %a0@ 49ff6: 670e beqs 4a006 <== NEVER TAKEN 49ff8: 4a89 tstl %a1 49ffa: 670a beqs 4a006 <== NEVER TAKEN return EINVAL; *policy = attr->schedpolicy; 49ffc: 22a8 0014 movel %a0@(20),%a1@ 4a000: 4280 clrl %d0 return 0; } 4a002: 4e5e unlk %fp 4a004: 4e75 rts { if ( !attr || !attr->is_initialized || !policy ) return EINVAL; *policy = attr->schedpolicy; return 0; 4a006: 7016 moveq #22,%d0 } 4a008: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a160 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 4a160: 4e56 0000 linkw %fp,#0 4a164: 206e 0008 moveal %fp@(8),%a0 4a168: 202e 000c movel %fp@(12),%d0 4a16c: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 4a16e: 4a88 tstl %a0 4a170: 672e beqs 4a1a0 4a172: 4a90 tstl %a0@ 4a174: 672a beqs 4a1a0 return EINVAL; switch ( policy ) { 4a176: 7204 moveq #4,%d1 4a178: b280 cmpl %d0,%d1 4a17a: 640c bccs 4a188 return 0; default: return ENOTSUP; } } 4a17c: 241f movel %sp@+,%d2 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 4a17e: 203c 0000 0086 movel #134,%d0 return 0; default: return ENOTSUP; } } 4a184: 4e5e unlk %fp 4a186: 4e75 rts ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 4a188: 123c 0001 moveb #1,%d1 4a18c: 7417 moveq #23,%d2 4a18e: e1a9 lsll %d0,%d1 4a190: c282 andl %d2,%d1 4a192: 67e8 beqs 4a17c <== NEVER TAKEN return 0; default: return ENOTSUP; } } 4a194: 241f movel %sp@+,%d2 4a196: 4e5e unlk %fp switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 4a198: 2140 0014 movel %d0,%a0@(20) 4a19c: 4280 clrl %d0 return 0; default: return ENOTSUP; } } 4a19e: 4e75 rts 4a1a0: 241f movel %sp@+,%d2 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; 4a1a2: 7016 moveq #22,%d0 default: return ENOTSUP; } } 4a1a4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000460fc : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 460fc: 4e56 ffe0 linkw %fp,#-32 46100: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46104: 246e 0008 moveal %fp@(8),%a2 46108: 262e 000c movel %fp@(12),%d3 4610c: 242e 0010 movel %fp@(16),%d2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 46110: 4a8a tstl %a2 46112: 677a beqs 4618e return EINVAL; if ( count == 0 ) 46114: 4a82 tstl %d2 46116: 6776 beqs 4618e return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 46118: 4a83 tstl %d3 4611a: 6700 0090 beqw 461ac 4611e: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46120: 4a90 tstl %a0@ 46122: 676a beqs 4618e return EINVAL; switch ( the_attr->process_shared ) { 46124: 4aa8 0004 tstl %a0@(4) 46128: 6664 bnes 4618e <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4612a: 2039 0006 06fc movel 606fc <_Thread_Dispatch_disable_level>,%d0 46130: 5280 addql #1,%d0 /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 46132: 2d42 fffc movel %d2,%fp@(-4) 46136: 23c0 0006 06fc movel %d0,606fc <_Thread_Dispatch_disable_level> } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4613c: 42ae fff8 clrl %fp@(-8) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 46140: 4879 0006 0a3e pea 60a3e <_POSIX_Barrier_Information> 46146: 4eb9 0004 83e0 jsr 483e0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 4614c: 588f addql #4,%sp 4614e: 2640 moveal %d0,%a3 46150: 4a80 tstl %d0 46152: 6746 beqs 4619a _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 46154: 486e fff8 pea %fp@(-8) 46158: 486b 0010 pea %a3@(16) 4615c: 4eb9 0004 7a50 jsr 47a50 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46162: 202b 0008 movel %a3@(8),%d0 46166: 4281 clrl %d1 46168: 2079 0006 0a56 moveal 60a56 <_POSIX_Barrier_Information+0x18>,%a0 4616e: 3200 movew %d0,%d1 46170: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46174: 42ab 000c clrl %a3@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 46178: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4617a: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> return 0; 46180: 508f addql #8,%sp /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); 46182: 4280 clrl %d0 return 0; } 46184: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 4618a: 4e5e unlk %fp 4618c: 4e75 rts /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 4618e: 7016 moveq #22,%d0 } 46190: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46196: 4e5e unlk %fp 46198: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 4619a: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> 461a0: 700b moveq #11,%d0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 461a2: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 461a8: 4e5e unlk %fp 461aa: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 461ac: 260e movel %fp,%d3 461ae: 0683 ffff fff0 addil #-16,%d3 461b4: 2f03 movel %d3,%sp@- 461b6: 4eb9 0004 6038 jsr 46038 461bc: 588f addql #4,%sp 461be: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 461c0: 4a90 tstl %a0@ 461c2: 6600 ff60 bnew 46124 461c6: 60c6 bras 4618e <== NOT EXECUTED =============================================================================== 00045b68 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 45b68: 4e56 0000 linkw %fp,#0 45b6c: 2f03 movel %d3,%sp@- 45b6e: 262e 000c movel %fp@(12),%d3 45b72: 2f02 movel %d2,%sp@- 45b74: 242e 0008 movel %fp@(8),%d2 /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 45b78: 6754 beqs 45bce rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45b7a: 2039 0006 0194 movel 60194 <_Thread_Dispatch_disable_level>,%d0 45b80: 5280 addql #1,%d0 45b82: 23c0 0006 0194 movel %d0,60194 <_Thread_Dispatch_disable_level> return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 45b88: 4878 0010 pea 10 45b8c: 4eb9 0004 a004 jsr 4a004 <_Workspace_Allocate> if ( handler ) { 45b92: 588f addql #4,%sp 45b94: 4a80 tstl %d0 45b96: 6726 beqs 45bbe <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 45b98: 2079 0006 024e moveal 6024e <_Thread_Executing>,%a0 45b9e: 2228 010e movel %a0@(270),%d1 handler->routine = routine; 45ba2: 2040 moveal %d0,%a0 handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 45ba4: 0681 0000 00e0 addil #224,%d1 handler->routine = routine; 45baa: 2142 0008 movel %d2,%a0@(8) handler->arg = arg; 45bae: 2143 000c movel %d3,%a0@(12) _Chain_Append( handler_stack, &handler->Node ); 45bb2: 2f00 movel %d0,%sp@- 45bb4: 2f01 movel %d1,%sp@- 45bb6: 4eb9 0004 7584 jsr 47584 <_Chain_Append> 45bbc: 508f addql #8,%sp } _Thread_Enable_dispatch(); } 45bbe: 242e fff8 movel %fp@(-8),%d2 45bc2: 262e fffc movel %fp@(-4),%d3 45bc6: 4e5e unlk %fp handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 45bc8: 4ef9 0004 8b28 jmp 48b28 <_Thread_Enable_dispatch> } 45bce: 242e fff8 movel %fp@(-8),%d2 45bd2: 262e fffc movel %fp@(-4),%d3 45bd6: 4e5e unlk %fp ... =============================================================================== 00046a2c : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 46a2c: 4e56 0000 linkw %fp,#0 46a30: 202e 000c movel %fp@(12),%d0 46a34: 2f0b movel %a3,%sp@- 46a36: 2f0a movel %a2,%sp@- POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 46a38: 45f9 0005 f0bc lea 5f0bc <_POSIX_Condition_variables_Default_attributes>,%a2 46a3e: 4a80 tstl %d0 46a40: 6702 beqs 46a44 46a42: 2440 moveal %d0,%a2 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 46a44: 7001 moveq #1,%d0 46a46: b0aa 0004 cmpl %a2@(4),%d0 46a4a: 6704 beqs 46a50 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 46a4c: 4a92 tstl %a2@ 46a4e: 660e bnes 46a5e *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46a50: 246e fff8 moveal %fp@(-8),%a2 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 46a54: 7016 moveq #22,%d0 } 46a56: 266e fffc moveal %fp@(-4),%a3 46a5a: 4e5e unlk %fp 46a5c: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46a5e: 2039 0006 19d8 movel 619d8 <_Thread_Dispatch_disable_level>,%d0 46a64: 5280 addql #1,%d0 46a66: 23c0 0006 19d8 movel %d0,619d8 <_Thread_Dispatch_disable_level> */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 46a6c: 4879 0006 1da6 pea 61da6 <_POSIX_Condition_variables_Information> 46a72: 4eb9 0004 935c jsr 4935c <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 46a78: 588f addql #4,%sp 46a7a: 2640 moveal %d0,%a3 46a7c: 4a80 tstl %d0 46a7e: 6752 beqs 46ad2 return ENOMEM; } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 46a80: 42ab 0014 clrl %a3@(20) if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 46a84: 276a 0004 0010 movel %a2@(4),%a3@(16) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 46a8a: 4878 0074 pea 74 46a8e: 4878 0800 pea 800 46a92: 42a7 clrl %sp@- 46a94: 486b 0018 pea %a3@(24) 46a98: 4eb9 0004 a83c jsr 4a83c <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46a9e: 202b 0008 movel %a3@(8),%d0 46aa2: 4281 clrl %d1 46aa4: 2079 0006 1dbe moveal 61dbe <_POSIX_Condition_variables_Information+0x18>,%a0 46aaa: 3200 movew %d0,%d1 46aac: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46ab0: 42ab 000c clrl %a3@(12) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 46ab4: 206e 0008 moveal %fp@(8),%a0 46ab8: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 46aba: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> return 0; } 46ac0: 246e fff8 moveal %fp@(-8),%a2 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 46ac4: 4fef 0010 lea %sp@(16),%sp 0 ); *cond = the_cond->Object.id; _Thread_Enable_dispatch(); 46ac8: 4280 clrl %d0 return 0; } 46aca: 266e fffc moveal %fp@(-4),%a3 46ace: 4e5e unlk %fp 46ad0: 4e75 rts _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 46ad2: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46ad8: 246e fff8 moveal %fp@(-8),%a2 _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 46adc: 700c moveq #12,%d0 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46ade: 266e fffc moveal %fp@(-4),%a3 46ae2: 4e5e unlk %fp ... =============================================================================== 0004688c : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 4688c: 4e56 0000 linkw %fp,#0 46890: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 46894: 4a88 tstl %a0 46896: 670c beqs 468a4 46898: 4a90 tstl %a0@ 4689a: 6708 beqs 468a4 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 4689c: 4280 clrl %d0 return 0; } 4689e: 4e5e unlk %fp ) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; 468a0: 4290 clrl %a0@ return 0; } 468a2: 4e75 rts { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 468a4: 7016 moveq #22,%d0 } 468a6: 4e5e unlk %fp ... =============================================================================== 0004d8fc : } void pthread_exit( void *value_ptr ) { 4d8fc: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4d900: 2f2e 0008 movel %fp@(8),%sp@- 4d904: 2f39 0005 f032 movel 5f032 <_Thread_Executing>,%sp@- 4d90a: 4eb9 0004 d88c jsr 4d88c <_POSIX_Thread_Exit> 4d910: 508f addql #8,%sp <== NOT EXECUTED } 4d912: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00045c74 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 45c74: 4e56 ffe4 linkw %fp,#-28 45c78: 2039 0006 0f08 movel 60f08 <_Thread_Dispatch_disable_level>,%d0 45c7e: 5280 addql #1,%d0 45c80: 23c0 0006 0f08 movel %d0,60f08 <_Thread_Dispatch_disable_level> 45c86: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ * the inactive chain of free keys control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 45c8a: 4879 0006 129c pea 6129c <_POSIX_Keys_Information> 45c90: 4eb9 0004 811c jsr 4811c <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 45c96: 588f addql #4,%sp 45c98: 2840 moveal %d0,%a4 45c9a: 4a80 tstl %d0 45c9c: 6700 0098 beqw 45d36 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 45ca0: 45f9 0006 0ec4 lea 60ec4 <_Objects_Information_table+0x4>,%a2 45ca6: 47ec 0018 lea %a4@(24),%a3 45caa: 7601 moveq #1,%d3 INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 45cac: 4bf9 0004 a338 lea 4a338 <_Workspace_Allocate>,%a5 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 45cb2: 283c 0005 02ac movel #328364,%d4 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 45cb8: 296e 000c 0010 movel %fp@(12),%a4@(16) for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 45cbe: 2052 moveal %a2@,%a0 45cc0: 4a88 tstl %a0 45cc2: 6762 beqs 45d26 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 45cc4: 2068 0004 moveal %a0@(4),%a0 45cc8: 4282 clrl %d2 45cca: 3428 000e movew %a0@(14),%d2 45cce: 5282 addql #1,%d2 45cd0: e58a lsll #2,%d2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 45cd2: 2f02 movel %d2,%sp@- 45cd4: 4e95 jsr %a5@ if ( !table ) { 45cd6: 588f addql #4,%sp 45cd8: 4a80 tstl %d0 45cda: 676c beqs 45d48 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 45cdc: 2680 movel %d0,%a3@ memset( table, '\0', bytes_to_allocate ); 45cde: 2044 moveal %d4,%a0 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 45ce0: 5283 addql #1,%d3 45ce2: 588a addql #4,%a2 45ce4: 588b addql #4,%a3 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 45ce6: 2f02 movel %d2,%sp@- 45ce8: 42a7 clrl %sp@- 45cea: 2f00 movel %d0,%sp@- 45cec: 4e90 jsr %a0@ 45cee: 4fef 000c lea %sp@(12),%sp * This is a bit more complex than one might initially expect because * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; 45cf2: 7005 moveq #5,%d0 45cf4: b083 cmpl %d3,%d0 45cf6: 66c6 bnes 45cbe <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45cf8: 202c 0008 movel %a4@(8),%d0 45cfc: 4281 clrl %d1 45cfe: 2079 0006 12b4 moveal 612b4 <_POSIX_Keys_Information+0x18>,%a0 45d04: 3200 movew %d0,%d1 45d06: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45d0a: 42ac 000c clrl %a4@(12) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 45d0e: 206e 0008 moveal %fp@(8),%a0 45d12: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 45d14: 4eb9 0004 8dc8 jsr 48dc8 <_Thread_Enable_dispatch> return 0; } 45d1a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); 45d20: 4280 clrl %d0 return 0; } 45d22: 4e5e unlk %fp 45d24: 4e75 rts } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 45d26: 4293 clrl %a3@ * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 45d28: 5283 addql #1,%d3 45d2a: 588a addql #4,%a2 45d2c: 588b addql #4,%a3 * This is a bit more complex than one might initially expect because * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; 45d2e: 7005 moveq #5,%d0 45d30: b083 cmpl %d3,%d0 45d32: 668a bnes 45cbe <== NEVER TAKEN 45d34: 60c2 bras 45cf8 _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 45d36: 4eb9 0004 8dc8 jsr 48dc8 <_Thread_Enable_dispatch> 45d3c: 700b moveq #11,%d0 *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 45d3e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 45d44: 4e5e unlk %fp 45d46: 4e75 rts #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 45d48: 2403 movel %d3,%d2 45d4a: 5382 subql #1,%d2 45d4c: 6718 beqs 45d66 45d4e: 47f9 0004 a354 lea 4a354 <_Workspace_Free>,%a3 45d54: 45f4 3c10 lea %a4@(00000010,%d3:l:4),%a2 the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 45d58: 2f12 movel %a2@,%sp@- (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 45d5a: 5382 subql #1,%d2 45d5c: 598a subql #4,%a2 _Workspace_Free( the_key->Values[ the_api ] ); 45d5e: 4e93 jsr %a3@ #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 45d60: 588f addql #4,%sp 45d62: 4a82 tstl %d2 45d64: 66f2 bnes 45d58 */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 45d66: 2f0c movel %a4,%sp@- 45d68: 4879 0006 129c pea 6129c <_POSIX_Keys_Information> 45d6e: 4eb9 0004 8454 jsr 48454 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 45d74: 4eb9 0004 8dc8 jsr 48dc8 <_Thread_Enable_dispatch> return ENOMEM; 45d7a: 508f addql #8,%sp the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 45d7c: 700c moveq #12,%d0 *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 45d7e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 45d84: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045960 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 45960: 4e56 0000 linkw %fp,#0 45964: 206e 0008 moveal %fp@(8),%a0 45968: 226e 000c moveal %fp@(12),%a1 if ( !attr ) 4596c: 4a88 tstl %a0 4596e: 6712 beqs 45982 return EINVAL; if ( !attr->is_initialized ) 45970: 4a90 tstl %a0@ 45972: 670e beqs 45982 return EINVAL; if ( !type ) 45974: 4a89 tstl %a1 45976: 670a beqs 45982 <== NEVER TAKEN return EINVAL; *type = attr->type; 45978: 22a8 0010 movel %a0@(16),%a1@ 4597c: 4280 clrl %d0 return 0; } 4597e: 4e5e unlk %fp 45980: 4e75 rts if ( !type ) return EINVAL; *type = attr->type; return 0; 45982: 7016 moveq #22,%d0 } 45984: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047b64 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 47b64: 4e56 0000 linkw %fp,#0 47b68: 206e 0008 moveal %fp@(8),%a0 47b6c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 47b70: 4a88 tstl %a0 47b72: 670a beqs 47b7e 47b74: 4a90 tstl %a0@ 47b76: 6706 beqs 47b7e return EINVAL; switch ( pshared ) { 47b78: 7201 moveq #1,%d1 47b7a: b280 cmpl %d0,%d1 47b7c: 6406 bccs 47b84 <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 47b7e: 7016 moveq #22,%d0 default: return EINVAL; } } 47b80: 4e5e unlk %fp 47b82: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 47b84: 2140 0004 movel %d0,%a0@(4) 47b88: 4280 clrl %d0 return 0; default: return EINVAL; } } 47b8a: 4e5e unlk %fp ... =============================================================================== 000459c4 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 459c4: 4e56 0000 linkw %fp,#0 459c8: 206e 0008 moveal %fp@(8),%a0 459cc: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 459d0: 4a88 tstl %a0 459d2: 670a beqs 459de 459d4: 4a90 tstl %a0@ 459d6: 6706 beqs 459de <== NEVER TAKEN return EINVAL; switch ( type ) { 459d8: 7203 moveq #3,%d1 459da: b280 cmpl %d0,%d1 459dc: 6406 bccs 459e4 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 459de: 7016 moveq #22,%d0 default: return EINVAL; } } 459e0: 4e5e unlk %fp 459e2: 4e75 rts switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 459e4: 2140 0010 movel %d0,%a0@(16) 459e8: 4280 clrl %d0 return 0; default: return EINVAL; } } 459ea: 4e5e unlk %fp ... =============================================================================== 00046768 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 46768: 4e56 ffec linkw %fp,#-20 4676c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 46770: 246e 0008 moveal %fp@(8),%a2 46774: 266e 000c moveal %fp@(12),%a3 if ( !once_control || !init_routine ) 46778: 4a8a tstl %a2 4677a: 6766 beqs 467e2 4677c: 4a8b tstl %a3 4677e: 6762 beqs 467e2 return EINVAL; if ( !once_control->init_executed ) { 46780: 4aaa 0004 tstl %a2@(4) 46784: 670c beqs 46792 if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 46786: 4280 clrl %d0 } return 0; } 46788: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 4678e: 4e5e unlk %fp 46790: 4e75 rts if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 46792: 240e movel %fp,%d2 46794: 5982 subql #4,%d2 46796: 49f9 0004 7428 lea 47428 ,%a4 4679c: 2f02 movel %d2,%sp@- 4679e: 4878 0100 pea 100 467a2: 4878 0100 pea 100 467a6: 4e94 jsr %a4@ if ( !once_control->init_executed ) { 467a8: 4fef 000c lea %sp@(12),%sp 467ac: 4aaa 0004 tstl %a2@(4) 467b0: 6714 beqs 467c6 <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 467b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 467b4: 4878 0100 pea 100 <== NOT EXECUTED 467b8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 467bc: 4e94 jsr %a4@ <== NOT EXECUTED 467be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 467c2: 4280 clrl %d0 467c4: 60c2 bras 46788 if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; 467c6: 7001 moveq #1,%d0 467c8: 2540 0004 movel %d0,%a2@(4) if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; 467cc: 2480 movel %d0,%a2@ once_control->init_executed = true; (*init_routine)(); 467ce: 4e93 jsr %a3@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 467d0: 2f02 movel %d2,%sp@- 467d2: 4878 0100 pea 100 467d6: 2f2e fffc movel %fp@(-4),%sp@- 467da: 4e94 jsr %a4@ 467dc: 4fef 000c lea %sp@(12),%sp 467e0: 60e0 bras 467c2 467e2: 7016 moveq #22,%d0 } return 0; } 467e4: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 467ea: 4e5e unlk %fp ... =============================================================================== 00046a80 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 46a80: 4e56 ffe8 linkw %fp,#-24 46a84: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 46a88: 246e 0008 moveal %fp@(8),%a2 46a8c: 242e 000c movel %fp@(12),%d2 const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 46a90: 4a8a tstl %a2 46a92: 676e beqs 46b02 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 46a94: 4a82 tstl %d2 46a96: 6700 0088 beqw 46b20 46a9a: 2042 moveal %d2,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46a9c: 4a90 tstl %a0@ 46a9e: 6762 beqs 46b02 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 46aa0: 4aa8 0004 tstl %a0@(4) 46aa4: 665c bnes 46b02 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46aa6: 2039 0006 1ccc movel 61ccc <_Thread_Dispatch_disable_level>,%d0 46aac: 5280 addql #1,%d0 46aae: 23c0 0006 1ccc movel %d0,61ccc <_Thread_Dispatch_disable_level> * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 46ab4: 4879 0006 1e78 pea 61e78 <_POSIX_RWLock_Information> 46aba: 4eb9 0004 93bc jsr 493bc <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 46ac0: 588f addql #4,%sp 46ac2: 2640 moveal %d0,%a3 46ac4: 4a80 tstl %d0 46ac6: 6746 beqs 46b0e _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 46ac8: 486e fffc pea %fp@(-4) 46acc: 486b 0010 pea %a3@(16) 46ad0: 4eb9 0004 8ae8 jsr 48ae8 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46ad6: 202b 0008 movel %a3@(8),%d0 46ada: 4281 clrl %d1 46adc: 2079 0006 1e90 moveal 61e90 <_POSIX_RWLock_Information+0x18>,%a0 46ae2: 3200 movew %d0,%d1 46ae4: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46ae8: 42ab 000c clrl %a3@(12) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 46aec: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 46aee: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> return 0; 46af4: 508f addql #8,%sp 0 ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); 46af6: 4280 clrl %d0 return 0; } 46af8: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 46afe: 4e5e unlk %fp 46b00: 4e75 rts ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 46b02: 7016 moveq #22,%d0 } 46b04: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 46b0a: 4e5e unlk %fp 46b0c: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 46b0e: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> 46b14: 700b moveq #11,%d0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 46b16: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 46b1c: 4e5e unlk %fp 46b1e: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 46b20: 240e movel %fp,%d2 46b22: 0682 ffff fff4 addil #-12,%d2 46b28: 2f02 movel %d2,%sp@- 46b2a: 4eb9 0004 75b8 jsr 475b8 46b30: 588f addql #4,%sp 46b32: 2042 moveal %d2,%a0 46b34: 6000 ff66 braw 46a9c =============================================================================== 00046ba4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 46ba4: 4e56 ffec linkw %fp,#-20 46ba8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46bac: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 46bb0: 4a8a tstl %a2 46bb2: 6700 0082 beqw 46c36 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 46bb6: 486e fff8 pea %fp@(-8) 46bba: 2f2e 000c movel %fp@(12),%sp@- 46bbe: 4eb9 0004 d4c8 jsr 4d4c8 <_POSIX_Absolute_timeout_to_ticks> 46bc4: 486e fffc pea %fp@(-4) 46bc8: 2400 movel %d0,%d2 46bca: 2f12 movel %a2@,%sp@- 46bcc: 4879 0006 1e78 pea 61e78 <_POSIX_RWLock_Information> 46bd2: 4eb9 0004 9858 jsr 49858 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 46bd8: 4fef 0014 lea %sp@(20),%sp 46bdc: 4aae fffc tstl %fp@(-4) 46be0: 6654 bnes 46c36 <== NEVER TAKEN int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 46be2: 7203 moveq #3,%d1 46be4: b282 cmpl %d2,%d1 46be6: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 46be8: 42a7 clrl %sp@- 46bea: 2f2e fff8 movel %fp@(-8),%sp@- 46bee: 4483 negl %d3 46bf0: 4281 clrl %d1 46bf2: 1203 moveb %d3,%d1 46bf4: 2040 moveal %d0,%a0 46bf6: 2f01 movel %d1,%sp@- 46bf8: 2f12 movel %a2@,%sp@- 46bfa: 4868 0010 pea %a0@(16) 46bfe: 4eb9 0004 8b1c jsr 48b1c <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 46c04: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> if ( !do_wait ) { 46c0a: 4fef 0014 lea %sp@(20),%sp 46c0e: 4a03 tstb %d3 46c10: 6644 bnes 46c56 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 46c12: 2079 0006 1d86 moveal 61d86 <_Thread_Executing>,%a0 46c18: 7202 moveq #2,%d1 46c1a: 2028 0034 movel %a0@(52),%d0 46c1e: b280 cmpl %d0,%d1 46c20: 6720 beqs 46c42 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46c22: 2f00 movel %d0,%sp@- 46c24: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 46c2a: 588f addql #4,%sp case OBJECTS_ERROR: break; } return EINVAL; } 46c2c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46c32: 4e5e unlk %fp 46c34: 4e75 rts break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46c36: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46c38: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46c3e: 4e5e unlk %fp 46c40: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 46c42: 4a82 tstl %d2 46c44: 67f0 beqs 46c36 <== NEVER TAKEN 46c46: b282 cmpl %d2,%d1 46c48: 65d8 bcss 46c22 <== NEVER TAKEN 46c4a: 7074 moveq #116,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46c4c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46c52: 4e5e unlk %fp 46c54: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 46c56: 2079 0006 1d86 moveal 61d86 <_Thread_Executing>,%a0 46c5c: 2028 0034 movel %a0@(52),%d0 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46c60: 2f00 movel %d0,%sp@- 46c62: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 46c68: 588f addql #4,%sp 46c6a: 60c0 bras 46c2c =============================================================================== 00046c6c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 46c6c: 4e56 ffec linkw %fp,#-20 46c70: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46c74: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 46c78: 4a8a tstl %a2 46c7a: 6700 0082 beqw 46cfe * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 46c7e: 486e fff8 pea %fp@(-8) 46c82: 2f2e 000c movel %fp@(12),%sp@- 46c86: 4eb9 0004 d4c8 jsr 4d4c8 <_POSIX_Absolute_timeout_to_ticks> 46c8c: 486e fffc pea %fp@(-4) 46c90: 2400 movel %d0,%d2 46c92: 2f12 movel %a2@,%sp@- 46c94: 4879 0006 1e78 pea 61e78 <_POSIX_RWLock_Information> 46c9a: 4eb9 0004 9858 jsr 49858 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 46ca0: 4fef 0014 lea %sp@(20),%sp 46ca4: 4aae fffc tstl %fp@(-4) 46ca8: 6654 bnes 46cfe (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 46caa: 7203 moveq #3,%d1 46cac: b282 cmpl %d2,%d1 46cae: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 46cb0: 42a7 clrl %sp@- 46cb2: 2f2e fff8 movel %fp@(-8),%sp@- 46cb6: 4483 negl %d3 46cb8: 4281 clrl %d1 46cba: 1203 moveb %d3,%d1 46cbc: 2040 moveal %d0,%a0 46cbe: 2f01 movel %d1,%sp@- 46cc0: 2f12 movel %a2@,%sp@- 46cc2: 4868 0010 pea %a0@(16) 46cc6: 4eb9 0004 8bdc jsr 48bdc <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 46ccc: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch> if ( !do_wait && 46cd2: 4fef 0014 lea %sp@(20),%sp 46cd6: 4a03 tstb %d3 46cd8: 6644 bnes 46d1e (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 46cda: 2079 0006 1d86 moveal 61d86 <_Thread_Executing>,%a0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 46ce0: 7202 moveq #2,%d1 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 46ce2: 2028 0034 movel %a0@(52),%d0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 46ce6: b280 cmpl %d0,%d1 46ce8: 6720 beqs 46d0a case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46cea: 2f00 movel %d0,%sp@- 46cec: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 46cf2: 588f addql #4,%sp case OBJECTS_ERROR: break; } return EINVAL; } 46cf4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46cfa: 4e5e unlk %fp 46cfc: 4e75 rts case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46cfe: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46d00: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46d06: 4e5e unlk %fp 46d08: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 46d0a: 4a82 tstl %d2 46d0c: 67f0 beqs 46cfe <== NEVER TAKEN 46d0e: b282 cmpl %d2,%d1 46d10: 65d8 bcss 46cea <== NEVER TAKEN 46d12: 7074 moveq #116,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46d14: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46d1a: 4e5e unlk %fp 46d1c: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 46d1e: 2079 0006 1d86 moveal 61d86 <_Thread_Executing>,%a0 46d24: 2028 0034 movel %a0@(52),%d0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46d28: 2f00 movel %d0,%sp@- 46d2a: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 46d30: 588f addql #4,%sp 46d32: 60c0 bras 46cf4 =============================================================================== 000475d8 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 475d8: 4e56 0000 linkw %fp,#0 475dc: 206e 0008 moveal %fp@(8),%a0 475e0: 202e 000c movel %fp@(12),%d0 if ( !attr ) 475e4: 4a88 tstl %a0 475e6: 670a beqs 475f2 return EINVAL; if ( !attr->is_initialized ) 475e8: 4a90 tstl %a0@ 475ea: 6706 beqs 475f2 return EINVAL; switch ( pshared ) { 475ec: 7201 moveq #1,%d1 475ee: b280 cmpl %d0,%d1 475f0: 6406 bccs 475f8 <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 475f2: 7016 moveq #22,%d0 default: return EINVAL; } } 475f4: 4e5e unlk %fp 475f6: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 475f8: 2140 0004 movel %d0,%a0@(4) 475fc: 4280 clrl %d0 return 0; default: return EINVAL; } } 475fe: 4e5e unlk %fp ... =============================================================================== 0004897c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 4897c: 4e56 ffe0 linkw %fp,#-32 48980: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 48984: 282e 000c movel %fp@(12),%d4 48988: 242e 0010 movel %fp@(16),%d2 int rc; /* * Check all the parameters */ if ( !param ) 4898c: 6700 00c4 beqw 48a52 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 48990: 486e fff8 pea %fp@(-8) 48994: 486e fffc pea %fp@(-4) 48998: 2f02 movel %d2,%sp@- 4899a: 2f04 movel %d4,%sp@- 4899c: 4eb9 0004 e804 jsr 4e804 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 489a2: 4fef 0010 lea %sp@(16),%sp * Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 489a6: 2600 movel %d0,%d3 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 489a8: 670c beqs 489b6 case OBJECTS_ERROR: break; } return ESRCH; } 489aa: 2003 movel %d3,%d0 489ac: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 489b2: 4e5e unlk %fp 489b4: 4e75 rts 489b6: 486e fff4 pea %fp@(-12) 489ba: 2f2e 0008 movel %fp@(8),%sp@- 489be: 4879 0006 442e pea 6442e <_POSIX_Threads_Information> 489c4: 4eb9 0004 aab8 jsr 4aab8 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 489ca: 4fef 000c lea %sp@(12),%sp 489ce: 2440 moveal %d0,%a2 489d0: 4aae fff4 tstl %fp@(-12) 489d4: 6600 008a bnew 48a60 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 489d8: 266a 010e moveal %a2@(270),%a3 if ( api->schedpolicy == SCHED_SPORADIC ) 489dc: 7004 moveq #4,%d0 489de: b0ab 0080 cmpl %a3@(128),%d0 489e2: 6700 00ba beqw 48a9e (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 489e6: 2242 moveal %d2,%a1 489e8: 41eb 0084 lea %a3@(132),%a0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 489ec: 2744 0080 movel %d4,%a3@(128) api->schedparam = *param; 489f0: 20d9 movel %a1@+,%a0@+ 489f2: 20d9 movel %a1@+,%a0@+ 489f4: 20d9 movel %a1@+,%a0@+ 489f6: 20d9 movel %a1@+,%a0@+ 489f8: 20d9 movel %a1@+,%a0@+ 489fa: 20d9 movel %a1@+,%a0@+ the_thread->budget_algorithm = budget_algorithm; 489fc: 256e fffc 007a movel %fp@(-4),%a2@(122) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48a02: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 48a04: 256e fff8 007e movel %fp@(-8),%a2@(126) switch ( api->schedpolicy ) { 48a0a: 4a84 tstl %d4 48a0c: 6d32 blts 48a40 <== NEVER TAKEN 48a0e: 7002 moveq #2,%d0 48a10: b084 cmpl %d4,%d0 48a12: 6d5c blts 48a70 <== NEVER TAKEN 48a14: 4280 clrl %d0 48a16: 1039 0006 2a56 moveb 62a56 ,%d0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 48a1c: 41f9 0006 41f8 lea 641f8 <_Thread_Ticks_per_timeslice>,%a0 48a22: 90ab 0084 subl %a3@(132),%d0 48a26: 2550 0076 movel %a0@,%a2@(118) the_thread->real_priority = 48a2a: 2540 0018 movel %d0,%a2@(24) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 48a2e: 4878 0001 pea 1 48a32: 2f00 movel %d0,%sp@- 48a34: 2f0a movel %a2,%sp@- 48a36: 4eb9 0004 ada8 jsr 4ada8 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 48a3c: 4fef 000c lea %sp@(12),%sp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 48a40: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 48a46: 2003 movel %d3,%d0 48a48: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a4e: 4e5e unlk %fp 48a50: 4e75 rts int rc; /* * Check all the parameters */ if ( !param ) 48a52: 7616 moveq #22,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 48a54: 2003 movel %d3,%d0 48a56: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a5c: 4e5e unlk %fp 48a5e: 4e75 rts /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 48a60: 163c 0003 moveb #3,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 48a64: 2003 movel %d3,%d0 48a66: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a6c: 4e5e unlk %fp 48a6e: 4e75 rts api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 48a70: 103c 0004 moveb #4,%d0 48a74: b084 cmpl %d4,%d0 48a76: 66c8 bnes 48a40 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 48a78: 276b 0084 00a0 movel %a3@(132),%a3@(160) _Watchdog_Remove( &api->Sporadic_timer ); 48a7e: 486b 00a4 pea %a3@(164) 48a82: 4eb9 0004 c748 jsr 4c748 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 48a88: 2f0a movel %a2,%sp@- 48a8a: 42a7 clrl %sp@- 48a8c: 4eb9 0004 88c0 jsr 488c0 <_POSIX_Threads_Sporadic_budget_TSR> 48a92: 4fef 000c lea %sp@(12),%sp break; } _Thread_Enable_dispatch(); 48a96: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> 48a9c: 60a8 bras 48a46 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 48a9e: 486b 00a4 pea %a3@(164) 48aa2: 4eb9 0004 c748 jsr 4c748 <_Watchdog_Remove> api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 48aa8: 256e fffc 007a movel %fp@(-4),%a2@(122) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48aae: 2242 moveal %d2,%a1 48ab0: 41eb 0084 lea %a3@(132),%a0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 48ab4: 588f addql #4,%sp api->schedpolicy = policy; 48ab6: 2744 0080 movel %d4,%a3@(128) api->schedparam = *param; 48aba: 20d9 movel %a1@+,%a0@+ 48abc: 20d9 movel %a1@+,%a0@+ 48abe: 20d9 movel %a1@+,%a0@+ 48ac0: 20d9 movel %a1@+,%a0@+ 48ac2: 20d9 movel %a1@+,%a0@+ 48ac4: 20d9 movel %a1@+,%a0@+ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 48ac6: 256e fff8 007e movel %fp@(-8),%a2@(126) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48acc: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 48ace: 4a84 tstl %d4 48ad0: 6c00 ff3c bgew 48a0e 48ad4: 6000 ff6a braw 48a40 <== NOT EXECUTED =============================================================================== 0004c974 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 4c974: 4e56 0000 linkw %fp,#0 4c978: 202e 0008 movel %fp@(8),%d0 4c97c: 2f0b movel %a3,%sp@- 4c97e: 226e 000c moveal %fp@(12),%a1 4c982: 2f0a movel %a2,%sp@- 4c984: 246e 0010 moveal %fp@(16),%a2 POSIX_API_Control *api; if ( !set && !oset ) 4c988: 4a89 tstl %a1 4c98a: 6700 0096 beqw 4ca22 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4c98e: 2679 0006 0f92 moveal 60f92 <_Thread_Executing>,%a3 4c994: 206b 010e moveal %a3@(270),%a0 if ( oset ) 4c998: 4a8a tstl %a2 4c99a: 6708 beqs 4c9a4 *oset = api->signals_blocked; 4c99c: 24a8 00cc movel %a0@(204),%a2@ if ( !set ) 4c9a0: 4a89 tstl %a1 4c9a2: 6744 beqs 4c9e8 <== NEVER TAKEN return 0; switch ( how ) { 4c9a4: 7201 moveq #1,%d1 4c9a6: b280 cmpl %d0,%d1 4c9a8: 6770 beqs 4ca1a 4c9aa: 123c 0002 moveb #2,%d1 4c9ae: b280 cmpl %d0,%d1 4c9b0: 6744 beqs 4c9f6 4c9b2: 4a80 tstl %d0 4c9b4: 664a bnes 4ca00 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 4c9b6: 2151 00cc movel %a1@,%a0@(204) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 4c9ba: 2039 0006 157a movel 6157a <_POSIX_signals_Pending>,%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4c9c0: 2228 00cc movel %a0@(204),%d1 4c9c4: 4681 notl %d1 (api->signals_pending | _POSIX_signals_Pending) ) { 4c9c6: 80a8 00d0 orl %a0@(208),%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4c9ca: c081 andl %d1,%d0 4c9cc: 671a beqs 4c9e8 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 4c9ce: 7201 moveq #1,%d1 4c9d0: 1741 0074 moveb %d1,%a3@(116) _Thread_Dispatch(); 4c9d4: 4eb9 0004 8e68 jsr 48e68 <_Thread_Dispatch> } return 0; } 4c9da: 246e fff8 moveal %fp@(-8),%a2 /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 4c9de: 4280 clrl %d0 } return 0; } 4c9e0: 266e fffc moveal %fp@(-4),%a3 4c9e4: 4e5e unlk %fp 4c9e6: 4e75 rts 4c9e8: 246e fff8 moveal %fp@(-8),%a2 /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 4c9ec: 4280 clrl %d0 } return 0; } 4c9ee: 266e fffc moveal %fp@(-4),%a3 4c9f2: 4e5e unlk %fp 4c9f4: 4e75 rts switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 4c9f6: 2011 movel %a1@,%d0 4c9f8: 4680 notl %d0 4c9fa: c1a8 00cc andl %d0,%a0@(204) break; 4c9fe: 60ba bras 4c9ba case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4ca00: 4eb9 0004 fc54 jsr 4fc54 <__errno> _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 4ca06: 246e fff8 moveal %fp@(-8),%a2 break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4ca0a: 2040 moveal %d0,%a0 4ca0c: 7216 moveq #22,%d1 4ca0e: 70ff moveq #-1,%d0 _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 4ca10: 266e fffc moveal %fp@(-4),%a3 4ca14: 4e5e unlk %fp break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4ca16: 2081 movel %d1,%a0@ _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 4ca18: 4e75 rts if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 4ca1a: 2011 movel %a1@,%d0 4ca1c: 81a8 00cc orl %d0,%a0@(204) break; 4ca20: 6098 bras 4c9ba sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 4ca22: 4a8a tstl %a2 4ca24: 67da beqs 4ca00 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4ca26: 2679 0006 0f92 moveal 60f92 <_Thread_Executing>,%a3 4ca2c: 206b 010e moveal %a3@(270),%a0 if ( oset ) *oset = api->signals_blocked; 4ca30: 24a8 00cc movel %a0@(204),%a2@ if ( !set ) 4ca34: 4a89 tstl %a1 4ca36: 6600 ff6c bnew 4c9a4 4ca3a: 60ac bras 4c9e8 =============================================================================== 00045fe8 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 45fe8: 4e56 fffc linkw %fp,#-4 45fec: 206e 0008 moveal %fp@(8),%a0 45ff0: 2f02 movel %d2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 45ff2: 4a88 tstl %a0 45ff4: 6748 beqs 4603e <== NEVER TAKEN 45ff6: 486e fffc pea %fp@(-4) 45ffa: 2f10 movel %a0@,%sp@- 45ffc: 4879 0006 0328 pea 60328 <_POSIX_Spinlock_Information> 46002: 4eb9 0004 80d4 jsr 480d4 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 46008: 4fef 000c lea %sp@(12),%sp 4600c: 4aae fffc tstl %fp@(-4) 46010: 662c bnes 4603e case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 46012: 42a7 clrl %sp@- 46014: 2040 moveal %d0,%a0 46016: 42a7 clrl %sp@- 46018: 4868 0010 pea %a0@(16) 4601c: 4eb9 0004 76a4 jsr 476a4 <_CORE_spinlock_Wait> 46022: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 46024: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 4602a: 2f02 movel %d2,%sp@- 4602c: 4eb9 0004 5fd0 jsr 45fd0 <_POSIX_Spinlock_Translate_core_spinlock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 46032: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 46036: 4fef 0010 lea %sp@(16),%sp case OBJECTS_ERROR: break; } return EINVAL; } 4603a: 4e5e unlk %fp 4603c: 4e75 rts 4603e: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 46042: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46044: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046454 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 46454: 4e56 0000 linkw %fp,#0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 46458: 2039 0006 022e movel 6022e <_ISR_Nest_level>,%d0 4645e: 663c bnes 4649c <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46460: 2079 0006 024e moveal 6024e <_Thread_Executing>,%a0 46466: 2039 0006 0194 movel 60194 <_Thread_Dispatch_disable_level>,%d0 4646c: 5280 addql #1,%d0 4646e: 2068 010e moveal %a0@(270),%a0 46472: 23c0 0006 0194 movel %d0,60194 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 46478: 4aa8 00d4 tstl %a0@(212) 4647c: 6622 bnes 464a0 <== NEVER TAKEN thread_support->cancelation_requested ) 4647e: 4aa8 00dc tstl %a0@(220) 46482: 671c beqs 464a0 cancel = true; _Thread_Enable_dispatch(); 46484: 4eb9 0004 8b28 jsr 48b28 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 4648a: 4878 ffff pea ffffffff 4648e: 2f39 0006 024e movel 6024e <_Thread_Executing>,%sp@- 46494: 4eb9 0004 c1ec jsr 4c1ec <_POSIX_Thread_Exit> 4649a: 508f addql #8,%sp <== NOT EXECUTED } 4649c: 4e5e unlk %fp <== NOT EXECUTED 4649e: 4e75 rts <== NOT EXECUTED 464a0: 4e5e unlk %fp _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 464a2: 4ef9 0004 8b28 jmp 48b28 <_Thread_Enable_dispatch> =============================================================================== 000429a4 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 429a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 429a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 429aa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 429ae: 1012 moveb %a2@,%d0 <== NOT EXECUTED 429b0: 6714 beqs 429c6 <== NOT EXECUTED BSP_output_char(*p); 429b2: 49c0 extbl %d0 <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 429b4: 528a addql #1,%a2 <== NOT EXECUTED BSP_output_char(*p); 429b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 429b8: 2079 0005 de20 moveal 5de20 ,%a0 <== NOT EXECUTED 429be: 4e90 jsr %a0@ <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 429c0: 588f addql #4,%sp <== NOT EXECUTED 429c2: 1012 moveb %a2@,%d0 <== NOT EXECUTED 429c4: 66ec bnes 429b2 <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 429c6: 2279 0005 de20 moveal 5de20 ,%a1 <== NOT EXECUTED 429cc: 700a moveq #10,%d0 <== NOT EXECUTED } 429ce: 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'); 429d2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 429d6: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 429d8: 4ed1 jmp %a1@ <== NOT EXECUTED ... =============================================================================== 0005b698 : ssize_t read( int fd, void *buffer, size_t count ) { 5b698: 4e56 fff4 linkw %fp,#-12 5b69c: 202e 0008 movel %fp@(8),%d0 5b6a0: 222e 000c movel %fp@(12),%d1 5b6a4: 206e 0010 moveal %fp@(16),%a0 5b6a8: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5b6ac: b0b9 0005 d714 cmpl 5d714 ,%d0 5b6b2: 6468 bccs 5b71c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5b6b4: 2479 0005 ee18 moveal 5ee18 ,%a2 5b6ba: ed88 lsll #6,%d0 5b6bc: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5b6be: 202a 0014 movel %a2@(20),%d0 5b6c2: 0800 0008 btst #8,%d0 5b6c6: 6754 beqs 5b71c rtems_libio_check_buffer( buffer ); 5b6c8: 4a81 tstl %d1 5b6ca: 6768 beqs 5b734 <== NEVER TAKEN rtems_libio_check_count( count ); 5b6cc: 4a88 tstl %a0 5b6ce: 6740 beqs 5b710 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5b6d0: 0800 0001 btst #1,%d0 5b6d4: 675e beqs 5b734 <== NEVER TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) 5b6d6: 226a 003c moveal %a2@(60),%a1 5b6da: 2269 0008 moveal %a1@(8),%a1 5b6de: 4a89 tstl %a1 5b6e0: 676a beqs 5b74c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 5b6e2: 2f08 movel %a0,%sp@- 5b6e4: 2f01 movel %d1,%sp@- 5b6e6: 2f0a movel %a2,%sp@- 5b6e8: 4e91 jsr %a1@ if ( rc > 0 ) 5b6ea: 4fef 000c lea %sp@(12),%sp 5b6ee: 4a80 tstl %d0 5b6f0: 6f14 bles 5b706 iop->offset += rc; 5b6f2: 2400 movel %d0,%d2 5b6f4: 5bc1 smi %d1 5b6f6: 49c1 extbl %d1 5b6f8: d5aa 0010 addl %d2,%a2@(16) 5b6fc: 262a 000c movel %a2@(12),%d3 5b700: d781 addxl %d1,%d3 5b702: 2543 000c movel %d3,%a2@(12) return rc; } 5b706: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b70c: 4e5e unlk %fp 5b70e: 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 ); 5b710: 4280 clrl %d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b712: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5b718: 4e5e unlk %fp <== NOT EXECUTED 5b71a: 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 ); 5b71c: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 5b722: 7409 moveq #9,%d2 5b724: 2040 moveal %d0,%a0 5b726: 70ff moveq #-1,%d0 5b728: 2082 movel %d2,%a0@ if ( rc > 0 ) iop->offset += rc; return rc; } 5b72a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b730: 4e5e unlk %fp 5b732: 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 ); 5b734: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 5b73a: 7216 moveq #22,%d1 <== NOT EXECUTED 5b73c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b73e: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b740: 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 ); 5b746: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b748: 4e5e unlk %fp <== NOT EXECUTED 5b74a: 4e75 rts <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b74c: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 5b752: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b754: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b756: 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 ); 5b75c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b762: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046334 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 46334: 4e56 ffe0 linkw %fp,#-32 46338: 48d7 001c moveml %d2-%d4,%sp@ 4633c: 262e 0008 movel %fp@(8),%d3 46340: 282e 000c movel %fp@(12),%d4 rtems_filesystem_location_info_t loc; int result; if (!buf) 46344: 6700 0092 beqw 463d8 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 46348: 2f03 movel %d3,%sp@- 4634a: 240e movel %fp,%d2 4634c: 0682 ffff ffec addil #-20,%d2 46352: 4eb9 0005 4e94 jsr 54e94 46358: 4297 clrl %sp@ 4635a: 2f02 movel %d2,%sp@- 4635c: 42a7 clrl %sp@- 4635e: 2f00 movel %d0,%sp@- 46360: 2f03 movel %d3,%sp@- 46362: 4eb9 0004 50cc jsr 450cc 0, &loc, false ); if ( result != 0 ) 46368: 4fef 0014 lea %sp@(20),%sp 4636c: 4a80 tstl %d0 4636e: 665a bnes 463ca <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ 46370: 226e fff8 moveal %fp@(-8),%a1 46374: 2069 0010 moveal %a1@(16),%a0 46378: 4a88 tstl %a0 4637a: 6700 00a6 beqw 46422 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 4637e: 2f02 movel %d2,%sp@- 46380: 4e90 jsr %a0@ 46382: 588f addql #4,%sp 46384: 7204 moveq #4,%d1 46386: b280 cmpl %d0,%d1 46388: 6668 bnes 463f2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 4638a: 226e fff8 moveal %fp@(-8),%a1 4638e: 2069 003c moveal %a1@(60),%a0 46392: 4a88 tstl %a0 46394: 6700 008c beqw 46422 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 46398: 2f2e 0010 movel %fp@(16),%sp@- 4639c: 2f04 movel %d4,%sp@- 4639e: 2f02 movel %d2,%sp@- 463a0: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 463a2: 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 ); 463a6: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 463a8: 4fef 000c lea %sp@(12),%sp 463ac: 4a88 tstl %a0 463ae: 670e beqs 463be <== NEVER TAKEN 463b0: 2068 001c moveal %a0@(28),%a0 463b4: 4a88 tstl %a0 463b6: 6706 beqs 463be <== NEVER TAKEN 463b8: 2f02 movel %d2,%sp@- 463ba: 4e90 jsr %a0@ 463bc: 588f addql #4,%sp return result; } 463be: 2003 movel %d3,%d0 463c0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 463c6: 4e5e unlk %fp 463c8: 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 ) 463ca: 76ff moveq #-1,%d3 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 463cc: 2003 movel %d3,%d0 <== NOT EXECUTED 463ce: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 463d4: 4e5e unlk %fp <== NOT EXECUTED 463d6: 4e75 rts <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 463d8: 4eb9 0005 3480 jsr 53480 <__errno> <== NOT EXECUTED 463de: 76ff moveq #-1,%d3 <== NOT EXECUTED 463e0: 720e moveq #14,%d1 <== NOT EXECUTED 463e2: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 463e4: 2003 movel %d3,%d0 <== NOT EXECUTED 463e6: 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 ); 463ec: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 463ee: 4e5e unlk %fp <== NOT EXECUTED 463f0: 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 ); 463f2: 206e fff8 moveal %fp@(-8),%a0 463f6: 4a88 tstl %a0 463f8: 670e beqs 46408 <== NEVER TAKEN 463fa: 2068 001c moveal %a0@(28),%a0 463fe: 4a88 tstl %a0 46400: 6706 beqs 46408 <== NEVER TAKEN 46402: 2f02 movel %d2,%sp@- 46404: 4e90 jsr %a0@ 46406: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 46408: 4eb9 0005 3480 jsr 53480 <__errno> 4640e: 76ff moveq #-1,%d3 46410: 2040 moveal %d0,%a0 46412: 7016 moveq #22,%d0 46414: 2080 movel %d0,%a0@ result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 46416: 2003 movel %d3,%d0 46418: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 4641e: 4e5e unlk %fp 46420: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 46422: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 46426: 4a88 tstl %a0 <== NOT EXECUTED 46428: 6706 beqs 46430 <== NOT EXECUTED 4642a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4642c: 4e90 jsr %a0@ <== NOT EXECUTED 4642e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 46430: 4eb9 0005 3480 jsr 53480 <__errno> <== NOT EXECUTED 46436: 76ff moveq #-1,%d3 <== NOT EXECUTED 46438: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 4643a: 2003 movel %d3,%d0 <== NOT EXECUTED 4643c: 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 ); 46442: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 46448: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004495c : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 4495c: 4e56 ffe0 linkw %fp,#-32 44960: 202e 0008 movel %fp@(8),%d0 44964: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 44968: 246e 000c moveal %fp@(12),%a2 4496c: 242e 0010 movel %fp@(16),%d2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 44970: b0b9 0006 13b4 cmpl 613b4 ,%d0 44976: 6400 00f0 bccw 44a68 iop = rtems_libio_iop( fd ); 4497a: 2679 0006 328c moveal 6328c ,%a3 44980: ed88 lsll #6,%d0 44982: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 44984: 202b 0014 movel %a3@(20),%d0 44988: 0800 0008 btst #8,%d0 4498c: 6700 00da beqw 44a68 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 44990: 0800 0001 btst #1,%d0 44994: 6700 009c beqw 44a32 /* * Argument validation on IO vector */ if ( !iov ) 44998: 4a8a tstl %a2 4499a: 6700 0096 beqw 44a32 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 4499e: 4a82 tstl %d2 449a0: 6f00 0090 blew 44a32 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 449a4: 0c82 0000 0400 cmpil #1024,%d2 449aa: 6e00 0086 bgtw 44a32 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 449ae: 206b 003c moveal %a3@(60),%a0 449b2: 2868 0008 moveal %a0@(8),%a4 449b6: 4a8c tstl %a4 449b8: 6700 00c8 beqw 44a82 rtems_set_errno_and_return_minus_one( ENOTSUP ); 449bc: 204a moveal %a2,%a0 449be: 93c9 subal %a1,%a1 449c0: 4281 clrl %d1 449c2: 7a01 moveq #1,%d5 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 449c4: 4a90 tstl %a0@ 449c6: 676a beqs 44a32 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 449c8: 2828 0004 movel %a0@(4),%d4 449cc: 2601 movel %d1,%d3 449ce: d684 addl %d4,%d3 if ( total < old ) 449d0: b283 cmpl %d3,%d1 449d2: 6e5e bgts 44a32 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 449d4: 4a84 tstl %d4 449d6: 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++ ) { 449d8: 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 ) 449da: 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++ ) { 449dc: 5289 addql #1,%a1 449de: 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 ) 449e0: c684 andl %d4,%d3 449e2: 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++ ) { 449e4: b3c2 cmpal %d2,%a1 449e6: 6ddc blts 449c4 /* * 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 ) { 449e8: 4a03 tstb %d3 449ea: 6660 bnes 44a4c 449ec: 588a addql #4,%a2 449ee: 4283 clrl %d3 449f0: 4284 clrl %d4 /* * 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 ); 449f2: 2f12 movel %a2@,%sp@- } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 449f4: 5283 addql #1,%d3 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 449f6: 2f2a fffc movel %a2@(-4),%sp@- 449fa: 2f0b movel %a3,%sp@- 449fc: 4e94 jsr %a4@ if ( bytes < 0 ) 449fe: 4fef 000c lea %sp@(12),%sp 44a02: 4a80 tstl %d0 44a04: 6d54 blts 44a5a <== NEVER TAKEN return -1; if ( bytes > 0 ) { 44a06: 6716 beqs 44a1e <== NEVER TAKEN iop->offset += bytes; total += bytes; 44a08: d880 addl %d0,%d4 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 44a0a: 2c00 movel %d0,%d6 44a0c: 5bc5 smi %d5 44a0e: 49c5 extbl %d5 44a10: ddab 0010 addl %d6,%a3@(16) 44a14: 222b 000c movel %a3@(12),%d1 44a18: d385 addxl %d5,%d1 44a1a: 2741 000c movel %d1,%a3@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 44a1e: b092 cmpl %a2@,%d0 44a20: 661e bnes 44a40 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a22: 508a addql #8,%a2 44a24: b682 cmpl %d2,%d3 44a26: 6c18 bges 44a40 44a28: 206b 003c moveal %a3@(60),%a0 44a2c: 2868 0008 moveal %a0@(8),%a4 44a30: 60c0 bras 449f2 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 44a32: 4eb9 0005 115c jsr 5115c <__errno> 44a38: 78ff moveq #-1,%d4 44a3a: 2040 moveal %d0,%a0 44a3c: 7016 moveq #22,%d0 44a3e: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 44a40: 2004 movel %d4,%d0 44a42: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a48: 4e5e unlk %fp 44a4a: 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 ) { 44a4c: 4284 clrl %d4 if (bytes != iov[ v ].iov_len) break; } return total; } 44a4e: 2004 movel %d4,%d0 44a50: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a56: 4e5e unlk %fp 44a58: 4e75 rts } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a5a: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a5c: 2004 movel %d4,%d0 <== NOT EXECUTED 44a5e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44a64: 4e5e unlk %fp <== NOT EXECUTED 44a66: 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 ); 44a68: 4eb9 0005 115c jsr 5115c <__errno> <== NOT EXECUTED 44a6e: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a70: 7209 moveq #9,%d1 <== NOT EXECUTED 44a72: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a74: 2004 movel %d4,%d0 <== NOT EXECUTED 44a76: 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 ); 44a7c: 2081 movel %d1,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a7e: 4e5e unlk %fp <== NOT EXECUTED 44a80: 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 ); 44a82: 4eb9 0005 115c jsr 5115c <__errno> <== NOT EXECUTED 44a88: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a8a: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a8c: 2004 movel %d4,%d0 <== NOT EXECUTED 44a8e: 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 ); 44a94: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a9a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0005b7e4 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5b7e4: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 5b7e6: 4e56 fff0 linkw %fp,#-16 5b7ea: 52b9 0005 ee34 addql #1,5ee34 5b7f0: 48d7 001c moveml %d2-%d4,%sp@ 5b7f4: 242e 0008 movel %fp@(8),%d2 5b7f8: 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())) { 5b7fc: b0b9 0005 f100 cmpl 5f100 <_System_state_Current>,%d0 5b802: 677a beqs 5b87e <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 5b804: 4a82 tstl %d2 5b806: 6700 00de beqw 5b8e6 return malloc( size ); if ( !size ) { 5b80a: 4a83 tstl %d3 5b80c: 673e beqs 5b84c <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 5b80e: 486e fffc pea %fp@(-4) 5b812: 2f02 movel %d2,%sp@- 5b814: 2f39 0005 d720 movel 5d720 ,%sp@- 5b81a: 4eb9 0005 b9cc jsr 5b9cc <_Protected_heap_Get_block_size> 5b820: 4fef 000c lea %sp@(12),%sp 5b824: 4a00 tstb %d0 5b826: 673c beqs 5b864 #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 ) ) { 5b828: 2f03 movel %d3,%sp@- 5b82a: 2f02 movel %d2,%sp@- 5b82c: 2f39 0005 d720 movel 5d720 ,%sp@- 5b832: 4eb9 0005 ba08 jsr 5ba08 <_Protected_heap_Resize_block> 5b838: 4fef 000c lea %sp@(12),%sp 5b83c: 4a00 tstb %d0 5b83e: 6754 beqs 5b894 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5b840: 2002 movel %d2,%d0 5b842: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b848: 4e5e unlk %fp 5b84a: 4e75 rts */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 5b84c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b84e: 4282 clrl %d2 <== NOT EXECUTED 5b850: 4eb9 0004 a6f4 jsr 4a6f4 <== NOT EXECUTED return (void *) 0; 5b856: 588f addql #4,%sp <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5b858: 2002 movel %d2,%d0 <== NOT EXECUTED 5b85a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5b860: 4e5e unlk %fp <== NOT EXECUTED 5b862: 4e75 rts <== NOT EXECUTED free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 5b864: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 5b86a: 4282 clrl %d2 5b86c: 2040 moveal %d0,%a0 5b86e: 7016 moveq #22,%d0 5b870: 2080 movel %d0,%a0@ memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5b872: 2002 movel %d2,%d0 5b874: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b87a: 4e5e unlk %fp 5b87c: 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) 5b87e: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 5b884: 6752 beqs 5b8d8 <== ALWAYS TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5b886: 4282 clrl %d2 } 5b888: 2002 movel %d2,%d0 5b88a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b890: 4e5e unlk %fp 5b892: 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 ); 5b894: 2f03 movel %d3,%sp@- 5b896: 4eb9 0004 ac8c jsr 4ac8c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5b89c: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 5b89e: 53b9 0005 ee28 subql #1,5ee28 * 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 ); 5b8a4: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5b8a6: 67de beqs 5b886 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 5b8a8: 202e fffc movel %fp@(-4),%d0 5b8ac: b083 cmpl %d3,%d0 5b8ae: 6402 bccs 5b8b2 <== NEVER TAKEN 5b8b0: 2600 movel %d0,%d3 5b8b2: 2f03 movel %d3,%sp@- 5b8b4: 2f02 movel %d2,%sp@- 5b8b6: 2f04 movel %d4,%sp@- 5b8b8: 4eb9 0004 f414 jsr 4f414 free( ptr ); 5b8be: 2f02 movel %d2,%sp@- 5b8c0: 2404 movel %d4,%d2 5b8c2: 4eb9 0004 a6f4 jsr 4a6f4 return new_area; 5b8c8: 4fef 0010 lea %sp@(16),%sp } 5b8cc: 2002 movel %d2,%d0 5b8ce: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b8d4: 4e5e unlk %fp 5b8d6: 4e75 rts if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 5b8d8: 2039 0005 f012 movel 5f012 <_ISR_Nest_level>,%d0 5b8de: 6700 ff24 beqw 5b804 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5b8e2: 4282 clrl %d2 <== NOT EXECUTED 5b8e4: 60a2 bras 5b888 <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 5b8e6: 2f03 movel %d3,%sp@- 5b8e8: 4eb9 0004 ac8c jsr 4ac8c 5b8ee: 588f addql #4,%sp 5b8f0: 2400 movel %d0,%d2 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5b8f2: 2002 movel %d2,%d0 5b8f4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b8fa: 4e5e unlk %fp ... =============================================================================== 00047078 : #include int rmdir( const char *pathname ) { 47078: 4e56 ffbc linkw %fp,#-68 4707c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 47080: 282e 0008 movel %fp@(8),%d4 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 47084: 2f04 movel %d4,%sp@- 47086: 4eb9 0004 5660 jsr 45660 if ( parentpathlen == 0 ) 4708c: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 4708e: 2400 movel %d0,%d2 if ( parentpathlen == 0 ) 47090: 6600 01ce bnew 47260 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 47094: 2044 moveal %d4,%a0 47096: 762f moveq #47,%d3 47098: 1210 moveb %a0@,%d1 4709a: 1001 moveb %d1,%d0 4709c: 49c0 extbl %d0 4709e: b680 cmpl %d0,%d3 470a0: 670e beqs 470b0 <== ALWAYS TAKEN 470a2: 163c 005c moveb #92,%d3 <== NOT EXECUTED 470a6: b680 cmpl %d0,%d3 <== NOT EXECUTED 470a8: 6706 beqs 470b0 <== NOT EXECUTED 470aa: 4a01 tstb %d1 <== NOT EXECUTED 470ac: 6600 00fc bnew 471aa <== NOT EXECUTED 470b0: 2079 0006 5494 moveal 65494 ,%a0 470b6: 45ee ffec lea %fp@(-20),%a2 470ba: 49ee fff0 lea %fp@(-16),%a4 470be: 200e movel %fp,%d0 470c0: 0680 ffff fff4 addil #-12,%d0 470c6: 2640 moveal %d0,%a3 470c8: 4bee fff8 lea %fp@(-8),%a5 470cc: 224e moveal %fp,%a1 470ce: 24a8 0018 movel %a0@(24),%a2@ 470d2: 28a8 001c movel %a0@(28),%a4@ 470d6: 26a8 0020 movel %a0@(32),%a3@ 470da: 2aa8 0024 movel %a0@(36),%a5@ 470de: 2328 0028 movel %a0@(40),%a1@- 470e2: 4203 clrb %d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 470e4: 2040 moveal %d0,%a0 name = pathname + parentpathlen; 470e6: 2644 moveal %d4,%a3 470e8: d7c2 addal %d2,%a3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 470ea: 240e movel %fp,%d2 470ec: 0682 ffff ffd8 addil #-40,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 470f2: 2d50 ffe0 movel %a0@,%fp@(-32) 470f6: 2d51 ffe8 movel %a1@,%fp@(-24) 470fa: 2d54 ffdc movel %a4@,%fp@(-36) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 470fe: 49f9 0005 6bac lea 56bac ,%a4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 47104: 2d55 ffe4 movel %a5@,%fp@(-28) 47108: 2d52 ffd8 movel %a2@,%fp@(-40) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4710c: 2f0b movel %a3,%sp@- 4710e: 4e94 jsr %a4@ 47110: 2e80 movel %d0,%sp@ 47112: 2f0b movel %a3,%sp@- 47114: 4eb9 0004 5618 jsr 45618 4711a: d7c0 addal %d0,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4711c: 2f0b movel %a3,%sp@- 4711e: 4e94 jsr %a4@ 47120: 4297 clrl %sp@ 47122: 2f02 movel %d2,%sp@- 47124: 42a7 clrl %sp@- 47126: 2f00 movel %d0,%sp@- 47128: 2f0b movel %a3,%sp@- 4712a: 4eb9 0004 56d2 jsr 456d2 0, &loc, false ); if ( result != 0 ) { 47130: 4fef 001c lea %sp@(28),%sp 47134: 4a80 tstl %d0 47136: 6600 00ee bnew 47226 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 4713a: 226e ffe4 moveal %fp@(-28),%a1 4713e: 2069 0010 moveal %a1@(16),%a0 47142: 4a88 tstl %a0 47144: 6700 01a0 beqw 472e6 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 ){ 47148: 2f02 movel %d2,%sp@- 4714a: 4e90 jsr %a0@ 4714c: 588f addql #4,%sp 4714e: 7201 moveq #1,%d1 47150: b280 cmpl %d0,%d1 47152: 6600 0086 bnew 471da /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 47156: 206e ffe0 moveal %fp@(-32),%a0 4715a: 2068 0034 moveal %a0@(52),%a0 4715e: 4a88 tstl %a0 47160: 6700 0136 beqw 47298 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 47164: 2f02 movel %d2,%sp@- 47166: 2f0a movel %a2,%sp@- 47168: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4716a: 206e ffe4 moveal %fp@(-28),%a0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 4716e: 2640 moveal %d0,%a3 rtems_filesystem_freenode( &loc ); 47170: 508f addql #8,%sp 47172: 4a88 tstl %a0 47174: 670e beqs 47184 <== NEVER TAKEN 47176: 2068 001c moveal %a0@(28),%a0 4717a: 4a88 tstl %a0 4717c: 6706 beqs 47184 <== NEVER TAKEN 4717e: 2f02 movel %d2,%sp@- 47180: 4e90 jsr %a0@ 47182: 588f addql #4,%sp if ( free_parentloc ) 47184: 4a03 tstb %d3 47186: 6716 beqs 4719e rtems_filesystem_freenode( &parentloc ); 47188: 206e fff8 moveal %fp@(-8),%a0 4718c: 4a88 tstl %a0 4718e: 670e beqs 4719e <== NEVER TAKEN 47190: 2068 001c moveal %a0@(28),%a0 47194: 4a88 tstl %a0 47196: 6706 beqs 4719e <== NEVER TAKEN 47198: 2f0a movel %a2,%sp@- 4719a: 4e90 jsr %a0@ 4719c: 588f addql #4,%sp return result; } 4719e: 200b movel %a3,%d0 471a0: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 471a6: 4e5e unlk %fp 471a8: 4e75 rts */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 471aa: 2079 0006 5494 moveal 65494 ,%a0 <== NOT EXECUTED 471b0: 45ee ffec lea %fp@(-20),%a2 <== NOT EXECUTED 471b4: 5888 addql #4,%a0 <== NOT EXECUTED 471b6: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED 471ba: 200e movel %fp,%d0 <== NOT EXECUTED 471bc: 0680 ffff fff4 addil #-12,%d0 <== NOT EXECUTED 471c2: 2640 moveal %d0,%a3 <== NOT EXECUTED 471c4: 4bee fff8 lea %fp@(-8),%a5 <== NOT EXECUTED 471c8: 224e moveal %fp,%a1 <== NOT EXECUTED 471ca: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 471cc: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 471ce: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 471d0: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 471d2: 2310 movel %a0@,%a1@- <== NOT EXECUTED 471d4: 4203 clrb %d3 <== NOT EXECUTED 471d6: 6000 ff0c braw 470e4 <== 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 ); 471da: 206e ffe4 moveal %fp@(-28),%a0 471de: 4a88 tstl %a0 471e0: 670e beqs 471f0 <== NEVER TAKEN 471e2: 2068 001c moveal %a0@(28),%a0 471e6: 4a88 tstl %a0 471e8: 6706 beqs 471f0 <== NEVER TAKEN 471ea: 2f02 movel %d2,%sp@- 471ec: 4e90 jsr %a0@ 471ee: 588f addql #4,%sp if ( free_parentloc ) 471f0: 4a03 tstb %d3 471f2: 6716 beqs 4720a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 471f4: 206e fff8 moveal %fp@(-8),%a0 471f8: 4a88 tstl %a0 471fa: 670e beqs 4720a <== NEVER TAKEN 471fc: 2068 001c moveal %a0@(28),%a0 47200: 4a88 tstl %a0 47202: 6706 beqs 4720a <== NEVER TAKEN 47204: 2f0a movel %a2,%sp@- 47206: 4e90 jsr %a0@ 47208: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 4720a: 4eb9 0005 3b44 jsr 53b44 <__errno> 47210: 367c ffff moveaw #-1,%a3 47214: 2040 moveal %d0,%a0 47216: 7014 moveq #20,%d0 47218: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4721a: 200b movel %a3,%d0 4721c: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 47222: 4e5e unlk %fp 47224: 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 ) 47226: 4a03 tstb %d3 47228: 6610 bnes 4723a <== NEVER TAKEN result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4722a: 367c ffff moveaw #-1,%a3 return result; } 4722e: 200b movel %a3,%d0 47230: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 47236: 4e5e unlk %fp 47238: 4e75 rts result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4723a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4723e: 4a88 tstl %a0 <== NOT EXECUTED 47240: 67e8 beqs 4722a <== NOT EXECUTED 47242: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 47246: 67e2 beqs 4722a <== NOT EXECUTED 47248: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4724a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4724c: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 47250: 4e90 jsr %a0@ <== NOT EXECUTED 47252: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 47254: 200b movel %a3,%d0 <== NOT EXECUTED 47256: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4725c: 4e5e unlk %fp <== NOT EXECUTED 4725e: 4e75 rts <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 47260: 42a7 clrl %sp@- 47262: 45ee ffec lea %fp@(-20),%a2 47266: 2f0a movel %a2,%sp@- 47268: 4878 0002 pea 2 4726c: 2f00 movel %d0,%sp@- 4726e: 2f04 movel %d4,%sp@- 47270: 4eb9 0004 57dc jsr 457dc RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 47276: 4fef 0014 lea %sp@(20),%sp 4727a: 4a80 tstl %d0 4727c: 66ac bnes 4722a <== NEVER TAKEN 4727e: 200e movel %fp,%d0 47280: 49ee fff0 lea %fp@(-16),%a4 47284: 0680 ffff fff4 addil #-12,%d0 4728a: 4bee fff8 lea %fp@(-8),%a5 4728e: 43ee fffc lea %fp@(-4),%a1 47292: 7601 moveq #1,%d3 47294: 6000 fe4e braw 470e4 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 47298: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 4729c: 4a88 tstl %a0 <== NOT EXECUTED 4729e: 670e beqs 472ae <== NOT EXECUTED 472a0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 472a4: 4a88 tstl %a0 <== NOT EXECUTED 472a6: 6706 beqs 472ae <== NOT EXECUTED 472a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 472aa: 4e90 jsr %a0@ <== NOT EXECUTED 472ac: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 472ae: 4a03 tstb %d3 <== NOT EXECUTED 472b0: 6716 beqs 472c8 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 472b2: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 472b6: 4a88 tstl %a0 <== NOT EXECUTED 472b8: 670e beqs 472c8 <== NOT EXECUTED 472ba: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 472be: 4a88 tstl %a0 <== NOT EXECUTED 472c0: 6706 beqs 472c8 <== NOT EXECUTED 472c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 472c4: 4e90 jsr %a0@ <== NOT EXECUTED 472c6: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 472c8: 4eb9 0005 3b44 jsr 53b44 <__errno> <== NOT EXECUTED 472ce: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 472d2: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 472d4: 200b movel %a3,%d0 <== NOT EXECUTED 472d6: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== 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 ); 472dc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 472e2: 4e5e unlk %fp <== NOT EXECUTED 472e4: 4e75 rts <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 472e6: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 472ea: 4a88 tstl %a0 <== NOT EXECUTED 472ec: 67c0 beqs 472ae <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 472ee: 2f02 movel %d2,%sp@- <== NOT EXECUTED 472f0: 4e90 jsr %a0@ <== NOT EXECUTED 472f2: 588f addql #4,%sp <== NOT EXECUTED 472f4: 60b8 bras 472ae <== NOT EXECUTED ... =============================================================================== 0004d4bc : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4d4bc: 4e56 ffe8 linkw %fp,#-24 4d4c0: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4d4c4: 2c2e 0008 movel %fp@(8),%d6 4d4c8: 4283 clrl %d3 4d4ca: 4285 clrl %d5 4d4cc: 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); 4d4ce: 45f9 0004 d508 lea 4d508 ,%a2 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4d4d4: 282e 000c movel %fp@(12),%d4 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) 4d4d8: 2002 movel %d2,%d0 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4d4da: 5283 addql #1,%d3 if (b & remote_value) 4d4dc: c084 andl %d4,%d0 4d4de: 6614 bnes 4d4f4 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4d4e0: 7020 moveq #32,%d0 4d4e2: d482 addl %d2,%d2 4d4e4: b083 cmpl %d3,%d0 4d4e6: 66f0 bnes 4d4d8 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 4d4e8: 2005 movel %d5,%d0 4d4ea: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4d4f0: 4e5e unlk %fp 4d4f2: 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); 4d4f4: 2f02 movel %d2,%sp@- ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4d4f6: d482 addl %d2,%d2 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4d4f8: 2f06 movel %d6,%sp@- 4d4fa: 4e92 jsr %a2@ 4d4fc: 508f addql #8,%sp 4d4fe: 8a80 orl %d0,%d5 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4d500: 7020 moveq #32,%d0 4d502: b083 cmpl %d3,%d0 4d504: 66d2 bnes 4d4d8 <== ALWAYS TAKEN 4d506: 60e0 bras 4d4e8 <== NOT EXECUTED =============================================================================== 0004d52c : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4d52c: 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; } 4d530: 203c 0005 d8b4 movel #383156,%d0 <== NOT EXECUTED 4d536: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004a568 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4a568: 4e56 0000 linkw %fp,#0 4a56c: 2f02 movel %d2,%sp@- 4a56e: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4a572: 2f02 movel %d2,%sp@- 4a574: 2f2e 0008 movel %fp@(8),%sp@- 4a578: 4eb9 0004 a5a0 jsr 4a5a0 if (nap) 4a57e: 508f addql #8,%sp 4a580: 4a80 tstl %d0 4a582: 670c beqs 4a590 <== NEVER TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } 4a584: 2040 moveal %d0,%a0 4a586: 242e fffc movel %fp@(-4),%d2 4a58a: 4e5e unlk %fp 4a58c: 2010 movel %a0@,%d0 4a58e: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 4a590: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 4a594: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a598: 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); 4a59a: 4ef9 0004 d52c jmp 4d52c <== NOT EXECUTED =============================================================================== 0004a5a0 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4a5a0: 4e56 0000 linkw %fp,#0 4a5a4: 2f0a movel %a2,%sp@- 4a5a6: 246e 0008 moveal %fp@(8),%a2 4a5aa: 2f02 movel %d2,%sp@- 4a5ac: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4a5b0: 2012 movel %a2@,%d0 4a5b2: 6742 beqs 4a5f6 <== NEVER TAKEN 4a5b4: 4879 0005 c9b8 pea 5c9b8 4a5ba: 2f00 movel %d0,%sp@- 4a5bc: 4eb9 0004 fafc jsr 4fafc 4a5c2: 508f addql #8,%sp 4a5c4: 4a80 tstl %d0 4a5c6: 662a bnes 4a5f2 <== ALWAYS TAKEN default_ap = ap++; 4a5c8: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4a5cc: 4a90 tstl %a0@ <== NOT EXECUTED 4a5ce: 6714 beqs 4a5e4 <== NOT EXECUTED 4a5d0: 200a movel %a2,%d0 <== NOT EXECUTED 4a5d2: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->local_value == local_value) 4a5d4: b4aa 0004 cmpl %a2@(4),%d2 4a5d8: 670a beqs 4a5e4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4a5da: 45ea 000c lea %a2@(12),%a2 4a5de: 4a92 tstl %a2@ 4a5e0: 66f2 bnes 4a5d4 4a5e2: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 4a5e4: 200a movel %a2,%d0 4a5e6: 242e fff8 movel %fp@(-8),%d2 4a5ea: 246e fffc moveal %fp@(-4),%a2 4a5ee: 4e5e unlk %fp 4a5f0: 4e75 rts uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4a5f2: 4280 clrl %d0 4a5f4: 60de bras 4a5d4 4a5f6: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 4a5f8: 200a movel %a2,%d0 <== NOT EXECUTED 4a5fa: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4a5fe: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a602: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004d53c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4d53c: 4e56 0000 linkw %fp,#0 4d540: 2f0a movel %a2,%sp@- 4d542: 246e 0008 moveal %fp@(8),%a2 4d546: 2f02 movel %d2,%sp@- 4d548: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4d54c: 2012 movel %a2@,%d0 4d54e: 6742 beqs 4d592 <== NEVER TAKEN 4d550: 4879 0005 c9b8 pea 5c9b8 4d556: 2f00 movel %d0,%sp@- 4d558: 4eb9 0004 fafc jsr 4fafc 4d55e: 508f addql #8,%sp 4d560: 4a80 tstl %d0 4d562: 662a bnes 4d58e <== ALWAYS TAKEN default_ap = ap++; 4d564: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4d568: 4a90 tstl %a0@ <== NOT EXECUTED 4d56a: 6714 beqs 4d580 <== NOT EXECUTED 4d56c: 200a movel %a2,%d0 <== NOT EXECUTED 4d56e: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->remote_value == remote_value) 4d570: b4aa 0008 cmpl %a2@(8),%d2 4d574: 670a beqs 4d580 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4d576: 45ea 000c lea %a2@(12),%a2 4d57a: 4a92 tstl %a2@ 4d57c: 66f2 bnes 4d570 4d57e: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4d580: 200a movel %a2,%d0 4d582: 242e fff8 movel %fp@(-8),%d2 4d586: 246e fffc moveal %fp@(-4),%a2 4d58a: 4e5e unlk %fp 4d58c: 4e75 rts uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4d58e: 4280 clrl %d0 4d590: 60de bras 4d570 4d592: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 4d594: 200a movel %a2,%d0 <== NOT EXECUTED 4d596: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4d59a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4d59e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004e384 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4e384: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4e388: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4e38c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4e390: 4eb9 0004 a5a0 jsr 4a5a0 <== NOT EXECUTED if (nap) 4e396: 508f addql #8,%sp <== NOT EXECUTED 4e398: 4a80 tstl %d0 <== NOT EXECUTED 4e39a: 6706 beqs 4e3a2 <== NOT EXECUTED return nap->remote_value; 4e39c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e39e: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4e3a2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004d918 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4d918: 4e56 ffe8 linkw %fp,#-24 4d91c: 202e 0010 movel %fp@(16),%d0 4d920: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4d924: 242e 0008 movel %fp@(8),%d2 4d928: 262e 000c movel %fp@(12),%d3 4d92c: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4d930: 4a82 tstl %d2 4d932: 677a beqs 4d9ae return RTEMS_INVALID_NAME; if ( !id ) 4d934: 4a8a tstl %a2 4d936: 6700 00ce beqw 4da06 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4d93a: 0803 0004 btst #4,%d3 4d93e: 677a beqs 4d9ba the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4d940: 4a80 tstl %d0 4d942: 6700 00b4 beqw 4d9f8 4d946: 2239 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d1 4d94c: 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; 4d94e: 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; 4d952: 2d40 fffc movel %d0,%fp@(-4) 4d956: 23c1 0005 ef78 movel %d1,5ef78 <_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 ); 4d95c: 4879 0005 f80c pea 5f80c <_Barrier_Information> 4d962: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4d968: 588f addql #4,%sp 4d96a: 2640 moveal %d0,%a3 4d96c: 4a80 tstl %d0 4d96e: 6776 beqs 4d9e6 <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4d970: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4d974: 486e fff8 pea %fp@(-8) 4d978: 486b 0014 pea %a3@(20) 4d97c: 4eb9 0004 deac jsr 4deac <_CORE_barrier_Initialize> 4d982: 202b 0008 movel %a3@(8),%d0 4d986: 4281 clrl %d1 4d988: 2079 0005 f824 moveal 5f824 <_Barrier_Information+0x18>,%a0 4d98e: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4d990: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4d994: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4d998: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4d99a: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4d9a0: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4d9a2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d9a4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d9aa: 4e5e unlk %fp 4d9ac: 4e75 rts ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4d9ae: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4d9b0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d9b6: 4e5e unlk %fp 4d9b8: 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; 4d9ba: 7201 moveq #1,%d1 4d9bc: 2d41 fff8 movel %d1,%fp@(-8) 4d9c0: 2239 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d1 4d9c6: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4d9c8: 2d40 fffc movel %d0,%fp@(-4) 4d9cc: 23c1 0005 ef78 movel %d1,5ef78 <_Thread_Dispatch_disable_level> 4d9d2: 4879 0005 f80c pea 5f80c <_Barrier_Information> 4d9d8: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4d9de: 588f addql #4,%sp 4d9e0: 2640 moveal %d0,%a3 4d9e2: 4a80 tstl %d0 4d9e4: 668a bnes 4d970 _Thread_Enable_dispatch(); 4d9e6: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4d9ec: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4d9ee: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d9f4: 4e5e unlk %fp 4d9f6: 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 ) 4d9f8: 103c 000a moveb #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4d9fc: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4da02: 4e5e unlk %fp 4da04: 4e75 rts CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4da06: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4da08: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4da0e: 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 quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42762: 0804 0000 btst #0,%d4 42766: 6606 bnes 4276e 42768: 7a20 moveq #32,%d5 4276a: ba83 cmpl %d3,%d5 4276c: 67b0 beqs 4271e 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 ... =============================================================================== 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 *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 427e6: 4282 clrl %d2 } 427e8: 2002 movel %d2,%d0 427ea: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 427f0: 4e5e unlk %fp 427f2: 4e75 rts 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 05dc jsr 505dc 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 rhs++; for ( d=value ; *rhs ; ) 4281a: 4a00 tstb %d0 4281c: 672c beqs 4284a 4281e: 2242 moveal %d2,%a1 *d++ = *rhs++; 42820: 5288 addql #1,%a0 42822: 12c0 moveb %d0,%a1@+ return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42824: 1010 moveb %a0@,%d0 42826: 66f8 bnes 42820 *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 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 42846: 1010 moveb %a0@,%d0 42848: 60d0 bras 4281a for ( d=value ; *rhs ; ) 4284a: 2242 moveal %d2,%a1 4284c: 60da bras 42828 ... =============================================================================== 00046a5c : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 46a5c: 4e56 fff8 linkw %fp,#-8 46a60: 2f0a movel %a2,%sp@- 46a62: 246e 0008 moveal %fp@(8),%a2 46a66: 2f02 movel %d2,%sp@- struct timespec newtime; if ( !time_buffer ) 46a68: 4a8a tstl %a2 46a6a: 6772 beqs 46ade <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 46a6c: 2f0a movel %a2,%sp@- 46a6e: 4eb9 0004 6c3c jsr 46c3c <_TOD_Validate> 46a74: 588f addql #4,%sp 46a76: 4a00 tstb %d0 46a78: 660e bnes 46a88 _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46a7a: 242e fff0 movel %fp@(-16),%d2 struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 46a7e: 7014 moveq #20,%d0 _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46a80: 246e fff4 moveal %fp@(-12),%a2 46a84: 4e5e unlk %fp 46a86: 4e75 rts if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 46a88: 2f0a movel %a2,%sp@- 46a8a: 4eb9 0004 6b2c jsr 46b2c <_TOD_To_seconds> newtime.tv_nsec = time_buffer->ticks * 46a90: 242a 0018 movel %a2@(24),%d2 46a94: 41f9 0006 0020 lea 60020 ,%a0 46a9a: 4c10 2800 mulsl %a0@,%d2 if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 46a9e: 2d40 fff8 movel %d0,%fp@(-8) newtime.tv_nsec = time_buffer->ticks * 46aa2: 203c 0000 03e8 movel #1000,%d0 46aa8: 4c02 0800 mulsl %d2,%d0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46aac: 2239 0006 9598 movel 69598 <_Thread_Dispatch_disable_level>,%d1 46ab2: 5281 addql #1,%d1 46ab4: 2d40 fffc movel %d0,%fp@(-4) 46ab8: 23c1 0006 9598 movel %d1,69598 <_Thread_Dispatch_disable_level> rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 46abe: 486e fff8 pea %fp@(-8) 46ac2: 4eb9 0004 85c8 jsr 485c8 <_TOD_Set> _Thread_Enable_dispatch(); 46ac8: 4eb9 0004 9910 jsr 49910 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46ace: 242e fff0 movel %fp@(-16),%d2 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 46ad2: 508f addql #8,%sp newtime.tv_nsec = time_buffer->ticks * rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); 46ad4: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46ad6: 246e fff4 moveal %fp@(-12),%a2 46ada: 4e5e unlk %fp 46adc: 4e75 rts 46ade: 242e fff0 movel %fp@(-16),%d2 rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 46ae2: 7009 moveq #9,%d0 _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 46ae4: 246e fff4 moveal %fp@(-12),%a2 46ae8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000431b8 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 431b8: 4e56 ff9c linkw %fp,#-100 431bc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 431c0: 262e 0008 movel %fp@(8),%d3 431c4: 286e 000c moveal %fp@(12),%a4 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 431c8: 4a8c tstl %a4 431ca: 6700 0140 beqw 4330c * 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 ); 431ce: 486e fff0 pea %fp@(-16) } } } #endif (*print)( 431d2: 41f9 0006 9554 lea 69554 <_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 ); 431d8: 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 ); 431da: 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 ); 431dc: 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 ); 431e2: 0685 ffff ffe0 addil #-32,%d5 } } } #endif (*print)( 431e8: 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 ); 431ec: 4eb9 0004 84fc jsr 484fc <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 431f2: 486e ffe8 pea %fp@(-24) 431f6: 486e fff0 pea %fp@(-16) 431fa: 4879 0006 9a74 pea 69a74 43200: 4eb9 0004 a978 jsr 4a978 <_Timespec_Subtract> } } } #endif (*print)( 43206: 4879 0005 e6ac pea 5e6ac 4320c: 2f03 movel %d3,%sp@- 4320e: 4e94 jsr %a4@ /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( 43210: 4fef 0018 lea %sp@(24),%sp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 43214: 226e ffc4 moveal %fp@(-60),%a1 43218: 2051 moveal %a1@,%a0 4321a: 4a88 tstl %a0 4321c: 6700 00ba beqw 432d8 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 43220: 2668 0004 moveal %a0@(4),%a3 if ( information ) { 43224: 4a8b tstl %a3 43226: 6700 00b0 beqw 432d8 for ( i=1 ; i <= information->maximum ; i++ ) { 4322a: 4a6b 000e tstw %a3@(14) 4322e: 6700 00a8 beqw 432d8 43232: 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 ); 43234: 2c3c 0004 70ec movel #291052,%d6 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 4323a: 4bf9 0004 a890 lea 4a890 <_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 ]; 43240: 206b 0018 moveal %a3@(24),%a0 43244: 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++ ) { 43248: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 4324a: 4a8a tstl %a2 4324c: 677e beqs 432cc <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 4324e: 2f04 movel %d4,%sp@- 43250: 4878 000d pea d 43254: 2046 moveal %d6,%a0 43256: 2f2a 0008 movel %a2@(8),%sp@- 4325a: 4e90 jsr %a0@ (*print)( 4325c: 2f04 movel %d4,%sp@- 4325e: 2f2a 0008 movel %a2@(8),%sp@- 43262: 4879 0005 e81e pea 5e81e 43268: 2f03 movel %d3,%sp@- 4326a: 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 ) { 4326c: 2079 0006 9652 moveal 69652 <_Thread_Executing>,%a0 43272: 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; 43276: 202a 0082 movel %a2@(130),%d0 4327a: 222a 0086 movel %a2@(134),%d1 4327e: 2d40 ffe0 movel %d0,%fp@(-32) 43282: 2d41 ffe4 movel %d1,%fp@(-28) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 43286: 246a 0008 moveal %a2@(8),%a2 4328a: b5e8 0008 cmpal %a0@(8),%a2 4328e: 6700 0086 beqw 43316 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 43292: 486e fff8 pea %fp@(-8) /* * Print the information */ (*print)( context, 43296: 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 ); 4329c: 486e fffc pea %fp@(-4) 432a0: 486e ffe8 pea %fp@(-24) 432a4: 2f05 movel %d5,%sp@- 432a6: 4e95 jsr %a5@ /* * Print the information */ (*print)( context, 432a8: 2f2e fff8 movel %fp@(-8),%sp@- 432ac: 202e ffe4 movel %fp@(-28),%d0 432b0: 2f2e fffc movel %fp@(-4),%sp@- 432b4: 4c47 0000 remul %d7,%d0,%d0 432b8: 2f00 movel %d0,%sp@- 432ba: 2f2e ffe0 movel %fp@(-32),%sp@- 432be: 4879 0005 e831 pea 5e831 432c4: 2f03 movel %d3,%sp@- 432c6: 4e94 jsr %a4@ 432c8: 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++ ) { 432cc: 4280 clrl %d0 432ce: 302b 000e movew %a3@(14),%d0 432d2: b480 cmpl %d0,%d2 432d4: 6300 ff6a blsw 43240 432d8: 58ae ffc4 addql #4,%fp@(-60) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 432dc: 206e ffc4 moveal %fp@(-60),%a0 432e0: b1fc 0006 9564 cmpal #431460,%a0 432e6: 6600 ff2c bnew 43214 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 432ea: 202e ffec movel %fp@(-20),%d0 432ee: 243c 0000 03e8 movel #1000,%d2 432f4: 4c42 0000 remul %d2,%d0,%d0 432f8: 2f00 movel %d0,%sp@- 432fa: 2f2e ffe8 movel %fp@(-24),%sp@- 432fe: 4879 0005 e849 pea 5e849 43304: 2f03 movel %d3,%sp@- 43306: 4e94 jsr %a4@ 43308: 4fef 0010 lea %sp@(16),%sp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 4330c: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 43312: 4e5e unlk %fp 43314: 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( 43316: 486e ffd8 pea %fp@(-40) /* * Print the information */ (*print)( context, 4331a: 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( 43320: 486e fff0 pea %fp@(-16) 43324: 4879 0006 965a pea 6965a <_Thread_Time_of_last_context_switch> 4332a: 4eb9 0004 a978 jsr 4a978 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 43330: 486e ffd8 pea %fp@(-40) 43334: 2f05 movel %d5,%sp@- 43336: 4eb9 0004 a848 jsr 4a848 <_Timespec_Add_to> 4333c: 4fef 0014 lea %sp@(20),%sp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 43340: 486e fff8 pea %fp@(-8) 43344: 486e fffc pea %fp@(-4) 43348: 486e ffe8 pea %fp@(-24) 4334c: 2f05 movel %d5,%sp@- 4334e: 4e95 jsr %a5@ /* * Print the information */ (*print)( context, 43350: 2f2e fff8 movel %fp@(-8),%sp@- 43354: 202e ffe4 movel %fp@(-28),%d0 43358: 2f2e fffc movel %fp@(-4),%sp@- 4335c: 4c47 0000 remul %d7,%d0,%d0 43360: 2f00 movel %d0,%sp@- 43362: 2f2e ffe0 movel %fp@(-32),%sp@- 43366: 4879 0005 e831 pea 5e831 4336c: 2f03 movel %d3,%sp@- 4336e: 4e94 jsr %a4@ 43370: 4fef 0028 lea %sp@(40),%sp 43374: 6000 ff56 braw 432cc =============================================================================== 0004e348 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4e348: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4e34c: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4e34e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4e352: 4879 0005 cd88 pea 5cd88 <== NOT EXECUTED 4e358: 4eb9 0004 e384 jsr 4e384 <== NOT EXECUTED 4e35e: 508f addql #8,%sp <== NOT EXECUTED 4e360: 2400 movel %d0,%d2 <== NOT EXECUTED 4e362: 660a bnes 4e36e <== NOT EXECUTED { errno = rc; return -1; } return -1; } 4e364: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4e368: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e36a: 4e5e unlk %fp <== NOT EXECUTED 4e36c: 4e75 rts <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4e36e: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 4e374: 2040 moveal %d0,%a0 <== NOT EXECUTED return -1; } return -1; } 4e376: 70ff moveq #-1,%d0 <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4e378: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4e37a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4e37e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042544 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 42544: 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); 42548: 486e 0010 pea %fp@(16) <== NOT EXECUTED 4254c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42550: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42554: 4eba fdda jsr %pc@(42330 ) <== NOT EXECUTED va_end(arglist); return chars_written; } 42558: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000425a4 : } int rtems_filesystem_dirname( const char *pathname ) { 425a4: 4e56 fff0 linkw %fp,#-16 425a8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 425ac: 246e 0008 moveal %fp@(8),%a2 int len = strlen( pathname ); 425b0: 2f0a movel %a2,%sp@- 425b2: 4eb9 0004 ffc0 jsr 4ffc0 425b8: 588f addql #4,%sp while ( len ) { 425ba: 4a80 tstl %d0 425bc: 6742 beqs 42600 <== NEVER TAKEN len--; 425be: 2200 movel %d0,%d1 425c0: 5381 subql #1,%d1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 425c2: 782f moveq #47,%d4 425c4: 1632 1800 moveb %a2@(00000000,%d1:l),%d3 425c8: 1403 moveb %d3,%d2 425ca: 49c2 extbl %d2 425cc: b882 cmpl %d2,%d4 425ce: 673a beqs 4260a <== NEVER TAKEN 425d0: 183c 005c moveb #92,%d4 425d4: b882 cmpl %d2,%d4 425d6: 6732 beqs 4260a <== NEVER TAKEN 425d8: 4a03 tstb %d3 425da: 672e beqs 4260a <== NEVER TAKEN 425dc: 41f2 08fe lea %a2@(fffffffe,%d0:l),%a0 425e0: 2001 movel %d1,%d0 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 425e2: 4a80 tstl %d0 425e4: 671a beqs 42600 len--; 425e6: 5380 subql #1,%d0 if ( rtems_filesystem_is_separator( pathname[len] ) ) 425e8: 762f moveq #47,%d3 425ea: 1410 moveb %a0@,%d2 425ec: 5388 subql #1,%a0 425ee: 1202 moveb %d2,%d1 425f0: 49c1 extbl %d1 425f2: b681 cmpl %d1,%d3 425f4: 670a beqs 42600 425f6: 785c moveq #92,%d4 425f8: b881 cmpl %d1,%d4 425fa: 6704 beqs 42600 <== NEVER TAKEN 425fc: 4a02 tstb %d2 425fe: 66e2 bnes 425e2 <== ALWAYS TAKEN break; } return len; } 42600: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42606: 4e5e unlk %fp 42608: 4e75 rts const char *pathname ) { int len = strlen( pathname ); while ( len ) { 4260a: 2001 movel %d1,%d0 <== NOT EXECUTED if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 4260c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42612: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042720 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42720: 4e56 ffe8 linkw %fp,#-24 42724: 202e 0014 movel %fp@(20),%d0 42728: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4272c: 246e 0008 moveal %fp@(8),%a2 42730: 2a2e 000c movel %fp@(12),%d5 42734: 262e 0010 movel %fp@(16),%d3 42738: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4273c: 4a8a tstl %a2 4273e: 6700 00bc beqw 427fc rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42742: 4a80 tstl %d0 42744: 6700 009e beqw 427e4 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42748: 7c2f moveq #47,%d6 4274a: 1412 moveb %a2@,%d2 4274c: 1202 moveb %d2,%d1 4274e: 49c1 extbl %d1 42750: bc81 cmpl %d1,%d6 42752: 670c beqs 42760 42754: 1c3c 005c moveb #92,%d6 42758: bc81 cmpl %d1,%d6 4275a: 6704 beqs 42760 <== NEVER TAKEN 4275c: 4a02 tstb %d2 4275e: 6646 bnes 427a6 <== ALWAYS TAKEN 42760: 2279 0005 d824 moveal 5d824 ,%a1 42766: 2040 moveal %d0,%a0 42768: 7401 moveq #1,%d2 4276a: 7201 moveq #1,%d1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 4276c: 9a82 subl %d2,%d5 4276e: d5c1 addal %d1,%a2 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42770: 20e9 0018 movel %a1@(24),%a0@+ 42774: 20e9 001c movel %a1@(28),%a0@+ 42778: 20e9 0020 movel %a1@(32),%a0@+ 4277c: 20e9 0024 movel %a1@(36),%a0@+ 42780: 20a9 0028 movel %a1@(40),%a0@ /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 42784: 2d45 000c movel %d5,%fp@(12) 42788: 2d4a 0008 movel %a2,%fp@(8) 4278c: 2d44 0018 movel %d4,%fp@(24) 42790: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 42794: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 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], 4279a: 2d40 0014 movel %d0,%fp@(20) pathnamelen - i, flags, pathloc, follow_link ); } 4279e: 4e5e unlk %fp 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], 427a0: 4ef9 0004 2616 jmp 42616 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 427a6: 2279 0005 d824 moveal 5d824 ,%a1 427ac: 2040 moveal %d0,%a0 427ae: 5889 addql #4,%a1 427b0: 4282 clrl %d2 427b2: 4281 clrl %d1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427b4: 9a82 subl %d2,%d5 427b6: d5c1 addal %d1,%a2 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 427b8: 20d9 movel %a1@+,%a0@+ 427ba: 20d9 movel %a1@+,%a0@+ 427bc: 20d9 movel %a1@+,%a0@+ 427be: 20d9 movel %a1@+,%a0@+ 427c0: 2091 movel %a1@,%a0@ /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427c2: 2d45 000c movel %d5,%fp@(12) 427c6: 2d4a 0008 movel %a2,%fp@(8) 427ca: 2d44 0018 movel %d4,%fp@(24) 427ce: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 427d2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 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], 427d8: 2d40 0014 movel %d0,%fp@(20) pathnamelen - i, flags, pathloc, follow_link ); } 427dc: 4e5e unlk %fp 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], 427de: 4ef9 0004 2616 jmp 42616 if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 427e4: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 427ea: 7405 moveq #5,%d2 <== NOT EXECUTED 427ec: 2040 moveal %d0,%a0 <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 427ee: 70ff moveq #-1,%d0 <== 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 */ 427f0: 2082 movel %d2,%a0@ <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 427f2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 427f8: 4e5e unlk %fp <== NOT EXECUTED 427fa: 4e75 rts <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 427fc: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 42802: 760e moveq #14,%d3 <== NOT EXECUTED 42804: 2040 moveal %d0,%a0 <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 42806: 70ff moveq #-1,%d0 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42808: 2083 movel %d3,%a0@ <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 4280a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 42810: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042616 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42616: 4e56 fff0 linkw %fp,#-16 4261a: 222e 0008 movel %fp@(8),%d1 4261e: 48d7 041c moveml %d2-%d4/%a2,%sp@ 42622: 202e 000c movel %fp@(12),%d0 42626: 242e 0010 movel %fp@(16),%d2 4262a: 246e 0014 moveal %fp@(20),%a2 4262e: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 42632: 4a81 tstl %d1 42634: 6700 00d0 beqw 42706 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42638: 4a8a tstl %a2 4263a: 6700 00b0 beqw 426ec rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 4263e: 206a 000c moveal %a2@(12),%a0 42642: 2050 moveal %a0@,%a0 42644: 4a88 tstl %a0 42646: 6768 beqs 426b0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 42648: 2f0a movel %a2,%sp@- 4264a: 2f02 movel %d2,%sp@- 4264c: 2f00 movel %d0,%sp@- 4264e: 2f01 movel %d1,%sp@- 42650: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42652: 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 ); 42656: 2600 movel %d0,%d3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42658: 661e bnes 42678 4265a: 4a84 tstl %d4 4265c: 671a beqs 42678 if ( !pathloc->ops->node_type_h ){ 4265e: 226a 000c moveal %a2@(12),%a1 42662: 2069 0010 moveal %a1@(16),%a0 42666: 4a88 tstl %a0 42668: 6762 beqs 426cc <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 4266a: 2f0a movel %a2,%sp@- 4266c: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 4266e: 588f addql #4,%sp 42670: 7201 moveq #1,%d1 42672: 5780 subql #3,%d0 42674: b280 cmpl %d0,%d1 42676: 640c bccs 42684 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42678: 2003 movel %d3,%d0 4267a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42680: 4e5e unlk %fp 42682: 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 ){ 42684: 206a 000c moveal %a2@(12),%a0 42688: 2268 0034 moveal %a0@(52),%a1 4268c: 4a89 tstl %a1 4268e: 6712 beqs 426a2 <== 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 ); 42690: 2d42 000c movel %d2,%fp@(12) 42694: 2d4a 0008 movel %a2,%fp@(8) } } return result; } 42698: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4269e: 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 ); 426a0: 4ed1 jmp %a1@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 426a2: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 426a6: 6708 beqs 426b0 <== NOT EXECUTED 426a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 426aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ac: 4e90 jsr %a0@ <== NOT EXECUTED 426ae: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 426b0: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 426b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 426b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 426c0: 2003 movel %d3,%d0 <== NOT EXECUTED 426c2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 426c8: 4e5e unlk %fp <== NOT EXECUTED 426ca: 4e75 rts <== NOT EXECUTED */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 426cc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 426d0: 4a88 tstl %a0 <== NOT EXECUTED 426d2: 67dc beqs 426b0 <== NOT EXECUTED 426d4: 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 ); 426d6: 76ff moveq #-1,%d3 <== NOT EXECUTED */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 426d8: 4e90 jsr %a0@ <== NOT EXECUTED 426da: 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 ); 426dc: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 426e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 426e4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 426ea: 60d4 bras 426c0 <== 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 */ 426ec: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 426f2: 76ff moveq #-1,%d3 <== NOT EXECUTED 426f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 426f6: 7005 moveq #5,%d0 <== NOT EXECUTED 426f8: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 426fa: 2003 movel %d3,%d0 <== NOT EXECUTED 426fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42702: 4e5e unlk %fp <== NOT EXECUTED 42704: 4e75 rts <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42706: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 4270c: 76ff moveq #-1,%d3 <== NOT EXECUTED 4270e: 720e moveq #14,%d1 <== NOT EXECUTED 42710: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42712: 2003 movel %d3,%d0 <== NOT EXECUTED 42714: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 4271a: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 4271c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000421e8 : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 421e8: 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 ) { 421ea: 4e56 ffdc linkw %fp,#-36 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 421ee: 2079 0005 d824 moveal 5d824 ,%a0 421f4: 2140 002c movel %d0,%a0@(44) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 421f8: 48d7 1c00 moveml %a2-%a4,%sp@ */ rtems_filesystem_umask = 022; init_fs_mount_table(); 421fc: 4eb9 0004 2b04 jsr 42b04 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 42202: 4ab9 0005 be88 tstl 5be88 42208: 6700 00e8 beqw 422f2 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4220c: 2079 0005 d71c moveal 5d71c ,%a0 status = mount( 42212: 2f28 000c movel %a0@(12),%sp@- 42216: 2f28 0008 movel %a0@(8),%sp@- 4221a: 2f28 0004 movel %a0@(4),%sp@- 4221e: 2f10 movel %a0@,%sp@- 42220: 486e fffc pea %fp@(-4) 42224: 4eb9 0004 2b26 jsr 42b26 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4222a: 4fef 0014 lea %sp@(20),%sp 4222e: 72ff moveq #-1,%d1 42230: b280 cmpl %d0,%d1 42232: 6700 00d6 beqw 4230a rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 42236: 2079 0005 d824 moveal 5d824 ,%a0 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4223c: 45ee ffe8 lea %fp@(-24),%a2 42240: 49f9 0004 2720 lea 42720 ,%a4 rtems_filesystem_root = loc; 42246: 47ee fff8 lea %fp@(-8),%a3 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4224a: 226e fffc moveal %fp@(-4),%a1 4224e: 2169 001c 0018 movel %a1@(28),%a0@(24) 42254: 2169 0020 001c movel %a1@(32),%a0@(28) 4225a: 2169 0024 0020 movel %a1@(36),%a0@(32) 42260: 2169 0028 0024 movel %a1@(40),%a0@(36) 42266: 2169 002c 0028 movel %a1@(44),%a0@(40) &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4226c: 4240 clrw %d0 4226e: 3140 0030 movew %d0,%a0@(48) * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 42272: 42a7 clrl %sp@- 42274: 2f0a movel %a2,%sp@- 42276: 42a7 clrl %sp@- 42278: 4878 0001 pea 1 4227c: 4879 0005 c1f2 pea 5c1f2 42282: 4e94 jsr %a4@ rtems_filesystem_root = loc; 42284: 2079 0005 d824 moveal 5d824 ,%a0 4228a: 2152 0018 movel %a2@,%a0@(24) 4228e: 216e ffec 001c movel %fp@(-20),%a0@(28) 42294: 216e fff0 0020 movel %fp@(-16),%a0@(32) 4229a: 216e fff4 0024 movel %fp@(-12),%a0@(36) 422a0: 2153 0028 movel %a3@,%a0@(40) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 422a4: 42a7 clrl %sp@- 422a6: 2f0a movel %a2,%sp@- 422a8: 42a7 clrl %sp@- 422aa: 4878 0001 pea 1 422ae: 4879 0005 c1f2 pea 5c1f2 422b4: 4e94 jsr %a4@ rtems_filesystem_current = loc; 422b6: 2079 0005 d824 moveal 5d824 ,%a0 422bc: 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); 422be: 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; 422c2: 20d2 movel %a2@,%a0@+ 422c4: 20ee ffec movel %fp@(-20),%a0@+ 422c8: 20ee fff0 movel %fp@(-16),%a0@+ 422cc: 20ee fff4 movel %fp@(-12),%a0@+ 422d0: 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); 422d2: 4878 01ff pea 1ff 422d6: 4879 0005 c1f4 pea 5c1f4 422dc: 4eb9 0004 2988 jsr 42988 if ( status != 0 ) 422e2: 508f addql #8,%sp 422e4: 4a80 tstl %d0 422e6: 6616 bnes 422fe <== 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. */ } 422e8: 4cee 1c00 ffdc moveml %fp@(-36),%a2-%a4 422ee: 4e5e unlk %fp 422f0: 4e75 rts /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 422f2: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 422f8: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 422fe: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42304: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 4230a: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42310: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED ... =============================================================================== 0004955c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4955c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49560: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 49564: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 49568: 4e5e unlk %fp <== NOT EXECUTED ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4956a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4956c: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 4956e: 57c0 seq %d0 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 49570: 4480 negl %d0 <== NOT EXECUTED =============================================================================== 0004255c : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 4255c: 4e56 0000 linkw %fp,#0 42560: 206e 0008 moveal %fp@(8),%a0 42564: 2f02 movel %d2,%sp@- 42566: 226e 000c moveal %fp@(12),%a1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4256a: 1210 moveb %a0@,%d1 4256c: 672e beqs 4259c <== NEVER TAKEN 4256e: 4a89 tstl %a1 42570: 672a beqs 4259c <== NEVER TAKEN 42572: 4280 clrl %d0 42574: 49c1 extbl %d1 42576: 742f moveq #47,%d2 42578: b481 cmpl %d1,%d2 4257a: 670e beqs 4258a 4257c: 143c 005c moveb #92,%d2 42580: b481 cmpl %d1,%d2 42582: 6706 beqs 4258a <== NEVER TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 42584: 241f movel %sp@+,%d2 42586: 4e5e unlk %fp 42588: 4e75 rts int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) { pathname++; pathnamelen--; stripped++; 4258a: 5280 addql #1,%d0 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4258c: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 42590: 67f2 beqs 42584 <== NEVER TAKEN 42592: b089 cmpl %a1,%d0 42594: 66de bnes 42574 <== ALWAYS TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 42596: 241f movel %sp@+,%d2 <== NOT EXECUTED 42598: 4e5e unlk %fp <== NOT EXECUTED 4259a: 4e75 rts <== NOT EXECUTED 4259c: 241f movel %sp@+,%d2 <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4259e: 4280 clrl %d0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 425a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004634e : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 4634e: 4e56 0000 linkw %fp,#0 46352: 42b9 0005 f100 clrl 5f100 <_System_state_Current> #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 46358: 4eb9 0004 9354 jsr 49354 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 4635e: 4eb9 0004 b8f0 jsr 4b8f0 <_Debug_Manager_initialization> _API_extensions_Initialization(); 46364: 4eb9 0004 6604 jsr 46604 <_API_extensions_Initialization> * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 4636a: 7001 moveq #1,%d0 4636c: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level> /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); 46372: 4eb9 0004 9228 jsr 49228 <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 46378: 4eb9 0004 8cb0 jsr 48cb0 <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 4637e: 4eb9 0004 7028 jsr 47028 <_ISR_Handler_initialization> /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; _API_Mutex_Initialization( 1 ); 46384: 4878 0001 pea 1 _ISR_Handler_initialization(); /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 46388: 203c 0005 ef8e movel #389006,%d0 4638e: 23c0 0005 ef34 movel %d0,5ef34 <_Objects_Information_table+0x4> _API_Mutex_Initialization( 1 ); 46394: 4eb9 0004 6738 jsr 46738 <_API_Mutex_Initialization> _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 4639a: 4879 0005 f02a pea 5f02a <_RTEMS_Allocator_Mutex> 463a0: 4eb9 0004 66a0 jsr 466a0 <_API_Mutex_Allocate> #include #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) 463a6: 508f addql #8,%sp RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 463a8: 41f9 0005 f098 lea 5f098 <_Priority_Bit_map>,%a0 463ae: 4240 clrw %d0 463b0: 33c0 0005 f028 movew %d0,5f028 <_Priority_Major_bit_map> for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 463b6: 4258 clrw %a0@+ RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 463b8: b1fc 0005 f0b8 cmpal #389304,%a0 463be: 66f6 bnes 463b6 _API_Mutex_Initialization( 1 ); _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 463c0: 4eb9 0004 9058 jsr 49058 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 463c6: 4eb9 0004 6bbc jsr 46bbc <_TOD_Handler_initialization> _Thread_Handler_initialization(); 463cc: 4eb9 0004 80d8 jsr 480d8 <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 463d2: 4eb9 0004 65b0 jsr 465b0 <_RTEMS_API_Initialize> _Extension_Manager_initialization(); 463d8: 4eb9 0004 6428 jsr 46428 <_Extension_Manager_initialization> _IO_Manager_initialization(); 463de: 4eb9 0004 64a6 jsr 464a6 <_IO_Manager_initialization> #ifdef RTEMS_POSIX_API _POSIX_API_Initialize(); 463e4: 4eb9 0004 655c jsr 4655c <_POSIX_API_Initialize> _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 463ea: 4e5e unlk %fp 463ec: 7001 moveq #1,%d0 463ee: 23c0 0005 f100 movel %d0,5f100 <_System_state_Current> * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 463f4: 4ef9 0004 7b78 jmp 47b78 <_Thread_Create_idle> ... =============================================================================== 000420b4 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 420b4: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 420b8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 420bc: 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 ); 420c0: 45f9 0004 ffc0 lea 4ffc0 ,%a2 <== NOT EXECUTED 420c6: 240e movel %fp,%d2 <== NOT EXECUTED 420c8: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 420ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 420d0: 4e92 jsr %a2@ <== NOT EXECUTED 420d2: 7201 moveq #1,%d1 <== NOT EXECUTED 420d4: 2e81 movel %d1,%sp@ <== NOT EXECUTED 420d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 420d8: 42a7 clrl %sp@- <== NOT EXECUTED 420da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 420dc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 420de: 4eb9 0004 2720 jsr 42720 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 420e4: 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 ); 420e8: 2800 movel %d0,%d4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 420ea: 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; 420ee: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 420f2: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 420f6: 4a88 tstl %a0 <== NOT EXECUTED 420f8: 6730 beqs 4212a <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 420fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 420fc: 4e90 jsr %a0@ <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 420fe: 588f addql #4,%sp <== NOT EXECUTED 42100: 4a84 tstl %d4 <== NOT EXECUTED 42102: 674e beqs 42152 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 42104: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42108: 4a88 tstl %a0 <== NOT EXECUTED 4210a: 6700 0092 beqw 4219e <== NOT EXECUTED 4210e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42112: 4a88 tstl %a0 <== NOT EXECUTED 42114: 6700 0088 beqw 4219e <== NOT EXECUTED 42118: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4211a: 4e90 jsr %a0@ <== NOT EXECUTED 4211c: 588f addql #4,%sp <== NOT EXECUTED 4211e: 700d moveq #13,%d0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 42120: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 42126: 4e5e unlk %fp <== NOT EXECUTED 42128: 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 ); 4212a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4212e: 4a88 tstl %a0 <== NOT EXECUTED 42130: 6706 beqs 42138 <== NOT EXECUTED 42132: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42134: 4e90 jsr %a0@ <== NOT EXECUTED 42136: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42138: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 4213e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42140: 70ff moveq #-1,%d0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 42142: 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 ); 42148: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 4214e: 4e5e unlk %fp <== NOT EXECUTED 42150: 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 ) { 42152: 7202 moveq #2,%d1 <== NOT EXECUTED 42154: b280 cmpl %d0,%d1 <== NOT EXECUTED 42156: 66ac bnes 42104 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 42158: 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; 4215a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4215e: 2083 movel %d3,%a0@ <== NOT EXECUTED device_info->device_name_length = strlen( name ); 42160: 4e92 jsr %a2@ <== NOT EXECUTED 42162: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 42166: 41eb 004c lea %a3@(76),%a0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 4216a: 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 ); 4216e: 588f addql #4,%sp <== NOT EXECUTED 42170: 2340 0004 movel %d0,%a1@(4) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 42174: 2350 0008 movel %a0@,%a1@(8) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 42178: 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; 4217c: 2353 000c movel %a3@,%a1@(12) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 42180: 4a88 tstl %a0 <== NOT EXECUTED 42182: 6726 beqs 421aa <== NOT EXECUTED 42184: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42188: 4a88 tstl %a0 <== NOT EXECUTED 4218a: 671e beqs 421aa <== NOT EXECUTED 4218c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4218e: 4e90 jsr %a0@ <== NOT EXECUTED 42190: 588f addql #4,%sp <== NOT EXECUTED 42192: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42194: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4219a: 4e5e unlk %fp <== NOT EXECUTED 4219c: 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 ); 4219e: 700d moveq #13,%d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 421a0: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 421a6: 4e5e unlk %fp <== NOT EXECUTED 421a8: 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 ); 421aa: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 421ac: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 421b2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ddf4 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4ddf4: 4e56 0000 linkw %fp,#0 4ddf8: 202e 0008 movel %fp@(8),%d0 4ddfc: 2f03 movel %d3,%sp@- 4ddfe: 222e 000c movel %fp@(12),%d1 4de02: 206e 0010 moveal %fp@(16),%a0 4de06: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4de08: b0b9 0005 f804 cmpl 5f804 <_IO_Number_of_drivers>,%d0 4de0e: 642c bccs 4de3c <== NEVER TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 4de10: 2600 movel %d0,%d3 4de12: 2400 movel %d0,%d2 4de14: e78b lsll #3,%d3 4de16: eb8a lsll #5,%d2 4de18: 2279 0005 f808 moveal 5f808 <_IO_Driver_address_table>,%a1 4de1e: 9483 subl %d3,%d2 4de20: 2271 280c moveal %a1@(0000000c,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4de24: 4a89 tstl %a1 4de26: 671e beqs 4de46 4de28: 2d48 0010 movel %a0,%fp@(16) 4de2c: 2d41 000c movel %d1,%fp@(12) 4de30: 2d40 0008 movel %d0,%fp@(8) } 4de34: 241f movel %sp@+,%d2 4de36: 261f movel %sp@+,%d3 4de38: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4de3a: 4ed1 jmp %a1@ } 4de3c: 241f movel %sp@+,%d2 void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4de3e: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 4de40: 261f movel %sp@+,%d3 4de42: 4e5e unlk %fp 4de44: 4e75 rts 4de46: 241f movel %sp@+,%d2 if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4de48: 4280 clrl %d0 } 4de4a: 261f movel %sp@+,%d3 4de4c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004833c : 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 ) { 4833c: 4e56 fff4 linkw %fp,#-12 48340: 226e 000c moveal %fp@(12),%a1 48344: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48348: 242e 0008 movel %fp@(8),%d2 4834c: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 48350: 2039 0006 59ea movel 659ea <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 48356: 2239 0006 51ca movel 651ca <_ISR_Nest_level>,%d1 4835c: 6600 009c bnew 483fa return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 48360: 4a8a tstl %a2 48362: 6700 00ea beqw 4844e return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 48366: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 48368: 4a89 tstl %a1 4836a: 6700 00e2 beqw 4844e static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4836e: 4a91 tstl %a1@ 48370: 6700 00d4 beqw 48446 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48374: b480 cmpl %d0,%d2 48376: 6476 bccs 483ee rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48378: 2039 0006 5130 movel 65130 <_Thread_Dispatch_disable_level>,%d0 4837e: 5280 addql #1,%d0 48380: 23c0 0006 5130 movel %d0,65130 <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 48386: 4a82 tstl %d2 48388: 667c bnes 48406 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 4838a: 2039 0006 59ea movel 659ea <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48390: 6700 00fc beqw 4848e 48394: 2239 0006 59ee movel 659ee <_IO_Driver_address_table>,%d1 4839a: 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; 4839c: 4a90 tstl %a0@ 4839e: 6700 008e beqw 4842e 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 ) { 483a2: 5282 addql #1,%d2 483a4: 41e8 0018 lea %a0@(24),%a0 483a8: b480 cmpl %d0,%d2 483aa: 65f0 bcss 4839c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 483ac: 2482 movel %d2,%a2@ if ( m != n ) 483ae: b480 cmpl %d0,%d2 483b0: 6700 00de beqw 48490 483b4: 2602 movel %d2,%d3 483b6: 2002 movel %d2,%d0 483b8: 2041 moveal %d1,%a0 483ba: e78b lsll #3,%d3 483bc: eb88 lsll #5,%d0 483be: 9083 subl %d3,%d0 483c0: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 483c2: 20d9 movel %a1@+,%a0@+ 483c4: 20d9 movel %a1@+,%a0@+ 483c6: 20d9 movel %a1@+,%a0@+ 483c8: 20d9 movel %a1@+,%a0@+ 483ca: 20d9 movel %a1@+,%a0@+ 483cc: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 483ce: 4eb9 0004 9ee0 jsr 49ee0 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 483d4: 2d42 0008 movel %d2,%fp@(8) } 483d8: 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 ); 483de: 42ae 0010 clrl %fp@(16) 483e2: 42ae 000c clrl %fp@(12) } 483e6: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483e8: 4ef9 0005 1368 jmp 51368 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 483ee: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483f0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483f6: 4e5e unlk %fp 483f8: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 483fa: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48402: 4e5e unlk %fp 48404: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 48406: 2202 movel %d2,%d1 48408: 2002 movel %d2,%d0 4840a: e789 lsll #3,%d1 4840c: eb88 lsll #5,%d0 4840e: 2079 0006 59ee moveal 659ee <_IO_Driver_address_table>,%a0 48414: 9081 subl %d1,%d0 48416: 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; 48418: 4a90 tstl %a0@ 4841a: 673e beqs 4845a 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(); 4841c: 4eb9 0004 9ee0 jsr 49ee0 <_Thread_Enable_dispatch> 48422: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48424: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4842a: 4e5e unlk %fp 4842c: 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; 4842e: 4aa8 0004 tstl %a0@(4) 48432: 6700 ff78 beqw 483ac 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 ) { 48436: 5282 addql #1,%d2 48438: 41e8 0018 lea %a0@(24),%a0 4843c: b480 cmpl %d0,%d2 4843e: 6500 ff5c bcsw 4839c 48442: 6000 ff68 braw 483ac static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48446: 4aa9 0004 tstl %a1@(4) 4844a: 6600 ff28 bnew 48374 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4844e: 7009 moveq #9,%d0 } 48450: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48456: 4e5e unlk %fp 48458: 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; 4845a: 4aa8 0004 tstl %a0@(4) 4845e: 66bc bnes 4841c } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48460: 20d9 movel %a1@+,%a0@+ 48462: 20d9 movel %a1@+,%a0@+ 48464: 20d9 movel %a1@+,%a0@+ 48466: 20d9 movel %a1@+,%a0@+ 48468: 20d9 movel %a1@+,%a0@+ 4846a: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 4846c: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 4846e: 4eb9 0004 9ee0 jsr 49ee0 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48474: 2d42 0008 movel %d2,%fp@(8) } 48478: 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 ); 4847e: 42ae 0010 clrl %fp@(16) 48482: 42ae 000c clrl %fp@(12) } 48486: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48488: 4ef9 0005 1368 jmp 51368 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4848e: 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(); 48490: 4eb9 0004 9ee0 jsr 49ee0 <_Thread_Enable_dispatch> 48496: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48498: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4849e: 4e5e unlk %fp ... =============================================================================== 00048b04 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 48b04: 4e56 fff0 linkw %fp,#-16 48b08: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48b0c: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 48b10: 4a8b tstl %a3 48b12: 6744 beqs 48b58 <== NEVER TAKEN 48b14: 49f9 0006 9554 lea 69554 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 48b1a: 2054 moveal %a4@,%a0 48b1c: 4a88 tstl %a0 48b1e: 672e beqs 48b4e continue; information = _Objects_Information_table[ api_index ][ 1 ]; 48b20: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 48b24: 4a8a tstl %a2 48b26: 6726 beqs 48b4e continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48b28: 4a6a 000e tstw %a2@(14) 48b2c: 6720 beqs 48b4e 48b2e: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 48b30: 206a 0018 moveal %a2@(24),%a0 48b34: 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++ ) { 48b38: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 48b3a: 4a80 tstl %d0 48b3c: 6706 beqs 48b44 <== NEVER TAKEN continue; (*routine)(the_thread); 48b3e: 2f00 movel %d0,%sp@- 48b40: 4e93 jsr %a3@ 48b42: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48b44: 4280 clrl %d0 48b46: 302a 000e movew %a2@(14),%d0 48b4a: b480 cmpl %d0,%d2 48b4c: 63e2 blss 48b30 48b4e: 588c addql #4,%a4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 48b50: b9fc 0006 9564 cmpal #431460,%a4 48b56: 66c2 bnes 48b1a (*routine)(the_thread); } } } 48b58: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48b5e: 4e5e unlk %fp ... =============================================================================== 0004aaf8 : * 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 ) { 4aaf8: 4e56 fffc linkw %fp,#-4 4aafc: 2f0a movel %a2,%sp@- 4aafe: 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 ); 4ab00: 42a7 clrl %sp@- 4ab02: 42a7 clrl %sp@- 4ab04: 2f39 0005 ee20 movel 5ee20 ,%sp@- 4ab0a: 4eb9 0004 5d2c jsr 45d2c rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 4ab10: 2039 0005 ee1c movel 5ee1c ,%d0 4ab16: 4fef 000c lea %sp@(12),%sp 4ab1a: 661c bnes 4ab38 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4ab1c: 2f39 0005 ee20 movel 5ee20 ,%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; 4ab22: 95ca subal %a2,%a2 4ab24: 4eb9 0004 5e68 jsr 45e68 iop = 0; done: rtems_libio_unlock(); return iop; } 4ab2a: 242e fff4 movel %fp@(-12),%d2 4ab2e: 200a movel %a2,%d0 4ab30: 246e fff8 moveal %fp@(-8),%a2 4ab34: 4e5e unlk %fp 4ab36: 4e75 rts rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 4ab38: 486e fffc pea %fp@(-4) 4ab3c: 90b9 0005 ee18 subl 5ee18 ,%d0 4ab42: ec80 asrl #6,%d0 4ab44: 42a7 clrl %sp@- 4ab46: 4878 0054 pea 54 4ab4a: 4878 0001 pea 1 4ab4e: 0080 4c42 4900 oril #1279412480,%d0 4ab54: 2f00 movel %d0,%sp@- 4ab56: 4eb9 0004 5a8c jsr 45a8c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 4ab5c: 4fef 0014 lea %sp@(20),%sp 4ab60: 4a80 tstl %d0 4ab62: 66b8 bnes 4ab1c <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 4ab64: 2479 0005 ee1c moveal 5ee1c ,%a2 next = iop->data1; 4ab6a: 242a 0034 movel %a2@(52),%d2 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4ab6e: 4878 0040 pea 40 4ab72: 42a7 clrl %sp@- 4ab74: 2f0a movel %a2,%sp@- 4ab76: 4eb9 0004 f484 jsr 4f484 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4ab7c: 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; 4ab82: 203c 0000 0100 movel #256,%d0 iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 4ab88: 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; 4ab8c: 23c2 0005 ee1c movel %d2,5ee1c 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; 4ab92: 2540 0014 movel %d0,%a2@(20) 4ab96: 2f39 0005 ee20 movel 5ee20 ,%sp@- 4ab9c: 4eb9 0004 5e68 jsr 45e68 iop = 0; done: rtems_libio_unlock(); return iop; } 4aba2: 242e fff4 movel %fp@(-12),%d2 4aba6: 200a movel %a2,%d0 4aba8: 246e fff8 moveal %fp@(-8),%a2 4abac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aa6a : */ void rtems_libio_free( rtems_libio_t *iop ) { 4aa6a: 4e56 0000 linkw %fp,#0 4aa6e: 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 ); 4aa70: 42a7 clrl %sp@- 4aa72: 246e 0008 moveal %fp@(8),%a2 4aa76: 42a7 clrl %sp@- 4aa78: 2f39 0005 ee20 movel 5ee20 ,%sp@- 4aa7e: 4eb9 0004 5d2c jsr 45d2c rtems_libio_lock(); if (iop->sem) 4aa84: 202a 002c movel %a2@(44),%d0 4aa88: 4fef 000c lea %sp@(12),%sp 4aa8c: 6630 bnes 4aabe <== ALWAYS TAKEN rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4aa8e: 41f9 0005 ee1c lea 5ee1c ,%a0 <== NOT EXECUTED rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4aa94: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; 4aa9a: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4aa9e: 41f9 0005 ee20 lea 5ee20 ,%a0 <== NOT EXECUTED 4aaa4: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4aaa8: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4aaac: 23ca 0005 ee1c movel %a2,5ee1c <== NOT EXECUTED rtems_libio_unlock(); } 4aab2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4aab6: 4e5e unlk %fp <== NOT EXECUTED 4aab8: 4ef9 0004 5e68 jmp 45e68 <== NOT EXECUTED ) { rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); 4aabe: 2f00 movel %d0,%sp@- 4aac0: 4eb9 0004 5c54 jsr 45c54 4aac6: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4aac8: 41f9 0005 ee1c lea 5ee1c ,%a0 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4aace: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 4aad4: 2550 0034 movel %a0@,%a2@(52) 4aad8: 41f9 0005 ee20 lea 5ee20 ,%a0 4aade: 2d50 0008 movel %a0@,%fp@(8) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4aae2: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4aae6: 23ca 0005 ee1c movel %a2,5ee1c rtems_libio_unlock(); } 4aaec: 246e fffc moveal %fp@(-4),%a2 4aaf0: 4e5e unlk %fp 4aaf2: 4ef9 0004 5e68 jmp 45e68 =============================================================================== 00042814 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42814: 4e56 0000 linkw %fp,#0 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 42818: 2039 0005 d714 movel 5d714 ,%d0 4281e: 674a beqs 4286a <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42820: 4878 0040 pea 40 42824: 2f00 movel %d0,%sp@- 42826: 4eb9 0004 a608 jsr 4a608 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 4282c: 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, 4282e: 2040 moveal %d0,%a0 42830: 23c0 0005 ee18 movel %d0,5ee18 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42836: 6770 beqs 428a8 <== 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++) 42838: 2279 0005 d714 moveal 5d714 ,%a1 4283e: 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; 42840: 23c0 0005 ee1c movel %d0,5ee1c for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42846: b289 cmpl %a1,%d1 42848: 641c bccs 42866 <== NEVER TAKEN 4284a: 2040 moveal %d0,%a0 4284c: 41e8 0040 lea %a0@(64),%a0 iop->data1 = iop + 1; 42850: 2148 fff4 movel %a0,%a0@(-12) 42854: 41e8 0040 lea %a0@(64),%a0 42858: 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++) 4285a: b3c1 cmpal %d1,%a1 4285c: 66f2 bnes 42850 4285e: ed89 lsll #6,%d1 42860: 2241 moveal %d1,%a1 42862: 41f1 08c0 lea %a1@(ffffffc0,%d0:l),%a0 iop->data1 = iop + 1; iop->data1 = NULL; 42866: 42a8 0034 clrl %a0@(52) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 4286a: 4879 0005 ee20 pea 5ee20 42870: 42a7 clrl %sp@- 42872: 4878 0054 pea 54 42876: 4878 0001 pea 1 4287a: 2f3c 4c42 494f movel #1279412559,%sp@- 42880: 4eb9 0004 5a8c jsr 45a8c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 42886: 4fef 0014 lea %sp@(20),%sp 4288a: 4a80 tstl %d0 4288c: 6612 bnes 428a0 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 4288e: 2279 0005 d710 moveal 5d710 ,%a1 42894: 4a89 tstl %a1 42896: 6704 beqs 4289c <== NEVER TAKEN (* rtems_fs_init_helper)(); } 42898: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 4289a: 4ed1 jmp %a1@ } 4289c: 4e5e unlk %fp <== NOT EXECUTED 4289e: 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 ); 428a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 428a2: 4eb9 0004 6458 jsr 46458 <== 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); 428a8: 4878 001a pea 1a <== NOT EXECUTED 428ac: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED ... =============================================================================== 0004a96e : */ int rtems_libio_is_file_open( void *node_access ) { 4a96e: 4e56 0000 linkw %fp,#0 4a972: 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 ); 4a974: 42a7 clrl %sp@- 4a976: 242e 0008 movel %fp@(8),%d2 4a97a: 42a7 clrl %sp@- 4a97c: 2f39 0005 ee20 movel 5ee20 ,%sp@- 4a982: 4eb9 0004 5d2c jsr 45d2c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a988: 2079 0005 ee18 moveal 5ee18 ,%a0 4a98e: 4fef 000c lea %sp@(12),%sp 4a992: 2279 0005 d714 moveal 5d714 ,%a1 4a998: 4a89 tstl %a1 4a99a: 6720 beqs 4a9bc <== NEVER TAKEN 4a99c: 41e8 0014 lea %a0@(20),%a0 4a9a0: 4280 clrl %d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a9a2: 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++){ 4a9a4: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a9a6: 0281 0000 0100 andil #256,%d1 4a9ac: 6706 beqs 4a9b4 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4a9ae: b4a8 0004 cmpl %a0@(4),%d2 4a9b2: 6720 beqs 4a9d4 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a9b4: 41e8 0040 lea %a0@(64),%a0 4a9b8: b3c0 cmpal %d0,%a1 4a9ba: 62e6 bhis 4a9a2 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4a9bc: 2f39 0005 ee20 movel 5ee20 ,%sp@- 4a9c2: 4282 clrl %d2 4a9c4: 4eb9 0004 5e68 jsr 45e68 } rtems_libio_unlock(); return result; } 4a9ca: 2002 movel %d2,%d0 4a9cc: 242e fffc movel %fp@(-4),%d2 4a9d0: 4e5e unlk %fp 4a9d2: 4e75 rts 4a9d4: 2f39 0005 ee20 movel 5ee20 ,%sp@- /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4a9da: 7401 moveq #1,%d2 4a9dc: 4eb9 0004 5e68 jsr 45e68 } rtems_libio_unlock(); return result; } 4a9e2: 2002 movel %d2,%d0 4a9e4: 242e fffc movel %fp@(-4),%d2 4a9e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a9ec : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 4a9ec: 4e56 0000 linkw %fp,#0 4a9f0: 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 ); 4a9f2: 42a7 clrl %sp@- 4a9f4: 242e 0008 movel %fp@(8),%d2 4a9f8: 42a7 clrl %sp@- 4a9fa: 2f39 0005 ee20 movel 5ee20 ,%sp@- 4aa00: 4eb9 0004 5d2c jsr 45d2c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4aa06: 2079 0005 ee18 moveal 5ee18 ,%a0 4aa0c: 4fef 000c lea %sp@(12),%sp 4aa10: 2279 0005 d714 moveal 5d714 ,%a1 4aa16: 4a89 tstl %a1 4aa18: 6720 beqs 4aa3a <== NEVER TAKEN 4aa1a: 41e8 0014 lea %a0@(20),%a0 4aa1e: 4280 clrl %d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4aa20: 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++){ 4aa22: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4aa24: 0281 0000 0100 andil #256,%d1 4aa2a: 6706 beqs 4aa32 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 4aa2c: b4a8 0014 cmpl %a0@(20),%d2 4aa30: 6720 beqs 4aa52 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4aa32: 41e8 0040 lea %a0@(64),%a0 4aa36: b3c0 cmpal %d0,%a1 4aa38: 62e6 bhis 4aa20 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4aa3a: 2f39 0005 ee20 movel 5ee20 ,%sp@- 4aa40: 4282 clrl %d2 4aa42: 4eb9 0004 5e68 jsr 45e68 } rtems_libio_unlock(); return result; } 4aa48: 2002 movel %d2,%d0 4aa4a: 242e fffc movel %fp@(-4),%d2 4aa4e: 4e5e unlk %fp 4aa50: 4e75 rts 4aa52: 2f39 0005 ee20 movel 5ee20 ,%sp@- /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 4aa58: 7401 moveq #1,%d2 4aa5a: 4eb9 0004 5e68 jsr 45e68 } rtems_libio_unlock(); return result; } 4aa60: 2002 movel %d2,%d0 4aa62: 242e fffc movel %fp@(-4),%d2 4aa66: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044580 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 44580: 4e56 ffd4 linkw %fp,#-44 44584: 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); 44588: 486e fffc pea %fp@(-4) 4458c: 42a7 clrl %sp@- 4458e: 42a7 clrl %sp@- 44590: 4eb9 0004 75c0 jsr 475c0 if (sc != RTEMS_SUCCESSFUL) return sc; 44596: 4fef 000c lea %sp@(12),%sp 4459a: 4a80 tstl %d0 4459c: 6600 00cc bnew 4466a /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 445a0: 2479 0006 045c moveal 6045c ,%a2 445a6: b5fc 0006 1ab8 cmpal #400056,%a2 445ac: 6700 00ca beqw 44678 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 445b0: 4878 0048 pea 48 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 445b4: 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*/ 445b8: 4879 0006 1ab8 pea 61ab8 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 445be: 4bf9 0004 326c lea 4326c ,%a5 rtems_filesystem_root = loc; 445c4: 49ee fff8 lea %fp@(-8),%a4 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 445c8: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 445ca: 2f0a movel %a2,%sp@- 445cc: 4eb9 0005 1650 jsr 51650 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 445d2: 2079 0006 1aa0 moveal 61aa0 ,%a0 445d8: 2568 001c 0018 movel %a0@(28),%a2@(24) 445de: 2568 0020 001c movel %a0@(32),%a2@(28) 445e4: 2568 0024 0020 movel %a0@(36),%a2@(32) 445ea: 2568 0028 0024 movel %a0@(40),%a2@(36) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 445f0: 24ae fffc movel %fp@(-4),%a2@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 445f4: 2568 002c 0028 movel %a0@(44),%a2@(40) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 445fa: 42a7 clrl %sp@- 445fc: 2f0b movel %a3,%sp@- 445fe: 42a7 clrl %sp@- 44600: 4878 0001 pea 1 44604: 4879 0005 ecbc pea 5ecbc 4460a: 4e95 jsr %a5@ rtems_filesystem_root = loc; 4460c: 2079 0006 045c moveal 6045c ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 44612: 4fef 0020 lea %sp@(32),%sp * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 44616: 2153 0018 movel %a3@,%a0@(24) 4461a: 216e ffec 001c movel %fp@(-20),%a0@(28) 44620: 216e fff0 0020 movel %fp@(-16),%a0@(32) 44626: 216e fff4 0024 movel %fp@(-12),%a0@(36) 4462c: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 44630: 42a7 clrl %sp@- 44632: 2f0b movel %a3,%sp@- 44634: 42a7 clrl %sp@- 44636: 4878 0001 pea 1 4463a: 4879 0005 ecbc pea 5ecbc 44640: 4e95 jsr %a5@ rtems_filesystem_current = loc; 44642: 2079 0006 045c moveal 6045c ,%a0 44648: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 4464a: 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; 4464e: 20d3 movel %a3@,%a0@+ 44650: 20ee ffec movel %fp@(-20),%a0@+ 44654: 20ee fff0 movel %fp@(-16),%a0@+ 44658: 20ee fff4 movel %fp@(-12),%a0@+ 4465c: 2094 movel %a4@,%a0@ return RTEMS_SUCCESSFUL; } 4465e: 2002 movel %d2,%d0 44660: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 44666: 4e5e unlk %fp 44668: 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; 4466a: 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; } 4466c: 2002 movel %d2,%d0 <== NOT EXECUTED 4466e: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 44674: 4e5e unlk %fp <== NOT EXECUTED 44676: 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)); 44678: 4878 0048 pea 48 4467c: 4eb9 0004 395c jsr 4395c if (!tmp) 44682: 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)); 44684: 2440 moveal %d0,%a2 if (!tmp) 44686: 4a80 tstl %d0 44688: 6700 00d6 beqw 44760 #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); 4468c: 487a fdda pea %pc@(44468 ) 44690: 4879 0006 045c pea 6045c 44696: 42a7 clrl %sp@- 44698: 4eb9 0004 7754 jsr 47754 if (sc != RTEMS_SUCCESSFUL) { 4469e: 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); 446a2: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 446a4: 6600 00c8 bnew 4476e * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 446a8: 23ca 0006 045c movel %a2,6045c }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 446ae: 4878 0048 pea 48 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 446b2: 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*/ 446b6: 4879 0006 1ab8 pea 61ab8 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 446bc: 4bf9 0004 326c lea 4326c ,%a5 rtems_filesystem_root = loc; 446c2: 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*/ 446c6: 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; 446c8: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 446ca: 4eb9 0005 1650 jsr 51650 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 446d0: 2079 0006 1aa0 moveal 61aa0 ,%a0 446d6: 2568 001c 0018 movel %a0@(28),%a2@(24) 446dc: 2568 0020 001c movel %a0@(32),%a2@(28) 446e2: 2568 0024 0020 movel %a0@(36),%a2@(32) 446e8: 2568 0028 0024 movel %a0@(40),%a2@(36) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 446ee: 24ae fffc movel %fp@(-4),%a2@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 446f2: 2568 002c 0028 movel %a0@(44),%a2@(40) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 446f8: 42a7 clrl %sp@- 446fa: 2f0b movel %a3,%sp@- 446fc: 42a7 clrl %sp@- 446fe: 4878 0001 pea 1 44702: 4879 0005 ecbc pea 5ecbc 44708: 4e95 jsr %a5@ rtems_filesystem_root = loc; 4470a: 2079 0006 045c moveal 6045c ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 44710: 4fef 0020 lea %sp@(32),%sp * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 44714: 2153 0018 movel %a3@,%a0@(24) 44718: 216e ffec 001c movel %fp@(-20),%a0@(28) 4471e: 216e fff0 0020 movel %fp@(-16),%a0@(32) 44724: 216e fff4 0024 movel %fp@(-12),%a0@(36) 4472a: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4472e: 42a7 clrl %sp@- 44730: 2f0b movel %a3,%sp@- 44732: 42a7 clrl %sp@- 44734: 4878 0001 pea 1 44738: 4879 0005 ecbc pea 5ecbc 4473e: 4e95 jsr %a5@ rtems_filesystem_current = loc; 44740: 2079 0006 045c moveal 6045c ,%a0 44746: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 44748: 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; 4474c: 20d3 movel %a3@,%a0@+ 4474e: 20ee ffec movel %fp@(-20),%a0@+ 44752: 20ee fff0 movel %fp@(-16),%a0@+ 44756: 20ee fff4 movel %fp@(-12),%a0@+ 4475a: 2094 movel %a4@,%a0@ 4475c: 6000 ff00 braw 4465e 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) 44760: 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; } 44762: 2002 movel %d2,%d0 <== NOT EXECUTED 44764: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 4476a: 4e5e unlk %fp <== NOT EXECUTED 4476c: 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); 4476e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44770: 4eb9 0004 3360 jsr 43360 <== NOT EXECUTED return sc; 44776: 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; } 44778: 2002 movel %d2,%d0 <== NOT EXECUTED 4477a: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 44780: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000444c2 : * 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) { 444c2: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 444c6: 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); 444c8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 444cc: 42a7 clrl %sp@- <== NOT EXECUTED 444ce: 42a7 clrl %sp@- <== NOT EXECUTED 444d0: 4eb9 0004 75c0 jsr 475c0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 444d6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 444da: 4a80 tstl %d0 <== NOT EXECUTED 444dc: 6636 bnes 44514 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 444de: 2479 0006 045c moveal 6045c ,%a2 <== NOT EXECUTED 444e4: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 444e8: b092 cmpl %a2@,%d0 <== NOT EXECUTED 444ea: 6730 beqs 4451c <== 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, 444ec: 486e fffc pea %fp@(-4) <== NOT EXECUTED 444f0: 4879 0006 045c pea 6045c <== NOT EXECUTED 444f6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 444fa: 4eb9 0004 788c jsr 4788c <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 44500: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44504: 4a80 tstl %d0 <== NOT EXECUTED 44506: 674c beqs 44554 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 44508: 223c 0006 1ab8 movel #400056,%d1 <== NOT EXECUTED 4450e: 23c1 0006 045c movel %d1,6045c <== NOT EXECUTED return sc; } 44514: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 44518: 4e5e unlk %fp <== NOT EXECUTED 4451a: 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); 4451c: 4879 0006 045c pea 6045c <== NOT EXECUTED 44522: 42a7 clrl %sp@- <== NOT EXECUTED 44524: 4eb9 0004 77f8 jsr 477f8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4452a: 508f addql #8,%sp <== NOT EXECUTED 4452c: 4a80 tstl %d0 <== NOT EXECUTED 4452e: 66e4 bnes 44514 <== NOT EXECUTED free_user_env(tmp); 44530: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44532: 4eba ff34 jsr %pc@(44468 ) <== NOT EXECUTED 44536: 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, 44538: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4453c: 4879 0006 045c pea 6045c <== NOT EXECUTED 44542: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 44546: 4eb9 0004 788c jsr 4788c <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 4454c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44550: 4a80 tstl %d0 <== NOT EXECUTED 44552: 66b4 bnes 44508 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 44554: 487a ff12 pea %pc@(44468 ) <== NOT EXECUTED 44558: 4879 0006 045c pea 6045c <== NOT EXECUTED 4455e: 42a7 clrl %sp@- <== NOT EXECUTED 44560: 4eb9 0004 7754 jsr 47754 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 44566: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4456a: 4a80 tstl %d0 <== NOT EXECUTED 4456c: 669a bnes 44508 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 4456e: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 44572: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 44576: 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; 44578: 23d0 0006 045c movel %a0@,6045c <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } =============================================================================== 0004a920 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a920: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a922: 4e56 0000 linkw %fp,#0 4a926: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a92a: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a92c: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a92e: 7406 moveq #6,%d2 4a930: b480 cmpl %d0,%d2 4a932: 6736 beqs 4a96a <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4a934: 0801 0001 btst #1,%d1 4a938: 6726 beqs 4a960 <== NEVER TAKEN 4a93a: 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 ) { 4a93c: 0801 0000 btst #0,%d1 4a940: 6704 beqs 4a946 fcntl_flags |= O_NONBLOCK; 4a942: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4a946: 0801 0009 btst #9,%d1 4a94a: 6704 beqs 4a950 fcntl_flags |= O_APPEND; 4a94c: 7408 moveq #8,%d2 4a94e: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4a950: 0801 000a btst #10,%d1 4a954: 6704 beqs 4a95a fcntl_flags |= O_CREAT; 4a956: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 4a95a: 241f movel %sp@+,%d2 4a95c: 4e5e unlk %fp 4a95e: 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) { 4a960: 2001 movel %d1,%d0 <== NOT EXECUTED 4a962: e488 lsrl #2,%d0 <== NOT EXECUTED 4a964: 7401 moveq #1,%d2 <== NOT EXECUTED 4a966: c082 andl %d2,%d0 <== NOT EXECUTED 4a968: 60d2 bras 4a93c <== NOT EXECUTED uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a96a: 7002 moveq #2,%d0 <== NOT EXECUTED 4a96c: 60ce bras 4a93c <== NOT EXECUTED =============================================================================== 00050294 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 50294: 4e56 0000 linkw %fp,#0 50298: 2f0a movel %a2,%sp@- 5029a: 246e 0008 moveal %fp@(8),%a2 5029e: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 502a0: 4a8a tstl %a2 502a2: 675e beqs 50302 return EINVAL; *pointer = NULL; 502a4: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 502a6: 7003 moveq #3,%d0 502a8: b0b9 0006 52b8 cmpl 652b8 <_System_state_Current>,%d0 502ae: 6748 beqs 502f8 <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 502b0: 4eb9 0004 423a jsr 4423a uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 502b6: 42a7 clrl %sp@- 502b8: 2f2e 000c movel %fp@(12),%sp@- 502bc: 2f2e 0010 movel %fp@(16),%sp@- 502c0: 2f39 0006 3810 movel 63810 ,%sp@- 502c6: 4eb9 0004 9848 jsr 49848 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 502cc: 4fef 0010 lea %sp@(16),%sp 502d0: 2400 movel %d0,%d2 502d2: 673c beqs 50310 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 502d4: 2079 0006 3eb6 moveal 63eb6 ,%a0 502da: 4a88 tstl %a0 502dc: 670a beqs 502e8 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 502de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 502e0: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 502e4: 4e90 jsr %a0@ <== NOT EXECUTED 502e6: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 502e8: 2482 movel %d2,%a2@ return 0; } 502ea: 242e fff8 movel %fp@(-8),%d2 */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 502ee: 4280 clrl %d0 return 0; } 502f0: 246e fffc moveal %fp@(-4),%a2 502f4: 4e5e unlk %fp 502f6: 4e75 rts *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 502f8: 4eb9 0004 41e0 jsr 441e0 502fe: 4a00 tstb %d0 50300: 66ae bnes 502b0 <== ALWAYS TAKEN (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 50302: 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; 50306: 7016 moveq #22,%d0 } 50308: 246e fffc moveal %fp@(-4),%a2 5030c: 4e5e unlk %fp 5030e: 4e75 rts 50310: 242e fff8 movel %fp@(-8),%d2 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 50314: 700c moveq #12,%d0 (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 50316: 246e fffc moveal %fp@(-4),%a2 5031a: 4e5e unlk %fp ... =============================================================================== 00047770 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 47770: 4e56 0000 linkw %fp,#0 47774: 2f0a movel %a2,%sp@- 47776: 246e 0010 moveal %fp@(16),%a2 4777a: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 4777c: 4a8a tstl %a2 4777e: 6766 beqs 477e6 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47780: 2f2e 000c movel %fp@(12),%sp@- 47784: 2f2e 0008 movel %fp@(8),%sp@- 47788: 4eb9 0004 937c jsr 4937c <_Objects_Get_information> if ( !obj_info ) 4778e: 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 ); 47790: 2040 moveal %d0,%a0 if ( !obj_info ) 47792: 4a80 tstl %d0 47794: 675e beqs 477f4 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 47796: 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; 4779a: 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; 4779c: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 477a2: 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; 477a6: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 477ac: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477b0: 6750 beqs 47802 <== NEVER TAKEN 477b2: 2068 0018 moveal %a0@(24),%a0 477b6: 7201 moveq #1,%d1 477b8: 7001 moveq #1,%d0 477ba: 93c9 subal %a1,%a1 477bc: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 477be: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 477c2: 6718 beqs 477dc 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++ ) 477c4: 2200 movel %d0,%d1 477c6: b082 cmpl %d2,%d0 477c8: 63f2 blss 477bc <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 477ca: 2549 000e movel %a1,%a2@(14) 477ce: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 477d0: 242e fff8 movel %fp@(-8),%d2 477d4: 246e fffc moveal %fp@(-4),%a2 477d8: 4e5e unlk %fp 477da: 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++; 477dc: 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++ ) 477de: 2200 movel %d0,%d1 477e0: b082 cmpl %d2,%d0 477e2: 63d8 blss 477bc <== NEVER TAKEN 477e4: 60e4 bras 477ca unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477e6: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 477ea: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477ec: 246e fffc moveal %fp@(-4),%a2 477f0: 4e5e unlk %fp 477f2: 4e75 rts 477f4: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 477f8: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477fa: 246e fffc moveal %fp@(-4),%a2 477fe: 4e5e unlk %fp 47800: 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++ ) 47802: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 47804: 4280 clrl %d0 <== NOT EXECUTED 47806: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 4780a: 60c4 bras 477d0 <== NOT EXECUTED =============================================================================== 00042526 : void rtems_panic( const char *printf_format, ... ) { 42526: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 4252a: 486e 000c pea %fp@(12) <== NOT EXECUTED 4252e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42532: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 42538: 4eba fdf6 jsr %pc@(42330 ) <== NOT EXECUTED 4253c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED va_end(arglist); } 42540: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005692c : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 5692c: 4e56 ffe8 linkw %fp,#-24 56930: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 56934: 242e 0008 movel %fp@(8),%d2 56938: 2a2e 000c movel %fp@(12),%d5 5693c: 282e 0010 movel %fp@(16),%d4 56940: 262e 0014 movel %fp@(20),%d3 56944: 246e 001c moveal %fp@(28),%a2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 56948: 4a82 tstl %d2 5694a: 673a beqs 56986 return RTEMS_INVALID_NAME; if ( !starting_address ) 5694c: 4a85 tstl %d5 5694e: 671e beqs 5696e return RTEMS_INVALID_ADDRESS; if ( !id ) 56950: 4a8a tstl %a2 56952: 671a beqs 5696e <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 56954: 4a84 tstl %d4 56956: 6722 beqs 5697a 56958: 4a83 tstl %d3 5695a: 671e beqs 5697a 5695c: b684 cmpl %d4,%d3 5695e: 621a bhis 5697a 56960: 7003 moveq #3,%d0 56962: c083 andl %d3,%d0 56964: 6614 bnes 5697a !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 56966: 103c 0003 moveb #3,%d0 5696a: c085 andl %d5,%d0 5696c: 6724 beqs 56992 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 5696e: 7009 moveq #9,%d0 } 56970: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56976: 4e5e unlk %fp 56978: 4e75 rts 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 5697a: 7008 moveq #8,%d0 } 5697c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56982: 4e5e unlk %fp 56984: 4e75 rts rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 56986: 7003 moveq #3,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56988: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5698e: 4e5e unlk %fp 56990: 4e75 rts 56992: 2039 0007 e7cc movel 7e7cc <_Thread_Dispatch_disable_level>,%d0 56998: 5280 addql #1,%d0 5699a: 23c0 0007 e7cc movel %d0,7e7cc <_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 ); 569a0: 4879 0007 e656 pea 7e656 <_Partition_Information> 569a6: 4eb9 0005 b4cc jsr 5b4cc <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 569ac: 588f addql #4,%sp 569ae: 2640 moveal %d0,%a3 569b0: 4a80 tstl %d0 569b2: 675a beqs 56a0e _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 569b4: 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, 569b8: 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; 569ba: 276e 0018 001c movel %fp@(24),%a3@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 569c0: 4c43 0000 remul %d3,%d0,%d0 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 569c4: 2744 0014 movel %d4,%a3@(20) the_partition->buffer_size = buffer_size; 569c8: 2743 0018 movel %d3,%a3@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 569cc: 42ab 0020 clrl %a3@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 569d0: 2f03 movel %d3,%sp@- 569d2: 2f00 movel %d0,%sp@- 569d4: 2f05 movel %d5,%sp@- 569d6: 486b 0024 pea %a3@(36) 569da: 4eb9 0005 9f44 jsr 59f44 <_Chain_Initialize> 569e0: 202b 0008 movel %a3@(8),%d0 569e4: 4281 clrl %d1 569e6: 2079 0007 e66e moveal 7e66e <_Partition_Information+0x18>,%a0 569ec: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 569ee: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 569f2: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 569f6: 2480 movel %d0,%a2@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 569f8: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 569fe: 4fef 0010 lea %sp@(16),%sp name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 56a02: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 56a04: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a0a: 4e5e unlk %fp 56a0c: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 56a0e: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 56a14: 7005 moveq #5,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56a16: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a1c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00056b40 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 56b40: 4e56 fffc linkw %fp,#-4 56b44: 2f0a movel %a2,%sp@- 56b46: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 56b48: 486e fffc pea %fp@(-4) 56b4c: 2f2e 0008 movel %fp@(8),%sp@- 56b50: 4879 0007 e656 pea 7e656 <_Partition_Information> 56b56: 242e 000c movel %fp@(12),%d2 56b5a: 4eb9 0005 b9a4 jsr 5b9a4 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56b60: 4fef 000c lea %sp@(12),%sp 56b64: 2440 moveal %d0,%a2 56b66: 4aae fffc tstl %fp@(-4) 56b6a: 670e beqs 56b7a case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b6c: 242e fff4 movel %fp@(-12),%d2 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56b70: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b72: 246e fff8 moveal %fp@(-8),%a2 56b76: 4e5e unlk %fp 56b78: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 56b7a: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 56b7e: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 56b82: b082 cmpl %d2,%d0 56b84: 623c bhis 56bc2 56b86: d280 addl %d0,%d1 56b88: b282 cmpl %d2,%d1 56b8a: 6536 bcss 56bc2 <== NEVER TAKEN return ( 56b8c: 2202 movel %d2,%d1 56b8e: 9280 subl %d0,%d1 56b90: 2001 movel %d1,%d0 56b92: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 56b98: 4a81 tstl %d1 56b9a: 6626 bnes 56bc2 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 56b9c: 2f02 movel %d2,%sp@- 56b9e: 486a 0024 pea %a2@(36) 56ba2: 4eb9 0005 9ed0 jsr 59ed0 <_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; 56ba8: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 56bac: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bb2: 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; 56bb6: 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(); 56bb8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bba: 246e fff8 moveal %fp@(-8),%a2 56bbe: 4e5e unlk %fp 56bc0: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56bc2: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bc8: 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(); 56bcc: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bce: 246e fff8 moveal %fp@(-8),%a2 56bd2: 4e5e unlk %fp ... =============================================================================== 0004c70e : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4c70e: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 4c712: 4a39 0005 dda4 tstb 5dda4 4c718: 6708 beqs 4c722 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 4c71a: 4ab9 0005 e724 tstl 5e724 <== NOT EXECUTED 4c720: 6704 beqs 4c726 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 4c722: 4e5e unlk %fp 4c724: 4e75 rts if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 4c726: 4879 0005 e724 pea 5e724 <== NOT EXECUTED 4c72c: 42a7 clrl %sp@- <== NOT EXECUTED 4c72e: 4878 0054 pea 54 <== NOT EXECUTED 4c732: 4878 0001 pea 1 <== NOT EXECUTED 4c736: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4c73c: 4eb9 0004 5a8c jsr 45a8c <== 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) 4c742: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4c746: 4a80 tstl %d0 <== NOT EXECUTED 4c748: 6610 bnes 4c75a <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4c74a: 4eb9 0004 55fc jsr 455fc <== NOT EXECUTED rtems_pipe_no = now; } 4c750: 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; 4c752: 33c0 0005 e72c movew %d0,5e72c <== NOT EXECUTED } 4c758: 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); 4c75a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c75c: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED =============================================================================== 00055fe0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 55fe0: 4e56 fffc linkw %fp,#-4 55fe4: 2f0a movel %a2,%sp@- 55fe6: 246e 0010 moveal %fp@(16),%a2 55fea: 2f02 movel %d2,%sp@- 55fec: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 55ff0: 4a8a tstl %a2 55ff2: 6762 beqs 56056 <== NEVER TAKEN 55ff4: 486e fffc pea %fp@(-4) 55ff8: 2f2e 0008 movel %fp@(8),%sp@- 55ffc: 4879 0007 e61c pea 7e61c <_Dual_ported_memory_Information> 56002: 4eb9 0005 b9a4 jsr 5b9a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 56008: 4fef 000c lea %sp@(12),%sp 5600c: 4aae fffc tstl %fp@(-4) 56010: 6624 bnes 56036 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 56012: 2202 movel %d2,%d1 56014: 2040 moveal %d0,%a0 56016: 92a8 0010 subl %a0@(16),%d1 if ( ending > the_port->length ) 5601a: b2a8 0018 cmpl %a0@(24),%d1 5601e: 6324 blss 56044 *external = internal; 56020: 2482 movel %d2,%a2@ else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 56022: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 56028: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5602a: 242e fff4 movel %fp@(-12),%d2 5602e: 246e fff8 moveal %fp@(-8),%a2 56032: 4e5e unlk %fp 56034: 4e75 rts 56036: 242e fff4 movel %fp@(-12),%d2 if ( !external ) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 5603a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5603c: 246e fff8 moveal %fp@(-8),%a2 56040: 4e5e unlk %fp 56042: 4e75 rts case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 56044: 2040 moveal %d0,%a0 56046: d2a8 0014 addl %a0@(20),%d1 5604a: 2481 movel %d1,%a2@ ending ); _Thread_Enable_dispatch(); 5604c: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 56052: 4280 clrl %d0 56054: 60d4 bras 5602a case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56056: 242e fff4 movel %fp@(-12),%d2 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 5605a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5605c: 246e fff8 moveal %fp@(-8),%a2 56060: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046dc0 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 46dc0: 4e56 ffec linkw %fp,#-20 46dc4: 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 *) 46dc8: 486e fffc pea %fp@(-4) 46dcc: 242e 0008 movel %fp@(8),%d2 46dd0: 2f02 movel %d2,%sp@- 46dd2: 4879 0006 0fc0 pea 60fc0 <_Rate_monotonic_Information> 46dd8: 4eb9 0004 9074 jsr 49074 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 46dde: 4fef 000c lea %sp@(12),%sp 46de2: 2440 moveal %d0,%a2 46de4: 4aae fffc tstl %fp@(-4) 46de8: 661e bnes 46e08 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 46dea: 2039 0006 117e movel 6117e <_Thread_Executing>,%d0 46df0: b0aa 0040 cmpl %a2@(64),%d0 46df4: 671e beqs 46e14 _Thread_Enable_dispatch(); 46df6: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch> 46dfc: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46dfe: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e04: 4e5e unlk %fp 46e06: 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; 46e08: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46e0a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e10: 4e5e unlk %fp 46e12: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 46e14: 4aae 000c tstl %fp@(12) 46e18: 6700 00ce beqw 46ee8 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 46e1c: 203c 0000 0700 movel #1792,%d0 46e22: 40c3 movew %sr,%d3 46e24: 8083 orl %d3,%d0 46e26: 46c0 movew %d0,%sr switch ( the_period->state ) { 46e28: 202a 0038 movel %a2@(56),%d0 46e2c: 7202 moveq #2,%d1 46e2e: b280 cmpl %d0,%d1 46e30: 6700 00dc beqw 46f0e 46e34: 123c 0004 moveb #4,%d1 46e38: b280 cmpl %d0,%d1 46e3a: 6762 beqs 46e9e 46e3c: 4a80 tstl %d0 46e3e: 66c8 bnes 46e08 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 46e40: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 46e42: 2f0a movel %a2,%sp@- 46e44: 2d40 fff8 movel %d0,%fp@(-8) 46e48: 4eb9 0004 6b78 jsr 46b78 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46e4e: 223c 0004 7224 movel #291364,%d1 the_watchdog->id = id; 46e54: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46e58: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46e5c: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 46e60: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46e62: 2542 001c movel %d2,%a2@(28) 46e66: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46e6a: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 46e6e: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 46e72: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46e76: 486a 0010 pea %a2@(16) 46e7a: 4879 0006 119c pea 6119c <_Watchdog_Ticks_chain> 46e80: 4eb9 0004 abcc jsr 4abcc <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46e86: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46e8c: 202e fff8 movel %fp@(-8),%d0 46e90: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46e94: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46e9a: 4e5e unlk %fp 46e9c: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 46e9e: 2f0a movel %a2,%sp@- 46ea0: 4eb9 0004 6ca6 jsr 46ca6 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 46ea6: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 46ea8: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46eaa: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46eac: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 46eb0: 2541 0038 movel %d1,%a2@(56) 46eb4: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 46eb8: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46ebc: 486a 0010 pea %a2@(16) 46ec0: 4879 0006 119c pea 6119c <_Watchdog_Ticks_chain> 46ec6: 2d40 fff8 movel %d0,%fp@(-8) 46eca: 4eb9 0004 abcc jsr 4abcc <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 46ed0: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 46ed6: 202e fff8 movel %fp@(-8),%d0 46eda: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46ede: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46ee4: 4e5e unlk %fp 46ee6: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 46ee8: 202a 0038 movel %a2@(56),%d0 46eec: 7204 moveq #4,%d1 46eee: b280 cmpl %d0,%d1 46ef0: 6400 009c bccw 46f8e 46ef4: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 46ef6: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 46efa: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 46f00: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46f04: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46f0a: 4e5e unlk %fp 46f0c: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 46f0e: 2f0a movel %a2,%sp@- 46f10: 4eb9 0004 6ca6 jsr 46ca6 <_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; 46f16: 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; 46f1a: 7001 moveq #1,%d0 the_period->next_length = length; 46f1c: 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; 46f20: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 46f24: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 46f26: 2079 0006 117e moveal 6117e <_Thread_Executing>,%a0 46f2c: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 46f32: 4878 4000 pea 4000 46f36: 2f08 movel %a0,%sp@- 46f38: 4eb9 0004 a298 jsr 4a298 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 46f3e: 203c 0000 0700 movel #1792,%d0 46f44: 40c1 movew %sr,%d1 46f46: 8081 orl %d1,%d0 46f48: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 46f4a: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 46f4c: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 46f50: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 46f54: 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 ) 46f56: 7203 moveq #3,%d1 46f58: 4fef 000c lea %sp@(12),%sp 46f5c: b280 cmpl %d0,%d1 46f5e: 6712 beqs 46f72 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 46f60: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch> 46f66: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46f68: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46f6e: 4e5e unlk %fp 46f70: 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 ); 46f72: 4878 4000 pea 4000 46f76: 2f39 0006 117e movel 6117e <_Thread_Executing>,%sp@- 46f7c: 4eb9 0004 9530 jsr 49530 <_Thread_Clear_state> 46f82: 508f addql #8,%sp _Thread_Enable_dispatch(); 46f84: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch> 46f8a: 4280 clrl %d0 46f8c: 60da bras 46f68 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 46f8e: 41f9 0005 e592 lea 5e592 ,%a0 46f94: 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(); 46f98: 2d40 fff8 movel %d0,%fp@(-8) 46f9c: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch> return( return_value ); 46fa2: 202e fff8 movel %fp@(-8),%d0 46fa6: 6000 ff5c braw 46f04 ... =============================================================================== 00046fac : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 46fac: 4e56 ff78 linkw %fp,#-136 46fb0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 46fb4: 262e 0008 movel %fp@(8),%d3 46fb8: 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 ) 46fbc: 4a8a tstl %a2 46fbe: 6700 0082 beqw 47042 return; (*print)( context, "Period information by period\n" ); 46fc2: 4879 0005 e5a6 pea 5e5a6 46fc8: 2f03 movel %d3,%sp@- 46fca: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 46fcc: 4879 0005 e5c4 pea 5e5c4 46fd2: 2f03 movel %d3,%sp@- 46fd4: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 46fd6: 4879 0005 e5e6 pea 5e5e6 46fdc: 2f03 movel %d3,%sp@- 46fde: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 46fe0: 4879 0005 e609 pea 5e609 46fe6: 2f03 movel %d3,%sp@- 46fe8: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 46fea: 4fef 001c lea %sp@(28),%sp 46fee: 2ebc 0005 e654 movel #386644,%sp@ 46ff4: 2f03 movel %d3,%sp@- 46ff6: 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 ; 46ff8: 2439 0006 0fc6 movel 60fc6 <_Rate_monotonic_Information+0x6>,%d2 46ffe: 508f addql #8,%sp 47000: b4b9 0006 0fca cmpl 60fca <_Rate_monotonic_Information+0xa>,%d2 47006: 623a bhis 47042 <== NEVER TAKEN 47008: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 4700a: 2a0e movel %fp,%d5 4700c: 0684 ffff ffa2 addil #-94,%d4 47012: 47f9 0004 d260 lea 4d260 ,%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 ); 47018: 4bf9 0004 d320 lea 4d320 ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 4701e: 5b85 subql #5,%d5 47020: 49f9 0004 7304 lea 47304 ,%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 ); 47026: 2e3c 0004 a7d4 movel #305108,%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 ); 4702c: 2f04 movel %d4,%sp@- 4702e: 2f02 movel %d2,%sp@- 47030: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 47032: 508f addql #8,%sp 47034: 4a80 tstl %d0 47036: 6714 beqs 4704c * 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++ ) { 47038: 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 ; 4703a: b4b9 0006 0fca cmpl 60fca <_Rate_monotonic_Information+0xa>,%d2 47040: 63ea blss 4702c the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 47042: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47048: 4e5e unlk %fp 4704a: 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 ); 4704c: 486e ffda pea %fp@(-38) 47050: 2f02 movel %d2,%sp@- 47052: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47054: 2f05 movel %d5,%sp@- 47056: 4878 0005 pea 5 4705a: 2f2e ffda movel %fp@(-38),%sp@- 4705e: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 47060: 2f2e ffa6 movel %fp@(-90),%sp@- 47064: 2f2e ffa2 movel %fp@(-94),%sp@- 47068: 2f05 movel %d5,%sp@- 4706a: 2f02 movel %d2,%sp@- 4706c: 4879 0005 e6a0 pea 5e6a0 47072: 2f03 movel %d3,%sp@- 47074: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 47076: 202e ffa2 movel %fp@(-94),%d0 4707a: 4fef 002c lea %sp@(44),%sp 4707e: 6618 bnes 47098 (*print)( context, "\n" ); 47080: 4879 0005 ea5e pea 5ea5e * 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++ ) { 47086: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 47088: 2f03 movel %d3,%sp@- 4708a: 4e92 jsr %a2@ continue; 4708c: 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 ; 4708e: b4b9 0006 0fca cmpl 60fca <_Rate_monotonic_Information+0xa>,%d2 47094: 6396 blss 4702c <== ALWAYS TAKEN 47096: 60aa bras 47042 <== 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 ); 47098: 486e fff2 pea %fp@(-14) 4709c: 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++ ) { 4709e: 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 ); 470a0: 2f00 movel %d0,%sp@- 470a2: 486e ffba pea %fp@(-70) 470a6: 4e90 jsr %a0@ (*print)( context, 470a8: 202e fff6 movel %fp@(-10),%d0 470ac: 223c 0000 03e8 movel #1000,%d1 470b2: 4c41 0800 remsl %d1,%d0,%d0 470b6: 2c2e ffb6 movel %fp@(-74),%d6 470ba: 2f00 movel %d0,%sp@- 470bc: 2001 movel %d1,%d0 470be: 2f2e fff2 movel %fp@(-14),%sp@- 470c2: 4c40 6806 remsl %d0,%d6,%d6 470c6: 202e ffae movel %fp@(-82),%d0 470ca: 2246 moveal %d6,%a1 470cc: 223c 0000 03e8 movel #1000,%d1 470d2: 2f09 movel %a1,%sp@- 470d4: 2f2e ffb2 movel %fp@(-78),%sp@- 470d8: 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, 470dc: 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, 470e2: 2f00 movel %d0,%sp@- 470e4: 2f2e ffaa movel %fp@(-86),%sp@- 470e8: 4879 0005 e6b7 pea 5e6b7 470ee: 2f03 movel %d3,%sp@- 470f0: 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); 470f2: 4fef 002c lea %sp@(44),%sp 470f6: 2047 moveal %d7,%a0 470f8: 486e fff2 pea %fp@(-14) 470fc: 2f2e ffa2 movel %fp@(-94),%sp@- 47100: 486e ffd2 pea %fp@(-46) 47104: 4e90 jsr %a0@ (*print)( context, 47106: 202e fff6 movel %fp@(-10),%d0 4710a: 4c46 0800 remsl %d6,%d0,%d0 4710e: 222e ffce movel %fp@(-50),%d1 47112: 2f00 movel %d0,%sp@- 47114: 2f2e fff2 movel %fp@(-14),%sp@- 47118: 4c46 1801 remsl %d6,%d1,%d1 4711c: 202e ffc6 movel %fp@(-58),%d0 47120: 2241 moveal %d1,%a1 47122: 2f09 movel %a1,%sp@- 47124: 2f2e ffca movel %fp@(-54),%sp@- 47128: 4c46 0800 remsl %d6,%d0,%d0 4712c: 2f00 movel %d0,%sp@- 4712e: 2f2e ffc2 movel %fp@(-62),%sp@- 47132: 4879 0005 e6d6 pea 5e6d6 47138: 2f03 movel %d3,%sp@- 4713a: 4e92 jsr %a2@ 4713c: 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 ; 47140: b4b9 0006 0fca cmpl 60fca <_Rate_monotonic_Information+0xa>,%d2 47146: 6300 fee4 blsw 4702c 4714a: 6000 fef6 braw 47042 <== NOT EXECUTED =============================================================================== 00047168 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 47168: 4e56 0000 linkw %fp,#0 4716c: 2039 0006 10c4 movel 610c4 <_Thread_Dispatch_disable_level>,%d0 47172: 5280 addql #1,%d0 47174: 2f0a movel %a2,%sp@- 47176: 23c0 0006 10c4 movel %d0,610c4 <_Thread_Dispatch_disable_level> 4717c: 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 ; 4717e: 2439 0006 0fc6 movel 60fc6 <_Rate_monotonic_Information+0x6>,%d2 47184: b4b9 0006 0fca cmpl 60fca <_Rate_monotonic_Information+0xa>,%d2 4718a: 6216 bhis 471a2 <== NEVER TAKEN 4718c: 45f9 0004 71b4 lea 471b4 ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 47192: 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++ ) { 47194: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 47196: 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 ; 47198: 588f addql #4,%sp 4719a: b4b9 0006 0fca cmpl 60fca <_Rate_monotonic_Information+0xa>,%d2 471a0: 63f0 blss 47192 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 471a2: 242e fff8 movel %fp@(-8),%d2 471a6: 246e fffc moveal %fp@(-4),%a2 471aa: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 471ac: 4ef9 0004 9904 jmp 49904 <_Thread_Enable_dispatch> ... =============================================================================== 00057468 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 57468: 4e56 ffec linkw %fp,#-20 5746c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57470: 262e 0008 movel %fp@(8),%d3 57474: 242e 000c movel %fp@(12),%d2 57478: 246e 001c moveal %fp@(28),%a2 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 5747c: 4a83 tstl %d3 5747e: 6700 0096 beqw 57516 return RTEMS_INVALID_NAME; if ( !starting_address ) 57482: 4a82 tstl %d2 57484: 670a beqs 57490 return RTEMS_INVALID_ADDRESS; if ( !id ) 57486: 4a8a tstl %a2 57488: 6706 beqs 57490 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 5748a: 7003 moveq #3,%d0 5748c: c082 andl %d2,%d0 5748e: 670c beqs 5749c return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 57490: 7009 moveq #9,%d0 } 57492: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57498: 4e5e unlk %fp 5749a: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5749c: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- 574a2: 4eb9 0005 9e3c jsr 59e3c <_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 ); 574a8: 4879 0007 e6ca pea 7e6ca <_Region_Information> 574ae: 4eb9 0005 b4cc jsr 5b4cc <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 574b4: 508f addql #8,%sp 574b6: 2640 moveal %d0,%a3 574b8: 4a80 tstl %d0 574ba: 6766 beqs 57522 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 574bc: 2f2e 0014 movel %fp@(20),%sp@- 574c0: 2f2e 0010 movel %fp@(16),%sp@- 574c4: 2f02 movel %d2,%sp@- 574c6: 486b 0068 pea %a3@(104) 574ca: 4eb9 0005 af50 jsr 5af50 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 574d0: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 574d4: 2740 005c movel %d0,%a3@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 574d8: 6662 bnes 5753c */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 574da: 2f0b movel %a3,%sp@- 574dc: 4879 0007 e6ca pea 7e6ca <_Region_Information> 574e2: 103c 0008 moveb #8,%d0 574e6: 2d40 fffc movel %d0,%fp@(-4) 574ea: 4eb9 0005 b804 jsr 5b804 <_Objects_Free> 574f0: 202e fffc movel %fp@(-4),%d0 574f4: 508f addql #8,%sp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 574f6: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- 574fc: 2d40 fffc movel %d0,%fp@(-4) 57500: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 57506: 202e fffc movel %fp@(-4),%d0 5750a: 588f addql #4,%sp } 5750c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57512: 4e5e unlk %fp 57514: 4e75 rts ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 57516: 7003 moveq #3,%d0 } } _RTEMS_Unlock_allocator(); return return_status; } 57518: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5751e: 4e5e unlk %fp 57520: 4e75 rts *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57522: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 57528: 7005 moveq #5,%d0 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 5752a: 2d40 fffc movel %d0,%fp@(-4) 5752e: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 57534: 202e fffc movel %fp@(-4),%d0 57538: 588f addql #4,%sp 5753a: 60d0 bras 5750c return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 5753c: 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( 57540: 222e 0018 movel %fp@(24),%d1 } else { the_region->starting_address = starting_address; the_region->length = length; 57544: 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( 57548: e489 lsrl #2,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 5754a: 242e 0014 movel %fp@(20),%d2 the_region->attribute_set = attribute_set; 5754e: 206e 0018 moveal %fp@(24),%a0 } else { the_region->starting_address = starting_address; the_region->length = length; 57552: 2740 0054 movel %d0,%a3@(84) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57556: 4280 clrl %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 57558: 2742 0058 movel %d2,%a3@(88) the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 5755c: 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; 5755e: 2748 0060 movel %a0,%a3@(96) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57562: 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; 57564: 42ab 0064 clrl %a3@(100) _Thread_queue_Initialize( 57568: 4878 0006 pea 6 5756c: 4878 0040 pea 40 57570: 2f02 movel %d2,%sp@- 57572: 486b 0010 pea %a3@(16) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 57576: 4282 clrl %d2 57578: 2d40 fffc movel %d0,%fp@(-4) 5757c: 4eb9 0005 cac8 jsr 5cac8 <_Thread_queue_Initialize> 57582: 222b 0008 movel %a3@(8),%d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57586: 4fef 0010 lea %sp@(16),%sp 5758a: 2079 0007 e6e2 moveal 7e6e2 <_Region_Information+0x18>,%a0 57590: 3401 movew %d1,%d2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 57592: 2743 000c movel %d3,%a3@(12) 57596: 202e fffc movel %fp@(-4),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5759a: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 5759e: 2481 movel %d1,%a2@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 575a0: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- 575a6: 2d40 fffc movel %d0,%fp@(-4) 575aa: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 575b0: 202e fffc movel %fp@(-4),%d0 575b4: 588f addql #4,%sp 575b6: 6000 ff54 braw 5750c ... =============================================================================== 0005766c : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 5766c: 4e56 fff8 linkw %fp,#-8 57670: 2f0a movel %a2,%sp@- 57672: 2f02 movel %d2,%sp@- 57674: 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 ) 57678: 677e beqs 576f8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5767a: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- 57680: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 57686: 486e fff8 pea %fp@(-8) 5768a: 2f2e 0008 movel %fp@(8),%sp@- 5768e: 4879 0007 e6ca pea 7e6ca <_Region_Information> 57694: 4eb9 0005 b968 jsr 5b968 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5769a: 4fef 0010 lea %sp@(16),%sp 5769e: 2440 moveal %d0,%a2 576a0: 4aae fff8 tstl %fp@(-8) 576a4: 6640 bnes 576e6 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 576a6: 486e fffc pea %fp@(-4) 576aa: 2f2e 0010 movel %fp@(16),%sp@- 576ae: 2f02 movel %d2,%sp@- 576b0: 486a 0068 pea %a2@(104) 576b4: 4eb9 0005 ac40 jsr 5ac40 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 576ba: 4fef 0010 lea %sp@(16),%sp 576be: 4a80 tstl %d0 576c0: 6748 beqs 5770a the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 576c2: 7201 moveq #1,%d1 576c4: b280 cmpl %d0,%d1 576c6: 6760 beqs 57728 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576c8: 2f39 0007 e87e movel 7e87e <_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 ) { 576ce: 7418 moveq #24,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576d0: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 576d6: 588f addql #4,%sp } 576d8: 2002 movel %d2,%d0 576da: 242e fff0 movel %fp@(-16),%d2 576de: 246e fff4 moveal %fp@(-12),%a2 576e2: 4e5e unlk %fp 576e4: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576e6: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 576ec: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576ee: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 576f4: 588f addql #4,%sp 576f6: 60e0 bras 576d8 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 576f8: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 576fc: 2002 movel %d2,%d0 576fe: 242e fff0 movel %fp@(-16),%d2 57702: 246e fff4 moveal %fp@(-12),%a2 57706: 4e5e unlk %fp 57708: 4e75 rts length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 5770a: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 5770e: d1aa 005c addl %d0,%a2@(92) 57712: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 57714: d1aa 0054 addl %d0,%a2@(84) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57718: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- 5771e: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 57724: 588f addql #4,%sp 57726: 60b0 bras 576d8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57728: 2f39 0007 e87e movel 7e87e <_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 ) { 5772e: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57730: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 57736: 588f addql #4,%sp 57738: 609e bras 576d8 ... =============================================================================== 000577d4 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 577d4: 4e56 fffc linkw %fp,#-4 577d8: 2f02 movel %d2,%sp@- 577da: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 577de: 6766 beqs 57846 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 577e0: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- 577e6: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 577ec: 486e fffc pea %fp@(-4) 577f0: 2f2e 0008 movel %fp@(8),%sp@- 577f4: 4879 0007 e6ca pea 7e6ca <_Region_Information> 577fa: 4eb9 0005 b968 jsr 5b968 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57800: 4fef 0010 lea %sp@(16),%sp 57804: 4aae fffc tstl %fp@(-4) 57808: 662a bnes 57834 case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 5780a: 2f02 movel %d2,%sp@- 5780c: 2040 moveal %d0,%a0 5780e: 4868 0068 pea %a0@(104) 57812: 4282 clrl %d2 57814: 4eb9 0005 aec8 jsr 5aec8 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 5781a: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5781c: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- 57822: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 57828: 588f addql #4,%sp } 5782a: 2002 movel %d2,%d0 5782c: 242e fff8 movel %fp@(-8),%d2 57830: 4e5e unlk %fp 57832: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57834: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 5783a: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5783c: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 57842: 588f addql #4,%sp 57844: 60e4 bras 5782a { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 57846: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 5784a: 2002 movel %d2,%d0 5784c: 242e fff8 movel %fp@(-8),%d2 57850: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000579c0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 579c0: 4e56 fffc linkw %fp,#-4 579c4: 2f03 movel %d3,%sp@- 579c6: 262e 0010 movel %fp@(16),%d3 579ca: 2f02 movel %d2,%sp@- 579cc: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 579d0: 6700 0092 beqw 57a64 return RTEMS_INVALID_ADDRESS; if ( !size ) 579d4: 4a83 tstl %d3 579d6: 6700 008c beqw 57a64 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 579da: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- 579e0: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 579e6: 486e fffc pea %fp@(-4) 579ea: 2f2e 0008 movel %fp@(8),%sp@- 579ee: 4879 0007 e6ca pea 7e6ca <_Region_Information> 579f4: 4eb9 0005 b968 jsr 5b968 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 579fa: 222e fffc movel %fp@(-4),%d1 579fe: 4fef 0010 lea %sp@(16),%sp 57a02: 6636 bnes 57a3a case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57a04: 2f03 movel %d3,%sp@- 57a06: 2040 moveal %d0,%a0 57a08: 2f02 movel %d2,%sp@- 57a0a: 4868 0068 pea %a0@(104) 57a0e: 4eb9 0005 b3a4 jsr 5b3a4 <_Heap_Size_of_alloc_area> 57a14: 4fef 000c lea %sp@(12),%sp 57a18: 4a00 tstb %d0 57a1a: 6624 bnes 57a40 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a1c: 2f39 0007 e87e movel 7e87e <_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 ) ) 57a22: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a24: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 57a2a: 588f addql #4,%sp <== NOT EXECUTED } 57a2c: 2002 movel %d2,%d0 57a2e: 242e fff4 movel %fp@(-12),%d2 57a32: 262e fff8 movel %fp@(-8),%d3 57a36: 4e5e unlk %fp 57a38: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57a3a: 7001 moveq #1,%d0 57a3c: b081 cmpl %d1,%d0 57a3e: 6712 beqs 57a52 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a40: 2f39 0007 e87e movel 7e87e <_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 ) ) 57a46: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a48: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 57a4e: 588f addql #4,%sp 57a50: 60da bras 57a2c case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a52: 2f39 0007 e87e movel 7e87e <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57a58: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a5a: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock> return return_status; 57a60: 588f addql #4,%sp 57a62: 60c8 bras 57a2c 57a64: 7409 moveq #9,%d2 } 57a66: 2002 movel %d2,%d0 57a68: 242e fff4 movel %fp@(-12),%d2 57a6c: 262e fff8 movel %fp@(-8),%d3 57a70: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045a8c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 45a8c: 4e56 ffd4 linkw %fp,#-44 45a90: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 45a94: 262e 0008 movel %fp@(8),%d3 45a98: 242e 0010 movel %fp@(16),%d2 45a9c: 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 ) ) 45aa0: 4a83 tstl %d3 45aa2: 6748 beqs 45aec return RTEMS_INVALID_NAME; if ( !id ) 45aa4: 4a8a tstl %a2 45aa6: 6700 00ea beqw 45b92 * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 45aaa: 2002 movel %d2,%d0 45aac: 0280 0000 00c0 andil #192,%d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 45ab2: 6744 beqs 45af8 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45ab4: 7230 moveq #48,%d1 45ab6: 7810 moveq #16,%d4 45ab8: c282 andl %d2,%d1 45aba: b881 cmpl %d1,%d4 45abc: 670c beqs 45aca name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 45abe: 700b moveq #11,%d0 } 45ac0: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ac6: 4e5e unlk %fp 45ac8: 4e75 rts #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45aca: 44c2 movew %d2,%ccr 45acc: 66f0 bnes 45abe _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 45ace: 0c80 0000 00c0 cmpil #192,%d0 45ad4: 67e8 beqs 45abe _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45ad6: 7001 moveq #1,%d0 45ad8: b0ae 000c cmpl %fp@(12),%d0 45adc: 6420 bccs 45afe 45ade: 103c 000a moveb #10,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45ae2: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ae8: 4e5e unlk %fp 45aea: 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 ) ) 45aec: 7003 moveq #3,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45aee: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45af4: 4e5e unlk %fp 45af6: 4e75 rts */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 45af8: 7830 moveq #48,%d4 45afa: 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 ) ) 45afc: 66d8 bnes 45ad6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45afe: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 ef78 movel %d0,5ef78 <_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 ); 45b0c: 4879 0005 eeb0 pea 5eeb0 <_Semaphore_Information> 45b12: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45b18: 588f addql #4,%sp 45b1a: 2640 moveal %d0,%a3 45b1c: 4a80 tstl %d0 45b1e: 6700 00d8 beqw 45bf8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45b22: 2742 0010 movel %d2,%a3@(16) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 45b26: 4a84 tstl %d4 45b28: 6774 beqs 45b9e /* * 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; 45b2a: 44c2 movew %d2,%ccr 45b2c: 56c0 sne %d0 45b2e: 49c0 extbl %d0 45b30: 5280 addql #1,%d0 45b32: 2d40 fff0 movel %d0,%fp@(-16) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 45b36: 7010 moveq #16,%d0 45b38: b084 cmpl %d4,%d0 45b3a: 6700 00ce beqw 45c0a 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; 45b3e: 7202 moveq #2,%d1 the_mutex_attr.only_owner_release = false; 45b40: 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; 45b42: 2d41 ffea movel %d1,%fp@(-22) the_mutex_attr.only_owner_release = false; 45b46: 1d44 ffee moveb %d4,%fp@(-18) } mutex_status = _CORE_mutex_Initialize( 45b4a: 7001 moveq #1,%d0 45b4c: b0ae 000c cmpl %fp@(12),%d0 45b50: 57c0 seq %d0 45b52: 49c0 extbl %d0 45b54: 4480 negl %d0 45b56: 2f00 movel %d0,%sp@- 45b58: 486e ffea pea %fp@(-22) 45b5c: 486b 0014 pea %a3@(20) 45b60: 4eb9 0004 67dc jsr 467dc <_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 ) { 45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 7206 moveq #6,%d1 45b6c: b280 cmpl %d0,%d1 45b6e: 665e bnes 45bce */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45b70: 2f0b movel %a3,%sp@- 45b72: 4879 0005 eeb0 pea 5eeb0 <_Semaphore_Information> 45b78: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b7e: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 45b84: 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(); 45b86: 7013 moveq #19,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b88: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b8e: 4e5e unlk %fp 45b90: 4e75 rts CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 45b92: 7009 moveq #9,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b94: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b9a: 4e5e unlk %fp 45b9c: 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( 45b9e: 2f2e 000c movel %fp@(12),%sp@- */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45ba2: 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( 45ba4: 486e fff8 pea %fp@(-8) 45ba8: 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; 45bac: 44c2 movew %d2,%ccr 45bae: 56c0 sne %d0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45bb0: 2d41 fff8 movel %d1,%fp@(-8) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bb4: 49c0 extbl %d0 45bb6: 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; 45bb8: 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; 45bbc: 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; 45bc0: 42ae fff4 clrl %fp@(-12) _CORE_semaphore_Initialize( 45bc4: 4eb9 0004 6b24 jsr 46b24 <_CORE_semaphore_Initialize> 45bca: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45bce: 202b 0008 movel %a3@(8),%d0 45bd2: 4281 clrl %d1 45bd4: 2079 0005 eec8 moveal 5eec8 <_Semaphore_Information+0x18>,%a0 45bda: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 45bdc: 2743 000c movel %d3,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45be0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 45be4: 2480 movel %d0,%a2@ the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45be6: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45bec: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45bf2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45bf4: 4e5e unlk %fp 45bf6: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 45bf8: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 45bfe: 7005 moveq #5,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45c00: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45c06: 4e5e unlk %fp 45c08: 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; 45c0a: 42ae ffea clrl %fp@(-22) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c0e: 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; 45c10: 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; 45c12: 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; 45c18: 1d41 ffee moveb %d1,%fp@(-18) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c1c: b8ae fff0 cmpl %fp@(-16),%d4 45c20: 6600 ff28 bnew 45b4a if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 45c24: 0802 0006 btst #6,%d2 45c28: 6712 beqs 45c3c the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c2a: 103c 0002 moveb #2,%d0 the_mutex_attr.only_owner_release = true; 45c2e: 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; 45c30: 2d40 fff0 movel %d0,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c34: 1d41 ffee moveb %d1,%fp@(-18) 45c38: 6000 ff10 braw 45b4a } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 45c3c: 4a02 tstb %d2 45c3e: 6c00 ff0a bgew 45b4a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c42: 7803 moveq #3,%d4 the_mutex_attr.only_owner_release = true; 45c44: 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; 45c46: 2d44 fff0 movel %d4,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c4a: 1d40 ffee moveb %d0,%fp@(-18) 45c4e: 6000 fefa braw 45b4a ... =============================================================================== 00045c54 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 45c54: 4e56 fffc linkw %fp,#-4 45c58: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 45c5a: 486e fffc pea %fp@(-4) 45c5e: 2f2e 0008 movel %fp@(8),%sp@- 45c62: 4879 0005 eeb0 pea 5eeb0 <_Semaphore_Information> 45c68: 4eb9 0004 752c jsr 4752c <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c6e: 4fef 000c lea %sp@(12),%sp 45c72: 2440 moveal %d0,%a2 45c74: 4aae fffc tstl %fp@(-4) 45c78: 670a beqs 45c84 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c7a: 246e fff8 moveal %fp@(-8),%a2 { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c80: 4e5e unlk %fp 45c82: 4e75 rts 45c84: 7030 moveq #48,%d0 45c86: 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) ) { 45c8a: 6760 beqs 45cec if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 45c8c: 4aaa 0062 tstl %a2@(98) 45c90: 6616 bnes 45ca8 45c92: 7220 moveq #32,%d1 45c94: b280 cmpl %d0,%d1 45c96: 6710 beqs 45ca8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45c98: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c9e: 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(); 45ca2: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ca4: 4e5e unlk %fp 45ca6: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 45ca8: 4878 0004 pea 4 45cac: 42a7 clrl %sp@- 45cae: 486a 0014 pea %a2@(20) 45cb2: 4eb9 0004 67d0 jsr 467d0 <_CORE_mutex_Flush> 45cb8: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45cbc: 2f0a movel %a2,%sp@- 45cbe: 4879 0005 eeb0 pea 5eeb0 <_Semaphore_Information> 45cc4: 4eb9 0004 7120 jsr 47120 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45cca: 2f0a movel %a2,%sp@- 45ccc: 4879 0005 eeb0 pea 5eeb0 <_Semaphore_Information> 45cd2: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45cd8: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45cde: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45ce2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ce4: 246e fff8 moveal %fp@(-8),%a2 45ce8: 4e5e unlk %fp 45cea: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 45cec: 4878 0002 pea 2 45cf0: 42a7 clrl %sp@- 45cf2: 486a 0014 pea %a2@(20) 45cf6: 4eb9 0004 6b18 jsr 46b18 <_CORE_semaphore_Flush> 45cfc: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45d00: 2f0a movel %a2,%sp@- 45d02: 4879 0005 eeb0 pea 5eeb0 <_Semaphore_Information> 45d08: 4eb9 0004 7120 jsr 47120 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 eeb0 pea 5eeb0 <_Semaphore_Information> 45d16: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d1c: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45d22: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d26: 4280 clrl %d0 45d28: 60ba bras 45ce4 ... =============================================================================== 00050e9c : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 50e9c: 4e56 fffc linkw %fp,#-4 50ea0: 486e fffc pea %fp@(-4) 50ea4: 2f2e 0008 movel %fp@(8),%sp@- 50ea8: 4879 0006 5068 pea 65068 <_Semaphore_Information> 50eae: 4eb9 0004 95d0 jsr 495d0 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 50eb4: 4fef 000c lea %sp@(12),%sp 50eb8: 4aae fffc tstl %fp@(-4) 50ebc: 6706 beqs 50ec4 50ebe: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50ec0: 4e5e unlk %fp 50ec2: 4e75 rts the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 50ec4: 7230 moveq #48,%d1 50ec6: 2040 moveal %d0,%a0 50ec8: c2a8 0010 andl %a0@(16),%d1 50ecc: 6720 beqs 50eee _CORE_mutex_Flush( 50ece: 4878 0001 pea 1 50ed2: 42a7 clrl %sp@- 50ed4: 4868 0014 pea %a0@(20) 50ed8: 4eb9 0004 87d8 jsr 487d8 <_CORE_mutex_Flush> 50ede: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50ee2: 4eb9 0004 9ee0 jsr 49ee0 <_Thread_Enable_dispatch> 50ee8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50eea: 4e5e unlk %fp 50eec: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 50eee: 4878 0001 pea 1 50ef2: 2040 moveal %d0,%a0 50ef4: 42a7 clrl %sp@- 50ef6: 4868 0014 pea %a0@(20) 50efa: 4eb9 0004 8b20 jsr 48b20 <_CORE_semaphore_Flush> 50f00: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50f04: 4eb9 0004 9ee0 jsr 49ee0 <_Thread_Enable_dispatch> 50f0a: 4280 clrl %d0 50f0c: 60dc bras 50eea ... =============================================================================== 00058180 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 58180: 4e56 fffc linkw %fp,#-4 58184: 2f03 movel %d3,%sp@- 58186: 2f02 movel %d2,%sp@- 58188: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 5818c: 660e bnes 5819c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5818e: 242e fff4 movel %fp@(-12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 58192: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58194: 262e fff8 movel %fp@(-8),%d3 58198: 4e5e unlk %fp 5819a: 4e75 rts ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 5819c: 486e fffc pea %fp@(-4) 581a0: 2f2e 0008 movel %fp@(8),%sp@- 581a4: 4eb9 0005 c318 jsr 5c318 <_Thread_Get> switch ( location ) { 581aa: 508f addql #8,%sp 581ac: 4aae fffc tstl %fp@(-4) 581b0: 670e beqs 581c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 581b2: 242e fff4 movel %fp@(-12),%d2 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 581b6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 581b8: 262e fff8 movel %fp@(-8),%d3 581bc: 4e5e unlk %fp 581be: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 581c0: 2240 moveal %d0,%a1 581c2: 2069 010a moveal %a1@(266),%a0 asr = &api->Signal; 581c6: 4aa8 000a tstl %a0@(10) 581ca: 6770 beqs 5823c if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 581cc: 4a28 0008 tstb %a0@(8) 581d0: 673e beqs 58210 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 581d2: 223c 0000 0700 movel #1792,%d1 581d8: 40c3 movew %sr,%d3 581da: 8283 orl %d3,%d1 581dc: 46c1 movew %d1,%sr *signal_set |= signals; 581de: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 581e2: 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 ) ) 581e4: 2239 0007 e866 movel 7e866 <_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; 581ea: 7401 moveq #1,%d2 581ec: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 581f0: 4a81 tstl %d1 581f2: 6708 beqs 581fc 581f4: b0b9 0007 e886 cmpl 7e886 <_Thread_Executing>,%d0 581fa: 6730 beqs 5822c <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 581fc: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 58202: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58204: 242e fff4 movel %fp@(-12),%d2 58208: 262e fff8 movel %fp@(-8),%d3 5820c: 4e5e unlk %fp 5820e: 4e75 rts rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 58210: 203c 0000 0700 movel #1792,%d0 58216: 40c1 movew %sr,%d1 58218: 8081 orl %d1,%d0 5821a: 46c0 movew %d0,%sr *signal_set |= signals; 5821c: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 58220: 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(); 58222: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 58228: 4280 clrl %d0 5822a: 60d8 bras 58204 _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; 5822c: 13c2 0007 e914 moveb %d2,7e914 <_ISR_Signals_to_thread_executing> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 58232: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 58238: 4280 clrl %d0 5823a: 60c8 bras 58204 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 5823c: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58242: 242e fff4 movel %fp@(-12),%d2 _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 58246: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58248: 262e fff8 movel %fp@(-8),%d3 5824c: 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 00c2 moveal %a0@(194),%a0 420a2: 43f9 0005 f4e0 lea 5f4e0 ,%a1 420a8: 2151 0008 movel %a1@,%a0@(8) 420ac: 43f9 0005 f4e4 lea 5f4e4 ,%a1 420b2: 2151 000c movel %a1@,%a0@(12) 420b6: 43f9 0005 f4e8 lea 5f4e8 ,%a1 420bc: 2151 0010 movel %a1@,%a0@(16) 420c0: 43f9 0005 f4ec lea 5f4ec ,%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 00be movel %a2@(190),%sp@- 42546: 4878 00a5 pea a5 4254a: 2f2a 00c2 movel %a2@(194),%sp@- 4254e: 4eb9 0004 fa60 jsr 4fa60 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 0005 f716 moveal 5f716 <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 423be: 2069 00c2 moveal %a1@(194),%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 ecd4 tstl 5ecd4 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 0005 f716 movel 5f716 <_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 0005 f4e0 pea 5f4e0 42406: 4868 0008 pea %a0@(8) 4240a: 4eb9 0004 f978 jsr 4f978 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 00be addl %a1@(190),%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 3874 pea 43874 <== 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 c762 pea 5c762 <== 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 ecdc movel %a2,5ecdc <== 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 ecd8 movel %d2,5ecd8 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 422ae: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 422b0: 4879 0005 c779 pea 5c779 <== 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 7514 jsr 47514 <== 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 ecd8 clrl 5ecd8 <== NOT EXECUTED print_handler = NULL; 422e4: 42b9 0005 ecdc clrl 5ecdc <== 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 00c2 movel %a2@(194),%d1 42442: 5081 addql #8,%d1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 42444: 202a 00c2 movel %a2@(194),%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 00be addl %a2@(190),%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 0005 f4e0 pea 5f4e0 <== NOT EXECUTED 4245e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 42460: 4eb9 0004 f978 jsr 4f978 <== 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 0005 f4e0 pea 5f4e0 42494: 2f01 movel %d1,%sp@- 42496: 4eb9 0004 f978 jsr 4f978 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 =============================================================================== 0004d534 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d534: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d538: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d53c: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d540: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d544: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d548: 4a8a tstl %a2 <== NOT EXECUTED 4d54a: 677a beqs 4d5c6 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4d54c: 49f9 0005 0368 lea 50368 <__errno>,%a4 <== NOT EXECUTED 4d552: 4e94 jsr %a4@ <== NOT EXECUTED *n = 0; 4d554: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d556: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4d558: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d55a: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d55c: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d560: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d562: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d566: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d568: 4eb9 0005 2dbc jsr 52dbc <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d56e: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d570: 2600 movel %d0,%d3 <== NOT EXECUTED 4d572: 2801 movel %d1,%d4 <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d574: 4a8b tstl %a3 <== NOT EXECUTED 4d576: 6704 beqs 4d57c <== NOT EXECUTED *endptr = end; 4d578: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4d57c: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4d580: 6750 beqs 4d5d2 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d582: 4878 ffff pea ffffffff <== NOT EXECUTED 4d586: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d58c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d58e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d590: 4eb9 0005 dc64 jsr 5dc64 <__gtdf2> <== NOT EXECUTED 4d596: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d59a: 4a80 tstl %d0 <== NOT EXECUTED 4d59c: 6e12 bgts 4d5b0 <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d59e: 2483 movel %d3,%a2@ <== NOT EXECUTED 4d5a0: 4280 clrl %d0 <== NOT EXECUTED 4d5a2: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 4d5a6: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5ac: 4e5e unlk %fp <== NOT EXECUTED 4d5ae: 4e75 rts <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d5b0: 4e94 jsr %a4@ <== NOT EXECUTED 4d5b2: 7222 moveq #34,%d1 <== NOT EXECUTED 4d5b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d5b6: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d5b8: 66e4 bnes 4d59e <== NOT EXECUTED 4d5ba: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d5bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5c2: 4e5e unlk %fp <== NOT EXECUTED 4d5c4: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d5c6: 7009 moveq #9,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d5c8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5ce: 4e5e unlk %fp <== NOT EXECUTED 4d5d0: 4e75 rts <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d5d2: 700b moveq #11,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d5d4: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5da: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004d5e0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d5e0: 4e56 ffe8 linkw %fp,#-24 4d5e4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d5e8: 242e 0008 movel %fp@(8),%d2 4d5ec: 246e 000c moveal %fp@(12),%a2 4d5f0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d5f4: 4a8a tstl %a2 4d5f6: 6768 beqs 4d660 return RTEMS_INVALID_ADDRESS; errno = 0; 4d5f8: 49f9 0005 0368 lea 50368 <__errno>,%a4 4d5fe: 4e94 jsr %a4@ 4d600: 2040 moveal %d0,%a0 4d602: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d604: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d608: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d60e: 2f02 movel %d2,%sp@- 4d610: 4eb9 0005 2d5e jsr 52d5e #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d616: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d618: 2600 movel %d0,%d3 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d61a: 4a8b tstl %a3 4d61c: 6704 beqs 4d622 *endptr = end; 4d61e: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d622: b4ae fffc cmpl %fp@(-4),%d2 4d626: 6744 beqs 4d66c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d628: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d62e: 2f03 movel %d3,%sp@- 4d630: 4eb9 0005 dcf4 jsr 5dcf4 <__gtsf2> 4d636: 508f addql #8,%sp 4d638: 4a80 tstl %d0 4d63a: 6e0e bgts 4d64a <== NEVER TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d63c: 2483 movel %d3,%a2@ 4d63e: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4d640: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d646: 4e5e unlk %fp 4d648: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d64a: 4e94 jsr %a4@ <== NOT EXECUTED 4d64c: 7222 moveq #34,%d1 <== NOT EXECUTED 4d64e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d650: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d652: 66e8 bnes 4d63c <== NOT EXECUTED 4d654: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d656: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d65c: 4e5e unlk %fp <== NOT EXECUTED 4d65e: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d660: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d662: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d668: 4e5e unlk %fp 4d66a: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d66c: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d66e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d674: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d678 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d678: 4e56 ffe8 linkw %fp,#-24 4d67c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d680: 242e 0008 movel %fp@(8),%d2 4d684: 246e 000c moveal %fp@(12),%a2 4d688: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d68c: 4a8a tstl %a2 4d68e: 675e beqs 4d6ee return RTEMS_INVALID_ADDRESS; errno = 0; 4d690: 49f9 0005 0368 lea 50368 <__errno>,%a4 4d696: 4e94 jsr %a4@ 4d698: 2040 moveal %d0,%a0 4d69a: 4290 clrl %a0@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d69c: 2f2e 0014 movel %fp@(20),%sp@- 4d6a0: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d6a4: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d6a6: 2f02 movel %d2,%sp@- 4d6a8: 4eb9 0005 2f9e jsr 52f9e #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d6ae: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d6b2: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d6b4: 4a8b tstl %a3 4d6b6: 6704 beqs 4d6bc *endptr = end; 4d6b8: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d6bc: b4ae fffc cmpl %fp@(-4),%d2 4d6c0: 6738 beqs 4d6fa return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d6c2: 0c83 7fff ffff cmpil #2147483647,%d3 4d6c8: 670e beqs 4d6d8 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d6ca: 2483 movel %d3,%a2@ 4d6cc: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4d6ce: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6d4: 4e5e unlk %fp 4d6d6: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d6d8: 4e94 jsr %a4@ 4d6da: 7222 moveq #34,%d1 4d6dc: 2040 moveal %d0,%a0 4d6de: b290 cmpl %a0@,%d1 4d6e0: 66e8 bnes 4d6ca <== NEVER TAKEN 4d6e2: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d6e4: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6ea: 4e5e unlk %fp 4d6ec: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d6ee: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d6f0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6f6: 4e5e unlk %fp 4d6f8: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d6fa: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d6fc: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d702: 4e5e unlk %fp ... =============================================================================== 0004d7bc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d7bc: 4e56 ffe8 linkw %fp,#-24 4d7c0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d7c4: 262e 0008 movel %fp@(8),%d3 4d7c8: 246e 000c moveal %fp@(12),%a2 4d7cc: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d7d0: 4a8a tstl %a2 4d7d2: 6766 beqs 4d83a <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4d7d4: 49f9 0005 0368 lea 50368 <__errno>,%a4 4d7da: 4e94 jsr %a4@ 4d7dc: 2040 moveal %d0,%a0 4d7de: 4290 clrl %a0@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d7e0: 2f2e 0014 movel %fp@(20),%sp@- 4d7e4: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d7e8: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d7ea: 2f03 movel %d3,%sp@- 4d7ec: 4eb9 0005 2f9e jsr 52f9e #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d7f2: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d7f6: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d7f8: 4a8b tstl %a3 4d7fa: 6704 beqs 4d800 <== NEVER TAKEN *endptr = end; 4d7fc: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d800: b6ae fffc cmpl %fp@(-4),%d3 4d804: 6740 beqs 4d846 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d806: 0c82 7fff ffff cmpil #2147483647,%d2 4d80c: 6716 beqs 4d824 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d80e: 0c82 8000 0000 cmpil #-2147483648,%d2 4d814: 670e beqs 4d824 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d816: 2482 movel %d2,%a2@ 4d818: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4d81a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d820: 4e5e unlk %fp 4d822: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d824: 4e94 jsr %a4@ 4d826: 7222 moveq #34,%d1 4d828: 2040 moveal %d0,%a0 4d82a: b290 cmpl %a0@,%d1 4d82c: 66e8 bnes 4d816 <== NEVER TAKEN #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 4d82e: 700a moveq #10,%d0 } 4d830: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d836: 4e5e unlk %fp 4d838: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d83a: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d83c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d842: 4e5e unlk %fp 4d844: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d846: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d848: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d84e: 4e5e unlk %fp ... =============================================================================== 0004d708 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d708: 4e56 ffe4 linkw %fp,#-28 4d70c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d710: 242e 0008 movel %fp@(8),%d2 4d714: 246e 000c moveal %fp@(12),%a2 4d718: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d71c: 4a8a tstl %a2 4d71e: 6700 0082 beqw 4d7a2 return RTEMS_INVALID_ADDRESS; errno = 0; 4d722: 49f9 0005 0368 lea 50368 <__errno>,%a4 4d728: 4e94 jsr %a4@ 4d72a: 2040 moveal %d0,%a0 *n = 0; 4d72c: 4280 clrl %d0 4d72e: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d730: 4290 clrl %a0@ *n = 0; 4d732: 2480 movel %d0,%a2@ 4d734: 2541 0004 movel %d1,%a2@(4) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d738: 2f2e 0014 movel %fp@(20),%sp@- 4d73c: 486e fffc pea %fp@(-4) 4d740: 2f02 movel %d2,%sp@- 4d742: 4eb9 0005 2fc0 jsr 52fc0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d748: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d74c: 2600 movel %d0,%d3 4d74e: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d750: 4a8b tstl %a3 4d752: 6704 beqs 4d758 *endptr = end; 4d754: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d758: b4ae fffc cmpl %fp@(-4),%d2 4d75c: 6750 beqs 4d7ae return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d75e: 203c 7fff ffff movel #2147483647,%d0 4d764: 72ff moveq #-1,%d1 4d766: 9284 subl %d4,%d1 4d768: 9183 subxl %d3,%d0 4d76a: 6720 beqs 4d78c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d76c: 203c 8000 0000 movel #-2147483648,%d0 4d772: 4281 clrl %d1 4d774: 9284 subl %d4,%d1 4d776: 9183 subxl %d3,%d0 4d778: 6712 beqs 4d78c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d77a: 4280 clrl %d0 4d77c: 2483 movel %d3,%a2@ 4d77e: 2544 0004 movel %d4,%a2@(4) #endif return RTEMS_SUCCESSFUL; } 4d782: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d788: 4e5e unlk %fp 4d78a: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d78c: 4e94 jsr %a4@ 4d78e: 7222 moveq #34,%d1 4d790: 2040 moveal %d0,%a0 4d792: b290 cmpl %a0@,%d1 4d794: 66e4 bnes 4d77a <== NEVER TAKEN #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 4d796: 700a moveq #10,%d0 } 4d798: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d79e: 4e5e unlk %fp 4d7a0: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d7a2: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d7a4: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d7aa: 4e5e unlk %fp 4d7ac: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d7ae: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d7b0: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d7b6: 4e5e unlk %fp ... =============================================================================== 0004d854 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d854: 4e56 ffe8 linkw %fp,#-24 4d858: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d85c: 242e 0008 movel %fp@(8),%d2 4d860: 246e 000c moveal %fp@(12),%a2 4d864: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d868: 4a8a tstl %a2 4d86a: 675c beqs 4d8c8 return RTEMS_INVALID_ADDRESS; errno = 0; 4d86c: 49f9 0005 0368 lea 50368 <__errno>,%a4 4d872: 4e94 jsr %a4@ 4d874: 2040 moveal %d0,%a0 4d876: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 4d878: 4878 0010 pea 10 4d87c: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d880: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 4d882: 2f02 movel %d2,%sp@- 4d884: 4eb9 0005 33d0 jsr 533d0 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d88a: 4fef 000c lea %sp@(12),%sp *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 4d88e: 2600 movel %d0,%d3 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d890: 4a8b tstl %a3 4d892: 6704 beqs 4d898 *endptr = end; 4d894: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d898: b4ae fffc cmpl %fp@(-4),%d2 4d89c: 6736 beqs 4d8d4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d89e: 70ff moveq #-1,%d0 4d8a0: b083 cmpl %d3,%d0 4d8a2: 670e beqs 4d8b2 <== NEVER TAKEN if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 4d8a4: 2483 movel %d3,%a2@ 4d8a6: 4280 clrl %d0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d8a8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d8ae: 4e5e unlk %fp 4d8b0: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d8b2: 4e94 jsr %a4@ <== NOT EXECUTED 4d8b4: 7222 moveq #34,%d1 <== NOT EXECUTED 4d8b6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d8b8: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d8ba: 66e8 bnes 4d8a4 <== NOT EXECUTED 4d8bc: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d8be: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d8c4: 4e5e unlk %fp <== NOT EXECUTED 4d8c6: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d8c8: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d8ca: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d8d0: 4e5e unlk %fp 4d8d2: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d8d4: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d8d6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d8dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d950 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d950: 4e56 ffe8 linkw %fp,#-24 4d954: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d958: 242e 0008 movel %fp@(8),%d2 4d95c: 246e 000c moveal %fp@(12),%a2 4d960: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d964: 4a8a tstl %a2 4d966: 675c beqs 4d9c4 return RTEMS_INVALID_ADDRESS; errno = 0; 4d968: 49f9 0005 0368 lea 50368 <__errno>,%a4 4d96e: 4e94 jsr %a4@ 4d970: 2040 moveal %d0,%a0 4d972: 4290 clrl %a0@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d974: 2f2e 0014 movel %fp@(20),%sp@- 4d978: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d97c: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d97e: 2f02 movel %d2,%sp@- 4d980: 4eb9 0005 33d0 jsr 533d0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d986: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d98a: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d98c: 4a8b tstl %a3 4d98e: 6704 beqs 4d994 *endptr = end; 4d990: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d994: b4ae fffc cmpl %fp@(-4),%d2 4d998: 6736 beqs 4d9d0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d99a: 70ff moveq #-1,%d0 4d99c: b083 cmpl %d3,%d0 4d99e: 670e beqs 4d9ae #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d9a0: 2483 movel %d3,%a2@ 4d9a2: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4d9a4: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9aa: 4e5e unlk %fp 4d9ac: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d9ae: 4e94 jsr %a4@ 4d9b0: 7222 moveq #34,%d1 4d9b2: 2040 moveal %d0,%a0 4d9b4: b290 cmpl %a0@,%d1 4d9b6: 66e8 bnes 4d9a0 <== NEVER TAKEN 4d9b8: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d9ba: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9c0: 4e5e unlk %fp 4d9c2: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d9c4: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d9c6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9cc: 4e5e unlk %fp 4d9ce: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d9d0: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d9d2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004da7c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4da7c: 4e56 ffe8 linkw %fp,#-24 4da80: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4da84: 242e 0008 movel %fp@(8),%d2 4da88: 246e 000c moveal %fp@(12),%a2 4da8c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4da90: 4a8a tstl %a2 4da92: 675c beqs 4daf0 return RTEMS_INVALID_ADDRESS; errno = 0; 4da94: 49f9 0005 0368 lea 50368 <__errno>,%a4 4da9a: 4e94 jsr %a4@ 4da9c: 2040 moveal %d0,%a0 4da9e: 4290 clrl %a0@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4daa0: 2f2e 0014 movel %fp@(20),%sp@- 4daa4: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4daa8: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4daaa: 2f02 movel %d2,%sp@- 4daac: 4eb9 0005 33d0 jsr 533d0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4dab2: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4dab6: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4dab8: 4a8b tstl %a3 4daba: 6704 beqs 4dac0 *endptr = end; 4dabc: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4dac0: b4ae fffc cmpl %fp@(-4),%d2 4dac4: 6736 beqs 4dafc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4dac6: 70ff moveq #-1,%d0 4dac8: b083 cmpl %d3,%d0 4daca: 670e beqs 4dada #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4dacc: 2483 movel %d3,%a2@ 4dace: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4dad0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dad6: 4e5e unlk %fp 4dad8: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4dada: 4e94 jsr %a4@ 4dadc: 7222 moveq #34,%d1 4dade: 2040 moveal %d0,%a0 4dae0: b290 cmpl %a0@,%d1 4dae2: 66e8 bnes 4dacc <== NEVER TAKEN 4dae4: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4dae6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4daec: 4e5e unlk %fp 4daee: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4daf0: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4daf2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4daf8: 4e5e unlk %fp 4dafa: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4dafc: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4dafe: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4db04: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d9dc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d9dc: 4e56 ffe4 linkw %fp,#-28 4d9e0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d9e4: 242e 0008 movel %fp@(8),%d2 4d9e8: 246e 000c moveal %fp@(12),%a2 4d9ec: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d9f0: 4a8a tstl %a2 4d9f2: 676e beqs 4da62 return RTEMS_INVALID_ADDRESS; errno = 0; 4d9f4: 49f9 0005 0368 lea 50368 <__errno>,%a4 4d9fa: 4e94 jsr %a4@ 4d9fc: 2040 moveal %d0,%a0 *n = 0; 4d9fe: 4280 clrl %d0 4da00: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4da02: 4290 clrl %a0@ *n = 0; 4da04: 2480 movel %d0,%a2@ 4da06: 2541 0004 movel %d1,%a2@(4) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4da0a: 2f2e 0014 movel %fp@(20),%sp@- 4da0e: 486e fffc pea %fp@(-4) 4da12: 2f02 movel %d2,%sp@- 4da14: 4eb9 0005 33f0 jsr 533f0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4da1a: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4da1e: 2600 movel %d0,%d3 4da20: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4da22: 4a8b tstl %a3 4da24: 6704 beqs 4da2a *endptr = end; 4da26: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4da2a: b4ae fffc cmpl %fp@(-4),%d2 4da2e: 673e beqs 4da6e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4da30: 70ff moveq #-1,%d0 4da32: 72ff moveq #-1,%d1 4da34: 9284 subl %d4,%d1 4da36: 9183 subxl %d3,%d0 4da38: 6712 beqs 4da4c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4da3a: 4280 clrl %d0 4da3c: 2483 movel %d3,%a2@ 4da3e: 2544 0004 movel %d4,%a2@(4) #endif return RTEMS_SUCCESSFUL; } 4da42: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da48: 4e5e unlk %fp 4da4a: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4da4c: 4e94 jsr %a4@ 4da4e: 7222 moveq #34,%d1 4da50: 2040 moveal %d0,%a0 4da52: b290 cmpl %a0@,%d1 4da54: 66e4 bnes 4da3a <== NEVER TAKEN 4da56: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4da58: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da5e: 4e5e unlk %fp 4da60: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4da62: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4da64: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da6a: 4e5e unlk %fp 4da6c: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4da6e: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4da70: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da76: 4e5e unlk %fp ... =============================================================================== 0004606c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 4606c: 4e56 fffc linkw %fp,#-4 46070: 2f0b movel %a3,%sp@- 46072: 2f0a movel %a2,%sp@- register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 46074: 2f39 0005 f02a movel 5f02a <_RTEMS_Allocator_Mutex>,%sp@- 4607a: 4eb9 0004 6704 jsr 46704 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 46080: 486e fffc pea %fp@(-4) 46084: 2f2e 0008 movel %fp@(8),%sp@- 46088: 4eb9 0004 7de4 jsr 47de4 <_Thread_Get> switch ( location ) { 4608e: 4fef 000c lea %sp@(12),%sp Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); 46092: 2440 moveal %d0,%a2 switch ( location ) { 46094: 4aae fffc tstl %fp@(-4) 46098: 664a bnes 460e4 <== NEVER TAKEN case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 4609a: 2f2a 0008 movel %a2@(8),%sp@- 4609e: 47f9 0004 744c lea 4744c <_Objects_Get_information_id>,%a3 460a4: 4e93 jsr %a3@ 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 460a6: 2f0a movel %a2,%sp@- 460a8: 2f00 movel %d0,%sp@- 460aa: 4eb9 0004 7a9c jsr 47a9c <_Thread_Close> 460b0: 2f2a 0008 movel %a2@(8),%sp@- 460b4: 4e93 jsr %a3@ 460b6: 2f0a movel %a2,%sp@- 460b8: 2f00 movel %d0,%sp@- 460ba: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 460c0: 2f39 0005 f02a movel 5f02a <_RTEMS_Allocator_Mutex>,%sp@- 460c6: 4eb9 0004 6764 jsr 46764 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 460cc: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 460d2: 246e fff4 moveal %fp@(-12),%a2 _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 460d6: 4fef 001c lea %sp@(28),%sp _Thread_Close( the_information, the_thread ); _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 460da: 4280 clrl %d0 break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 460dc: 266e fff8 moveal %fp@(-8),%a3 460e0: 4e5e unlk %fp 460e2: 4e75 rts case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 460e4: 2f39 0005 f02a movel 5f02a <_RTEMS_Allocator_Mutex>,%sp@- 460ea: 4eb9 0004 6764 jsr 46764 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; } 460f0: 246e fff4 moveal %fp@(-12),%a2 case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; 460f4: 588f addql #4,%sp case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 460f6: 7004 moveq #4,%d0 return RTEMS_INVALID_ID; } 460f8: 266e fff8 moveal %fp@(-8),%a3 460fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004db68 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4db68: 4e56 ffe4 linkw %fp,#-28 4db6c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4db70: 2a2e 0008 movel %fp@(8),%d5 4db74: 242e 000c movel %fp@(12),%d2 4db78: 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 ) 4db7c: 4a8c tstl %a4 4db7e: 6700 0154 beqw 4dcd4 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4db82: 2479 0005 f032 moveal 5f032 <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4db88: 4a2a 0075 tstb %a2@(117) 4db8c: 57c0 seq %d0 4db8e: 263c 0000 0100 movel #256,%d3 4db94: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4db96: 266a 010a moveal %a2@(266),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4db9a: c680 andl %d0,%d3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4db9c: 4aaa 007a tstl %a2@(122) 4dba0: 6600 00d4 bnew 4dc76 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4dba4: 4a2b 0008 tstb %a3@(8) 4dba8: 57c0 seq %d0 4dbaa: 283c 0000 0400 movel #1024,%d4 4dbb0: 49c0 extbl %d0 4dbb2: 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(); 4dbb4: 4eb9 0004 935c jsr 4935c <_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; 4dbba: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4dbbc: 8083 orl %d3,%d0 4dbbe: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4dbc0: 0802 0008 btst #8,%d2 4dbc4: 670e beqs 4dbd4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4dbc6: 2005 movel %d5,%d0 4dbc8: 7201 moveq #1,%d1 4dbca: e088 lsrl #8,%d0 4dbcc: b380 eorl %d1,%d0 4dbce: c081 andl %d1,%d0 4dbd0: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4dbd4: 0802 0009 btst #9,%d2 4dbd8: 6718 beqs 4dbf2 if ( _Modes_Is_timeslice(mode_set) ) { 4dbda: 0805 0009 btst #9,%d5 4dbde: 6700 00c2 beqw 4dca2 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4dbe2: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4dbe4: 41f9 0005 ef28 lea 5ef28 <_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; 4dbea: 2540 007a movel %d0,%a2@(122) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4dbee: 2550 0076 movel %a0@,%a2@(118) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4dbf2: 7007 moveq #7,%d0 4dbf4: c082 andl %d2,%d0 4dbf6: 6712 beqs 4dc0a */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4dbf8: 40c0 movew %sr,%d0 4dbfa: 7207 moveq #7,%d1 4dbfc: c285 andl %d5,%d1 4dbfe: 0280 0000 f8ff andil #63743,%d0 4dc04: e189 lsll #8,%d1 4dc06: 8081 orl %d1,%d0 4dc08: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4dc0a: 0802 000a btst #10,%d2 4dc0e: 6758 beqs 4dc68 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4dc10: 700a moveq #10,%d0 4dc12: e0ad lsrl %d0,%d5 4dc14: 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; 4dc16: 4280 clrl %d0 4dc18: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4dc1c: b385 eorl %d1,%d5 4dc1e: 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; 4dc20: ba80 cmpl %d0,%d5 4dc22: 6744 beqs 4dc68 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4dc24: 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; 4dc2a: 1745 0008 moveb %d5,%a3@(8) 4dc2e: 40c1 movew %sr,%d1 4dc30: 8081 orl %d1,%d0 4dc32: 46c0 movew %d0,%sr _signals = information->signals_pending; 4dc34: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4dc38: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4dc3e: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4dc42: 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; 4dc44: 4aab 0012 tstl %a3@(18) 4dc48: 671e beqs 4dc68 executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4dc4a: 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; 4dc4c: 7001 moveq #1,%d0 4dc4e: 7401 moveq #1,%d2 4dc50: 1540 0074 moveb %d0,%a2@(116) } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4dc54: b2b9 0005 f100 cmpl 5f100 <_System_state_Current>,%d1 4dc5a: 6758 beqs 4dcb4 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 4dc5c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4dc5e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4dc64: 4e5e unlk %fp 4dc66: 4e75 rts executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4dc68: 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; 4dc6a: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4dc6c: b2b9 0005 f100 cmpl 5f100 <_System_state_Current>,%d1 4dc72: 66e8 bnes 4dc5c <== NEVER TAKEN 4dc74: 603e bras 4dcb4 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4dc76: 4a2b 0008 tstb %a3@(8) 4dc7a: 57c0 seq %d0 4dc7c: 283c 0000 0400 movel #1024,%d4 4dc82: 49c0 extbl %d0 4dc84: 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(); 4dc86: 4eb9 0004 935c jsr 4935c <_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; 4dc8c: 08c3 0009 bset #9,%d3 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4dc90: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4dc92: 8083 orl %d3,%d0 4dc94: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4dc96: 0802 0008 btst #8,%d2 4dc9a: 6700 ff38 beqw 4dbd4 4dc9e: 6000 ff26 braw 4dbc6 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4dca2: 7007 moveq #7,%d0 4dca4: 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; 4dca6: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4dcaa: 4a80 tstl %d0 4dcac: 6700 ff5c beqw 4dc0a 4dcb0: 6000 ff46 braw 4dbf8 } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4dcb4: 4eb9 0004 dfd0 jsr 4dfd0 <_Thread_Evaluate_mode> 4dcba: 4a00 tstb %d0 4dcbc: 6604 bnes 4dcc2 4dcbe: 4a02 tstb %d2 4dcc0: 679a beqs 4dc5c _Thread_Dispatch(); 4dcc2: 4eb9 0004 7c64 jsr 47c64 <_Thread_Dispatch> 4dcc8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4dcca: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4dcd0: 4e5e unlk %fp 4dcd2: 4e75 rts ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4dcd4: 7009 moveq #9,%d0 if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 4dcd6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4dcdc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048734 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 48734: 4e56 fffc linkw %fp,#-4 48738: 202e 0008 movel %fp@(8),%d0 4873c: 2f02 movel %d2,%sp@- 4873e: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 48742: 4a39 0006 0c64 tstb 60c64 48748: 676e beqs 487b8 <== NEVER TAKEN /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 4874a: 720f moveq #15,%d1 4874c: b282 cmpl %d2,%d1 4874e: 6542 bcss 48792 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 48750: 4a80 tstl %d0 48752: 6748 beqs 4879c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 48754: 2079 0006 2772 moveal 62772 <_Thread_Executing>,%a0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 4875a: b0a8 0008 cmpl %a0@(8),%d0 4875e: 6742 beqs 487a2 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 48760: 486e fffc pea %fp@(-4) 48764: 2f00 movel %d0,%sp@- 48766: 4eb9 0004 a5d0 jsr 4a5d0 <_Thread_Get> switch ( location ) { 4876c: 508f addql #8,%sp 4876e: 4aae fffc tstl %fp@(-4) 48772: 664e bnes 487c2 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 48774: 2240 moveal %d0,%a1 48776: 202e 0010 movel %fp@(16),%d0 4877a: 2069 010a moveal %a1@(266),%a0 4877e: 2180 2c1e movel %d0,%a0@(0000001e,%d2:l:4) _Thread_Enable_dispatch(); 48782: 4eb9 0004 a5a8 jsr 4a5a8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48788: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; _Thread_Enable_dispatch(); 4878c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4878e: 4e5e unlk %fp 48790: 4e75 rts 48792: 242e fff8 movel %fp@(-8),%d2 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 48796: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48798: 4e5e unlk %fp 4879a: 4e75 rts /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 4879c: 2079 0006 2772 moveal 62772 <_Thread_Executing>,%a0 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 487a2: 226e 0010 moveal %fp@(16),%a1 487a6: 4280 clrl %d0 487a8: 2068 010a moveal %a0@(266),%a0 487ac: 2189 2c1e movel %a1,%a0@(0000001e,%d2:l:4) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 487b0: 242e fff8 movel %fp@(-8),%d2 487b4: 4e5e unlk %fp 487b6: 4e75 rts 487b8: 242e fff8 movel %fp@(-8),%d2 { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 487bc: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 487be: 4e5e unlk %fp 487c0: 4e75 rts 487c2: 242e fff8 movel %fp@(-8),%d2 api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 487c6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 487c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af04 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4af04: 4e56 fffc linkw %fp,#-4 4af08: 2f0a movel %a2,%sp@- 4af0a: 246e 0010 moveal %fp@(16),%a2 4af0e: 2f02 movel %d2,%sp@- 4af10: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4af14: 670c beqs 4af22 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4af16: 4280 clrl %d0 4af18: 1039 0006 3ba2 moveb 63ba2 ,%d0 4af1e: b082 cmpl %d2,%d0 4af20: 6566 bcss 4af88 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4af22: 4a8a tstl %a2 4af24: 6770 beqs 4af96 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4af26: 486e fffc pea %fp@(-4) 4af2a: 2f2e 0008 movel %fp@(8),%sp@- 4af2e: 4eb9 0004 cef8 jsr 4cef8 <_Thread_Get> switch ( location ) { 4af34: 508f addql #8,%sp 4af36: 4aae fffc tstl %fp@(-4) 4af3a: 663e bnes 4af7a case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4af3c: 2040 moveal %d0,%a0 4af3e: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4af42: 4a82 tstl %d2 4af44: 6720 beqs 4af66 the_thread->real_priority = new_priority; 4af46: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4af4a: 4aa8 001c tstl %a0@(28) 4af4e: 6706 beqs 4af56 the_thread->current_priority > new_priority ) 4af50: b4a8 0014 cmpl %a0@(20),%d2 4af54: 6410 bccs 4af66 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 4af56: 42a7 clrl %sp@- 4af58: 2f02 movel %d2,%sp@- 4af5a: 2f00 movel %d0,%sp@- 4af5c: 4eb9 0004 c980 jsr 4c980 <_Thread_Change_priority> 4af62: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4af66: 4eb9 0004 cea0 jsr 4cea0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af6c: 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(); 4af70: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af72: 246e fff8 moveal %fp@(-8),%a2 4af76: 4e5e unlk %fp 4af78: 4e75 rts 4af7a: 242e fff4 movel %fp@(-12),%d2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4af7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af80: 246e fff8 moveal %fp@(-8),%a2 4af84: 4e5e unlk %fp 4af86: 4e75 rts 4af88: 242e fff4 movel %fp@(-12),%d2 4af8c: 7013 moveq #19,%d0 4af8e: 246e fff8 moveal %fp@(-8),%a2 4af92: 4e5e unlk %fp 4af94: 4e75 rts 4af96: 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 ) 4af9a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4af9c: 246e fff8 moveal %fp@(-8),%a2 4afa0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000477f8 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 477f8: 4e56 fffc linkw %fp,#-4 477fc: 2f02 movel %d2,%sp@- 477fe: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 47802: 6762 beqs 47866 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 47804: 486e fffc pea %fp@(-4) 47808: 2f2e 0008 movel %fp@(8),%sp@- 4780c: 4eb9 0004 9624 jsr 49624 <_Thread_Get> switch (location) { 47812: 508f addql #8,%sp 47814: 4aae fffc tstl %fp@(-4) 47818: 663c bnes 47856 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 4781a: 2240 moveal %d0,%a1 4781c: 2069 011a moveal %a1@(282),%a0 while (tvp) { 47820: 4a88 tstl %a0 47822: 673c beqs 47860 if (tvp->ptr == ptr) { 47824: b4a8 0004 cmpl %a0@(4),%d2 47828: 6746 beqs 47870 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; 4782a: 2248 moveal %a0,%a1 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 4782c: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 4782e: 4a88 tstl %a0 47830: 672e beqs 47860 <== NEVER TAKEN if (tvp->ptr == ptr) { 47832: b4a8 0004 cmpl %a0@(4),%d2 47836: 66f2 bnes 4782a if (prev) prev->next = tvp->next; 47838: 2290 movel %a0@,%a1@ else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 4783a: 2f08 movel %a0,%sp@- 4783c: 2f00 movel %d0,%sp@- 4783e: 4eb9 0004 7918 jsr 47918 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47844: 4eb9 0004 95fc jsr 495fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4784a: 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(); 4784c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4784e: 242e fff8 movel %fp@(-8),%d2 47852: 4e5e unlk %fp 47854: 4e75 rts 47856: 242e fff8 movel %fp@(-8),%d2 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 4785a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4785c: 4e5e unlk %fp 4785e: 4e75 rts return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 47860: 4eb9 0004 95fc jsr 495fc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47866: 242e fff8 movel %fp@(-8),%d2 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 4786a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4786c: 4e5e unlk %fp 4786e: 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; 47870: 2240 moveal %d0,%a1 47872: 2350 011a movel %a0@,%a1@(282) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 47876: 2f08 movel %a0,%sp@- 47878: 2f00 movel %d0,%sp@- 4787a: 4eb9 0004 7918 jsr 47918 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47880: 4eb9 0004 95fc jsr 495fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47886: 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(); 47888: 4280 clrl %d0 4788a: 60c2 bras 4784e =============================================================================== 0004788c : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 4788c: 4e56 fffc linkw %fp,#-4 47890: 2f0a movel %a2,%sp@- 47892: 246e 0010 moveal %fp@(16),%a2 47896: 2f02 movel %d2,%sp@- 47898: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 4789c: 6752 beqs 478f0 return RTEMS_INVALID_ADDRESS; if ( !result ) 4789e: 4a8a tstl %a2 478a0: 674e beqs 478f0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 478a2: 486e fffc pea %fp@(-4) 478a6: 2f2e 0008 movel %fp@(8),%sp@- 478aa: 4eb9 0004 9624 jsr 49624 <_Thread_Get> switch (location) { 478b0: 508f addql #8,%sp 478b2: 4aae fffc tstl %fp@(-4) 478b6: 662a bnes 478e2 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 478b8: 2240 moveal %d0,%a1 478ba: 2069 011a moveal %a1@(282),%a0 while (tvp) { 478be: 4a88 tstl %a0 478c0: 670c beqs 478ce if (tvp->ptr == ptr) { 478c2: b4a8 0004 cmpl %a0@(4),%d2 478c6: 6736 beqs 478fe */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 478c8: 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) { 478ca: 4a88 tstl %a0 478cc: 66f4 bnes 478c2 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 478ce: 4eb9 0004 95fc jsr 495fc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478d4: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 478d8: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478da: 246e fff8 moveal %fp@(-8),%a2 478de: 4e5e unlk %fp 478e0: 4e75 rts 478e2: 242e fff4 movel %fp@(-12),%d2 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 478e6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478e8: 246e fff8 moveal %fp@(-8),%a2 478ec: 4e5e unlk %fp 478ee: 4e75 rts 478f0: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 478f4: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478f6: 246e fff8 moveal %fp@(-8),%a2 478fa: 4e5e unlk %fp 478fc: 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; 478fe: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 47902: 4eb9 0004 95fc jsr 495fc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47908: 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(); 4790c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4790e: 246e fff8 moveal %fp@(-8),%a2 47912: 4e5e unlk %fp ... =============================================================================== 00044640 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44640: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 44642: 4e56 0000 linkw %fp,#0 44646: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 4464a: b280 cmpl %d0,%d1 4464c: 6700 010a beqw 44758 44650: 6c32 bges 44684 <== ALWAYS TAKEN 44652: 720e moveq #14,%d1 <== NOT EXECUTED 44654: b280 cmpl %d0,%d1 <== NOT EXECUTED 44656: 6700 00d6 beqw 4472e <== NOT EXECUTED 4465a: 6c56 bges 446b2 <== NOT EXECUTED 4465c: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 44662: 6700 00e2 beqw 44746 <== NOT EXECUTED 44666: 6f00 0098 blew 44700 <== NOT EXECUTED 4466a: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 44670: 6700 00b6 beqw 44728 <== NOT EXECUTED 44674: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 4467a: 6700 009a beqw 44716 <== 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; 4467e: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 44680: 4e5e unlk %fp 44682: 4e75 rts rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44684: 123c 0004 moveb #4,%d1 44688: b280 cmpl %d0,%d1 4468a: 6700 00d2 beqw 4475e 4468e: 6d46 blts 446d6 <== NEVER TAKEN 44690: 123c 0001 moveb #1,%d1 44694: b280 cmpl %d0,%d1 44696: 6700 00a2 beqw 4473a 4469a: 6c00 00c8 bgew 44764 4469e: 7202 moveq #2,%d1 <== NOT EXECUTED 446a0: b280 cmpl %d0,%d1 <== NOT EXECUTED 446a2: 677e beqs 44722 <== NOT EXECUTED 446a4: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 446a8: b280 cmpl %d0,%d1 <== NOT EXECUTED 446aa: 66d2 bnes 4467e <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 446ac: 7003 moveq #3,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446ae: 4e5e unlk %fp <== NOT EXECUTED 446b0: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 446b2: 123c 000b moveb #11,%d1 <== NOT EXECUTED 446b6: b280 cmpl %d0,%d1 <== NOT EXECUTED 446b8: 6700 0086 beqw 44740 <== NOT EXECUTED 446bc: 6e3c bgts 446fa <== NOT EXECUTED 446be: 123c 000c moveb #12,%d1 <== NOT EXECUTED 446c2: b280 cmpl %d0,%d1 <== NOT EXECUTED 446c4: 6700 008c beqw 44752 <== NOT EXECUTED 446c8: 123c 000d moveb #13,%d1 <== NOT EXECUTED 446cc: b280 cmpl %d0,%d1 <== NOT EXECUTED 446ce: 66ae bnes 4467e <== 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; 446d0: 700d moveq #13,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446d2: 4e5e unlk %fp <== NOT EXECUTED 446d4: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 446d6: 7206 moveq #6,%d1 <== NOT EXECUTED 446d8: b280 cmpl %d0,%d1 <== NOT EXECUTED 446da: 6758 beqs 44734 <== NOT EXECUTED 446dc: 6e16 bgts 446f4 <== NOT EXECUTED 446de: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 446e2: b280 cmpl %d0,%d1 <== NOT EXECUTED 446e4: 6766 beqs 4474c <== NOT EXECUTED 446e6: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 446ea: b280 cmpl %d0,%d1 <== NOT EXECUTED 446ec: 6690 bnes 4467e <== 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; 446ee: 7008 moveq #8,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446f0: 4e5e unlk %fp <== NOT EXECUTED 446f2: 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; 446f4: 7005 moveq #5,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446f6: 4e5e unlk %fp <== NOT EXECUTED 446f8: 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; 446fa: 700a moveq #10,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446fc: 4e5e unlk %fp <== NOT EXECUTED 446fe: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44700: 720f moveq #15,%d1 <== NOT EXECUTED 44702: b280 cmpl %d0,%d1 <== NOT EXECUTED 44704: 6716 beqs 4471c <== NOT EXECUTED 44706: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 4470c: 6600 ff70 bnew 4467e <== 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; 44710: 7010 moveq #16,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44712: 4e5e unlk %fp <== NOT EXECUTED 44714: 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; 44716: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44718: 4e5e unlk %fp <== NOT EXECUTED 4471a: 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; 4471c: 700f moveq #15,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4471e: 4e5e unlk %fp <== NOT EXECUTED 44720: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44722: 7002 moveq #2,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44724: 4e5e unlk %fp <== NOT EXECUTED 44726: 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; 44728: 7012 moveq #18,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4472a: 4e5e unlk %fp <== NOT EXECUTED 4472c: 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; 4472e: 700e moveq #14,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44730: 4e5e unlk %fp <== NOT EXECUTED 44732: 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; 44734: 7006 moveq #6,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44736: 4e5e unlk %fp <== NOT EXECUTED 44738: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4473a: 7001 moveq #1,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4473c: 4e5e unlk %fp <== NOT EXECUTED 4473e: 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; 44740: 700b moveq #11,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44742: 4e5e unlk %fp <== NOT EXECUTED 44744: 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; 44746: 7011 moveq #17,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44748: 4e5e unlk %fp <== NOT EXECUTED 4474a: 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; 4474c: 7007 moveq #7,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4474e: 4e5e unlk %fp <== NOT EXECUTED 44750: 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; 44752: 700c moveq #12,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44754: 4e5e unlk %fp <== NOT EXECUTED 44756: 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; 44758: 7009 moveq #9,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4475a: 4e5e unlk %fp <== NOT EXECUTED 4475c: 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; 4475e: 7004 moveq #4,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44760: 4e5e unlk %fp <== NOT EXECUTED 44762: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44764: 4a80 tstl %d0 44766: 6600 ff16 bnew 4467e 4476a: 4280 clrl %d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4476c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000433c4 : 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; 433c4: 203c 0000 04b0 movel #1200,%d0 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 433ca: 4e56 0000 linkw %fp,#0 433ce: 222e 0008 movel %fp@(8),%d1 433d2: 2f02 movel %d2,%sp@- int32_t baud; switch (termios_baud) { 433d4: 7409 moveq #9,%d2 433d6: b481 cmpl %d1,%d2 433d8: 6740 beqs 4341a 433da: 6c44 bges 43420 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; 433dc: 203c 0000 4b00 movel #19200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 433e2: 740e moveq #14,%d2 433e4: b481 cmpl %d1,%d2 433e6: 6732 beqs 4341a 433e8: 6c68 bges 43452 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; 433ea: 203c 0001 c200 movel #115200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 433f0: 0c81 0000 1002 cmpil #4098,%d1 433f6: 6722 beqs 4341a 433f8: 6f00 00c0 blew 434ba 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; 433fc: 203c 0003 8400 movel #230400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43402: 0c81 0000 1003 cmpil #4099,%d1 43408: 6710 beqs 4341a 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; 4340a: 203c 0007 0800 movel #460800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43410: 0c81 0000 1004 cmpil #4100,%d1 43416: 6702 beqs 4341a <== 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; 43418: 70ff moveq #-1,%d0 default: baud = -1; break; } return baud; } 4341a: 241f movel %sp@+,%d2 4341c: 4e5e unlk %fp 4341e: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43420: 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; 43424: 303c 0086 movew #134,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43428: b481 cmpl %d1,%d2 4342a: 67ee beqs 4341a 4342c: 6d54 blts 43482 <== NEVER TAKEN 4342e: 103c 0001 moveb #1,%d0 43432: b081 cmpl %d1,%d0 43434: 6700 00a6 beqw 434dc 43438: 6c00 00b2 bgew 434ec 4343c: 7402 moveq #2,%d2 4343e: b481 cmpl %d1,%d2 43440: 6700 00a2 beqw 434e4 43444: 7003 moveq #3,%d0 43446: b081 cmpl %d1,%d0 43448: 66ce bnes 43418 <== NEVER TAKEN case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 4344a: 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; 4344c: 706e moveq #110,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 4344e: 4e5e unlk %fp 43450: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43452: 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; 43456: 303c 0960 movew #2400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4345a: b481 cmpl %d1,%d2 4345c: 67bc beqs 4341a 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; 4345e: 303c 0708 movew #1800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43462: b481 cmpl %d1,%d2 43464: 6eb4 bgts 4341a <== NEVER TAKEN 43466: 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; 4346a: 303c 12c0 movew #4800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4346e: b481 cmpl %d1,%d2 43470: 67a8 beqs 4341a <== NEVER TAKEN 43472: 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; 43476: 303c 2580 movew #9600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4347a: b481 cmpl %d1,%d2 4347c: 679c beqs 4341a 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; 4347e: 70ff moveq #-1,%d0 <== NOT EXECUTED 43480: 6098 bras 4341a <== 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; 43482: 203c 0000 00c8 movel #200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43488: 7406 moveq #6,%d2 4348a: b481 cmpl %d1,%d2 4348c: 678c beqs 4341a <== NEVER TAKEN 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; 4348e: 0680 ffff ffce addil #-50,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43494: b481 cmpl %d1,%d2 43496: 6e82 bgts 4341a <== NEVER TAKEN 43498: 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; 4349c: 303c 012c movew #300,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434a0: b481 cmpl %d1,%d2 434a2: 6700 ff76 beqw 4341a 434a6: 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; 434aa: 303c 0258 movew #600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434ae: b481 cmpl %d1,%d2 434b0: 6700 ff68 beqw 4341a 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; 434b4: 70ff moveq #-1,%d0 <== NOT EXECUTED 434b6: 6000 ff62 braw 4341a <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 434ba: 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; 434bc: 203c 0000 9600 movel #38400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434c2: b481 cmpl %d1,%d2 434c4: 6700 ff54 beqw 4341a 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; 434c8: 303c e100 movew #-7936,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434cc: 0c81 0000 1001 cmpil #4097,%d1 434d2: 6700 ff46 beqw 4341a 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; 434d6: 70ff moveq #-1,%d0 <== NOT EXECUTED 434d8: 6000 ff40 braw 4341a <== NOT EXECUTED default: baud = -1; break; } return baud; } 434dc: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434de: 7032 moveq #50,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434e0: 4e5e unlk %fp 434e2: 4e75 rts 434e4: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434e6: 704b moveq #75,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434e8: 4e5e unlk %fp 434ea: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 434ec: 4a81 tstl %d1 434ee: 6600 ff28 bnew 43418 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434f2: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434f4: 4280 clrl %d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434f6: 4e5e unlk %fp ... =============================================================================== 00043538 : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 43538: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 4353a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 4353e: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 43542: 23d0 0005 d814 movel %a0@,5d814 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 43548: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 4354c: 23d0 0005 d818 movel %a0@,5d818 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 43552: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 43556: 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; 43558: 23d0 0005 d81c movel %a0@,5d81c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } =============================================================================== 00044b34 : } } rtems_status_code rtems_termios_close (void *arg) { 44b34: 4e56 fff4 linkw %fp,#-12 44b38: 48d7 1c00 moveml %a2-%a4,%sp@ 44b3c: 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); 44b40: 49f9 0004 5d2c lea 45d2c ,%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; 44b46: 2053 moveal %a3@,%a0 44b48: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44b4c: 42a7 clrl %sp@- 44b4e: 42a7 clrl %sp@- 44b50: 2f39 0005 ee5c movel 5ee5c ,%sp@- 44b56: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 44b58: 4fef 000c lea %sp@(12),%sp 44b5c: 4a80 tstl %d0 44b5e: 6600 011c bnew 44c7c rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 44b62: 202a 0008 movel %a2@(8),%d0 44b66: 5380 subql #1,%d0 44b68: 2540 0008 movel %d0,%a2@(8) 44b6c: 6600 00a4 bnew 44c12 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44b70: 202a 00cc movel %a2@(204),%d0 44b74: 41f9 0005 e614 lea 5e614 ,%a0 44b7a: e788 lsll #3,%d0 44b7c: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 44b80: 4a88 tstl %a0 44b82: 6700 012c beqw 44cb0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44b86: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b88: 4e90 jsr %a0@ <== NOT EXECUTED 44b8a: 588f addql #4,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 44b8c: 7002 moveq #2,%d0 <== NOT EXECUTED 44b8e: b0aa 00b4 cmpl %a2@(180),%d0 <== NOT EXECUTED 44b92: 6700 00c0 beqw 44c54 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 44b96: 206a 009c moveal %a2@(156),%a0 44b9a: 4a88 tstl %a0 44b9c: 6710 beqs 44bae (*tty->device.lastClose)(tty->major, tty->minor, arg); 44b9e: 2f0b movel %a3,%sp@- 44ba0: 2f2a 0010 movel %a2@(16),%sp@- 44ba4: 2f2a 000c movel %a2@(12),%sp@- 44ba8: 4e90 jsr %a0@ 44baa: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 44bae: 2052 moveal %a2@,%a0 44bb0: 4a88 tstl %a0 44bb2: 6700 00d0 beqw 44c84 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 44bb6: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 44bbc: 206a 0004 moveal %a2@(4),%a0 44bc0: 4a88 tstl %a0 44bc2: 6700 00d8 beqw 44c9c if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 44bc6: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 44bc8: 2f2a 0014 movel %a2@(20),%sp@- 44bcc: 47f9 0004 5c54 lea 45c54 ,%a3 44bd2: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 44bd4: 2f2a 0018 movel %a2@(24),%sp@- 44bd8: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 44bda: 2f2a 008c movel %a2@(140),%sp@- 44bde: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 44be0: 4fef 000c lea %sp@(12),%sp 44be4: 4aaa 00a0 tstl %a2@(160) 44be8: 6740 beqs 44c2a (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 44bea: 7002 moveq #2,%d0 44bec: b0aa 00b4 cmpl %a2@(180),%d0 44bf0: 6738 beqs 44c2a <== NEVER TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 44bf2: 2f2a 0058 movel %a2@(88),%sp@- 44bf6: 47f9 0004 a6f4 lea 4a6f4 ,%a3 44bfc: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 44bfe: 2f2a 007c movel %a2@(124),%sp@- 44c02: 4e93 jsr %a3@ free (tty->cbuf); 44c04: 2f2a 001c movel %a2@(28),%sp@- 44c08: 4e93 jsr %a3@ free (tty); 44c0a: 2f0a movel %a2,%sp@- 44c0c: 4e93 jsr %a3@ 44c0e: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 44c12: 2f39 0005 ee5c movel 5ee5c ,%sp@- 44c18: 4eb9 0004 5e68 jsr 45e68 return RTEMS_SUCCESSFUL; } 44c1e: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 44c24: 4280 clrl %d0 44c26: 4e5e unlk %fp 44c28: 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); 44c2a: 2f2a 0068 movel %a2@(104),%sp@- 44c2e: 4e93 jsr %a3@ 44c30: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 44c32: 47f9 0004 a6f4 lea 4a6f4 ,%a3 44c38: 2f2a 0058 movel %a2@(88),%sp@- 44c3c: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 44c3e: 2f2a 007c movel %a2@(124),%sp@- 44c42: 4e93 jsr %a3@ free (tty->cbuf); 44c44: 2f2a 001c movel %a2@(28),%sp@- 44c48: 4e93 jsr %a3@ free (tty); 44c4a: 2f0a movel %a2,%sp@- 44c4c: 4e93 jsr %a3@ 44c4e: 4fef 0010 lea %sp@(16),%sp 44c52: 60be bras 44c12 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 44c54: 4878 0001 pea 1 <== NOT EXECUTED 44c58: 49f9 0004 5814 lea 45814 ,%a4 <== NOT EXECUTED 44c5e: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44c62: 4e94 jsr %a4@ <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44c64: 508f addql #8,%sp <== NOT EXECUTED 44c66: 4a80 tstl %d0 <== NOT EXECUTED 44c68: 6612 bnes 44c7c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 44c6a: 4878 0001 pea 1 <== NOT EXECUTED 44c6e: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44c72: 4e94 jsr %a4@ <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44c74: 508f addql #8,%sp <== NOT EXECUTED 44c76: 4a80 tstl %d0 <== NOT EXECUTED 44c78: 6700 ff1c beqw 44b96 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 44c7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44c7e: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 44c84: 206a 0004 moveal %a2@(4),%a0 44c88: 23c8 0005 ee60 movel %a0,5ee60 if ( rtems_termios_ttyTail != NULL ) { 44c8e: 6748 beqs 44cd8 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 44c90: 4290 clrl %a0@ <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 44c92: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 44c96: 4a88 tstl %a0 <== NOT EXECUTED 44c98: 6600 ff2c bnew 44bc6 <== NOT EXECUTED 44c9c: 2052 moveal %a2@,%a0 rtems_termios_ttyHead = tty->forw; 44c9e: 23c8 0005 ee64 movel %a0,5ee64 if ( rtems_termios_ttyHead != NULL ) { 44ca4: 6700 ff22 beqw 44bc8 rtems_termios_ttyHead->back = NULL; 44ca8: 42a8 0004 clrl %a0@(4) 44cac: 6000 ff1a braw 44bc8 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44cb0: 42a7 clrl %sp@- 44cb2: 42a7 clrl %sp@- 44cb4: 2f2a 0018 movel %a2@(24),%sp@- 44cb8: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 44cba: 4fef 000c lea %sp@(12),%sp 44cbe: 4a80 tstl %d0 44cc0: 66ba bnes 44c7c <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 44cc2: 2f0a movel %a2,%sp@- 44cc4: 4eba f6e4 jsr %pc@(443aa ) 44cc8: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts 44cca: 7002 moveq #2,%d0 44ccc: b0aa 00b4 cmpl %a2@(180),%d0 44cd0: 6600 fec4 bnew 44b96 44cd4: 6000 ff7e braw 44c54 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 44cd8: 42b9 0005 ee64 clrl 5ee64 44cde: 6000 fee8 braw 44bc8 =============================================================================== 000437ae : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 437ae: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 437b2: 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) { 437b6: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 437ba: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 437be: 7002 moveq #2,%d0 437c0: b0a8 00b4 cmpl %a0@(180),%d0 437c4: 672a beqs 437f0 <== 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 ) { 437c6: 7005 moveq #5,%d0 437c8: b0a8 00cc cmpl %a0@(204),%d0 437cc: 670c beqs 437da <== 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); 437ce: 2d48 0008 movel %a0,%fp@(8) } } 437d2: 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); 437d4: 4ef9 0004 357c jmp 4357c } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 437da: 2279 0005 e6c8 moveal 5e6c8 ,%a1<== NOT EXECUTED 437e0: 4a89 tstl %a1 <== NOT EXECUTED 437e2: 6706 beqs 437ea <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 437e4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 437e6: 4e91 jsr %a1@ <== NOT EXECUTED 437e8: 588f addql #4,%sp <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 437ea: 4280 clrl %d0 <== NOT EXECUTED 437ec: 4e5e unlk %fp <== NOT EXECUTED 437ee: 4e75 rts <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 437f0: 4878 0002 pea 2 <== NOT EXECUTED 437f4: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 437f8: 4eb9 0004 5814 jsr 45814 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 437fe: 508f addql #8,%sp <== NOT EXECUTED 43800: 4a80 tstl %d0 <== NOT EXECUTED 43802: 67e6 beqs 437ea <== NOT EXECUTED rtems_fatal_error_occurred (sc); 43804: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43806: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED =============================================================================== 0004380c : * 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) { 4380c: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED 43810: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 43814: 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) { 43818: 49f9 0005 e614 lea 5e614 ,%a4 <== NOT EXECUTED 4381e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43822: 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) { 43824: 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) { 43828: 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) { 4382c: 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) { 43830: 4a88 tstl %a0 <== NOT EXECUTED 43832: 6774 beqs 438a8 <== NOT EXECUTED while (len--) { 43834: 4a83 tstl %d3 <== NOT EXECUTED 43836: 6734 beqs 4386c <== NOT EXECUTED 43838: 4282 clrl %d2 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 4383a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4383c: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 43840: 5282 addql #1,%d2 <== NOT EXECUTED 43842: 49c1 extbl %d1 <== NOT EXECUTED 43844: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43846: 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--) { 43848: 508f addql #8,%sp <== NOT EXECUTED 4384a: b483 cmpl %d3,%d2 <== NOT EXECUTED 4384c: 671e beqs 4386c <== NOT EXECUTED 4384e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43852: eb88 lsll #5,%d0 <== NOT EXECUTED 43854: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 43858: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4385a: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 4385e: 5282 addql #1,%d2 <== NOT EXECUTED 43860: 49c1 extbl %d1 <== NOT EXECUTED 43862: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43864: 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--) { 43866: 508f addql #8,%sp <== NOT EXECUTED 43868: b483 cmpl %d3,%d2 <== NOT EXECUTED 4386a: 66e2 bnes 4384e <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4386c: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43870: 6628 bnes 4389a <== NOT EXECUTED 43872: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43876: 4a88 tstl %a0 <== NOT EXECUTED 43878: 6720 beqs 4389a <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4387a: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4387e: 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); 43880: 486a 0030 pea %a2@(48) <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43884: 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); 43886: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43888: 508f addql #8,%sp <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 4388a: 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; 4388c: 2546 00e4 movel %d6,%a2@(228) <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 43890: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43896: 4e5e unlk %fp <== NOT EXECUTED 43898: 4e75 rts <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 4389a: 4285 clrl %d5 <== NOT EXECUTED } 4389c: 2005 movel %d5,%d0 <== NOT EXECUTED 4389e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 438a4: 4e5e unlk %fp <== NOT EXECUTED 438a6: 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, 438a8: 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); 438ac: 4bea 0030 lea %a2@(48),%a5 <== NOT EXECUTED 438b0: 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); 438b2: 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); 438b6: 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, 438b8: 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); 438bc: 1d40 fff7 moveb %d0,%fp@(-9) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 438c0: 4a83 tstl %d3 <== NOT EXECUTED 438c2: 6700 00e8 beqw 439ac <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 438c6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 438ca: 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) { 438cc: 0800 0009 btst #9,%d0 <== NOT EXECUTED 438d0: 671c beqs 438ee <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 438d2: 4281 clrl %d1 <== NOT EXECUTED 438d4: 122a 004a moveb %a2@(74),%d1 <== NOT EXECUTED 438d8: 1004 moveb %d4,%d0 <== NOT EXECUTED 438da: 49c0 extbl %d0 <== NOT EXECUTED 438dc: b280 cmpl %d0,%d1 <== NOT EXECUTED 438de: 6700 014a beqw 43a2a <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 438e2: 4281 clrl %d1 <== NOT EXECUTED 438e4: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 438e8: b280 cmpl %d0,%d1 <== NOT EXECUTED 438ea: 6700 00dc beqw 439c8 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 438ee: 4a2e fff7 tstb %fp@(-9) <== NOT EXECUTED 438f2: 6600 00e6 bnew 439da <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 438f6: 2e2a 0060 movel %a2@(96),%d7 <== NOT EXECUTED 438fa: 5287 addql #1,%d7 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 438fc: 200c movel %a4,%d0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 438fe: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43902: 4c41 7002 remul %d1,%d2,%d7 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43906: 40c7 movew %sr,%d7 <== NOT EXECUTED 43908: 8087 orl %d7,%d0 <== NOT EXECUTED 4390a: 46c0 movew %d0,%sr <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4390c: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43910: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43914: 9081 subl %d1,%d0 <== NOT EXECUTED 43916: 2240 moveal %d0,%a1 <== NOT EXECUTED 43918: d3c2 addal %d2,%a1 <== NOT EXECUTED 4391a: 2209 movel %a1,%d1 <== NOT EXECUTED 4391c: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43920: 4c40 1006 remul %d0,%d6,%d1 <== NOT EXECUTED 43924: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 43928: bcaa 00c0 cmpl %a2@(192),%d6 <== NOT EXECUTED 4392c: 633e blss 4396c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 4392e: 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) 43932: 0800 0000 btst #0,%d0 <== NOT EXECUTED 43936: 6634 bnes 4396c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 43938: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4393c: 7201 moveq #1,%d1 <== NOT EXECUTED 4393e: 8081 orl %d1,%d0 <== NOT EXECUTED 43940: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 43944: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43948: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 4394e: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 43954: 6700 0112 beqw 43a68 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 43958: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4395c: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 43962: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 43968: 6700 0136 beqw 43aa0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 4396c: 46c7 movew %d7,%sr <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 4396e: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 43972: b480 cmpl %d0,%d2 <== NOT EXECUTED 43974: 6700 00d2 beqw 43a48 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 43978: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4397c: 1184 2800 moveb %d4,%a0@(00000000,%d2:l) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 43980: 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 )) { 43984: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43988: 6618 bnes 439a2 <== NOT EXECUTED 4398a: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 4398e: 4a88 tstl %a0 <== NOT EXECUTED 43990: 6710 beqs 439a2 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43992: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 43996: 2f0d movel %a5,%sp@- <== NOT EXECUTED 43998: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4399a: 508f addql #8,%sp <== NOT EXECUTED 4399c: 7201 moveq #1,%d1 <== NOT EXECUTED 4399e: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 439a2: 528b addql #1,%a3 <== NOT EXECUTED 439a4: 5383 subql #1,%d3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 439a6: 4a83 tstl %d3 <== NOT EXECUTED 439a8: 6600 ff1c bnew 438c6 <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); 439ac: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 439b0: dbaa 0078 addl %d5,%a2@(120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 439b4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return dropped; 439ba: 588f addql #4,%sp <== NOT EXECUTED } 439bc: 2005 movel %d5,%d0 <== NOT EXECUTED 439be: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 439c4: 4e5e unlk %fp <== NOT EXECUTED 439c6: 4e75 rts <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 439c8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439cc: 72ef moveq #-17,%d1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 439ce: 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; 439d0: c081 andl %d1,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 439d2: 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; 439d6: 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) { 439da: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439de: 7c30 moveq #48,%d6 <== NOT EXECUTED 439e0: 7220 moveq #32,%d1 <== NOT EXECUTED 439e2: c086 andl %d6,%d0 <== NOT EXECUTED 439e4: b280 cmpl %d0,%d1 <== NOT EXECUTED 439e6: 66ba bnes 439a2 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 439e8: 200c movel %a4,%d0 <== NOT EXECUTED 439ea: 40c2 movew %sr,%d2 <== NOT EXECUTED 439ec: 8082 orl %d2,%d0 <== NOT EXECUTED 439ee: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 439f0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439f4: 7cdf moveq #-33,%d6 <== NOT EXECUTED 439f6: c086 andl %d6,%d0 <== NOT EXECUTED 439f8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 439fc: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a00: 6608 bnes 43a0a <== 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); 43a02: 46c2 movew %d2,%sr <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43a04: 528b addql #1,%a3 <== NOT EXECUTED 43a06: 5383 subql #1,%d3 <== NOT EXECUTED 43a08: 609c bras 439a6 <== 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, 43a0a: 4878 0001 pea 1 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 43a0e: 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, 43a12: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43a16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a18: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a1c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43a20: 4e90 jsr %a0@ <== NOT EXECUTED 43a22: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43a26: 46c2 movew %d2,%sr <== NOT EXECUTED 43a28: 60da bras 43a04 <== 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]) { 43a2a: 4281 clrl %d1 <== NOT EXECUTED 43a2c: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 43a30: b280 cmpl %d0,%d1 <== NOT EXECUTED 43a32: 671e beqs 43a52 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 43a34: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a38: 7c10 moveq #16,%d6 <== NOT EXECUTED 43a3a: 8086 orl %d6,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a3c: 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; 43a3e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a42: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 43a46: 6092 bras 439da <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 43a48: 5285 addql #1,%d5 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43a4a: 528b addql #1,%a3 <== NOT EXECUTED 43a4c: 5383 subql #1,%d3 <== NOT EXECUTED 43a4e: 6000 ff56 braw 439a6 <== 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; 43a52: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a56: 7210 moveq #16,%d1 <== NOT EXECUTED 43a58: b380 eorl %d1,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a5a: 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; 43a5c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a60: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 43a64: 6000 ff74 braw 439da <== 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) || 43a68: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a6c: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43a70: 6608 bnes 43a7a <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 43a72: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a76: 6600 fef4 bnew 4396c <== 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, 43a7a: 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; 43a7e: 7c02 moveq #2,%d6 <== NOT EXECUTED 43a80: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 43a84: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 43a88: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a8c: 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; 43a90: 8286 orl %d6,%d1 <== NOT EXECUTED 43a92: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 43a96: 4e90 jsr %a0@ <== NOT EXECUTED 43a98: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43a9c: 6000 fece braw 4396c <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 43aa0: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 43aa4: 303c 0004 movew #4,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 43aa8: 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; 43aac: 8280 orl %d0,%d1 <== NOT EXECUTED 43aae: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 43ab2: 4a88 tstl %a0 <== NOT EXECUTED 43ab4: 6700 feb6 beqw 4396c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 43ab8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43abc: 4e90 jsr %a0@ <== NOT EXECUTED 43abe: 588f addql #4,%sp <== NOT EXECUTED 43ac0: 6000 feaa braw 4396c <== NOT EXECUTED =============================================================================== 000434fc : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 434fc: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 43500: 4ab9 0005 ee5c tstl 5ee5c 43506: 6704 beqs 4350c RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 43508: 4e5e unlk %fp 4350a: 4e75 rts /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 4350c: 4879 0005 ee5c pea 5ee5c 43512: 42a7 clrl %sp@- 43514: 4878 0054 pea 54 43518: 4878 0001 pea 1 4351c: 2f3c 5452 6d69 movel #1414688105,%sp@- 43522: 4eb9 0004 5a8c jsr 45a8c 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) 43528: 4fef 0014 lea %sp@(20),%sp 4352c: 4a80 tstl %d0 4352e: 67d8 beqs 43508 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43530: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43532: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED =============================================================================== 00044746 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 44746: 4e56 ffec linkw %fp,#-20 4474a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4474e: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44752: 2053 moveal %a3@,%a0 44754: 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); 44758: 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; 4475a: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 4475e: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44762: 42a7 clrl %sp@- 44764: 2f2a 0018 movel %a2@(24),%sp@- 44768: 4eb9 0004 5d2c jsr 45d2c if (sc != RTEMS_SUCCESSFUL) { 4476e: 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); 44772: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 44774: 662c bnes 447a2 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 44776: 202b 0004 movel %a3@(4),%d0 4477a: 7204 moveq #4,%d1 4477c: b280 cmpl %d0,%d1 4477e: 6774 beqs 447f4 <== NEVER TAKEN 44780: 6530 bcss 447b2 <== NEVER TAKEN 44782: 7602 moveq #2,%d3 44784: b680 cmpl %d0,%d3 44786: 6700 00b6 beqw 4483e 4478a: 6400 0224 bccw 449b0 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 4478e: 2f0a movel %a2,%sp@- 44790: 4eba fc18 jsr %pc@(443aa ) break; 44794: 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); 44796: 2f2a 0018 movel %a2@(24),%sp@- 4479a: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 447a0: 588f addql #4,%sp } 447a2: 2002 movel %d2,%d0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 447a4: 2742 000c movel %d2,%a3@(12) return sc; } 447a8: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 447ae: 4e5e unlk %fp 447b0: 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) { 447b2: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 447b8: 6756 beqs 44810 <== NOT EXECUTED 447ba: 6200 0236 bhiw 449f2 <== NOT EXECUTED 447be: 7605 moveq #5,%d3 <== NOT EXECUTED 447c0: b680 cmpl %d0,%d3 <== NOT EXECUTED 447c2: 6700 01ce beqw 44992 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 447c6: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 447ca: eb88 lsll #5,%d0 <== NOT EXECUTED 447cc: 0680 0005 e62c addil #386604,%d0 <== NOT EXECUTED 447d2: 2240 moveal %d0,%a1 <== NOT EXECUTED 447d4: 2051 moveal %a1@,%a0 <== NOT EXECUTED 447d6: 4a88 tstl %a0 <== NOT EXECUTED 447d8: 6700 0292 beqw 44a6c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 447dc: 2f0b movel %a3,%sp@- <== NOT EXECUTED 447de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447e0: 4e90 jsr %a0@ <== NOT EXECUTED 447e2: 508f addql #8,%sp <== NOT EXECUTED 447e4: 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); 447e6: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 447ea: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 447f0: 588f addql #4,%sp <== NOT EXECUTED 447f2: 60ae bras 447a2 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 447f4: 2014 movel %a4@,%d0 <== NOT EXECUTED 447f6: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 447fa: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 447fe: 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); 44802: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44806: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 4480c: 588f addql #4,%sp <== NOT EXECUTED 4480e: 6092 bras 447a2 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 44810: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44814: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44818: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 4481a: 6b00 02a4 bmiw 44ac0 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 4481e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44822: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44826: d280 addl %d0,%d1 <== NOT EXECUTED 44828: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 4482c: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 4482e: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44832: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44838: 588f addql #4,%sp <== NOT EXECUTED 4483a: 6000 ff66 braw 447a2 <== 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; 4483e: 206b 0008 moveal %a3@(8),%a0 44842: 49ea 0030 lea %a2@(48),%a4 44846: 2898 movel %a0@+,%a4@ 44848: 2558 0034 movel %a0@+,%a2@(52) 4484c: 2558 0038 movel %a0@+,%a2@(56) 44850: 2558 003c movel %a0@+,%a2@(60) 44854: 2558 0040 movel %a0@+,%a2@(64) 44858: 2558 0044 movel %a0@+,%a2@(68) 4485c: 2558 0048 movel %a0@+,%a2@(72) 44860: 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) && 44864: 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; 44868: 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) && 4486c: 0800 0009 btst #9,%d0 44870: 6746 beqs 448b8 44872: 202a 0030 movel %a2@(48),%d0 44876: 0280 0000 0400 andil #1024,%d0 4487c: 663a bnes 448b8 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 4487e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44882: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 44888: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 4488c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44890: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44894: 6722 beqs 448b8 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 44896: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 4489c: 40c3 movew %sr,%d3 <== NOT EXECUTED 4489e: 8083 orl %d3,%d0 <== NOT EXECUTED 448a0: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 448a2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448a6: 72df moveq #-33,%d1 <== NOT EXECUTED 448a8: c081 andl %d1,%d0 <== NOT EXECUTED 448aa: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 448ae: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 448b2: 6600 0242 bnew 44af6 <== 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); 448b6: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 448b8: 202a 00b8 movel %a2@(184),%d0 448bc: 0800 000a btst #10,%d0 448c0: 6724 beqs 448e6 <== ALWAYS TAKEN 448c2: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 448c6: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 448cc: 6618 bnes 448e6 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 448ce: 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); 448d2: 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); 448d4: 0880 000a bclr #10,%d0 <== NOT EXECUTED 448d8: 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); 448dc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448e0: c083 andl %d3,%d0 <== NOT EXECUTED 448e2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 448e6: 202a 00b8 movel %a2@(184),%d0 448ea: 0800 0008 btst #8,%d0 448ee: 6738 beqs 44928 <== ALWAYS TAKEN 448f0: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 448f4: 6d00 01e4 bltw 44ada <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 448f8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448fc: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 44900: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 44904: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44908: 44c0 movew %d0,%ccr <== NOT EXECUTED 4490a: 6610 bnes 4491c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 4490c: 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) && 44910: 4a88 tstl %a0 <== NOT EXECUTED 44912: 6708 beqs 4491c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 44914: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44918: 4e90 jsr %a0@ <== NOT EXECUTED 4491a: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 4491c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44920: 72fb moveq #-5,%d1 <== NOT EXECUTED 44922: c081 andl %d1,%d0 <== NOT EXECUTED 44924: 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) { 44928: 4aaa 0038 tstl %a2@(56) 4492c: 6d00 01ac bltw 44ada tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 44930: 202a 0030 movel %a2@(48),%d0 44934: 0800 000c btst #12,%d0 44938: 670c beqs 44946 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 4493a: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 4493e: 08c1 000a bset #10,%d1 <== NOT EXECUTED 44942: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 44946: 0800 000a btst #10,%d0 4494a: 670c beqs 44958 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 4494c: 202a 00b8 movel %a2@(184),%d0 44950: 08c0 0009 bset #9,%d0 44954: 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) { 44958: 7002 moveq #2,%d0 4495a: c0aa 003c andl %a2@(60),%d0 4495e: 6700 011e beqw 44a7e else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 44962: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 44966: 42aa 0070 clrl %a2@(112) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4496a: 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; 4496e: 42aa 0074 clrl %a2@(116) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44972: 4a88 tstl %a0 44974: 6700 fe20 beqw 44796 (*tty->device.setAttributes)(tty->minor, &tty->termios); 44978: 2f0c movel %a4,%sp@- 4497a: 2f2a 0010 movel %a2@(16),%sp@- 4497e: 4e90 jsr %a0@ 44980: 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); 44982: 2f2a 0018 movel %a2@(24),%sp@- 44986: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 4498c: 588f addql #4,%sp 4498e: 6000 fe12 braw 447a2 case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 44992: 2014 movel %a4@,%d0 <== NOT EXECUTED 44994: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 44998: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 4499c: 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); 449a0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 449a4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 449aa: 588f addql #4,%sp <== NOT EXECUTED 449ac: 6000 fdf4 braw 447a2 <== 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) { 449b0: 123c 0001 moveb #1,%d1 449b4: b280 cmpl %d0,%d1 449b6: 6600 fe0e bnew 447c6 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 449ba: 206b 0008 moveal %a3@(8),%a0 449be: 20ea 0030 movel %a2@(48),%a0@+ 449c2: 20ea 0034 movel %a2@(52),%a0@+ 449c6: 20ea 0038 movel %a2@(56),%a0@+ 449ca: 20ea 003c movel %a2@(60),%a0@+ 449ce: 20ea 0040 movel %a2@(64),%a0@+ 449d2: 20ea 0044 movel %a2@(68),%a0@+ 449d6: 20ea 0048 movel %a2@(72),%a0@+ 449da: 20ea 004c movel %a2@(76),%a0@+ 449de: 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); 449e2: 2f2a 0018 movel %a2@(24),%sp@- 449e6: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 449ec: 588f addql #4,%sp 449ee: 6000 fdb2 braw 447a2 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 449f2: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 449f8: 675a beqs 44a54 <== NOT EXECUTED 449fa: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 44a00: 6600 fdc4 bnew 447c6 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44a04: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44a08: 49f9 0005 e614 lea 5e614 ,%a4 <== NOT EXECUTED 44a0e: e788 lsll #3,%d0 <== NOT EXECUTED 44a10: 2074 0c04 moveal %a4@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 44a14: 4a88 tstl %a0 <== NOT EXECUTED 44a16: 6708 beqs 44a20 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44a18: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a1a: 4e90 jsr %a0@ <== NOT EXECUTED 44a1c: 588f addql #4,%sp <== NOT EXECUTED 44a1e: 2400 movel %d0,%d2 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 44a20: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a24: 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) { 44a26: 2200 movel %d0,%d1 <== NOT EXECUTED 44a28: 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); 44a2a: 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) { 44a2e: 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 */ 44a32: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44a36: 4a88 tstl %a0 <== NOT EXECUTED 44a38: 6700 fd5c beqw 44796 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 44a3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a3e: 4e90 jsr %a0@ <== NOT EXECUTED 44a40: 588f addql #4,%sp <== NOT EXECUTED 44a42: 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); 44a44: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a48: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a4e: 588f addql #4,%sp <== NOT EXECUTED 44a50: 6000 fd50 braw 447a2 <== 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; 44a54: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a58: 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); 44a5c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a60: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a66: 588f addql #4,%sp <== NOT EXECUTED 44a68: 6000 fd38 braw 447a2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a6c: 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) { 44a70: 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); 44a72: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a78: 588f addql #4,%sp <== NOT EXECUTED 44a7a: 6000 fd26 braw 447a2 <== 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; 44a7e: 4283 clrl %d3 <== NOT EXECUTED 44a80: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 44a84: 4eb9 0004 55e4 jsr 455e4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 44a8a: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 44a8e: 760a moveq #10,%d3 <== NOT EXECUTED 44a90: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 44a94: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 44a98: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44a9c: 677a beqs 44b18 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 44a9e: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 44aa2: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 44aa6: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44aaa: 6600 febe bnew 4496a <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44aae: 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; 44ab2: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44ab6: 4a88 tstl %a0 <== NOT EXECUTED 44ab8: 6600 febe bnew 44978 <== NOT EXECUTED 44abc: 6000 fcd8 braw 44796 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 44ac0: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44ac4: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 44ac6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44aca: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44ace: d280 addl %d0,%d1 <== NOT EXECUTED 44ad0: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44ad4: 2081 movel %d1,%a0@ <== NOT EXECUTED 44ad6: 6000 fd56 braw 4482e <== 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; 44ada: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44ade: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 44ae2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 44ae6: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 44aea: 0800 000c btst #12,%d0 <== NOT EXECUTED 44aee: 6700 fe56 beqw 44946 <== NOT EXECUTED 44af2: 6000 fe46 braw 4493a <== 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); 44af6: 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, 44afa: 4878 0001 pea 1 <== NOT EXECUTED 44afe: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 44b02: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b04: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44b08: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44b0c: 4e90 jsr %a0@ <== NOT EXECUTED 44b0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 44b12: 46c3 movew %d3,%sr <== NOT EXECUTED 44b14: 6000 fda2 braw 448b8 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 44b18: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44b1c: 6600 fe44 bnew 44962 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 44b20: 7001 moveq #1,%d0 <== NOT EXECUTED } } } if (tty->device.setAttributes) 44b22: 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; 44b26: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED } } } if (tty->device.setAttributes) 44b2a: 4a88 tstl %a0 <== NOT EXECUTED 44b2c: 6600 fe4a bnew 44978 <== NOT EXECUTED 44b30: 6000 fc64 braw 44796 <== NOT EXECUTED =============================================================================== 000448e4 : #include int rtems_termios_number_to_baud( int32_t baud ) { 448e4: 4e56 0000 linkw %fp,#0 448e8: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 448ec: 0c81 0000 04b0 cmpil #1200,%d1 448f2: 6700 011c beqw 44a10 448f6: 6f3c bles 44934 448f8: 0c81 0000 4b00 cmpil #19200,%d1 448fe: 6700 011c beqw 44a1c 44902: 6f60 bles 44964 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; 44904: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 4490a: 0c81 0001 c200 cmpil #115200,%d1 44910: 671e beqs 44930 44912: 6f00 00a8 blew 449bc 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; 44916: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 4491c: 0c81 0003 8400 cmpil #230400,%d1 44922: 670c beqs 44930 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; 44924: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44926: 0c81 0007 0800 cmpil #460800,%d1 4492c: 6702 beqs 44930 <== 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; 4492e: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 44930: 4e5e unlk %fp 44932: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44934: 0c81 0000 0086 cmpil #134,%d1 4493a: 6700 00da beqw 44a16 4493e: 6f46 bles 44986 44940: 0c81 0000 00c8 cmpil #200,%d1 44946: 6700 00b6 beqw 449fe 4494a: 6f56 bles 449a2 4494c: 0c81 0000 012c cmpil #300,%d1 44952: 6700 00a4 beqw 449f8 44956: 0c81 0000 0258 cmpil #600,%d1 4495c: 66d0 bnes 4492e <== 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; 4495e: 7008 moveq #8,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44960: 4e5e unlk %fp 44962: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44964: 0c81 0000 0960 cmpil #2400,%d1 4496a: 6700 009e beqw 44a0a 4496e: 6f66 bles 449d6 44970: 0c81 0000 12c0 cmpil #4800,%d1 44976: 676e beqs 449e6 44978: 0c81 0000 2580 cmpil #9600,%d1 4497e: 66ae bnes 4492e 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; 44980: 700d moveq #13,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44982: 4e5e unlk %fp 44984: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44986: 7032 moveq #50,%d0 44988: b081 cmpl %d1,%d0 4498a: 6778 beqs 44a04 4498c: 6c22 bges 449b0 4498e: 704b moveq #75,%d0 44990: b081 cmpl %d1,%d0 44992: 6758 beqs 449ec 44994: 103c 006e moveb #110,%d0 44998: b081 cmpl %d1,%d0 4499a: 6692 bnes 4492e <== NEVER TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 4499c: 7003 moveq #3,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4499e: 4e5e unlk %fp 449a0: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449a2: 0c81 0000 0096 cmpil #150,%d1 449a8: 6684 bnes 4492e <== 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; 449aa: 7005 moveq #5,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449ac: 4e5e unlk %fp 449ae: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449b0: 4a81 tstl %d1 449b2: 6600 ff7a bnew 4492e 449b6: 4280 clrl %d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449b8: 4e5e unlk %fp 449ba: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449bc: 0c81 0000 9600 cmpil #38400,%d1 449c2: 672e beqs 449f2 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; 449c4: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 449c6: 0c81 0000 e100 cmpil #57600,%d1 449cc: 6700 ff62 beqw 44930 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; 449d0: 70ff moveq #-1,%d0 <== NOT EXECUTED 449d2: 6000 ff5c braw 44930 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 449d6: 0c81 0000 0708 cmpil #1800,%d1 449dc: 6600 ff50 bnew 4492e 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; 449e0: 700a moveq #10,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449e2: 4e5e unlk %fp 449e4: 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; 449e6: 700c moveq #12,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449e8: 4e5e unlk %fp 449ea: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449ec: 7002 moveq #2,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449ee: 4e5e unlk %fp 449f0: 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; 449f2: 700f moveq #15,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449f4: 4e5e unlk %fp 449f6: 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; 449f8: 7007 moveq #7,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449fa: 4e5e unlk %fp 449fc: 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; 449fe: 7006 moveq #6,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a00: 4e5e unlk %fp 44a02: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44a04: 7001 moveq #1,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a06: 4e5e unlk %fp 44a08: 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; 44a0a: 700b moveq #11,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a0c: 4e5e unlk %fp 44a0e: 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; 44a10: 7009 moveq #9,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a12: 4e5e unlk %fp 44a14: 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; 44a16: 7004 moveq #4,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a18: 4e5e unlk %fp 44a1a: 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; 44a1c: 700e moveq #14,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a1e: 4e5e unlk %fp ... =============================================================================== 00044ce2 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44ce2: 4e56 ffdc linkw %fp,#-36 44ce6: 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, 44cea: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44cec: 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, 44cf0: 42a7 clrl %sp@- 44cf2: 2f39 0005 ee5c movel 5ee5c ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44cf8: 262e 000c movel %fp@(12),%d3 44cfc: 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, 44d00: 4eb9 0004 5d2c jsr 45d2c RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44d06: 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, 44d0a: 2800 movel %d0,%d4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44d0c: 6600 027a bnew 44f88 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44d10: 2479 0005 ee64 moveal 5ee64 ,%a2 44d16: 4a8a tstl %a2 44d18: 670e beqs 44d28 if ((tty->major == major) && (tty->minor == minor)) 44d1a: b4aa 000c cmpl %a2@(12),%d2 44d1e: 6700 0274 beqw 44f94 */ 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) { 44d22: 2452 moveal %a2@,%a2 44d24: 4a8a tstl %a2 44d26: 66f2 bnes 44d1a <== NEVER TAKEN static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 44d28: 4878 00e8 pea e8 44d2c: 4878 0001 pea 1 44d30: 4eb9 0004 a608 jsr 4a608 if (tty == NULL) { 44d36: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 44d38: 2840 moveal %d0,%a4 44d3a: 2440 moveal %d0,%a2 if (tty == NULL) { 44d3c: 4a80 tstl %d0 44d3e: 6700 0348 beqw 45088 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44d42: 41f9 0005 d818 lea 5d818 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d48: 4bf9 0004 ac8c lea 4ac8c ,%a5 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44d4e: 2950 0064 movel %a0@,%a4@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d52: 202c 0064 movel %a4@(100),%d0 44d56: 2f00 movel %d0,%sp@- 44d58: 4e95 jsr %a5@ if (tty->rawInBuf.theBuf == NULL) { 44d5a: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d5c: 2940 0058 movel %d0,%a4@(88) if (tty->rawInBuf.theBuf == NULL) { 44d60: 6700 0342 beqw 450a4 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 44d64: 41f9 0005 d81c lea 5d81c ,%a0 44d6a: 2950 0088 movel %a0@,%a4@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44d6e: 202c 0088 movel %a4@(136),%d0 44d72: 2f00 movel %d0,%sp@- 44d74: 4e95 jsr %a5@ if (tty->rawOutBuf.theBuf == NULL) { 44d76: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44d78: 2940 007c movel %d0,%a4@(124) if (tty->rawOutBuf.theBuf == NULL) { 44d7c: 6700 034a beqw 450c8 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44d80: 2f39 0005 d814 movel 5d814 ,%sp@- 44d86: 4e95 jsr %a5@ if (tty->cbuf == NULL) { 44d88: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44d8a: 2940 001c movel %d0,%a4@(28) if (tty->cbuf == NULL) { 44d8e: 6700 0366 beqw 450f6 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 44d92: 2079 0005 ee64 moveal 5ee64 ,%a0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 44d98: 42ac 00d4 clrl %a4@(212) tty->tty_snd.sw_arg = NULL; 44d9c: 42ac 00d8 clrl %a4@(216) tty->tty_rcv.sw_pfn = NULL; 44da0: 42ac 00dc clrl %a4@(220) tty->tty_rcv.sw_arg = NULL; 44da4: 42ac 00e0 clrl %a4@(224) tty->tty_rcvwakeup = 0; 44da8: 42ac 00e4 clrl %a4@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 44dac: 2888 movel %a0,%a4@ tty->back = NULL; 44dae: 42ac 0004 clrl %a4@(4) if (rtems_termios_ttyHead != NULL) 44db2: 4a88 tstl %a0 44db4: 6704 beqs 44dba rtems_termios_ttyHead->back = tty; 44db6: 214c 0004 movel %a4,%a0@(4) rtems_termios_ttyHead = tty; 44dba: 23cc 0005 ee64 movel %a4,5ee64 if (rtems_termios_ttyTail == NULL) 44dc0: 4ab9 0005 ee60 tstl 5ee60 44dc6: 6700 02b6 beqw 4507e tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44dca: 486c 0014 pea %a4@(20) 44dce: 4bf9 0004 5a8c lea 45a8c ,%a5 44dd4: 1039 0005 d820 moveb 5d820 ,%d0 44dda: 42a7 clrl %sp@- 44ddc: 4878 0054 pea 54 44de0: 49c0 extbl %d0 44de2: 4878 0001 pea 1 44de6: 0080 5452 6900 oril #1414686976,%d0 44dec: 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; 44dee: 2943 0010 movel %d3,%a4@(16) tty->major = major; 44df2: 2942 000c movel %d2,%a4@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44df6: 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) 44df8: 4fef 0014 lea %sp@(20),%sp 44dfc: 4a80 tstl %d0 44dfe: 6600 020c bnew 4500c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44e02: 486c 0018 pea %a4@(24) 44e06: 1039 0005 d820 moveb 5d820 ,%d0 44e0c: 42a7 clrl %sp@- 44e0e: 4878 0054 pea 54 44e12: 49c0 extbl %d0 44e14: 4878 0001 pea 1 44e18: 0080 5452 6f00 oril #1414688512,%d0 44e1e: 2f00 movel %d0,%sp@- 44e20: 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) 44e22: 4fef 0014 lea %sp@(20),%sp 44e26: 4a80 tstl %d0 44e28: 6600 01e2 bnew 4500c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44e2c: 486c 008c pea %a4@(140) 44e30: 1039 0005 d820 moveb 5d820 ,%d0 44e36: 42a7 clrl %sp@- 44e38: 4878 0020 pea 20 44e3c: 49c0 extbl %d0 44e3e: 0080 5452 7800 oril #1414690816,%d0 44e44: 42a7 clrl %sp@- 44e46: 2f00 movel %d0,%sp@- 44e48: 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) 44e4a: 4fef 0014 lea %sp@(20),%sp 44e4e: 4a80 tstl %d0 44e50: 6600 01ba bnew 4500c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 44e54: 226e 0014 moveal %fp@(20),%a1 44e58: 41ec 0098 lea %a4@(152),%a0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e5c: 7002 moveq #2,%d0 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 44e5e: 20d9 movel %a1@+,%a0@+ 44e60: 20d9 movel %a1@+,%a0@+ 44e62: 20d9 movel %a1@+,%a0@+ 44e64: 20d9 movel %a1@+,%a0@+ 44e66: 20d9 movel %a1@+,%a0@+ 44e68: 20d9 movel %a1@+,%a0@+ 44e6a: 20d9 movel %a1@+,%a0@+ 44e6c: 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; 44e6e: 42ac 0094 clrl %a4@(148) tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e72: b0ac 00b4 cmpl %a4@(180),%d0 44e76: 6700 019c beqw 45014 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 44e7a: 4aac 00a0 tstl %a4@(160) 44e7e: 6700 0164 beqw 44fe4 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 44e82: 7202 moveq #2,%d1 44e84: b2ac 00b4 cmpl %a4@(180),%d1 44e88: 6700 015a beqw 44fe4 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; 44e8c: 42ac 00b8 clrl %a4@(184) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 44e90: 202c 0064 movel %a4@(100),%d0 tty->highwater = tty->rawInBuf.Size * 3/4; 44e94: 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; 44e98: e288 lsrl #1,%d0 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44e9a: 1239 0005 d820 moveb 5d820 ,%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; 44ea0: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 /* * Bump name characer */ if (c++ == 'z') 44ea4: 49c1 extbl %d1 44ea6: 2a41 moveal %d1,%a5 44ea8: 528d addql #1,%a5 44eaa: 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; 44eac: 2208 movel %a0,%d1 44eae: 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; 44eb0: 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') 44eb4: 3a0d movew %a5,%d5 44eb6: 13c5 0005 d820 moveb %d5,5d820 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'; 44ebc: 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; 44ebe: 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'; 44ec2: 1945 0041 moveb %d5,%a4@(65) tty->termios.c_cc[VQUIT] = '\034'; 44ec6: 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; 44ec8: 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'; 44ecc: 1945 0042 moveb %d5,%a4@(66) tty->termios.c_cc[VERASE] = '\177'; 44ed0: 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; 44ed2: 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'; 44ed6: 1945 0043 moveb %d5,%a4@(67) tty->termios.c_cc[VKILL] = '\025'; 44eda: 7a15 moveq #21,%d5 tty->termios.c_cc[VEOF] = '\004'; 44edc: 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'; 44ede: 1945 0044 moveb %d5,%a4@(68) tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 44ee2: 4205 clrb %d5 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 44ee4: 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'; 44ee6: 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'; 44eea: 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'; 44eec: 1945 004c moveb %d5,%a4@(76) tty->termios.c_cc[VEOL2] = '\000'; 44ef0: 1945 0051 moveb %d5,%a4@(81) tty->termios.c_cc[VSTART] = '\021'; 44ef4: 1940 0049 moveb %d0,%a4@(73) tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 44ef8: 7a1a moveq #26,%d5 tty->termios.c_cc[VREPRINT] = '\022'; 44efa: 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'; 44efc: 1941 004a moveb %d1,%a4@(74) tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 44f00: 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'; 44f02: 1945 004b moveb %d5,%a4@(75) tty->termios.c_cc[VREPRINT] = '\022'; 44f06: 1940 004d moveb %d0,%a4@(77) tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 44f0a: 7a17 moveq #23,%d5 tty->termios.c_cc[VLNEXT] = '\026'; 44f0c: 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'; 44f0e: 1941 004e moveb %d1,%a4@(78) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44f12: 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'; 44f18: 1945 004f moveb %d5,%a4@(79) tty->termios.c_cc[VLNEXT] = '\026'; 44f1c: 1940 0050 moveb %d0,%a4@(80) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44f20: 2941 0030 movel %d1,%a4@(48) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 44f24: 2a3c 0000 1805 movel #6149,%d5 44f2a: 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; 44f2e: 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') 44f34: 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; 44f38: 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') 44f3c: b289 cmpl %a1,%d1 44f3e: 6608 bnes 44f48 <== ALWAYS TAKEN c = 'a'; 44f40: 7a61 moveq #97,%d5 <== NOT EXECUTED 44f42: 13c5 0005 d820 moveb %d5,5d820 <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 44f48: 202a 0008 movel %a2@(8),%d0 44f4c: 2200 movel %d0,%d1 44f4e: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44f50: 2053 moveal %a3@,%a0 if (!tty->refcount++) { 44f52: 2541 0008 movel %d1,%a2@(8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44f56: 214a 0034 movel %a2,%a0@(52) if (!tty->refcount++) { 44f5a: 4a80 tstl %d0 44f5c: 661c bnes 44f7a if (tty->device.firstOpen) 44f5e: 206a 0098 moveal %a2@(152),%a0 44f62: 4a88 tstl %a0 44f64: 670c beqs 44f72 (*tty->device.firstOpen)(major, minor, arg); 44f66: 2f0b movel %a3,%sp@- 44f68: 2f03 movel %d3,%sp@- 44f6a: 2f02 movel %d2,%sp@- 44f6c: 4e90 jsr %a0@ 44f6e: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44f72: 7a02 moveq #2,%d5 44f74: baaa 00b4 cmpl %a2@(180),%d5 44f78: 672c beqs 44fa6 <== NEVER TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 44f7a: 2f39 0005 ee5c movel 5ee5c ,%sp@- 44f80: 4eb9 0004 5e68 jsr 45e68 return RTEMS_SUCCESSFUL; 44f86: 588f addql #4,%sp } 44f88: 2004 movel %d4,%d0 44f8a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 44f90: 4e5e unlk %fp 44f92: 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)) 44f94: b6aa 0010 cmpl %a2@(16),%d3 44f98: 67ae beqs 44f48 <== 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) { 44f9a: 2452 moveal %a2@,%a2 <== NOT EXECUTED 44f9c: 4a8a tstl %a2 <== NOT EXECUTED 44f9e: 6600 fd7a bnew 44d1a <== NOT EXECUTED 44fa2: 6000 fd84 braw 44d28 <== 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, 44fa6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fa8: 487a 0202 pea %pc@(451ac ) <== NOT EXECUTED 44fac: 47f9 0004 61d8 lea 461d8 ,%a3 <== NOT EXECUTED 44fb2: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44fb6: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44fb8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fbc: 4a80 tstl %d0 <== NOT EXECUTED 44fbe: 664c bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 44fc0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fc2: 487a 0166 pea %pc@(4512a ) <== NOT EXECUTED 44fc6: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44fca: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44fcc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fd0: 4a80 tstl %d0 <== NOT EXECUTED 44fd2: 6638 bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 44fd4: 2f39 0005 ee5c movel 5ee5c ,%sp@- <== NOT EXECUTED 44fda: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_SUCCESSFUL; 44fe0: 588f addql #4,%sp <== NOT EXECUTED 44fe2: 60a4 bras 44f88 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 44fe4: 486c 0068 pea %a4@(104) 44fe8: 1039 0005 d820 moveb 5d820 ,%d0 44fee: 42a7 clrl %sp@- 44ff0: 4878 0024 pea 24 44ff4: 49c0 extbl %d0 44ff6: 0080 5452 7200 oril #1414689280,%d0 44ffc: 42a7 clrl %sp@- 44ffe: 2f00 movel %d0,%sp@- 45000: 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) 45002: 4fef 0014 lea %sp@(20),%sp 45006: 4a80 tstl %d0 45008: 6700 fe82 beqw 44e8c sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4500c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4500e: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 45014: 486c 00c8 pea %a4@(200) <== NOT EXECUTED 45018: 41f9 0004 5f24 lea 45f24 ,%a0 <== NOT EXECUTED 4501e: 1039 0005 d820 moveb 5d820 ,%d0 <== NOT EXECUTED 45024: 42a7 clrl %sp@- <== NOT EXECUTED 45026: 4878 0500 pea 500 <== NOT EXECUTED 4502a: 49c0 extbl %d0 <== NOT EXECUTED 4502c: 4878 0400 pea 400 <== NOT EXECUTED 45030: 4878 000a pea a <== NOT EXECUTED 45034: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 4503a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4503c: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 45040: 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) 45042: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 45046: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4504a: 4a80 tstl %d0 <== NOT EXECUTED 4504c: 66be bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 4504e: 486c 00c4 pea %a4@(196) <== NOT EXECUTED 45052: 1039 0005 d820 moveb 5d820 ,%d0 <== NOT EXECUTED 45058: 42a7 clrl %sp@- <== NOT EXECUTED 4505a: 4878 0500 pea 500 <== NOT EXECUTED 4505e: 49c0 extbl %d0 <== NOT EXECUTED 45060: 4878 0400 pea 400 <== NOT EXECUTED 45064: 4878 0009 pea 9 <== NOT EXECUTED 45068: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 4506e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45070: 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) 45072: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45076: 4a80 tstl %d0 <== NOT EXECUTED 45078: 6700 fe00 beqw 44e7a <== NOT EXECUTED 4507c: 608e bras 4500c <== 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; 4507e: 23cc 0005 ee60 movel %a4,5ee60 45084: 6000 fd44 braw 44dca /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 45088: 2f39 0005 ee5c movel 5ee5c ,%sp@- <== NOT EXECUTED 4508e: 781a moveq #26,%d4 <== NOT EXECUTED 45090: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 45096: 588f addql #4,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 45098: 2004 movel %d4,%d0 <== NOT EXECUTED 4509a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450a0: 4e5e unlk %fp <== NOT EXECUTED 450a2: 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); 450a4: 2f0c movel %a4,%sp@- <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450a6: 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); 450a8: 4eb9 0004 a6f4 jsr 4a6f4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450ae: 2f39 0005 ee5c movel 5ee5c ,%sp@- <== NOT EXECUTED 450b4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 450ba: 508f addql #8,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 450bc: 2004 movel %d4,%d0 <== NOT EXECUTED 450be: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450c4: 4e5e unlk %fp <== NOT EXECUTED 450c6: 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)); 450c8: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 450cc: 45f9 0004 a6f4 lea 4a6f4 ,%a2 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 450d2: 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)); 450d4: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 450d6: 2f0c movel %a4,%sp@- <== NOT EXECUTED 450d8: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450da: 2f39 0005 ee5c movel 5ee5c ,%sp@- <== NOT EXECUTED 450e0: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 450e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 450ea: 2004 movel %d4,%d0 <== NOT EXECUTED 450ec: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450f2: 4e5e unlk %fp <== NOT EXECUTED 450f4: 4e75 rts <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 450f6: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 450fa: 45f9 0004 a6f4 lea 4a6f4 ,%a2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 45100: 781a moveq #26,%d4 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 45102: 4e92 jsr %a2@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 45104: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 45108: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 4510a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4510c: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 4510e: 2f39 0005 ee5c movel 5ee5c ,%sp@- <== NOT EXECUTED 45114: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 4511a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 4511e: 2004 movel %d4,%d0 <== NOT EXECUTED 45120: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45126: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043ac4 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43ac4: 4e56 ffdc linkw %fp,#-36 43ac8: 202e 0008 movel %fp@(8),%d0 43acc: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 43ad0: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 43ad4: 2840 moveal %d0,%a4 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43ad6: 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) { 43ada: 4aaa 00b4 tstl %a2@(180) 43ade: 6700 00e8 beqw 43bc8 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 43ae2: 2c2a 0080 movel %a2@(128),%d6 while (len) { 43ae6: 4a82 tstl %d2 43ae8: 6700 00d4 beqw 43bbe * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43aec: 222a 0088 movel %a2@(136),%d1 43af0: 5286 addql #1,%d6 rtems_interrupt_disable (level); 43af2: 2a3c 0000 0700 movel #1792,%d5 43af8: 47f9 0004 5d2c lea 45d2c ,%a3 43afe: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b00: 4c41 6007 remul %d1,%d7,%d6 43b04: 2c07 movel %d7,%d6 rtems_interrupt_disable (level); 43b06: 40c3 movew %sr,%d3 43b08: 8083 orl %d3,%d0 43b0a: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 43b0c: 282a 0084 movel %a2@(132),%d4 43b10: be84 cmpl %d4,%d7 43b12: 662c bnes 43b40 tty->rawOutBufState = rob_wait; 43b14: 7002 moveq #2,%d0 43b16: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 43b1a: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43b1c: 42a7 clrl %sp@- 43b1e: 42a7 clrl %sp@- 43b20: 2f2a 008c movel %a2@(140),%sp@- 43b24: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43b26: 4fef 000c lea %sp@(12),%sp 43b2a: 4a80 tstl %d0 43b2c: 6600 00b6 bnew 43be4 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 43b30: 2005 movel %d5,%d0 43b32: 40c3 movew %sr,%d3 43b34: 8083 orl %d3,%d0 43b36: 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) { 43b38: 202a 0084 movel %a2@(132),%d0 43b3c: b880 cmpl %d0,%d4 43b3e: 67d4 beqs 43b14 <== 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++; 43b40: 202a 0080 movel %a2@(128),%d0 43b44: 206a 007c moveal %a2@(124),%a0 43b48: 1194 0800 moveb %a4@,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 43b4c: 2547 0080 movel %d7,%a2@(128) if (tty->rawOutBufState == rob_idle) { 43b50: 4aaa 0094 tstl %a2@(148) 43b54: 661c bnes 43b72 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 43b56: 202a 00b8 movel %a2@(184),%d0 43b5a: 0800 0004 btst #4,%d0 43b5e: 673a beqs 43b9a <== 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; 43b60: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43b64: 7220 moveq #32,%d1 <== NOT EXECUTED 43b66: 8081 orl %d1,%d0 <== NOT EXECUTED 43b68: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 43b6c: 7001 moveq #1,%d0 <== NOT EXECUTED 43b6e: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED } rtems_interrupt_enable (level); 43b72: 46c3 movew %d3,%sr len--; 43b74: 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) { 43b76: 6746 beqs 43bbe * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b78: 222a 0088 movel %a2@(136),%d1 43b7c: 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++; 43b7e: 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); 43b80: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b82: 4c41 6007 remul %d1,%d7,%d6 43b86: 2c07 movel %d7,%d6 rtems_interrupt_disable (level); 43b88: 40c3 movew %sr,%d3 43b8a: 8083 orl %d3,%d0 43b8c: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 43b8e: 282a 0084 movel %a2@(132),%d4 43b92: be84 cmpl %d4,%d7 43b94: 6700 ff7e beqw 43b14 43b98: 60a6 bras 43b40 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, 43b9a: 4878 0001 pea 1 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43b9e: 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, 43ba2: d0aa 007c addl %a2@(124),%d0 43ba6: 2f00 movel %d0,%sp@- 43ba8: 2f2a 0010 movel %a2@(16),%sp@- 43bac: 206a 00a4 moveal %a2@(164),%a0 43bb0: 4e90 jsr %a0@ 43bb2: 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; 43bb6: 7001 moveq #1,%d0 43bb8: 2540 0094 movel %d0,%a2@(148) 43bbc: 60b4 bras 43b72 } rtems_interrupt_enable (level); len--; } } 43bbe: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 43bc4: 4e5e unlk %fp 43bc6: 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); 43bc8: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 43bcc: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 43bd2: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43bd6: 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); 43bdc: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43be0: 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); 43be2: 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); 43be4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43be6: 4eb9 0004 6458 jsr 46458 <== NOT EXECUTED =============================================================================== 0004441e : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 4441e: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 44422: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 44426: 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); 4442a: 2c3c 0004 5d2c movel #285996,%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; 44430: 2055 moveal %a5@,%a0 <== NOT EXECUTED 44432: 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); 44436: 2046 moveal %d6,%a0 <== NOT EXECUTED 44438: 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; 4443a: 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); 4443e: 42a7 clrl %sp@- <== NOT EXECUTED 44440: 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; 44444: 286d 000c moveal %a5@(12),%a4 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44448: 4e90 jsr %a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4444a: 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); 4444e: 2a00 movel %d0,%d5 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 44450: 662e bnes 44480 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 44452: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44456: 41f9 0005 e614 lea 5e614 ,%a0 <== NOT EXECUTED 4445c: eb88 lsll #5,%d0 <== NOT EXECUTED 4445e: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 44462: 4a88 tstl %a0 <== NOT EXECUTED 44464: 6726 beqs 4448c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 44466: 2f0d movel %a5,%sp@- <== NOT EXECUTED 44468: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4446a: 4e90 jsr %a0@ <== NOT EXECUTED 4446c: 2a00 movel %d0,%d5 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 4446e: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED rtems_semaphore_release (tty->isem); 44472: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 44476: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4447c: 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; } 44480: 2005 movel %d5,%d0 <== NOT EXECUTED 44482: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44488: 4e5e unlk %fp <== NOT EXECUTED 4448a: 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) { 4448c: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 44490: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 44494: 674e beqs 444e4 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 44496: 4a83 tstl %d3 <== NOT EXECUTED 44498: 6724 beqs 444be <== NOT EXECUTED 4449a: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 4449e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 444a2: 6c1a bges 444be <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 444a4: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED count--; 444a8: 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++]; 444aa: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+ <== NOT EXECUTED 444ae: 5280 addql #1,%d0 <== NOT EXECUTED 444b0: 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)) { 444b4: 4a83 tstl %d3 <== NOT EXECUTED 444b6: 6706 beqs 444be <== NOT EXECUTED 444b8: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 444bc: 6de6 blts 444a4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 444be: 202d 0010 movel %a5@(16),%d0 <== NOT EXECUTED 444c2: 9083 subl %d3,%d0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 444c4: 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; 444c8: 2b40 0018 movel %d0,%a5@(24) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 444cc: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 444d0: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 444d6: 588f addql #4,%sp <== NOT EXECUTED } 444d8: 2005 movel %d5,%d0 <== NOT EXECUTED 444da: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 444e0: 4e5e unlk %fp <== NOT EXECUTED 444e2: 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) 444e4: 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; 444e8: 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; 444ee: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED 444f2: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 444f6: 4a88 tstl %a0 <== NOT EXECUTED 444f8: 6708 beqs 44502 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 444fa: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 444fe: 6700 015e beqw 4465e <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44502: 222a 005c movel %a2@(92),%d1 <== 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, 44506: 41ea 0049 lea %a2@(73),%a0 <== NOT EXECUTED 4450a: 7801 moveq #1,%d4 <== NOT EXECUTED 4450c: 47fa fd4e lea %pc@(4425c ),%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; 44510: 242a 0074 movel %a2@(116),%d2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44514: 202a 0060 movel %a2@(96),%d0 <== 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, 44518: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4451c: b081 cmpl %d1,%d0 <== NOT EXECUTED 4451e: 6700 00bc beqw 445dc <== NOT EXECUTED 44522: 2039 0005 d814 movel 5d814 ,%d0 <== NOT EXECUTED 44528: 5380 subql #1,%d0 <== NOT EXECUTED 4452a: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 4452e: 6f00 00ac blew 445dc <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 44532: 242a 005c movel %a2@(92),%d2 <== NOT EXECUTED 44536: 5282 addql #1,%d2 <== NOT EXECUTED 44538: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 4453c: 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; 44540: 4c40 2001 remul %d0,%d1,%d2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 44544: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 44548: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4454c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44550: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 44554: d088 addl %a0,%d0 <== NOT EXECUTED 44556: 9081 subl %d1,%d0 <== NOT EXECUTED 44558: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 4455c: 4c41 0007 remul %d1,%d7,%d0 <== NOT EXECUTED 44560: beaa 00bc cmpl %a2@(188),%d7 <== NOT EXECUTED 44564: 6446 bccs 445ac <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 44566: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4456a: 72fe moveq #-2,%d1 <== NOT EXECUTED 4456c: c081 andl %d1,%d0 <== NOT EXECUTED 4456e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 44572: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44576: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 4457c: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 44582: 6700 0086 beqw 4460a <== 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) { 44586: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4458a: 0800 0008 btst #8,%d0 <== NOT EXECUTED 4458e: 671c beqs 445ac <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 44590: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44594: 7efb moveq #-5,%d7 <== NOT EXECUTED 44596: c287 andl %d7,%d1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 44598: 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; 4459c: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 445a0: 4a88 tstl %a0 <== NOT EXECUTED 445a2: 6708 beqs 445ac <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 445a4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 445a8: 4e90 jsr %a0@ <== NOT EXECUTED 445aa: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 445ac: 7002 moveq #2,%d0 <== NOT EXECUTED 445ae: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 445b2: 6700 0088 beqw 4463c <== NOT EXECUTED if (siproc (c, tty)) 445b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 445b8: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 445be: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445c0: 4e93 jsr %a3@ <== NOT EXECUTED 445c2: 508f addql #8,%sp <== NOT EXECUTED 445c4: 4a80 tstl %d0 <== NOT EXECUTED 445c6: 6702 beqs 445ca <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 445c8: 4284 clrl %d4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445ca: 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; 445ce: 242a 0070 movel %a2@(112),%d2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445d2: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 445d6: b081 cmpl %d1,%d0 <== NOT EXECUTED 445d8: 6600 ff48 bnew 44522 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 445dc: 4a84 tstl %d4 <== NOT EXECUTED 445de: 6700 feb6 beqw 44496 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 445e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445e4: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 445e8: 2046 moveal %d6,%a0 <== NOT EXECUTED 445ea: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 445ee: 4e90 jsr %a0@ <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 445f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 445f4: 4a80 tstl %d0 <== NOT EXECUTED 445f6: 6600 fe9e bnew 44496 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445fa: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 445fe: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44602: b081 cmpl %d1,%d0 <== NOT EXECUTED 44604: 6600 ff1c bnew 44522 <== NOT EXECUTED 44608: 60d2 bras 445dc <== 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)) 4460a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4460e: 670c beqs 4461c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 44610: 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)) 44614: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44618: 6700 ff6c beqw 44586 <== 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, 4461c: 4878 0001 pea 1 <== NOT EXECUTED 44620: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 44624: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44628: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4462c: 4e90 jsr %a0@ <== NOT EXECUTED 4462e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 44632: 7002 moveq #2,%d0 <== NOT EXECUTED 44634: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44638: 6600 ff7c bnew 445b6 <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 4463c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4463e: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44644: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44646: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 44648: 508f addql #8,%sp <== NOT EXECUTED 4464a: 4280 clrl %d0 <== NOT EXECUTED 4464c: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 44650: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44654: 6e00 ff74 bgtw 445ca <== NOT EXECUTED 44658: 4284 clrl %d4 <== NOT EXECUTED 4465a: 6000 ff6e braw 445ca <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4465e: 7002 moveq #2,%d0 <== NOT EXECUTED 44660: 47fa fbfa lea %pc@(4425c ),%a3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44664: 243c 0004 6294 movel #287380,%d2 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4466a: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4466e: 6728 beqs 44698 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 44670: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44674: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 44676: 588f addql #4,%sp <== NOT EXECUTED 44678: 4a80 tstl %d0 <== NOT EXECUTED 4467a: 6d00 00b8 bltw 44734 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 4467e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44680: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44686: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44688: 4e93 jsr %a3@ <== NOT EXECUTED 4468a: 508f addql #8,%sp <== NOT EXECUTED 4468c: 4a80 tstl %d0 <== NOT EXECUTED 4468e: 6600 fe06 bnew 44496 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 44692: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44696: 60d8 bras 44670 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 44698: 283c 0004 55fc movel #284156,%d4 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 4469e: 243c 0004 6294 movel #287380,%d2 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 446a4: 2044 moveal %d4,%a0 <== NOT EXECUTED 446a6: 4e90 jsr %a0@ <== NOT EXECUTED 446a8: 2c00 movel %d0,%d6 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 446aa: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446ae: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 446b2: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 446b4: 588f addql #4,%sp <== NOT EXECUTED 446b6: 4a80 tstl %d0 <== NOT EXECUTED 446b8: 6d38 blts 446f2 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 446ba: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446bc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 446c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 446c4: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 446c6: 508f addql #8,%sp <== NOT EXECUTED 446c8: 4281 clrl %d1 <== NOT EXECUTED 446ca: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 446ce: 1200 moveb %d0,%d1 <== NOT EXECUTED 446d0: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 446d4: 6f00 fdc0 blew 44496 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 446d8: 4a00 tstb %d0 <== NOT EXECUTED 446da: 67ce beqs 446aa <== NOT EXECUTED 446dc: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 446e0: 66c2 bnes 446a4 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 446e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446e6: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 446ea: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 446ec: 588f addql #4,%sp <== NOT EXECUTED 446ee: 4a80 tstl %d0 <== NOT EXECUTED 446f0: 6cc8 bges 446ba <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 446f2: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 446f6: 6718 beqs 44710 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 446f8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 446fc: 6706 beqs 44704 <== NOT EXECUTED 446fe: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 44702: 6614 bnes 44718 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 44704: 4878 0001 pea 1 <== NOT EXECUTED 44708: 2042 moveal %d2,%a0 <== NOT EXECUTED 4470a: 4e90 jsr %a0@ <== NOT EXECUTED 4470c: 588f addql #4,%sp <== NOT EXECUTED 4470e: 609a bras 446aa <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 44710: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44714: 6700 fd80 beqw 44496 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 44718: 2044 moveal %d4,%a0 <== NOT EXECUTED 4471a: 4e90 jsr %a0@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 4471c: 9086 subl %d6,%d0 <== NOT EXECUTED 4471e: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 44722: 6200 fd72 bhiw 44496 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 44726: 4878 0001 pea 1 <== NOT EXECUTED 4472a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4472c: 4e90 jsr %a0@ <== NOT EXECUTED 4472e: 588f addql #4,%sp <== NOT EXECUTED 44730: 6000 ff78 braw 446aa <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44734: 4878 0001 pea 1 <== NOT EXECUTED 44738: 2042 moveal %d2,%a0 <== NOT EXECUTED 4473a: 4e90 jsr %a0@ <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4473c: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44740: 588f addql #4,%sp <== NOT EXECUTED 44742: 6000 ff2c braw 44670 <== NOT EXECUTED =============================================================================== 0004357c : * 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) { 4357c: 4e56 fff4 linkw %fp,#-12 43580: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43584: 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)) 43588: 202a 00b8 movel %a2@(184),%d0 4358c: 0280 0000 0403 andil #1027,%d0 43592: 0c80 0000 0401 cmpil #1025,%d0 43598: 6700 0140 beqw 436da tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 4359c: 202a 00b8 movel %a2@(184),%d0 435a0: 7603 moveq #3,%d3 435a2: 7202 moveq #2,%d1 435a4: c083 andl %d3,%d0 435a6: b280 cmpl %d0,%d1 435a8: 6700 0172 beqw 4371c rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 435ac: 222a 0080 movel %a2@(128),%d1 435b0: 202a 0084 movel %a2@(132),%d0 435b4: b081 cmpl %d1,%d0 435b6: 6700 009c beqw 43654 rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 435ba: 203c 0000 0700 movel #1792,%d0 435c0: 40c2 movew %sr,%d2 435c2: 8082 orl %d2,%d0 435c4: 46c0 movew %d0,%sr len = tty->t_dqlen; 435c6: 222a 0090 movel %a2@(144),%d1 tty->t_dqlen = 0; 435ca: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 435ce: 46c2 movew %d2,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 435d0: 202a 0084 movel %a2@(132),%d0 435d4: d280 addl %d0,%d1 435d6: 202a 0088 movel %a2@(136),%d0 435da: 4c40 1002 remul %d0,%d2,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 435de: 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; 435e0: 2542 0084 movel %d2,%a2@(132) if (tty->rawOutBufState == rob_wait) { 435e4: b0aa 0094 cmpl %a2@(148),%d0 435e8: 6700 00d8 beqw 436c2 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 435ec: 202a 0080 movel %a2@(128),%d0 435f0: b480 cmpl %d0,%d2 435f2: 6778 beqs 4366c 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)) 435f4: 202a 00b8 movel %a2@(184),%d0 435f8: 0280 0000 0210 andil #528,%d0 435fe: 0c80 0000 0210 cmpil #528,%d0 43604: 6700 015a beqw 43760 } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 43608: 202a 0080 movel %a2@(128),%d0 4360c: b082 cmpl %d2,%d0 4360e: 647e bccs 4368e nToSend = tty->rawOutBuf.Size - newTail; 43610: 262a 0088 movel %a2@(136),%d3 43614: 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)) { 43616: 202a 00b8 movel %a2@(184),%d0 4361a: 0280 0000 0600 andil #1536,%d0 43620: 677e beqs 436a0 <== ALWAYS TAKEN 43622: 7001 moveq #1,%d0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 43624: 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)) { 43626: 7601 moveq #1,%d3 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 43628: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4362a: 202a 007c movel %a2@(124),%d0 <== NOT EXECUTED 4362e: d082 addl %d2,%d0 <== NOT EXECUTED 43630: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43632: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43636: 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*/ 4363a: 2541 0094 movel %d1,%a2@(148) <== NOT EXECUTED (*tty->device.write)(tty->minor, 4363e: 4e90 jsr %a0@ <== NOT EXECUTED 43640: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43644: 2542 0084 movel %d2,%a2@(132) } return nToSend; } 43648: 2003 movel %d3,%d0 4364a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43650: 4e5e unlk %fp 43652: 4e75 rts else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 43654: 7602 moveq #2,%d3 <== NOT EXECUTED 43656: b6aa 0094 cmpl %a2@(148),%d3 <== NOT EXECUTED 4365a: 6700 012e beqw 4378a <== NOT EXECUTED 4365e: 4203 clrb %d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43660: 2003 movel %d3,%d0 <== NOT EXECUTED 43662: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43668: 4e5e unlk %fp <== NOT EXECUTED 4366a: 4e75 rts <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4366c: 206a 00d4 moveal %a2@(212),%a0 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43670: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43674: 4a88 tstl %a0 43676: 6700 012c beqw 437a4 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 4367a: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 4367e: 4283 clrl %d3 <== NOT EXECUTED 43680: 486a 0030 pea %a2@(48) <== NOT EXECUTED 43684: 4e90 jsr %a0@ <== NOT EXECUTED 43686: 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*/ 43688: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED 4368c: 60ba bras 43648 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4368e: 262a 0080 movel %a2@(128),%d3 43692: 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)) { 43694: 202a 00b8 movel %a2@(184),%d0 43698: 0280 0000 0600 andil #1536,%d0 4369e: 6682 bnes 43622 <== NEVER TAKEN 436a0: 2003 movel %d3,%d0 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 436a2: 7201 moveq #1,%d1 (*tty->device.write)(tty->minor, 436a4: 2f00 movel %d0,%sp@- 436a6: 202a 007c movel %a2@(124),%d0 436aa: d082 addl %d2,%d0 436ac: 2f00 movel %d0,%sp@- 436ae: 2f2a 0010 movel %a2@(16),%sp@- 436b2: 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*/ 436b6: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)(tty->minor, 436ba: 4e90 jsr %a0@ 436bc: 4fef 000c lea %sp@(12),%sp 436c0: 6082 bras 43644 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 436c2: 2f2a 008c movel %a2@(140),%sp@- 436c6: 4eb9 0004 5e68 jsr 45e68 } if (newTail == tty->rawOutBuf.Head) { 436cc: 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); 436d0: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 436d2: b480 cmpl %d0,%d2 436d4: 6600 ff1e bnew 435f4 436d8: 6092 bras 4366c /* 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, 436da: 4878 0001 pea 1 <== NOT EXECUTED 436de: 486a 004a pea %a2@(74) <== NOT EXECUTED 436e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 436e6: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 436ea: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 436ec: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 436f2: 40c1 movew %sr,%d1 <== NOT EXECUTED 436f4: 8081 orl %d1,%d0 <== NOT EXECUTED 436f6: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 436f8: 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--; 436fa: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 436fe: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43702: 8082 orl %d2,%d0 <== NOT EXECUTED 43704: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 43708: 46c1 movew %d1,%sr <== NOT EXECUTED 4370a: 7601 moveq #1,%d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4370c: 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); 4370e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43712: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43718: 4e5e unlk %fp <== NOT EXECUTED 4371a: 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, 4371c: 4878 0001 pea 1 <== NOT EXECUTED 43720: 486a 0049 pea %a2@(73) <== NOT EXECUTED 43724: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43728: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4372c: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 4372e: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43734: 40c1 movew %sr,%d1 <== NOT EXECUTED 43736: 8081 orl %d1,%d0 <== NOT EXECUTED 43738: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 4373a: 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--; 4373c: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 43740: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43744: c082 andl %d2,%d0 <== NOT EXECUTED 43746: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 4374a: 46c1 movew %d1,%sr <== NOT EXECUTED 4374c: 163c 0001 moveb #1,%d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43750: 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); 43752: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43756: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4375c: 4e5e unlk %fp <== NOT EXECUTED 4375e: 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); 43760: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 43764: 40c1 movew %sr,%d1 <== NOT EXECUTED 43766: 8081 orl %d1,%d0 <== NOT EXECUTED 43768: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4376a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4376e: 7620 moveq #32,%d3 <== NOT EXECUTED 43770: 8083 orl %d3,%d0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 43772: 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; 43776: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4377a: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 4377e: 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*/ 43780: 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); 43784: 4203 clrb %d3 <== NOT EXECUTED 43786: 6000 fec0 braw 43648 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4378a: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 4378e: 4283 clrl %d3 <== NOT EXECUTED 43790: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED 43796: 588f addql #4,%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43798: 2003 movel %d3,%d0 <== NOT EXECUTED 4379a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 437a0: 4e5e unlk %fp <== NOT EXECUTED 437a2: 4e75 rts <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 437a4: 2542 0084 movel %d2,%a2@(132) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 437a8: 4283 clrl %d3 437aa: 6000 fe9c braw 43648 =============================================================================== 000451ac : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 451ac: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 451b0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 451b4: 240e movel %fp,%d2 <== NOT EXECUTED 451b6: 260e movel %fp,%d3 <== NOT EXECUTED 451b8: 5d82 subql #6,%d2 <== NOT EXECUTED 451ba: 47f9 0004 566c lea 4566c ,%a3 <== NOT EXECUTED 451c0: 4bf9 0004 606c lea 4606c ,%a5 <== NOT EXECUTED 451c6: 5383 subql #1,%d3 <== NOT EXECUTED 451c8: 49f9 0004 380c lea 4380c ,%a4<== NOT EXECUTED 451ce: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 451d2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 451d4: 42a7 clrl %sp@- <== NOT EXECUTED 451d6: 4878 0002 pea 2 <== NOT EXECUTED 451da: 4878 0003 pea 3 <== NOT EXECUTED 451de: 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) { 451e0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 451e4: 7001 moveq #1,%d0 <== NOT EXECUTED 451e6: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 451ea: 663e bnes 4522a <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 451ec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 451f0: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 451f4: 4e90 jsr %a0@ <== NOT EXECUTED if (c != EOF) { 451f6: 588f addql #4,%sp <== NOT EXECUTED 451f8: 72ff moveq #-1,%d1 <== NOT EXECUTED 451fa: b280 cmpl %d0,%d1 <== NOT EXECUTED 451fc: 67d4 beqs 451d2 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 451fe: 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; 45202: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 45206: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45208: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4520a: 4e94 jsr %a4@ <== NOT EXECUTED 4520c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 45210: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45212: 42a7 clrl %sp@- <== NOT EXECUTED 45214: 4878 0002 pea 2 <== NOT EXECUTED 45218: 4878 0003 pea 3 <== NOT EXECUTED 4521c: 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) { 4521e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45222: 7001 moveq #1,%d0 <== NOT EXECUTED 45224: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 45228: 67c2 beqs 451ec <== NOT EXECUTED tty->rxTaskId = 0; 4522a: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4522e: 42a7 clrl %sp@- <== NOT EXECUTED 45230: 4e95 jsr %a5@ <== NOT EXECUTED 45232: 588f addql #4,%sp <== NOT EXECUTED 45234: 609c bras 451d2 <== NOT EXECUTED ... =============================================================================== 00043560 : * 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) { 43560: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43564: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 43568: 4878 0002 pea 2 <== NOT EXECUTED 4356c: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 43570: 4eb9 0004 5814 jsr 45814 <== NOT EXECUTED 43576: 508f addql #8,%sp <== NOT EXECUTED } 43578: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004512a : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 4512a: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4512e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 45132: 240e movel %fp,%d2 <== NOT EXECUTED 45134: 5982 subql #4,%d2 <== NOT EXECUTED 45136: 47f9 0004 566c lea 4566c ,%a3 <== NOT EXECUTED 4513c: 4bf9 0004 606c lea 4606c ,%a5 <== NOT EXECUTED 45142: 49f9 0004 357c lea 4357c ,%a4<== NOT EXECUTED 45148: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 4514c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4514e: 42a7 clrl %sp@- <== NOT EXECUTED 45150: 4878 0002 pea 2 <== NOT EXECUTED 45154: 4878 0003 pea 3 <== NOT EXECUTED 45158: 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) { 4515a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4515e: 7001 moveq #1,%d0 <== NOT EXECUTED 45160: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 45164: 663a bnes 451a0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 45166: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4516a: eb88 lsll #5,%d0 <== NOT EXECUTED 4516c: 0680 0005 e628 addil #386600,%d0 <== NOT EXECUTED 45172: 2240 moveal %d0,%a1 <== NOT EXECUTED 45174: 2051 moveal %a1@,%a0 <== NOT EXECUTED 45176: 4a88 tstl %a0 <== NOT EXECUTED 45178: 6706 beqs 45180 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 4517a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4517c: 4e90 jsr %a0@ <== NOT EXECUTED 4517e: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 45180: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45182: 4e94 jsr %a4@ <== NOT EXECUTED 45184: 588f addql #4,%sp <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 45186: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45188: 42a7 clrl %sp@- <== NOT EXECUTED 4518a: 4878 0002 pea 2 <== NOT EXECUTED 4518e: 4878 0003 pea 3 <== NOT EXECUTED 45192: 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) { 45194: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45198: 7001 moveq #1,%d0 <== NOT EXECUTED 4519a: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 4519e: 67c6 beqs 45166 <== NOT EXECUTED tty->txTaskId = 0; 451a0: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 451a4: 42a7 clrl %sp@- <== NOT EXECUTED 451a6: 4e95 jsr %a5@ <== NOT EXECUTED 451a8: 588f addql #4,%sp <== NOT EXECUTED 451aa: 60a0 bras 4514c <== NOT EXECUTED =============================================================================== 000442d0 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 442d0: 4e56 ffe4 linkw %fp,#-28 442d4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 442d8: 266e 0008 moveal %fp@(8),%a3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 442dc: 2053 moveal %a3@,%a0 442de: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 442e2: 42a7 clrl %sp@- 442e4: 42a7 clrl %sp@- 442e6: 2f2a 0018 movel %a2@(24),%sp@- 442ea: 4eb9 0004 5d2c jsr 45d2c if (sc != RTEMS_SUCCESSFUL) 442f0: 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); 442f4: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 442f6: 662a bnes 44322 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 442f8: 202a 00cc movel %a2@(204),%d0 442fc: eb88 lsll #5,%d0 442fe: 0680 0005 e620 addil #386592,%d0 44304: 2240 moveal %d0,%a1 44306: 2051 moveal %a1@,%a0 44308: 4a88 tstl %a0 4430a: 6722 beqs 4432e <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 4430c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4430e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44310: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44312: 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); 44316: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44318: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4431e: 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; } 44322: 2002 movel %d2,%d0 <== NOT EXECUTED 44324: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4432a: 4e5e unlk %fp <== NOT EXECUTED 4432c: 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) { 4432e: 7001 moveq #1,%d0 44330: c0aa 0034 andl %a2@(52),%d0 44334: 6744 beqs 4437a <== NEVER TAKEN uint32_t count = args->count; 44336: 282b 0010 movel %a3@(16),%d4 char *buffer = args->buffer; 4433a: 286b 000c moveal %a3@(12),%a4 while (count--) 4433e: 6762 beqs 443a2 <== NEVER TAKEN 44340: 4283 clrl %d3 44342: 4bfa f8a8 lea %pc@(43bec ),%a5 oproc (*buffer++, tty); 44346: 2f0a movel %a2,%sp@- 44348: 4280 clrl %d0 4434a: 1034 3800 moveb %a4@(00000000,%d3:l),%d0 4434e: 5283 addql #1,%d3 44350: 2f00 movel %d0,%sp@- 44352: 4e95 jsr %a5@ return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 44354: 508f addql #8,%sp 44356: b883 cmpl %d3,%d4 44358: 66ec bnes 44346 4435a: 202b 0010 movel %a3@(16),%d0 oproc (*buffer++, tty); args->bytes_moved = args->count; 4435e: 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); 44362: 2f2a 0018 movel %a2@(24),%sp@- 44366: 4eb9 0004 5e68 jsr 45e68 return sc; 4436c: 588f addql #4,%sp } 4436e: 2002 movel %d2,%d0 44370: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 44376: 4e5e unlk %fp 44378: 4e75 rts while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 4437a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4437c: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 44380: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 44384: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED args->bytes_moved = args->count; 4438a: 276b 0010 0018 movel %a3@(16),%a3@(24) <== NOT EXECUTED 44390: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 44394: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44398: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4439e: 588f addql #4,%sp <== NOT EXECUTED 443a0: 60cc bras 4436e <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 443a2: 4280 clrl %d0 <== NOT EXECUTED oproc (*buffer++, tty); args->bytes_moved = args->count; 443a4: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED 443a8: 60b8 bras 44362 <== NOT EXECUTED =============================================================================== 00058b70 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 58b70: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4879 0007 f060 pea 7f060 <_Timer_Information> 58b82: 4eb9 0005 b9a4 jsr 5b9a4 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58b88: 4fef 000c lea %sp@(12),%sp 58b8c: 4aae fffc tstl %fp@(-4) 58b90: 6706 beqs 58b98 58b92: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58b94: 4e5e unlk %fp 58b96: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 58b98: 7204 moveq #4,%d1 58b9a: 2040 moveal %d0,%a0 58b9c: b2a8 0038 cmpl %a0@(56),%d1 58ba0: 670c beqs 58bae <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 58ba2: 4868 0010 pea %a0@(16) 58ba6: 4eb9 0005 d8e4 jsr 5d8e4 <_Watchdog_Remove> 58bac: 588f addql #4,%sp _Thread_Enable_dispatch(); 58bae: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 58bb4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58bb6: 4e5e unlk %fp ... =============================================================================== 00046588 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 46588: 4e56 0000 linkw %fp,#0 4658c: 2f0a movel %a2,%sp@- 4658e: 246e 000c moveal %fp@(12),%a2 46592: 2f02 movel %d2,%sp@- 46594: 242e 0008 movel %fp@(8),%d2 Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 46598: 676a beqs 46604 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 4659a: 4a8a tstl %a2 4659c: 6700 0088 beqw 46626 465a0: 2039 0005 f78c movel 5f78c <_Thread_Dispatch_disable_level>,%d0 465a6: 5280 addql #1,%d0 465a8: 23c0 0005 f78c movel %d0,5f78c <_Thread_Dispatch_disable_level> * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 465ae: 4879 0005 ffde pea 5ffde <_Timer_Information> 465b4: 4eb9 0004 747c jsr 4747c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 465ba: 588f addql #4,%sp 465bc: 2040 moveal %d0,%a0 465be: 4a80 tstl %d0 465c0: 6750 beqs 46612 <== NEVER TAKEN 465c2: 2028 0008 movel %a0@(8),%d0 465c6: 4281 clrl %d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 465c8: 2142 000c movel %d2,%a0@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 465cc: 2279 0005 fff6 moveal 5fff6 <_Timer_Information+0x18>,%a1 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 465d2: 42a8 0030 clrl %a0@(48) 465d6: 3200 movew %d0,%d1 &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 465d8: 2480 movel %d0,%a2@ if ( !the_timer ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 465da: 7004 moveq #4,%d0 465dc: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) 465e0: 2140 0038 movel %d0,%a0@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 465e4: 42a8 0018 clrl %a0@(24) the_watchdog->routine = routine; 465e8: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 465ec: 42a8 0034 clrl %a0@(52) &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); 465f0: 4eb9 0004 8128 jsr 48128 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 465f6: 242e fff8 movel %fp@(-8),%d2 &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); 465fa: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 465fc: 246e fffc moveal %fp@(-4),%a2 46600: 4e5e unlk %fp 46602: 4e75 rts 46604: 242e fff8 movel %fp@(-8),%d2 rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 46608: 7003 moveq #3,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4660a: 246e fffc moveal %fp@(-4),%a2 4660e: 4e5e unlk %fp 46610: 4e75 rts _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 46612: 4eb9 0004 8128 jsr 48128 <_Thread_Enable_dispatch> ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 46618: 242e fff8 movel %fp@(-8),%d2 _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 4661c: 7005 moveq #5,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4661e: 246e fffc moveal %fp@(-4),%a2 46622: 4e5e unlk %fp 46624: 4e75 rts 46626: 242e fff8 movel %fp@(-8),%d2 Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4662a: 7009 moveq #9,%d0 ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4662c: 246e fffc moveal %fp@(-4),%a2 46630: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046634 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 46634: 4e56 ffe8 linkw %fp,#-24 46638: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4663c: 282e 0008 movel %fp@(8),%d4 46640: 242e 000c movel %fp@(12),%d2 46644: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 46648: 4a82 tstl %d2 4664a: 6700 0094 beqw 466e0 return RTEMS_INVALID_NUMBER; if ( !routine ) 4664e: 4a83 tstl %d3 46650: 6700 00ae beqw 46700 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 46654: 486e fffc pea %fp@(-4) 46658: 2f04 movel %d4,%sp@- 4665a: 4879 0005 ffde pea 5ffde <_Timer_Information> 46660: 4eb9 0004 7918 jsr 47918 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 46666: 4fef 000c lea %sp@(12),%sp 4666a: 2440 moveal %d0,%a2 4666c: 4aae fffc tstl %fp@(-4) 46670: 6662 bnes 466d4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 46672: 2a00 movel %d0,%d5 46674: 0685 0000 0010 addil #16,%d5 4667a: 2f05 movel %d5,%sp@- 4667c: 4eb9 0004 9410 jsr 49410 <_Watchdog_Remove> _ISR_Disable( level ); 46682: 203c 0000 0700 movel #1792,%d0 46688: 40c1 movew %sr,%d1 4668a: 8081 orl %d1,%d0 4668c: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 4668e: 588f addql #4,%sp 46690: 4aaa 0018 tstl %a2@(24) 46694: 6656 bnes 466ec <== NEVER TAKEN Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46696: 2543 002c movel %d3,%a2@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 4669a: 256e 0014 0034 movel %fp@(20),%a2@(52) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 466a0: 2544 0030 movel %d4,%a2@(48) /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 466a4: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 466a8: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 466ac: 46c1 movew %d1,%sr Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 466ae: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 466b2: 2f05 movel %d5,%sp@- 466b4: 4879 0005 f864 pea 5f864 <_Watchdog_Ticks_chain> 466ba: 4eb9 0004 92c8 jsr 492c8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 466c0: 4eb9 0004 8128 jsr 48128 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 466c6: 508f addql #8,%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 466c8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466ca: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 466d0: 4e5e unlk %fp 466d2: 4e75 rts if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 466d4: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466d6: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 466dc: 4e5e unlk %fp 466de: 4e75 rts { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 466e0: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466e2: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 466e8: 4e5e unlk %fp 466ea: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 466ec: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 466ee: 4eb9 0004 8128 jsr 48128 <_Thread_Enable_dispatch> 466f4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466f6: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 466fc: 4e5e unlk %fp 466fe: 4e75 rts ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 46700: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46702: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 46708: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000591bc : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 591bc: 4e56 fffc linkw %fp,#-4 591c0: 202e 0008 movel %fp@(8),%d0 591c4: 2f03 movel %d3,%sp@- 591c6: 2f02 movel %d2,%sp@- 591c8: 4a80 tstl %d0 591ca: 6748 beqs 59214 591cc: 4281 clrl %d1 591ce: 1239 0007 8c62 moveb 78c62 ,%d1 591d4: b280 cmpl %d0,%d1 591d6: 644a bccs 59222 * 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 ) 591d8: 72ff moveq #-1,%d1 591da: b280 cmpl %d0,%d1 591dc: 6636 bnes 59214 591de: 2239 0007 e7cc movel 7e7cc <_Thread_Dispatch_disable_level>,%d1 591e4: 5281 addql #1,%d1 591e6: 4283 clrl %d3 591e8: 23c1 0007 e7cc movel %d1,7e7cc <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 591ee: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 591f0: 1439 0007 9c14 moveb 79c14 ,%d2 initialized = true; 591f6: 13c0 0007 9c14 moveb %d0,79c14 _Thread_Enable_dispatch(); 591fc: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> if ( tmpInitialized ) 59202: 4a02 tstb %d2 59204: 6744 beqs 5924a initialized = false; } #endif return status; } 59206: 242e fff4 movel %fp@(-12),%d2 _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) 5920a: 700e moveq #14,%d0 initialized = false; } #endif return status; } 5920c: 262e fff8 movel %fp@(-8),%d3 59210: 4e5e unlk %fp 59212: 4e75 rts 59214: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 59218: 7013 moveq #19,%d0 } 5921a: 262e fff8 movel %fp@(-8),%d3 5921e: 4e5e unlk %fp 59220: 4e75 rts 59222: 2239 0007 e7cc movel 7e7cc <_Thread_Dispatch_disable_level>,%d1 59228: 5281 addql #1,%d1 5922a: 2600 movel %d0,%d3 5922c: 23c1 0007 e7cc movel %d1,7e7cc <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 59232: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 59234: 1439 0007 9c14 moveb 79c14 ,%d2 initialized = true; 5923a: 13c0 0007 9c14 moveb %d0,79c14 _Thread_Enable_dispatch(); 59240: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> if ( tmpInitialized ) 59246: 4a02 tstb %d2 59248: 66bc bnes 59206 <== 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( 5924a: 486e fffc pea %fp@(-4) 5924e: 222e 0010 movel %fp@(16),%d1 59252: 08c1 000f bset #15,%d1 59256: 2f01 movel %d1,%sp@- 59258: 4878 0100 pea 100 5925c: 2f2e 000c movel %fp@(12),%sp@- 59260: 2f03 movel %d3,%sp@- 59262: 2f3c 5449 4d45 movel #1414090053,%sp@- 59268: 4eb9 0005 8250 jsr 58250 /* 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) { 5926e: 4fef 0018 lea %sp@(24),%sp 59272: 4a80 tstl %d0 59274: 6714 beqs 5928a initialized = false; } #endif return status; } 59276: 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; 5927a: 4201 clrb %d1 initialized = false; } #endif return status; } 5927c: 262e fff8 movel %fp@(-8),%d3 59280: 4e5e unlk %fp /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 59282: 13c1 0007 9c14 moveb %d1,79c14 initialized = false; } #endif return status; } 59288: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 5928a: 41f9 0007 9c4a lea 79c4a <_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( 59290: 4282 clrl %d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 59292: 223c 0007 9c46 movel #498758,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 59298: 23c8 0007 9c46 movel %a0,79c46 <_Timer_server_Default+0x30> &_RTEMS_tasks_Information, _Objects_Get_index(id) 5929e: 202e fffc movel %fp@(-4),%d0 592a2: 41f9 0007 9c82 lea 79c82 <_Timer_server_Default+0x6c>,%a0 592a8: 23c8 0007 9c7e movel %a0,79c7e <_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( 592ae: 2079 0007 e756 moveal 7e756 <_RTEMS_tasks_Information+0x18>,%a0 592b4: 3400 movew %d0,%d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 592b6: 23c1 0007 9c4e movel %d1,79c4e <_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; 592bc: 2239 0007 e910 movel 7e910 <_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( 592c2: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 592c6: 23d0 0007 9c16 movel %a0@,79c16 <_Timer_server_Default> 592cc: 41f9 0007 9c7e lea 79c7e <_Timer_server_Default+0x68>,%a0 592d2: 23c8 0007 9c86 movel %a0,79c86 <_Timer_server_Default+0x70> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 592d8: 4879 0007 9c16 pea 79c16 <_Timer_server_Default> the_watchdog->routine = routine; 592de: 41f9 0005 c12c lea 5c12c <_Thread_Delay_ended>,%a0 592e4: 23c8 0007 9c3a movel %a0,79c3a <_Timer_server_Default+0x24> 592ea: 487a 0160 pea %pc@(5944c <_Timer_server_Body>) 592ee: 23c8 0007 9c72 movel %a0,79c72 <_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(); 592f4: 41f9 0007 e85e lea 7e85e <_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; 592fa: 23c1 0007 9c52 movel %d1,79c52 <_Timer_server_Default+0x3c> ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59300: 23d0 0007 9c8a movel %a0@,79c8a <_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; 59306: 223c 0005 9688 movel #366216,%d1 ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 5930c: 41f9 0007 9c16 lea 79c16 <_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; 59312: 23c1 0007 9c1a movel %d1,79c1a <_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; 59318: 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; 5931a: 42b9 0007 9c8e clrl 79c8e <_Timer_server_Default+0x78> ts->active = false; 59320: 13c1 0007 9c92 moveb %d1,79c92 <_Timer_server_Default+0x7c> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 59326: 2f00 movel %d0,%sp@- ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 59328: 23c8 0007 f09a movel %a0,7f09a <_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; 5932e: 42b9 0007 9c4a clrl 79c4a <_Timer_server_Default+0x34> 59334: 42b9 0007 9c82 clrl 79c82 <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5933a: 42b9 0007 9c26 clrl 79c26 <_Timer_server_Default+0x10> the_watchdog->routine = routine; the_watchdog->id = id; 59340: 23c0 0007 9c3e movel %d0,79c3e <_Timer_server_Default+0x28> the_watchdog->user_data = user_data; 59346: 42b9 0007 9c42 clrl 79c42 <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5934c: 42b9 0007 9c5e clrl 79c5e <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 59352: 23c0 0007 9c76 movel %d0,79c76 <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 59358: 42b9 0007 9c7a clrl 79c7a <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 5935e: 4eb9 0005 8958 jsr 58958 initialized = false; } #endif return status; } 59364: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 59368: 4fef 000c lea %sp@(12),%sp } 5936c: 262e fff8 movel %fp@(-8),%d3 59370: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00058f30 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 58f30: 4e56 fff0 linkw %fp,#-16 58f34: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 58f38: 486e fffc pea %fp@(-4) 58f3c: 2f2e 0008 movel %fp@(8),%sp@- 58f40: 4879 0007 f060 pea 7f060 <_Timer_Information> 58f46: 4eb9 0005 b9a4 jsr 5b9a4 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58f4c: 4fef 000c lea %sp@(12),%sp 58f50: 2440 moveal %d0,%a2 58f52: 4aae fffc tstl %fp@(-4) 58f56: 670e beqs 58f66 58f58: 7404 moveq #4,%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f5a: 2002 movel %d2,%d0 58f5c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f62: 4e5e unlk %fp 58f64: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 58f66: 202a 0038 movel %a2@(56),%d0 58f6a: 671a beqs 58f86 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58f6c: 7201 moveq #1,%d1 58f6e: b280 cmpl %d0,%d1 58f70: 673c beqs 58fae 58f72: 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(); 58f74: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f7a: 2002 movel %d2,%d0 58f7c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f82: 4e5e unlk %fp 58f84: 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 ); 58f86: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f8a: 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 ); 58f8c: 2f0a movel %a2,%sp@- 58f8e: 4eb9 0005 d8e4 jsr 5d8e4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f94: 2f0a movel %a2,%sp@- 58f96: 4879 0007 e8a4 pea 7e8a4 <_Watchdog_Ticks_chain> 58f9c: 4eb9 0005 d79c jsr 5d79c <_Watchdog_Insert> 58fa2: 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(); 58fa6: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 58fac: 60cc bras 58f7a if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fae: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 58fb2: 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; 58fb4: 2679 0007 f09a moveal 7f09a <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fba: 4eb9 0005 d8e4 jsr 5d8e4 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 58fc0: 2f0a movel %a2,%sp@- 58fc2: 2f0b movel %a3,%sp@- 58fc4: 206b 0004 moveal %a3@(4),%a0 58fc8: 4e90 jsr %a0@ 58fca: 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(); 58fce: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> 58fd4: 60a4 bras 58f7a ... =============================================================================== 000590c0 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 590c0: 4e56 ffec linkw %fp,#-20 590c4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 590c8: 242e 000c movel %fp@(12),%d2 590cc: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 590d0: 2479 0007 f09a moveal 7f09a <_Timer_server>,%a2 if ( !timer_server ) 590d6: 4a8a tstl %a2 590d8: 6700 00c8 beqw 591a2 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 590dc: 4a39 0007 e7e0 tstb 7e7e0 <_TOD_Is_set> 590e2: 6700 00a6 beqw 5918a return RTEMS_NOT_DEFINED; if ( !routine ) 590e6: 4a83 tstl %d3 590e8: 6700 00ac beqw 59196 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 590ec: 2f02 movel %d2,%sp@- 590ee: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 590f4: 588f addql #4,%sp 590f6: 4a00 tstb %d0 590f8: 660c bnes 59106 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 590fa: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 590fc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59102: 4e5e unlk %fp 59104: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59106: 2f02 movel %d2,%sp@- 59108: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5910e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59110: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 59112: b0b9 0007 e85e cmpl 7e85e <_TOD_Now>,%d0 59118: 63e0 blss 590fa 5911a: 486e fffc pea %fp@(-4) 5911e: 2f2e 0008 movel %fp@(8),%sp@- 59122: 4879 0007 f060 pea 7f060 <_Timer_Information> 59128: 4eb9 0005 b9a4 jsr 5b9a4 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5912e: 4fef 000c lea %sp@(12),%sp 59132: 2640 moveal %d0,%a3 59134: 4aae fffc tstl %fp@(-4) 59138: 6674 bnes 591ae case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5913a: 486b 0010 pea %a3@(16) 5913e: 4eb9 0005 d8e4 jsr 5d8e4 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 59144: 202e 0008 movel %fp@(8),%d0 59148: 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(); 5914c: 94b9 0007 e85e subl 7e85e <_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; 59152: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 59154: 276e 0014 0034 movel %fp@(20),%a3@(52) 5915a: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5915e: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 59162: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59166: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 5916a: 2f0b movel %a3,%sp@- 5916c: 2f0a movel %a2,%sp@- 5916e: 206a 0004 moveal %a2@(4),%a0 59172: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59174: 4eb9 0005 c2c0 jsr 5c2c0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5917a: 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(); 5917e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59180: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59186: 4e5e unlk %fp 59188: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 5918a: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5918c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59192: 4e5e unlk %fp <== NOT EXECUTED 59194: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 59196: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59198: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5919e: 4e5e unlk %fp 591a0: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 591a2: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591aa: 4e5e unlk %fp 591ac: 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 ) { 591ae: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591b6: 4e5e unlk %fp ... =============================================================================== 00042330 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 42330: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42334: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ <== NOT EXECUTED 42338: 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) 4233c: 2802 movel %d2,%d4 <== NOT EXECUTED 4233e: 0284 2000 0000 andil #536870912,%d4 <== NOT EXECUTED 42344: 6730 beqs 42376 <== NOT EXECUTED { if (rtems_panic_in_progress++) 42346: 2239 0005 ee14 movel 5ee14 ,%d1 <== NOT EXECUTED 4234c: 2001 movel %d1,%d0 <== NOT EXECUTED 4234e: 5280 addql #1,%d0 <== NOT EXECUTED 42350: 23c0 0005 ee14 movel %d0,5ee14 <== NOT EXECUTED 42356: 4a81 tstl %d1 <== NOT EXECUTED 42358: 6714 beqs 4236e <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4235a: 2039 0005 ef78 movel 5ef78 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 42360: 5280 addql #1,%d0 <== NOT EXECUTED 42362: 23c0 0005 ef78 movel %d0,5ef78 <_Thread_Dispatch_disable_level><== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 42368: 2039 0005 ee14 movel 5ee14 ,%d0 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 4236e: 7202 moveq #2,%d1 <== NOT EXECUTED 42370: b280 cmpl %d0,%d1 <== NOT EXECUTED 42372: 6d00 00de bltw 42452 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 42376: 2079 0005 d8f0 moveal 5d8f0 <_impure_ptr>,%a0 <== NOT EXECUTED 4237c: 45f9 0004 ef50 lea 4ef50 ,%a2 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 42382: 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 */ 42384: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 42388: 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 */ 4238e: 4e92 jsr %a2@ <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 42390: 588f addql #4,%sp <== NOT EXECUTED 42392: 0802 001e btst #30,%d2 <== NOT EXECUTED 42396: 6600 0106 bnew 4249e <== 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); 4239a: 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? */ 4239e: 4283 clrl %d3 <== NOT EXECUTED 423a0: 47f9 0004 f2dc lea 4f2dc ,%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); 423a6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 423aa: 2079 0005 d8f0 moveal 5d8f0 <_impure_ptr>,%a0 <== NOT EXECUTED 423b0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423b4: 4eb9 0005 547c jsr 5547c <== NOT EXECUTED if (status) 423ba: 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); 423be: 2a00 movel %d0,%d5 <== NOT EXECUTED if (status) 423c0: 4a86 tstl %d6 <== NOT EXECUTED 423c2: 6600 009a bnew 4245e <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 423c6: 4a83 tstl %d3 <== NOT EXECUTED 423c8: 6732 beqs 423fc <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 423ca: 4a83 tstl %d3 <== NOT EXECUTED 423cc: 6f14 bles 423e2 <== NOT EXECUTED 423ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423d0: 49f9 0004 fb90 lea 4fb90 ,%a4 <== NOT EXECUTED 423d6: 4e94 jsr %a4@ <== NOT EXECUTED 423d8: 588f addql #4,%sp <== NOT EXECUTED 423da: 2040 moveal %d0,%a0 <== NOT EXECUTED 423dc: 4a10 tstb %a0@ <== NOT EXECUTED 423de: 6600 00f4 bnew 424d4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 423e2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423e4: 4879 0005 c214 pea 5c214 <== NOT EXECUTED 423ea: 2079 0005 d8f0 moveal 5d8f0 <_impure_ptr>,%a0 <== NOT EXECUTED 423f0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423f4: 4e93 jsr %a3@ <== NOT EXECUTED 423f6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 423fa: da80 addl %d0,%d5 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 423fc: 4879 0005 c9f8 pea 5c9f8 <== NOT EXECUTED 42402: 2079 0005 d8f0 moveal 5d8f0 <_impure_ptr>,%a0 <== NOT EXECUTED 42408: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 4240c: 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"); 42412: 4e93 jsr %a3@ <== NOT EXECUTED (void) fflush(stderr); 42414: 2079 0005 d8f0 moveal 5d8f0 <_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"); 4241a: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 4241c: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42420: 4e92 jsr %a2@ <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42422: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42426: 4a82 tstl %d2 <== NOT EXECUTED 42428: 671a beqs 42444 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 4242a: 4a84 tstl %d4 <== NOT EXECUTED 4242c: 675c beqs 4248a <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 4242e: 4879 0005 c228 pea 5c228 <== NOT EXECUTED 42434: 42a7 clrl %sp@- <== NOT EXECUTED 42436: 4eb9 0004 2544 jsr 42544 <== NOT EXECUTED _exit(local_errno); 4243c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4243e: 4eb9 0004 2e0a jsr 42e0a <_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"); 42444: 2006 movel %d6,%d0 <== NOT EXECUTED 42446: d085 addl %d5,%d0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 42448: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4244e: 4e5e unlk %fp <== NOT EXECUTED 42450: 4e75 rts <== NOT EXECUTED _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); abort(); 42452: 4280 clrl %d0 <== NOT EXECUTED } } return chars_written; } 42454: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4245a: 4e5e unlk %fp <== NOT EXECUTED 4245c: 4e75 rts <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 4245e: 2f06 movel %d6,%sp@- <== NOT EXECUTED 42460: 4eb9 0004 2318 jsr 42318 <== NOT EXECUTED 42466: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42468: 4879 0005 c1f9 pea 5c1f9 <== NOT EXECUTED 4246e: 2079 0005 d8f0 moveal 5d8f0 <_impure_ptr>,%a0 <== NOT EXECUTED 42474: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42478: 4e93 jsr %a3@ <== NOT EXECUTED 4247a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4247e: da80 addl %d0,%d5 <== NOT EXECUTED if (local_errno) 42480: 4a83 tstl %d3 <== NOT EXECUTED 42482: 6700 ff78 beqw 423fc <== NOT EXECUTED 42486: 6000 ff42 braw 423ca <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 4248a: 4879 0005 c23d pea 5c23d <== NOT EXECUTED 42490: 42a7 clrl %sp@- <== NOT EXECUTED 42492: 4eb9 0004 2544 jsr 42544 <== NOT EXECUTED abort(); 42498: 4eb9 0004 ebc4 jsr 4ebc4 <== 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; 4249e: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 424a4: 47f9 0004 f2dc lea 4f2dc ,%a3 <== NOT EXECUTED 424aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 424ac: 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); 424ae: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 424b2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 424b6: 2079 0005 d8f0 moveal 5d8f0 <_impure_ptr>,%a0 <== NOT EXECUTED 424bc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424c0: 4eb9 0005 547c jsr 5547c <== NOT EXECUTED if (status) 424c6: 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); 424ca: 2a00 movel %d0,%d5 <== NOT EXECUTED if (status) 424cc: 4a86 tstl %d6 <== NOT EXECUTED 424ce: 6700 fef6 beqw 423c6 <== NOT EXECUTED 424d2: 608a bras 4245e <== 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)); 424d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 424d6: 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)); 424dc: 4e94 jsr %a4@ <== NOT EXECUTED 424de: 2f00 movel %d0,%sp@- <== NOT EXECUTED 424e0: 4879 0005 c207 pea 5c207 <== NOT EXECUTED 424e6: 2079 0005 d8f0 moveal 5d8f0 <_impure_ptr>,%a0 <== NOT EXECUTED 424ec: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424f0: 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)) 424f2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 424f6: da80 addl %d0,%d5 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 424f8: 4879 0005 c9f8 pea 5c9f8 <== NOT EXECUTED 424fe: 2079 0005 d8f0 moveal 5d8f0 <_impure_ptr>,%a0 <== NOT EXECUTED 42504: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42508: 4e93 jsr %a3@ <== NOT EXECUTED (void) fflush(stderr); 4250a: 2079 0005 d8f0 moveal 5d8f0 <_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"); 42510: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 42512: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42516: 4e92 jsr %a2@ <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42518: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4251c: 4a82 tstl %d2 <== NOT EXECUTED 4251e: 6600 ff0a bnew 4242a <== NOT EXECUTED 42522: 6000 ff20 braw 42444 <== NOT EXECUTED =============================================================================== 000430d4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 430d4: 4e56 ffe4 linkw %fp,#-28 430d8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 430dc: 246e 0008 moveal %fp@(8),%a2 430e0: 4284 clrl %d4 430e2: 263c 7fff ffff movel #2147483647,%d3 430e8: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 430ea: 47f9 0005 229c lea 5229c <__srget_r>,%a3 430f0: 202a 0004 movel %a2@(4),%d0 430f4: 5380 subql #1,%d0 430f6: 2540 0004 movel %d0,%a2@(4) 430fa: 6d62 blts 4315e <== NEVER TAKEN 430fc: 2052 moveal %a2@,%a0 430fe: 4280 clrl %d0 43100: 1010 moveb %a0@,%d0 43102: 5288 addql #1,%a0 if (c == ':') 43104: 723a moveq #58,%d1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 43106: 2488 movel %a0,%a2@ if (c == ':') 43108: b280 cmpl %d0,%d1 4310a: 6764 beqs 43170 break; if (sign == 0) { 4310c: 4a84 tstl %d4 4310e: 660a bnes 4311a <== NEVER TAKEN if (c == '-') { 43110: 7c2d moveq #45,%d6 43112: bc80 cmpl %d0,%d6 43114: 6700 0084 beqw 4319a sign = -1; limit++; continue; 43118: 7801 moveq #1,%d4 } sign = 1; } if (!isdigit(c)) 4311a: 2079 0006 0fcc moveal 60fcc <__ctype_ptr__>,%a0 43120: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 43124: 49c1 extbl %d1 43126: 44c1 movew %d1,%ccr 43128: 6664 bnes 4318e <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 4312a: 2203 movel %d3,%d1 4312c: 7c0a moveq #10,%d6 4312e: 4c46 1005 remul %d6,%d5,%d1 43132: 4c46 1001 remul %d6,%d1,%d1 43136: b282 cmpl %d2,%d1 43138: 6554 bcss 4318e <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 4313a: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 43140: b282 cmpl %d2,%d1 43142: 6746 beqs 4318a <== NEVER TAKEN || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 43144: 2202 movel %d2,%d1 43146: e789 lsll #3,%d1 43148: 2241 moveal %d1,%a1 4314a: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 4314e: 2400 movel %d0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 43150: 202a 0004 movel %a2@(4),%d0 43154: 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; 43156: d488 addl %a0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 43158: 2540 0004 movel %d0,%a2@(4) 4315c: 6c9e bges 430fc <== ALWAYS TAKEN 4315e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43160: 2f39 0006 0fd0 movel 60fd0 <_impure_ptr>,%sp@- <== NOT EXECUTED 43166: 4e93 jsr %a3@ <== NOT EXECUTED 43168: 508f addql #8,%sp <== NOT EXECUTED if (c == ':') 4316a: 723a moveq #58,%d1 <== NOT EXECUTED 4316c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4316e: 669c bnes 4310c <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 43170: 4a84 tstl %d4 43172: 671a beqs 4318e <== NEVER TAKEN return 0; *val = i * sign; 43174: 4c02 4800 mulsl %d2,%d4 43178: 7001 moveq #1,%d0 4317a: 206e 000c moveal %fp@(12),%a0 4317e: 2084 movel %d4,%a0@ return 1; } 43180: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 43186: 4e5e unlk %fp 43188: 4e75 rts sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 4318a: ba80 cmpl %d0,%d5 <== NOT EXECUTED 4318c: 64b6 bccs 43144 <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 4318e: 4280 clrl %d0 <== NOT EXECUTED } 43190: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 43196: 4e5e unlk %fp <== NOT EXECUTED 43198: 4e75 rts <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 4319a: 5283 addql #1,%d3 <== NOT EXECUTED 4319c: 78ff moveq #-1,%d4 <== NOT EXECUTED continue; 4319e: 6000 ff50 braw 430f0 <== NOT EXECUTED =============================================================================== 000431a2 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 431a2: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 431a6: 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) { 431aa: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 431ae: 246e 0008 moveal %fp@(8),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 431b2: 4bf9 0005 229c lea 5229c <__srget_r>,%a5 431b8: 202a 0004 movel %a2@(4),%d0 431bc: 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) { 431be: 266e 0010 moveal %fp@(16),%a3 431c2: 242e 0018 movel %fp@(24),%d2 431c6: 286e 0014 moveal %fp@(20),%a4 int c; *name = *bufp; 431ca: 2093 movel %a3@,%a0@ for (;;) { c = getc(fp); 431cc: 2540 0004 movel %d0,%a2@(4) 431d0: 6d36 blts 43208 431d2: 2052 moveal %a2@,%a0 431d4: 4280 clrl %d0 431d6: 1010 moveb %a0@,%d0 431d8: 5288 addql #1,%a0 if (c == ':') { 431da: 723a moveq #58,%d1 { int c; *name = *bufp; for (;;) { c = getc(fp); 431dc: 2488 movel %a0,%a2@ if (c == ':') { 431de: b280 cmpl %d0,%d1 431e0: 6738 beqs 4321a if (nlFlag) return 0; break; } if (c == '\n') { 431e2: 720a moveq #10,%d1 431e4: b280 cmpl %d0,%d1 431e6: 674a beqs 43232 if (!nlFlag) return 0; break; } if (c == EOF) 431e8: 72ff moveq #-1,%d1 431ea: b280 cmpl %d0,%d1 431ec: 6748 beqs 43236 <== NEVER TAKEN return 0; if (*nleft < 2) 431ee: 7201 moveq #1,%d1 431f0: b294 cmpl %a4@,%d1 431f2: 6442 bccs 43236 <== NEVER TAKEN return 0; **bufp = c; 431f4: 2053 moveal %a3@,%a0 431f6: 1080 moveb %d0,%a0@ { int c; *name = *bufp; for (;;) { c = getc(fp); 431f8: 202a 0004 movel %a2@(4),%d0 431fc: 5380 subql #1,%d0 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 431fe: 5293 addql #1,%a3@ --(*nleft); 43200: 5394 subql #1,%a4@ { int c; *name = *bufp; for (;;) { c = getc(fp); 43202: 2540 0004 movel %d0,%a2@(4) 43206: 6cca bges 431d2 <== ALWAYS TAKEN 43208: 2f0a movel %a2,%sp@- 4320a: 2f39 0006 0fd0 movel 60fd0 <_impure_ptr>,%sp@- 43210: 4e95 jsr %a5@ 43212: 508f addql #8,%sp if (c == ':') { 43214: 723a moveq #58,%d1 43216: b280 cmpl %d0,%d1 43218: 66c8 bnes 431e2 <== ALWAYS TAKEN if (nlFlag) 4321a: 4a82 tstl %d2 4321c: 6618 bnes 43236 <== NEVER TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 4321e: 2053 moveal %a3@,%a0 ++(*bufp); --(*nleft); 43220: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 43222: 4210 clrb %a0@ ++(*bufp); 43224: 5293 addql #1,%a3@ --(*nleft); 43226: 5394 subql #1,%a4@ return 1; } 43228: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4322e: 4e5e unlk %fp 43230: 4e75 rts if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 43232: 4a82 tstl %d2 43234: 66e8 bnes 4321e <== ALWAYS TAKEN --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 43236: 4280 clrl %d0 <== NOT EXECUTED } 43238: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 4323e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043242 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 43242: 4e56 ffe4 linkw %fp,#-28 43246: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4324a: 42a7 clrl %sp@- 4324c: 280e movel %fp,%d4 4324e: 0684 0000 0014 addil #20,%d4 43254: 260e movel %fp,%d3 43256: 0683 0000 0010 addil #16,%d3 4325c: 47fa ff44 lea %pc@(431a2 ),%a3 43260: 2f04 movel %d4,%sp@- 43262: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 43264: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 43268: 2f0a movel %a2,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4326a: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 4326e: 2f02 movel %d2,%sp@- 43270: 4e93 jsr %a3@ 43272: 4fef 0014 lea %sp@(20),%sp 43276: 4a80 tstl %d0 43278: 660c bnes 43286 <== ALWAYS TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 4327a: 4280 clrl %d0 <== NOT EXECUTED } 4327c: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 <== NOT EXECUTED 43282: 4e5e unlk %fp <== NOT EXECUTED 43284: 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) 43286: 42a7 clrl %sp@- 43288: 2f04 movel %d4,%sp@- 4328a: 2f03 movel %d3,%sp@- 4328c: 486a 0004 pea %a2@(4) 43290: 2f02 movel %d2,%sp@- 43292: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 43294: 4fef 0014 lea %sp@(20),%sp 43298: 4a80 tstl %d0 4329a: 67de beqs 4327a <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 4329c: 486e fffc pea %fp@(-4) 432a0: 2f02 movel %d2,%sp@- 432a2: 4eba fe30 jsr %pc@(430d4 ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 432a6: 508f addql #8,%sp 432a8: 4a80 tstl %d0 432aa: 67ce beqs 4327a <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 432ac: 4878 0001 pea 1 432b0: 2f04 movel %d4,%sp@- 432b2: 2f03 movel %d3,%sp@- 432b4: 486e fff8 pea %fp@(-8) 432b8: 2f02 movel %d2,%sp@- 432ba: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 432bc: 4fef 0014 lea %sp@(20),%sp 432c0: 4a80 tstl %d0 432c2: 67b6 beqs 4327a <== NEVER TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 432c4: 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; 432c8: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 432ce: 1011 moveb %a1@,%d0 432d0: 677a beqs 4334c <== NEVER TAKEN 432d2: 2049 moveal %a1,%a0 432d4: 7201 moveq #1,%d1 432d6: 5288 addql #1,%a0 if(*cp == ',') 432d8: 49c0 extbl %d0 432da: 742c moveq #44,%d2 432dc: b480 cmpl %d0,%d2 432de: 6756 beqs 43336 <== NEVER TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 432e0: 1010 moveb %a0@,%d0 432e2: 66f2 bnes 432d6 432e4: e589 lsll #2,%d1 432e6: 0681 0000 0013 addil #19,%d1 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 432ec: b2ae 0014 cmpl %fp@(20),%d1 432f0: 6288 bhis 4327a <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 432f2: 202e 0010 movel %fp@(16),%d0 432f6: 72f0 moveq #-16,%d1 432f8: 0680 0000 000f addil #15,%d0 432fe: c081 andl %d1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 43300: 2040 moveal %d0,%a0 43302: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43304: 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); 43308: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4330c: 1010 moveb %a0@,%d0 4330e: 6740 beqs 43350 <== NEVER TAKEN 43310: 5288 addql #1,%a0 43312: 7201 moveq #1,%d1 if(*cp == ',') { 43314: 49c0 extbl %d0 43316: 742c moveq #44,%d2 43318: b480 cmpl %d0,%d2 4331a: 671e beqs 4333a <== NEVER TAKEN /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4331c: 1018 moveb %a0@+,%d0 4331e: 66f4 bnes 43314 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 43320: 206a 000a moveal %a2@(10),%a0 43324: 7001 moveq #1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 43326: e589 lsll #2,%d1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 43328: 42b0 1800 clrl %a0@(00000000,%d1:l) return 1; } 4332c: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 43332: 4e5e unlk %fp 43334: 4e75 rts /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') memcount++; 43336: 5281 addql #1,%d1 <== NOT EXECUTED 43338: 60a6 bras 432e0 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 4333a: 4200 clrb %d0 <== NOT EXECUTED 4333c: 1140 ffff moveb %d0,%a0@(-1) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 43340: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 43344: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 43348: 5281 addql #1,%d1 <== NOT EXECUTED 4334a: 60d0 bras 4331c <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4334c: 7217 moveq #23,%d1 <== NOT EXECUTED 4334e: 609c bras 432ec <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 43350: 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++) { 43354: 7204 moveq #4,%d1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 43356: 7001 moveq #1,%d0 <== NOT EXECUTED 43358: 42b0 1800 clrl %a0@(00000000,%d1:l) <== NOT EXECUTED 4335c: 60ce bras 4332c <== NOT EXECUTED =============================================================================== 0004339c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4339c: 4e56 ffe0 linkw %fp,#-32 433a0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 433a4: 42a7 clrl %sp@- 433a6: 280e movel %fp,%d4 433a8: 0684 0000 0014 addil #20,%d4 433ae: 260e movel %fp,%d3 433b0: 0683 0000 0010 addil #16,%d3 433b6: 47fa fdea lea %pc@(431a2 ),%a3 433ba: 2f04 movel %d4,%sp@- 433bc: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 433be: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 433c2: 2f0a movel %a2,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 433c4: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 433c8: 2f02 movel %d2,%sp@- 433ca: 4e93 jsr %a3@ 433cc: 4fef 0014 lea %sp@(20),%sp 433d0: 4a80 tstl %d0 433d2: 660c bnes 433e0 <== 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; 433d4: 4280 clrl %d0 <== NOT EXECUTED } 433d6: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 433dc: 4e5e unlk %fp <== NOT EXECUTED 433de: 4e75 rts <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 433e0: 42a7 clrl %sp@- 433e2: 2f04 movel %d4,%sp@- 433e4: 2f03 movel %d3,%sp@- 433e6: 486a 0004 pea %a2@(4) 433ea: 2f02 movel %d2,%sp@- 433ec: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 433ee: 4fef 0014 lea %sp@(20),%sp 433f2: 4a80 tstl %d0 433f4: 67de beqs 433d4 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 433f6: 486e fffc pea %fp@(-4) 433fa: 49fa fcd8 lea %pc@(430d4 ),%a4 433fe: 2f02 movel %d2,%sp@- 43400: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43402: 508f addql #8,%sp 43404: 4a80 tstl %d0 43406: 67cc beqs 433d4 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 43408: 486e fff8 pea %fp@(-8) 4340c: 2f02 movel %d2,%sp@- 4340e: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43410: 508f addql #8,%sp 43412: 4a80 tstl %d0 43414: 67be beqs 433d4 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 43416: 42a7 clrl %sp@- 43418: 2f04 movel %d4,%sp@- 4341a: 2f03 movel %d3,%sp@- 4341c: 486a 000c pea %a2@(12) 43420: 2f02 movel %d2,%sp@- 43422: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43424: 4fef 0014 lea %sp@(20),%sp 43428: 4a80 tstl %d0 4342a: 67a8 beqs 433d4 <== 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) 4342c: 42a7 clrl %sp@- 4342e: 2f04 movel %d4,%sp@- 43430: 2f03 movel %d3,%sp@- 43432: 486a 0010 pea %a2@(16) 43436: 2f02 movel %d2,%sp@- 43438: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4343a: 4fef 0014 lea %sp@(20),%sp 4343e: 4a80 tstl %d0 43440: 6792 beqs 433d4 <== 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) 43442: 42a7 clrl %sp@- 43444: 2f04 movel %d4,%sp@- 43446: 2f03 movel %d3,%sp@- 43448: 486a 0014 pea %a2@(20) 4344c: 2f02 movel %d2,%sp@- 4344e: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 43450: 4fef 0014 lea %sp@(20),%sp 43454: 4a80 tstl %d0 43456: 6700 ff7c beqw 433d4 || !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)) 4345a: 4878 0001 pea 1 4345e: 2f04 movel %d4,%sp@- 43460: 2f03 movel %d3,%sp@- 43462: 486a 0018 pea %a2@(24) 43466: 2f02 movel %d2,%sp@- 43468: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4346a: 4fef 0014 lea %sp@(20),%sp 4346e: 4a80 tstl %d0 43470: 6700 ff62 beqw 433d4 || !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; 43474: 7001 moveq #1,%d0 43476: 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; 4347c: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; } 43482: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 43488: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046804 : int sched_get_priority_max( int policy ) { switch ( policy ) { 46804: 7004 moveq #4,%d0 #include int sched_get_priority_max( int policy ) { 46806: 4e56 0000 linkw %fp,#0 4680a: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 4680e: b081 cmpl %d1,%d0 46810: 6412 bccs 46824 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 46812: 4eb9 0004 fb74 jsr 4fb74 <__errno> 46818: 7216 moveq #22,%d1 4681a: 2040 moveal %d0,%a0 4681c: 70ff moveq #-1,%d0 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 4681e: 4e5e unlk %fp case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 46820: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 46822: 4e75 rts int sched_get_priority_max( int policy ) { switch ( policy ) { 46824: 103c 0001 moveb #1,%d0 46828: e3a8 lsll %d1,%d0 4682a: 7217 moveq #23,%d1 4682c: c081 andl %d1,%d0 4682e: 67e2 beqs 46812 <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 46830: 4280 clrl %d0 46832: 1039 0005 ebf6 moveb 5ebf6 ,%d0 } 46838: 4e5e unlk %fp default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 4683a: 5380 subql #1,%d0 } ... =============================================================================== 00046840 : int sched_get_priority_min( int policy ) { switch ( policy ) { 46840: 7004 moveq #4,%d0 #include int sched_get_priority_min( int policy ) { 46842: 4e56 0000 linkw %fp,#0 46846: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 4684a: b081 cmpl %d1,%d0 4684c: 6412 bccs 46860 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4684e: 4eb9 0004 fb74 jsr 4fb74 <__errno> 46854: 7216 moveq #22,%d1 46856: 2040 moveal %d0,%a0 46858: 70ff moveq #-1,%d0 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 4685a: 4e5e unlk %fp case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4685c: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 4685e: 4e75 rts int sched_get_priority_min( int policy ) { switch ( policy ) { 46860: 103c 0001 moveb #1,%d0 46864: e3a8 lsll %d1,%d0 46866: 7217 moveq #23,%d1 46868: c081 andl %d1,%d0 4686a: 67e2 beqs 4684e <== NEVER TAKEN 4686c: 7001 moveq #1,%d0 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 4686e: 4e5e unlk %fp ... =============================================================================== 00046874 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 46874: 4e56 0000 linkw %fp,#0 46878: 2f03 movel %d3,%sp@- 4687a: 262e 0008 movel %fp@(8),%d3 4687e: 2f02 movel %d2,%sp@- 46880: 242e 000c movel %fp@(12),%d2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 46884: 4a83 tstl %d3 46886: 6622 bnes 468aa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 46888: 4a82 tstl %d2 4688a: 6742 beqs 468ce rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 4688c: 2f02 movel %d2,%sp@- 4688e: 2f39 0006 0338 movel 60338 <_Thread_Ticks_per_timeslice>,%sp@- 46894: 4eb9 0004 9fd4 jsr 49fd4 <_Timespec_From_ticks> return 0; } 4689a: 242e fff8 movel %fp@(-8),%d2 if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; 4689e: 508f addql #8,%sp rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 468a0: 4280 clrl %d0 return 0; } 468a2: 262e fffc movel %fp@(-4),%d3 468a6: 4e5e unlk %fp 468a8: 4e75 rts { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 468aa: 4eb9 0004 3134 jsr 43134 468b0: b680 cmpl %d0,%d3 468b2: 67d4 beqs 46888 rtems_set_errno_and_return_minus_one( ESRCH ); 468b4: 4eb9 0004 fb74 jsr 4fb74 <__errno> 468ba: 7403 moveq #3,%d2 468bc: 2040 moveal %d0,%a0 468be: 70ff moveq #-1,%d0 468c0: 2082 movel %d2,%a0@ if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 468c2: 242e fff8 movel %fp@(-8),%d2 468c6: 262e fffc movel %fp@(-4),%d3 468ca: 4e5e unlk %fp 468cc: 4e75 rts if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 468ce: 4eb9 0004 fb74 jsr 4fb74 <__errno> _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 468d4: 242e fff8 movel %fp@(-8),%d2 if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 468d8: 2040 moveal %d0,%a0 468da: 7216 moveq #22,%d1 468dc: 70ff moveq #-1,%d0 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 468de: 262e fffc movel %fp@(-4),%d3 468e2: 4e5e unlk %fp if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 468e4: 2081 movel %d1,%a0@ <== NOT EXECUTED _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } =============================================================================== 00048a2c : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 48a2c: 4e56 ffe0 linkw %fp,#-32 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48a30: 2039 0006 4024 movel 64024 <_Thread_Dispatch_disable_level>,%d0 48a36: 5280 addql #1,%d0 48a38: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48a3c: 23c0 0006 4024 movel %d0,64024 <_Thread_Dispatch_disable_level> 48a42: 2a2e 0008 movel %fp@(8),%d5 48a46: 262e 000c movel %fp@(12),%d3 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 48a4a: 2803 movel %d3,%d4 48a4c: 0284 0000 0200 andil #512,%d4 48a52: 6600 0086 bnew 48ada 48a56: 95ca subal %a2,%a2 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 48a58: 486e fffc pea %fp@(-4) 48a5c: 2f05 movel %d5,%sp@- 48a5e: 4eb9 0004 f14c jsr 4f14c <_POSIX_Semaphore_Name_to_id> * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 48a64: 508f addql #8,%sp mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 48a66: 2400 movel %d0,%d2 * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 48a68: 6726 beqs 48a90 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 48a6a: 7002 moveq #2,%d0 48a6c: b082 cmpl %d2,%d0 48a6e: 6604 bnes 48a74 <== NEVER TAKEN 48a70: 4a84 tstl %d4 48a72: 666e bnes 48ae2 _Thread_Enable_dispatch(); 48a74: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 48a7a: 4eb9 0005 2c24 jsr 52c24 <__errno> 48a80: 2040 moveal %d0,%a0 48a82: 70ff moveq #-1,%d0 48a84: 2082 movel %d2,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 48a86: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48a8c: 4e5e unlk %fp 48a8e: 4e75 rts /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 48a90: 0283 0000 0a00 andil #2560,%d3 48a96: 0c83 0000 0a00 cmpil #2560,%d3 48a9c: 676e beqs 48b0c 48a9e: 486e fff4 pea %fp@(-12) rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 48aa2: 45f9 0004 b464 lea 4b464 <_Thread_Enable_dispatch>,%a2 48aa8: 2f2e fffc movel %fp@(-4),%sp@- 48aac: 4879 0006 427e pea 6427e <_POSIX_Semaphore_Information> 48ab2: 4eb9 0004 ab84 jsr 4ab84 <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 48ab8: 2040 moveal %d0,%a0 48aba: 52a8 0016 addql #1,%a0@(22) if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 48abe: 2d40 fff8 movel %d0,%fp@(-8) the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 48ac2: 4e92 jsr %a2@ _Thread_Enable_dispatch(); 48ac4: 4e92 jsr %a2@ return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 48ac6: 202e fff8 movel %fp@(-8),%d0 the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); goto return_id; 48aca: 4fef 000c lea %sp@(12),%sp return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 48ace: 5080 addql #8,%d0 #endif return id; } 48ad0: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48ad6: 4e5e unlk %fp 48ad8: 4e75 rts _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 48ada: 246e 0014 moveal %fp@(20),%a2 48ade: 6000 ff78 braw 48a58 /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 48ae2: 486e fff8 pea %fp@(-8) 48ae6: 2f0a movel %a2,%sp@- 48ae8: 42a7 clrl %sp@- 48aea: 2f05 movel %d5,%sp@- 48aec: 4eb9 0004 ef94 jsr 4ef94 <_POSIX_Semaphore_Create_support> 48af2: 2400 movel %d0,%d2 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 48af4: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> if ( status == -1 ) 48afa: 4fef 0010 lea %sp@(16),%sp 48afe: 70ff moveq #-1,%d0 48b00: b082 cmpl %d2,%d0 48b02: 6782 beqs 48a86 return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 48b04: 202e fff8 movel %fp@(-8),%d0 48b08: 5080 addql #8,%d0 48b0a: 60c4 bras 48ad0 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 48b0c: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 48b12: 4eb9 0005 2c24 jsr 52c24 <__errno> 48b18: 7211 moveq #17,%d1 48b1a: 2040 moveal %d0,%a0 48b1c: 70ff moveq #-1,%d0 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 48b1e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 48b24: 2081 movel %d1,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 48b26: 4e5e unlk %fp ... =============================================================================== 00048b84 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 48b84: 4e56 fffc linkw %fp,#-4 48b88: 2f02 movel %d2,%sp@- * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 48b8a: 486e fffc pea %fp@(-4) 48b8e: 2f2e 000c movel %fp@(12),%sp@- int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 48b92: 242e 0008 movel %fp@(8),%d2 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 48b96: 4eb9 0004 e560 jsr 4e560 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 48b9c: 508f addql #8,%sp 48b9e: 7203 moveq #3,%d1 48ba0: b280 cmpl %d0,%d1 48ba2: 671a beqs 48bbe <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48ba4: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 48ba8: 42a7 clrl %sp@- <== NOT EXECUTED 48baa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48bac: 4eb9 0004 f1c4 jsr 4f1c4 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 48bb2: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48bb6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED break; } } return lock_status; } 48bba: 4e5e unlk %fp <== NOT EXECUTED 48bbc: 4e75 rts <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48bbe: 2f2e fffc movel %fp@(-4),%sp@- 48bc2: 4878 0001 pea 1 48bc6: 2f02 movel %d2,%sp@- 48bc8: 4eb9 0004 f1c4 jsr 4f1c4 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 48bce: 242e fff8 movel %fp@(-8),%d2 */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48bd2: 4fef 000c lea %sp@(12),%sp break; } } return lock_status; } 48bd6: 4e5e unlk %fp ... =============================================================================== 000435d4 : return NULL; return &grent; } void setgrent(void) { 435d4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 435d8: 4eb9 0004 34ca jsr 434ca <== NOT EXECUTED if (group_fp != NULL) 435de: 2039 0006 1de6 movel 61de6 ,%d0 <== NOT EXECUTED 435e4: 670a beqs 435f0 <== NOT EXECUTED fclose(group_fp); 435e6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 435e8: 4eb9 0005 0dba jsr 50dba <== NOT EXECUTED 435ee: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 435f0: 4879 0006 06b5 pea 606b5 <_global_impure_ptr+0xbf> <== NOT EXECUTED 435f6: 4879 0005 fbd8 pea 5fbd8 <== NOT EXECUTED 435fc: 4eb9 0005 143c jsr 5143c <== NOT EXECUTED 43602: 508f addql #8,%sp <== NOT EXECUTED } 43604: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 43606: 23c0 0006 1de6 movel %d0,61de6 <== NOT EXECUTED } =============================================================================== 0004379e : return NULL; return &pwent; } void setpwent(void) { 4379e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 437a2: 4eb9 0004 34ca jsr 434ca <== NOT EXECUTED if (passwd_fp != NULL) 437a8: 2039 0006 1cfe movel 61cfe ,%d0 <== NOT EXECUTED 437ae: 670a beqs 437ba <== NOT EXECUTED fclose(passwd_fp); 437b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 437b2: 4eb9 0005 0dba jsr 50dba <== NOT EXECUTED 437b8: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 437ba: 4879 0006 06b5 pea 606b5 <_global_impure_ptr+0xbf> <== NOT EXECUTED 437c0: 4879 0005 fb65 pea 5fb65 <== NOT EXECUTED 437c6: 4eb9 0005 143c jsr 5143c <== NOT EXECUTED 437cc: 508f addql #8,%sp <== NOT EXECUTED } 437ce: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 437d0: 23c0 0006 1cfe movel %d0,61cfe <== NOT EXECUTED } =============================================================================== 00046668 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 46668: 4e56 fff4 linkw %fp,#-12 4666c: 226e 0010 moveal %fp@(16),%a1 46670: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46674: 242e 0008 movel %fp@(8),%d2 46678: 246e 000c moveal %fp@(12),%a2 ISR_Level level; if ( oact ) 4667c: 4a89 tstl %a1 4667e: 6718 beqs 46698 *oact = _POSIX_signals_Vectors[ sig ]; 46680: 2202 movel %d2,%d1 46682: 2002 movel %d2,%d0 46684: e989 lsll #4,%d1 46686: e588 lsll #2,%d0 46688: 2041 moveal %d1,%a0 4668a: 91c0 subal %d0,%a0 4668c: d1fc 0006 1386 addal #398214,%a0 46692: 22d8 movel %a0@+,%a1@+ 46694: 22d8 movel %a0@+,%a1@+ 46696: 2290 movel %a0@,%a1@ if ( !sig ) 46698: 4a82 tstl %d2 4669a: 6778 beqs 46714 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4669c: 2002 movel %d2,%d0 4669e: 5380 subql #1,%d0 466a0: 721f moveq #31,%d1 466a2: b280 cmpl %d0,%d1 466a4: 656e bcss 46714 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 466a6: 7009 moveq #9,%d0 466a8: b082 cmpl %d2,%d0 466aa: 6768 beqs 46714 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 466ac: 4a8a tstl %a2 466ae: 6736 beqs 466e6 <== NEVER TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 466b0: 203c 0000 0700 movel #1792,%d0 466b6: 40c3 movew %sr,%d3 466b8: 8083 orl %d3,%d0 466ba: 46c0 movew %d0,%sr if ( act->sa_handler == SIG_DFL ) { 466bc: 4aaa 0008 tstl %a2@(8) 466c0: 6730 beqs 466f2 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 466c2: 2f02 movel %d2,%sp@- 466c4: 4eb9 0004 c384 jsr 4c384 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 466ca: 588f addql #4,%sp 466cc: 2202 movel %d2,%d1 466ce: 224a moveal %a2,%a1 466d0: e989 lsll #4,%d1 466d2: e58a lsll #2,%d2 466d4: 2041 moveal %d1,%a0 466d6: 91c2 subal %d2,%a0 466d8: d1fc 0006 1386 addal #398214,%a0 466de: 20d9 movel %a1@+,%a0@+ 466e0: 20d9 movel %a1@+,%a0@+ 466e2: 2091 movel %a1@,%a0@ } _ISR_Enable( level ); 466e4: 46c3 movew %d3,%sr 466e6: 4280 clrl %d0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 466e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 466ee: 4e5e unlk %fp 466f0: 4e75 rts * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 466f2: 2002 movel %d2,%d0 466f4: e58a lsll #2,%d2 466f6: e988 lsll #4,%d0 466f8: 9082 subl %d2,%d0 466fa: 2040 moveal %d0,%a0 466fc: 2240 moveal %d0,%a1 466fe: d1fc 0006 1386 addal #398214,%a0 46704: d3fc 0005 e8e6 addal #387302,%a1 4670a: 20d9 movel %a1@+,%a0@+ 4670c: 20d9 movel %a1@+,%a0@+ 4670e: 2091 movel %a1@,%a0@ } else { _POSIX_signals_Clear_process_signals( sig ); _POSIX_signals_Vectors[ sig ] = *act; } _ISR_Enable( level ); 46710: 46c3 movew %d3,%sr 46712: 60d2 bras 466e6 * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 46714: 4eb9 0004 fc54 jsr 4fc54 <__errno> 4671a: 7216 moveq #22,%d1 4671c: 2040 moveal %d0,%a0 4671e: 70ff moveq #-1,%d0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 46720: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 46726: 2081 movel %d1,%a0@ * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 46728: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048b74 : #include int sigsuspend( const sigset_t *sigmask ) { 48b74: 4e56 ffec linkw %fp,#-20 48b78: 48d7 040c moveml %d2-%d3/%a2,%sp@ int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 48b7c: 240e movel %fp,%d2 48b7e: 5982 subql #4,%d2 48b80: 45f9 0004 8b4c lea 48b4c ,%a2 (void) sigfillset( &all_signals ); 48b86: 260e movel %fp,%d3 48b88: 5183 subql #8,%d3 int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 48b8a: 2f02 movel %d2,%sp@- 48b8c: 2f2e 0008 movel %fp@(8),%sp@- 48b90: 4878 0001 pea 1 48b94: 4e92 jsr %a2@ (void) sigfillset( &all_signals ); 48b96: 2f03 movel %d3,%sp@- 48b98: 4eb9 0004 8aa8 jsr 48aa8 status = sigtimedwait( &all_signals, NULL, NULL ); 48b9e: 42a7 clrl %sp@- 48ba0: 42a7 clrl %sp@- 48ba2: 2f03 movel %d3,%sp@- 48ba4: 4eb9 0004 8c30 jsr 48c30 48baa: 2600 movel %d0,%d3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 48bac: 42a7 clrl %sp@- 48bae: 2f02 movel %d2,%sp@- 48bb0: 42a7 clrl %sp@- 48bb2: 4e92 jsr %a2@ /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 48bb4: 4fef 0028 lea %sp@(40),%sp 48bb8: 70ff moveq #-1,%d0 48bba: b083 cmpl %d3,%d0 48bbc: 660c bnes 48bca <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 48bbe: 70ff moveq #-1,%d0 <== NOT EXECUTED 48bc0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 48bc6: 4e5e unlk %fp <== NOT EXECUTED 48bc8: 4e75 rts <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 48bca: 4eb9 0005 1eec jsr 51eec <__errno> 48bd0: 2040 moveal %d0,%a0 48bd2: 7004 moveq #4,%d0 return status; } 48bd4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 48bda: 2080 movel %d0,%a0@ return status; } 48bdc: 70ff moveq #-1,%d0 48bde: 4e5e unlk %fp ... =============================================================================== 00048e18 : int sigwait( const sigset_t *set, int *sig ) { 48e18: 4e56 0000 linkw %fp,#0 48e1c: 2f0a movel %a2,%sp@- int status; status = sigtimedwait( set, NULL, NULL ); 48e1e: 42a7 clrl %sp@- int sigwait( const sigset_t *set, int *sig ) { 48e20: 246e 000c moveal %fp@(12),%a2 int status; status = sigtimedwait( set, NULL, NULL ); 48e24: 42a7 clrl %sp@- 48e26: 2f2e 0008 movel %fp@(8),%sp@- 48e2a: 4eb9 0004 8c30 jsr 48c30 if ( status != -1 ) { 48e30: 4fef 000c lea %sp@(12),%sp 48e34: 72ff moveq #-1,%d1 48e36: b280 cmpl %d0,%d1 48e38: 6710 beqs 48e4a if ( sig ) 48e3a: 4a8a tstl %a2 48e3c: 6702 beqs 48e40 <== NEVER TAKEN *sig = status; 48e3e: 2480 movel %d0,%a2@ return 0; } return errno; } 48e40: 246e fffc moveal %fp@(-4),%a2 status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; 48e44: 4280 clrl %d0 return 0; } return errno; } 48e46: 4e5e unlk %fp 48e48: 4e75 rts if ( sig ) *sig = status; return 0; } return errno; 48e4a: 4eb9 0005 1eec jsr 51eec <__errno> } 48e50: 246e fffc moveal %fp@(-4),%a2 if ( sig ) *sig = status; return 0; } return errno; 48e54: 2040 moveal %d0,%a0 } 48e56: 4e5e unlk %fp if ( sig ) *sig = status; return 0; } return errno; 48e58: 2010 movel %a0@,%d0 <== NOT EXECUTED } =============================================================================== 0004425c : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 4425c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44260: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44262: 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)) { 44266: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 4426a: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44270: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44272: 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)) { 44276: 4a80 tstl %d0 <== NOT EXECUTED 44278: 661c bnes 44296 <== 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); 4427a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 4427e: 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); 44282: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44288: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 4428c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44290: 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); 44292: 6000 fdd0 braw 44064 <== 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); 44296: 42a7 clrl %sp@- <== NOT EXECUTED i = iproc (c, tty); 44298: 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); 4429e: 42a7 clrl %sp@- <== NOT EXECUTED 442a0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 442a4: 4eb9 0004 5d2c jsr 45d2c <== NOT EXECUTED i = iproc (c, tty); 442aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED 442ae: 4eba fdb4 jsr %pc@(44064 ) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 442b2: 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); 442b6: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 442b8: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 442be: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 442c2: 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); 442c4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 442c8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 442cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045160 : int _STAT_NAME( const char *path, struct stat *buf ) { 45160: 4e56 ffe0 linkw %fp,#-32 45164: 48d7 001c moveml %d2-%d4,%sp@ 45168: 262e 0008 movel %fp@(8),%d3 4516c: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 45170: 6700 0088 beqw 451fa rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 45174: 2f03 movel %d3,%sp@- 45176: 280e movel %fp,%d4 45178: 0684 ffff ffec addil #-20,%d4 4517e: 4eb9 0005 36fc jsr 536fc 45184: 7201 moveq #1,%d1 45186: 2e81 movel %d1,%sp@ 45188: 2f04 movel %d4,%sp@- 4518a: 42a7 clrl %sp@- 4518c: 2f00 movel %d0,%sp@- 4518e: 2f03 movel %d3,%sp@- 45190: 4eb9 0004 3814 jsr 43814 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 45196: 4fef 0014 lea %sp@(20),%sp 4519a: 4a80 tstl %d0 4519c: 664e bnes 451ec return -1; if ( !loc.handlers->fstat_h ){ 4519e: 206e fff4 moveal %fp@(-12),%a0 451a2: 4aa8 0018 tstl %a0@(24) 451a6: 676c beqs 45214 <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 451a8: 4878 0046 pea 46 451ac: 42a7 clrl %sp@- 451ae: 2f02 movel %d2,%sp@- 451b0: 4eb9 0005 28b8 jsr 528b8 status = (*loc.handlers->fstat_h)( &loc, buf ); 451b6: 2f02 movel %d2,%sp@- 451b8: 2f04 movel %d4,%sp@- 451ba: 206e fff4 moveal %fp@(-12),%a0 451be: 2068 0018 moveal %a0@(24),%a0 451c2: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 451c4: 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 ); 451c8: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 451ca: 4fef 0014 lea %sp@(20),%sp 451ce: 4a88 tstl %a0 451d0: 670e beqs 451e0 <== NEVER TAKEN 451d2: 2068 001c moveal %a0@(28),%a0 451d6: 4a88 tstl %a0 451d8: 6706 beqs 451e0 <== NEVER TAKEN 451da: 2f04 movel %d4,%sp@- 451dc: 4e90 jsr %a0@ 451de: 588f addql #4,%sp return status; } 451e0: 2002 movel %d2,%d0 451e2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 451e8: 4e5e unlk %fp 451ea: 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 ) 451ec: 74ff moveq #-1,%d2 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 451ee: 2002 movel %d2,%d0 451f0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 451f6: 4e5e unlk %fp 451f8: 4e75 rts /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 451fa: 4eb9 0005 1618 jsr 51618 <__errno> 45200: 74ff moveq #-1,%d2 45202: 760e moveq #14,%d3 45204: 2040 moveal %d0,%a0 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 45206: 2002 movel %d2,%d0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 45208: 2083 movel %d3,%a0@ status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 4520a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 45210: 4e5e unlk %fp 45212: 4e75 rts 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 45214: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 45218: 4a88 tstl %a0 <== NOT EXECUTED 4521a: 670e beqs 4522a <== NOT EXECUTED 4521c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 45220: 4a88 tstl %a0 <== NOT EXECUTED 45222: 6706 beqs 4522a <== NOT EXECUTED 45224: 2f04 movel %d4,%sp@- <== NOT EXECUTED 45226: 4e90 jsr %a0@ <== NOT EXECUTED 45228: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4522a: 4eb9 0005 1618 jsr 51618 <__errno> <== NOT EXECUTED 45230: 74ff moveq #-1,%d2 <== NOT EXECUTED 45232: 2040 moveal %d0,%a0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 45234: 2002 movel %d2,%d0 <== NOT EXECUTED 45236: 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 ); 4523c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 45242: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cb98 : int symlink( const char *actualpath, const char *sympath ) { 4cb98: 4e56 ffe8 linkw %fp,#-24 4cb9c: 226e 000c moveal %fp@(12),%a1 4cba0: 2f0a movel %a2,%sp@- 4cba2: 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 ); 4cba4: 742f moveq #47,%d2 4cba6: 1211 moveb %a1@,%d1 4cba8: 1001 moveb %d1,%d0 4cbaa: 49c0 extbl %d0 4cbac: b480 cmpl %d0,%d2 4cbae: 670e beqs 4cbbe 4cbb0: 143c 005c moveb #92,%d2 4cbb4: b480 cmpl %d0,%d2 4cbb6: 6706 beqs 4cbbe <== NEVER TAKEN 4cbb8: 4a01 tstb %d1 4cbba: 6600 0092 bnew 4cc4e 4cbbe: 2079 0006 366c moveal 6366c ,%a0 4cbc4: 45ee ffe8 lea %fp@(-24),%a2 4cbc8: 7001 moveq #1,%d0 4cbca: 24a8 0018 movel %a0@(24),%a2@ 4cbce: 2d68 001c ffec movel %a0@(28),%fp@(-20) 4cbd4: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4cbda: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4cbe0: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) if ( !loc.ops->evalformake_h ) { 4cbe6: 206e fff4 moveal %fp@(-12),%a0 4cbea: 2068 0004 moveal %a0@(4),%a0 4cbee: 4a88 tstl %a0 4cbf0: 6700 008a beqw 4cc7c rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 4cbf4: 486e fffc pea %fp@(-4) 4cbf8: 2f0a movel %a2,%sp@- 4cbfa: 4871 0800 pea %a1@(00000000,%d0:l) 4cbfe: 4e90 jsr %a0@ if ( result != 0 ) 4cc00: 4fef 000c lea %sp@(12),%sp 4cc04: 4a80 tstl %d0 4cc06: 6600 0092 bnew 4cc9a return -1; if ( !loc.ops->symlink_h ) { 4cc0a: 226e fff4 moveal %fp@(-12),%a1 4cc0e: 2069 0038 moveal %a1@(56),%a0 4cc12: 4a88 tstl %a0 4cc14: 6700 0094 beqw 4ccaa rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 4cc18: 2f2e fffc movel %fp@(-4),%sp@- 4cc1c: 2f2e 0008 movel %fp@(8),%sp@- 4cc20: 2f0a movel %a2,%sp@- 4cc22: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4cc24: 206e fff4 moveal %fp@(-12),%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); 4cc28: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 4cc2a: 4fef 000c lea %sp@(12),%sp 4cc2e: 4a88 tstl %a0 4cc30: 670e beqs 4cc40 <== NEVER TAKEN 4cc32: 2068 001c moveal %a0@(28),%a0 4cc36: 4a88 tstl %a0 4cc38: 6706 beqs 4cc40 <== NEVER TAKEN 4cc3a: 2f0a movel %a2,%sp@- 4cc3c: 4e90 jsr %a0@ 4cc3e: 588f addql #4,%sp return result; } 4cc40: 2002 movel %d2,%d0 4cc42: 242e ffe0 movel %fp@(-32),%d2 4cc46: 246e ffe4 moveal %fp@(-28),%a2 4cc4a: 4e5e unlk %fp 4cc4c: 4e75 rts rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4cc4e: 2079 0006 366c moveal 6366c ,%a0 4cc54: 45ee ffe8 lea %fp@(-24),%a2 4cc58: 5888 addql #4,%a0 4cc5a: 4280 clrl %d0 4cc5c: 2498 movel %a0@+,%a2@ 4cc5e: 2d58 ffec movel %a0@+,%fp@(-20) 4cc62: 2d58 fff0 movel %a0@+,%fp@(-16) 4cc66: 2d58 fff4 movel %a0@+,%fp@(-12) 4cc6a: 2d50 fff8 movel %a0@,%fp@(-8) if ( !loc.ops->evalformake_h ) { 4cc6e: 206e fff4 moveal %fp@(-12),%a0 4cc72: 2068 0004 moveal %a0@(4),%a0 4cc76: 4a88 tstl %a0 4cc78: 6600 ff7a bnew 4cbf4 if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4cc7c: 4eb9 0005 0ec4 jsr 50ec4 <__errno> <== NOT EXECUTED 4cc82: 74ff moveq #-1,%d2 <== NOT EXECUTED 4cc84: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cc86: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 4cc8c: 2002 movel %d2,%d0 <== NOT EXECUTED 4cc8e: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED 4cc92: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED 4cc96: 4e5e unlk %fp <== NOT EXECUTED 4cc98: 4e75 rts <== NOT EXECUTED 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 ) 4cc9a: 74ff moveq #-1,%d2 result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 4cc9c: 2002 movel %d2,%d0 4cc9e: 242e ffe0 movel %fp@(-32),%d2 4cca2: 246e ffe4 moveal %fp@(-28),%a2 4cca6: 4e5e unlk %fp 4cca8: 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 ); 4ccaa: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4ccae: 4a88 tstl %a0 <== NOT EXECUTED 4ccb0: 67ca beqs 4cc7c <== NOT EXECUTED 4ccb2: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ccb4: 74ff moveq #-1,%d2 <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 4ccb6: 4e90 jsr %a0@ <== NOT EXECUTED 4ccb8: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ccba: 4eb9 0005 0ec4 jsr 50ec4 <__errno> <== NOT EXECUTED 4ccc0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ccc2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4ccc8: 60c2 bras 4cc8c <== NOT EXECUTED ... =============================================================================== 00045260 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 45260: 4e56 0000 linkw %fp,#0 45264: 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; 45268: 2028 0106 movel %a0@(262),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 4526c: 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 ) { 4526e: 4a80 tstl %d0 45270: 6728 beqs 4529a <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 45272: 2279 0006 2f92 moveal 62f92 <_Thread_Executing>,%a1 45278: 2429 0106 movel %a1@(262),%d2 _Thread_Executing->libc_reent = this_reent; 4527c: 2340 0106 movel %d0,%a1@(262) _fwalk (t->libc_reent, sync_wrapper); 45280: 487a 0046 pea %pc@(452c8 ) 45284: 2f28 0106 movel %a0@(262),%sp@- 45288: 4eb9 0005 2596 jsr 52596 <_fwalk> _Thread_Executing->libc_reent = current_reent; 4528e: 2079 0006 2f92 moveal 62f92 <_Thread_Executing>,%a0 45294: 508f addql #8,%sp 45296: 2142 0106 movel %d2,%a0@(262) } } 4529a: 242e fffc movel %fp@(-4),%d2 4529e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000445d0 : int tcsetattr( int fd, int opt, struct termios *tp ) { 445d0: 4e56 0000 linkw %fp,#0 445d4: 202e 000c movel %fp@(12),%d0 445d8: 2f03 movel %d3,%sp@- 445da: 262e 0010 movel %fp@(16),%d3 445de: 2f02 movel %d2,%sp@- 445e0: 242e 0008 movel %fp@(8),%d2 switch (opt) { 445e4: 4a80 tstl %d0 445e6: 6738 beqs 44620 <== ALWAYS TAKEN 445e8: 7201 moveq #1,%d1 <== NOT EXECUTED 445ea: b280 cmpl %d0,%d1 <== NOT EXECUTED 445ec: 671c beqs 4460a <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 445ee: 4eb9 0004 febc jsr 4febc <__errno> <== NOT EXECUTED 445f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 445f6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 445fc: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44600: 70ff moveq #-1,%d0 <== NOT EXECUTED 44602: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 44606: 4e5e unlk %fp <== NOT EXECUTED 44608: 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) 4460a: 42a7 clrl %sp@- <== NOT EXECUTED 4460c: 4878 0003 pea 3 <== NOT EXECUTED 44610: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44612: 4eb9 0004 bf1c jsr 4bf1c <== NOT EXECUTED 44618: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4461c: 4a80 tstl %d0 <== NOT EXECUTED 4461e: 6ddc blts 445fc <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 44620: 2d43 0010 movel %d3,%fp@(16) 44624: 7002 moveq #2,%d0 44626: 2d42 0008 movel %d2,%fp@(8) } } 4462a: 242e fff8 movel %fp@(-8),%d2 4462e: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 44632: 2d40 000c movel %d0,%fp@(12) } } 44636: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 44638: 4ef9 0004 bf1c jmp 4bf1c ... =============================================================================== 000459f4 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 459f4: 4e56 ffc8 linkw %fp,#-56 459f8: 202e 000c movel %fp@(12),%d0 459fc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 45a00: 266e 0010 moveal %fp@(16),%a3 45a04: 282e 0014 movel %fp@(20),%d4 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 45a08: 4a8b tstl %a3 45a0a: 6700 0194 beqw 45ba0 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 45a0e: 223c 3b9a c9ff movel #999999999,%d1 45a14: b2ab 000c cmpl %a3@(12),%d1 45a18: 6500 0186 bcsw 45ba0 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 45a1c: b2ab 0004 cmpl %a3@(4),%d1 45a20: 6500 017e bcsw 45ba0 ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 45a24: 7204 moveq #4,%d1 45a26: b280 cmpl %d0,%d1 45a28: 6700 00fa beqw 45b24 45a2c: 4a80 tstl %d0 45a2e: 6600 0170 bnew 45ba0 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45a32: 260e movel %fp,%d3 45a34: 0683 ffff ffe4 addil #-28,%d3 45a3a: 204b moveal %a3,%a0 45a3c: 2243 moveal %d3,%a1 45a3e: 240e movel %fp,%d2 45a40: 0682 ffff ffe8 addil #-24,%d2 45a46: 49ee ffec lea %fp@(-20),%a4 45a4a: 4bee fff0 lea %fp@(-16),%a5 45a4e: 2298 movel %a0@+,%a1@ 45a50: 2242 moveal %d2,%a1 45a52: 2298 movel %a0@+,%a1@ 45a54: 2898 movel %a0@+,%a4@ 45a56: 2a90 movel %a0@,%a5@ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 45a58: 486e fffc pea %fp@(-4) 45a5c: 2f2e 0008 movel %fp@(8),%sp@- 45a60: 4879 0005 ff4c pea 5ff4c <_POSIX_Timer_Information> 45a66: 4eb9 0004 7e7c jsr 47e7c <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 45a6c: 4fef 000c lea %sp@(12),%sp 45a70: 2440 moveal %d0,%a2 45a72: 4aae fffc tstl %fp@(-4) 45a76: 6600 0128 bnew 45ba0 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 45a7a: 4aae ffec tstl %fp@(-20) 45a7e: 6608 bnes 45a88 45a80: 4aae fff0 tstl %fp@(-16) 45a84: 6700 0132 beqw 45bb8 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 45a88: 2f0b movel %a3,%sp@- 45a8a: 47f9 0004 95b4 lea 495b4 <_Timespec_To_ticks>,%a3 45a90: 4e93 jsr %a3@ 45a92: 2540 0062 movel %d0,%a2@(98) initial_period = _Timespec_To_ticks( &normalize.it_value ); 45a96: 2f0c movel %a4,%sp@- 45a98: 4e93 jsr %a3@ activated = _POSIX_Timer_Insert_helper( 45a9a: 2f0a movel %a2,%sp@- 45a9c: 4879 0004 5cc0 pea 45cc0 <_POSIX_Timer_TSR> 45aa2: 2f2a 0008 movel %a2@(8),%sp@- 45aa6: 2f00 movel %d0,%sp@- 45aa8: 486a 0010 pea %a2@(16) 45aac: 4eb9 0004 bf48 jsr 4bf48 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 45ab2: 4fef 001c lea %sp@(28),%sp 45ab6: 4a00 tstb %d0 45ab8: 6700 0166 beqw 45c20 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 45abc: 4a84 tstl %d4 45abe: 6700 0172 beqw 45c32 *ovalue = ptimer->timer_data; 45ac2: 220a movel %a2,%d1 45ac4: 0681 0000 0052 addil #82,%d1 45aca: 2044 moveal %d4,%a0 45acc: 2241 moveal %d1,%a1 45ace: 200a movel %a2,%d0 45ad0: 0680 0000 0056 addil #86,%d0 45ad6: 47ea 005a lea %a2@(90),%a3 45ada: 280a movel %a2,%d4 45adc: 0684 0000 005e addil #94,%d4 45ae2: 20d1 movel %a1@,%a0@+ 45ae4: 2240 moveal %d0,%a1 45ae6: 20d1 movel %a1@,%a0@+ 45ae8: 2244 moveal %d4,%a1 45aea: 20d3 movel %a3@,%a0@+ 45aec: 2091 movel %a1@,%a0@ ptimer->timer_data = normalize; 45aee: 2041 moveal %d1,%a0 45af0: 2243 moveal %d3,%a1 45af2: 2091 movel %a1@,%a0@ 45af4: 2040 moveal %d0,%a0 45af6: 2242 moveal %d2,%a1 45af8: 2091 movel %a1@,%a0@ 45afa: 2044 moveal %d4,%a0 45afc: 2694 movel %a4@,%a3@ 45afe: 2095 movel %a5@,%a0@ /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45b00: 7003 moveq #3,%d0 45b02: 1540 003c moveb %d0,%a2@(60) _TOD_Get( &ptimer->time ); 45b06: 486a 006a pea %a2@(106) 45b0a: 4eb9 0004 7470 jsr 47470 <_TOD_Get> _Thread_Enable_dispatch(); 45b10: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> return 0; 45b16: 588f addql #4,%sp ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); 45b18: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45b1a: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45b20: 4e5e unlk %fp 45b22: 4e75 rts if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b24: 260e movel %fp,%d3 45b26: 0683 ffff ffe4 addil #-28,%d3 45b2c: 204b moveal %a3,%a0 45b2e: 2243 moveal %d3,%a1 45b30: 240e movel %fp,%d2 45b32: 0682 ffff ffe8 addil #-24,%d2 45b38: 200e movel %fp,%d0 45b3a: 0680 ffff ffec addil #-20,%d0 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 45b40: 2840 moveal %d0,%a4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b42: 4bee fff0 lea %fp@(-16),%a5 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 45b46: 45ee fff4 lea %fp@(-12),%a2 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b4a: 2298 movel %a0@+,%a1@ 45b4c: 2242 moveal %d2,%a1 45b4e: 2298 movel %a0@+,%a1@ 45b50: 2898 movel %a0@+,%a4@ 45b52: 2a90 movel %a0@,%a5@ /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 45b54: 2f0a movel %a2,%sp@- 45b56: 4eb9 0004 7470 jsr 47470 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 45b5c: 2f0c movel %a4,%sp@- 45b5e: 2f0a movel %a2,%sp@- 45b60: 4eb9 0004 952c jsr 4952c <_Timespec_Greater_than> 45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 4a00 tstb %d0 45b6c: 6632 bnes 45ba0 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 45b6e: 2f0c movel %a4,%sp@- 45b70: 2f0c movel %a4,%sp@- 45b72: 2f0a movel %a2,%sp@- 45b74: 4eb9 0004 9560 jsr 49560 <_Timespec_Subtract> 45b7a: 4fef 000c lea %sp@(12),%sp 45b7e: 486e fffc pea %fp@(-4) 45b82: 2f2e 0008 movel %fp@(8),%sp@- 45b86: 4879 0005 ff4c pea 5ff4c <_POSIX_Timer_Information> 45b8c: 4eb9 0004 7e7c jsr 47e7c <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 45b92: 4fef 000c lea %sp@(12),%sp 45b96: 2440 moveal %d0,%a2 45b98: 4aae fffc tstl %fp@(-4) 45b9c: 6700 fedc beqw 45a7a #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45ba0: 4eb9 0004 f4d0 jsr 4f4d0 <__errno> 45ba6: 7216 moveq #22,%d1 45ba8: 2040 moveal %d0,%a0 45baa: 70ff moveq #-1,%d0 } 45bac: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45bb2: 2081 movel %d1,%a0@ } 45bb4: 4e5e unlk %fp 45bb6: 4e75 rts case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 45bb8: 486a 0010 pea %a2@(16) 45bbc: 4eb9 0004 9a08 jsr 49a08 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 45bc2: 588f addql #4,%sp 45bc4: 4a84 tstl %d4 45bc6: 6700 00b6 beqw 45c7e *ovalue = ptimer->timer_data; 45bca: 220a movel %a2,%d1 45bcc: 0681 0000 0052 addil #82,%d1 45bd2: 2244 moveal %d4,%a1 45bd4: 2041 moveal %d1,%a0 45bd6: 200a movel %a2,%d0 45bd8: 0680 0000 0056 addil #86,%d0 45bde: 47ea 005a lea %a2@(90),%a3 45be2: 280a movel %a2,%d4 45be4: 0684 0000 005e addil #94,%d4 45bea: 22d0 movel %a0@,%a1@+ 45bec: 2040 moveal %d0,%a0 45bee: 22d0 movel %a0@,%a1@+ 45bf0: 2044 moveal %d4,%a0 45bf2: 22d3 movel %a3@,%a1@+ 45bf4: 2290 movel %a0@,%a1@ /* The new data are set */ ptimer->timer_data = normalize; 45bf6: 2241 moveal %d1,%a1 45bf8: 2043 moveal %d3,%a0 45bfa: 2290 movel %a0@,%a1@ 45bfc: 2240 moveal %d0,%a1 45bfe: 2042 moveal %d2,%a0 45c00: 2290 movel %a0@,%a1@ 45c02: 2244 moveal %d4,%a1 45c04: 2694 movel %a4@,%a3@ 45c06: 2295 movel %a5@,%a1@ /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45c08: 7004 moveq #4,%d0 45c0a: 1540 003c moveb %d0,%a2@(60) /* Returns with success */ _Thread_Enable_dispatch(); 45c0e: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45c14: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45c16: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45c1c: 4e5e unlk %fp 45c1e: 4e75 rts ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 45c20: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45c26: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45c28: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45c2e: 4e5e unlk %fp 45c30: 4e75 rts 45c32: 220a movel %a2,%d1 45c34: 0681 0000 0052 addil #82,%d1 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 45c3a: 2041 moveal %d1,%a0 45c3c: 2243 moveal %d3,%a1 45c3e: 200a movel %a2,%d0 45c40: 0680 0000 0056 addil #86,%d0 45c46: 47ea 005a lea %a2@(90),%a3 45c4a: 280a movel %a2,%d4 45c4c: 0684 0000 005e addil #94,%d4 45c52: 2091 movel %a1@,%a0@ 45c54: 2040 moveal %d0,%a0 45c56: 2242 moveal %d2,%a1 45c58: 2091 movel %a1@,%a0@ 45c5a: 2044 moveal %d4,%a0 45c5c: 2694 movel %a4@,%a3@ 45c5e: 2095 movel %a5@,%a0@ /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45c60: 7003 moveq #3,%d0 45c62: 1540 003c moveb %d0,%a2@(60) _TOD_Get( &ptimer->time ); 45c66: 486a 006a pea %a2@(106) 45c6a: 4eb9 0004 7470 jsr 47470 <_TOD_Get> _Thread_Enable_dispatch(); 45c70: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> return 0; 45c76: 588f addql #4,%sp ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); 45c78: 4280 clrl %d0 45c7a: 6000 fe9e braw 45b1a 45c7e: 220a movel %a2,%d1 45c80: 0681 0000 0052 addil #82,%d1 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 45c86: 2241 moveal %d1,%a1 45c88: 2043 moveal %d3,%a0 45c8a: 200a movel %a2,%d0 45c8c: 0680 0000 0056 addil #86,%d0 45c92: 47ea 005a lea %a2@(90),%a3 45c96: 280a movel %a2,%d4 45c98: 0684 0000 005e addil #94,%d4 45c9e: 2290 movel %a0@,%a1@ 45ca0: 2240 moveal %d0,%a1 45ca2: 2042 moveal %d2,%a0 45ca4: 2290 movel %a0@,%a1@ 45ca6: 2244 moveal %d4,%a1 45ca8: 2694 movel %a4@,%a3@ 45caa: 2295 movel %a5@,%a1@ /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45cac: 7004 moveq #4,%d0 45cae: 1540 003c moveb %d0,%a2@(60) /* Returns with success */ _Thread_Enable_dispatch(); 45cb2: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45cb8: 4280 clrl %d0 45cba: 6000 ff5a braw 45c16 ... =============================================================================== 00045a7c : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 45a7c: 4e56 ffe8 linkw %fp,#-24 45a80: 48d7 041c moveml %d2-%d4/%a2,%sp@ 45a84: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 45a88: 4ab9 0006 116a tstl 6116a <_POSIX_signals_Ualarm_timer+0x1c> 45a8e: 6700 0086 beqw 45b16 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 45a92: 4879 0006 114e pea 6114e <_POSIX_signals_Ualarm_timer> 45a98: 4eb9 0004 96fc jsr 496fc <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 45a9e: 588f addql #4,%sp 45aa0: 7201 moveq #1,%d1 45aa2: 5580 subql #2,%d0 45aa4: b280 cmpl %d0,%d1 45aa6: 6400 0098 bccw 45b40 45aaa: 4283 clrl %d3 <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 45aac: 4a82 tstl %d2 <== NOT EXECUTED 45aae: 660c bnes 45abc <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 45ab0: 2003 movel %d3,%d0 45ab2: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 45ab8: 4e5e unlk %fp 45aba: 4e75 rts if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 45abc: 280e movel %fp,%d4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 45abe: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 45ac4: 5184 subql #8,%d4 45ac6: 45f9 0004 9214 lea 49214 <_Timespec_To_ticks>,%a2 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 45acc: 4c41 2000 remul %d1,%d0,%d2 45ad0: 4c41 2002 remul %d1,%d2,%d2 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 45ad4: 223c 0000 03e8 movel #1000,%d1 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 45ada: 2d42 fff8 movel %d2,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 45ade: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 45ae2: 2f04 movel %d4,%sp@- */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 45ae4: 2d41 fffc movel %d1,%fp@(-4) ticks = _Timespec_To_ticks( &tp ); 45ae8: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 45aea: 2f04 movel %d4,%sp@- 45aec: 4e92 jsr %a2@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45aee: 4879 0006 114e pea 6114e <_POSIX_signals_Ualarm_timer> 45af4: 4879 0006 0a00 pea 60a00 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 45afa: 23c0 0006 115a movel %d0,6115a <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45b00: 4eb9 0004 95b4 jsr 495b4 <_Watchdog_Insert> 45b06: 4fef 0010 lea %sp@(16),%sp } return remaining; } 45b0a: 2003 movel %d3,%d0 45b0c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 45b12: 4e5e unlk %fp 45b14: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45b16: 42b9 0006 1156 clrl 61156 <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 45b1c: 4283 clrl %d3 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 45b1e: 203c 0004 5b88 movel #285576,%d0 the_watchdog->id = id; 45b24: 42b9 0006 116e clrl 6116e <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 45b2a: 23c0 0006 116a movel %d0,6116a <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 45b30: 42b9 0006 1172 clrl 61172 <_POSIX_signals_Ualarm_timer+0x24> /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 45b36: 4a82 tstl %d2 45b38: 6700 ff76 beqw 45ab0 45b3c: 6000 ff7e braw 45abc * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 45b40: 2039 0006 1162 movel 61162 <_POSIX_signals_Ualarm_timer+0x14>,%d0 45b46: d0b9 0006 115a addl 6115a <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 45b4c: 486e fff8 pea %fp@(-8) 45b50: 90b9 0006 1166 subl 61166 <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 45b56: 283c 000f 4240 movel #1000000,%d4 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 45b5c: 2f00 movel %d0,%sp@- 45b5e: 4eb9 0004 9184 jsr 49184 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 45b64: 202e fff8 movel %fp@(-8),%d0 45b68: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 45b6c: 283c 0000 03e8 movel #1000,%d4 45b72: 508f addql #8,%sp 45b74: 262e fffc movel %fp@(-4),%d3 45b78: 4c44 3803 remsl %d4,%d3,%d3 45b7c: d680 addl %d0,%d3 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 45b7e: 4a82 tstl %d2 45b80: 6700 ff2e beqw 45ab0 45b84: 6000 ff36 braw 45abc <== NOT EXECUTED =============================================================================== 0004e3c8 : #include int unlink( const char *path ) { 4e3c8: 4e56 ffbc linkw %fp,#-68 4e3cc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4e3d0: 282e 0008 movel %fp@(8),%d4 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4e3d4: 2f04 movel %d4,%sp@- 4e3d6: 4eb9 0004 25a4 jsr 425a4 if ( parentpathlen == 0 ) 4e3dc: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4e3de: 2400 movel %d0,%d2 if ( parentpathlen == 0 ) 4e3e0: 6600 01c8 bnew 4e5aa rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4e3e4: 2044 moveal %d4,%a0 4e3e6: 762f moveq #47,%d3 4e3e8: 1210 moveb %a0@,%d1 4e3ea: 1001 moveb %d1,%d0 4e3ec: 49c0 extbl %d0 4e3ee: b680 cmpl %d0,%d3 4e3f0: 670e beqs 4e400 4e3f2: 163c 005c moveb #92,%d3 4e3f6: b680 cmpl %d0,%d3 4e3f8: 6706 beqs 4e400 <== NEVER TAKEN 4e3fa: 4a01 tstb %d1 4e3fc: 6600 00fc bnew 4e4fa 4e400: 2079 0005 d824 moveal 5d824 ,%a0 4e406: 45ee ffec lea %fp@(-20),%a2 4e40a: 49ee fff0 lea %fp@(-16),%a4 4e40e: 200e movel %fp,%d0 4e410: 0680 ffff fff4 addil #-12,%d0 4e416: 2640 moveal %d0,%a3 4e418: 4bee fff8 lea %fp@(-8),%a5 4e41c: 224e moveal %fp,%a1 4e41e: 24a8 0018 movel %a0@(24),%a2@ 4e422: 28a8 001c movel %a0@(28),%a4@ 4e426: 26a8 0020 movel %a0@(32),%a3@ 4e42a: 2aa8 0024 movel %a0@(36),%a5@ 4e42e: 2328 0028 movel %a0@(40),%a1@- 4e432: 4203 clrb %d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4e434: 2040 moveal %d0,%a0 name = path + parentpathlen; 4e436: 2644 moveal %d4,%a3 4e438: d7c2 addal %d2,%a3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4e43a: 240e movel %fp,%d2 4e43c: 0682 ffff ffd8 addil #-40,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4e442: 2d50 ffe0 movel %a0@,%fp@(-32) 4e446: 2d51 ffe8 movel %a1@,%fp@(-24) 4e44a: 2d54 ffdc movel %a4@,%fp@(-36) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4e44e: 49f9 0004 ffc0 lea 4ffc0 ,%a4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4e454: 2d55 ffe4 movel %a5@,%fp@(-28) 4e458: 2d52 ffd8 movel %a2@,%fp@(-40) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4e45c: 2f0b movel %a3,%sp@- 4e45e: 4e94 jsr %a4@ 4e460: 2e80 movel %d0,%sp@ 4e462: 2f0b movel %a3,%sp@- 4e464: 4eb9 0004 255c jsr 4255c 4e46a: d7c0 addal %d0,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4e46c: 2f0b movel %a3,%sp@- 4e46e: 4e94 jsr %a4@ 4e470: 4297 clrl %sp@ 4e472: 2f02 movel %d2,%sp@- 4e474: 42a7 clrl %sp@- 4e476: 2f00 movel %d0,%sp@- 4e478: 2f0b movel %a3,%sp@- 4e47a: 4eb9 0004 2616 jsr 42616 0, &loc, false ); if ( result != 0 ) { 4e480: 4fef 001c lea %sp@(28),%sp 4e484: 4a80 tstl %d0 4e486: 6600 00a2 bnew 4e52a if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4e48a: 226e ffe4 moveal %fp@(-28),%a1 4e48e: 2069 0010 moveal %a1@(16),%a0 4e492: 4a88 tstl %a0 4e494: 6700 00ce beqw 4e564 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 ) { 4e498: 2f02 movel %d2,%sp@- 4e49a: 4e90 jsr %a0@ 4e49c: 588f addql #4,%sp 4e49e: 7201 moveq #1,%d1 4e4a0: b280 cmpl %d0,%d1 4e4a2: 6700 0140 beqw 4e5e4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 4e4a6: 226e ffe4 moveal %fp@(-28),%a1 4e4aa: 2069 000c moveal %a1@(12),%a0 4e4ae: 4a88 tstl %a0 4e4b0: 6700 00b2 beqw 4e564 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4e4b4: 2f02 movel %d2,%sp@- 4e4b6: 2f0a movel %a2,%sp@- 4e4b8: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4e4ba: 206e ffe4 moveal %fp@(-28),%a0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4e4be: 2640 moveal %d0,%a3 rtems_filesystem_freenode( &loc ); 4e4c0: 508f addql #8,%sp 4e4c2: 4a88 tstl %a0 4e4c4: 670e beqs 4e4d4 <== NEVER TAKEN 4e4c6: 2068 001c moveal %a0@(28),%a0 4e4ca: 4a88 tstl %a0 4e4cc: 6706 beqs 4e4d4 <== NEVER TAKEN 4e4ce: 2f02 movel %d2,%sp@- 4e4d0: 4e90 jsr %a0@ 4e4d2: 588f addql #4,%sp if ( free_parentloc ) 4e4d4: 4a03 tstb %d3 4e4d6: 6716 beqs 4e4ee rtems_filesystem_freenode( &parentloc ); 4e4d8: 206e fff8 moveal %fp@(-8),%a0 4e4dc: 4a88 tstl %a0 4e4de: 670e beqs 4e4ee <== NEVER TAKEN 4e4e0: 2068 001c moveal %a0@(28),%a0 4e4e4: 4a88 tstl %a0 4e4e6: 6706 beqs 4e4ee <== NEVER TAKEN 4e4e8: 2f0a movel %a2,%sp@- 4e4ea: 4e90 jsr %a0@ 4e4ec: 588f addql #4,%sp return result; } 4e4ee: 200b movel %a3,%d0 4e4f0: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e4f6: 4e5e unlk %fp 4e4f8: 4e75 rts */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4e4fa: 2079 0005 d824 moveal 5d824 ,%a0 4e500: 45ee ffec lea %fp@(-20),%a2 4e504: 5888 addql #4,%a0 4e506: 49ee fff0 lea %fp@(-16),%a4 4e50a: 200e movel %fp,%d0 4e50c: 0680 ffff fff4 addil #-12,%d0 4e512: 2640 moveal %d0,%a3 4e514: 4bee fff8 lea %fp@(-8),%a5 4e518: 224e moveal %fp,%a1 4e51a: 2498 movel %a0@+,%a2@ 4e51c: 2898 movel %a0@+,%a4@ 4e51e: 2698 movel %a0@+,%a3@ 4e520: 2a98 movel %a0@+,%a5@ 4e522: 2310 movel %a0@,%a1@- 4e524: 4203 clrb %d3 4e526: 6000 ff0c braw 4e434 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 ) 4e52a: 4a03 tstb %d3 4e52c: 6610 bnes 4e53e <== ALWAYS TAKEN result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4e52e: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED return result; } 4e532: 200b movel %a3,%d0 <== NOT EXECUTED 4e534: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4e53a: 4e5e unlk %fp <== NOT EXECUTED 4e53c: 4e75 rts <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4e53e: 206e fff8 moveal %fp@(-8),%a0 4e542: 4a88 tstl %a0 4e544: 67e8 beqs 4e52e <== NEVER TAKEN 4e546: 2028 001c movel %a0@(28),%d0 4e54a: 67e2 beqs 4e52e <== NEVER TAKEN 4e54c: 2f0a movel %a2,%sp@- 4e54e: 2040 moveal %d0,%a0 4e550: 367c ffff moveaw #-1,%a3 4e554: 4e90 jsr %a0@ 4e556: 588f addql #4,%sp rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4e558: 200b movel %a3,%d0 4e55a: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e560: 4e5e unlk %fp 4e562: 4e75 rts rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 4e564: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4e568: 4a88 tstl %a0 <== NOT EXECUTED 4e56a: 6706 beqs 4e572 <== NOT EXECUTED 4e56c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4e56e: 4e90 jsr %a0@ <== NOT EXECUTED 4e570: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4e572: 4a03 tstb %d3 <== NOT EXECUTED 4e574: 6716 beqs 4e58c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4e576: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4e57a: 4a88 tstl %a0 <== NOT EXECUTED 4e57c: 670e beqs 4e58c <== NOT EXECUTED 4e57e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e582: 4a88 tstl %a0 <== NOT EXECUTED 4e584: 6706 beqs 4e58c <== NOT EXECUTED 4e586: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e588: 4e90 jsr %a0@ <== NOT EXECUTED 4e58a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4e58c: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 4e592: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 4e596: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4e598: 200b movel %a3,%d0 <== NOT EXECUTED 4e59a: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== 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 ); 4e5a0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4e5a6: 4e5e unlk %fp <== NOT EXECUTED 4e5a8: 4e75 rts <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4e5aa: 42a7 clrl %sp@- 4e5ac: 45ee ffec lea %fp@(-20),%a2 4e5b0: 2f0a movel %a2,%sp@- 4e5b2: 4878 0002 pea 2 4e5b6: 2f00 movel %d0,%sp@- 4e5b8: 2f04 movel %d4,%sp@- 4e5ba: 4eb9 0004 2720 jsr 42720 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4e5c0: 4fef 0014 lea %sp@(20),%sp 4e5c4: 4a80 tstl %d0 4e5c6: 6600 ff66 bnew 4e52e 4e5ca: 200e movel %fp,%d0 4e5cc: 49ee fff0 lea %fp@(-16),%a4 4e5d0: 0680 ffff fff4 addil #-12,%d0 4e5d6: 4bee fff8 lea %fp@(-8),%a5 4e5da: 43ee fffc lea %fp@(-4),%a1 4e5de: 7601 moveq #1,%d3 4e5e0: 6000 fe52 braw 4e434 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 ); 4e5e4: 206e ffe4 moveal %fp@(-28),%a0 4e5e8: 4a88 tstl %a0 4e5ea: 670e beqs 4e5fa <== NEVER TAKEN 4e5ec: 2068 001c moveal %a0@(28),%a0 4e5f0: 4a88 tstl %a0 4e5f2: 6706 beqs 4e5fa <== NEVER TAKEN 4e5f4: 2f02 movel %d2,%sp@- 4e5f6: 4e90 jsr %a0@ 4e5f8: 588f addql #4,%sp if ( free_parentloc ) 4e5fa: 4a03 tstb %d3 4e5fc: 6716 beqs 4e614 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4e5fe: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4e602: 4a88 tstl %a0 <== NOT EXECUTED 4e604: 670e beqs 4e614 <== NOT EXECUTED 4e606: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e60a: 4a88 tstl %a0 <== NOT EXECUTED 4e60c: 6706 beqs 4e614 <== NOT EXECUTED 4e60e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e610: 4e90 jsr %a0@ <== NOT EXECUTED 4e612: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4e614: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> 4e61a: 367c ffff moveaw #-1,%a3 4e61e: 2040 moveal %d0,%a0 4e620: 7015 moveq #21,%d0 4e622: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4e624: 200b movel %a3,%d0 4e626: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e62c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000495b0 : */ int unmount( const char *path ) { 495b0: 4e56 ffec linkw %fp,#-20 495b4: 2f0a movel %a2,%sp@- 495b6: 246e 0008 moveal %fp@(8),%a2 495ba: 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 ) ) 495bc: 240e movel %fp,%d2 495be: 0682 ffff ffec addil #-20,%d2 495c4: 2f0a movel %a2,%sp@- 495c6: 4eb9 0005 6bac jsr 56bac 495cc: 7201 moveq #1,%d1 495ce: 2e81 movel %d1,%sp@ 495d0: 2f02 movel %d2,%sp@- 495d2: 42a7 clrl %sp@- 495d4: 2f00 movel %d0,%sp@- 495d6: 2f0a movel %a2,%sp@- 495d8: 4eb9 0004 57dc jsr 457dc 495de: 4fef 0014 lea %sp@(20),%sp 495e2: 4a80 tstl %d0 495e4: 6600 00b0 bnew 49696 return -1; mt_entry = loc.mt_entry; 495e8: 246e fffc moveal %fp@(-4),%a2 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 495ec: 202e ffec movel %fp@(-20),%d0 495f0: b0aa 001c cmpl %a2@(28),%d0 495f4: 6600 00fa bnew 496f0 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 495f8: 206e fff8 moveal %fp@(-8),%a0 495fc: 4a88 tstl %a0 495fe: 670e beqs 4960e <== NEVER TAKEN 49600: 2068 001c moveal %a0@(28),%a0 49604: 4a88 tstl %a0 49606: 6706 beqs 4960e <== NEVER TAKEN 49608: 2f02 movel %d2,%sp@- 4960a: 4e90 jsr %a0@ 4960c: 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; 4960e: 206a 0014 moveal %a2@(20),%a0 49612: 4aa8 0028 tstl %a0@(40) 49616: 6700 0126 beqw 4973e fs_root_loc = &mt_entry->mt_fs_root; 4961a: 206a 0028 moveal %a2@(40),%a0 4961e: 4aa8 002c tstl %a0@(44) 49622: 6700 011a beqw 4973e * 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 ) 49626: 2079 0006 5494 moveal 65494 ,%a0 4962c: b5e8 0014 cmpal %a0@(20),%a2 49630: 6728 beqs 4965a /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 49632: 2079 0006 73b8 moveal 673b8 ,%a0 49638: b1fc 0006 73bc cmpal #422844,%a0 4963e: 6734 beqs 49674 <== NEVER TAKEN !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 49640: 202a 002c movel %a2@(44),%d0 49644: b0a8 0018 cmpl %a0@(24),%d0 49648: 6710 beqs 4965a <== NEVER TAKEN * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 4964a: 2050 moveal %a0@,%a0 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4964c: b1fc 0006 73bc cmpal #422844,%a0 49652: 6720 beqs 49674 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 49654: b0a8 0018 cmpl %a0@(24),%d0 49658: 66f0 bnes 4964a * 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 ); 4965a: 4eb9 0005 3b44 jsr 53b44 <__errno> rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 49660: 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 ); 49664: 2040 moveal %d0,%a0 49666: 7210 moveq #16,%d1 49668: 70ff moveq #-1,%d0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4966a: 246e ffe8 moveal %fp@(-24),%a2 4966e: 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 ); 49670: 2081 movel %d1,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 49672: 4e75 rts * 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 ) 49674: 2f0a movel %a2,%sp@- 49676: 4eb9 0004 5b58 jsr 45b58 4967c: 588f addql #4,%sp 4967e: 7201 moveq #1,%d1 49680: b280 cmpl %d0,%d1 49682: 67d6 beqs 4965a * 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 ) 49684: 206a 0014 moveal %a2@(20),%a0 49688: 2f0a movel %a2,%sp@- 4968a: 2068 0028 moveal %a0@(40),%a0 4968e: 4e90 jsr %a0@ 49690: 588f addql #4,%sp 49692: 4a80 tstl %d0 49694: 670e beqs 496a4 <== ALWAYS TAKEN rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 49696: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 4969a: 70ff moveq #-1,%d0 } 4969c: 246e ffe8 moveal %fp@(-24),%a2 496a0: 4e5e unlk %fp 496a2: 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){ 496a4: 206a 0028 moveal %a2@(40),%a0 496a8: 2f0a movel %a2,%sp@- 496aa: 2068 002c moveal %a0@(44),%a0 496ae: 4e90 jsr %a0@ 496b0: 588f addql #4,%sp 496b2: 4a80 tstl %d0 496b4: 666a bnes 49720 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 496b6: 2f0a movel %a2,%sp@- 496b8: 4eb9 0004 afa0 jsr 4afa0 <_Chain_Extract> /* * 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 ); 496be: 206a 0014 moveal %a2@(20),%a0 496c2: 588f addql #4,%sp 496c4: 4a88 tstl %a0 496c6: 6710 beqs 496d8 <== NEVER TAKEN 496c8: 2068 001c moveal %a0@(28),%a0 496cc: 4a88 tstl %a0 496ce: 6708 beqs 496d8 <== NEVER TAKEN 496d0: 486a 0008 pea %a2@(8) 496d4: 4e90 jsr %a0@ 496d6: 588f addql #4,%sp free( mt_entry ); 496d8: 2f0a movel %a2,%sp@- 496da: 4eb9 0004 58d0 jsr 458d0 return 0; } 496e0: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 496e4: 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 ); 496e6: 4280 clrl %d0 return 0; } 496e8: 246e ffe8 moveal %fp@(-24),%a2 496ec: 4e5e unlk %fp 496ee: 4e75 rts /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 496f0: 206e fff8 moveal %fp@(-8),%a0 496f4: 4a88 tstl %a0 496f6: 670e beqs 49706 <== NEVER TAKEN 496f8: 2068 001c moveal %a0@(28),%a0 496fc: 4a88 tstl %a0 496fe: 6706 beqs 49706 <== NEVER TAKEN 49700: 2f02 movel %d2,%sp@- 49702: 4e90 jsr %a0@ 49704: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 49706: 4eb9 0005 3b44 jsr 53b44 <__errno> 4970c: 740d moveq #13,%d2 4970e: 2040 moveal %d0,%a0 49710: 70ff moveq #-1,%d0 49712: 2082 movel %d2,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 49714: 242e ffe4 movel %fp@(-28),%d2 49718: 246e ffe8 moveal %fp@(-24),%a2 4971c: 4e5e unlk %fp 4971e: 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 ) 49720: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 49724: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49726: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED 4972a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4972c: 4e90 jsr %a0@ <== NOT EXECUTED 4972e: 588f addql #4,%sp <== NOT EXECUTED 49730: 4a80 tstl %d0 <== NOT EXECUTED 49732: 6700 ff62 beqw 49696 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 49736: 42a7 clrl %sp@- <== NOT EXECUTED 49738: 4eb9 0004 ac28 jsr 4ac28 <== 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 ); 4973e: 4eb9 0005 3b44 jsr 53b44 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 49744: 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 ); 49748: 2040 moveal %d0,%a0 <== NOT EXECUTED 4974a: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4974c: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 49750: 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 ); 49752: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ... =============================================================================== 00047180 : int utime( const char *path, const struct utimbuf *times ) { 47180: 4e56 ffe0 linkw %fp,#-32 47184: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47188: 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 ) ) 4718c: 240e movel %fp,%d2 4718e: 0682 ffff ffec addil #-20,%d2 47194: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 47196: 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 ) ) 4719a: 4eb9 0005 36fc jsr 536fc 471a0: 7201 moveq #1,%d1 471a2: 2e81 movel %d1,%sp@ 471a4: 2f02 movel %d2,%sp@- 471a6: 42a7 clrl %sp@- 471a8: 2f00 movel %d0,%sp@- 471aa: 2f03 movel %d3,%sp@- 471ac: 4eb9 0004 3814 jsr 43814 471b2: 4fef 0014 lea %sp@(20),%sp 471b6: 4a80 tstl %d0 471b8: 663e bnes 471f8 return -1; if ( !temp_loc.ops->utime_h ){ 471ba: 226e fff8 moveal %fp@(-8),%a1 471be: 2069 0030 moveal %a1@(48),%a0 471c2: 4a88 tstl %a0 471c4: 6740 beqs 47206 <== 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 ); 471c6: 2f2a 0004 movel %a2@(4),%sp@- 471ca: 2f12 movel %a2@,%sp@- 471cc: 2f02 movel %d2,%sp@- 471ce: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 471d0: 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 ); 471d4: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 471d6: 4fef 000c lea %sp@(12),%sp 471da: 4a88 tstl %a0 471dc: 670e beqs 471ec <== NEVER TAKEN 471de: 2068 001c moveal %a0@(28),%a0 471e2: 4a88 tstl %a0 471e4: 6706 beqs 471ec <== NEVER TAKEN 471e6: 2f02 movel %d2,%sp@- 471e8: 4e90 jsr %a0@ 471ea: 588f addql #4,%sp return result; } 471ec: 2003 movel %d3,%d0 471ee: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 471f4: 4e5e unlk %fp 471f6: 4e75 rts ) { rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 471f8: 76ff moveq #-1,%d3 result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 471fa: 2003 movel %d3,%d0 471fc: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 47202: 4e5e unlk %fp 47204: 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 ); 47206: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4720a: 4a88 tstl %a0 <== NOT EXECUTED 4720c: 6706 beqs 47214 <== NOT EXECUTED 4720e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47210: 4e90 jsr %a0@ <== NOT EXECUTED 47212: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 47214: 4eb9 0005 1618 jsr 51618 <__errno> <== NOT EXECUTED 4721a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4721c: 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; } 4721e: 2003 movel %d3,%d0 <== NOT EXECUTED 47220: 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 ); 47226: 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; } 4722c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045238 : */ void vprintk( const char *fmt, va_list ap ) { 45238: 4e56 ffc0 linkw %fp,#-64 4523c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45240: 246e 0008 moveal %fp@(8),%a2 for (; *fmt != '\0'; fmt++) { 45244: 1012 moveb %a2@,%d0 */ void vprintk( const char *fmt, va_list ap ) { 45246: 2c2e 000c movel %fp@(12),%d6 for (; *fmt != '\0'; fmt++) { 4524a: 4a00 tstb %d0 4524c: 6700 0130 beqw 4537e toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45250: 49ee ffec lea %fp@(-20),%a4 45254: 4bf9 0005 c67f lea 5c67f ,%a5 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 4525a: 49c0 extbl %d0 4525c: 7225 moveq #37,%d1 4525e: b280 cmpl %d0,%d1 45260: 6724 beqs 45286 BSP_output_char(*fmt); 45262: 2f00 movel %d0,%sp@- 45264: 2079 0005 d80c moveal 5d80c ,%a0 4526a: 2d46 ffe8 movel %d6,%fp@(-24) 4526e: 4e90 jsr %a0@ continue; 45270: 588f addql #4,%sp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45272: 528a addql #1,%a2 45274: 1012 moveb %a2@,%d0 45276: 6700 0106 beqw 4537e 4527a: 2c2e ffe8 movel %fp@(-24),%d6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 4527e: 49c0 extbl %d0 45280: 7225 moveq #37,%d1 45282: b280 cmpl %d0,%d1 45284: 66dc bnes 45262 BSP_output_char(*fmt); continue; } fmt++; 45286: 528a addql #1,%a2 if (*fmt == '0' ) { 45288: 7430 moveq #48,%d2 4528a: 1012 moveb %a2@,%d0 4528c: 1200 moveb %d0,%d1 4528e: 49c1 extbl %d1 45290: b481 cmpl %d1,%d2 45292: 6700 01f8 beqw 4548c lead = '0'; fmt++; } if (*fmt == '-' ) { 45296: 762d moveq #45,%d3 if (*fmt != '%') { BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { 45298: 7e20 moveq #32,%d7 lead = '0'; fmt++; } if (*fmt == '-' ) { 4529a: b681 cmpl %d1,%d3 4529c: 6700 0200 beqw 4549e minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452a0: 0680 ffff ffd0 addil #-48,%d0 452a6: 7a09 moveq #9,%d5 452a8: 0280 0000 00ff andil #255,%d0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 452ae: 4204 clrb %d4 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452b0: ba80 cmpl %d0,%d5 452b2: 6500 0208 bcsw 454bc 452b6: 4282 clrl %d2 width *= 10; width += ((unsigned) *fmt - '0'); 452b8: 2602 movel %d2,%d3 fmt++; 452ba: 528a addql #1,%a2 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452bc: 7a09 moveq #9,%d5 width *= 10; width += ((unsigned) *fmt - '0'); 452be: e78b lsll #3,%d3 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452c0: 1012 moveb %a2@,%d0 width *= 10; width += ((unsigned) *fmt - '0'); 452c2: 2043 moveal %d3,%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452c4: 2600 movel %d0,%d3 452c6: 0683 ffff ffd0 addil #-48,%d3 width *= 10; width += ((unsigned) *fmt - '0'); 452cc: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452d0: 0283 0000 00ff andil #255,%d3 width *= 10; width += ((unsigned) *fmt - '0'); 452d6: 41f0 18d0 lea %a0@(ffffffd0,%d1:l),%a0 452da: 1200 moveb %d0,%d1 452dc: 2408 movel %a0,%d2 452de: 49c1 extbl %d1 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452e0: ba83 cmpl %d3,%d5 452e2: 64d4 bccs 452b8 452e4: 1200 moveb %d0,%d1 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 452e6: 706c moveq #108,%d0 452e8: 49c1 extbl %d1 452ea: b081 cmpl %d1,%d0 452ec: 6700 009a beqw 45388 lflag = true; c = *++fmt; } if ( c == 'c' ) { 452f0: 7663 moveq #99,%d3 452f2: b681 cmpl %d1,%d3 452f4: 6700 00a0 beqw 45396 /* 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' ) { 452f8: 7673 moveq #115,%d3 452fa: b681 cmpl %d1,%d3 452fc: 6700 01cc beqw 454ca continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 45300: 766f moveq #111,%d3 45302: b681 cmpl %d1,%d3 45304: 6700 017a beqw 45480 45308: 7a4f moveq #79,%d5 4530a: ba81 cmpl %d1,%d5 4530c: 6700 0172 beqw 45480 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 45310: 163c 0069 moveb #105,%d3 45314: b681 cmpl %d1,%d3 45316: 6700 009a beqw 453b2 4531a: 1a3c 0049 moveb #73,%d5 4531e: ba81 cmpl %d1,%d5 45320: 6700 0090 beqw 453b2 45324: 163c 0064 moveb #100,%d3 45328: b681 cmpl %d1,%d3 4532a: 6700 0086 beqw 453b2 4532e: 1a3c 0044 moveb #68,%d5 45332: ba81 cmpl %d1,%d5 45334: 677c beqs 453b2 <== NEVER TAKEN c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 45336: 163c 0075 moveb #117,%d3 4533a: b681 cmpl %d1,%d3 4533c: 6700 0270 beqw 455ae 45340: 1a3c 0055 moveb #85,%d5 45344: ba81 cmpl %d1,%d5 45346: 6700 0266 beqw 455ae base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 4534a: 163c 0078 moveb #120,%d3 4534e: b681 cmpl %d1,%d3 45350: 6700 027a beqw 455cc 45354: 1a3c 0058 moveb #88,%d5 45358: ba81 cmpl %d1,%d5 4535a: 6700 0270 beqw 455cc base = 16; sign = false; } else if ( c == 'p' ) { 4535e: 7070 moveq #112,%d0 45360: b081 cmpl %d1,%d0 45362: 6700 0274 beqw 455d8 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 45366: 2f01 movel %d1,%sp@- 45368: 2079 0005 d80c moveal 5d80c ,%a0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 4536e: 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); 45370: 2d46 ffe8 movel %d6,%fp@(-24) 45374: 4e90 jsr %a0@ continue; 45376: 588f addql #4,%sp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45378: 1012 moveb %a2@,%d0 4537a: 6600 fefe bnew 4527a sign, width, lead ); } } 4537e: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 45384: 4e5e unlk %fp 45386: 4e75 rts fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; 45388: 528a addql #1,%a2 } if ( c == 'c' ) { 4538a: 7663 moveq #99,%d3 4538c: 1212 moveb %a2@,%d1 4538e: 49c1 extbl %d1 45390: b681 cmpl %d1,%d3 45392: 6600 ff64 bnew 452f8 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); 45396: 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); 45398: 5886 addql #4,%d6 BSP_output_char(chr); 4539a: 2010 movel %a0@,%d0 4539c: 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); 4539e: 2d46 ffe8 movel %d6,%fp@(-24) BSP_output_char(chr); 453a2: 2079 0005 d80c moveal 5d80c ,%a0 453a8: 2f00 movel %d0,%sp@- 453aa: 4e90 jsr %a0@ continue; 453ac: 588f addql #4,%sp 453ae: 6000 fec2 braw 45272 } else { BSP_output_char(c); continue; } printNum( 453b2: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 453b4: 7a0a moveq #10,%d5 } printNum( 453b6: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 453b8: 7201 moveq #1,%d1 } printNum( 453ba: 2046 moveal %d6,%a0 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 453bc: 5886 addql #4,%d6 } else { BSP_output_char(c); continue; } printNum( 453be: 2810 movel %a0@,%d4 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 453c0: 2d46 ffe8 movel %d6,%fp@(-24) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 453c4: 4a01 tstb %d1 453c6: 6706 beqs 453ce 453c8: 4a84 tstl %d4 453ca: 6d00 01ae bltw 4557a } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453ce: 2004 movel %d4,%d0 453d0: 4c45 0000 remul %d5,%d0,%d0 453d4: 6700 01c6 beqw 4559c 453d8: 2600 movel %d0,%d3 453da: 4281 clrl %d1 453dc: 3045 moveaw %d5,%a0 453de: 4c45 3003 remul %d5,%d3,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 453e2: 3e08 movew %a0,%d7 453e4: cfc0 mulsw %d0,%d7 453e6: 9887 subl %d7,%d4 453e8: 2e04 movel %d4,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453ea: 2800 movel %d0,%d4 toPrint[count++] = (char) (unsigned_num - (n * base)); 453ec: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 453f0: 5281 addql #1,%d1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453f2: 4a83 tstl %d3 453f4: 671c beqs 45412 453f6: 2003 movel %d3,%d0 453f8: 2600 movel %d0,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 453fa: 3e08 movew %a0,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453fc: 4c45 3003 remul %d5,%d3,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 45400: cfc0 mulsw %d0,%d7 45402: 9887 subl %d7,%d4 45404: 2e04 movel %d4,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45406: 2800 movel %d0,%d4 toPrint[count++] = (char) (unsigned_num - (n * base)); 45408: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 4540c: 5281 addql #1,%d1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 4540e: 4a83 tstl %d3 45410: 66e4 bnes 453f6 45412: 2800 movel %d0,%d4 45414: 2601 movel %d1,%d3 45416: 5283 addql #1,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 45418: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l) for (n=maxwidth ; n > count; n-- ) 4541c: b682 cmpl %d2,%d3 4541e: 6412 bccs 45432 BSP_output_char(lead); 45420: 2f0b movel %a3,%sp@- 45422: 2079 0005 d80c moveal 5d80c ,%a0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 45428: 5382 subql #1,%d2 BSP_output_char(lead); 4542a: 4e90 jsr %a0@ toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 4542c: 588f addql #4,%sp 4542e: b682 cmpl %d2,%d3 45430: 65ee bcss 45420 BSP_output_char(lead); for (n = 0; n < count; n++) { 45432: 4a83 tstl %d3 45434: 6700 fe3c beqw 45272 45438: 4282 clrl %d2 4543a: 47f4 38ff lea %a4@(ffffffff,%d3:l),%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4543e: 2079 0005 d80c moveal 5d80c ,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45444: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45446: 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++) { 45448: 538b subql #1,%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4544a: 49c0 extbl %d0 4544c: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45450: 49c0 extbl %d0 45452: 2f00 movel %d0,%sp@- 45454: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45456: 588f addql #4,%sp 45458: b682 cmpl %d2,%d3 4545a: 6300 fe16 blsw 45272 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4545e: 2079 0005 d80c moveal 5d80c ,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45464: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45466: 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++) { 45468: 538b subql #1,%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4546a: 49c0 extbl %d0 4546c: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45470: 49c0 extbl %d0 45472: 2f00 movel %d0,%sp@- 45474: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45476: 588f addql #4,%sp 45478: b682 cmpl %d2,%d3 4547a: 62c2 bhis 4543e 4547c: 6000 fdf4 braw 45272 } else { BSP_output_char(c); continue; } printNum( 45480: 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; 45482: 7a08 moveq #8,%d5 <== NOT EXECUTED } printNum( 45484: 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; 45486: 4201 clrb %d1 <== NOT EXECUTED 45488: 6000 ff30 braw 453ba <== NOT EXECUTED continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 4548c: 528a addql #1,%a2 } if (*fmt == '-' ) { 4548e: 762d moveq #45,%d3 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 45490: 1012 moveb %a2@,%d0 45492: 7e30 moveq #48,%d7 45494: 1200 moveb %d0,%d1 45496: 49c1 extbl %d1 } if (*fmt == '-' ) { 45498: b681 cmpl %d1,%d3 4549a: 6600 fe04 bnew 452a0 minus = true; fmt++; 4549e: 528a addql #1,%a2 } while (*fmt >= '0' && *fmt <= '9' ) { 454a0: 7a09 moveq #9,%d5 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; 454a2: 1012 moveb %a2@,%d0 454a4: 7801 moveq #1,%d4 454a6: 1200 moveb %d0,%d1 } while (*fmt >= '0' && *fmt <= '9' ) { 454a8: 0680 ffff ffd0 addil #-48,%d0 454ae: 0280 0000 00ff andil #255,%d0 454b4: 49c1 extbl %d1 454b6: ba80 cmpl %d0,%d5 454b8: 6400 fdfc bccw 452b6 454bc: 4282 clrl %d2 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 454be: 706c moveq #108,%d0 454c0: b081 cmpl %d1,%d0 454c2: 6600 fe2c bnew 452f0 454c6: 6000 fec0 braw 45388 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 454ca: 2046 moveal %d6,%a0 454cc: 5886 addql #4,%d6 454ce: 2650 moveal %a0@,%a3 454d0: 2d46 ffe8 movel %d6,%fp@(-24) if ( str == NULL ) { 454d4: 4a8b tstl %a3 454d6: 6700 00e2 beqw 455ba str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 454da: 4a13 tstb %a3@ 454dc: 6700 00e8 beqw 455c6 454e0: 4283 clrl %d3 454e2: 5283 addql #1,%d3 454e4: 4a33 3800 tstb %a3@(00000000,%d3:l) 454e8: 66f8 bnes 454e2 ; /* leading spaces */ if ( !minus ) 454ea: 4a04 tstb %d4 454ec: 661a bnes 45508 for ( i=len ; i <== ALWAYS TAKEN 454f2: 2a03 movel %d3,%d5 <== NOT EXECUTED BSP_output_char(' '); 454f4: 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 45500: 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) { 45508: 4a82 tstl %d2 4550a: 6606 bnes 45512 width = len; } /* output the string */ for ( i=0 ; i 45510: 2403 movel %d3,%d2 45512: 1013 moveb %a3@,%d0 45514: 672a beqs 45540 <== NEVER TAKEN BSP_output_char(*str); 45516: 49c0 extbl %d0 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i,%a0 45522: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); 4552c: 49c0 extbl %d0 4552e: 2079 0005 d80c moveal 5d80c ,%a0 45534: 2f00 movel %d0,%sp@- 45536: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 45540: 4a04 tstb %d4 45542: 6700 fd2e beqw 45272 for ( i=len ; i BSP_output_char(' '); 4554c: 4878 0020 pea 20 for ( i=0 ; i,%a0 45558: 4e90 jsr %a0@ for ( i=0 ; i BSP_output_char(' '); 45562: 4878 0020 pea 20 for ( i=0 ; i,%a0 4556e: 4e90 jsr %a0@ for ( i=0 ; i 45576: 6000 fcfa braw 45272 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 4557a: 4878 002d pea 2d <== NOT EXECUTED unsigned_num = (unsigned long) -num; 4557e: 4484 negl %d4 <== NOT EXECUTED unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 45580: 2079 0005 d80c moveal 5d80c ,%a0 <== NOT EXECUTED 45586: 4e90 jsr %a0@ <== NOT EXECUTED unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 45588: 588f addql #4,%sp <== NOT EXECUTED 4558a: 4a82 tstl %d2 <== NOT EXECUTED 4558c: 6700 fe40 beqw 453ce <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45590: 2004 movel %d4,%d0 <== NOT EXECUTED char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 45592: 5382 subql #1,%d2 <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45594: 4c45 0000 remul %d5,%d0,%d0 <== NOT EXECUTED 45598: 6600 fe3e bnew 453d8 <== NOT EXECUTED 4559c: 4281 clrl %d1 4559e: 7601 moveq #1,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 455a0: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l) for (n=maxwidth ; n > count; n-- ) 455a4: b682 cmpl %d2,%d3 455a6: 6500 fe78 bcsw 45420 455aa: 6000 fe86 braw 45432 } else { BSP_output_char(c); continue; } printNum( 455ae: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455b0: 7a0a moveq #10,%d5 } printNum( 455b2: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455b4: 4201 clrb %d1 455b6: 6000 fe02 braw 453ba unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 455ba: 47f9 0005 c67e lea 5c67e ,%a3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 455c0: 4a13 tstb %a3@ 455c2: 6600 ff1c bnew 454e0 455c6: 4283 clrl %d3 455c8: 6000 ff20 braw 454ea } else { BSP_output_char(c); continue; } printNum( 455cc: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455ce: 7a10 moveq #16,%d5 } printNum( 455d0: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455d2: 4201 clrb %d1 455d4: 6000 fde4 braw 453ba } printNum( 455d8: 49c7 extbl %d7 455da: 2647 moveal %d7,%a3 455dc: 7a10 moveq #16,%d5 455de: 4201 clrb %d1 455e0: 6000 fdd8 braw 453ba =============================================================================== 0005b900 : ssize_t write( int fd, const void *buffer, size_t count ) { 5b900: 4e56 fff4 linkw %fp,#-12 5b904: 202e 0008 movel %fp@(8),%d0 5b908: 222e 000c movel %fp@(12),%d1 5b90c: 206e 0010 moveal %fp@(16),%a0 5b910: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5b914: b0b9 0005 d714 cmpl 5d714 ,%d0 5b91a: 6466 bccs 5b982 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5b91c: 2479 0005 ee18 moveal 5ee18 ,%a2 5b922: ed88 lsll #6,%d0 5b924: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5b926: 202a 0014 movel %a2@(20),%d0 5b92a: 0800 0008 btst #8,%d0 5b92e: 6752 beqs 5b982 <== NEVER TAKEN rtems_libio_check_buffer( buffer ); 5b930: 4a81 tstl %d1 5b932: 6766 beqs 5b99a <== NEVER TAKEN rtems_libio_check_count( count ); 5b934: 4a88 tstl %a0 5b936: 673e beqs 5b976 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5b938: 44c0 movew %d0,%ccr 5b93a: 665e bnes 5b99a <== NEVER TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 5b93c: 226a 003c moveal %a2@(60),%a1 5b940: 2269 000c moveal %a1@(12),%a1 5b944: 4a89 tstl %a1 5b946: 676a beqs 5b9b2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 5b948: 2f08 movel %a0,%sp@- 5b94a: 2f01 movel %d1,%sp@- 5b94c: 2f0a movel %a2,%sp@- 5b94e: 4e91 jsr %a1@ if ( rc > 0 ) 5b950: 4fef 000c lea %sp@(12),%sp 5b954: 4a80 tstl %d0 5b956: 6f14 bles 5b96c <== NEVER TAKEN iop->offset += rc; 5b958: 2400 movel %d0,%d2 5b95a: 5bc1 smi %d1 5b95c: 49c1 extbl %d1 5b95e: d5aa 0010 addl %d2,%a2@(16) 5b962: 262a 000c movel %a2@(12),%d3 5b966: d781 addxl %d1,%d3 5b968: 2543 000c movel %d3,%a2@(12) return rc; } 5b96c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b972: 4e5e unlk %fp 5b974: 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 ); 5b976: 4280 clrl %d0 if ( rc > 0 ) iop->offset += rc; return rc; } 5b978: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b97e: 4e5e unlk %fp 5b980: 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 ); 5b982: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 5b988: 7409 moveq #9,%d2 <== NOT EXECUTED 5b98a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b98c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5b98e: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b990: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5b996: 4e5e unlk %fp <== NOT EXECUTED 5b998: 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 ); 5b99a: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 5b9a0: 7216 moveq #22,%d1 <== NOT EXECUTED 5b9a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b9a4: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b9a6: 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 ); 5b9ac: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b9ae: 4e5e unlk %fp <== NOT EXECUTED 5b9b0: 4e75 rts <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b9b2: 4eb9 0004 ebf4 jsr 4ebf4 <__errno> <== NOT EXECUTED 5b9b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b9ba: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b9bc: 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 ); 5b9c2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b9c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046f3c : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 46f3c: 4e56 ffe4 linkw %fp,#-28 46f40: 202e 0008 movel %fp@(8),%d0 46f44: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 46f48: 246e 000c moveal %fp@(12),%a2 46f4c: 242e 0010 movel %fp@(16),%d2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 46f50: b0b9 0006 13b4 cmpl 613b4 ,%d0 46f56: 6400 00f0 bccw 47048 iop = rtems_libio_iop( fd ); 46f5a: 2679 0006 328c moveal 6328c ,%a3 46f60: ed88 lsll #6,%d0 46f62: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 46f64: 202b 0014 movel %a3@(20),%d0 46f68: 0800 0008 btst #8,%d0 46f6c: 6700 00da beqw 47048 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 46f70: 44c0 movew %d0,%ccr 46f72: 666e bnes 46fe2 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 46f74: 4a8a tstl %a2 46f76: 676a beqs 46fe2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 46f78: 4a82 tstl %d2 46f7a: 6f66 bles 46fe2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 46f7c: 0c82 0000 0400 cmpil #1024,%d2 46f82: 6e5e bgts 46fe2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 46f84: 206b 003c moveal %a3@(60),%a0 46f88: 4aa8 000c tstl %a0@(12) 46f8c: 6700 00d4 beqw 47062 rtems_set_errno_and_return_minus_one( ENOTSUP ); 46f90: 204a moveal %a2,%a0 46f92: 93c9 subal %a1,%a1 46f94: 4281 clrl %d1 46f96: 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 ) 46f98: 4a90 tstl %a0@ 46f9a: 6746 beqs 46fe2 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 ) 46f9c: 2028 0004 movel %a0@(4),%d0 46fa0: 57c4 seq %d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 46fa2: 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++ ) { 46fa4: 5289 addql #1,%a1 46fa6: 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 ) 46fa8: c883 andl %d3,%d4 46faa: 1604 moveb %d4,%d3 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46fac: b081 cmpl %d1,%d0 46fae: 6d32 blts 46fe2 * 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++ ) { 46fb0: 2200 movel %d0,%d1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46fb2: 0c80 0000 7fff cmpil #32767,%d0 46fb8: 6e28 bgts 46fe2 <== 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++ ) { 46fba: b3c2 cmpal %d2,%a1 46fbc: 6dda blts 46f98 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46fbe: 4a04 tstb %d4 46fc0: 663a bnes 46ffc 46fc2: 588a addql #4,%a2 46fc4: 4283 clrl %d3 46fc6: 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 ) 46fc8: 2012 movel %a2@,%d0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46fca: 5283 addql #1,%d3 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46fcc: 4a80 tstl %d0 46fce: 663a bnes 4700a } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46fd0: 508a addql #8,%a2 <== NOT EXECUTED 46fd2: b682 cmpl %d2,%d3 <== NOT EXECUTED 46fd4: 6df2 blts 46fc8 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 46fd6: 2004 movel %d4,%d0 46fd8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46fde: 4e5e unlk %fp 46fe0: 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 ); 46fe2: 4eb9 0005 115c jsr 5115c <__errno> 46fe8: 78ff moveq #-1,%d4 46fea: 2040 moveal %d0,%a0 46fec: 7016 moveq #22,%d0 46fee: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 46ff0: 2004 movel %d4,%d0 46ff2: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46ff8: 4e5e unlk %fp 46ffa: 4e75 rts } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46ffc: 4284 clrl %d4 if (bytes != iov[ v ].iov_len) break; } return total; } 46ffe: 2004 movel %d4,%d0 47000: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 47006: 4e5e unlk %fp 47008: 4e75 rts 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 ); 4700a: 206b 003c moveal %a3@(60),%a0 4700e: 2f00 movel %d0,%sp@- 47010: 2f2a fffc movel %a2@(-4),%sp@- 47014: 2f0b movel %a3,%sp@- 47016: 2068 000c moveal %a0@(12),%a0 4701a: 4e90 jsr %a0@ if ( bytes < 0 ) 4701c: 4fef 000c lea %sp@(12),%sp 47020: 4a80 tstl %d0 47022: 6d5a blts 4707e <== NEVER TAKEN return -1; if ( bytes > 0 ) { 47024: 6716 beqs 4703c <== NEVER TAKEN iop->offset += bytes; total += bytes; 47026: d880 addl %d0,%d4 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 47028: 2c00 movel %d0,%d6 4702a: 5bc5 smi %d5 4702c: 49c5 extbl %d5 4702e: ddab 0010 addl %d6,%a3@(16) 47032: 222b 000c movel %a3@(12),%d1 47036: d385 addxl %d5,%d1 47038: 2741 000c movel %d1,%a3@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 4703c: b092 cmpl %a2@,%d0 4703e: 6696 bnes 46fd6 <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 47040: 508a addql #8,%a2 47042: b682 cmpl %d2,%d3 47044: 6d82 blts 46fc8 <== NEVER TAKEN 47046: 608e bras 46fd6 ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 47048: 4eb9 0005 115c jsr 5115c <__errno> 4704e: 78ff moveq #-1,%d4 47050: 7209 moveq #9,%d1 47052: 2040 moveal %d0,%a0 if (bytes != iov[ v ].iov_len) break; } return total; } 47054: 2004 movel %d4,%d0 47056: 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 ); 4705c: 2081 movel %d1,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 4705e: 4e5e unlk %fp 47060: 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 ); 47062: 4eb9 0005 115c jsr 5115c <__errno> <== NOT EXECUTED 47068: 78ff moveq #-1,%d4 <== NOT EXECUTED 4706a: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 4706c: 2004 movel %d4,%d0 <== NOT EXECUTED 4706e: 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 ); 47074: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 4707a: 4e5e unlk %fp <== NOT EXECUTED 4707c: 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 ) 4707e: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47080: 2004 movel %d4,%d0 <== NOT EXECUTED 47082: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 47088: 4e5e unlk %fp <== NOT EXECUTED