00049310 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 49310: 7007 moveq #7,%d0 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 49312: 4e56 0000 linkw %fp,#0 49316: 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; 4931a: 2268 0010 moveal %a0@(16),%a1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4931e: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 49320: 2469 0034 moveal %a1@(52),%a2 switch( node->type ) { 49324: 2250 moveal %a0@,%a1 49326: b0a9 0048 cmpl %a1@(72),%d0 4932a: 6526 bcss 49352 <== ALWAYS TAKEN 4932c: 2029 0048 movel %a1@(72),%d0 49330: d080 addl %d0,%d0 49332: 303b 0808 movew %pc@(4933c ,%d0:l),%d0 49336: 48c0 extl %d0 49338: 4efb 0802 jmp %pc@(4933c ,%d0:l) 4933c: 0016 026 <== NOT EXECUTED 4933e: 0010 020 <== NOT EXECUTED 49340: 0050 0120 <== NOT EXECUTED 49342: 002c 054 <== NOT EXECUTED 49344: 002c 054 <== NOT EXECUTED 49346: 001e 036 <== NOT EXECUTED 49348: 001e 036 <== NOT EXECUTED 4934a: 003e 076 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 4934c: 216a 0008 0008 movel %a2@(8),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49352: 245f moveal %sp@+,%a2 49354: 4280 clrl %d0 49356: 4e5e unlk %fp 49358: 4e75 rts 4935a: 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; 4935c: 216a 0004 0008 movel %a2@(4),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49362: 245f moveal %sp@+,%a2 49364: 4e5e unlk %fp 49366: 4e75 rts 49368: 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; 4936a: 203c 0005 b564 movel #374116,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49370: 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; 49372: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49376: 4280 clrl %d0 49378: 4e75 rts 4937a: 245f moveal %sp@+,%a2 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 4937c: 203c 0005 b488 movel #373896,%d0 break; } return 0; } 49382: 4e5e unlk %fp break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 49384: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 49388: 4280 clrl %d0 4938a: 4e75 rts 4938c: 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; 4938e: 203c 0005 b52c movel #374060,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49394: 4e5e unlk %fp switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 49396: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4939a: 4280 clrl %d0 4939c: 4e75 rts 0004c700 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4c700: 4e56 fff8 linkw %fp,#-8 4c704: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4c706: 4878 0060 pea 60 4c70a: 4878 0001 pea 1 4c70e: 4eb9 0004 a430 jsr 4a430 if ( !node ) 4c714: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4c716: 2440 moveal %d0,%a2 if ( !node ) 4c718: 4a80 tstl %d0 4c71a: 674e beqs 4c76a <== ALWAYS TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4c71c: 4878 0020 pea 20 4c720: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4c724: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 4c72a: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4c72e: 7001 moveq #1,%d0 4c730: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4c734: 4eb9 0004 ebec jsr 4ebec /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 4c73a: 256e 0010 002e movel %fp@(16),%a2@(46) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4c740: 42a7 clrl %sp@- 4c742: 486e fff8 pea %fp@(-8) node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 4c746: 4240 clrw %d0 4c748: 3540 0038 movew %d0,%a2@(56) node->st_gid = 0; 4c74c: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4c750: 4eb9 0004 a694 jsr 4a694 node->stat_atime = (time_t) tv.tv_sec; 4c756: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 4c75a: 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; 4c75e: 2540 0044 movel %d0,%a2@(68) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4c762: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 4c766: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; return node; } 4c76a: 200a movel %a2,%d0 4c76c: 246e fff4 moveal %fp@(-12),%a2 4c770: 4e5e unlk %fp 4c772: 4e75 rts 0004c7ae : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4c7ae: 4e56 fffc linkw %fp,#-4 4c7b2: 2f0a movel %a2,%sp@- 4c7b4: 246e 0008 moveal %fp@(8),%a2 4c7b8: 2f02 movel %d2,%sp@- 4c7ba: 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 ) 4c7be: 4a8a tstl %a2 4c7c0: 660e bnes 4c7d0 <== NEVER TAKEN 4c7c2: 4280 clrl %d0 <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4c7c4: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4c7c8: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4c7cc: 4e5e unlk %fp <== NOT EXECUTED 4c7ce: 4e75 rts <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4c7d0: 2079 0005 c284 moveal 5c284 ,%a0 4c7d6: 2028 002c movel %a0@(44),%d0 4c7da: 4680 notl %d0 4c7dc: c0ae 0014 andl %fp@(20),%d0 4c7e0: 2f00 movel %d0,%sp@- 4c7e2: 2f2e 0010 movel %fp@(16),%sp@- 4c7e6: 2f02 movel %d2,%sp@- 4c7e8: 4eb9 0004 c700 jsr 4c700 if ( !node ) 4c7ee: 4fef 000c lea %sp@(12),%sp 4c7f2: 4a80 tstl %d0 4c7f4: 67ce beqs 4c7c4 <== ALWAYS TAKEN return NULL; /* * Set the type specific information */ switch (type) { 4c7f6: 7207 moveq #7,%d1 4c7f8: b282 cmpl %d2,%d1 4c7fa: 641c bccs 4c818 <== NEVER TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4c7fc: 4879 0005 b71a pea 5b71a <== NOT EXECUTED 4c802: 4879 0005 b765 pea 5b765 <__FUNCTION__.5815> <== NOT EXECUTED 4c808: 4878 005c pea 5c <== NOT EXECUTED 4c80c: 4879 0005 b71c pea 5b71c <== NOT EXECUTED 4c812: 4eb9 0004 a330 jsr 4a330 <__assert_func> <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4c818: 323b 2a08 movew %pc@(4c822 ,%d2:l:2),%d1 4c81c: 48c1 extl %d1 4c81e: 4efb 1802 jmp %pc@(4c822 ,%d1:l) 4c822: ffda 0177732 <== NOT EXECUTED 4c824: 0134 00f0 btst %d0,%a4@(fffffff0,%d0:w) <== NOT EXECUTED 4c828: 0010 020 <== NOT EXECUTED 4c82a: 0010 020 <== NOT EXECUTED 4c82c: 0068 0150 <== NOT EXECUTED 4c82e: 0056 0126 <== NOT EXECUTED 4c830: 00b6 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; 4c836: 2040 moveal %d0,%a0 4c838: 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; 4c83c: 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; 4c83e: 206a 0010 moveal %a2@(16),%a0 4c842: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c846: 2210 movel %a0@,%d1 4c848: 5281 addql #1,%d1 4c84a: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c84c: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c84e: 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; 4c852: 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 ); 4c856: 2f00 movel %d0,%sp@- 4c858: 4868 004c pea %a0@(76) 4c85c: 2d40 fffc movel %d0,%fp@(-4) 4c860: 4eb9 0004 6748 jsr 46748 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c866: 202e fffc movel %fp@(-4),%d0 4c86a: 508f addql #8,%sp } 4c86c: 242e fff4 movel %fp@(-12),%d2 4c870: 246e fff8 moveal %fp@(-8),%a2 4c874: 4e5e unlk %fp 4c876: 4e75 rts node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4c878: 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; 4c87a: 4281 clrl %d1 <== NOT EXECUTED 4c87c: 4282 clrl %d2 <== NOT EXECUTED node->info.linearfile.direct = 0; 4c87e: 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; 4c882: 2141 004c movel %d1,%a0@(76) <== NOT EXECUTED 4c886: 2142 0050 movel %d2,%a0@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4c88a: 2040 moveal %d0,%a0 node->info.file.indirect = 0; 4c88c: 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; 4c88e: 4281 clrl %d1 4c890: 4282 clrl %d2 node->info.file.indirect = 0; 4c892: 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; 4c896: 2141 004c movel %d1,%a0@(76) 4c89a: 2142 0050 movel %d2,%a0@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4c89e: 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; 4c8a2: 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; 4c8a4: 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; 4c8a8: 206a 0010 moveal %a2@(16),%a0 4c8ac: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8b0: 2210 movel %a0@,%d1 4c8b2: 5281 addql #1,%d1 4c8b4: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c8b6: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8b8: 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; 4c8bc: 2348 0008 movel %a0,%a1@(8) 4c8c0: 2f00 movel %d0,%sp@- 4c8c2: 4868 004c pea %a0@(76) 4c8c6: 2d40 fffc movel %d0,%fp@(-4) 4c8ca: 4eb9 0004 6748 jsr 46748 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c8d0: 202e fffc movel %fp@(-4),%d0 4c8d4: 508f addql #8,%sp 4c8d6: 6094 bras 4c86c <== ALWAYS TAKEN node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; case IMFS_FIFO: node->info.fifo.pipe = NULL; 4c8d8: 2240 moveal %d0,%a1 4c8da: 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; 4c8de: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8e2: 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; 4c8e4: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8e8: 2210 movel %a0@,%d1 4c8ea: 5281 addql #1,%d1 4c8ec: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c8ee: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8f0: 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; 4c8f4: 2348 0008 movel %a0,%a1@(8) 4c8f8: 2f00 movel %d0,%sp@- 4c8fa: 4868 004c pea %a0@(76) 4c8fe: 2d40 fffc movel %d0,%fp@(-4) 4c902: 4eb9 0004 6748 jsr 46748 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c908: 202e fffc movel %fp@(-4),%d0 4c90c: 508f addql #8,%sp 4c90e: 6000 ff5c braw 4c86c <== ALWAYS TAKEN case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4c912: 226e 0018 moveal %fp@(24),%a1 4c916: 2040 moveal %d0,%a0 4c918: 2151 004c movel %a1@,%a0@(76) node->info.device.minor = info->device.minor; 4c91c: 5889 addql #4,%a1 4c91e: 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; 4c922: 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; 4c924: 206a 0010 moveal %a2@(16),%a0 4c928: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c92c: 2210 movel %a0@,%d1 4c92e: 5281 addql #1,%d1 4c930: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c932: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c934: 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; 4c938: 2348 0008 movel %a0,%a1@(8) 4c93c: 2f00 movel %d0,%sp@- 4c93e: 4868 004c pea %a0@(76) 4c942: 2d40 fffc movel %d0,%fp@(-4) 4c946: 4eb9 0004 6748 jsr 46748 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c94c: 202e fffc movel %fp@(-4),%d0 4c950: 508f addql #8,%sp 4c952: 6000 ff18 braw 4c86c <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4c956: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4c958: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4c95a: 43e9 0050 lea %a1@(80),%a1 4c95e: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4c962: 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; 4c964: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4c968: 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; 4c96c: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c970: 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; 4c972: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c976: 2210 movel %a0@,%d1 4c978: 5281 addql #1,%d1 4c97a: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c97c: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c97e: 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; 4c982: 2348 0008 movel %a0,%a1@(8) 4c986: 2f00 movel %d0,%sp@- 4c988: 4868 004c pea %a0@(76) 4c98c: 2d40 fffc movel %d0,%fp@(-4) 4c990: 4eb9 0004 6748 jsr 46748 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c996: 202e fffc movel %fp@(-4),%d0 4c99a: 508f addql #8,%sp 4c99c: 6000 fece braw 4c86c <== ALWAYS TAKEN 0004c774 : IMFS_jnode_t *IMFS_create_root_node(void) { 4c774: 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) ); 4c778: 4878 41ed pea 41ed 4c77c: 4879 0005 b29e pea 5b29e 4c782: 4878 0001 pea 1 4c786: 4eb9 0004 c700 jsr 4c700 if ( !node ) 4c78c: 4fef 000c lea %sp@(12),%sp 4c790: 4a80 tstl %d0 4c792: 6716 beqs 4c7aa <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4c794: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4c796: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4c798: 43e9 0050 lea %a1@(80),%a1 4c79c: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4c7a0: 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; 4c7a2: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4c7a6: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4c7aa: 4e5e unlk %fp 4c7ac: 4e75 rts 00043d8a : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 43d8a: 4e56 ffe0 linkw %fp,#-32 43d8e: 206e 0008 moveal %fp@(8),%a0 43d92: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43d96: 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 ); 43d9a: 4a88 tstl %a0 43d9c: 6700 008c beqw 43e2a <== ALWAYS TAKEN assert( level >= 0 ); 43da0: 4a83 tstl %d3 43da2: 6d00 00be bltw 43e62 <== ALWAYS TAKEN assert( the_directory->type == IMFS_DIRECTORY ); 43da6: 7001 moveq #1,%d0 43da8: b0a8 0048 cmpl %a0@(72),%d0 43dac: 6600 0098 bnew 43e46 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 43db0: 2808 movel %a0,%d4 43db2: 0684 0000 0050 addil #80,%d4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43db8: 2668 004c moveal %a0@(76),%a3 43dbc: b88b cmpl %a3,%d4 43dbe: 6750 beqs 43e10 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 ); 43dc0: 2a03 movel %d3,%d5 43dc2: 45f9 0005 2ee0 lea 52ee0 ,%a2 43dc8: 49f9 0004 3b72 lea 43b72 ,%a4 43dce: 5285 addql #1,%d5 43dd0: 4bf9 0004 3d8a lea 43d8a ,%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; 43dd6: 4282 clrl %d2 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43dd8: 2079 0006 2bdc moveal 62bdc <_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++ ) 43dde: 5282 addql #1,%d2 fprintf(stdout, "...." ); 43de0: 2f28 0008 movel %a0@(8),%sp@- 43de4: 4878 0004 pea 4 43de8: 4878 0001 pea 1 43dec: 4879 0006 12f5 pea 612f5 43df2: 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++ ) 43df4: 4fef 0010 lea %sp@(16),%sp 43df8: b483 cmpl %d3,%d2 43dfa: 6fdc bles 43dd8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 43dfc: 2f0b movel %a3,%sp@- 43dfe: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 43e00: 588f addql #4,%sp 43e02: 7001 moveq #1,%d0 43e04: b0ab 0048 cmpl %a3@(72),%d0 43e08: 6710 beqs 43e1a 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 ) { 43e0a: 2653 moveal %a3@,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e0c: b88b cmpl %a3,%d4 43e0e: 66c6 bnes 43dd6 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 43e10: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43e16: 4e5e unlk %fp 43e18: 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 ); 43e1a: 2f05 movel %d5,%sp@- 43e1c: 2f0b movel %a3,%sp@- 43e1e: 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 ) { 43e20: 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 ); 43e22: 508f addql #8,%sp assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e24: b88b cmpl %a3,%d4 43e26: 66ae bnes 43dd6 43e28: 60e6 bras 43e10 <== ALWAYS TAKEN rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 43e2a: 4879 0006 12b6 pea 612b6 <== NOT EXECUTED 43e30: 4879 0006 1384 pea 61384 <__FUNCTION__.6566> <== NOT EXECUTED 43e36: 4878 0084 pea 84 <== NOT EXECUTED 43e3a: 4879 0006 120a pea 6120a <== NOT EXECUTED 43e40: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 43e46: 4879 0006 12cf pea 612cf <== NOT EXECUTED 43e4c: 4879 0006 1384 pea 61384 <__FUNCTION__.6566> <== NOT EXECUTED 43e52: 4878 0088 pea 88 <== NOT EXECUTED 43e56: 4879 0006 120a pea 6120a <== NOT EXECUTED 43e5c: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 43e62: 4879 0006 12c4 pea 612c4 <== NOT EXECUTED 43e68: 4879 0006 1384 pea 61384 <__FUNCTION__.6566> <== NOT EXECUTED 43e6e: 4878 0086 pea 86 <== NOT EXECUTED 43e72: 4879 0006 120a pea 6120a <== NOT EXECUTED 43e78: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED 000494ee : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 494ee: 4e56 ffac linkw %fp,#-84 494f2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 494f6: 286e 0014 moveal %fp@(20),%a4 494fa: 2a0e movel %fp,%d5 494fc: 260e movel %fp,%d3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 494fe: 4282 clrl %d2 49500: 5985 subql #4,%d5 49502: 0683 ffff ffdb addil #-37,%d3 49508: 283c 0004 9e58 movel #302680,%d4 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4950e: 2c3c 0004 9db0 movel #302512,%d6 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 49514: 2e3c 0004 93c0 movel #299968,%d7 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4951a: 2a6e 0008 moveal %fp@(8),%a5 4951e: 246e 000c moveal %fp@(12),%a2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 49522: 2654 moveal %a4@,%a3 49524: 2d4d ffd4 movel %a5,%fp@(-44) * 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 ); 49528: 2f05 movel %d5,%sp@- 4952a: 2a44 moveal %d4,%a5 4952c: 2f03 movel %d3,%sp@- 4952e: 2f0a movel %a2,%sp@- 49530: 206e ffd4 moveal %fp@(-44),%a0 49534: 4870 2800 pea %a0@(00000000,%d2:l) 49538: 4e95 jsr %a5@ pathnamelen -= len; 4953a: 226e fffc moveal %fp@(-4),%a1 i += len; if ( !pathloc->node_access ) 4953e: 4fef 0010 lea %sp@(16),%sp 49542: 2054 moveal %a4@,%a0 49544: 4a88 tstl %a0 49546: 6700 015a beqw 496a2 <== ALWAYS TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4954a: 95c9 subal %a1,%a2 i += len; 4954c: d489 addl %a1,%d2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4954e: 4a80 tstl %d0 49550: 672c beqs 4957e if ( node->type == IMFS_DIRECTORY ) 49552: 7201 moveq #1,%d1 49554: b2ab 0048 cmpl %a3@(72),%d1 49558: 6700 011c beqw 49676 4955c: 2648 moveal %a0,%a3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4955e: 7203 moveq #3,%d1 49560: b280 cmpl %d0,%d1 49562: 677c beqs 495e0 49564: 123c 0004 moveb #4,%d1 49568: b280 cmpl %d0,%d1 4956a: 6700 00f0 beqw 4965c 4956e: 123c 0002 moveb #2,%d1 49572: b280 cmpl %d0,%d1 49574: 6700 00a8 beqw 4961e /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 49578: 7204 moveq #4,%d1 4957a: b280 cmpl %d0,%d1 4957c: 66aa bnes 49528 <== NEVER TAKEN 4957e: 2a6e ffd4 moveal %fp@(-44),%a5 * 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 ) { 49582: 7001 moveq #1,%d0 49584: b0a8 0048 cmpl %a0@(72),%d0 49588: 6600 012a bnew 496b4 if ( node->info.directory.mt_fs != NULL ) { 4958c: 2068 0058 moveal %a0@(88),%a0 49590: 4a88 tstl %a0 49592: 6700 0120 beqw 496b4 newloc = node->info.directory.mt_fs->mt_fs_root; 49596: 2228 0020 movel %a0@(32),%d1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4959a: 9489 subl %a1,%d2 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4959c: 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; 495a2: 2668 0028 moveal %a0@(40),%a3 495a6: 2628 0024 movel %a0@(36),%d3 495aa: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 495ae: 2f0c movel %a4,%sp@- 495b0: 2f2e 0010 movel %fp@(16),%sp@- 495b4: 4872 9800 pea %a2@(00000000,%a1:l) 495b8: 4875 2800 pea %a5@(00000000,%d2:l) 495bc: 2053 moveal %a3@,%a0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 495be: 2941 0004 movel %d1,%a4@(4) 495c2: 2943 0008 movel %d3,%a4@(8) 495c6: 2880 movel %d0,%a4@ 495c8: 294b 000c movel %a3,%a4@(12) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 495cc: 4e90 jsr %a0@ 495ce: 4fef 0010 lea %sp@(16),%sp 495d2: 2200 movel %d0,%d1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 495d4: 2001 movel %d1,%d0 495d6: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 495dc: 4e5e unlk %fp 495de: 4e75 rts case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 495e0: 2028 0048 movel %a0@(72),%d0 495e4: 7203 moveq #3,%d1 495e6: b280 cmpl %d0,%d1 495e8: 6700 00fc beqw 496e6 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 495ec: 7204 moveq #4,%d1 495ee: b280 cmpl %d0,%d1 495f0: 6700 010c beqw 496fe /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 495f4: 7201 moveq #1,%d1 495f6: b280 cmpl %d0,%d1 495f8: 6600 0130 bnew 4972a /* * 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 ) { 495fc: 206b 0058 moveal %a3@(88),%a0 49600: 4a88 tstl %a0 49602: 6600 0138 bnew 4973c /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49606: 2f03 movel %d3,%sp@- 49608: 2a46 moveal %d6,%a5 4960a: 2f0b movel %a3,%sp@- 4960c: 4e95 jsr %a5@ if ( !node ) 4960e: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49610: 2640 moveal %d0,%a3 if ( !node ) 49612: 4a80 tstl %d0 49614: 6700 008c beqw 496a2 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 49618: 288b movel %a3,%a4@ break; 4961a: 6000 ff0c braw 49528 <== ALWAYS TAKEN case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4961e: 2039 0005 c284 movel 5c284 ,%d0 49624: 2a40 moveal %d0,%a5 49626: b1ed 0018 cmpal %a5@(24),%a0 4962a: 6700 fefc beqw 49528 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 4962e: 266c 0010 moveal %a4@(16),%a3 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 49632: b1eb 001c cmpal %a3@(28),%a0 49636: 6700 014e beqw 49786 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4963a: 2668 0008 moveal %a0@(8),%a3 4963e: 4a8b tstl %a3 49640: 66d6 bnes 49618 rtems_set_errno_and_return_minus_one( ENOENT ); 49642: 4eb9 0004 d808 jsr 4d808 <__errno> 49648: 7402 moveq #2,%d2 4964a: 72ff moveq #-1,%d1 4964c: 2a40 moveal %d0,%a5 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4964e: 2001 movel %d1,%d0 flags,pathloc); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); 49650: 2a82 movel %d2,%a5@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49652: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 49658: 4e5e unlk %fp 4965a: 4e75 rts case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4965c: 4eb9 0004 d808 jsr 4d808 <__errno> 49662: 7a5b moveq #91,%d5 49664: 72ff moveq #-1,%d1 49666: 2a40 moveal %d0,%a5 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49668: 2001 movel %d1,%d0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4966a: 2a85 movel %d5,%a5@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4966c: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 49672: 4e5e unlk %fp 49674: 4e75 rts /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 49676: 7240 moveq #64,%d1 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 49678: 2648 moveal %a0,%a3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4967a: c2a8 002e andl %a0@(46),%d1 4967e: 2a41 moveal %d1,%a5 49680: 7240 moveq #64,%d1 49682: b28d cmpl %a5,%d1 49684: 6700 fed8 beqw 4955e * 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 ) ) rtems_set_errno_and_return_minus_one( EACCES ); 49688: 4eb9 0004 d808 jsr 4d808 <__errno> 4968e: 780d moveq #13,%d4 49690: 72ff moveq #-1,%d1 49692: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49694: 2001 movel %d1,%d0 * 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 ) ) rtems_set_errno_and_return_minus_one( EACCES ); 49696: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49698: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4969e: 4e5e unlk %fp 496a0: 4e75 rts * 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 ); 496a2: 4eb9 0004 d808 jsr 4d808 <__errno> 496a8: 7c02 moveq #2,%d6 496aa: 72ff moveq #-1,%d1 496ac: 2040 moveal %d0,%a0 496ae: 2086 movel %d6,%a0@ 496b0: 6000 ff22 braw 495d4 <== ALWAYS TAKEN flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 496b4: 2f0c movel %a4,%sp@- 496b6: 4eb9 0004 9310 jsr 49310 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 496bc: 2054 moveal %a4@,%a0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 496be: 2200 movel %d0,%d1 496c0: 588f addql #4,%sp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 496c2: 202e 0010 movel %fp@(16),%d0 496c6: ed88 lsll #6,%d0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 496c8: 2400 movel %d0,%d2 496ca: c4a8 002e andl %a0@(46),%d2 496ce: b480 cmpl %d0,%d2 496d0: 6700 ff02 beqw 495d4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 496d4: 4eb9 0004 d808 jsr 4d808 <__errno> 496da: 760d moveq #13,%d3 496dc: 72ff moveq #-1,%d1 496de: 2a40 moveal %d0,%a5 496e0: 2a83 movel %d3,%a5@ 496e2: 6000 fef0 braw 495d4 <== ALWAYS TAKEN * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 496e6: 42a7 clrl %sp@- 496e8: 2047 moveal %d7,%a0 496ea: 2f0c movel %a4,%sp@- 496ec: 4e90 jsr %a0@ node = pathloc->node_access; 496ee: 2654 moveal %a4@,%a3 if ( !node ) 496f0: 508f addql #8,%sp 496f2: 4a8b tstl %a3 496f4: 6722 beqs 49718 <== ALWAYS TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 496f6: 202b 0048 movel %a3@(72),%d0 496fa: 6000 fef8 braw 495f4 <== ALWAYS TAKEN if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 496fe: 42a7 clrl %sp@- 49700: 2f0c movel %a4,%sp@- 49702: 4eb9 0004 9420 jsr 49420 node = pathloc->node_access; 49708: 2654 moveal %a4@,%a3 if ( result == -1 ) 4970a: 508f addql #8,%sp 4970c: 72ff moveq #-1,%d1 4970e: b280 cmpl %d0,%d1 49710: 66e4 bnes 496f6 <== NEVER TAKEN 49712: 2200 movel %d0,%d1 <== NOT EXECUTED 49714: 6000 febe braw 495d4 <== NOT EXECUTED IMFS_evaluate_hard_link( pathloc, 0 ); node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 49718: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 4971e: 72ff moveq #-1,%d1 <== NOT EXECUTED 49720: 2a40 moveal %d0,%a5 <== NOT EXECUTED 49722: 7014 moveq #20,%d0 <== NOT EXECUTED 49724: 2a80 movel %d0,%a5@ <== NOT EXECUTED 49726: 6000 feac braw 495d4 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4972a: 4eb9 0004 d808 jsr 4d808 <__errno> 49730: 7e14 moveq #20,%d7 49732: 72ff moveq #-1,%d1 49734: 2040 moveal %d0,%a0 49736: 2087 movel %d7,%a0@ 49738: 6000 fe9a braw 495d4 <== ALWAYS TAKEN * 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; 4973c: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 49740: 2968 002c 0010 movel %a0@(44),%a4@(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; 49746: 2228 0020 movel %a0@(32),%d1 4974a: 2628 0024 movel %a0@(36),%d3 4974e: 2028 001c movel %a0@(28),%d0 49752: 2a6e ffd4 moveal %fp@(-44),%a5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 49756: 2f0c movel %a4,%sp@- 49758: 206e fffc moveal %fp@(-4),%a0 4975c: 9488 subl %a0,%d2 4975e: 2f2e 0010 movel %fp@(16),%sp@- 49762: 4872 8800 pea %a2@(00000000,%a0:l) 49766: 4875 2800 pea %a5@(00000000,%d2:l) 4976a: 2051 moveal %a1@,%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; 4976c: 2941 0004 movel %d1,%a4@(4) 49770: 2943 0008 movel %d3,%a4@(8) 49774: 2880 movel %d0,%a4@ 49776: 2949 000c movel %a1,%a4@(12) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4977a: 4e90 jsr %a0@ 4977c: 4fef 0010 lea %sp@(16),%sp 49780: 2200 movel %d0,%d1 49782: 6000 fe50 braw 495d4 <== ALWAYS TAKEN */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 49786: 206b 0014 moveal %a3@(20),%a0 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4978a: 9489 subl %a1,%d2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4978c: 296b 0018 0010 movel %a3@(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; 49792: 222b 0008 movel %a3@(8),%d1 49796: 282b 0010 movel %a3@(16),%d4 4979a: 262b 000c movel %a3@(12),%d3 4979e: 2a6e ffd4 moveal %fp@(-44),%a5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 497a2: 2f0c movel %a4,%sp@- 497a4: 2f2e 0010 movel %fp@(16),%sp@- 497a8: 4871 a800 pea %a1@(00000000,%a2:l) 497ac: 4875 2800 pea %a5@(00000000,%d2:l) 497b0: 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; 497b2: 2881 movel %d1,%a4@ 497b4: 2948 000c movel %a0,%a4@(12) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 497b8: 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; 497ba: 2944 0008 movel %d4,%a4@(8) 497be: 2943 0004 movel %d3,%a4@(4) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 497c2: 4e90 jsr %a0@ 497c4: 4fef 0010 lea %sp@(16),%sp 497c8: 2200 movel %d0,%d1 497ca: 6000 fe08 braw 495d4 <== ALWAYS TAKEN 00049888 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 49888: 4e56 ffb0 linkw %fp,#-80 4988c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49890: 286e 0008 moveal %fp@(8),%a4 49894: 2a0e movel %fp,%d5 49896: 280e movel %fp,%d4 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 49898: 4283 clrl %d3 4989a: 5985 subql #4,%d5 4989c: 0684 ffff ffdb addil #-37,%d4 498a2: 4bf9 0004 9e58 lea 49e58 ,%a5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 498a8: 2c3c 0004 9db0 movel #302512,%d6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 498ae: 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 */ ) { 498b0: 266e 000c moveal %fp@(12),%a3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 498b4: 4eb9 0004 ebd4 jsr 4ebd4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 498ba: 2453 moveal %a3@,%a2 /* * Get the path length. */ pathlen = strlen( path ); 498bc: 588f addql #4,%sp 498be: 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 ); 498c0: 2f05 movel %d5,%sp@- 498c2: 2f04 movel %d4,%sp@- 498c4: 2f02 movel %d2,%sp@- 498c6: 4874 3800 pea %a4@(00000000,%d3:l) 498ca: 4e95 jsr %a5@ pathlen -= len; 498cc: 222e fffc movel %fp@(-4),%d1 i += len; if ( !pathloc->node_access ) 498d0: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 498d4: 9481 subl %d1,%d2 i += len; if ( !pathloc->node_access ) 498d6: 2053 moveal %a3@,%a0 498d8: 4a88 tstl %a0 498da: 6700 00c8 beqw 499a4 <== ALWAYS TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 498de: 4a80 tstl %d0 498e0: 6742 beqs 49924 if ( node->type == IMFS_DIRECTORY ) 498e2: 7e01 moveq #1,%d7 498e4: beaa 0048 cmpl %a2@(72),%d7 498e8: 6700 00d4 beqw 499be 498ec: 2448 moveal %a0,%a2 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 498ee: d681 addl %d1,%d3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 498f0: 7e02 moveq #2,%d7 498f2: be80 cmpl %d0,%d7 498f4: 6700 008c beqw 49982 498f8: 6426 bccs 49920 498fa: 7203 moveq #3,%d1 498fc: b280 cmpl %d0,%d1 498fe: 673e beqs 4993e 49900: 7e04 moveq #4,%d7 49902: be80 cmpl %d0,%d7 49904: 66ba bnes 498c0 <== ALWAYS 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 ); 49906: 4eb9 0004 d808 jsr 4d808 <__errno> 4990c: 7a5b moveq #91,%d5 4990e: 72ff moveq #-1,%d1 49910: 2040 moveal %d0,%a0 49912: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49914: 2001 movel %d1,%d0 49916: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4991c: 4e5e unlk %fp 4991e: 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 ) { 49920: 4a80 tstl %d0 49922: 669c bnes 498c0 <== NEVER TAKEN pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49924: 4eb9 0004 d808 jsr 4d808 <__errno> 4992a: 7c11 moveq #17,%d6 4992c: 72ff moveq #-1,%d1 4992e: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49930: 2001 movel %d1,%d0 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49932: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49934: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4993a: 4e5e unlk %fp 4993c: 4e75 rts pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4993e: 2028 0048 movel %a0@(72),%d0 49942: 7203 moveq #3,%d1 49944: b280 cmpl %d0,%d1 49946: 6700 0106 beqw 49a4e result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 4994a: 7204 moveq #4,%d1 4994c: b280 cmpl %d0,%d1 4994e: 6700 00fe beqw 49a4e if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 49952: 4a8a tstl %a2 49954: 6700 0114 beqw 49a6a <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 49958: 7001 moveq #1,%d0 4995a: b0aa 0048 cmpl %a2@(72),%d0 4995e: 6600 010a bnew 49a6a /* * 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 ) { 49962: 206a 0058 moveal %a2@(88),%a0 49966: 4a88 tstl %a0 49968: 6600 011a bnew 49a84 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4996c: 2f04 movel %d4,%sp@- 4996e: 2046 moveal %d6,%a0 49970: 2f0a movel %a2,%sp@- 49972: 4e90 jsr %a0@ /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 49974: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49976: 2440 moveal %d0,%a2 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 49978: 4a80 tstl %d0 4997a: 676e beqs 499ea done = true; else pathloc->node_access = node; 4997c: 268a movel %a2,%a3@ 4997e: 6000 ff40 braw 498c0 <== ALWAYS TAKEN case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 49982: 2279 0005 c284 moveal 5c284 ,%a1 49988: b1e9 0018 cmpal %a1@(24),%a0 4998c: 6700 ff32 beqw 498c0 <== ALWAYS TAKEN /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 49990: 226b 0010 moveal %a3@(16),%a1 49994: b1e9 001c cmpal %a1@(28),%a0 49998: 6700 0134 beqw 49ace *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4999c: 2468 0008 moveal %a0@(8),%a2 499a0: 4a8a tstl %a2 499a2: 66d8 bnes 4997c * 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 ); 499a4: 4eb9 0004 d808 jsr 4d808 <__errno> 499aa: 7802 moveq #2,%d4 499ac: 72ff moveq #-1,%d1 499ae: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 499b0: 2001 movel %d1,%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 ); 499b2: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 499b4: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 499ba: 4e5e unlk %fp 499bc: 4e75 rts /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 499be: 7e40 moveq #64,%d7 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 499c0: 2448 moveal %a0,%a2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 499c2: cea8 002e andl %a0@(46),%d7 499c6: 2247 moveal %d7,%a1 499c8: 7e40 moveq #64,%d7 499ca: be89 cmpl %a1,%d7 499cc: 6700 ff20 beqw 498ee /* * 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 ); 499d0: 4eb9 0004 d808 jsr 4d808 <__errno> 499d6: 740d moveq #13,%d2 499d8: 72ff moveq #-1,%d1 499da: 2040 moveal %d0,%a0 499dc: 2082 movel %d2,%a0@ return result; } 499de: 2001 movel %d1,%d0 499e0: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 499e6: 4e5e unlk %fp 499e8: 4e75 rts case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 499ea: 2003 movel %d3,%d0 499ec: 90ae fffc subl %fp@(-4),%d0 499f0: d08c addl %a4,%d0 499f2: 206e 0010 moveal %fp@(16),%a0 499f6: 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++) { 499f8: 1034 3800 moveb %a4@(00000000,%d3:l),%d0 499fc: 6716 beqs 49a14 499fe: 41f4 3801 lea %a4@(00000001,%d3:l),%a0 if ( !IMFS_is_separator( path[ i ] ) ) 49a02: 49c0 extbl %d0 49a04: 722f moveq #47,%d1 49a06: b280 cmpl %d0,%d1 49a08: 6706 beqs 49a10 49a0a: 7e5c moveq #92,%d7 49a0c: be80 cmpl %d0,%d7 49a0e: 6694 bnes 499a4 /* * 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++) { 49a10: 1018 moveb %a0@+,%d0 49a12: 66ee bnes 49a02 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49a14: 2f0b movel %a3,%sp@- 49a16: 4eb9 0004 9310 jsr 49310 /* * The returned node must be a directory */ node = pathloc->node_access; 49a1c: 2053 moveal %a3@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49a1e: 2200 movel %d0,%d1 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 49a20: 588f addql #4,%sp 49a22: 7001 moveq #1,%d0 49a24: b0a8 0048 cmpl %a0@(72),%d0 49a28: 6640 bnes 49a6a <== 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 ) 49a2a: 2028 002e movel %a0@(46),%d0 49a2e: 0280 0000 00c0 andil #192,%d0 49a34: 0c80 0000 00c0 cmpil #192,%d0 49a3a: 6700 fed8 beqw 49914 /* * 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 ); 49a3e: 4eb9 0004 d808 jsr 4d808 <__errno> 49a44: 740d moveq #13,%d2 49a46: 72ff moveq #-1,%d1 49a48: 2040 moveal %d0,%a0 49a4a: 2082 movel %d2,%a0@ 49a4c: 6090 bras 499de <== ALWAYS TAKEN if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49a4e: 42a7 clrl %sp@- if ( result == -1 ) 49a50: 7eff moveq #-1,%d7 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49a52: 2f0b movel %a3,%sp@- 49a54: 4eb9 0004 97ce jsr 497ce if ( result == -1 ) 49a5a: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49a5c: 2200 movel %d0,%d1 if ( result == -1 ) 49a5e: be80 cmpl %d0,%d7 49a60: 6700 feb2 beqw 49914 <== ALWAYS TAKEN 49a64: 2453 moveal %a3@,%a2 49a66: 6000 feea braw 49952 <== ALWAYS TAKEN /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 49a6a: 4eb9 0004 d808 jsr 4d808 <__errno> 49a70: 7614 moveq #20,%d3 49a72: 72ff moveq #-1,%d1 49a74: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49a76: 2001 movel %d1,%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 ); 49a78: 2083 movel %d3,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49a7a: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49a80: 4e5e unlk %fp 49a82: 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 ); 49a84: 96ae fffc subl %fp@(-4),%d3 * 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; 49a88: 2428 0024 movel %a0@(36),%d2 49a8c: 2228 0020 movel %a0@(32),%d1 49a90: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 49a94: 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; 49a9a: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49a9e: 2f2e 0010 movel %fp@(16),%sp@- 49aa2: 2f0b movel %a3,%sp@- 49aa4: 4874 3800 pea %a4@(00000000,%d3:l) 49aa8: 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; 49aac: 2741 0004 movel %d1,%a3@(4) 49ab0: 2742 0008 movel %d2,%a3@(8) 49ab4: 2680 movel %d0,%a3@ 49ab6: 2749 000c movel %a1,%a3@(12) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49aba: 4e90 jsr %a0@ 49abc: 4fef 000c lea %sp@(12),%sp 49ac0: 2200 movel %d0,%d1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49ac2: 2001 movel %d1,%d0 49ac4: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49aca: 4e5e unlk %fp 49acc: 4e75 rts if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 49ace: 2069 0014 moveal %a1@(20),%a0 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49ad2: 9681 subl %d1,%d3 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 49ad4: 2829 0010 movel %a1@(16),%d4 49ad8: 2429 000c movel %a1@(12),%d2 *pathloc = newloc; 49adc: 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; 49ae2: 2269 0008 moveal %a1@(8),%a1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49ae6: 2f2e 0010 movel %fp@(16),%sp@- 49aea: 2f0b movel %a3,%sp@- 49aec: 4874 3800 pea %a4@(00000000,%d3:l) 49af0: 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; 49af4: 2748 000c movel %a0,%a3@(12) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49af8: 2040 moveal %d0,%a0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 49afa: 2744 0008 movel %d4,%a3@(8) 49afe: 2742 0004 movel %d2,%a3@(4) 49b02: 2689 movel %a1,%a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49b04: 4e90 jsr %a0@ 49b06: 4fef 000c lea %sp@(12),%sp 49b0a: 2200 movel %d0,%d1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49b0c: 2001 movel %d1,%d0 49b0e: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49b14: 4e5e unlk %fp 49b16: 4e75 rts 000493c0 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 493c0: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 493c2: 4e56 0000 linkw %fp,#0 493c6: 2f0a movel %a2,%sp@- 493c8: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 493cc: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 493ce: b0a8 0048 cmpl %a0@(72),%d0 493d2: 6640 bnes 49414 <== ALWAYS TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 493d4: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 493d8: 2f0a movel %a2,%sp@- 493da: 4eb9 0004 9310 jsr 49310 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 493e0: 202e 000c movel %fp@(12),%d0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 493e4: 588f addql #4,%sp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 493e6: ed88 lsll #6,%d0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 493e8: 2052 moveal %a2@,%a0 493ea: 2200 movel %d0,%d1 493ec: c2a8 002e andl %a0@(46),%d1 493f0: b280 cmpl %d0,%d1 493f2: 6716 beqs 4940a <== NEVER TAKEN /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 493f4: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED return result; } 493fa: 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 ); 493fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 49400: 720d moveq #13,%d1 <== NOT EXECUTED 49402: 70ff moveq #-1,%d0 <== NOT EXECUTED return result; } 49404: 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 ); 49406: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 49408: 4e75 rts <== NOT EXECUTED 4940a: 246e fffc moveal %fp@(-4),%a2 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 4940e: 4280 clrl %d0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49410: 4e5e unlk %fp 49412: 4e75 rts /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 49414: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4941a: 4eb9 0004 645c jsr 4645c <== NOT EXECUTED 000497ce : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 497ce: 4e56 ffec linkw %fp,#-20 497d2: 2079 0005 c284 moveal 5c284 ,%a0 497d8: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 497dc: 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 ); 497e0: 4bf9 0004 9420 lea 49420 ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 497e6: 49f9 0004 93c0 lea 493c0 ,%a4 int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 497ec: 242e 000c movel %fp@(12),%d2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 497f0: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 497f2: 3028 0030 movew %a0@(48),%d0 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 497f6: 2453 moveal %a3@,%a2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 497f8: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 497fa: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 497fc: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 49800: 7005 moveq #5,%d0 49802: b081 cmpl %d1,%d0 49804: 6564 bcss 4986a /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 49806: 202a 0048 movel %a2@(72),%d0 4980a: 7203 moveq #3,%d1 4980c: b280 cmpl %d0,%d1 4980e: 6740 beqs 49850 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 49810: 7204 moveq #4,%d1 49812: b280 cmpl %d0,%d1 49814: 671a beqs 49830 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 49816: 5780 subql #3,%d0 49818: 7201 moveq #1,%d1 4981a: b280 cmpl %d0,%d1 4981c: 64d2 bccs 497f0 <== ALWAYS TAKEN 4981e: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 49820: 4241 clrw %d1 49822: 3141 0030 movew %d1,%a0@(48) return result; } 49826: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4982c: 4e5e unlk %fp 4982e: 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 ); 49830: 2f02 movel %d2,%sp@- 49832: 2f0b movel %a3,%sp@- 49834: 4e95 jsr %a5@ 49836: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 49838: 4a80 tstl %d0 4983a: 6620 bnes 4985c 4983c: 202a 0048 movel %a2@(72),%d0 49840: 7201 moveq #1,%d1 49842: 5780 subql #3,%d0 49844: 2079 0005 c284 moveal 5c284 ,%a0 4984a: b280 cmpl %d0,%d1 4984c: 64a2 bccs 497f0 <== NEVER TAKEN 4984e: 60ce bras 4981e <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 49850: 2f02 movel %d2,%sp@- 49852: 2f0b movel %a3,%sp@- 49854: 4e94 jsr %a4@ 49856: 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 ) ) ); 49858: 4a80 tstl %d0 4985a: 67e0 beqs 4983c <== NEVER TAKEN 4985c: 2079 0005 c284 moveal 5c284 ,%a0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 49862: 4241 clrw %d1 49864: 3141 0030 movew %d1,%a0@(48) 49868: 60bc bras 49826 <== ALWAYS TAKEN * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 4986a: 4241 clrw %d1 4986c: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 49870: 4eb9 0004 d808 jsr 4d808 <__errno> 49876: 725c moveq #92,%d1 49878: 2040 moveal %d0,%a0 4987a: 70ff moveq #-1,%d0 */ rtems_filesystem_link_counts = 0; return result; } 4987c: 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 ); 49882: 2081 movel %d1,%a0@ */ rtems_filesystem_link_counts = 0; return result; } 49884: 4e5e unlk %fp 49886: 4e75 rts 0004939e : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4939e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 493a2: 202e 000c movel %fp@(12),%d0 <== 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 ) 493a6: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED return 1; return 0; } 493aa: 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 ) 493ac: ed88 lsll #6,%d0 <== NOT EXECUTED 493ae: 2050 moveal %a0@,%a0 <== NOT EXECUTED 493b0: 2200 movel %d0,%d1 <== NOT EXECUTED 493b2: c2a8 002e andl %a0@(46),%d1 <== NOT EXECUTED 493b6: b280 cmpl %d0,%d1 <== NOT EXECUTED 493b8: 57c0 seq %d0 <== NOT EXECUTED 493ba: 49c0 extbl %d0 <== NOT EXECUTED return 1; return 0; } 493bc: 4480 negl %d0 <== NOT EXECUTED 493be: 4e75 rts 00049420 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 49420: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 49422: 4e56 fff0 linkw %fp,#-16 49426: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4942a: 246e 0008 moveal %fp@(8),%a2 4942e: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 49432: 2252 moveal %a2@,%a1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 49434: b0a9 0048 cmpl %a1@(72),%d0 49438: 6600 00a8 bnew 494e2 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4943c: 2029 0008 movel %a1@(8),%d0 49440: 6700 0094 beqw 494d6 <== ALWAYS TAKEN /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 49444: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 49446: 2069 004c moveal %a1@(76),%a0 4944a: 762f moveq #47,%d3 4944c: 1210 moveb %a0@,%d1 4944e: 1001 moveb %d1,%d0 49450: 49c0 extbl %d0 49452: b680 cmpl %d0,%d3 49454: 670c beqs 49462 49456: 163c 005c moveb #92,%d3 4945a: b680 cmpl %d0,%d3 4945c: 6704 beqs 49462 <== ALWAYS TAKEN 4945e: 4a01 tstb %d1 49460: 6670 bnes 494d2 <== NEVER TAKEN 49462: 2679 0005 c284 moveal 5c284 ,%a3 49468: 204a moveal %a2,%a0 4946a: 7601 moveq #1,%d3 4946c: 20eb 0018 movel %a3@(24),%a0@+ 49470: 20eb 001c movel %a3@(28),%a0@+ 49474: 20eb 0020 movel %a3@(32),%a0@+ 49478: 20eb 0024 movel %a3@(36),%a0@+ 4947c: 20ab 0028 movel %a3@(40),%a0@ 49480: 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] ), 49484: d688 addl %a0,%d3 49486: 2f03 movel %d3,%sp@- 49488: 4eb9 0004 ebd4 jsr 4ebd4 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4948e: 2e8a movel %a2,%sp@ 49490: 2f02 movel %d2,%sp@- /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 49492: ed8a lsll #6,%d2 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 49494: 2f00 movel %d0,%sp@- 49496: 2f03 movel %d3,%sp@- 49498: 4eb9 0004 94ee jsr 494ee 4949e: 2600 movel %d0,%d3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 494a0: 2f0a movel %a2,%sp@- 494a2: 4eb9 0004 9310 jsr 49310 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 494a8: 2052 moveal %a2@,%a0 494aa: 2002 movel %d2,%d0 494ac: 4fef 0014 lea %sp@(20),%sp 494b0: c0a8 002e andl %a0@(46),%d0 494b4: b082 cmpl %d2,%d0 494b6: 670e beqs 494c6 <== NEVER TAKEN /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 494b8: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 494be: 740d moveq #13,%d2 <== NOT EXECUTED 494c0: 76ff moveq #-1,%d3 <== NOT EXECUTED 494c2: 2040 moveal %d0,%a0 <== NOT EXECUTED 494c4: 2082 movel %d2,%a0@ <== NOT EXECUTED return result; } 494c6: 2003 movel %d3,%d0 494c8: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 494ce: 4e5e unlk %fp 494d0: 4e75 rts * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 494d2: 4203 clrb %d3 494d4: 60ae bras 49484 <== ALWAYS TAKEN if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 494d6: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 494dc: 4eb9 0004 645c jsr 4645c <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 494e2: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 494e8: 4eb9 0004 645c jsr 4645c <== NOT EXECUTED 00049cec : } int IMFS_fifo_close( rtems_libio_t *iop ) { 49cec: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49cf0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 49cf4: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 49cf8: 266a 0038 moveal %a2@(56),%a3 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 49cfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49cfe: 486b 004c pea %a3@(76) <== NOT EXECUTED 49d02: 4eb9 0004 c18a jsr 4c18a <== NOT EXECUTED if (! err) { 49d08: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 49d0a: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 49d0c: 670e beqs 49d1c <== 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); 49d0e: 6d40 blts 49d50 <== NOT EXECUTED } 49d10: 2002 movel %d2,%d0 <== NOT EXECUTED 49d12: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d18: 4e5e unlk %fp <== NOT EXECUTED 49d1a: 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; 49d1c: 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) 49d22: 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; 49d24: 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) 49d28: 4eb9 0004 a76e jsr 4a76e <== NOT EXECUTED 49d2e: 588f addql #4,%sp <== NOT EXECUTED 49d30: 4a80 tstl %d0 <== NOT EXECUTED 49d32: 66dc bnes 49d10 <== NOT EXECUTED 49d34: 4a6b 0032 tstw %a3@(50) <== NOT EXECUTED 49d38: 66d6 bnes 49d10 <== NOT EXECUTED free(jnode); 49d3a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 49d3c: 4eb9 0004 a51c jsr 4a51c <== NOT EXECUTED 49d42: 588f addql #4,%sp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 49d44: 2002 movel %d2,%d0 <== NOT EXECUTED 49d46: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d4c: 4e5e unlk %fp <== NOT EXECUTED 49d4e: 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); 49d50: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 49d56: 4482 negl %d2 <== NOT EXECUTED 49d58: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d5a: 2082 movel %d2,%a0@ <== NOT EXECUTED 49d5c: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49d5e: 2002 movel %d2,%d0 <== NOT EXECUTED 49d60: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d66: 4e5e unlk %fp <== NOT EXECUTED 49d68: 4e75 rts 00049b7c : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 49b7c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49b80: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49b84: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 49b88: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 49b8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 49b8e: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 49b94: 6724 beqs 49bba <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 49b96: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49b98: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49b9c: 2f09 movel %a1,%sp@- <== NOT EXECUTED 49b9e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49ba0: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49ba4: 4eb9 0004 bd56 jsr 4bd56 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49baa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49bae: 4a80 tstl %d0 <== NOT EXECUTED 49bb0: 6d46 blts 49bf8 <== NOT EXECUTED } 49bb2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bb6: 4e5e unlk %fp <== NOT EXECUTED 49bb8: 4e75 rts <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 49bba: 4a89 tstl %a1 <== NOT EXECUTED 49bbc: 6724 beqs 49be2 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 49bbe: 4a91 tstl %a1@ <== NOT EXECUTED 49bc0: 6710 beqs 49bd2 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 49bc2: 7201 moveq #1,%d1 <== NOT EXECUTED 49bc4: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49bc6: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bca: 4e5e unlk %fp <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 49bcc: 83a8 0014 orl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49bd0: 4e75 rts <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49bd2: 72fe moveq #-2,%d1 <== NOT EXECUTED 49bd4: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49bd6: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bda: 4e5e unlk %fp <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49bdc: c3a8 0014 andl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49be0: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49be2: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 49be8: 740e moveq #14,%d2 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49bea: 2040 moveal %d0,%a0 <== NOT EXECUTED 49bec: 70ff moveq #-1,%d0 <== NOT EXECUTED 49bee: 2082 movel %d2,%a0@ <== NOT EXECUTED } 49bf0: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bf4: 4e5e unlk %fp <== NOT EXECUTED 49bf6: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49bf8: 2400 movel %d0,%d2 <== NOT EXECUTED 49bfa: 4482 negl %d2 <== NOT EXECUTED 49bfc: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 49c02: 2040 moveal %d0,%a0 <== NOT EXECUTED 49c04: 70ff moveq #-1,%d0 <== NOT EXECUTED 49c06: 2082 movel %d2,%a0@ <== NOT EXECUTED 49c08: 60e6 bras 49bf0 <== NOT EXECUTED 00049b18 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 49b18: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49b1c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49b20: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 49b24: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49b26: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 49b2a: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49b2e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49b32: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 49b36: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49b3a: 4eb9 0004 bcf8 jsr 4bcf8 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49b40: 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); 49b44: 2800 movel %d0,%d4 <== NOT EXECUTED 49b46: 2600 movel %d0,%d3 <== NOT EXECUTED 49b48: 5bc2 smi %d2 <== NOT EXECUTED 49b4a: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49b4c: 4a82 tstl %d2 <== NOT EXECUTED 49b4e: 6b0e bmis 49b5e <== NOT EXECUTED } 49b50: 2203 movel %d3,%d1 <== NOT EXECUTED 49b52: 2002 movel %d2,%d0 <== NOT EXECUTED 49b54: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49b5a: 4e5e unlk %fp <== NOT EXECUTED 49b5c: 4e75 rts <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 49b5e: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 49b64: 4484 negl %d4 <== NOT EXECUTED 49b66: 2040 moveal %d0,%a0 <== NOT EXECUTED 49b68: 74ff moveq #-1,%d2 <== NOT EXECUTED 49b6a: 76ff moveq #-1,%d3 <== NOT EXECUTED 49b6c: 2084 movel %d4,%a0@ <== NOT EXECUTED } 49b6e: 2203 movel %d3,%d1 <== NOT EXECUTED 49b70: 2002 movel %d2,%d0 <== NOT EXECUTED 49b72: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49b78: 4e5e unlk %fp <== NOT EXECUTED 49b7a: 4e75 rts 00049d6a : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 49d6a: 4e56 0000 linkw %fp,#0 49d6e: 206e 0008 moveal %fp@(8),%a0 49d72: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49d74: 2f08 movel %a0,%sp@- 49d76: 2068 0038 moveal %a0@(56),%a0 49d7a: 41e8 004c lea %a0@(76),%a0 49d7e: 2f08 movel %a0,%sp@- 49d80: 4eb9 0004 c2aa jsr 4c2aa IMFS_FIFO_RETURN(err); 49d86: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49d88: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 49d8a: 6d0a blts 49d96 <== NEVER TAKEN } 49d8c: 2002 movel %d2,%d0 <== NOT EXECUTED 49d8e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d92: 4e5e unlk %fp <== NOT EXECUTED 49d94: 4e75 rts <== NOT EXECUTED ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 49d96: 4eb9 0004 d808 jsr 4d808 <__errno> 49d9c: 4482 negl %d2 49d9e: 2040 moveal %d0,%a0 49da0: 2082 movel %d2,%a0@ 49da2: 74ff moveq #-1,%d2 } 49da4: 2002 movel %d2,%d0 49da6: 242e fffc movel %fp@(-4),%d2 49daa: 4e5e unlk %fp 49dac: 4e75 rts ... 00049c7e : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 49c7e: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49c82: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c86: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49c88: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49c8a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49c8c: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49c90: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 49c94: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49c98: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49c9c: 4eb9 0004 bf94 jsr 4bf94 <== NOT EXECUTED if (err > 0) 49ca2: 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); 49ca6: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 49ca8: 6f22 bles 49ccc <== NOT EXECUTED IMFS_update_atime(jnode); 49caa: 42a7 clrl %sp@- <== NOT EXECUTED 49cac: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49cb0: 4eb9 0004 a694 jsr 4a694 <== NOT EXECUTED 49cb6: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 49cbc: 508f addql #8,%sp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 49cbe: 2002 movel %d2,%d0 <== NOT EXECUTED 49cc0: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49cc4: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49cc8: 4e5e unlk %fp <== NOT EXECUTED 49cca: 4e75 rts <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 49ccc: 4a80 tstl %d0 <== NOT EXECUTED 49cce: 67ee beqs 49cbe <== NOT EXECUTED 49cd0: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 49cd6: 4482 negl %d2 <== NOT EXECUTED 49cd8: 2040 moveal %d0,%a0 <== NOT EXECUTED 49cda: 2082 movel %d2,%a0@ <== NOT EXECUTED 49cdc: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49cde: 2002 movel %d2,%d0 <== NOT EXECUTED 49ce0: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49ce4: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49ce8: 4e5e unlk %fp <== NOT EXECUTED 49cea: 4e75 rts 00049c0a : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 49c0a: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49c0e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c12: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49c14: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49c16: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49c18: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49c1c: 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; 49c20: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49c24: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49c28: 4eb9 0004 bdb6 jsr 4bdb6 <== NOT EXECUTED if (err > 0) { 49c2e: 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); 49c32: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 49c34: 6f28 bles 49c5e <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 49c36: 42a7 clrl %sp@- <== NOT EXECUTED 49c38: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49c3c: 4eb9 0004 a694 jsr 4a694 <== NOT EXECUTED 49c42: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 49c46: 508f addql #8,%sp <== NOT EXECUTED 49c48: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 49c4c: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 49c50: 2002 movel %d2,%d0 <== NOT EXECUTED 49c52: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49c56: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49c5a: 4e5e unlk %fp <== NOT EXECUTED 49c5c: 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); 49c5e: 4a80 tstl %d0 <== NOT EXECUTED 49c60: 67ee beqs 49c50 <== NOT EXECUTED 49c62: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 49c68: 4482 negl %d2 <== NOT EXECUTED 49c6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 49c6c: 2082 movel %d2,%a0@ <== NOT EXECUTED 49c6e: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49c70: 2002 movel %d2,%d0 <== NOT EXECUTED 49c72: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49c76: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49c7a: 4e5e unlk %fp <== NOT EXECUTED 49c7c: 4e75 rts 00049db0 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49db0: 4e56 fff0 linkw %fp,#-16 49db4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49db8: 246e 0008 moveal %fp@(8),%a2 49dbc: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49dc0: 4a8a tstl %a2 49dc2: 6776 beqs 49e3a <== ALWAYS TAKEN if ( !name ) 49dc4: 4a82 tstl %d2 49dc6: 6756 beqs 49e1e <== ALWAYS TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49dc8: 4879 0005 b50c pea 5b50c 49dce: 47f9 0004 e710 lea 4e710 ,%a3 49dd4: 2f02 movel %d2,%sp@- 49dd6: 4e93 jsr %a3@ 49dd8: 508f addql #8,%sp 49dda: 4a80 tstl %d0 49ddc: 6714 beqs 49df2 <== ALWAYS TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 49dde: 4879 0005 b50e pea 5b50e 49de4: 2f02 movel %d2,%sp@- 49de6: 4e93 jsr %a3@ 49de8: 508f addql #8,%sp 49dea: 4a80 tstl %d0 49dec: 6610 bnes 49dfe <== NEVER TAKEN return directory->Parent; 49dee: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49df2: 200a movel %a2,%d0 <== NOT EXECUTED 49df4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 49dfa: 4e5e unlk %fp <== NOT EXECUTED 49dfc: 4e75 rts <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49dfe: 286a 004c moveal %a2@(76),%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49e02: 45ea 0050 lea %a2@(80),%a2 49e06: b5cc cmpal %a4,%a2 49e08: 6714 beqs 49e1e !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 ) ) 49e0a: 486c 000c pea %a4@(12) 49e0e: 2f02 movel %d2,%sp@- 49e10: 4e93 jsr %a3@ 49e12: 508f addql #8,%sp 49e14: 4a80 tstl %d0 49e16: 6714 beqs 49e2c 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 ) { 49e18: 2854 moveal %a4@,%a4 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49e1a: b5cc cmpal %a4,%a2 49e1c: 66ec bnes 49e0a 49e1e: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49e20: 200a movel %a2,%d0 49e22: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49e28: 4e5e unlk %fp 49e2a: 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 ) ) 49e2c: 244c moveal %a4,%a2 return the_jnode; } return 0; } 49e2e: 200a movel %a2,%d0 49e30: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49e36: 4e5e unlk %fp 49e38: 4e75 rts /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49e3a: 4879 0005 bb23 pea 5bb23 <_global_impure_ptr+0x1b1> <== NOT EXECUTED 49e40: 4879 0005 b511 pea 5b511 <__FUNCTION__.5360> <== NOT EXECUTED 49e46: 4878 002a pea 2a <== NOT EXECUTED 49e4a: 4879 0005 b4c0 pea 5b4c0 <== NOT EXECUTED 49e50: 4eb9 0004 a330 jsr 4a330 <__assert_func> <== NOT EXECUTED ... 0004f724 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4f724: 4e56 ffd8 linkw %fp,#-40 4f728: 206e 0008 moveal %fp@(8),%a0 4f72c: 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; 4f730: 47ee ffec lea %fp@(-20),%a3 4f734: 49f9 0004 ec78 lea 4ec78 ,%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4f73a: 4bf9 0004 36d4 lea 436d4 ,%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; 4f740: 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; 4f744: 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; 4f748: 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; 4f74c: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4f752: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4f758: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4f75e: 2d68 002c fffc movel %a0@(44),%fp@(-4) */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4f764: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4f768: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4f76c: 2f0b movel %a3,%sp@- 4f76e: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4f770: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4f772: 200a movel %a2,%d0 4f774: 0680 0000 0050 addil #80,%d0 4f77a: 7201 moveq #1,%d1 4f77c: b2aa 0048 cmpl %a2@(72),%d1 4f780: 6634 bnes 4f7b6 4f782: b0aa 004c cmpl %a2@(76),%d0 4f786: 672e beqs 4f7b6 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4f788: 4a8a tstl %a2 4f78a: 671e beqs 4f7aa if ( jnode->type == IMFS_DIRECTORY ) { 4f78c: 7001 moveq #1,%d0 4f78e: b0aa 0048 cmpl %a2@(72),%d0 4f792: 66d0 bnes 4f764 <== ALWAYS TAKEN 4f794: 200a movel %a2,%d0 4f796: 0680 0000 0050 addil #80,%d0 4f79c: b0aa 004c cmpl %a2@(76),%d0 4f7a0: 67c2 beqs 4f764 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4f7a2: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4f7a6: 4a8a tstl %a2 4f7a8: 66ba bnes 4f764 <== NEVER TAKEN 4f7aa: 4280 clrl %d0 return 0; } 4f7ac: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4f7b2: 4e5e unlk %fp 4f7b4: 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 ); 4f7b6: 2f0b movel %a3,%sp@- 4f7b8: 42a7 clrl %sp@- 4f7ba: 4e95 jsr %a5@ if (result != 0) 4f7bc: 508f addql #8,%sp 4f7be: 4a80 tstl %d0 4f7c0: 6604 bnes 4f7c6 <== ALWAYS TAKEN 4f7c2: 2442 moveal %d2,%a2 4f7c4: 60c2 bras 4f788 <== ALWAYS TAKEN if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4f7c6: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4f7c8: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4f7ce: 4e5e unlk %fp <== NOT EXECUTED 4f7d0: 4e75 rts <== NOT EXECUTED ... 00049e58 : const char *path, int pathlen, char *token, int *token_len ) { 49e58: 4e56 ffec linkw %fp,#-20 49e5c: 206e 0008 moveal %fp@(8),%a0 49e60: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49e64: 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) ) { 49e68: 742f moveq #47,%d2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 49e6a: 1210 moveb %a0@,%d1 const char *path, int pathlen, char *token, int *token_len ) { 49e6c: 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) ) { 49e70: 1001 moveb %d1,%d0 const char *path, int pathlen, char *token, int *token_len ) { 49e72: 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) ) { 49e76: 49c0 extbl %d0 49e78: b480 cmpl %d0,%d2 49e7a: 6700 00ac beqw 49f28 49e7e: 765c moveq #92,%d3 49e80: b680 cmpl %d0,%d3 49e82: 6700 00a4 beqw 49f28 49e86: 4a01 tstb %d1 49e88: 6700 00bc beqw 49f46 49e8c: 4a89 tstl %a1 49e8e: 6f00 0098 blew 49f28 <== ALWAYS TAKEN token[i] = c; 49e92: 4280 clrl %d0 49e94: 1481 moveb %d1,%a2@ return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 49e96: 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) ) { 49e98: 762f moveq #47,%d3 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 49e9a: 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) ) { 49e9e: 1401 moveb %d1,%d2 49ea0: 49c2 extbl %d2 49ea2: b682 cmpl %d2,%d3 49ea4: 6726 beqs 49ecc 49ea6: 163c 005c moveb #92,%d3 49eaa: b682 cmpl %d2,%d3 49eac: 671e beqs 49ecc 49eae: 4a01 tstb %d1 49eb0: 671a beqs 49ecc 49eb2: b089 cmpl %a1,%d0 49eb4: 6c16 bges 49ecc token[i] = c; 49eb6: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) if ( i == IMFS_NAME_MAX ) 49eba: 7220 moveq #32,%d1 49ebc: b280 cmpl %d0,%d1 49ebe: 66d6 bnes 49e96 49ec0: 7004 moveq #4,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 49ec2: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49ec8: 4e5e unlk %fp 49eca: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 49ecc: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 49ed0: 6706 beqs 49ed8 <== ALWAYS TAKEN token[i] = '\0'; 49ed2: 4201 clrb %d1 49ed4: 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 ) 49ed8: 4879 0005 b528 pea 5b528 <__FUNCTION__.5360+0x17> 49ede: 47f9 0004 e710 lea 4e710 ,%a3 /* * Set token_len to the number of characters copied. */ *token_len = i; 49ee4: 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 ) 49ee6: 2f0a movel %a2,%sp@- 49ee8: 4e93 jsr %a3@ 49eea: 508f addql #8,%sp 49eec: 4a80 tstl %d0 49eee: 671e beqs 49f0e type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 49ef0: 4879 0005 b529 pea 5b529 <__FUNCTION__.5360+0x18> 49ef6: 2f0a movel %a2,%sp@- 49ef8: 4e93 jsr %a3@ 49efa: 508f addql #8,%sp 49efc: 4a80 tstl %d0 49efe: 661c bnes 49f1c 49f00: 103c 0001 moveb #1,%d0 type = IMFS_CURRENT_DIR; } return type; } 49f04: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f0a: 4e5e unlk %fp 49f0c: 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 ) 49f0e: 103c 0002 moveb #2,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 49f12: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f18: 4e5e unlk %fp 49f1a: 4e75 rts */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 49f1c: 7003 moveq #3,%d0 type = IMFS_CURRENT_DIR; } return type; } 49f1e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f24: 4e5e unlk %fp 49f26: 4e75 rts /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 49f28: 1481 moveb %d1,%a2@ if ( (token[i] != '\0') && pathlen ) { 49f2a: 4a89 tstl %a1 49f2c: 6710 beqs 49f3e type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 49f2e: 7001 moveq #1,%d0 49f30: 7201 moveq #1,%d1 /* * Set token_len to the number of characters copied. */ *token_len = i; 49f32: 2881 movel %d1,%a4@ else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 49f34: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f3a: 4e5e unlk %fp 49f3c: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 49f3e: 4281 clrl %d1 49f40: 4280 clrl %d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 49f42: 2881 movel %d1,%a4@ 49f44: 60ee bras 49f34 <== ALWAYS TAKEN /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 49f46: 4280 clrl %d0 49f48: 4281 clrl %d1 49f4a: 4212 clrb %a2@ 49f4c: 60e4 bras 49f32 <== ALWAYS TAKEN ... 00049f50 : int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 49f50: 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 ) { 49f52: 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, 49f56: 2079 0005 c178 moveal 5c178 ,%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 ) { 49f5c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49f60: 246e 0008 moveal %fp@(8),%a2 49f64: 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) { 49f68: b088 cmpl %a0,%d0 49f6a: 6716 beqs 49f82 <== ALWAYS TAKEN 49f6c: 4200 clrb %d0 49f6e: 7220 moveq #32,%d1 49f70: 5280 addql #1,%d0 49f72: b288 cmpl %a0,%d1 49f74: 670c beqs 49f82 49f76: 7605 moveq #5,%d3 49f78: d281 addl %d1,%d1 49f7a: b680 cmpl %d0,%d3 49f7c: 66f2 bnes 49f70 <== NEVER TAKEN 49f7e: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 49f82: 23c8 0005 d100 movel %a0,5d100 /* * 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(); 49f88: 4eb9 0004 c774 jsr 4c774 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 ) ); 49f8e: 4878 000c pea c * 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; 49f92: 41f9 0005 b6ea lea 5b6ea ,%a0 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 49f98: 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; 49f9c: 2550 0038 movel %a0@,%a2@(56) 49fa0: 41f9 0005 b6ee lea 5b6ee ,%a0 49fa6: 2550 003c movel %a0@,%a2@(60) 49faa: 41f9 0005 b6f2 lea 5b6f2 ,%a0 49fb0: 2550 0040 movel %a0@,%a2@(64) 49fb4: 41f9 0005 b6f6 lea 5b6f6 ,%a0 49fba: 2550 0044 movel %a0@,%a2@(68) 49fbe: 41f9 0005 b6fa lea 5b6fa ,%a0 49fc4: 2550 0048 movel %a0@,%a2@(72) 49fc8: 41f9 0005 b6fe lea 5b6fe ,%a0 49fce: 2550 004c movel %a0@,%a2@(76) 49fd2: 41f9 0005 b702 lea 5b702 ,%a0 49fd8: 2550 0050 movel %a0@,%a2@(80) 49fdc: 41f9 0005 b706 lea 5b706 ,%a0 49fe2: 2550 0054 movel %a0@,%a2@(84) 49fe6: 41f9 0005 b70a lea 5b70a ,%a0 49fec: 2550 0058 movel %a0@,%a2@(88) 49ff0: 41f9 0005 b70e lea 5b70e ,%a0 49ff6: 2550 005c movel %a0@,%a2@(92) 49ffa: 41f9 0005 b712 lea 5b712 ,%a0 4a000: 2550 0060 movel %a0@,%a2@(96) 4a004: 41f9 0005 b716 lea 5b716 ,%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; 4a00a: 256e 000c 0028 movel %fp@(12),%a2@(40) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4a010: 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(); 4a014: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4a018: 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 ) ); 4a01c: 4eb9 0004 a430 jsr 4a430 if ( !fs_info ) { 4a022: 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 ) ); 4a024: 2040 moveal %d0,%a0 if ( !fs_info ) { 4a026: 4a80 tstl %d0 4a028: 672e beqs 4a058 <== ALWAYS TAKEN /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4a02a: 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; 4a02c: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4a030: 2080 movel %d0,%a0@ 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; 4a032: 7001 moveq #1,%d0 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 4a034: 216e 0010 0004 movel %fp@(16),%a0@(4) fs_info->directory_handlers = directory_handlers; 4a03a: 2142 0008 movel %d2,%a0@(8) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4a03e: 2340 0034 movel %d0,%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; 4a042: 2548 0034 movel %a0,%a2@(52) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 4a046: 4eb9 0004 bd02 jsr 4bd02 return 0; } 4a04c: 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(); 4a052: 4280 clrl %d0 return 0; } 4a054: 4e5e unlk %fp 4a056: 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); 4a058: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 4a05c: 4eb9 0004 a51c jsr 4a51c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4a062: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 4a068: 588f addql #4,%sp <== NOT EXECUTED 4a06a: 720c moveq #12,%d1 <== NOT EXECUTED 4a06c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a06e: 70ff moveq #-1,%d0 <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4a070: 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); 4a076: 2081 movel %d1,%a0@ <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4a078: 4e5e unlk %fp <== NOT EXECUTED 4a07a: 4e75 rts 00043354 : /* * 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 ) 43354: 4280 clrl %d0 43356: 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 */ ) { 43358: 4e56 ffbc linkw %fp,#-68 4335c: 206e 0008 moveal %fp@(8),%a0 43360: 2f03 movel %d3,%sp@- int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 43362: 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 */ ) { 43364: 2f02 movel %d2,%sp@- 43366: 242e 0010 movel %fp@(16),%d2 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 4336a: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 4336e: 3028 0032 movew %a0@(50),%d0 43372: b280 cmpl %d0,%d1 43374: 6578 bcss 433ee 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 ); 43376: 2f02 movel %d2,%sp@- 43378: 260e movel %fp,%d3 4337a: 0683 ffff ffbf addil #-65,%d3 43380: 4eb9 0005 44b4 jsr 544b4 43386: 588f addql #4,%sp 43388: 486e fffc pea %fp@(-4) 4338c: 2f03 movel %d3,%sp@- 4338e: 2f00 movel %d0,%sp@- 43390: 2f02 movel %d2,%sp@- 43392: 4eb9 0004 f87c jsr 4f87c * 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( 43398: 486e ffe0 pea %fp@(-32) 4339c: 2f3c 0000 a1ff movel #41471,%sp@- 433a2: 2f03 movel %d3,%sp@- 433a4: 4878 0003 pea 3 433a8: 2f2e 000c movel %fp@(12),%sp@- 433ac: 4eb9 0004 ea86 jsr 4ea86 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 433b2: 4fef 0024 lea %sp@(36),%sp 433b6: 4a80 tstl %d0 433b8: 674e beqs 43408 <== ALWAYS 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++; 433ba: 206e ffe0 moveal %fp@(-32),%a0 433be: 3028 0032 movew %a0@(50),%d0 433c2: 5280 addql #1,%d0 433c4: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 433c8: 42a7 clrl %sp@- 433ca: 486e fff4 pea %fp@(-12) 433ce: 4eb9 0004 4058 jsr 44058 433d4: 206e ffe0 moveal %fp@(-32),%a0 return 0; 433d8: 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 ); 433da: 4280 clrl %d0 433dc: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 433e2: 242e ffb4 movel %fp@(-76),%d2 433e6: 262e ffb8 movel %fp@(-72),%d3 433ea: 4e5e unlk %fp 433ec: 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 ); 433ee: 4eb9 0005 3138 jsr 53138 <__errno> 433f4: 741f moveq #31,%d2 433f6: 2040 moveal %d0,%a0 433f8: 70ff moveq #-1,%d0 433fa: 2082 movel %d2,%a0@ */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 433fc: 242e ffb4 movel %fp@(-76),%d2 43400: 262e ffb8 movel %fp@(-72),%d3 43404: 4e5e unlk %fp 43406: 4e75 rts ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43408: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 4340e: 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 ); 43412: 2040 moveal %d0,%a0 <== NOT EXECUTED 43414: 720c moveq #12,%d1 <== NOT EXECUTED 43416: 70ff moveq #-1,%d0 <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 43418: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 4341c: 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 ); 4341e: 2081 movel %d1,%a0@ <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 43420: 4e75 rts <== NOT EXECUTED ... 00051bb0 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 51bb0: 4e56 0000 linkw %fp,#0 51bb4: 206e 0008 moveal %fp@(8),%a0 51bb8: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 51bba: 4a88 tstl %a0 51bbc: 6764 beqs 51c22 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51bbe: 7005 moveq #5,%d0 51bc0: b0a8 0048 cmpl %a0@(72),%d0 51bc4: 6640 bnes 51c06 <== ALWAYS 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 ); 51bc6: 4878 0001 pea 1 51bca: 2f2e 000c movel %fp@(12),%sp@- 51bce: 2f08 movel %a0,%sp@- 51bd0: 4eb9 0005 16cc jsr 516cc if ( *block_entry_ptr ) 51bd6: 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 ); 51bda: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 51bdc: 4a92 tstl %a2@ 51bde: 670a beqs 51bea #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 51be0: 4280 clrl %d0 return 0; } 51be2: 246e fffc moveal %fp@(-4),%a2 51be6: 4e5e unlk %fp 51be8: 4e75 rts #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 51bea: 4eb9 0005 16a8 jsr 516a8 if ( !memory ) 51bf0: 4a80 tstl %d0 51bf2: 6706 beqs 51bfa <== ALWAYS TAKEN return 1; *block_entry_ptr = memory; 51bf4: 2480 movel %d0,%a2@ 51bf6: 4280 clrl %d0 51bf8: 60e8 bras 51be2 <== ALWAYS TAKEN return 0; } 51bfa: 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 ) 51bfe: 103c 0001 moveb #1,%d0 <== NOT EXECUTED return 1; *block_entry_ptr = memory; return 0; } 51c02: 4e5e unlk %fp <== NOT EXECUTED 51c04: 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 ); 51c06: 4879 0006 17b4 pea 617b4 <== NOT EXECUTED 51c0c: 4879 0006 18cd pea 618cd <__FUNCTION__.5986> <== NOT EXECUTED 51c12: 4878 016d pea 16d <== NOT EXECUTED 51c16: 4879 0006 176e pea 6176e <== NOT EXECUTED 51c1c: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 51c22: 4879 0006 1764 pea 61764 <== NOT EXECUTED 51c28: 4879 0006 18cd pea 618cd <__FUNCTION__.5986> <== NOT EXECUTED 51c2e: 4878 0169 pea 169 <== NOT EXECUTED 51c32: 4879 0006 176e pea 6176e <== NOT EXECUTED 51c38: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED 00051c3e : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 51c3e: 4e56 ffdc linkw %fp,#-36 51c42: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 51c46: 246e 0008 moveal %fp@(8),%a2 51c4a: 262e 000c movel %fp@(12),%d3 51c4e: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 51c52: 4a8a tstl %a2 51c54: 6700 0102 beqw 51d58 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51c58: 7005 moveq #5,%d0 51c5a: b0aa 0048 cmpl %a2@(72),%d0 51c5e: 6600 0114 bnew 51d74 <== ALWAYS TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 51c62: 2439 0006 31a8 movel 631a8 ,%d2 51c68: 2202 movel %d2,%d1 51c6a: e489 lsrl #2,%d1 51c6c: 2001 movel %d1,%d0 51c6e: 5280 addql #1,%d0 51c70: 4c01 0800 mulsl %d1,%d0 51c74: 4285 clrl %d5 51c76: 5280 addql #1,%d0 51c78: 4c01 0800 mulsl %d1,%d0 51c7c: 5380 subql #1,%d0 51c7e: 4c02 0800 mulsl %d2,%d0 51c82: 2c00 movel %d0,%d6 51c84: 2005 movel %d5,%d0 51c86: 2206 movel %d6,%d1 51c88: 9284 subl %d4,%d1 51c8a: 9183 subxl %d3,%d0 51c8c: 6f00 00b2 blew 51d40 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 51c90: 2a2a 004c movel %a2@(76),%d5 51c94: 2c2a 0050 movel %a2@(80),%d6 51c98: 2003 movel %d3,%d0 51c9a: 2204 movel %d4,%d1 51c9c: 9286 subl %d6,%d1 51c9e: 9185 subxl %d5,%d0 51ca0: 6f62 bles 51d04 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 51ca2: 47f9 0005 ed04 lea 5ed04 <__divdi3>,%a3 51ca8: 2202 movel %d2,%d1 51caa: 5bc0 smi %d0 51cac: 49c0 extbl %d0 51cae: 2840 moveal %d0,%a4 51cb0: 2a41 moveal %d1,%a5 51cb2: 2f0d movel %a5,%sp@- 51cb4: 2f00 movel %d0,%sp@- 51cb6: 2f04 movel %d4,%sp@- 51cb8: 2f03 movel %d3,%sp@- 51cba: 4e93 jsr %a3@ 51cbc: 4fef 0010 lea %sp@(16),%sp 51cc0: 2401 movel %d1,%d2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 51cc2: 2f0d movel %a5,%sp@- 51cc4: 2f0c movel %a4,%sp@- 51cc6: 2f06 movel %d6,%sp@- 51cc8: 2f05 movel %d5,%sp@- 51cca: 4e93 jsr %a3@ 51ccc: 4fef 0010 lea %sp@(16),%sp 51cd0: 2841 moveal %d1,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 51cd2: b282 cmpl %d2,%d1 51cd4: 621a bhis 51cf0 <== ALWAYS TAKEN 51cd6: 2a01 movel %d1,%d5 51cd8: 47f9 0005 1bb0 lea 51bb0 ,%a3 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 51cde: 2f05 movel %d5,%sp@- 51ce0: 2f0a movel %a2,%sp@- 51ce2: 4e93 jsr %a3@ 51ce4: 508f addql #8,%sp 51ce6: 4a80 tstl %d0 51ce8: 6626 bnes 51d10 <== ALWAYS TAKEN /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 51cea: 5285 addql #1,%d5 51cec: ba82 cmpl %d2,%d5 51cee: 63ee blss 51cde /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 51cf0: 4280 clrl %d0 51cf2: 2543 004c movel %d3,%a2@(76) 51cf6: 2544 0050 movel %d4,%a2@(80) return 0; } 51cfa: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 51d00: 4e5e unlk %fp 51d02: 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 ) 51d04: 4280 clrl %d0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 51d06: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 51d0c: 4e5e unlk %fp 51d0e: 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-- ) { 51d10: ba8c cmpl %a4,%d5 <== NOT EXECUTED 51d12: 6514 bcss 51d28 <== NOT EXECUTED 51d14: 47f9 0005 1930 lea 51930 ,%a3 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 51d1a: 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-- ) { 51d1c: 5385 subql #1,%d5 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 51d1e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51d20: 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-- ) { 51d22: 508f addql #8,%sp <== NOT EXECUTED 51d24: ba8c cmpl %a4,%d5 <== NOT EXECUTED 51d26: 64f2 bccs 51d1a <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 51d28: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 51d2e: 721c moveq #28,%d1 <== NOT EXECUTED 51d30: 2040 moveal %d0,%a0 <== NOT EXECUTED 51d32: 70ff moveq #-1,%d0 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 51d34: 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 ); 51d3a: 2081 movel %d1,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 51d3c: 4e5e unlk %fp <== NOT EXECUTED 51d3e: 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 ); 51d40: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 51d46: 7416 moveq #22,%d2 <== NOT EXECUTED 51d48: 2040 moveal %d0,%a0 <== NOT EXECUTED 51d4a: 70ff moveq #-1,%d0 <== NOT EXECUTED 51d4c: 2082 movel %d2,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 51d4e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 51d54: 4e5e unlk %fp <== NOT EXECUTED 51d56: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 51d58: 4879 0006 1764 pea 61764 <== NOT EXECUTED 51d5e: 4879 0006 18e3 pea 618e3 <__FUNCTION__.5937> <== NOT EXECUTED 51d64: 4878 0131 pea 131 <== NOT EXECUTED 51d68: 4879 0006 176e pea 6176e <== NOT EXECUTED 51d6e: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51d74: 4879 0006 17b4 pea 617b4 <== NOT EXECUTED 51d7a: 4879 0006 18e3 pea 618e3 <__FUNCTION__.5937> <== NOT EXECUTED 51d80: 4878 0135 pea 135 <== NOT EXECUTED 51d84: 4879 0006 176e pea 6176e <== NOT EXECUTED 51d8a: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED 000516cc : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 516cc: 4e56 fff0 linkw %fp,#-16 516d0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 516d4: 246e 0008 moveal %fp@(8),%a2 516d8: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 516dc: 4a8a tstl %a2 516de: 6700 01b2 beqw 51892 <== ALWAYS TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 516e2: 7005 moveq #5,%d0 516e4: b0aa 0048 cmpl %a2@(72),%d0 516e8: 6600 01c4 bnew 518ae <== ALWAYS TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 516ec: 2239 0006 31a8 movel 631a8 ,%d1 516f2: e489 lsrl #2,%d1 516f4: 2001 movel %d1,%d0 516f6: 5380 subql #1,%d0 516f8: b082 cmpl %d2,%d0 516fa: 6446 bccs 51742 <== NEVER TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 516fc: 2001 movel %d1,%d0 <== NOT EXECUTED 516fe: 5280 addql #1,%d0 <== NOT EXECUTED 51700: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 51704: 2040 moveal %d0,%a0 <== NOT EXECUTED 51706: 5388 subql #1,%a0 <== NOT EXECUTED 51708: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 5170a: 6500 00c2 bcsw 517ce <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 5170e: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 51710: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 51714: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 51718: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 5171c: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 51720: 6700 0086 beqw 517a8 <== NOT EXECUTED if ( !p ) { 51724: 4a88 tstl %a0 <== NOT EXECUTED 51726: 6750 beqs 51778 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 51728: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 5172c: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 5172e: 4a88 tstl %a0 <== NOT EXECUTED 51730: 6760 beqs 51792 <== 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 ]; 51732: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 51736: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 51738: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5173e: 4e5e unlk %fp <== NOT EXECUTED 51740: 4e75 rts <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 51742: 206a 0054 moveal %a2@(84),%a0 if ( malloc_it ) { 51746: 4aae 0010 tstl %fp@(16) 5174a: 6776 beqs 517c2 if ( !p ) { 5174c: 4a88 tstl %a0 5174e: 6710 beqs 51760 } if ( !p ) return 0; return &info->indirect[ my_block ]; 51750: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 51754: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 51756: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5175c: 4e5e unlk %fp 5175e: 4e75 rts p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 51760: 4eb9 0005 16a8 jsr 516a8 51766: 2040 moveal %d0,%a0 if ( !p ) 51768: 4a80 tstl %d0 5176a: 674a beqs 517b6 <== ALWAYS TAKEN return 0; info->indirect = p; 5176c: 2540 0054 movel %d0,%a2@(84) } if ( !p ) return 0; return &info->indirect[ my_block ]; 51770: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 51774: 2008 movel %a0,%d0 51776: 60de bras 51756 <== ALWAYS TAKEN p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 51778: 4eb9 0005 16a8 jsr 516a8 <== NOT EXECUTED 5177e: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 51780: 4a80 tstl %d0 <== NOT EXECUTED 51782: 6732 beqs 517b6 <== NOT EXECUTED return 0; info->doubly_indirect = p; 51784: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 51788: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 5178c: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 5178e: 4a88 tstl %a0 <== NOT EXECUTED 51790: 66a0 bnes 51732 <== NOT EXECUTED p1 = memfile_alloc_block(); 51792: 4eb9 0005 16a8 jsr 516a8 <== NOT EXECUTED 51798: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 5179a: 4a80 tstl %d0 <== NOT EXECUTED 5179c: 6718 beqs 517b6 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 5179e: 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 ]; 517a0: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 517a4: 2008 movel %a0,%d0 <== NOT EXECUTED 517a6: 6090 bras 51738 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 517a8: 4a88 tstl %a0 <== NOT EXECUTED 517aa: 670a beqs 517b6 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 517ac: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 517b0: 4a88 tstl %a0 <== NOT EXECUTED 517b2: 6600 ff7e bnew 51732 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 517b6: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 517b8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 517be: 4e5e unlk %fp <== NOT EXECUTED 517c0: 4e75 rts <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 517c2: 4a88 tstl %a0 517c4: 67f0 beqs 517b6 <== ALWAYS TAKEN return 0; return &info->indirect[ my_block ]; 517c6: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 517ca: 2008 movel %a0,%d0 517cc: 6088 bras 51756 <== ALWAYS TAKEN #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 517ce: 2600 movel %d0,%d3 <== NOT EXECUTED 517d0: 5283 addql #1,%d3 <== NOT EXECUTED 517d2: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 517d6: 5383 subql #1,%d3 <== NOT EXECUTED 517d8: b682 cmpl %d2,%d3 <== NOT EXECUTED 517da: 65da bcss 517b6 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 517dc: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 517de: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 517e2: 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; 517e6: 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; 517ea: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 517ee: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 517f2: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 517f6: 6778 beqs 51870 <== NOT EXECUTED if ( !p ) { 517f8: 4a88 tstl %a0 <== NOT EXECUTED 517fa: 6756 beqs 51852 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 517fc: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 51800: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 51802: 4a88 tstl %a0 <== NOT EXECUTED 51804: 6730 beqs 51836 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 51806: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 5180a: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 5180c: 4a88 tstl %a0 <== NOT EXECUTED 5180e: 6710 beqs 51820 <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 51810: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 51814: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 51816: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5181c: 4e5e unlk %fp <== NOT EXECUTED 5181e: 4e75 rts <== NOT EXECUTED p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 51820: 4eb9 0005 16a8 jsr 516a8 <== NOT EXECUTED 51826: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p2 ) 51828: 4a80 tstl %d0 <== NOT EXECUTED 5182a: 678a beqs 517b6 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 5182c: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 5182e: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 51832: 2008 movel %a0,%d0 <== NOT EXECUTED 51834: 60e0 bras 51816 <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 51836: 4eb9 0005 16a8 jsr 516a8 <== NOT EXECUTED 5183c: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 5183e: 4a80 tstl %d0 <== NOT EXECUTED 51840: 6700 ff74 beqw 517b6 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 51844: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 51846: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 5184a: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 5184c: 4a88 tstl %a0 <== NOT EXECUTED 5184e: 66c0 bnes 51810 <== NOT EXECUTED 51850: 60ce bras 51820 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 51852: 4eb9 0005 16a8 jsr 516a8 <== NOT EXECUTED 51858: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 5185a: 4a80 tstl %d0 <== NOT EXECUTED 5185c: 6700 ff58 beqw 517b6 <== NOT EXECUTED return 0; info->triply_indirect = p; 51860: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 51864: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 51868: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 5186a: 4a88 tstl %a0 <== NOT EXECUTED 5186c: 6698 bnes 51806 <== NOT EXECUTED 5186e: 60c6 bras 51836 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 51870: 4a88 tstl %a0 <== NOT EXECUTED 51872: 6700 ff42 beqw 517b6 <== 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 ]; 51876: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p1 ) 5187a: 4a88 tstl %a0 <== NOT EXECUTED 5187c: 6700 ff38 beqw 517b6 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 51880: 2004 movel %d4,%d0 <== NOT EXECUTED 51882: e588 lsll #2,%d0 <== NOT EXECUTED 51884: d0b0 3c00 addl %a0@(00000000,%d3:l:4),%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 51888: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5188e: 4e5e unlk %fp <== NOT EXECUTED 51890: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 51892: 4879 0006 1764 pea 61764 <== NOT EXECUTED 51898: 4879 0006 183e pea 6183e <__FUNCTION__.6296> <== NOT EXECUTED 5189e: 4878 0388 pea 388 <== NOT EXECUTED 518a2: 4879 0006 176e pea 6176e <== NOT EXECUTED 518a8: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 518ae: 4879 0006 17b4 pea 617b4 <== NOT EXECUTED 518b4: 4879 0006 183e pea 6183e <__FUNCTION__.6296> <== NOT EXECUTED 518ba: 4878 038c pea 38c <== NOT EXECUTED 518be: 4879 0006 176e pea 6176e <== NOT EXECUTED 518c4: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED 00052248 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 52248: 4e56 ffc0 linkw %fp,#-64 5224c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52250: 246e 0008 moveal %fp@(8),%a2 52254: 2a6e 0014 moveal %fp@(20),%a5 52258: 262e 0018 movel %fp@(24),%d3 5225c: 282e 000c movel %fp@(12),%d4 52260: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 52264: 4a8a tstl %a2 52266: 6700 0266 beqw 524ce <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 5226a: 202a 0048 movel %a2@(72),%d0 5226e: 2040 moveal %d0,%a0 52270: 5b88 subql #5,%a0 52272: 7c01 moveq #1,%d6 52274: bc88 cmpl %a0,%d6 52276: 6500 023a bcsw 524b2 <== ALWAYS TAKEN /* * Error checks on arguments */ assert( dest ); 5227a: 4a8d tstl %a5 5227c: 6700 01fc beqw 5247a <== ALWAYS TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 52280: 4a83 tstl %d3 52282: 6700 01c2 beqw 52446 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 52286: 7e06 moveq #6,%d7 52288: be80 cmpl %d0,%d7 5228a: 6700 0136 beqw 523c2 <== ALWAYS TAKEN * 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 ) 5228e: 2043 moveal %d3,%a0 52290: d1c5 addal %d5,%a0 52292: 2408 movel %a0,%d2 52294: 4281 clrl %d1 52296: 206a 004c moveal %a2@(76),%a0 5229a: 226a 0050 moveal %a2@(80),%a1 5229e: 2c08 movel %a0,%d6 522a0: 2e09 movel %a1,%d7 522a2: 9e82 subl %d2,%d7 522a4: 9d81 subxl %d1,%d6 522a6: 6c04 bges 522ac <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 522a8: 2609 movel %a1,%d3 522aa: 9685 subl %d5,%d3 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 522ac: 2439 0006 31a8 movel 631a8 ,%d2 522b2: 2202 movel %d2,%d1 522b4: 5bc0 smi %d0 522b6: 49c0 extbl %d0 522b8: 2640 moveal %d0,%a3 522ba: 2841 moveal %d1,%a4 522bc: 2f0c movel %a4,%sp@- 522be: 2f00 movel %d0,%sp@- 522c0: 2f05 movel %d5,%sp@- 522c2: 2f04 movel %d4,%sp@- 522c4: 4eb9 0005 f0bc jsr 5f0bc <__moddi3> 522ca: 4fef 0010 lea %sp@(16),%sp 522ce: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 522d0: 2f0c movel %a4,%sp@- 522d2: 2f0b movel %a3,%sp@- 522d4: 2f05 movel %d5,%sp@- 522d6: 2f04 movel %d4,%sp@- 522d8: 4eb9 0005 ed04 jsr 5ed04 <__divdi3> 522de: 4fef 0010 lea %sp@(16),%sp 522e2: 2801 movel %d1,%d4 if ( start_offset ) { 522e4: 4a87 tstl %d7 522e6: 6700 00d2 beqw 523ba 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 ); 522ea: 42a7 clrl %sp@- 522ec: 2f01 movel %d1,%sp@- 522ee: 2f0a movel %a2,%sp@- 522f0: 4eb9 0005 16cc jsr 516cc assert( block_ptr ); 522f6: 4fef 000c lea %sp@(12),%sp 522fa: 4a80 tstl %d0 522fc: 6700 01ec beqw 524ea <== ALWAYS TAKEN */ 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; 52300: 9487 subl %d7,%d2 52302: 2643 moveal %d3,%a3 52304: b483 cmpl %d3,%d2 52306: 6500 0116 bcsw 5241e 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 ); 5230a: 2f0b movel %a3,%sp@- 5230c: 2040 moveal %d0,%a0 5230e: de90 addl %a0@,%d7 dest += to_copy; block++; 52310: 5284 addql #1,%d4 my_length -= to_copy; 52312: 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 ); 52314: 2f07 movel %d7,%sp@- dest += to_copy; 52316: 2e0d movel %a5,%d7 52318: 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 ); 5231a: 2f0d movel %a5,%sp@- 5231c: 4eb9 0005 3958 jsr 53958 dest += to_copy; block++; my_length -= to_copy; 52322: 2439 0006 31a8 movel 631a8 ,%d2 52328: 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 ) { 5232c: b483 cmpl %d3,%d2 5232e: 623c bhis 5236c 52330: 49f9 0005 16cc lea 516cc ,%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 ); 52336: 4bf9 0005 3958 lea 53958 ,%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 ); 5233c: 42a7 clrl %sp@- 5233e: 2f04 movel %d4,%sp@- 52340: 2f0a movel %a2,%sp@- 52342: 4e94 jsr %a4@ assert( block_ptr ); 52344: 4fef 000c lea %sp@(12),%sp 52348: 4a80 tstl %d0 5234a: 6700 0112 beqw 5245e <== ALWAYS TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 5234e: 2040 moveal %d0,%a0 dest += to_copy; block++; 52350: 5284 addql #1,%d4 my_length -= to_copy; 52352: 9682 subl %d2,%d3 copied += to_copy; 52354: 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 ); 52356: 2f02 movel %d2,%sp@- 52358: 2f10 movel %a0@,%sp@- 5235a: 2f07 movel %d7,%sp@- dest += to_copy; 5235c: 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 ); 5235e: 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 ) { 52360: 4fef 000c lea %sp@(12),%sp 52364: b6b9 0006 31a8 cmpl 631a8 ,%d3 5236a: 64d0 bccs 5233c * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 5236c: 4a83 tstl %d3 5236e: 672a beqs 5239a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 52370: 42a7 clrl %sp@- 52372: 2f04 movel %d4,%sp@- 52374: 2f0a movel %a2,%sp@- 52376: 4eb9 0005 16cc jsr 516cc assert( block_ptr ); 5237c: 4fef 000c lea %sp@(12),%sp 52380: 4a80 tstl %d0 52382: 6700 0112 beqw 52496 <== ALWAYS TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 52386: 2040 moveal %d0,%a0 copied += my_length; 52388: 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 ); 5238a: 2f03 movel %d3,%sp@- 5238c: 2f10 movel %a0@,%sp@- 5238e: 2f07 movel %d7,%sp@- 52390: 4eb9 0005 3958 jsr 53958 copied += my_length; 52396: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 5239a: 42a7 clrl %sp@- 5239c: 486e fff8 pea %fp@(-8) 523a0: 4eb9 0004 4058 jsr 44058 523a6: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 523ac: 200b movel %a3,%d0 523ae: 508f addql #8,%sp } 523b0: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 523b6: 4e5e unlk %fp 523b8: 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 ) { 523ba: 2e0d movel %a5,%d7 523bc: 97cb subal %a3,%a3 523be: 6000 ff6c braw 5232c <== ALWAYS TAKEN 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)) 523c2: 2843 moveal %d3,%a4 <== NOT EXECUTED 523c4: 97cb subal %a3,%a3 <== NOT EXECUTED 523c6: 202a 004c movel %a2@(76),%d0 <== NOT EXECUTED 523ca: 222a 0050 movel %a2@(80),%d1 <== NOT EXECUTED 523ce: 2c0b movel %a3,%d6 <== NOT EXECUTED 523d0: 2e0c movel %a4,%d7 <== NOT EXECUTED 523d2: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 523d6: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED 523da: 9285 subl %d5,%d1 <== NOT EXECUTED 523dc: 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; 523de: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 523e2: 9e81 subl %d1,%d7 <== NOT EXECUTED 523e4: 9d80 subxl %d0,%d6 <== NOT EXECUTED 523e6: 6f06 bles 523ee <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 523e8: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 523ec: 9685 subl %d5,%d3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 523ee: 2f03 movel %d3,%sp@- <== NOT EXECUTED 523f0: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 523f4: 2f0d movel %a5,%sp@- <== NOT EXECUTED 523f6: 4eb9 0005 3958 jsr 53958 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 523fc: 42a7 clrl %sp@- <== NOT EXECUTED 523fe: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 52402: 4eb9 0004 4058 jsr 44058 <== NOT EXECUTED 52408: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 5240e: 2003 movel %d3,%d0 <== NOT EXECUTED 52410: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 52414: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5241a: 4e5e unlk %fp <== NOT EXECUTED 5241c: 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; 5241e: 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 ); 52420: 2040 moveal %d0,%a0 dest += to_copy; block++; 52422: 5284 addql #1,%d4 my_length -= to_copy; 52424: 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 ); 52426: 2f0b movel %a3,%sp@- 52428: de90 addl %a0@,%d7 5242a: 2f07 movel %d7,%sp@- dest += to_copy; 5242c: 2e0d movel %a5,%d7 5242e: 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 ); 52430: 2f0d movel %a5,%sp@- 52432: 4eb9 0005 3958 jsr 53958 dest += to_copy; block++; my_length -= to_copy; 52438: 2439 0006 31a8 movel 631a8 ,%d2 5243e: 4fef 000c lea %sp@(12),%sp 52442: 6000 fee8 braw 5232c <== ALWAYS TAKEN * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 52446: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 5244c: 7e16 moveq #22,%d7 <== NOT EXECUTED 5244e: 2040 moveal %d0,%a0 <== NOT EXECUTED 52450: 70ff moveq #-1,%d0 <== NOT EXECUTED 52452: 2087 movel %d7,%a0@ <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 52454: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5245a: 4e5e unlk %fp <== NOT EXECUTED 5245c: 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 ); 5245e: 4879 0006 17e4 pea 617e4 <== NOT EXECUTED 52464: 4879 0006 1870 pea 61870 <__FUNCTION__.6123> <== NOT EXECUTED 5246a: 4878 02a7 pea 2a7 <== NOT EXECUTED 5246e: 4879 0006 176e pea 6176e <== NOT EXECUTED 52474: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 5247a: 4879 0006 1839 pea 61839 <== NOT EXECUTED 52480: 4879 0006 1870 pea 61870 <__FUNCTION__.6123> <== NOT EXECUTED 52486: 4878 025a pea 25a <== NOT EXECUTED 5248a: 4879 0006 176e pea 6176e <== NOT EXECUTED 52490: 4eb9 0004 fb34 jsr 4fb34 <__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 ); 52496: 4879 0006 17e4 pea 617e4 <== NOT EXECUTED 5249c: 4879 0006 1870 pea 61870 <__FUNCTION__.6123> <== NOT EXECUTED 524a2: 4878 02b9 pea 2b9 <== NOT EXECUTED 524a6: 4879 0006 176e pea 6176e <== NOT EXECUTED 524ac: 4eb9 0004 fb34 jsr 4fb34 <__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 || 524b2: 4879 0006 17ee pea 617ee <== NOT EXECUTED 524b8: 4879 0006 1870 pea 61870 <__FUNCTION__.6123> <== NOT EXECUTED 524be: 4878 0251 pea 251 <== NOT EXECUTED 524c2: 4879 0006 176e pea 6176e <== NOT EXECUTED 524c8: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 524ce: 4879 0006 1764 pea 61764 <== NOT EXECUTED 524d4: 4879 0006 1870 pea 61870 <__FUNCTION__.6123> <== NOT EXECUTED 524da: 4878 024c pea 24c <== NOT EXECUTED 524de: 4879 0006 176e pea 6176e <== NOT EXECUTED 524e4: 4eb9 0004 fb34 jsr 4fb34 <__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 ); 524ea: 4879 0006 17e4 pea 617e4 <== NOT EXECUTED 524f0: 4879 0006 1870 pea 61870 <__FUNCTION__.6123> <== NOT EXECUTED 524f6: 4878 0296 pea 296 <== NOT EXECUTED 524fa: 4879 0006 176e pea 6176e <== NOT EXECUTED 52500: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED 0005197c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 5197c: 4e56 ffe0 linkw %fp,#-32 51980: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 51984: 286e 0008 moveal %fp@(8),%a4 /* * Perform internal consistency checks */ assert( the_jnode ); 51988: 4a8c tstl %a4 5198a: 6700 010c beqw 51a98 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 5198e: 7005 moveq #5,%d0 51990: b0ac 0048 cmpl %a4@(72),%d0 51994: 6600 011e bnew 51ab4 <== ALWAYS TAKEN /* * 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; 51998: 2839 0006 31a8 movel 631a8 ,%d4 5199e: e48c lsrl #2,%d4 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 519a0: 4aac 0054 tstl %a4@(84) 519a4: 670e beqs 519b4 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 519a6: 2f04 movel %d4,%sp@- 519a8: 486c 0054 pea %a4@(84) 519ac: 4eb9 0005 18ca jsr 518ca 519b2: 508f addql #8,%sp } if ( info->doubly_indirect ) { 519b4: 206c 0058 moveal %a4@(88),%a0 519b8: 4a88 tstl %a0 519ba: 674a beqs 51a06 <== NEVER TAKEN for ( i=0 ; i,%d1 <== NOT EXECUTED 519c2: 2001 movel %d1,%d0 <== NOT EXECUTED 519c4: 47f9 0005 18ca lea 518ca ,%a3 <== NOT EXECUTED 519ca: e488 lsrl #2,%d0 <== NOT EXECUTED 519cc: 672e beqs 519fc <== NOT EXECUTED 519ce: 4280 clrl %d0 <== NOT EXECUTED 519d0: 4282 clrl %d2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 519d2: e588 lsll #2,%d0 <== NOT EXECUTED 519d4: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 519d8: 6710 beqs 519ea <== NOT EXECUTED memfile_free_blocks_in_table( 519da: 2f04 movel %d4,%sp@- <== NOT EXECUTED 519dc: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 519e0: 4e93 jsr %a3@ <== NOT EXECUTED 519e2: 2239 0006 31a8 movel 631a8 ,%d1 <== NOT EXECUTED 519e8: 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 519f6: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 519fa: 60d6 bras 519d2 <== 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 ); 519fc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 519fe: 486c 0058 pea %a4@(88) <== NOT EXECUTED 51a02: 4e93 jsr %a3@ <== NOT EXECUTED 51a04: 508f addql #8,%sp <== NOT EXECUTED } if ( info->triply_indirect ) { 51a06: 206c 005c moveal %a4@(92),%a0 51a0a: 4a88 tstl %a0 51a0c: 677e beqs 51a8c <== NEVER TAKEN for ( i=0 ; i,%d1 <== NOT EXECUTED 51a14: 2001 movel %d1,%d0 <== NOT EXECUTED 51a16: 47f9 0005 18ca lea 518ca ,%a3 <== NOT EXECUTED 51a1c: e488 lsrl #2,%d0 <== NOT EXECUTED 51a1e: 6762 beqs 51a82 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 51a20: 2450 moveal %a0@,%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 51a22: 4a8a tstl %a2 <== NOT EXECUTED 51a24: 675c beqs 51a82 <== NOT EXECUTED 51a26: 4286 clrl %d6 <== NOT EXECUTED 51a28: 4285 clrl %d5 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 51a2e: 4280 clrl %d0 <== NOT EXECUTED 51a30: 4282 clrl %d2 <== NOT EXECUTED if ( p[j] ) { 51a32: e588 lsll #2,%d0 <== NOT EXECUTED 51a34: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 51a38: 6710 beqs 51a4a <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 51a3a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51a3c: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 51a40: 4e93 jsr %a3@ <== NOT EXECUTED 51a42: 2239 0006 31a8 movel 631a8 ,%d1 <== NOT EXECUTED 51a48: 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( 51a56: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51a58: 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 51a68: 2001 movel %d1,%d0 <== NOT EXECUTED 51a6a: 508f addql #8,%sp <== NOT EXECUTED 51a6c: e488 lsrl #2,%d0 <== NOT EXECUTED 51a6e: ba80 cmpl %d0,%d5 <== NOT EXECUTED 51a70: 6410 bccs 51a82 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 51a72: 2c05 movel %d5,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 51a74: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 51a78: e58e lsll #2,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 51a7a: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 51a7e: 4a8a tstl %a2 <== NOT EXECUTED 51a80: 66a8 bnes 51a2a <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 51a82: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51a84: 486c 005c pea %a4@(92) <== NOT EXECUTED 51a88: 4e93 jsr %a3@ <== NOT EXECUTED 51a8a: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 51a8c: 4280 clrl %d0 51a8e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 51a94: 4e5e unlk %fp 51a96: 4e75 rts /* * Perform internal consistency checks */ assert( the_jnode ); 51a98: 4879 0006 1764 pea 61764 <== NOT EXECUTED 51a9e: 4879 0006 1882 pea 61882 <__FUNCTION__.6048> <== NOT EXECUTED 51aa4: 4878 01ee pea 1ee <== NOT EXECUTED 51aa8: 4879 0006 176e pea 6176e <== NOT EXECUTED 51aae: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51ab4: 4879 0006 17b4 pea 617b4 <== NOT EXECUTED 51aba: 4879 0006 1882 pea 61882 <__FUNCTION__.6048> <== NOT EXECUTED 51ac0: 4878 01f2 pea 1f2 <== NOT EXECUTED 51ac4: 4879 0006 176e pea 6176e <== NOT EXECUTED 51aca: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED 00051930 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 51930: 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 ); 51934: 42a7 clrl %sp@- <== NOT EXECUTED 51936: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5193a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 5193e: 4eb9 0005 16cc jsr 516cc <== NOT EXECUTED assert( block_ptr ); 51944: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51948: 4a80 tstl %d0 <== NOT EXECUTED 5194a: 6714 beqs 51960 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 5194c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5194e: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 51950: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 51952: 2f01 movel %d1,%sp@- <== NOT EXECUTED 51954: 4eb9 0005 168e jsr 5168e <== NOT EXECUTED } return 1; } 5195a: 7001 moveq #1,%d0 <== NOT EXECUTED 5195c: 4e5e unlk %fp <== NOT EXECUTED 5195e: 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 ); 51960: 4879 0006 17e4 pea 617e4 <== NOT EXECUTED 51966: 4879 0006 18b3 pea 618b3 <__FUNCTION__.6012> <== NOT EXECUTED 5196c: 4878 0196 pea 196 <== NOT EXECUTED 51970: 4879 0006 176e pea 6176e <== NOT EXECUTED 51976: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED 00051eb6 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 51eb6: 4e56 ffd0 linkw %fp,#-48 51eba: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51ebe: 246e 0008 moveal %fp@(8),%a2 51ec2: 2a6e 0014 moveal %fp@(20),%a5 51ec6: 262e 0018 movel %fp@(24),%d3 51eca: 282e 000c movel %fp@(12),%d4 51ece: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 51ed2: 4a8a tstl %a2 51ed4: 6700 01f8 beqw 520ce <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51ed8: 7405 moveq #5,%d2 51eda: b4aa 0048 cmpl %a2@(72),%d2 51ede: 6600 01d2 bnew 520b2 <== ALWAYS TAKEN /* * Error check arguments */ assert( source ); 51ee2: 4a8d tstl %a5 51ee4: 6700 0204 beqw 520ea <== ALWAYS TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 51ee8: 4a83 tstl %d3 51eea: 6700 0190 beqw 5207c <== ALWAYS TAKEN * 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 ) { 51eee: 2043 moveal %d3,%a0 51ef0: d1c5 addal %d5,%a0 51ef2: 2208 movel %a0,%d1 51ef4: 4280 clrl %d0 51ef6: 2c2a 004c movel %a2@(76),%d6 51efa: 2e2a 0050 movel %a2@(80),%d7 51efe: 9e81 subl %d1,%d7 51f00: 9d80 subxl %d0,%d6 51f02: 6d00 011e bltw 52022 <== NEVER TAKEN /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 51f06: 2439 0006 31a8 movel 631a8 ,%d2 51f0c: 2202 movel %d2,%d1 51f0e: 5bc0 smi %d0 51f10: 49c0 extbl %d0 51f12: 2640 moveal %d0,%a3 51f14: 2841 moveal %d1,%a4 51f16: 2f0c movel %a4,%sp@- 51f18: 2f00 movel %d0,%sp@- 51f1a: 2f05 movel %d5,%sp@- 51f1c: 2f04 movel %d4,%sp@- 51f1e: 4eb9 0005 f0bc jsr 5f0bc <__moddi3> 51f24: 4fef 0010 lea %sp@(16),%sp 51f28: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 51f2a: 2f0c movel %a4,%sp@- 51f2c: 2f0b movel %a3,%sp@- 51f2e: 2f05 movel %d5,%sp@- 51f30: 2f04 movel %d4,%sp@- 51f32: 4eb9 0005 ed04 jsr 5ed04 <__divdi3> 51f38: 4fef 0010 lea %sp@(16),%sp 51f3c: 2801 movel %d1,%d4 if ( start_offset ) { 51f3e: 4a87 tstl %d7 51f40: 6700 00d8 beqw 5201a 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 ); 51f44: 42a7 clrl %sp@- 51f46: 2f01 movel %d1,%sp@- 51f48: 2f0a movel %a2,%sp@- 51f4a: 4eb9 0005 16cc jsr 516cc assert( block_ptr ); 51f50: 4fef 000c lea %sp@(12),%sp 51f54: 4a80 tstl %d0 51f56: 6700 01ca beqw 52122 <== ALWAYS TAKEN */ 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; 51f5a: 9487 subl %d7,%d2 51f5c: b682 cmpl %d2,%d3 51f5e: 6500 00f2 bcsw 52052 <== NEVER TAKEN 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 ); 51f62: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51f64: 2040 moveal %d0,%a0 <== NOT EXECUTED src += to_copy; 51f66: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 <== NOT EXECUTED block++; my_length -= to_copy; 51f6a: 9682 subl %d2,%d3 <== NOT EXECUTED copied += to_copy; 51f6c: 2a02 movel %d2,%d5 <== NOT EXECUTED #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 51f6e: 5284 addql #1,%d4 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 51f70: 2f0d movel %a5,%sp@- <== NOT EXECUTED 51f72: de90 addl %a0@,%d7 <== NOT EXECUTED 51f74: 2f07 movel %d7,%sp@- <== NOT EXECUTED 51f76: 4eb9 0005 3958 jsr 53958 <== NOT EXECUTED src += to_copy; block++; my_length -= to_copy; copied += to_copy; 51f7c: 2439 0006 31a8 movel 631a8 ,%d2 <== NOT EXECUTED 51f82: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 51f86: b483 cmpl %d3,%d2 51f88: 623c bhis 51fc6 51f8a: 49f9 0005 16cc lea 516cc ,%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 ); 51f90: 4bf9 0005 3958 lea 53958 ,%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 ); 51f96: 42a7 clrl %sp@- 51f98: 2f04 movel %d4,%sp@- 51f9a: 2f0a movel %a2,%sp@- 51f9c: 4e94 jsr %a4@ assert( block_ptr ); 51f9e: 4fef 000c lea %sp@(12),%sp 51fa2: 4a80 tstl %d0 51fa4: 6700 00f0 beqw 52096 <== ALWAYS TAKEN 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 ); 51fa8: 2f02 movel %d2,%sp@- 51faa: 2040 moveal %d0,%a0 src += to_copy; block++; 51fac: 5284 addql #1,%d4 my_length -= to_copy; 51fae: 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( 51fb0: 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 ); 51fb2: 2f0b movel %a3,%sp@- 51fb4: 2f10 movel %a0@,%sp@- src += to_copy; 51fb6: 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 ); 51fb8: 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 ) { 51fba: 4fef 000c lea %sp@(12),%sp 51fbe: b6b9 0006 31a8 cmpl 631a8 ,%d3 51fc4: 64d0 bccs 51f96 <== ALWAYS TAKEN */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 51fc6: 4a83 tstl %d3 51fc8: 672a beqs 51ff4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 51fca: 42a7 clrl %sp@- 51fcc: 2f04 movel %d4,%sp@- 51fce: 2f0a movel %a2,%sp@- 51fd0: 4eb9 0005 16cc jsr 516cc assert( block_ptr ); 51fd6: 4fef 000c lea %sp@(12),%sp 51fda: 4a80 tstl %d0 51fdc: 6700 0128 beqw 52106 <== ALWAYS TAKEN 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 ); 51fe0: 2f03 movel %d3,%sp@- 51fe2: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 51fe4: 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 ); 51fe6: 2f0b movel %a3,%sp@- 51fe8: 2f10 movel %a0@,%sp@- 51fea: 4eb9 0005 3958 jsr 53958 my_length = 0; copied += to_copy; 51ff0: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 51ff4: 42a7 clrl %sp@- 51ff6: 486e fff8 pea %fp@(-8) 51ffa: 4eb9 0004 4058 jsr 44058 52000: 202e fff8 movel %fp@(-8),%d0 return copied; 52004: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 52006: 2540 0044 movel %d0,%a2@(68) 5200a: 2540 0040 movel %d0,%a2@(64) return copied; } 5200e: 2005 movel %d5,%d0 52010: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 52016: 4e5e unlk %fp 52018: 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 ) { 5201a: 264d moveal %a5,%a3 5201c: 4285 clrl %d5 5201e: 6000 ff66 braw 51f86 <== ALWAYS TAKEN * 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 ); 52022: 2f08 movel %a0,%sp@- 52024: 2f00 movel %d0,%sp@- 52026: 2f0a movel %a2,%sp@- 52028: 4eb9 0005 1c3e jsr 51c3e if ( status ) 5202e: 4fef 000c lea %sp@(12),%sp 52032: 4a80 tstl %d0 52034: 6700 fed0 beqw 51f06 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 52038: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 5203e: 7aff moveq #-1,%d5 <== NOT EXECUTED 52040: 781c moveq #28,%d4 <== NOT EXECUTED 52042: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52044: 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 ); 52046: 2084 movel %d4,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52048: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5204e: 4e5e unlk %fp <== NOT EXECUTED 52050: 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; 52052: 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 ); 52054: 2040 moveal %d0,%a0 src += to_copy; 52056: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 block++; my_length -= to_copy; 5205a: 9682 subl %d2,%d3 copied += to_copy; 5205c: 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++; 5205e: 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 ); 52060: 2f02 movel %d2,%sp@- 52062: 2f0d movel %a5,%sp@- 52064: de90 addl %a0@,%d7 52066: 2f07 movel %d7,%sp@- 52068: 4eb9 0005 3958 jsr 53958 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 5206e: 2439 0006 31a8 movel 631a8 ,%d2 52074: 4fef 000c lea %sp@(12),%sp 52078: 6000 ff0c braw 51f86 <== ALWAYS TAKEN * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 5207c: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 52082: 7aff moveq #-1,%d5 <== NOT EXECUTED 52084: 7c16 moveq #22,%d6 <== NOT EXECUTED 52086: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52088: 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 ); 5208a: 2086 movel %d6,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 5208c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52092: 4e5e unlk %fp <== NOT EXECUTED 52094: 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 ); 52096: 4879 0006 17e4 pea 617e4 <== NOT EXECUTED 5209c: 4879 0006 185d pea 6185d <__FUNCTION__.6215> <== NOT EXECUTED 520a2: 4878 0330 pea 330 <== NOT EXECUTED 520a6: 4879 0006 176e pea 6176e <== NOT EXECUTED 520ac: 4eb9 0004 fb34 jsr 4fb34 <__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 ); 520b2: 4879 0006 17b4 pea 617b4 <== NOT EXECUTED 520b8: 4879 0006 185d pea 6185d <__FUNCTION__.6215> <== NOT EXECUTED 520be: 4878 02e7 pea 2e7 <== NOT EXECUTED 520c2: 4879 0006 176e pea 6176e <== NOT EXECUTED 520c8: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 520ce: 4879 0006 1764 pea 61764 <== NOT EXECUTED 520d4: 4879 0006 185d pea 6185d <__FUNCTION__.6215> <== NOT EXECUTED 520da: 4878 02e3 pea 2e3 <== NOT EXECUTED 520de: 4879 0006 176e pea 6176e <== NOT EXECUTED 520e4: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 520ea: 4879 0006 1083 pea 61083 <== NOT EXECUTED 520f0: 4879 0006 185d pea 6185d <__FUNCTION__.6215> <== NOT EXECUTED 520f6: 4878 02ef pea 2ef <== NOT EXECUTED 520fa: 4879 0006 176e pea 6176e <== NOT EXECUTED 52100: 4eb9 0004 fb34 jsr 4fb34 <__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 ); 52106: 4879 0006 17e4 pea 617e4 <== NOT EXECUTED 5210c: 4879 0006 185d pea 6185d <__FUNCTION__.6215> <== NOT EXECUTED 52112: 4878 0346 pea 346 <== NOT EXECUTED 52116: 4879 0006 176e pea 6176e <== NOT EXECUTED 5211c: 4eb9 0004 fb34 jsr 4fb34 <__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 ); 52122: 4879 0006 17e4 pea 617e4 <== NOT EXECUTED 52128: 4879 0006 185d pea 6185d <__FUNCTION__.6215> <== NOT EXECUTED 5212e: 4878 031c pea 31c <== NOT EXECUTED 52132: 4879 0006 176e pea 6176e <== NOT EXECUTED 52138: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED 0004a07c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a07c: 4e56 ffb0 linkw %fp,#-80 4a080: 48d7 007c moveml %d2-%d6,%sp@ 4a084: 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 ); 4a088: 260e movel %fp,%d3 4a08a: 0683 ffff ffc7 addil #-57,%d3 4a090: 2f02 movel %d2,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a092: 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 ); 4a096: 4eb9 0004 ebd4 jsr 4ebd4 4a09c: 588f addql #4,%sp 4a09e: 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 */ ) { 4a0a2: 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 ); 4a0a6: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a0a8: 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 ); 4a0ac: 2f00 movel %d0,%sp@- 4a0ae: 2f02 movel %d2,%sp@- 4a0b0: 4eb9 0004 9e58 jsr 49e58 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4a0b6: 4fef 0010 lea %sp@(16),%sp 4a0ba: 2004 movel %d4,%d0 4a0bc: 0280 0000 f000 andil #61440,%d0 4a0c2: 0c80 0000 4000 cmpil #16384,%d0 4a0c8: 675e beqs 4a128 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4a0ca: 0c80 0000 8000 cmpil #32768,%d0 4a0d0: 6750 beqs 4a122 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4a0d2: 0c80 0000 6000 cmpil #24576,%d0 4a0d8: 673c beqs 4a116 4a0da: 0c80 0000 2000 cmpil #8192,%d0 4a0e0: 6734 beqs 4a116 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 4a0e2: 0c80 0000 1000 cmpil #4096,%d0 4a0e8: 6642 bnes 4a12c <== ALWAYS TAKEN 4a0ea: 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( 4a0ee: 486e ffe8 pea %fp@(-24) 4a0f2: 2f04 movel %d4,%sp@- 4a0f4: 2f03 movel %d3,%sp@- 4a0f6: 2f00 movel %d0,%sp@- 4a0f8: 2f2e 0018 movel %fp@(24),%sp@- 4a0fc: 4eb9 0004 c7ae jsr 4c7ae new_name, mode, &info ); if ( !new_node ) 4a102: 4fef 0014 lea %sp@(20),%sp 4a106: 4a80 tstl %d0 4a108: 673a beqs 4a144 <== ALWAYS TAKEN 4a10a: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4a10c: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 4a112: 4e5e unlk %fp 4a114: 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 ); 4a116: 2d46 ffe8 movel %d6,%fp@(-24) 4a11a: 7002 moveq #2,%d0 4a11c: 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) ) { 4a120: 60cc bras 4a0ee <== ALWAYS TAKEN /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4a122: 303c 0005 movew #5,%d0 4a126: 60c6 bras 4a0ee <== ALWAYS TAKEN 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 ); 4a128: 7001 moveq #1,%d0 4a12a: 60c2 bras 4a0ee <== ALWAYS TAKEN 4a12c: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 4a132: 7416 moveq #22,%d2 <== NOT EXECUTED 4a134: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a136: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a138: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4a13a: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 4a140: 4e5e unlk %fp <== NOT EXECUTED 4a142: 4e75 rts <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4a144: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 4a14a: 720c moveq #12,%d1 <== NOT EXECUTED 4a14c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a14e: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4a150: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4a156: 2081 movel %d1,%a0@ <== NOT EXECUTED return 0; } 4a158: 4e5e unlk %fp <== NOT EXECUTED 4a15a: 4e75 rts 00043504 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 43504: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 43506: 4e56 0000 linkw %fp,#0 4350a: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4350e: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 43512: b0a8 0048 cmpl %a0@(72),%d0 43516: 660a bnes 43522 <== ALWAYS TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 43518: 2149 0058 movel %a1,%a0@(88) 4351c: 4280 clrl %d0 return 0; } 4351e: 4e5e unlk %fp 43520: 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 ); 43522: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 43528: 7214 moveq #20,%d1 <== NOT EXECUTED 4352a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4352c: 70ff moveq #-1,%d0 <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 4352e: 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 ); 43530: 2081 movel %d1,%a0@ <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 43532: 4e75 rts 00043b72 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43b72: 4e56 0000 linkw %fp,#0 43b76: 2f0a movel %a2,%sp@- 43b78: 246e 0008 moveal %fp@(8),%a2 assert( the_jnode ); 43b7c: 4a8a tstl %a2 43b7e: 6700 01ee beqw 43d6e <== ALWAYS TAKEN fprintf(stdout, "%s", the_jnode->name ); 43b82: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 43b88: 2f28 0008 movel %a0@(8),%sp@- 43b8c: 486a 000c pea %a2@(12) 43b90: 4eb9 0005 2318 jsr 52318 switch( the_jnode->type ) { 43b96: 202a 0048 movel %a2@(72),%d0 43b9a: 508f addql #8,%sp 43b9c: 7207 moveq #7,%d1 43b9e: b280 cmpl %d0,%d1 43ba0: 6434 bccs 43bd6 <== NEVER TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 43ba2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ba4: 4879 0006 12a8 pea 612a8 <== NOT EXECUTED 43baa: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 <== NOT EXECUTED 43bb0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43bb4: 4eb9 0005 21ac jsr 521ac <== NOT EXECUTED assert(0); 43bba: 4879 0006 0969 pea 60969 <== NOT EXECUTED 43bc0: 4879 0006 1398 pea 61398 <__FUNCTION__.6535> <== NOT EXECUTED 43bc6: 4878 006c pea 6c <== NOT EXECUTED 43bca: 4879 0006 120a pea 6120a <== NOT EXECUTED 43bd0: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 43bd6: 323b 0a08 movew %pc@(43be0 ,%d0:l:2),%d1 43bda: 48c1 extl %d1 43bdc: 4efb 1802 jmp %pc@(43be0 ,%d1:l) 43be0: ffc2 0177702 <== NOT EXECUTED 43be2: 0162 bchg %d0,%a2@- <== NOT EXECUTED 43be4: 012a 00f0 btst %d0,%a2@(240) <== NOT EXECUTED 43be8: 00b6 0082 004a oril #8519754,%d6 <== NOT EXECUTED 43bee: 0010 020 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 43bf0: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 <== NOT EXECUTED 43bf6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43bfa: 4878 0012 pea 12 <== NOT EXECUTED 43bfe: 4878 0001 pea 1 <== NOT EXECUTED 43c02: 4879 0006 1295 pea 61295 <== NOT EXECUTED 43c08: 4eb9 0005 2ee0 jsr 52ee0 <== NOT EXECUTED assert(0); 43c0e: 4879 0006 0969 pea 60969 <== NOT EXECUTED 43c14: 4879 0006 1398 pea 61398 <__FUNCTION__.6535> <== NOT EXECUTED 43c1a: 4878 0067 pea 67 <== NOT EXECUTED 43c1e: 4879 0006 120a pea 6120a <== NOT EXECUTED 43c24: 4eb9 0004 4648 jsr 44648 <__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)", 43c2a: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 43c2e: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 43c32: 4879 0006 1266 pea 61266 <== NOT EXECUTED 43c38: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 <== NOT EXECUTED 43c3e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43c42: 4eb9 0005 21ac jsr 521ac <== NOT EXECUTED fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43c48: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c4c: 203c 0006 1972 movel #399730,%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; 43c52: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c56: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43c5a: 4e5e unlk %fp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c5c: 4ef9 0005 3c10 jmp 53c10 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 43c62: 2f2a 0050 movel %a2@(80),%sp@- 43c66: 4879 0006 1275 pea 61275 43c6c: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 43c72: 2f28 0008 movel %a0@(8),%sp@- 43c76: 4eb9 0005 21ac jsr 521ac fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43c7c: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c80: 203c 0006 1972 movel #399730,%d0 ); #else fprintf(stdout, " (file %" PRId32 ")", (uint32_t)the_jnode->info.file.size ); #endif break; 43c86: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c8a: 2d40 0008 movel %d0,%fp@(8) } 43c8e: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c90: 4ef9 0005 3c10 jmp 53c10 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 43c96: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 <== NOT EXECUTED 43c9c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43ca0: 4878 0013 pea 13 <== NOT EXECUTED 43ca4: 4878 0001 pea 1 <== NOT EXECUTED 43ca8: 4879 0006 1281 pea 61281 <== NOT EXECUTED 43cae: 4eb9 0005 2ee0 jsr 52ee0 <== NOT EXECUTED assert(0); 43cb4: 4879 0006 0969 pea 60969 <== NOT EXECUTED 43cba: 4879 0006 1398 pea 61398 <__FUNCTION__.6535> <== NOT EXECUTED 43cc0: 4878 0062 pea 62 <== NOT EXECUTED 43cc4: 4879 0006 120a pea 6120a <== NOT EXECUTED 43cca: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 43cd0: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 <== NOT EXECUTED 43cd6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43cda: 4878 0013 pea 13 <== NOT EXECUTED 43cde: 4878 0001 pea 1 <== NOT EXECUTED 43ce2: 4879 0006 1281 pea 61281 <== NOT EXECUTED 43ce8: 4eb9 0005 2ee0 jsr 52ee0 <== NOT EXECUTED assert(0); 43cee: 4879 0006 0969 pea 60969 <== NOT EXECUTED 43cf4: 4879 0006 1398 pea 61398 <__FUNCTION__.6535> <== NOT EXECUTED 43cfa: 4878 005d pea 5d <== NOT EXECUTED 43cfe: 4879 0006 120a pea 6120a <== NOT EXECUTED 43d04: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 43d0a: 2f2a 0050 movel %a2@(80),%sp@- 43d0e: 2f2a 004c movel %a2@(76),%sp@- 43d12: 4879 0006 1253 pea 61253 43d18: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 43d1e: 2f28 0008 movel %a0@(8),%sp@- 43d22: 4eb9 0005 21ac jsr 521ac fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43d28: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d2c: 203c 0006 1972 movel #399730,%d0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; 43d32: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d36: 2d40 0008 movel %d0,%fp@(8) } 43d3a: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d3c: 4ef9 0005 3c10 jmp 53c10 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 43d42: 2079 0006 2bdc moveal 62bdc <_impure_ptr>,%a0 43d48: 2f28 0008 movel %a0@(8),%sp@- 43d4c: 4878 002f pea 2f 43d50: 4eb9 0005 21ec jsr 521ec fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43d56: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d5a: 203c 0006 1972 movel #399730,%d0 fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; 43d60: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d62: 2d40 0008 movel %d0,%fp@(8) } 43d66: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d68: 4ef9 0005 3c10 jmp 53c10 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 43d6e: 4879 0006 1200 pea 61200 <== NOT EXECUTED 43d74: 4879 0006 1398 pea 61398 <__FUNCTION__.6535> <== NOT EXECUTED 43d7a: 4878 0038 pea 38 <== NOT EXECUTED 43d7e: 4879 0006 120a pea 6120a <== NOT EXECUTED 43d84: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED 00043548 : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 43548: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4354a: 4e56 fff4 linkw %fp,#-12 4354e: 206e 0008 moveal %fp@(8),%a0 43552: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ IMFS_jnode_t *node; int i; node = loc->node_access; 43556: 2450 moveal %a0@,%a2 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 43558: 266e 000c moveal %fp@(12),%a3 4355c: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 43560: b0aa 0048 cmpl %a2@(72),%d0 43564: 663c bnes 435a2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 43566: 4a82 tstl %d2 43568: 672c beqs 43596 <== ALWAYS TAKEN 4356a: 206a 004c moveal %a2@(76),%a0 4356e: 1210 moveb %a0@,%d1 43570: 6724 beqs 43596 <== ALWAYS TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 43572: 91c8 subal %a0,%a0 43574: 4280 clrl %d0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 43576: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 43578: 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++ ) 4357c: 2040 moveal %d0,%a0 4357e: b082 cmpl %d2,%d0 43580: 640a bccs 4358c 43582: 226a 004c moveal %a2@(76),%a1 43586: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 4358a: 66ea bnes 43576 buf[i] = node->info.sym_link.name[i]; return i; } 4358c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43592: 4e5e unlk %fp 43594: 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++ ) 43596: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 43598: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4359e: 4e5e unlk %fp <== NOT EXECUTED 435a0: 4e75 rts <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 435a2: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 435a8: 7216 moveq #22,%d1 <== NOT EXECUTED 435aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 435ac: 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; } 435ae: 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 ); 435b4: 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; } 435b6: 4e5e unlk %fp <== NOT EXECUTED 435b8: 4e75 rts <== NOT EXECUTED ... 000435bc : 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 */ ) { 435bc: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 435c0: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 435c4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 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 ); 435c6: 4878 0020 pea 20 <== NOT EXECUTED 435ca: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 435ce: 2450 moveal %a0@,%a2 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 435d0: 486a 000c pea %a2@(12) <== NOT EXECUTED 435d4: 4eb9 0005 44cc jsr 544cc <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 435da: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 435de: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 435e2: 670a beqs 435ee <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 435e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435e6: 4eb9 0004 86c8 jsr 486c8 <_Chain_Extract> <== NOT EXECUTED 435ec: 588f addql #4,%sp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 435ee: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 435f2: 2050 moveal %a0@,%a0 <== NOT EXECUTED the_jnode->Parent = new_parent; 435f4: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 435f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435fa: 4868 004c pea %a0@(76) <== NOT EXECUTED 435fe: 4eb9 0004 8690 jsr 48690 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 43604: 42a7 clrl %sp@- <== NOT EXECUTED 43606: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4360a: 4eb9 0004 4058 jsr 44058 <== NOT EXECUTED 43610: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED return 0; } 43616: 4280 clrl %d0 <== NOT EXECUTED 43618: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4361c: 4e5e unlk %fp <== NOT EXECUTED 4361e: 4e75 rts 0004a170 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4a170: 4e56 fff8 linkw %fp,#-8 4a174: 2f0b movel %a3,%sp@- 4a176: 266e 000c moveal %fp@(12),%a3 4a17a: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4a17c: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4a17e: 4aaa 0008 tstl %a2@(8) 4a182: 670e beqs 4a192 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4a184: 2f0a movel %a2,%sp@- 4a186: 4eb9 0004 afec jsr 4afec <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4a18c: 588f addql #4,%sp 4a18e: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4a192: 302a 0032 movew %a2@(50),%d0 4a196: 5380 subql #1,%d0 4a198: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4a19c: 42a7 clrl %sp@- 4a19e: 486e fff8 pea %fp@(-8) 4a1a2: 4eb9 0004 a694 jsr 4a694 4a1a8: 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) ) { 4a1ae: 2f0a movel %a2,%sp@- 4a1b0: 4eb9 0004 a76e jsr 4a76e 4a1b6: 4fef 000c lea %sp@(12),%sp 4a1ba: 4a80 tstl %d0 4a1bc: 6628 bnes 4a1e6 <== ALWAYS TAKEN 4a1be: 4a6a 0032 tstw %a2@(50) 4a1c2: 6622 bnes 4a1e6 <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4a1c4: 2079 0005 c284 moveal 5c284 ,%a0 4a1ca: 2653 moveal %a3@,%a3 4a1cc: b7e8 0004 cmpal %a0@(4),%a3 4a1d0: 6736 beqs 4a208 <== ALWAYS TAKEN 4a1d2: 47f9 0004 a51c lea 4a51c ,%a3 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4a1d8: 7004 moveq #4,%d0 4a1da: b0aa 0048 cmpl %a2@(72),%d0 4a1de: 6714 beqs 4a1f4 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 4a1e0: 2f0a movel %a2,%sp@- 4a1e2: 4e93 jsr %a3@ 4a1e4: 588f addql #4,%sp } return 0; } 4a1e6: 246e fff0 moveal %fp@(-16),%a2 4a1ea: 4280 clrl %d0 4a1ec: 266e fff4 moveal %fp@(-12),%a3 4a1f0: 4e5e unlk %fp 4a1f2: 4e75 rts /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4a1f4: 202a 004c movel %a2@(76),%d0 4a1f8: 67e6 beqs 4a1e0 <== ALWAYS TAKEN free( (void*) the_jnode->info.sym_link.name ); 4a1fa: 2f00 movel %d0,%sp@- 4a1fc: 4e93 jsr %a3@ 4a1fe: 588f addql #4,%sp } free( the_jnode ); 4a200: 2f0a movel %a2,%sp@- 4a202: 4e93 jsr %a3@ 4a204: 588f addql #4,%sp 4a206: 60de bras 4a1e6 <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 4a208: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED 4a20c: 47f9 0004 a51c lea 4a51c ,%a3 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4a212: 7004 moveq #4,%d0 <== NOT EXECUTED 4a214: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4a218: 66c6 bnes 4a1e0 <== NOT EXECUTED 4a21a: 60d8 bras 4a1f4 <== NOT EXECUTED 0004a21c : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4a21c: 7007 moveq #7,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4a21e: 4e56 0000 linkw %fp,#0 4a222: 206e 0008 moveal %fp@(8),%a0 4a226: 226e 000c moveal %fp@(12),%a1 IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4a22a: 2050 moveal %a0@,%a0 switch ( the_jnode->type ) { 4a22c: b0a8 0048 cmpl %a0@(72),%d0 4a230: 6414 bccs 4a246 <== NEVER TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a232: 4eb9 0004 d808 jsr 4d808 <__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; } 4a238: 4e5e unlk %fp <== NOT EXECUTED case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a23a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a23c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a23e: 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; } 4a244: 4e75 rts <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4a246: 2028 0048 movel %a0@(72),%d0 4a24a: d080 addl %d0,%d0 4a24c: 303b 0808 movew %pc@(4a256 ,%d0:l),%d0 4a250: 48c0 extl %d0 4a252: 4efb 0802 jmp %pc@(4a256 ,%d0:l) 4a256: ffdc 0177734 <== NOT EXECUTED 4a258: ffdc 0177734 <== NOT EXECUTED 4a25a: 0096 ffdc 0010 oril #-2359280,%d6 <== NOT EXECUTED 4a260: 0052 0122 <== NOT EXECUTED 4a262: 0052 0122 <== NOT EXECUTED 4a264: 0010 020 <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a266: 2368 0034 0008 movel %a0@(52),%a1@(8) <== NOT EXECUTED buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a26c: 2368 003c 0026 movel %a0@(60),%a1@(38) <== NOT EXECUTED buf->st_mtime = the_jnode->stat_mtime; 4a272: 2368 0040 002e movel %a0@(64),%a1@(46) <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a278: 2368 002e 000c movel %a0@(46),%a1@(12) <== NOT EXECUTED buf->st_nlink = the_jnode->st_nlink; 4a27e: 3368 0032 0010 movew %a0@(50),%a1@(16) <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4a284: 4280 clrl %d0 <== NOT EXECUTED 4a286: 4281 clrl %d1 <== 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; 4a288: 3368 0038 0012 movew %a0@(56),%a1@(18) <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4a28e: 2340 001e movel %d0,%a1@(30) <== NOT EXECUTED 4a292: 2341 0022 movel %d1,%a1@(34) <== 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; 4a296: 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; 4a298: 3368 003a 0014 movew %a0@(58),%a1@(20) <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4a29e: 2368 0044 0036 movel %a0@(68),%a1@(54) <== NOT EXECUTED return 0; } 4a2a4: 4e5e unlk %fp 4a2a6: 4e75 rts 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; 4a2a8: 2028 004c movel %a0@(76),%d0 4a2ac: 2228 0050 movel %a0@(80),%d1 break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a2b0: 2368 0034 0008 movel %a0@(52),%a1@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a2b6: 2368 003c 0026 movel %a0@(60),%a1@(38) buf->st_mtime = the_jnode->stat_mtime; 4a2bc: 2368 0040 002e movel %a0@(64),%a1@(46) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4a2c2: 3368 0032 0010 movew %a0@(50),%a1@(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; 4a2c8: 2368 0044 0036 movel %a0@(68),%a1@(54) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a2ce: 2368 002e 000c movel %a0@(46),%a1@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4a2d4: 3368 0038 0012 movew %a0@(56),%a1@(18) 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; 4a2da: 2340 001e movel %d0,%a1@(30) 4a2de: 2341 0022 movel %d1,%a1@(34) 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; 4a2e2: 4280 clrl %d0 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; 4a2e4: 3368 003a 0014 movew %a0@(58),%a1@(20) 4a2ea: 60b8 bras 4a2a4 <== ALWAYS TAKEN switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4a2ec: 2028 0050 movel %a0@(80),%d0 4a2f0: 2368 004c 0016 movel %a0@(76),%a1@(22) break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a2f6: 2368 0034 0008 movel %a0@(52),%a1@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a2fc: 2368 003c 0026 movel %a0@(60),%a1@(38) buf->st_mtime = the_jnode->stat_mtime; 4a302: 2368 0040 002e movel %a0@(64),%a1@(46) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4a308: 3368 0032 0010 movew %a0@(50),%a1@(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; 4a30e: 2368 0044 0036 movel %a0@(68),%a1@(54) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a314: 2368 002e 000c movel %a0@(46),%a1@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4a31a: 3368 0038 0012 movew %a0@(56),%a1@(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 ); 4a320: 2340 001a movel %d0,%a1@(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; 4a324: 4280 clrl %d0 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; 4a326: 3368 003a 0014 movew %a0@(58),%a1@(20) 4a32c: 6000 ff76 braw 4a2a4 <== ALWAYS TAKEN 00043620 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 43620: 4e56 ffc4 linkw %fp,#-60 43624: 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 ); 43626: 260e movel %fp,%d3 43628: 0683 ffff ffc7 addil #-57,%d3 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4362e: 2f02 movel %d2,%sp@- 43630: 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 ); 43634: 2f02 movel %d2,%sp@- 43636: 4eb9 0005 44b4 jsr 544b4 4363c: 588f addql #4,%sp 4363e: 486e fffc pea %fp@(-4) 43642: 2f03 movel %d3,%sp@- 43644: 2f00 movel %d0,%sp@- 43646: 2f02 movel %d2,%sp@- 43648: 4eb9 0004 f87c jsr 4f87c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 4364e: 2f2e 000c movel %fp@(12),%sp@- 43652: 4eb9 0005 4024 jsr 54024 if (info.sym_link.name == NULL) { 43658: 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); 4365c: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 43660: 6730 beqs 43692 <== ALWAYS 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( 43662: 486e ffe8 pea %fp@(-24) 43666: 2f3c 0000 a1ff movel #41471,%sp@- 4366c: 2f03 movel %d3,%sp@- 4366e: 4878 0004 pea 4 43672: 2f2e 0008 movel %fp@(8),%sp@- 43676: 4eb9 0004 ea86 jsr 4ea86 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 4367c: 4fef 0014 lea %sp@(20),%sp 43680: 4a80 tstl %d0 43682: 6728 beqs 436ac <== ALWAYS TAKEN free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 43684: 242e ffbc movel %fp@(-68),%d2 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 43688: 4280 clrl %d0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 4368a: 262e ffc0 movel %fp@(-64),%d3 4368e: 4e5e unlk %fp 43690: 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); 43692: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 43698: 740c moveq #12,%d2 <== NOT EXECUTED 4369a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4369c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4369e: 2082 movel %d2,%a0@ <== NOT EXECUTED free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 436a0: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 436a4: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 436a8: 4e5e unlk %fp <== NOT EXECUTED 436aa: 4e75 rts <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 436ac: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 436b0: 4eb9 0004 3fc8 jsr 43fc8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 436b6: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED } return 0; } 436bc: 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); 436c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 436c2: 720c moveq #12,%d1 <== NOT EXECUTED 436c4: 588f addql #4,%sp <== NOT EXECUTED 436c6: 70ff moveq #-1,%d0 <== NOT EXECUTED } return 0; } 436c8: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 436cc: 4e5e unlk %fp <== NOT EXECUTED &info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); 436ce: 2081 movel %d1,%a0@ <== NOT EXECUTED } return 0; } 436d0: 4e75 rts <== NOT EXECUTED ... 000436d4 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 436d4: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 436d6: 4e56 ffd0 linkw %fp,#-48 436da: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 436de: 246e 000c moveal %fp@(12),%a2 436e2: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 436e6: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 436e8: b0ab 0048 cmpl %a3@(72),%d0 436ec: 671a beqs 43708 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 436ee: 2f0a movel %a2,%sp@- 436f0: 206a 0008 moveal %a2@(8),%a0 436f4: 2f02 movel %d2,%sp@- 436f6: 2068 0034 moveal %a0@(52),%a0 436fa: 4e90 jsr %a0@ return result; 436fc: 508f addql #8,%sp } 436fe: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 43704: 4e5e unlk %fp 43706: 4e75 rts * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 43708: 202b 004c movel %a3@(76),%d0 4370c: 6700 0090 beqw 4379e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 43710: 41ea 0004 lea %a2@(4),%a0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 43714: 260e movel %fp,%d3 43716: 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) 4371c: 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; 4371e: 2d58 ffe8 movel %a0@+,%fp@(-24) 43722: 2d58 ffec movel %a0@+,%fp@(-20) 43726: 2d58 fff0 movel %a0@+,%fp@(-16) 4372a: 2d50 fff4 movel %a0@,%fp@(-12) the_link.node_access = node->info.hard_link.link_node; 4372e: 2d40 ffe4 movel %d0,%fp@(-28) IMFS_Set_handlers( &the_link ); 43732: 2f03 movel %d3,%sp@- 43734: 4eb9 0004 ec78 jsr 4ec78 /* * 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) 4373a: 206b 004c moveal %a3@(76),%a0 4373e: 4281 clrl %d1 43740: 588f addql #4,%sp 43742: 3028 0032 movew %a0@(50),%d0 43746: 3200 movew %d0,%d1 43748: b881 cmpl %d1,%d4 4374a: 6730 beqs 4377c if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 4374c: 5380 subql #1,%d0 4374e: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 43752: 42a7 clrl %sp@- 43754: 486e fff8 pea %fp@(-8) 43758: 4eb9 0004 4058 jsr 44058 4375e: 206b 004c moveal %a3@(76),%a0 43762: 508f addql #8,%sp 43764: 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 ); 4376a: 2f0a movel %a2,%sp@- 4376c: 206a 0008 moveal %a2@(8),%a0 43770: 2f02 movel %d2,%sp@- 43772: 2068 0034 moveal %a0@(52),%a0 43776: 4e90 jsr %a0@ return result; 43778: 508f addql #8,%sp 4377a: 6082 bras 436fe <== ALWAYS TAKEN * 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 ); 4377c: 2f03 movel %d3,%sp@- 4377e: 2f02 movel %d2,%sp@- 43780: 206e ffec moveal %fp@(-20),%a0 43784: 2068 0034 moveal %a0@(52),%a0 43788: 4e90 jsr %a0@ if ( result != 0 ) 4378a: 508f addql #8,%sp 4378c: 4a80 tstl %d0 4378e: 6700 ff5e beqw 436ee 43792: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 43794: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 4379a: 4e5e unlk %fp 4379c: 4e75 rts */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 4379e: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 437a4: 7216 moveq #22,%d1 <== NOT EXECUTED 437a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 437a8: 70ff moveq #-1,%d0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 437aa: 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 ); 437b0: 2081 movel %d1,%a0@ <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 437b2: 4e5e unlk %fp <== NOT EXECUTED 437b4: 4e75 rts <== NOT EXECUTED ... 000437b8 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 437b8: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 437ba: 4e56 0000 linkw %fp,#0 437be: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 437c2: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 437c6: b0a8 0048 cmpl %a0@(72),%d0 437ca: 6610 bnes 437dc <== ALWAYS TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 437cc: 4aa8 0058 tstl %a0@(88) 437d0: 671c beqs 437ee <== ALWAYS 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; 437d2: 42a8 0058 clrl %a0@(88) 437d6: 4280 clrl %d0 return 0; } 437d8: 4e5e unlk %fp 437da: 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 ); 437dc: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 437e2: 7214 moveq #20,%d1 <== NOT EXECUTED 437e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 437e6: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437e8: 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 ); 437ea: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437ec: 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 */ 437ee: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 437f4: 7216 moveq #22,%d1 <== NOT EXECUTED 437f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 437f8: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437fa: 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 */ 437fc: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437fe: 4e75 rts 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 c7c6 moveal 5c7c6 ,%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 <== NEVER 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 aa10 jsr 4aa10 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 428d8: 2079 0005 c7ca moveal 5c7ca ,%a0 428de: 4a88 tstl %a0 428e0: 6712 beqs 428f4 <== NEVER 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 c7c5 tstb 5c7c5 428fa: 6624 bnes 42920 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 428fc: 4a39 0005 c24c tstb 5c24c 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 c180 movel 5c180 ,%sp@- 42912: 4eb9 0004 6c10 jsr 46c10 <_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 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42920: 2f39 0005 c180 movel 5c180 ,%sp@- 42926: 2439 0005 d804 movel 5d804 ,%d2 4292c: 4eb9 0004 77b0 jsr 477b0 <_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 d804 movel %d0,5d804 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 e098 jsr 4e098 * 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 c7c5 tstb 5c7c5 4295e: 66c0 bnes 42920 <== ALWAYS TAKEN 42960: 4878 0004 pea 4 42964: 2f02 movel %d2,%sp@- 42966: 2f03 movel %d3,%sp@- 42968: 2f39 0005 c180 movel 5c180 ,%sp@- 4296e: 4eb9 0004 6c10 jsr 46c10 <_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 <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 4297c: 4878 001a pea 1a <== NOT EXECUTED 42980: 4eb9 0004 645c jsr 4645c <== NOT EXECUTED ... 000458ca : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 458ca: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 458ce: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 458d2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 458d6: 4a8a tstl %a2 <== NOT EXECUTED 458d8: 6700 00c2 beqw 4599c <== NOT EXECUTED return; if ( !print_handler ) 458dc: 2879 000a 21ac moveal a21ac ,%a4 <== NOT EXECUTED 458e2: 4a8c tstl %a4 <== NOT EXECUTED 458e4: 6700 00b6 beqw 4599c <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 458e8: 70ff moveq #-1,%d0 <== NOT EXECUTED 458ea: b08a cmpl %a2,%d0 <== NOT EXECUTED 458ec: 6700 00d8 beqw 459c6 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 458f0: 47ea 00bc lea %a2@(188),%a3 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 458f4: 2413 movel %a3@,%d2 <== NOT EXECUTED 458f6: 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); 458fc: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 45900: 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 ); 45906: 282a 00fc movel %a2@(252),%d4 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 4590a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4590c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4590e: 4eb9 0004 5896 jsr 45896 <== NOT EXECUTED if ( high_water_mark ) 45914: 508f addql #8,%sp <== NOT EXECUTED 45916: 4a80 tstl %d0 <== NOT EXECUTED 45918: 6700 00e2 beqw 459fc <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 4591c: d682 addl %d2,%d3 <== NOT EXECUTED 4591e: 9680 subl %d0,%d3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 45920: 4a8a tstl %a2 <== NOT EXECUTED 45922: 6700 00e0 beqw 45a04 <== NOT EXECUTED (*print_handler)( 45926: 486e fffb pea %fp@(-5) <== NOT EXECUTED 4592a: 4878 0005 pea 5 <== NOT EXECUTED 4592e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 45932: 4eb9 0004 be48 jsr 4be48 <== NOT EXECUTED 45938: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4593a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4593e: 4879 0009 7edd pea 97edd <== NOT EXECUTED 45944: 2f39 000a 21a8 movel a21a8 ,%sp@- <== NOT EXECUTED 4594a: 4e94 jsr %a4@ <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 4594c: 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)( 45950: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 45954: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45956: 2f04 movel %d4,%sp@- <== NOT EXECUTED 45958: 2013 movel %a3@,%d0 <== NOT EXECUTED 4595a: 5380 subql #1,%d0 <== NOT EXECUTED 4595c: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 45960: 2f08 movel %a0,%sp@- <== NOT EXECUTED 45962: 4879 0009 7ef8 pea 97ef8 <== NOT EXECUTED 45968: 2f39 000a 21a8 movel a21a8 ,%sp@- <== NOT EXECUTED 4596e: 2079 000a 21ac moveal a21ac ,%a0 <== NOT EXECUTED 45974: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 45976: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4597a: 4ab9 000a 21a4 tstl a21a4 <== NOT EXECUTED 45980: 6724 beqs 459a6 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 45982: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45984: 4879 0009 7f23 pea 97f23 <== NOT EXECUTED 4598a: 2f39 000a 21a8 movel a21a8 ,%sp@- <== NOT EXECUTED 45990: 2079 000a 21ac moveal a21ac ,%a0 <== NOT EXECUTED 45996: 4e90 jsr %a0@ <== NOT EXECUTED 45998: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 4599c: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 459a2: 4e5e unlk %fp <== NOT EXECUTED 459a4: 4e75 rts <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 459a6: 4879 0009 7f16 pea 97f16 <== NOT EXECUTED 459ac: 2f39 000a 21a8 movel a21a8 ,%sp@- <== NOT EXECUTED 459b2: 2079 000a 21ac moveal a21ac ,%a0 <== NOT EXECUTED 459b8: 4e90 jsr %a0@ <== NOT EXECUTED 459ba: 508f addql #8,%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 459bc: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 459c2: 4e5e unlk %fp <== NOT EXECUTED 459c4: 4e75 rts <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 459c6: 4ab9 000a 50f8 tstl a50f8 <== NOT EXECUTED 459cc: 67ce beqs 4599c <== NOT EXECUTED 459ce: 47f9 000a 50f4 lea a50f4 ,%a3 <== NOT EXECUTED 459d4: 4284 clrl %d4 <== NOT EXECUTED 459d6: 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); 459d8: 2413 movel %a3@,%d2 <== NOT EXECUTED 459da: 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); 459e0: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 459e4: 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); 459ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 459ec: 2f03 movel %d3,%sp@- <== NOT EXECUTED 459ee: 4eb9 0004 5896 jsr 45896 <== NOT EXECUTED if ( high_water_mark ) 459f4: 508f addql #8,%sp <== NOT EXECUTED 459f6: 4a80 tstl %d0 <== NOT EXECUTED 459f8: 6600 ff22 bnew 4591c <== NOT EXECUTED 459fc: 4283 clrl %d3 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 459fe: 4a8a tstl %a2 <== NOT EXECUTED 45a00: 6600 ff24 bnew 45926 <== 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 ); 45a04: 4878 ffff pea ffffffff <== NOT EXECUTED 45a08: 4879 0009 7eea pea 97eea <== NOT EXECUTED 45a0e: 2f39 000a 21a8 movel a21a8 ,%sp@- <== NOT EXECUTED 45a14: 4e94 jsr %a4@ <== NOT EXECUTED } (*print_handler)( 45a16: 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 ); 45a1a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 45a1e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45a20: 2f04 movel %d4,%sp@- <== NOT EXECUTED 45a22: 2013 movel %a3@,%d0 <== NOT EXECUTED 45a24: 5380 subql #1,%d0 <== NOT EXECUTED 45a26: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 45a2a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 45a2c: 4879 0009 7ef8 pea 97ef8 <== NOT EXECUTED 45a32: 2f39 000a 21a8 movel a21a8 ,%sp@- <== NOT EXECUTED 45a38: 2079 000a 21ac moveal a21ac ,%a0 <== NOT EXECUTED 45a3e: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 45a40: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45a44: 4ab9 000a 21a4 tstl a21a4 <== NOT EXECUTED 45a4a: 6600 ff36 bnew 45982 <== NOT EXECUTED 45a4e: 6000 ff56 braw 459a6 <== NOT EXECUTED 00045c90 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 45c90: 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) 45c94: 4ab9 000a 21a4 tstl a21a4 45c9a: 6656 bnes 45cf2 45c9c: 41f9 000a 50e4 lea a50e4 ,%a0 45ca2: 4280 clrl %d0 45ca4: 43f9 0009 805a lea 9805a ,%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 ]; 45caa: 7203 moveq #3,%d1 45cac: c280 andl %d0,%d1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 45cae: 5280 addql #1,%d0 p[i] = pattern[ i%4 ]; 45cb0: 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++ ) { 45cb4: 7204 moveq #4,%d1 45cb6: b280 cmpl %d0,%d1 45cb8: 66f0 bnes 45caa /* * 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) { 45cba: 2039 000a 5278 movel a5278 <_CPU_Interrupt_stack_low>,%d0 45cc0: 6728 beqs 45cea <== ALWAYS TAKEN 45cc2: 2239 000a 521c movel a521c <_CPU_Interrupt_stack_high>,%d1 45cc8: 6720 beqs 45cea <== ALWAYS TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 45cca: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 45ccc: 2f01 movel %d1,%sp@- 45cce: 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; 45cd2: 23c0 000a 50f8 movel %d0,a50f8 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 45cd8: 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 - 45cda: 23c1 000a 50f4 movel %d1,a50f4 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 45ce0: 4eb9 0008 2b58 jsr 82b58 45ce6: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 45cea: 7001 moveq #1,%d0 45cec: 23c0 000a 21a4 movel %d0,a21a4 } 45cf2: 4e5e unlk %fp 45cf4: 4e75 rts 00045896 : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 45896: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 45898: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 4589c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 458a0: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 458a4: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 458a8: d088 addl %a0,%d0 <== NOT EXECUTED 458aa: b088 cmpl %a0,%d0 <== NOT EXECUTED 458ac: 6310 blss 458be <== NOT EXECUTED if (*base != U32_PATTERN) 458ae: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 458b4: b290 cmpl %a0@,%d1 <== NOT EXECUTED 458b6: 660c bnes 458c4 <== 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++) 458b8: 5888 addql #4,%a0 <== NOT EXECUTED 458ba: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 458bc: 65f0 bcss 458ae <== NOT EXECUTED 458be: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 458c0: 4e5e unlk %fp <== NOT EXECUTED 458c2: 4e75 rts <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 458c4: 2008 movel %a0,%d0 <== NOT EXECUTED #endif return (void *)0; } 458c6: 4e5e unlk %fp <== NOT EXECUTED 458c8: 4e75 rts 00045acc : * * 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) { 45acc: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 45ad0: 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"); 45ad4: 4879 0009 7f8a pea 97f8a <== NOT EXECUTED 45ada: 47f9 0004 8a80 lea 48a80 ,%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) { 45ae0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 45ae4: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 45ae8: 286a 00c0 moveal %a2@(192),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 45aec: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 45aee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45af0: 4879 0009 7f9a pea 97f9a <== NOT EXECUTED 45af6: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 45af8: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 45afc: 4879 0009 7fb7 pea 97fb7 <== NOT EXECUTED 45b02: 4e93 jsr %a3@ <== NOT EXECUTED printk( 45b04: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 45b08: 4879 0009 7fc9 pea 97fc9 <== NOT EXECUTED 45b0e: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 45b10: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 45b14: 4878 0020 pea 20 <== NOT EXECUTED 45b18: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 45b1c: 4eb9 0004 be48 jsr 4be48 <== NOT EXECUTED 45b22: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 45b26: 2e80 movel %d0,%sp@ <== NOT EXECUTED 45b28: 4879 0009 7fdd pea 97fdd <== NOT EXECUTED 45b2e: 4e93 jsr %a3@ <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) 45b30: 202a 00bc movel %a2@(188),%d0 <== NOT EXECUTED 45b34: 206a 00c0 moveal %a2@(192),%a0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 45b38: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 45b3c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 45b3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45b40: 4879 0009 7ff3 pea 97ff3 <== NOT EXECUTED 45b46: 4e93 jsr %a3@ <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { 45b48: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45b4c: 4a02 tstb %d2 <== NOT EXECUTED 45b4e: 670a beqs 45b5a <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 45b50: 4878 0081 pea 81 <== NOT EXECUTED 45b54: 4eb9 0004 c7d4 jsr 4c7d4 <== NOT EXECUTED (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 45b5a: 486c 0018 pea %a4@(24) <== NOT EXECUTED 45b5e: 486c 0008 pea %a4@(8) <== NOT EXECUTED 45b62: 4878 0010 pea 10 <== NOT EXECUTED 45b66: 4879 0009 8024 pea 98024 <== NOT EXECUTED 45b6c: 4e93 jsr %a3@ <== NOT EXECUTED 45b6e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 45b72: 4878 0081 pea 81 <== NOT EXECUTED 45b76: 4eb9 0004 c7d4 jsr 4c7d4 <== NOT EXECUTED 000465d4 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 465d4: 4e56 0000 linkw %fp,#0 465d8: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 465da: 2479 0005 daee moveal 5daee <_API_extensions_List>,%a2 465e0: b5fc 0005 daf2 cmpal #383730,%a2 465e6: 6710 beqs 465f8 <_API_extensions_Run_postdriver+0x24> <== ALWAYS 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)(); 465e8: 206a 0008 moveal %a2@(8),%a0 465ec: 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 ) { 465ee: 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 ; 465f0: b5fc 0005 daf2 cmpal #383730,%a2 465f6: 66f0 bnes 465e8 <_API_extensions_Run_postdriver+0x14> <== ALWAYS TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 465f8: 246e fffc moveal %fp@(-4),%a2 465fc: 4e5e unlk %fp 465fe: 4e75 rts 00046600 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 46600: 4e56 0000 linkw %fp,#0 46604: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46606: 2479 0005 daee moveal 5daee <_API_extensions_List>,%a2 4660c: b5fc 0005 daf2 cmpal #383730,%a2 46612: 6718 beqs 4662c <_API_extensions_Run_postswitch+0x2c> <== ALWAYS TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 46614: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 4661a: 206a 000c moveal %a2@(12),%a0 4661e: 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 ) { 46620: 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 ; 46622: 588f addql #4,%sp 46624: b5fc 0005 daf2 cmpal #383730,%a2 4662a: 66e8 bnes 46614 <_API_extensions_Run_postswitch+0x14> <== ALWAYS TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 4662c: 246e fffc moveal %fp@(-4),%a2 46630: 4e5e unlk %fp 46632: 4e75 rts 000597d8 <_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 ) { 597d8: 4e56 ffe0 linkw %fp,#-32 597dc: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 597e0: 266e 0008 moveal %fp@(8),%a3 597e4: 282e 000c movel %fp@(12),%d4 597e8: 242e 0010 movel %fp@(16),%d2 597ec: 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 ) { 597f0: b4ab 004c cmpl %a3@(76),%d2 597f4: 6262 bhis 59858 <_CORE_message_queue_Broadcast+0x80> <== ALWAYS 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 ) { 597f6: 4aab 0048 tstl %a3@(72) 597fa: 664c bnes 59848 <_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))) { 597fc: 2f0b movel %a3,%sp@- 597fe: 49f9 0005 bd9c lea 5bd9c <_Thread_queue_Dequeue>,%a4 59804: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 59806: 4bf9 0006 19b8 lea 619b8 ,%a5 5980c: 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 = 5980e: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59810: 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 = 59812: 4a80 tstl %d0 59814: 6722 beqs 59838 <_CORE_message_queue_Broadcast+0x60> 59816: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 59818: 5283 addql #1,%d3 5981a: 2f04 movel %d4,%sp@- 5981c: 2f2a 002c movel %a2@(44),%sp@- 59820: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 59822: 206a 0028 moveal %a2@(40),%a0 59826: 4fef 000c lea %sp@(12),%sp 5982a: 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))) { 5982c: 2f0b movel %a3,%sp@- 5982e: 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 = 59830: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59832: 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 = 59834: 4a80 tstl %d0 59836: 66de bnes 59816 <_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; 59838: 2045 moveal %d5,%a0 5983a: 4280 clrl %d0 5983c: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5983e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59844: 4e5e unlk %fp 59846: 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; 59848: 2045 moveal %d5,%a0 5984a: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5984c: 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; 59852: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59854: 4e5e unlk %fp 59856: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 59858: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5985a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 59860: 4e5e unlk %fp <== NOT EXECUTED 59862: 4e75 rts 0004ff3c <_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)) { 4ff3c: 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 ) { 4ff3e: 4e56 fff4 linkw %fp,#-12 4ff42: 202e 0014 movel %fp@(20),%d0 4ff46: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4ff4a: 246e 0008 moveal %fp@(8),%a2 4ff4e: 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)) { 4ff52: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4ff54: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4ff58: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4ff5c: 2540 004c movel %d0,%a2@(76) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4ff60: 4a81 tstl %d1 4ff62: 6620 bnes 4ff84 <_CORE_message_queue_Initialize+0x48> 4ff64: 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)); 4ff66: 2601 movel %d1,%d3 4ff68: 0683 0000 0010 addil #16,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4ff6e: 2003 movel %d3,%d0 4ff70: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4ff74: b280 cmpl %d0,%d1 4ff76: 631c blss 4ff94 <_CORE_message_queue_Initialize+0x58> <== NEVER TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ff78: 4200 clrb %d0 } 4ff7a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ff80: 4e5e unlk %fp 4ff82: 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); 4ff84: 2200 movel %d0,%d1 4ff86: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4ff88: 76fc moveq #-4,%d3 4ff8a: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4ff8c: b280 cmpl %d0,%d1 4ff8e: 64d6 bccs 4ff66 <_CORE_message_queue_Initialize+0x2a> <== NEVER TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ff90: 4200 clrb %d0 <== NOT EXECUTED 4ff92: 60e6 bras 4ff7a <_CORE_message_queue_Initialize+0x3e> <== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4ff94: 2f00 movel %d0,%sp@- 4ff96: 4eb9 0005 2c04 jsr 52c04 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4ff9c: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4ff9e: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4ffa2: 67d4 beqs 4ff78 <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4ffa4: 2f03 movel %d3,%sp@- 4ffa6: 2f02 movel %d2,%sp@- 4ffa8: 2f00 movel %d0,%sp@- 4ffaa: 486a 0060 pea %a2@(96) 4ffae: 4eb9 0005 490c jsr 5490c <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4ffb4: 4878 0006 pea 6 4ffb8: 7001 moveq #1,%d0 4ffba: 206e 000c moveal %fp@(12),%a0 4ffbe: b090 cmpl %a0@,%d0 4ffc0: 57c0 seq %d0 4ffc2: 4878 0080 pea 80 4ffc6: 49c0 extbl %d0 4ffc8: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4ffca: 41ea 0054 lea %a2@(84),%a0 4ffce: 2f00 movel %d0,%sp@- 4ffd0: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4ffd4: 41ea 0050 lea %a2@(80),%a0 4ffd8: 2548 0058 movel %a0,%a2@(88) 4ffdc: 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; 4ffde: 42aa 0054 clrl %a2@(84) 4ffe2: 4eb9 0005 1fdc jsr 51fdc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ffe8: 4fef 0020 lea %sp@(32),%sp } 4ffec: 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( 4fff2: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4fff4: 4e5e unlk %fp 4fff6: 4e75 rts 000500dc <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 500dc: 4e56 fff4 linkw %fp,#-12 500e0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 500e4: 246e 0008 moveal %fp@(8),%a2 500e8: 242e 0010 movel %fp@(16),%d2 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 500ec: b4aa 004c cmpl %a2@(76),%d2 500f0: 6256 bhis 50148 <_CORE_message_queue_Submit+0x6c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 500f2: 202a 0048 movel %a2@(72),%d0 500f6: 675c beqs 50154 <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 500f8: b0aa 0044 cmpl %a2@(68),%d0 500fc: 650c bcss 5010a <_CORE_message_queue_Submit+0x2e> 500fe: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50100: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50106: 4e5e unlk %fp 50108: 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 *) 5010a: 486a 0060 pea %a2@(96) 5010e: 4eb9 0004 fed0 jsr 4fed0 <_Chain_Get> 50114: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50116: 2f02 movel %d2,%sp@- 50118: 2f2e 000c movel %fp@(12),%sp@- 5011c: 486b 000c pea %a3@(12) 50120: 4eb9 0005 75b4 jsr 575b4 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 50126: 2742 0008 movel %d2,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 5012a: 2f2e 001c movel %fp@(28),%sp@- 5012e: 2f0b movel %a3,%sp@- 50130: 2f0a movel %a2,%sp@- 50132: 4eb9 0005 4954 jsr 54954 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 50138: 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( 5013c: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5013e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50144: 4e5e unlk %fp 50146: 4e75 rts ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 50148: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5014a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50150: 4e5e unlk %fp 50152: 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 ); 50154: 2f0a movel %a2,%sp@- 50156: 4eb9 0005 1c00 jsr 51c00 <_Thread_queue_Dequeue> if ( the_thread ) { 5015c: 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 ); 5015e: 2640 moveal %d0,%a3 if ( the_thread ) { 50160: 4a80 tstl %d0 50162: 672e beqs 50192 <_CORE_message_queue_Submit+0xb6> 50164: 2f02 movel %d2,%sp@- 50166: 2f2e 000c movel %fp@(12),%sp@- 5016a: 2f2b 002c movel %a3@(44),%sp@- 5016e: 4eb9 0005 75b4 jsr 575b4 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 50174: 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; 50178: 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; 5017c: 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; 5017e: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 50180: 222e 001c movel %fp@(28),%d1 50184: 2741 0024 movel %d1,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50188: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5018e: 4e5e unlk %fp 50190: 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 ) { 50192: 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 ) { 50196: b0aa 0044 cmpl %a2@(68),%d0 5019a: 6400 ff62 bccw 500fe <_CORE_message_queue_Submit+0x22> <== ALWAYS TAKEN 5019e: 6000 ff6a braw 5010a <_CORE_message_queue_Submit+0x2e> <== ALWAYS TAKEN ... 0004678c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 4678c: 4e56 0000 linkw %fp,#0 46790: 206e 0008 moveal %fp@(8),%a0 46794: 2f0a movel %a2,%sp@- 46796: 246e 000c moveal %fp@(12),%a2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 4679a: 224a moveal %a2,%a1 4679c: 2159 0040 movel %a1@+,%a0@(64) 467a0: 2159 0044 movel %a1@+,%a0@(68) 467a4: 2159 0048 movel %a1@+,%a0@(72) CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 467a8: 202e 0010 movel %fp@(16),%d0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 467ac: 3151 004c movew %a1@,%a0@(76) the_mutex->lock = initial_lock; 467b0: 2140 004e movel %d0,%a0@(78) the_mutex->blocked_count = 0; 467b4: 42a8 0056 clrl %a0@(86) if ( initial_lock == CORE_MUTEX_LOCKED ) { 467b8: 4a80 tstl %d0 467ba: 6654 bnes 46810 <_CORE_mutex_Initialize+0x84> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 467bc: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 467c2: 103c 0001 moveb #1,%d0 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 467c6: 7202 moveq #2,%d1 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 467c8: 2140 0052 movel %d0,%a0@(82) the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 467cc: 2169 0008 005e movel %a1@(8),%a0@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 467d2: 2028 0046 movel %a0@(70),%d0 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 467d6: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 467da: b280 cmpl %d0,%d1 467dc: 6762 beqs 46840 <_CORE_mutex_Initialize+0xb4> <== ALWAYS TAKEN 467de: 123c 0003 moveb #3,%d1 467e2: b280 cmpl %d0,%d1 467e4: 675a beqs 46840 <_CORE_mutex_Initialize+0xb4> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 467e6: 4aaa 0006 tstl %a2@(6) 467ea: 56c0 sne %d0 467ec: 4878 0005 pea 5 467f0: 49c0 extbl %d0 467f2: 4878 0400 pea 400 467f6: 4480 negl %d0 467f8: 2f00 movel %d0,%sp@- 467fa: 2f08 movel %a0,%sp@- 467fc: 4eb9 0004 8488 jsr 48488 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 46802: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 46806: 4280 clrl %d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 46808: 246e fffc moveal %fp@(-4),%a2 4680c: 4e5e unlk %fp 4680e: 4e75 rts the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 46810: 4aaa 0006 tstl %a2@(6) 46814: 56c0 sne %d0 #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 46816: 42a8 0052 clrl %a0@(82) the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4681a: 49c0 extbl %d0 4681c: 4480 negl %d0 _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 4681e: 42a8 005a clrl %a0@(90) the_mutex->holder_id = 0; 46822: 42a8 005e clrl %a0@(94) } _Thread_queue_Initialize( 46826: 4878 0005 pea 5 4682a: 4878 0400 pea 400 4682e: 2f00 movel %d0,%sp@- 46830: 2f08 movel %a0,%sp@- 46832: 4eb9 0004 8488 jsr 48488 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 46838: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4683c: 4280 clrl %d0 4683e: 60c8 bras 46808 <_CORE_mutex_Initialize+0x7c> <== ALWAYS TAKEN the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 46840: 2028 004a movel %a0@(74),%d0 46844: b0a9 0014 cmpl %a1@(20),%d0 46848: 6228 bhis 46872 <_CORE_mutex_Initialize+0xe6> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 4684a: 52a9 001c addql #1,%a1@(28) the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4684e: 4aaa 0006 tstl %a2@(6) 46852: 56c0 sne %d0 46854: 4878 0005 pea 5 46858: 49c0 extbl %d0 4685a: 4878 0400 pea 400 4685e: 4480 negl %d0 46860: 2f00 movel %d0,%sp@- 46862: 2f08 movel %a0,%sp@- 46864: 4eb9 0004 8488 jsr 48488 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 4686a: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4686e: 4280 clrl %d0 46870: 6096 bras 46808 <_CORE_mutex_Initialize+0x7c> STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 46872: 246e fffc moveal %fp@(-4),%a2 the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 46876: 7006 moveq #6,%d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 46878: 4e5e unlk %fp 4687a: 4e75 rts 00046908 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 46908: 4e56 0000 linkw %fp,#0 4690c: 202e 0010 movel %fp@(16),%d0 46910: 2f0a movel %a2,%sp@- 46912: 246e 0008 moveal %fp@(8),%a2 46916: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46918: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 4691e: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46920: 4a81 tstl %d1 46922: 6704 beqs 46928 <_CORE_mutex_Seize+0x20> 46924: 4a00 tstb %d0 46926: 6634 bnes 4695c <_CORE_mutex_Seize+0x54> <== NEVER TAKEN 46928: 486e 0018 pea %fp@(24) 4692c: 2f0a movel %a2,%sp@- 4692e: 4eb9 0004 b098 jsr 4b098 <_CORE_mutex_Seize_interrupt_trylock> 46934: 508f addql #8,%sp 46936: 4a80 tstl %d0 46938: 6716 beqs 46950 <_CORE_mutex_Seize+0x48> 4693a: 4a02 tstb %d2 4693c: 6636 bnes 46974 <_CORE_mutex_Seize+0x6c> 4693e: 202e 0018 movel %fp@(24),%d0 46942: 46c0 movew %d0,%sr 46944: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 4694a: 7001 moveq #1,%d0 4694c: 2140 0034 movel %d0,%a0@(52) } 46950: 242e fff8 movel %fp@(-8),%d2 46954: 246e fffc moveal %fp@(-4),%a2 46958: 4e5e unlk %fp 4695a: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 4695c: 7001 moveq #1,%d0 4695e: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 46964: 64c2 bccs 46928 <_CORE_mutex_Seize+0x20> 46966: 4878 0013 pea 13 4696a: 42a7 clrl %sp@- 4696c: 42a7 clrl %sp@- 4696e: 4eb9 0004 6f7c jsr 46f7c <_Internal_error_Occurred> 46974: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4697a: 5280 addql #1,%d0 4697c: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 46982: 216e 000c 0020 movel %fp@(12),%a0@(32) 46988: 23c0 0005 d954 movel %d0,5d954 <_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; 4698e: 7001 moveq #1,%d0 46990: 214a 0044 movel %a2,%a0@(68) 46994: 2540 0030 movel %d0,%a2@(48) 46998: 202e 0018 movel %fp@(24),%d0 4699c: 46c0 movew %d0,%sr 4699e: 2f2e 0014 movel %fp@(20),%sp@- 469a2: 2f0a movel %a2,%sp@- 469a4: 4eb9 0004 687c jsr 4687c <_CORE_mutex_Seize_interrupt_blocking> } 469aa: 242e fff8 movel %fp@(-8),%d2 bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 469ae: 508f addql #8,%sp } 469b0: 246e fffc moveal %fp@(-4),%a2 469b4: 4e5e unlk %fp 469b6: 4e75 rts 0004b098 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4b098: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4b09c: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 4b0a2: 2f0a movel %a2,%sp@- 4b0a4: 206e 0008 moveal %fp@(8),%a0 4b0a8: 246e 000c moveal %fp@(12),%a2 4b0ac: 2f02 movel %d2,%sp@- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4b0ae: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4b0b2: 4aa8 004e tstl %a0@(78) 4b0b6: 673a beqs 4b0f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> the_mutex->lock = CORE_MUTEX_LOCKED; 4b0b8: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b0bc: 7201 moveq #1,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4b0be: 2169 0008 005e movel %a1@(8),%a0@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4b0c4: 2028 0046 movel %a0@(70),%d0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b0c8: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b0cc: 123c 0002 moveb #2,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4b0d0: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b0d4: b280 cmpl %d0,%d1 4b0d6: 672e beqs 4b106 <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4b0d8: 123c 0003 moveb #3,%d1 4b0dc: b280 cmpl %d0,%d1 4b0de: 674e beqs 4b12e <_CORE_mutex_Seize_interrupt_trylock+0x96> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b0e0: 2012 movel %a2@,%d0 4b0e2: 46c0 movew %d0,%sr 4b0e4: 4280 clrl %d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4b0e6: 242e fff8 movel %fp@(-8),%d2 4b0ea: 246e fffc moveal %fp@(-4),%a2 4b0ee: 4e5e unlk %fp 4b0f0: 4e75 rts /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4b0f2: b3e8 005a cmpal %a0@(90),%a1 4b0f6: 671a beqs 4b112 <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4b0f8: 242e fff8 movel %fp@(-8),%d2 the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4b0fc: 7001 moveq #1,%d0 4b0fe: 246e fffc moveal %fp@(-4),%a2 4b102: 4e5e unlk %fp 4b104: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b106: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b10a: 2012 movel %a2@,%d0 4b10c: 46c0 movew %d0,%sr 4b10e: 4280 clrl %d0 4b110: 60d4 bras 4b0e6 <_CORE_mutex_Seize_interrupt_trylock+0x4e> <== ALWAYS TAKEN * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b112: 2028 0040 movel %a0@(64),%d0 4b116: 6658 bnes 4b170 <_CORE_mutex_Seize_interrupt_trylock+0xd8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4b118: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4b11c: 2012 movel %a2@,%d0 4b11e: 46c0 movew %d0,%sr 4b120: 242e fff8 movel %fp@(-8),%d2 4b124: 4280 clrl %d0 4b126: 246e fffc moveal %fp@(-4),%a2 4b12a: 4e5e unlk %fp 4b12c: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b12e: 2429 001c movel %a1@(28),%d2 4b132: 2002 movel %d2,%d0 4b134: 5280 addql #1,%d0 4b136: 2340 001c movel %d0,%a1@(28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4b13a: 2029 0014 movel %a1@(20),%d0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4b13e: 2228 004a movel %a0@(74),%d1 current = executing->current_priority; if ( current == ceiling ) { 4b142: b081 cmpl %d1,%d0 4b144: 6700 0082 beqw 4b1c8 <_CORE_mutex_Seize_interrupt_trylock+0x130> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4b148: 6244 bhis 4b18e <_CORE_mutex_Seize_interrupt_trylock+0xf6> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b14a: 7206 moveq #6,%d1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b14c: 7001 moveq #1,%d0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b14e: 2341 0034 movel %d1,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4b152: 42a8 0052 clrl %a0@(82) _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b156: 2140 004e movel %d0,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4b15a: 2342 001c movel %d2,%a1@(28) _ISR_Enable( *level_p ); 4b15e: 2012 movel %a2@,%d0 4b160: 46c0 movew %d0,%sr 4b162: 242e fff8 movel %fp@(-8),%d2 4b166: 4280 clrl %d0 4b168: 246e fffc moveal %fp@(-4),%a2 4b16c: 4e5e unlk %fp 4b16e: 4e75 rts * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b170: 7201 moveq #1,%d1 4b172: b280 cmpl %d0,%d1 4b174: 6682 bnes 4b0f8 <_CORE_mutex_Seize_interrupt_trylock+0x60> <== NEVER TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4b176: 7002 moveq #2,%d0 <== NOT EXECUTED 4b178: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 4b17c: 2012 movel %a2@,%d0 <== NOT EXECUTED 4b17e: 46c0 movew %d0,%sr <== NOT EXECUTED 4b180: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4b184: 4280 clrl %d0 <== NOT EXECUTED 4b186: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4b18a: 4e5e unlk %fp <== NOT EXECUTED 4b18c: 4e75 rts <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4b18e: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4b194: 5280 addql #1,%d0 4b196: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4b19c: 2012 movel %a2@,%d0 4b19e: 46c0 movew %d0,%sr _Thread_Change_priority( 4b1a0: 42a7 clrl %sp@- 4b1a2: 2f28 004a movel %a0@(74),%sp@- 4b1a6: 2f28 005a movel %a0@(90),%sp@- 4b1aa: 4eb9 0004 7828 jsr 47828 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4b1b0: 4eb9 0004 7d48 jsr 47d48 <_Thread_Enable_dispatch> 4b1b6: 242e fff8 movel %fp@(-8),%d2 4b1ba: 4fef 000c lea %sp@(12),%sp 4b1be: 4280 clrl %d0 4b1c0: 246e fffc moveal %fp@(-4),%a2 4b1c4: 4e5e unlk %fp 4b1c6: 4e75 rts Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4b1c8: 2012 movel %a2@,%d0 4b1ca: 46c0 movew %d0,%sr 4b1cc: 242e fff8 movel %fp@(-8),%d2 4b1d0: 4280 clrl %d0 4b1d2: 246e fffc moveal %fp@(-4),%a2 4b1d6: 4e5e unlk %fp 4b1d8: 4e75 rts ... 000469b8 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 469b8: 4e56 0000 linkw %fp,#0 469bc: 2f0a movel %a2,%sp@- 469be: 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; 469c2: 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 ) { 469c6: 4a2a 0044 tstb %a2@(68) 469ca: 6712 beqs 469de <_CORE_mutex_Surrender+0x26> if ( !_Thread_Is_executing( holder ) ) 469cc: b1f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a0 469d2: 670a beqs 469de <_CORE_mutex_Surrender+0x26> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 469d4: 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 ) ) 469d8: 7003 moveq #3,%d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 469da: 4e5e unlk %fp 469dc: 4e75 rts return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 469de: 202a 0052 movel %a2@(82),%d0 469e2: 6768 beqs 46a4c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 469e4: 5380 subql #1,%d0 469e6: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 469ea: 6660 bnes 46a4c <_CORE_mutex_Surrender+0x94> 469ec: 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 ) || 469f0: 7202 moveq #2,%d1 469f2: b280 cmpl %d0,%d1 469f4: 6700 0084 beqw 46a7a <_CORE_mutex_Surrender+0xc2> 469f8: 123c 0003 moveb #3,%d1 469fc: b280 cmpl %d0,%d1 469fe: 677a beqs 46a7a <_CORE_mutex_Surrender+0xc2> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 46a00: 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 ) || 46a04: 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; 46a06: 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 ) || 46a0a: b280 cmpl %d0,%d1 46a0c: 6748 beqs 46a56 <_CORE_mutex_Surrender+0x9e> 46a0e: 123c 0003 moveb #3,%d1 46a12: b280 cmpl %d0,%d1 46a14: 6740 beqs 46a56 <_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 ) ) ) { 46a16: 2f0a movel %a2,%sp@- 46a18: 4eb9 0004 80ac jsr 480ac <_Thread_queue_Dequeue> 46a1e: 588f addql #4,%sp 46a20: 2040 moveal %d0,%a0 46a22: 4a80 tstl %d0 46a24: 6700 0090 beqw 46ab6 <_CORE_mutex_Surrender+0xfe> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 46a28: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 46a2a: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a30: 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; 46a34: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 46a38: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 46a3c: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a40: b280 cmpl %d0,%d1 46a42: 6764 beqs 46aa8 <_CORE_mutex_Surrender+0xf0> 46a44: 123c 0003 moveb #3,%d1 46a48: b280 cmpl %d0,%d1 46a4a: 6734 beqs 46a80 <_CORE_mutex_Surrender+0xc8> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a4c: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46a50: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a52: 4e5e unlk %fp 46a54: 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 && 46a56: 4aa8 001c tstl %a0@(28) 46a5a: 66ba bnes 46a16 <_CORE_mutex_Surrender+0x5e> holder->real_priority != holder->current_priority ) { 46a5c: 2028 0018 movel %a0@(24),%d0 46a60: b0a8 0014 cmpl %a0@(20),%d0 46a64: 67b0 beqs 46a16 <_CORE_mutex_Surrender+0x5e> _Thread_Change_priority( holder, holder->real_priority, true ); 46a66: 4878 0001 pea 1 46a6a: 2f00 movel %d0,%sp@- 46a6c: 2f08 movel %a0,%sp@- 46a6e: 4eb9 0004 7828 jsr 47828 <_Thread_Change_priority> 46a74: 4fef 000c lea %sp@(12),%sp 46a78: 609c bras 46a16 <_CORE_mutex_Surrender+0x5e> <== ALWAYS TAKEN the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 46a7a: 53a8 001c subql #1,%a0@(28) 46a7e: 6080 bras 46a00 <_CORE_mutex_Surrender+0x48> <== ALWAYS TAKEN 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++; 46a80: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 46a84: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 46a88: b0a8 0014 cmpl %a0@(20),%d0 46a8c: 64be bccs 46a4c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 46a8e: 42a7 clrl %sp@- 46a90: 2f00 movel %d0,%sp@- 46a92: 2f08 movel %a0,%sp@- 46a94: 4eb9 0004 7828 jsr 47828 <_Thread_Change_priority> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a9a: 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( 46a9e: 4fef 000c lea %sp@(12),%sp 46aa2: 4280 clrl %d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aa4: 4e5e unlk %fp 46aa6: 4e75 rts 46aa8: 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++; 46aac: 4280 clrl %d0 46aae: 52a8 001c addql #1,%a0@(28) } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46ab2: 4e5e unlk %fp 46ab4: 4e75 rts } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46ab6: 7001 moveq #1,%d0 46ab8: 2540 004e movel %d0,%a2@(78) return CORE_MUTEX_STATUS_SUCCESSFUL; } 46abc: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46ac0: 4200 clrb %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46ac2: 4e5e unlk %fp 46ac4: 4e75 rts ... 00046b1c <_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 ) { 46b1c: 4e56 0000 linkw %fp,#0 46b20: 2f0a movel %a2,%sp@- 46b22: 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)) ) { 46b26: 2f0a movel %a2,%sp@- 46b28: 4eb9 0004 80ac jsr 480ac <_Thread_queue_Dequeue> 46b2e: 588f addql #4,%sp 46b30: 4a80 tstl %d0 46b32: 670a beqs 46b3e <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b34: 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)) ) { 46b38: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b3a: 4e5e unlk %fp 46b3c: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b3e: 203c 0000 0700 movel #1792,%d0 46b44: 40c1 movew %sr,%d1 46b46: 8081 orl %d1,%d0 46b48: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b4a: 202a 0048 movel %a2@(72),%d0 46b4e: b0aa 0040 cmpl %a2@(64),%d0 46b52: 6412 bccs 46b66 <_CORE_semaphore_Surrender+0x4a> <== ALWAYS TAKEN the_semaphore->count += 1; 46b54: 5280 addql #1,%d0 46b56: 2540 0048 movel %d0,%a2@(72) 46b5a: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b5c: 46c1 movew %d1,%sr } return status; } 46b5e: 246e fffc moveal %fp@(-4),%a2 46b62: 4e5e unlk %fp 46b64: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b66: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b68: 46c1 movew %d1,%sr <== NOT EXECUTED 46b6a: 60f2 bras 46b5e <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED 0004b050 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4b050: 4e56 0000 linkw %fp,#0 4b054: 202e 0010 movel %fp@(16),%d0 4b058: 2f0a movel %a2,%sp@- 4b05a: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4b05e: 224a moveal %a2,%a1 4b060: 2f02 movel %d2,%sp@- 4b062: 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; 4b066: 42aa 0004 clrl %a2@(4) next = starting_address; while ( count-- ) { 4b06a: 4a80 tstl %d0 4b06c: 6718 beqs 4b086 <_Chain_Initialize+0x36> <== ALWAYS TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 4b06e: 206e 000c moveal %fp@(12),%a0 while ( count-- ) { current->next = next; next->previous = current; 4b072: 2149 0004 movel %a1,%a0@(4) 4b076: 2208 movel %a0,%d1 4b078: d282 addl %d2,%d1 current = next; next = (Chain_Node *) 4b07a: 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; 4b07c: 2288 movel %a0,%a1@ next->previous = current; current = next; next = (Chain_Node *) 4b07e: 2248 moveal %a0,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4b080: 2041 moveal %d1,%a0 4b082: 4a80 tstl %d0 4b084: 66ec bnes 4b072 <_Chain_Initialize+0x22> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 4b086: 200a movel %a2,%d0 4b088: 5880 addql #4,%d0 4b08a: 2280 movel %d0,%a1@ the_chain->last = current; } 4b08c: 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; 4b08e: 2549 0008 movel %a1,%a2@(8) } 4b092: 245f moveal %sp@+,%a2 4b094: 4e5e unlk %fp 4b096: 4e75 rts 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 da0e moveal 5da0e <_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 0108 moveal %a2@(264),%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> <== NEVER 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 db32 movel %d2,5db32 <_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 8614 jsr 48614 <_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 db32 movel 5db32 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 45758: 42b9 0005 db32 clrl 5db32 <_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 77c0 jmp 477c0 <_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 da2c pea 5da2c <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8e18 jsr 48e18 <_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 8614 jsr 48614 <_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 db32 movel 5db32 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 457fa: 42b9 0005 db32 clrl 5db32 <_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 45810: 4e75 rts ... 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 0108 moveal %a2@(264),%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 d9ee moveal 5d9ee <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1 458a4: 670a beqs 458b0 <_Event_Surrender+0x40> 458a6: b5f9 0005 da0e cmpal 5da0e <_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> <== ALWAYS 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 7974 jsr 47974 <_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 8f60 jsr 48f60 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 7974 jsr 47974 <_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 db32 moveal 5db32 <_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> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4595a: 2279 0005 db32 moveal 5db32 <_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> <== ALWAYS 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 db32 movel %d0,5db32 <_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 45998: 4e75 rts ... 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 7d70 jsr 47d70 <_Thread_Get> switch ( location ) { 459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4) 459b8: 6642 bnes 459fc <_Event_Timeout+0x60> <== ALWAYS 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 da0e cmpl 5da0e <_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 7974 jsr 47974 <_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 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 d954 movel %d0,5d954 <_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 db32 movel 5db32 <_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 db32 movel %d1,5db32 <_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 7974 jsr 47974 <_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 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 45a3c: 5380 subql #1,%d0 45a3e: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 45a44: 60b6 bras 459fc <_Event_Timeout+0x60> <== ALWAYS TAKEN ... 0004b314 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4b314: 4e56 ffcc linkw %fp,#-52 4b318: 226e 000c moveal %fp@(12),%a1 4b31c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b320: 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; 4b324: 2c09 movel %a1,%d6 4b326: 5886 addql #4,%d6 uintptr_t const page_size = heap->page_size; 4b328: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4b32c: 222e 0010 movel %fp@(16),%d1 4b330: 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; 4b334: 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; 4b338: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4b33c: bc89 cmpl %a1,%d6 4b33e: 6500 0146 bcsw 4b486 <_Heap_Allocate_aligned_with_boundary+0x172> <== ALWAYS TAKEN /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4b342: 4a84 tstl %d4 4b344: 6600 013c bnew 4b482 <_Heap_Allocate_aligned_with_boundary+0x16e> <== ALWAYS TAKEN if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b348: b1ca cmpal %a2,%a0 4b34a: 6700 0152 beqw 4b49e <_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; 4b34e: 242e fffc movel %fp@(-4),%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b352: 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; 4b354: 5e82 addql #7,%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b356: 9a89 subl %a1,%d5 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b358: 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; 4b35a: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b35e: 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 ) { 4b362: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4b366: 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 ) { 4b368: b086 cmpl %d6,%d0 4b36a: 630e blss 4b37a <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4b36c: 4a81 tstl %d1 4b36e: 6628 bnes 4b398 <_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; 4b370: 2408 movel %a0,%d2 4b372: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4b374: 4a82 tstl %d2 4b376: 6600 00ee bnew 4b466 <_Heap_Allocate_aligned_with_boundary+0x152> <== NEVER TAKEN break; } block = block->next; 4b37a: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b37e: b1ca cmpal %a2,%a0 4b380: 66e0 bnes 4b362 <_Heap_Allocate_aligned_with_boundary+0x4e> 4b382: 4280 clrl %d0 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4b384: b6aa 0044 cmpl %a2@(68),%d3 4b388: 6304 blss 4b38e <_Heap_Allocate_aligned_with_boundary+0x7a> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b38a: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4b38e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b394: 4e5e unlk %fp 4b396: 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; 4b398: 7efe moveq #-2,%d7 4b39a: 4be8 0008 lea %a0@(8),%a5 4b39e: 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; 4b3a0: 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; 4b3a4: 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; 4b3a6: 2a2e fff8 movel %fp@(-8),%d5 4b3aa: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b3ac: 242e fff4 movel %fp@(-12),%d2 4b3b0: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4b3b2: 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; 4b3b4: d085 addl %d5,%d0 4b3b6: 4c41 7005 remul %d1,%d5,%d7 4b3ba: 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 ) { 4b3bc: b480 cmpl %d0,%d2 4b3be: 630a blss 4b3ca <_Heap_Allocate_aligned_with_boundary+0xb6> 4b3c0: 2a00 movel %d0,%d5 4b3c2: 4c41 5002 remul %d1,%d2,%d5 4b3c6: 9082 subl %d2,%d0 4b3c8: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4b3ca: 4a84 tstl %d4 4b3cc: 676c beqs 4b43a <_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; 4b3ce: 2002 movel %d2,%d0 4b3d0: d089 addl %a1,%d0 4b3d2: 2e00 movel %d0,%d7 4b3d4: 4c44 7005 remul %d4,%d5,%d7 4b3d8: 2e00 movel %d0,%d7 4b3da: 9e85 subl %d5,%d7 4b3dc: 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 ) { 4b3de: be82 cmpl %d2,%d7 4b3e0: 6358 blss 4b43a <_Heap_Allocate_aligned_with_boundary+0x126> 4b3e2: be80 cmpl %d0,%d7 4b3e4: 6454 bccs 4b43a <_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; 4b3e6: 2e0d movel %a5,%d7 4b3e8: 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 ) { 4b3ea: ba87 cmpl %d7,%d5 4b3ec: 658c bcss 4b37a <_Heap_Allocate_aligned_with_boundary+0x66> <== ALWAYS TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 4b3ee: 9a89 subl %a1,%d5 4b3f0: 2005 movel %d5,%d0 4b3f2: 2647 moveal %d7,%a3 4b3f4: 4c41 0002 remul %d1,%d2,%d0 4b3f8: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b3fa: 2005 movel %d5,%d0 4b3fc: d089 addl %a1,%d0 4b3fe: 2405 movel %d5,%d2 4b400: 2e00 movel %d0,%d7 4b402: 4c44 7005 remul %d4,%d5,%d7 4b406: 2e00 movel %d0,%d7 4b408: 9e85 subl %d5,%d7 4b40a: 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 ) { 4b40c: be82 cmpl %d2,%d7 4b40e: 632a blss 4b43a <_Heap_Allocate_aligned_with_boundary+0x126> 4b410: be80 cmpl %d0,%d7 4b412: 6426 bccs 4b43a <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4b414: ba8b cmpl %a3,%d5 4b416: 6500 ff62 bcsw 4b37a <_Heap_Allocate_aligned_with_boundary+0x66> <== ALWAYS TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 4b41a: 9a89 subl %a1,%d5 4b41c: 2005 movel %d5,%d0 4b41e: 4c41 0002 remul %d1,%d2,%d0 4b422: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b424: 2005 movel %d5,%d0 4b426: d089 addl %a1,%d0 4b428: 2405 movel %d5,%d2 4b42a: 2e00 movel %d0,%d7 4b42c: 4c44 7005 remul %d4,%d5,%d7 4b430: 2e00 movel %d0,%d7 4b432: 9e85 subl %d5,%d7 4b434: 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 ) { 4b436: be82 cmpl %d2,%d7 4b438: 62d6 bhis 4b410 <_Heap_Allocate_aligned_with_boundary+0xfc> <== NEVER 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 ) { 4b43a: b48d cmpl %a5,%d2 4b43c: 6500 ff3c bcsw 4b37a <_Heap_Allocate_aligned_with_boundary+0x66> <== ALWAYS TAKEN 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; 4b440: 70f8 moveq #-8,%d0 4b442: 9088 subl %a0,%d0 4b444: 2a40 moveal %d0,%a5 4b446: 2e02 movel %d2,%d7 4b448: dbc2 addal %d2,%a5 4b44a: 202e fffc movel %fp@(-4),%d0 4b44e: 4c40 7005 remul %d0,%d5,%d7 4b452: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4b454: bbcc cmpal %a4,%a5 4b456: 6400 ff1c bccw 4b374 <_Heap_Allocate_aligned_with_boundary+0x60> 4b45a: 4a8d tstl %a5 4b45c: 6600 ff1c bnew 4b37a <_Heap_Allocate_aligned_with_boundary+0x66> <== ALWAYS TAKEN boundary ); } } if ( alloc_begin != 0 ) { 4b460: 4a82 tstl %d2 4b462: 6700 ff16 beqw 4b37a <_Heap_Allocate_aligned_with_boundary+0x66> <== ALWAYS TAKEN if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b466: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4b468: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b46c: 2f02 movel %d2,%sp@- 4b46e: 2f08 movel %a0,%sp@- 4b470: 2f0a movel %a2,%sp@- 4b472: 4eb9 0004 6e44 jsr 46e44 <_Heap_Block_allocate> 4b478: 4fef 0010 lea %sp@(16),%sp 4b47c: 2002 movel %d2,%d0 4b47e: 6000 ff04 braw 4b384 <_Heap_Allocate_aligned_with_boundary+0x70> <== ALWAYS TAKEN /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4b482: b889 cmpl %a1,%d4 4b484: 640c bccs 4b492 <_Heap_Allocate_aligned_with_boundary+0x17e> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b486: 4280 clrl %d0 } return (void *) alloc_begin; } 4b488: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b48e: 4e5e unlk %fp 4b490: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4b492: 4a81 tstl %d1 4b494: 6600 feb2 bnew 4b348 <_Heap_Allocate_aligned_with_boundary+0x34> <== ALWAYS TAKEN 4b498: 2200 movel %d0,%d1 4b49a: 6000 feac braw 4b348 <_Heap_Allocate_aligned_with_boundary+0x34> alignment = page_size; } } while ( block != free_list_tail ) { 4b49e: 4283 clrl %d3 4b4a0: 4280 clrl %d0 4b4a2: 6000 fee0 braw 4b384 <_Heap_Allocate_aligned_with_boundary+0x70> <== ALWAYS TAKEN ... 00046e44 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e44: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e46: 4e56 ffe0 linkw %fp,#-32 46e4a: 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; 46e4e: 2041 moveal %d1,%a0 46e50: 5188 subql #8,%a0 46e52: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46e56: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e5a: 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; 46e5c: 2848 moveal %a0,%a4 46e5e: 240a movel %a2,%d2 46e60: 99ca subal %a2,%a4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e62: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e66: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e6a: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e6e: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e72: 4a03 tstb %d3 46e74: 6600 00aa bnew 46f20 <_Heap_Block_allocate+0xdc> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 46e78: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e7c: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 46e7e: 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; 46e82: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 46e86: 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; 46e88: 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 ); 46e8c: 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; 46e90: 2340 0008 movel %d0,%a1@(8) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46e94: 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 ); 46e98: 97ab 0030 subl %d3,%a3@(48) next->prev = prev; 46e9c: 2b49 000c movel %a1,%a5@(12) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46ea0: b08c cmpl %a4,%d0 46ea2: 6200 0088 bhiw 46f2c <_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; 46ea6: 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 ) 46eaa: 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 ) ) { 46eae: 7201 moveq #1,%d1 46eb0: 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; 46eb2: 2008 movel %a0,%d0 46eb4: 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; 46eb6: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 46eba: c2aa 0004 andl %a2@(4),%d1 46ebe: 6700 0082 beqw 46f42 <_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; 46ec2: 78fe moveq #-2,%d4 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 46ec4: 52ab 0038 addql #1,%a3@(56) 46ec8: 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; 46eca: 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; 46ece: 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; 46ed0: 7801 moveq #1,%d4 46ed2: 8880 orl %d0,%d4 new_block->next = next; 46ed4: 254c 0008 movel %a4,%a2@(8) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46ed8: d483 addl %d3,%d2 46eda: 9488 subl %a0,%d2 new_block->prev = block_before; 46edc: 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; 46ee0: 2544 0004 movel %d4,%a2@(4) block_before->next = new_block; 46ee4: 234a 0008 movel %a2,%a1@(8) next->prev = new_block; 46ee8: 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 ); 46eec: 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; 46eee: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46ef0: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46ef4: 2f05 movel %d5,%sp@- 46ef6: 2f01 movel %d1,%sp@- 46ef8: 2f08 movel %a0,%sp@- 46efa: 2f0b movel %a3,%sp@- 46efc: 4eb9 0004 6d50 jsr 46d50 <_Heap_Block_split> 46f02: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 46f06: 202b 0030 movel %a3@(48),%d0 Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 46f0a: b0ab 0034 cmpl %a3@(52),%d0 46f0e: 6404 bccs 46f14 <_Heap_Block_allocate+0xd0> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 46f10: 2740 0034 movel %d0,%a3@(52) } return block; } 46f14: 200a movel %a2,%d0 46f16: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f1c: 4e5e unlk %fp 46f1e: 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 ) { 46f20: 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 ); 46f24: 224b moveal %a3,%a1 } if ( alloc_area_offset < heap->page_size ) { 46f26: b08c cmpl %a4,%d0 46f28: 6300 ff7c blsw 46ea6 <_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 ); 46f2c: 4874 5800 pea %a4@(00000000,%d5:l) 46f30: 2f09 movel %a1,%sp@- 46f32: 2f0a movel %a2,%sp@- 46f34: 2f0b movel %a3,%sp@- 46f36: 4eb9 0004 6d50 jsr 46d50 <_Heap_Block_split> 46f3c: 4fef 0010 lea %sp@(16),%sp 46f40: 60c4 bras 46f06 <_Heap_Block_allocate+0xc2> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 46f42: 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; 46f44: 78fe moveq #-2,%d4 46f46: 2209 movel %a1,%d1 46f48: c8aa 0004 andl %a2@(4),%d4 46f4c: 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; 46f4e: 78fe moveq #-2,%d4 46f50: 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; 46f52: 7801 moveq #1,%d4 46f54: 8880 orl %d0,%d4 new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f56: d483 addl %d3,%d2 46f58: 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; 46f5a: 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 ); 46f5e: 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; 46f60: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46f62: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f66: 2f05 movel %d5,%sp@- 46f68: 2f01 movel %d1,%sp@- 46f6a: 2f08 movel %a0,%sp@- 46f6c: 2f0b movel %a3,%sp@- 46f6e: 4eb9 0004 6d50 jsr 46d50 <_Heap_Block_split> 46f74: 4fef 0010 lea %sp@(16),%sp 46f78: 608c bras 46f06 <_Heap_Block_allocate+0xc2> <== ALWAYS TAKEN ... 00046d50 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 46d50: 4e56 ffe4 linkw %fp,#-28 46d54: 226e 0008 moveal %fp@(8),%a1 46d58: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 46d5c: 246e 000c moveal %fp@(12),%a2 - 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; 46d60: 76fe moveq #-2,%d3 46d62: 282a 0004 movel %a2@(4),%d4 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 46d66: 2669 0014 moveal %a1@(20),%a3 uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 46d6a: 220b movel %a3,%d1 46d6c: 5181 subql #8,%d1 Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 46d6e: 286e 0010 moveal %fp@(16),%a4 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 46d72: 2429 0010 movel %a1@(16),%d2 uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 46d76: 202e 0014 movel %fp@(20),%d0 46d7a: c684 andl %d4,%d3 46d7c: b280 cmpl %d0,%d1 46d7e: 6302 blss 46d82 <_Heap_Block_split+0x32> 46d80: 2001 movel %d1,%d0 46d82: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d84: 2a00 movel %d0,%d5 46d86: 4c42 5001 remul %d2,%d1,%d5 if ( remainder != 0 ) { 46d8a: 4a81 tstl %d1 46d8c: 6664 bnes 46df2 <_Heap_Block_split+0xa2> Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 46d8e: 2203 movel %d3,%d1 46d90: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46d92: 41f2 3800 lea %a2@(00000000,%d3:l),%a0 uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 46d96: 2400 movel %d0,%d2 46d98: 9280 subl %d0,%d1 46d9a: 588b addql #4,%a3 46d9c: b7c1 cmpal %d1,%a3 46d9e: 6266 bhis 46e06 <_Heap_Block_split+0xb6> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 46da0: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46da2: 47f2 2800 lea %a2@(00000000,%d2:l),%a3 Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 46da6: 9682 subl %d2,%d3 _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; if ( _Heap_Is_used( next_block ) ) { 46da8: 7201 moveq #1,%d1 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 46daa: c880 andl %d0,%d4 - 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; 46dac: 70fe moveq #-2,%d0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 46dae: 8484 orl %d4,%d2 46db0: 2542 0004 movel %d2,%a2@(4) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 46db4: d7a9 0030 addl %d3,%a1@(48) - 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; 46db8: c0a8 0004 andl %a0@(4),%d0 if ( _Heap_Is_used( next_block ) ) { 46dbc: c2b0 0804 andl %a0@(00000004,%d0:l),%d1 46dc0: 6752 beqs 46e14 <_Heap_Block_split+0xc4> free_block_size += next_block_size; next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 46dc2: 7001 moveq #1,%d0 if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 46dc4: 52a9 0038 addql #1,%a1@(56) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 46dc8: 246c 0008 moveal %a4@(8),%a2 free_block_size += next_block_size; next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 46dcc: 8083 orl %d3,%d0 new_block->next = next; 46dce: 274a 0008 movel %a2,%a3@(8) 46dd2: 2740 0004 movel %d0,%a3@(4) next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 46dd6: 70fe moveq #-2,%d0 new_block->prev = block_before; 46dd8: 274c 000c movel %a4,%a3@(12) 46ddc: c1a8 0004 andl %d0,%a0@(4) block_before->next = new_block; 46de0: 294b 0008 movel %a3,%a4@(8) next->prev = new_block; 46de4: 254b 000c movel %a3,%a2@(12) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; 46de8: 2083 movel %d3,%a0@ next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 46dea: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 46dee: 4e5e unlk %fp 46df0: 4e75 rts ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 46df2: d480 addl %d0,%d2 46df4: 9481 subl %d1,%d2 Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 46df6: 2203 movel %d3,%d1 46df8: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46dfa: 41f2 3800 lea %a2@(00000000,%d3:l),%a0 46dfe: 9280 subl %d0,%d1 46e00: 588b addql #4,%a3 46e02: b7c1 cmpal %d1,%a3 46e04: 639a blss 46da0 <_Heap_Block_split+0x50> free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 46e06: 7001 moveq #1,%d0 } } 46e08: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 46e0c: 81a8 0004 orl %d0,%a0@(4) } } 46e10: 4e5e unlk %fp 46e12: 4e75 rts } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 46e14: d680 addl %d0,%d3 next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 46e16: 7001 moveq #1,%d0 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 46e18: 2468 000c moveal %a0@(12),%a2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 46e1c: 2268 0008 moveal %a0@(8),%a1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46e20: 41f3 3800 lea %a3@(00000000,%d3:l),%a0 46e24: 8083 orl %d3,%d0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 46e26: 2749 0008 movel %a1,%a3@(8) new_block->prev = prev; 46e2a: 274a 000c movel %a2,%a3@(12) 46e2e: 2740 0004 movel %d0,%a3@(4) next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 46e32: 70fe moveq #-2,%d0 next->prev = new_block; prev->next = new_block; 46e34: 254b 0008 movel %a3,%a2@(8) 46e38: c1a8 0004 andl %d0,%a0@(4) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 46e3c: 234b 000c movel %a3,%a1@(12) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; 46e40: 2083 movel %d3,%a0@ 46e42: 60a6 bras 46dea <_Heap_Block_split+0x9a> <== ALWAYS TAKEN 000503a8 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 503a8: 4e56 fff4 linkw %fp,#-12 503ac: 206e 0008 moveal %fp@(8),%a0 503b0: 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; 503b4: 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; 503b8: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 503bc: 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; 503c0: b0a8 0018 cmpl %a0@(24),%d0 503c4: 6410 bccs 503d6 <_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 ) { 503c6: b280 cmpl %d0,%d1 503c8: 671c beqs 503e6 <_Heap_Extend+0x3e> 503ca: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 503cc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 503d2: 4e5e unlk %fp 503d4: 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 ) { 503d6: b280 cmpl %d0,%d1 503d8: 63ec blss 503c6 <_Heap_Extend+0x1e> 503da: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 503dc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 503e2: 4e5e unlk %fp 503e4: 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; 503e6: 2200 movel %d0,%d1 503e8: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 503ec: 70f8 moveq #-8,%d0 503ee: 9089 subl %a1,%d0 503f0: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 503f2: 2600 movel %d0,%d3 503f4: 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; 503fa: 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; 503fe: 246e 0014 moveal %fp@(20),%a2 50402: 9082 subl %d2,%d0 50404: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 50406: b0a8 0014 cmpl %a0@(20),%d0 5040a: 640c bccs 50418 <_Heap_Extend+0x70> <== NEVER 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 )); 5040c: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 5040e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50414: 4e5e unlk %fp 50416: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50418: 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); 5041a: 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; 5041e: 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 = 50422: 2228 0020 movel %a0@(32),%d1 50426: 928a subl %a2,%d1 50428: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 5042a: 214a 0024 movel %a2,%a0@(36) 5042e: 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 = 50432: 7401 moveq #1,%d2 50434: 8481 orl %d1,%d2 50436: 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 )); 5043a: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 5043e: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 50442: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 50446: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 5044a: 2f08 movel %a0,%sp@- 5044c: 4eb9 0004 b528 jsr 4b528 <_Heap_Free> 50452: 508f addql #8,%sp 50454: 4280 clrl %d0 50456: 60b6 bras 5040e <_Heap_Extend+0x66> <== ALWAYS TAKEN 0004b4a8 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4b4a8: 4e56 ffe4 linkw %fp,#-28 4b4ac: 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 ) 4b4b0: 2040 moveal %d0,%a0 4b4b2: 5188 subql #8,%a0 4b4b4: 226e 0008 moveal %fp@(8),%a1 4b4b8: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4b4be: 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; 4b4c2: 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 ) 4b4c6: 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 4b4c8: b088 cmpl %a0,%d0 4b4ca: 6200 00a0 bhiw 4b56c <_Heap_Free+0xc4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 4b4ce: 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 4b4d2: b288 cmpl %a0,%d1 4b4d4: 6500 0096 bcsw 4b56c <_Heap_Free+0xc4> <== ALWAYS 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; 4b4d8: 2628 0004 movel %a0@(4),%d3 4b4dc: 74fe moveq #-2,%d2 4b4de: 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); 4b4e0: 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 4b4e4: b5c0 cmpal %d0,%a2 4b4e6: 6500 0084 bcsw 4b56c <_Heap_Free+0xc4> <== ALWAYS TAKEN 4b4ea: b5c1 cmpal %d1,%a2 4b4ec: 627e bhis 4b56c <_Heap_Free+0xc4> <== ALWAYS 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; 4b4ee: 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 ) ) { 4b4f2: 7a01 moveq #1,%d5 4b4f4: ca84 andl %d4,%d5 4b4f6: 4a05 tstb %d5 4b4f8: 6772 beqs 4b56c <_Heap_Free+0xc4> <== ALWAYS 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; 4b4fa: 7afe moveq #-2,%d5 4b4fc: c885 andl %d5,%d4 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4b4fe: b5c1 cmpal %d1,%a2 4b500: 6700 00fa beqw 4b5fc <_Heap_Free+0x154> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4b504: 7a01 moveq #1,%d5 4b506: 7c01 moveq #1,%d6 4b508: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4b50c: 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 ) ) { 4b50e: 7c01 moveq #1,%d6 4b510: c686 andl %d6,%d3 4b512: 4a03 tstb %d3 4b514: 6660 bnes 4b576 <_Heap_Free+0xce> uintptr_t const prev_size = block->prev_size; 4b516: 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); 4b518: 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 4b51a: b1c0 cmpal %d0,%a0 4b51c: 654e bcss 4b56c <_Heap_Free+0xc4> <== ALWAYS TAKEN 4b51e: b1c1 cmpal %d1,%a0 4b520: 624a bhis 4b56c <_Heap_Free+0xc4> <== ALWAYS 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) ) { 4b522: 7001 moveq #1,%d0 4b524: c0a8 0004 andl %a0@(4),%d0 4b528: 4a00 tstb %d0 4b52a: 6740 beqs 4b56c <_Heap_Free+0xc4> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4b52c: 4a05 tstb %d5 4b52e: 6700 00d2 beqw 4b602 <_Heap_Free+0x15a> } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4b532: 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; 4b536: 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; 4b53a: d882 addl %d2,%d4 4b53c: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b53e: 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; 4b540: 246a 0008 moveal %a2@(8),%a2 4b544: 8083 orl %d3,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4b546: 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; 4b54a: 2140 0004 movel %d0,%a0@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4b54e: 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; 4b552: 274a 0008 movel %a2,%a3@(8) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b556: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b55a: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b55e: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4b562: 7001 moveq #1,%d0 return( true ); } 4b564: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4b568: 4e5e unlk %fp 4b56a: 4e75 rts 4b56c: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4b570: 4200 clrb %d0 } 4b572: 4e5e unlk %fp 4b574: 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 */ 4b576: 4a05 tstb %d5 4b578: 6736 beqs 4b5b0 <_Heap_Free+0x108> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4b57a: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4b57e: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b580: 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; 4b582: 246a 0008 moveal %a2@(8),%a2 4b586: 8084 orl %d4,%d0 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4b588: 2184 4800 movel %d4,%a0@(00000000,%d4:l) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4b58c: 214b 000c movel %a3,%a0@(12) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4b590: 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; 4b594: 2140 0004 movel %d0,%a0@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b598: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b59c: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b5a0: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4b5a4: 7001 moveq #1,%d0 new_block->prev = prev; next->prev = new_block; 4b5a6: 2548 000c movel %a0,%a2@(12) prev->next = new_block; 4b5aa: 2748 0008 movel %a0,%a3@(8) 4b5ae: 60b4 bras 4b564 <_Heap_Free+0xbc> <== ALWAYS TAKEN 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; 4b5b0: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b5b2: 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; 4b5b4: 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; 4b5b6: 2669 0008 moveal %a1@(8),%a3 4b5ba: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b5be: cdaa 0004 andl %d6,%a2@(4) next_block->prev_size = block_size; 4b5c2: 2482 movel %d2,%a2@ /* Statistics */ ++stats->free_blocks; 4b5c4: 2029 0038 movel %a1@(56),%d0 4b5c8: 5280 addql #1,%d0 new_block->next = next; 4b5ca: 214b 0008 movel %a3,%a0@(8) new_block->prev = block_before; 4b5ce: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4b5d2: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 4b5d6: 2748 000c movel %a0,%a3@(12) 4b5da: 2340 0038 movel %d0,%a1@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4b5de: b0a9 003c cmpl %a1@(60),%d0 4b5e2: 6300 ff72 blsw 4b556 <_Heap_Free+0xae> } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b5e6: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b5ea: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b5ee: 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; 4b5f2: 2340 003c movel %d0,%a1@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b5f6: 7001 moveq #1,%d0 4b5f8: 6000 ff6a braw 4b564 <_Heap_Free+0xbc> <== ALWAYS TAKEN _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4b5fc: 4205 clrb %d5 4b5fe: 6000 ff0e braw 4b50e <_Heap_Free+0x66> <== ALWAYS TAKEN 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; 4b602: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b604: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b606: 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; 4b608: 8a83 orl %d3,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4b60a: 2483 movel %d3,%a2@ } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b60c: 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; 4b60e: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b612: cdaa 0004 andl %d6,%a2@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b616: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b61a: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b61e: 52a9 0050 addql #1,%a1@(80) 4b622: 6000 ff40 braw 4b564 <_Heap_Free+0xbc> <== ALWAYS TAKEN ... 0006a668 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 6a668: 4e56 fff0 linkw %fp,#-16 6a66c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 6a670: 246e 0008 moveal %fp@(8),%a2 6a674: 266e 000c moveal %fp@(12),%a3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 6a678: 206a 0008 moveal %a2@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 6a67c: 4293 clrl %a3@ info->largest = 0; 6a67e: 42ab 0004 clrl %a3@(4) info->total = 0; 6a682: 42ab 0008 clrl %a3@(8) for(the_block = _Heap_Free_list_first(the_heap); 6a686: b1ca cmpal %a2,%a0 6a688: 672a beqs 6a6b4 <_Heap_Get_free_information+0x4c> <== ALWAYS TAKEN 6a68a: 4282 clrl %d2 6a68c: 7201 moveq #1,%d1 6a68e: 93c9 subal %a1,%a1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 6a690: 70fe moveq #-2,%d0 the_block != tail; the_block = the_block->next) 6a692: 2601 movel %d1,%d3 6a694: 5281 addql #1,%d1 6a696: 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; 6a69a: d3c0 addal %d0,%a1 6a69c: b082 cmpl %d2,%d0 6a69e: 6302 blss 6a6a2 <_Heap_Get_free_information+0x3a> 6a6a0: 2400 movel %d0,%d2 info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 6a6a2: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 6a6a6: b1ca cmpal %a2,%a0 6a6a8: 66e6 bnes 6a690 <_Heap_Get_free_information+0x28> 6a6aa: 2742 0004 movel %d2,%a3@(4) 6a6ae: 2683 movel %d3,%a3@ 6a6b0: 2749 0008 movel %a1,%a3@(8) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 6a6b4: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3 6a6b8: 4e5e unlk %fp 6a6ba: 4e75 rts 0007ac48 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 7ac48: 4e56 fff4 linkw %fp,#-12 7ac4c: 206e 0008 moveal %fp@(8),%a0 7ac50: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7ac54: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 7ac58: 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; 7ac5c: 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; 7ac60: 4292 clrl %a2@ the_info->Free.total = 0; 7ac62: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 7ac66: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 7ac6a: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 7ac6e: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 7ac72: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 7ac76: b489 cmpl %a1,%d2 7ac78: 6746 beqs 7acc0 <_Heap_Get_information+0x78> <== ALWAYS 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; 7ac7a: 260a movel %a2,%d3 7ac7c: 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 ) { 7ac82: 2229 0004 movel %a1@(4),%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; 7ac86: 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) ) 7ac88: 204a moveal %a2,%a0 7ac8a: 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); 7ac8c: 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; 7ac8e: 2229 0004 movel %a1@(4),%d1 7ac92: 0801 0000 btst #0,%d1 7ac96: 6702 beqs 7ac9a <_Heap_Get_information+0x52> 7ac98: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 7ac9a: 5290 addql #1,%a0@ info->total += the_size; 7ac9c: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 7aca0: b0a8 0004 cmpl %a0@(4),%d0 7aca4: 6304 blss 7acaa <_Heap_Get_information+0x62> info->largest = the_size; 7aca6: 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 ) { 7acaa: b3c2 cmpal %d2,%a1 7acac: 66d8 bnes 7ac86 <_Heap_Get_information+0x3e> 7acae: 202a 0014 movel %a2@(20),%d0 7acb2: 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; 7acb4: 2540 0014 movel %d0,%a2@(20) } 7acb8: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7acbc: 4e5e unlk %fp 7acbe: 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 ) { 7acc0: 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; 7acc2: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 7acc6: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7acca: 4e5e unlk %fp <== NOT EXECUTED 7accc: 4e75 rts <== NOT EXECUTED ... 00046c10 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 46c10: 4e56 ffe8 linkw %fp,#-24 46c14: 206e 0008 moveal %fp@(8),%a0 46c18: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 46c1c: 226e 000c moveal %fp@(12),%a1 46c20: 242e 0010 movel %fp@(16),%d2 46c24: 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 ) { 46c28: 6600 00ce bnew 46cf8 <_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; 46c2c: 2009 movel %a1,%d0 46c2e: 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 ) { 46c30: 123c 0004 moveb #4,%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46c34: 2a00 movel %d0,%d5 46c36: 7610 moveq #16,%d3 46c38: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46c3c: 4a84 tstl %d4 46c3e: 6704 beqs 46c44 <_Heap_Initialize+0x34> <== NEVER TAKEN return value - remainder + alignment; 46c40: d081 addl %d1,%d0 46c42: 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; 46c44: 2809 movel %a1,%d4 46c46: 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 ( 46c48: b889 cmpl %a1,%d4 46c4a: 6500 00bc bcsw 46d08 <_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); 46c4e: 2a00 movel %d0,%d5 46c50: 2440 moveal %d0,%a2 46c52: 9a89 subl %a1,%d5 46c54: 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 ( 46c56: ba82 cmpl %d2,%d5 46c58: 6400 00ae bccw 46d08 <_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; 46c5c: 9485 subl %d5,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 46c5e: 2a02 movel %d2,%d5 46c60: 4c41 5000 remul %d1,%d0,%d5 46c64: 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 ( 46c66: b483 cmpl %d3,%d2 46c68: 6500 009e bcsw 46d08 <_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; 46c6c: 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); 46c6e: 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; 46c72: 2002 movel %d2,%d0 46c74: 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; 46c76: 8a82 orl %d2,%d5 return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 46c78: 2481 movel %d1,%a2@ first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 46c7a: 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; 46c7e: 2a0a movel %a2,%d5 46c80: 9a8b subl %a3,%d5 46c82: 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++; 46c86: 2a39 0005 d0f8 movel 5d0f8 ,%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; 46c8c: 2682 movel %d2,%a3@ last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; 46c8e: 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; 46c92: 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 ); 46c94: 2548 0008 movel %a0,%a2@(8) first_block->prev = _Heap_Free_list_head( heap ); 46c98: 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; 46c9c: 2143 0014 movel %d3,%a0@(20) heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; 46ca0: 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; 46ca4: 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++; 46ca8: 2145 0028 movel %d5,%a0@(40) 46cac: 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; 46cae: 2142 002c movel %d2,%a0@(44) stats->free_size = first_block_size; 46cb2: 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; 46cb6: 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; 46cba: 2141 0038 movel %d1,%a0@(56) stats->max_free_blocks = 1; 46cbe: 2141 003c movel %d1,%a0@(60) stats->used_blocks = 0; 46cc2: 42a8 0040 clrl %a0@(64) stats->max_search = 0; 46cc6: 42a8 0044 clrl %a0@(68) stats->allocs = 0; 46cca: 42a8 0048 clrl %a0@(72) stats->searches = 0; 46cce: 42a8 004c clrl %a0@(76) stats->frees = 0; 46cd2: 42a8 0050 clrl %a0@(80) stats->resizes = 0; 46cd6: 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; 46cda: 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++; 46cde: 23c5 0005 d0f8 movel %d5,5d0f8 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; 46ce4: 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; 46ce8: 214a 0020 movel %a2,%a0@(32) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 46cec: 214a 0008 movel %a2,%a0@(8) _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 46cf0: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46cf4: 4e5e unlk %fp 46cf6: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46cf8: 7003 moveq #3,%d0 46cfa: c081 andl %d1,%d0 if ( remainder != 0 ) { 46cfc: 6704 beqs 46d02 <_Heap_Initialize+0xf2> return value - remainder + alignment; 46cfe: 5881 addql #4,%d1 46d00: 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 ) { 46d02: 7003 moveq #3,%d0 46d04: b081 cmpl %d1,%d0 46d06: 650a bcss 46d12 <_Heap_Initialize+0x102> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 46d08: 4280 clrl %d0 } 46d0a: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46d0e: 4e5e unlk %fp 46d10: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d12: 7610 moveq #16,%d3 46d14: 4c41 3000 remul %d1,%d0,%d3 if ( remainder != 0 ) { 46d18: 4a80 tstl %d0 46d1a: 671e beqs 46d3a <_Heap_Initialize+0x12a> return value - remainder + alignment; 46d1c: 2601 movel %d1,%d3 46d1e: 0683 0000 0010 addil #16,%d3 46d24: 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; 46d26: 2009 movel %a1,%d0 46d28: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d2a: 2a00 movel %d0,%d5 46d2c: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46d30: 4a84 tstl %d4 46d32: 6700 ff10 beqw 46c44 <_Heap_Initialize+0x34> <== ALWAYS TAKEN 46d36: 6000 ff08 braw 46c40 <_Heap_Initialize+0x30> <== ALWAYS TAKEN 46d3a: 2009 movel %a1,%d0 46d3c: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d3e: 2a00 movel %d0,%d5 if ( remainder != 0 ) { 46d40: 7610 moveq #16,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d42: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46d46: 4a84 tstl %d4 46d48: 6700 fefa beqw 46c44 <_Heap_Initialize+0x34> 46d4c: 6000 fef2 braw 46c40 <_Heap_Initialize+0x30> <== ALWAYS TAKEN 0005a75c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5a75c: 4e56 0000 linkw %fp,#0 5a760: 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 ) 5a764: 2040 moveal %d0,%a0 5a766: 5188 subql #8,%a0 5a768: 226e 0008 moveal %fp@(8),%a1 5a76c: 2f02 movel %d2,%sp@- 5a76e: 2400 movel %d0,%d2 5a770: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5a776: 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; 5a778: 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 5a77c: b288 cmpl %a0,%d1 5a77e: 6238 bhis 5a7b8 <_Heap_Size_of_alloc_area+0x5c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 5a780: 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 5a784: b3c8 cmpal %a0,%a1 5a786: 6530 bcss 5a7b8 <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5a788: 74fe moveq #-2,%d2 5a78a: c4a8 0004 andl %a0@(4),%d2 5a78e: 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 5a790: b1c1 cmpal %d1,%a0 5a792: 6524 bcss 5a7b8 <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN 5a794: b1c9 cmpal %a1,%a0 5a796: 6220 bhis 5a7b8 <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5a798: 7201 moveq #1,%d1 5a79a: c2a8 0004 andl %a0@(4),%d1 5a79e: 4a01 tstb %d1 5a7a0: 6716 beqs 5a7b8 <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5a7a2: 7204 moveq #4,%d1 5a7a4: 9280 subl %d0,%d1 5a7a6: 2001 movel %d1,%d0 5a7a8: d088 addl %a0,%d0 5a7aa: 226e 0010 moveal %fp@(16),%a1 return true; } 5a7ae: 241f movel %sp@+,%d2 5a7b0: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5a7b2: 2280 movel %d0,%a1@ 5a7b4: 7001 moveq #1,%d0 return true; } 5a7b6: 4e75 rts 5a7b8: 241f movel %sp@+,%d2 5a7ba: 4e5e unlk %fp return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 5a7bc: 4200 clrb %d0 } 5a7be: 4e75 rts 0004796c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4796c: 4e56 ffc8 linkw %fp,#-56 47970: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47974: 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; 47978: 4bfa 0496 lea %pc@(47e10 <_Heap_Walk_print>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4797c: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 47980: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 47984: 282a 0014 movel %a2@(20),%d4 Heap_Block *const last_block = heap->last_block; 47988: 2a2a 0024 movel %a2@(36),%d5 Heap_Block *block = heap->first_block; 4798c: 266a 0020 moveal %a2@(32),%a3 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 47990: 4a2e 0013 tstb %fp@(19) 47994: 6604 bnes 4799a <_Heap_Walk+0x2e> 47996: 4bfa ffcc lea %pc@(47964 <_Heap_Walk_print_nothing>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 4799a: 7003 moveq #3,%d0 4799c: b0b9 0005 ffde cmpl 5ffde <_System_state_Current>,%d0 479a2: 670c beqs 479b0 <_Heap_Walk+0x44> block = next_block; } return true; } 479a4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 479aa: 7001 moveq #1,%d0 block = next_block; } return true; } 479ac: 4e5e unlk %fp 479ae: 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)( 479b0: 2f2a 000c movel %a2@(12),%sp@- 479b4: 2f2a 0008 movel %a2@(8),%sp@- 479b8: 2f05 movel %d5,%sp@- 479ba: 2f0b movel %a3,%sp@- 479bc: 2f2a 001c movel %a2@(28),%sp@- 479c0: 2f2a 0018 movel %a2@(24),%sp@- 479c4: 2f04 movel %d4,%sp@- 479c6: 2f03 movel %d3,%sp@- 479c8: 4879 0005 c3a4 pea 5c3a4 <_Status_Object_name_errors_to_status+0x14> 479ce: 42a7 clrl %sp@- 479d0: 2f02 movel %d2,%sp@- 479d2: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 479d4: 4fef 002c lea %sp@(44),%sp 479d8: 4a83 tstl %d3 479da: 6700 0154 beqw 47b30 <_Heap_Walk+0x1c4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 479de: 7003 moveq #3,%d0 479e0: c083 andl %d3,%d0 479e2: 6600 016a bnew 47b4e <_Heap_Walk+0x1e2> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 479e6: 2204 movel %d4,%d1 479e8: 4c43 1000 remul %d3,%d0,%d1 479ec: 4a80 tstl %d0 479ee: 6600 0176 bnew 47b66 <_Heap_Walk+0x1fa> ); return false; } if ( 479f2: 200b movel %a3,%d0 479f4: 5080 addql #8,%d0 479f6: 4c43 0001 remul %d3,%d1,%d0 479fa: 4a81 tstl %d1 479fc: 6600 0180 bnew 47b7e <_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; 47a00: 2c2b 0004 movel %a3@(4),%d6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 47a04: 7201 moveq #1,%d1 47a06: c286 andl %d6,%d1 47a08: 2d46 fff0 movel %d6,%fp@(-16) 47a0c: 4a01 tstb %d1 47a0e: 6700 0186 beqw 47b96 <_Heap_Walk+0x22a> ); return false; } if ( first_block->prev_size != page_size ) { 47a12: 2053 moveal %a3@,%a0 47a14: b1c3 cmpal %d3,%a0 47a16: 6600 00de bnew 47af6 <_Heap_Walk+0x18a> ); return false; } if ( _Heap_Is_free( last_block ) ) { 47a1a: 2045 moveal %d5,%a0 47a1c: 7cfe moveq #-2,%d6 47a1e: 7001 moveq #1,%d0 47a20: cca8 0004 andl %a0@(4),%d6 47a24: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 47a28: 4a00 tstb %d0 47a2a: 6700 0180 beqw 47bac <_Heap_Walk+0x240> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 47a2e: 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; 47a32: 206a 0008 moveal %a2@(8),%a0 47a36: 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 ) { 47a3a: b1ca cmpal %a2,%a0 47a3c: 6700 0192 beqw 47bd0 <_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; 47a40: 2e2a 0020 movel %a2@(32),%d7 47a44: 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 47a48: b1c7 cmpal %d7,%a0 47a4a: 6500 00c4 bcsw 47b10 <_Heap_Walk+0x1a4> <== ALWAYS TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; 47a4e: 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 47a52: b1cc cmpal %a4,%a0 47a54: 6200 00ba bhiw 47b10 <_Heap_Walk+0x1a4> <== ALWAYS TAKEN ); return false; } if ( 47a58: 2248 moveal %a0,%a1 47a5a: 5089 addql #8,%a1 47a5c: 2009 movel %a1,%d0 47a5e: 4c46 0007 remul %d6,%d7,%d0 47a62: 2d49 fff8 movel %a1,%fp@(-8) 47a66: 4a87 tstl %d7 47a68: 6600 0372 bnew 47ddc <_Heap_Walk+0x470> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 47a6c: 7efe moveq #-2,%d7 47a6e: 7001 moveq #1,%d0 47a70: cea8 0004 andl %a0@(4),%d7 47a74: c0b0 7804 andl %a0@(00000004,%d7:l),%d0 47a78: 6600 037c bnew 47df6 <_Heap_Walk+0x48a> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 47a7c: 2e28 000c movel %a0@(12),%d7 47a80: be8a cmpl %a2,%d7 47a82: 6650 bnes 47ad4 <_Heap_Walk+0x168> <== ALWAYS TAKEN 47a84: 202e fff0 movel %fp@(-16),%d0 47a88: 2241 moveal %d1,%a1 47a8a: 2c2e fff4 movel %fp@(-12),%d6 47a8e: 2d40 fff8 movel %d0,%fp@(-8) 47a92: 2d43 fff4 movel %d3,%fp@(-12) (*printer)( 47a96: 2008 movel %a0,%d0 return false; } prev_block = free_block; free_block = free_block->next; 47a98: 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 ) { 47a9c: b1ca cmpal %a2,%a0 47a9e: 6700 0122 beqw 47bc2 <_Heap_Walk+0x256> 47aa2: bc88 cmpl %a0,%d6 47aa4: 626a bhis 47b10 <_Heap_Walk+0x1a4> ); return false; } if ( 47aa6: 2e08 movel %a0,%d7 47aa8: 5087 addql #8,%d7 47aaa: b1cc cmpal %a4,%a0 47aac: 6262 bhis 47b10 <_Heap_Walk+0x1a4> <== ALWAYS TAKEN 47aae: 262e fffc movel %fp@(-4),%d3 47ab2: 4c43 7001 remul %d3,%d1,%d7 47ab6: 4a81 tstl %d1 47ab8: 6600 0322 bnew 47ddc <_Heap_Walk+0x470> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 47abc: 72fe moveq #-2,%d1 47abe: 7e01 moveq #1,%d7 47ac0: c2a8 0004 andl %a0@(4),%d1 47ac4: ceb0 1804 andl %a0@(00000004,%d1:l),%d7 47ac8: 6600 032c bnew 47df6 <_Heap_Walk+0x48a> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 47acc: 2e28 000c movel %a0@(12),%d7 47ad0: b087 cmpl %d7,%d0 47ad2: 67c2 beqs 47a96 <_Heap_Walk+0x12a> (*printer)( 47ad4: 2f07 movel %d7,%sp@- 47ad6: 2f08 movel %a0,%sp@- 47ad8: 4879 0005 c595 pea 5c595 <_Status_Object_name_errors_to_status+0x205> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47ade: 4878 0001 pea 1 47ae2: 2f02 movel %d2,%sp@- 47ae4: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47ae6: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47aea: 4200 clrb %d0 block = next_block; } return true; } 47aec: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47af2: 4e5e unlk %fp 47af4: 4e75 rts return false; } if ( first_block->prev_size != page_size ) { (*printer)( 47af6: 2f03 movel %d3,%sp@- 47af8: 2f08 movel %a0,%sp@- 47afa: 4879 0005 c4e9 pea 5c4e9 <_Status_Object_name_errors_to_status+0x159> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b00: 4878 0001 pea 1 47b04: 2f02 movel %d2,%sp@- 47b06: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47b08: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b0c: 4200 clrb %d0 47b0e: 60dc bras 47aec <_Heap_Walk+0x180> <== ALWAYS TAKEN 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)( 47b10: 2f08 movel %a0,%sp@- 47b12: 4879 0005 c529 pea 5c529 <_Status_Object_name_errors_to_status+0x199> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b18: 4878 0001 pea 1 47b1c: 2f02 movel %d2,%sp@- 47b1e: 4e95 jsr %a5@ 47b20: 4fef 0010 lea %sp@(16),%sp 47b24: 4200 clrb %d0 block = next_block; } return true; } 47b26: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b2c: 4e5e unlk %fp 47b2e: 4e75 rts first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 47b30: 4879 0005 c435 pea 5c435 <_Status_Object_name_errors_to_status+0xa5> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47b36: 4878 0001 pea 1 47b3a: 2f02 movel %d2,%sp@- 47b3c: 4e95 jsr %a5@ 47b3e: 4fef 000c lea %sp@(12),%sp 47b42: 4200 clrb %d0 block = next_block; } return true; } 47b44: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b4a: 4e5e unlk %fp 47b4c: 4e75 rts return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 47b4e: 2f03 movel %d3,%sp@- 47b50: 4879 0005 c448 pea 5c448 <_Status_Object_name_errors_to_status+0xb8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b56: 4878 0001 pea 1 47b5a: 2f02 movel %d2,%sp@- 47b5c: 4e95 jsr %a5@ 47b5e: 4fef 0010 lea %sp@(16),%sp 47b62: 4200 clrb %d0 47b64: 60c0 bras 47b26 <_Heap_Walk+0x1ba> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 47b66: 2f04 movel %d4,%sp@- 47b68: 4879 0005 c466 pea 5c466 <_Status_Object_name_errors_to_status+0xd6> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b6e: 4878 0001 pea 1 47b72: 2f02 movel %d2,%sp@- 47b74: 4e95 jsr %a5@ 47b76: 4fef 0010 lea %sp@(16),%sp 47b7a: 4200 clrb %d0 47b7c: 60a8 bras 47b26 <_Heap_Walk+0x1ba> <== ALWAYS TAKEN } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 47b7e: 2f0b movel %a3,%sp@- 47b80: 4879 0005 c48a pea 5c48a <_Status_Object_name_errors_to_status+0xfa> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b86: 4878 0001 pea 1 47b8a: 2f02 movel %d2,%sp@- 47b8c: 4e95 jsr %a5@ 47b8e: 4fef 0010 lea %sp@(16),%sp 47b92: 4200 clrb %d0 47b94: 6090 bras 47b26 <_Heap_Walk+0x1ba> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47b96: 4879 0005 c4bb pea 5c4bb <_Status_Object_name_errors_to_status+0x12b> 47b9c: 4878 0001 pea 1 47ba0: 2f02 movel %d2,%sp@- 47ba2: 4e95 jsr %a5@ 47ba4: 4fef 000c lea %sp@(12),%sp 47ba8: 4200 clrb %d0 47baa: 6098 bras 47b44 <_Heap_Walk+0x1d8> <== ALWAYS TAKEN return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 47bac: 4879 0005 c514 pea 5c514 <_Status_Object_name_errors_to_status+0x184> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47bb2: 4878 0001 pea 1 47bb6: 2f02 movel %d2,%sp@- 47bb8: 4e95 jsr %a5@ 47bba: 4fef 000c lea %sp@(12),%sp 47bbe: 4200 clrb %d0 47bc0: 6082 bras 47b44 <_Heap_Walk+0x1d8> <== ALWAYS TAKEN 47bc2: 262e fff8 movel %fp@(-8),%d3 47bc6: 2209 movel %a1,%d1 47bc8: 2d43 fff0 movel %d3,%fp@(-16) 47bcc: 262e fff4 movel %fp@(-12),%d3 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47bd0: b7c5 cmpal %d5,%a3 47bd2: 6700 fdd0 beqw 479a4 <_Heap_Walk+0x38> <== ALWAYS TAKEN 47bd6: 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; 47bda: 7efe moveq #-2,%d7 47bdc: cc87 andl %d7,%d6 47bde: 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); 47be2: 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 ) { 47be6: 4a01 tstb %d1 47be8: 6700 0126 beqw 47d10 <_Heap_Walk+0x3a4> <== ALWAYS TAKEN (*printer)( 47bec: 2f06 movel %d6,%sp@- 47bee: 2f0b movel %a3,%sp@- 47bf0: 4879 0005 c5c7 pea 5c5c7 <_Status_Object_name_errors_to_status+0x237> 47bf6: 42a7 clrl %sp@- 47bf8: 2f02 movel %d2,%sp@- 47bfa: 4e95 jsr %a5@ 47bfc: 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 47c00: b9ea 0020 cmpal %a2@(32),%a4 47c04: 6500 00d0 bcsw 47cd6 <_Heap_Walk+0x36a> <== ALWAYS TAKEN 47c08: b9ea 0024 cmpal %a2@(36),%a4 47c0c: 6200 00c8 bhiw 47cd6 <_Heap_Walk+0x36a> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 47c10: 262e fff8 movel %fp@(-8),%d3 47c14: 2206 movel %d6,%d1 47c16: 4c43 1000 remul %d3,%d0,%d1 47c1a: 4a80 tstl %d0 47c1c: 6600 0162 bnew 47d80 <_Heap_Walk+0x414> ); return false; } if ( block_size < min_block_size ) { 47c20: bc84 cmpl %d4,%d6 47c22: 6500 0178 bcsw 47d9c <_Heap_Walk+0x430> ); return false; } if ( next_block_begin <= block_begin ) { 47c26: b9cb cmpal %a3,%a4 47c28: 6300 0196 blsw 47dc0 <_Heap_Walk+0x454> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 47c2c: 7001 moveq #1,%d0 47c2e: c0ac 0004 andl %a4@(4),%d0 47c32: 4a00 tstb %d0 47c34: 6600 00bc bnew 47cf2 <_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; 47c38: 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; 47c3c: 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; 47c3e: 43f9 0005 c6bd lea 5c6bd <_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; 47c44: 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; 47c48: 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; 47c4a: 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); 47c4e: 2e0b movel %a3,%d7 47c50: 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)( 47c52: 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; 47c56: b2aa 000c cmpl %a2@(12),%d1 47c5a: 6710 beqs 47c6c <_Heap_Walk+0x300> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 47c5c: 43f9 0005 c6c7 lea 5c6c7 <_Status_Object_name_errors_to_status+0x337>,%a1 47c62: b5c1 cmpal %d1,%a2 47c64: 6706 beqs 47c6c <_Heap_Walk+0x300> 47c66: 43f9 0005 c302 lea 5c302 ,%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)( 47c6c: 202b 000c movel %a3@(12),%d0 47c70: 41f9 0005 c6d1 lea 5c6d1 <_Status_Object_name_errors_to_status+0x341>,%a0 47c76: b0ae fffc cmpl %fp@(-4),%d0 47c7a: 6710 beqs 47c8c <_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)" : ""), 47c7c: 41f9 0005 c6dc lea 5c6dc <_Status_Object_name_errors_to_status+0x34c>,%a0 47c82: b5c0 cmpal %d0,%a2 47c84: 6706 beqs 47c8c <_Heap_Walk+0x320> 47c86: 41f9 0005 c302 lea 5c302 ,%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)( 47c8c: 2f09 movel %a1,%sp@- 47c8e: 2f01 movel %d1,%sp@- 47c90: 2f08 movel %a0,%sp@- 47c92: 2f00 movel %d0,%sp@- 47c94: 2f0b movel %a3,%sp@- 47c96: 4879 0005 c6e6 pea 5c6e6 <_Status_Object_name_errors_to_status+0x356> 47c9c: 42a7 clrl %sp@- 47c9e: 2f02 movel %d2,%sp@- 47ca0: 4e95 jsr %a5@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 47ca2: 4fef 0020 lea %sp@(32),%sp 47ca6: 2047 moveal %d7,%a0 47ca8: 2010 movel %a0@,%d0 47caa: b086 cmpl %d6,%d0 47cac: 6700 0082 beqw 47d30 <_Heap_Walk+0x3c4> (*printer)( 47cb0: 2f07 movel %d7,%sp@- 47cb2: 2f00 movel %d0,%sp@- 47cb4: 2f06 movel %d6,%sp@- 47cb6: 2f0b movel %a3,%sp@- 47cb8: 4879 0005 c712 pea 5c712 <_Status_Object_name_errors_to_status+0x382> 47cbe: 4878 0001 pea 1 47cc2: 2f02 movel %d2,%sp@- 47cc4: 4e95 jsr %a5@ 47cc6: 4fef 001c lea %sp@(28),%sp block = next_block; } return true; } 47cca: 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)( 47cd0: 4200 clrb %d0 block = next_block; } return true; } 47cd2: 4e5e unlk %fp 47cd4: 4e75 rts block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 47cd6: 2f0c movel %a4,%sp@- 47cd8: 2f0b movel %a3,%sp@- 47cda: 4879 0005 c603 pea 5c603 <_Status_Object_name_errors_to_status+0x273> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47ce0: 4878 0001 pea 1 47ce4: 2f02 movel %d2,%sp@- 47ce6: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47ce8: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47cec: 4200 clrb %d0 47cee: 6000 fdfc braw 47aec <_Heap_Walk+0x180> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47cf2: b9c5 cmpal %d5,%a4 47cf4: 6700 fcae beqw 479a4 <_Heap_Walk+0x38> <== ALWAYS TAKEN 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 ) { 47cf8: 2c2c 0004 movel %a4@(4),%d6 47cfc: 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; 47cfe: 7efe moveq #-2,%d7 47d00: 264c moveal %a4,%a3 47d02: c286 andl %d6,%d1 47d04: 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); 47d06: 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 ) { 47d0a: 4a01 tstb %d1 47d0c: 6600 fede bnew 47bec <_Heap_Walk+0x280> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 47d10: 2f13 movel %a3@,%sp@- 47d12: 2f06 movel %d6,%sp@- 47d14: 2f0b movel %a3,%sp@- 47d16: 4879 0005 c5de pea 5c5de <_Status_Object_name_errors_to_status+0x24e> 47d1c: 42a7 clrl %sp@- 47d1e: 2f02 movel %d2,%sp@- 47d20: 4e95 jsr %a5@ 47d22: 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 47d26: b9ea 0020 cmpal %a2@(32),%a4 47d2a: 65aa bcss 47cd6 <_Heap_Walk+0x36a> <== ALWAYS TAKEN 47d2c: 6000 feda braw 47c08 <_Heap_Walk+0x29c> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 47d30: 7001 moveq #1,%d0 47d32: c680 andl %d0,%d3 47d34: 4a03 tstb %d3 47d36: 672e beqs 47d66 <_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; 47d38: 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 ) { 47d3c: b5c8 cmpal %a0,%a2 47d3e: 670c beqs 47d4c <_Heap_Walk+0x3e0> <== ALWAYS TAKEN if ( free_block == block ) { 47d40: b7c8 cmpal %a0,%a3 47d42: 67ae beqs 47cf2 <_Heap_Walk+0x386> return true; } free_block = free_block->next; 47d44: 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 ) { 47d48: b5c8 cmpal %a0,%a2 47d4a: 66f4 bnes 47d40 <_Heap_Walk+0x3d4> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47d4c: 2f0b movel %a3,%sp@- 47d4e: 4879 0005 c77a pea 5c77a <_Status_Object_name_errors_to_status+0x3ea> 47d54: 4878 0001 pea 1 47d58: 2f02 movel %d2,%sp@- 47d5a: 4e95 jsr %a5@ 47d5c: 4fef 0010 lea %sp@(16),%sp 47d60: 4200 clrb %d0 47d62: 6000 fdc2 braw 47b26 <_Heap_Walk+0x1ba> return false; } if ( !prev_used ) { (*printer)( 47d66: 2f0b movel %a3,%sp@- 47d68: 4879 0005 c74b pea 5c74b <_Status_Object_name_errors_to_status+0x3bb> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47d6e: 4878 0001 pea 1 47d72: 2f02 movel %d2,%sp@- 47d74: 4e95 jsr %a5@ 47d76: 4fef 0010 lea %sp@(16),%sp 47d7a: 4200 clrb %d0 47d7c: 6000 fda8 braw 47b26 <_Heap_Walk+0x1ba> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 47d80: 2f06 movel %d6,%sp@- 47d82: 2f0b movel %a3,%sp@- 47d84: 4879 0005 c630 pea 5c630 <_Status_Object_name_errors_to_status+0x2a0> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47d8a: 4878 0001 pea 1 47d8e: 2f02 movel %d2,%sp@- 47d90: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47d92: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47d96: 4200 clrb %d0 47d98: 6000 fd52 braw 47aec <_Heap_Walk+0x180> return false; } if ( block_size < min_block_size ) { (*printer)( 47d9c: 2f04 movel %d4,%sp@- 47d9e: 2f06 movel %d6,%sp@- 47da0: 2f0b movel %a3,%sp@- 47da2: 4879 0005 c65e pea 5c65e <_Status_Object_name_errors_to_status+0x2ce> 47da8: 4878 0001 pea 1 47dac: 2f02 movel %d2,%sp@- 47dae: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 47db0: 4fef 0018 lea %sp@(24),%sp block = next_block; } return true; } 47db4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 return false; } if ( block_size < min_block_size ) { (*printer)( 47dba: 4200 clrb %d0 block = next_block; } return true; } 47dbc: 4e5e unlk %fp 47dbe: 4e75 rts return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47dc0: 2f0c movel %a4,%sp@- 47dc2: 2f0b movel %a3,%sp@- 47dc4: 4879 0005 c689 pea 5c689 <_Status_Object_name_errors_to_status+0x2f9> 47dca: 4878 0001 pea 1 47dce: 2f02 movel %d2,%sp@- 47dd0: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47dd2: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47dd6: 4200 clrb %d0 47dd8: 6000 fd12 braw 47aec <_Heap_Walk+0x180> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 47ddc: 2f08 movel %a0,%sp@- 47dde: 4879 0005 c549 pea 5c549 <_Status_Object_name_errors_to_status+0x1b9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47de4: 4878 0001 pea 1 47de8: 2f02 movel %d2,%sp@- 47dea: 4e95 jsr %a5@ 47dec: 4fef 0010 lea %sp@(16),%sp 47df0: 4200 clrb %d0 47df2: 6000 fd32 braw 47b26 <_Heap_Walk+0x1ba> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 47df6: 2f08 movel %a0,%sp@- 47df8: 4879 0005 c579 pea 5c579 <_Status_Object_name_errors_to_status+0x1e9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47dfe: 4878 0001 pea 1 47e02: 2f02 movel %d2,%sp@- 47e04: 4e95 jsr %a5@ 47e06: 4fef 0010 lea %sp@(16),%sp 47e0a: 4200 clrb %d0 47e0c: 6000 fd18 braw 47b26 <_Heap_Walk+0x1ba> 00046470 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 46470: 4e56 0000 linkw %fp,#0 46474: 2f0a movel %a2,%sp@- 46476: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46478: 4ab9 0005 db6e tstl 5db6e <_IO_Number_of_drivers> 4647e: 671e beqs 4649e <_IO_Initialize_all_drivers+0x2e> <== ALWAYS TAKEN 46480: 4282 clrl %d2 46482: 45f9 0004 af90 lea 4af90 ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 46488: 42a7 clrl %sp@- 4648a: 42a7 clrl %sp@- 4648c: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 4648e: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 46490: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46492: 4fef 000c lea %sp@(12),%sp 46496: b4b9 0005 db6e cmpl 5db6e <_IO_Number_of_drivers>,%d2 4649c: 65ea bcss 46488 <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 4649e: 242e fff8 movel %fp@(-8),%d2 464a2: 246e fffc moveal %fp@(-4),%a2 464a6: 4e5e unlk %fp 464a8: 4e75 rts 000464aa <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 464aa: 4e56 fff0 linkw %fp,#-16 464ae: 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; 464b2: 2639 0005 c256 movel 5c256 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 464b8: 2439 0005 c252 movel 5c252 ,%d2 number_of_drivers = Configuration.maximum_drivers; 464be: 2839 0005 c24e movel 5c24e ,%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 ) 464c4: b882 cmpl %d2,%d4 464c6: 6216 bhis 464de <_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; 464c8: 23c3 0005 db72 movel %d3,5db72 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 464ce: 23c2 0005 db6e movel %d2,5db6e <_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; } 464d4: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464da: 4e5e unlk %fp 464dc: 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 *) 464de: 2004 movel %d4,%d0 464e0: 2a04 movel %d4,%d5 464e2: e788 lsll #3,%d0 464e4: eb8d lsll #5,%d5 464e6: 9a80 subl %d0,%d5 464e8: 2f05 movel %d5,%sp@- 464ea: 4eb9 0004 907c jsr 4907c <_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( 464f0: 2f05 movel %d5,%sp@- 464f2: 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; 464f4: 23c4 0005 db6e movel %d4,5db6e <_IO_Number_of_drivers> memset( 464fa: 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 *) 464fc: 23c0 0005 db72 movel %d0,5db72 <_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( 46502: 4eb9 0004 e098 jsr 4e098 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46508: 4fef 0010 lea %sp@(16),%sp 4650c: 4a82 tstl %d2 4650e: 67c4 beqs 464d4 <_IO_Manager_initialization+0x2a> <== ALWAYS TAKEN 46510: 2839 0005 db72 movel 5db72 <_IO_Driver_address_table>,%d4 46516: 4280 clrl %d0 46518: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 4651a: 2243 moveal %d3,%a1 4651c: 2044 moveal %d4,%a0 4651e: d3c0 addal %d0,%a1 46520: 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++ ) 46522: 5281 addql #1,%d1 46524: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 4652a: 20d9 movel %a1@+,%a0@+ 4652c: 20d9 movel %a1@+,%a0@+ 4652e: 20d9 movel %a1@+,%a0@+ 46530: 20d9 movel %a1@+,%a0@+ 46532: 20d9 movel %a1@+,%a0@+ 46534: 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++ ) 46536: b282 cmpl %d2,%d1 46538: 649a bccs 464d4 <_IO_Manager_initialization+0x2a> _IO_Driver_address_table[index] = driver_table[index]; 4653a: 2243 moveal %d3,%a1 4653c: 2044 moveal %d4,%a0 4653e: d3c0 addal %d0,%a1 46540: 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++ ) 46542: 5281 addql #1,%d1 46544: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 4654a: 20d9 movel %a1@+,%a0@+ 4654c: 20d9 movel %a1@+,%a0@+ 4654e: 20d9 movel %a1@+,%a0@+ 46550: 20d9 movel %a1@+,%a0@+ 46552: 20d9 movel %a1@+,%a0@+ 46554: 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++ ) 46556: b282 cmpl %d2,%d1 46558: 65c0 bcss 4651a <_IO_Manager_initialization+0x70> <== ALWAYS TAKEN 4655a: 6000 ff78 braw 464d4 <_IO_Manager_initialization+0x2a> <== ALWAYS TAKEN ... 00046f7c <_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 ); 46f7c: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f7e: 4e56 0000 linkw %fp,#0 46f82: 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 ); 46f86: 1001 moveb %d1,%d0 46f88: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f8a: 2f03 movel %d3,%sp@- 46f8c: 202e 0008 movel %fp@(8),%d0 46f90: 2f02 movel %d2,%sp@- 46f92: 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 ); 46f96: 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; 46f98: 13c1 0005 d9fe moveb %d1,5d9fe <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f9e: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46fa0: 23c0 0005 d9fa movel %d0,5d9fa <_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 ); 46fa6: 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; 46fa8: 23c2 0005 da00 movel %d2,5da00 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46fae: 4eb9 0004 8cae jsr 48cae <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46fb4: 307c 0700 moveaw #1792,%a0 46fb8: 2608 movel %a0,%d3 46fba: 40c0 movew %sr,%d0 46fbc: 8083 orl %d3,%d0 46fbe: 46c0 movew %d0,%sr 46fc0: 2002 movel %d2,%d0 <== NOT EXECUTED 46fc2: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46fc8: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46fca: 7005 moveq #5,%d0 46fcc: 4fef 000c lea %sp@(12),%sp 46fd0: 23c0 0005 dad6 movel %d0,5dad6 <_System_state_Current> 46fd6: 60fe bras 46fd6 <_Internal_error_Occurred+0x5a> <== ALWAYS TAKEN 00047040 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47040: 4e56 fff0 linkw %fp,#-16 47044: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47048: 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 ) 4704c: 4aaa 0014 tstl %a2@(20) 47050: 660c bnes 4705e <_Objects_Allocate+0x1e> <== NEVER TAKEN 47052: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 47054: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4705a: 4e5e unlk %fp 4705c: 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 ); 4705e: 240a movel %a2,%d2 47060: 0682 0000 001c addil #28,%d2 47066: 47f9 0004 b014 lea 4b014 <_Chain_Get>,%a3 4706c: 2f02 movel %d2,%sp@- 4706e: 4e93 jsr %a3@ if ( information->auto_extend ) { 47070: 588f addql #4,%sp 47072: 4a2a 0010 tstb %a2@(16) 47076: 67dc beqs 47054 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 47078: 4a80 tstl %d0 4707a: 6738 beqs 470b4 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 4707c: 2040 moveal %d0,%a0 4707e: 4281 clrl %d1 47080: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47082: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47084: 362a 0008 movew %a2@(8),%d3 47088: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 4708c: 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 ]--; 47090: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47094: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 47096: 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 ]--; 47098: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 4709c: 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 ]--; 470a0: 206a 002a moveal %a2@(42),%a0 470a4: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 470a6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470ac: 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 ]--; 470ae: d1c1 addal %d1,%a0 470b0: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 470b2: 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 ); 470b4: 2f0a movel %a2,%sp@- 470b6: 4eb9 0004 70fc jsr 470fc <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 470bc: 2f02 movel %d2,%sp@- 470be: 4e93 jsr %a3@ } if ( the_object ) { 470c0: 508f addql #8,%sp 470c2: 4a80 tstl %d0 470c4: 66b6 bnes 4707c <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 470c6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470cc: 4e5e unlk %fp 470ce: 4e75 rts 000470fc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 470fc: 4e56 ffcc linkw %fp,#-52 47100: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47104: 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 ); 47108: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4710a: 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 ); 4710e: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47112: 4a88 tstl %a0 47114: 6700 022c beqw 47342 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 47118: 322a 000e movew %a2@(14),%d1 4711c: 302a 0012 movew %a2@(18),%d0 47120: 3801 movew %d1,%d4 47122: 0284 0000 ffff andil #65535,%d4 47128: 88c0 divuw %d0,%d4 4712a: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47130: 6700 0224 beqw 47356 <_Objects_Extend_information+0x25a> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 47134: 4a90 tstl %a0@ 47136: 6700 021e beqw 47356 <_Objects_Extend_information+0x25a> <== ALWAYS TAKEN 4713a: 5888 addql #4,%a0 4713c: 2605 movel %d5,%d3 4713e: 4282 clrl %d2 47140: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 47146: 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++ ) { 47148: 5282 addql #1,%d2 4714a: b484 cmpl %d4,%d2 4714c: 6404 bccs 47152 <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 4714e: 4a98 tstl %a0@+ 47150: 66f4 bnes 47146 <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 47152: 0281 0000 ffff andil #65535,%d1 47158: 2641 moveal %d1,%a3 4715a: 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 ) { 4715c: b7fc 0000 ffff cmpal #65535,%a3 47162: 6200 0186 bhiw 472ea <_Objects_Extend_information+0x1ee> <== ALWAYS TAKEN /* * 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; 47166: 41ea 0014 lea %a2@(20),%a0 4716a: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 4716e: 4a2a 0010 tstb %a2@(16) 47172: 6700 0180 beqw 472f4 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 47176: 2f00 movel %d0,%sp@- 47178: 4eb9 0004 90b0 jsr 490b0 <_Workspace_Allocate> if ( !new_object_block ) 4717e: 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 ); 47180: 2c00 movel %d0,%d6 if ( !new_object_block ) 47182: 6700 0166 beqw 472ea <_Objects_Extend_information+0x1ee> <== ALWAYS TAKEN } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 47186: 4280 clrl %d0 47188: 302a 000e movew %a2@(14),%d0 4718c: b083 cmpl %d3,%d0 4718e: 6200 00c4 bhiw 47254 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 47192: 2a44 moveal %d4,%a5 47194: 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 ); 47196: 200b movel %a3,%d0 47198: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 4719c: d088 addl %a0,%d0 4719e: d085 addl %d5,%d0 471a0: e588 lsll #2,%d0 471a2: 2f00 movel %d0,%sp@- 471a4: 4eb9 0004 90b0 jsr 490b0 <_Workspace_Allocate> if ( !object_blocks ) { 471aa: 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 ); 471ac: 2840 moveal %d0,%a4 if ( !object_blocks ) { 471ae: 4a80 tstl %d0 471b0: 6700 01b2 beqw 47364 <_Objects_Extend_information+0x268> <== ALWAYS TAKEN } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471b4: 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 ) { 471b6: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471b8: 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 ) { 471ba: 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); 471be: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 471c2: de8d addl %a5,%d7 471c4: b085 cmpl %d5,%d0 471c6: 6200 013c bhiw 47304 <_Objects_Extend_information+0x208> <== ALWAYS TAKEN } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471ca: 4a85 tstl %d5 471cc: 670c beqs 471da <_Objects_Extend_information+0xde> <== ALWAYS TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 471ce: 2047 moveal %d7,%a0 471d0: 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; 471d2: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471d4: 5280 addql #1,%d0 471d6: b085 cmpl %d5,%d0 471d8: 65f8 bcss 471d2 <_Objects_Extend_information+0xd6> <== ALWAYS TAKEN 471da: 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 ); 471dc: 4281 clrl %d1 471de: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 471e2: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 471e6: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 471e8: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 471ec: b283 cmpl %d3,%d1 471ee: 6310 blss 47200 <_Objects_Extend_information+0x104> <== ALWAYS TAKEN 471f0: 2247 moveal %d7,%a1 471f2: 2003 movel %d3,%d0 471f4: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 471f8: 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++ ) { 471fa: 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 ; 471fc: b280 cmpl %d0,%d1 471fe: 62f8 bhis 471f8 <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 47200: 203c 0000 0700 movel #1792,%d0 47206: 40c4 movew %sr,%d4 47208: 8084 orl %d4,%d0 4720a: 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( 4720c: 2012 movel %a2@,%d0 4720e: 7218 moveq #24,%d1 47210: 4285 clrl %d5 47212: e3a8 lsll %d1,%d0 47214: 3a0b movew %a3,%d5 47216: 4281 clrl %d1 47218: 2245 moveal %d5,%a1 4721a: 7a1b moveq #27,%d5 4721c: 322a 0004 movew %a2@(4),%d1 47220: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47224: 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( 47228: 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; 4722a: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 4722e: 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( 47232: 8081 orl %d1,%d0 47234: 2209 movel %a1,%d1 47236: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 47238: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4723c: 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; 47240: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47244: 46c4 movew %d4,%sr if ( old_tables ) 47246: 4a88 tstl %a0 47248: 670a beqs 47254 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 4724a: 2f08 movel %a0,%sp@- 4724c: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> 47252: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47254: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47258: 4280 clrl %d0 4725a: 280e movel %fp,%d4 4725c: 0684 ffff fff4 addil #-12,%d4 47262: 47f9 0004 b014 lea 4b014 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 47268: 2a0a movel %a2,%d5 4726a: 0685 0000 001c addil #28,%d5 47270: 49f9 0004 6748 lea 46748 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47276: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47278: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4727c: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47280: 2f2a 0014 movel %a2@(20),%sp@- 47284: 2f00 movel %d0,%sp@- 47286: 2f06 movel %d6,%sp@- 47288: 2f04 movel %d4,%sp@- 4728a: 4eb9 0004 b050 jsr 4b050 <_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 ) { 47290: 4fef 0010 lea %sp@(16),%sp 47294: 2f04 movel %d4,%sp@- 47296: 4e93 jsr %a3@ 47298: 588f addql #4,%sp 4729a: 4a80 tstl %d0 4729c: 6732 beqs 472d0 <_Objects_Extend_information+0x1d4> <== ALWAYS TAKEN the_object->id = _Objects_Build_id( 4729e: 2212 movel %a2@,%d1 472a0: 7c18 moveq #24,%d6 472a2: 7e1b moveq #27,%d7 472a4: 2040 moveal %d0,%a0 472a6: eda9 lsll %d6,%d1 472a8: 4286 clrl %d6 472aa: 3c2a 0004 movew %a2@(4),%d6 472ae: 08c1 0010 bset #16,%d1 472b2: efae lsll %d7,%d6 472b4: 8286 orl %d6,%d1 472b6: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 472b8: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 472ba: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472be: 2f00 movel %d0,%sp@- 472c0: 2f05 movel %d5,%sp@- 472c2: 4e94 jsr %a4@ index++; 472c4: 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 ) { 472c6: 2f04 movel %d4,%sp@- 472c8: 4e93 jsr %a3@ 472ca: 588f addql #4,%sp 472cc: 4a80 tstl %d0 472ce: 66ce bnes 4729e <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472d0: 4280 clrl %d0 information->inactive = 472d2: 322a 0028 movew %a2@(40),%d1 472d6: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472da: 206a 002a moveal %a2@(42),%a0 information->inactive = 472de: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472e0: 3009 movew %a1,%d0 information->inactive = 472e2: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472e6: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 472ea: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 472f0: 4e5e unlk %fp 472f2: 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 ); 472f4: 2f00 movel %d0,%sp@- 472f6: 4eb9 0004 907c jsr 4907c <_Workspace_Allocate_or_fatal_error> 472fc: 588f addql #4,%sp 472fe: 2c00 movel %d0,%d6 47300: 6000 fe84 braw 47186 <_Objects_Extend_information+0x8a> <== ALWAYS TAKEN /* * 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, 47304: e58c lsll #2,%d4 47306: 2f04 movel %d4,%sp@- 47308: 2f2a 002e movel %a2@(46),%sp@- 4730c: 2f0c movel %a4,%sp@- 4730e: 4eb9 0004 e028 jsr 4e028 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47314: 2f04 movel %d4,%sp@- 47316: 2f2a 002a movel %a2@(42),%sp@- 4731a: 2f0d movel %a5,%sp@- 4731c: 4eb9 0004 e028 jsr 4e028 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47322: 4280 clrl %d0 47324: 302a 000e movew %a2@(14),%d0 47328: da80 addl %d0,%d5 4732a: e58d lsll #2,%d5 4732c: 2f05 movel %d5,%sp@- 4732e: 2f2a 0018 movel %a2@(24),%sp@- 47332: 2f07 movel %d7,%sp@- 47334: 4eb9 0004 e028 jsr 4e028 4733a: 4fef 0024 lea %sp@(36),%sp 4733e: 6000 fe9c braw 471dc <_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 ) 47342: 4280 clrl %d0 47344: 2605 movel %d5,%d3 47346: 4282 clrl %d2 47348: 4284 clrl %d4 4734a: 322a 000e movew %a2@(14),%d1 4734e: 302a 0012 movew %a2@(18),%d0 47352: 6000 fdfe braw 47152 <_Objects_Extend_information+0x56> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 47356: 2605 movel %d5,%d3 <== NOT EXECUTED 47358: 4282 clrl %d2 <== NOT EXECUTED 4735a: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47360: 6000 fdf0 braw 47152 <_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 ); 47364: 2f06 movel %d6,%sp@- 47366: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> return; 4736c: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 4736e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47374: 4e5e unlk %fp 47376: 4e75 rts 00047428 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 47428: 4e56 0000 linkw %fp,#0 4742c: 2f02 movel %d2,%sp@- 4742e: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47432: 660a bnes 4743e <_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 ) 47434: 4280 clrl %d0 return NULL; #endif return info; } 47436: 242e fffc movel %fp@(-4),%d2 4743a: 4e5e unlk %fp 4743c: 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 ); 4743e: 2f2e 0008 movel %fp@(8),%sp@- 47442: 4eb9 0004 b628 jsr 4b628 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 47448: 588f addql #4,%sp 4744a: 4a80 tstl %d0 4744c: 67e6 beqs 47434 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 4744e: b082 cmpl %d2,%d0 47450: 65e2 bcss 47434 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 47452: 202e 0008 movel %fp@(8),%d0 47456: 41f9 0005 d90c lea 5d90c <_Objects_Information_table>,%a0 4745c: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47460: 4a88 tstl %a0 47462: 67d0 beqs 47434 <_Objects_Get_information+0xc> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 47464: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 47468: 67cc beqs 47436 <_Objects_Get_information+0xe> <== ALWAYS 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 ) 4746a: 2040 moveal %d0,%a0 4746c: 4a68 000e tstw %a0@(14) 47470: 67c2 beqs 47434 <_Objects_Get_information+0xc> return NULL; #endif return info; } 47472: 242e fffc movel %fp@(-4),%d2 47476: 4e5e unlk %fp 47478: 4e75 rts ... 00053b58 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 53b58: 4e56 ffe0 linkw %fp,#-32 53b5c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 53b60: 262e 000c movel %fp@(12),%d3 53b64: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 53b68: 4a83 tstl %d3 53b6a: 660e bnes 53b7a <_Objects_Get_name_as_string+0x22> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 53b6c: 4282 clrl %d2 } return NULL; /* unreachable path */ } 53b6e: 2002 movel %d2,%d0 53b70: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 53b76: 4e5e unlk %fp 53b78: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 53b7a: 4a82 tstl %d2 53b7c: 67f0 beqs 53b6e <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 53b7e: 4aae 0008 tstl %fp@(8) 53b82: 6700 00a8 beqw 53c2c <_Objects_Get_name_as_string+0xd4> <== ALWAYS TAKEN 53b86: 282e 0008 movel %fp@(8),%d4 information = _Objects_Get_information_id( tmpId ); 53b8a: 2f04 movel %d4,%sp@- 53b8c: 4eb9 0004 c8dc jsr 4c8dc <_Objects_Get_information_id> if ( !information ) 53b92: 588f addql #4,%sp 53b94: 4a80 tstl %d0 53b96: 67d4 beqs 53b6c <_Objects_Get_name_as_string+0x14> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 53b98: 486e fffc pea %fp@(-4) 53b9c: 2f04 movel %d4,%sp@- 53b9e: 2f00 movel %d0,%sp@- 53ba0: 4eb9 0004 c9bc jsr 4c9bc <_Objects_Get> switch ( location ) { 53ba6: 4fef 000c lea %sp@(12),%sp 53baa: 4aae fffc tstl %fp@(-4) 53bae: 66bc bnes 53b6c <_Objects_Get_name_as_string+0x14> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 53bb0: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 53bb2: 7818 moveq #24,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53bb4: 5383 subql #1,%d3 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 53bb6: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 53bba: 2200 movel %d0,%d1 53bbc: e8a9 lsrl %d4,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 53bbe: 2a00 movel %d0,%d5 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 53bc0: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 53bc2: e08d lsrl #8,%d5 lname[ 3 ] = (u32_name >> 0) & 0xff; 53bc4: 1d40 fffa moveb %d0,%fp@(-6) lname[ 4 ] = '\0'; 53bc8: 4200 clrb %d0 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 53bca: 4244 clrw %d4 53bcc: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 53bce: 1d45 fff9 moveb %d5,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 53bd2: 1d40 fffb moveb %d0,%fp@(-5) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 53bd6: 1d44 fff8 moveb %d4,%fp@(-8) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 53bda: 1d41 fff7 moveb %d1,%fp@(-9) 53bde: 1001 moveb %d1,%d0 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53be0: 4a83 tstl %d3 53be2: 6756 beqs 53c3a <_Objects_Get_name_as_string+0xe2> <== ALWAYS TAKEN 53be4: 4a01 tstb %d1 53be6: 6752 beqs 53c3a <_Objects_Get_name_as_string+0xe2> <== ALWAYS TAKEN 53be8: 2042 moveal %d2,%a0 53bea: 4281 clrl %d1 53bec: 45ee fff7 lea %fp@(-9),%a2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 53bf0: 4284 clrl %d4 53bf2: 1800 moveb %d0,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53bf4: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 53bf6: 2279 0006 9830 moveal 69830 <__ctype_ptr__>,%a1 53bfc: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 53c00: 49c4 extbl %d4 53c02: 0284 0000 0097 andil #151,%d4 53c08: 6602 bnes 53c0c <_Objects_Get_name_as_string+0xb4> 53c0a: 702a moveq #42,%d0 53c0c: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53c0e: b681 cmpl %d1,%d3 53c10: 6306 blss 53c18 <_Objects_Get_name_as_string+0xc0> 53c12: 1032 1800 moveb %a2@(00000000,%d1:l),%d0 53c16: 66d8 bnes 53bf0 <_Objects_Get_name_as_string+0x98> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 53c18: 4210 clrb %a0@ _Thread_Enable_dispatch(); 53c1a: 4eb9 0004 d324 jsr 4d324 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 53c20: 2002 movel %d2,%d0 53c22: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 53c28: 4e5e unlk %fp 53c2a: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 53c2c: 2079 0006 b646 moveal 6b646 <_Thread_Executing>,%a0 53c32: 2828 0008 movel %a0@(8),%d4 53c36: 6000 ff52 braw 53b8a <_Objects_Get_name_as_string+0x32> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53c3a: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 53c3c: 4210 clrb %a0@ _Thread_Enable_dispatch(); 53c3e: 4eb9 0004 d324 jsr 4d324 <_Thread_Enable_dispatch> 53c44: 60da bras 53c20 <_Objects_Get_name_as_string+0xc8> <== ALWAYS TAKEN ... 0005654c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 5654c: 4e56 fff0 linkw %fp,#-16 56550: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 56554: 246e 0008 moveal %fp@(8),%a2 56558: 266e 0010 moveal %fp@(16),%a3 Objects_Control *object; Objects_Id next_id; if ( !information ) 5655c: 4a8a tstl %a2 5655e: 660c bnes 5656c <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 56560: 4280 clrl %d0 } 56562: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 56568: 4e5e unlk %fp 5656a: 4e75 rts Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 5656c: 4a8b tstl %a3 5656e: 67f0 beqs 56560 <_Objects_Get_next+0x14> return NULL; if ( !next_id_p ) 56570: 4aae 0014 tstl %fp@(20) 56574: 67ea beqs 56560 <_Objects_Get_next+0x14> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 56576: 302e 000e movew %fp@(14),%d0 5657a: 673a beqs 565b6 <_Objects_Get_next+0x6a> 5657c: 242e 000c movel %fp@(12),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 56580: 49f9 0004 c9bc lea 4c9bc <_Objects_Get>,%a4 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 56586: 4281 clrl %d1 56588: 4280 clrl %d0 5658a: 322a 000e movew %a2@(14),%d1 5658e: 3002 movew %d2,%d0 56590: b081 cmpl %d1,%d0 56592: 622e bhis 565c2 <_Objects_Get_next+0x76> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 56594: 2f0b movel %a3,%sp@- 56596: 2f02 movel %d2,%sp@- next_id++; 56598: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 5659a: 2f0a movel %a2,%sp@- 5659c: 4e94 jsr %a4@ next_id++; } while (*location_p != OBJECTS_LOCAL); 5659e: 4fef 000c lea %sp@(12),%sp 565a2: 4a93 tstl %a3@ 565a4: 66e0 bnes 56586 <_Objects_Get_next+0x3a> *next_id_p = next_id; 565a6: 206e 0014 moveal %fp@(20),%a0 565aa: 2082 movel %d2,%a0@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 565ac: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 565b2: 4e5e unlk %fp 565b4: 4e75 rts if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; 565b6: 242a 0006 movel %a2@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 565ba: 49f9 0004 c9bc lea 4c9bc <_Objects_Get>,%a4 565c0: 60c4 bras 56586 <_Objects_Get_next+0x3a> <== ALWAYS TAKEN do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 565c2: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 565c4: 72ff moveq #-1,%d1 565c6: 4280 clrl %d0 565c8: 206e 0014 moveal %fp@(20),%a0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 565cc: 2682 movel %d2,%a3@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 565ce: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 565d4: 2081 movel %d1,%a0@ return 0; } 565d6: 4e5e unlk %fp 565d8: 4e75 rts ... 0005b0dc <_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; 5b0dc: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5b0de: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b0e0: 4e56 0000 linkw %fp,#0 5b0e4: 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; 5b0e8: 90a8 0006 subl %a0@(6),%d0 5b0ec: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5b0f0: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b0f4: 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 ) { 5b0f8: b280 cmpl %d0,%d1 5b0fa: 6510 bcss 5b10c <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5b0fc: 2068 0018 moveal %a0@(24),%a0 5b100: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5b104: 6706 beqs 5b10c <_Objects_Get_no_protection+0x30> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 5b106: 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; } 5b108: 4e5e unlk %fp 5b10a: 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; 5b10c: 7001 moveq #1,%d0 return NULL; } 5b10e: 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; 5b110: 2280 movel %d0,%a1@ 5b112: 4280 clrl %d0 return NULL; } 5b114: 4e75 rts ... 0004ca28 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 4ca28: 4e56 fffc linkw %fp,#-4 4ca2c: 222e 0008 movel %fp@(8),%d1 4ca30: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4ca32: 4a81 tstl %d1 4ca34: 660a bnes 4ca40 <_Objects_Id_to_name+0x18> 4ca36: 2079 0006 b646 moveal 6b646 <_Thread_Executing>,%a0 4ca3c: 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); 4ca40: 7418 moveq #24,%d2 4ca42: 2001 movel %d1,%d0 4ca44: e4a8 lsrl %d2,%d0 4ca46: 143c 0007 moveb #7,%d2 4ca4a: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4ca4c: 143c 0003 moveb #3,%d2 4ca50: 2040 moveal %d0,%a0 4ca52: 5388 subql #1,%a0 4ca54: b488 cmpl %a0,%d2 4ca56: 654a bcss 4caa2 <_Objects_Id_to_name+0x7a> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 4ca58: 41f9 0006 b544 lea 6b544 <_Objects_Information_table>,%a0 4ca5e: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4ca62: 4a88 tstl %a0 4ca64: 673c beqs 4caa2 <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 4ca66: 2001 movel %d1,%d0 4ca68: 741b moveq #27,%d2 4ca6a: e4a8 lsrl %d2,%d0 4ca6c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 4ca70: 6730 beqs 4caa2 <_Objects_Id_to_name+0x7a> <== ALWAYS TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 4ca72: 486e fffc pea %fp@(-4) 4ca76: 2f01 movel %d1,%sp@- 4ca78: 2f00 movel %d0,%sp@- 4ca7a: 4eb9 0004 c9bc jsr 4c9bc <_Objects_Get> if ( !the_object ) 4ca80: 4fef 000c lea %sp@(12),%sp 4ca84: 4a80 tstl %d0 4ca86: 671a beqs 4caa2 <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; *name = the_object->name; 4ca88: 206e 000c moveal %fp@(12),%a0 4ca8c: 2240 moveal %d0,%a1 4ca8e: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 4ca92: 4eb9 0004 d324 jsr 4d324 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4ca98: 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(); 4ca9c: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4ca9e: 4e5e unlk %fp 4caa0: 4e75 rts 4caa2: 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; 4caa6: 7003 moveq #3,%d0 } 4caa8: 4e5e unlk %fp 4caaa: 4e75 rts 00047548 <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 47548: 41f9 0005 d90c lea 5d90c <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4754e: 4e56 fff0 linkw %fp,#-16 47552: 202e 000c movel %fp@(12),%d0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 47556: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4755a: 48d7 003c moveml %d2-%d5,%sp@ 4755e: 222e 0014 movel %fp@(20),%d1 47562: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47564: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47566: 206e 0008 moveal %fp@(8),%a0 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4756a: 4244 clrw %d4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4756c: 3a2e 001a movew %fp@(26),%d5 47570: 242e 0010 movel %fp@(16),%d2 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47574: d683 addl %d3,%d3 47576: 9783 subxl %d3,%d3 47578: 4483 negl %d3 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4757a: 3144 0028 movew %d4,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 4757e: 3144 000e movew %d4,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47582: 282e 0020 movel %fp@(32),%d4 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 47586: 3142 0004 movew %d2,%a0@(4) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 4758a: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 4758e: 2145 0014 movel %d5,%a0@(20) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 47592: 2388 2c00 movel %a0,%a1@(00000000,%d2:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 47596: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 4759a: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 4759c: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 475a0: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 475a4: 42a8 002e clrl %a0@(46) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 475a8: 4a03 tstb %d3 475aa: 6706 beqs 475b2 <_Objects_Initialize_information+0x6a> 475ac: 4a81 tstl %d1 475ae: 6700 0092 beqw 47642 <_Objects_Initialize_information+0xfa> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475b2: 7a18 moveq #24,%d5 475b4: 4a81 tstl %d1 475b6: 56c3 sne %d3 475b8: eba8 lsll %d5,%d0 475ba: 1a3c 001b moveb #27,%d5 475be: 49c3 extbl %d3 475c0: 4483 negl %d3 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475c2: 43f9 0005 d0fc lea 5d0fc ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475c8: ebaa lsll %d5,%d2 475ca: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475ce: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475d2: 8082 orl %d2,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475d4: ca84 andl %d4,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 475d6: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475da: 8083 orl %d3,%d0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475dc: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475e0: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475e4: 4a85 tstl %d5 475e6: 6626 bnes 4760e <_Objects_Initialize_information+0xc6> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 475e8: 43e8 0020 lea %a0@(32),%a1 475ec: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 475f0: 43e8 001c lea %a0@(28),%a1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 475f4: 3144 0032 movew %d4,%a0@(50) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 475f8: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 475fc: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 47600: 4a81 tstl %d1 47602: 662c bnes 47630 <_Objects_Initialize_information+0xe8> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 47604: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4760a: 4e5e unlk %fp 4760c: 4e75 rts * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 4760e: 5884 addql #4,%d4 <== NOT EXECUTED 47610: 70fc moveq #-4,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47612: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 47616: c880 andl %d0,%d4 <== NOT EXECUTED 47618: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4761c: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 47620: 3144 0032 movew %d4,%a0@(50) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47624: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 47628: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 4762c: 4a81 tstl %d1 <== NOT EXECUTED 4762e: 67d4 beqs 47604 <_Objects_Initialize_information+0xbc> <== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47630: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 47634: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4763a: 4e5e unlk %fp /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 4763c: 4ef9 0004 70fc jmp 470fc <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 47642: 4878 0014 pea 14 47646: 4878 0001 pea 1 4764a: 42a7 clrl %sp@- 4764c: 4eb9 0004 6f7c jsr 46f7c <_Internal_error_Occurred> ... 00047664 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 47664: 4e56 fff4 linkw %fp,#-12 47668: 206e 0008 moveal %fp@(8),%a0 4766c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47670: 222e 000c movel %fp@(12),%d1 47674: 202e 0010 movel %fp@(16),%d0 47678: 246e 0014 moveal %fp@(20),%a2 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 4767c: 4a8a tstl %a2 4767e: 675a beqs 476da <_Objects_Name_to_id_u32+0x76> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 47680: 4a81 tstl %d1 47682: 6718 beqs 4769c <_Objects_Name_to_id_u32+0x38> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 47684: 3428 000e movew %a0@(14),%d2 47688: 6712 beqs 4769c <_Objects_Name_to_id_u32+0x38> 4768a: 4a80 tstl %d0 4768c: 6718 beqs 476a6 <_Objects_Name_to_id_u32+0x42> 4768e: 0c80 7fff ffff cmpil #2147483647,%d0 47694: 6710 beqs 476a6 <_Objects_Name_to_id_u32+0x42> 47696: 7601 moveq #1,%d3 47698: b680 cmpl %d0,%d3 4769a: 670a beqs 476a6 <_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++ ) { 4769c: 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 } 4769e: 4cd7 040c moveml %sp@,%d2-%d3/%a2 476a2: 4e5e unlk %fp 476a4: 4e75 rts search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 476a6: 2068 0018 moveal %a0@(24),%a0 476aa: 7001 moveq #1,%d0 476ac: 5888 addql #4,%a0 476ae: 0282 0000 ffff andil #65535,%d2 the_object = information->local_table[ index ]; 476b4: 2250 moveal %a0@,%a1 search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 476b6: 5280 addql #1,%d0 476b8: 5888 addql #4,%a0 the_object = information->local_table[ index ]; if ( !the_object ) 476ba: 4a89 tstl %a1 476bc: 6706 beqs 476c4 <_Objects_Name_to_id_u32+0x60> continue; if ( name == the_object->name.name_u32 ) { 476be: b2a9 000c cmpl %a1@(12),%d1 476c2: 6708 beqs 476cc <_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++ ) { 476c4: b082 cmpl %d2,%d0 476c6: 63ec blss 476b4 <_Objects_Name_to_id_u32+0x50> 476c8: 7001 moveq #1,%d0 476ca: 60d2 bras 4769e <_Objects_Name_to_id_u32+0x3a> <== ALWAYS TAKEN the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 476cc: 24a9 0008 movel %a1@(8),%a2@ 476d0: 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 } 476d2: 4cd7 040c moveml %sp@,%d2-%d3/%a2 476d6: 4e5e unlk %fp 476d8: 4e75 rts Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 476da: 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 } 476dc: 4cd7 040c moveml %sp@,%d2-%d3/%a2 476e0: 4e5e unlk %fp 476e2: 4e75 rts 000476e4 <_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) / 476e4: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 476e6: 4e56 ffec linkw %fp,#-20 476ea: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 476ee: 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 ); 476f2: 4283 clrl %d3 block_count = (information->maximum - index_base) / 476f4: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 476f6: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 476fa: 382a 000e movew %a2@(14),%d4 476fe: 322a 0012 movew %a2@(18),%d1 47702: 9883 subl %d3,%d4 47704: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47708: 672c beqs 47736 <_Objects_Shrink_information+0x52> <== ALWAYS TAKEN if ( information->inactive_per_block[ block ] == 4770a: 226a 002a moveal %a2@(42),%a1 4770e: b291 cmpl %a1@,%d1 47710: 672e beqs 47740 <_Objects_Shrink_information+0x5c> <== ALWAYS TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47712: 7404 moveq #4,%d2 47714: 4280 clrl %d0 } index_base += information->allocation_size; 47716: 2042 moveal %d2,%a0 47718: d681 addl %d1,%d3 4771a: 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++ ) { 4771c: 5280 addql #1,%d0 4771e: b084 cmpl %d4,%d0 47720: 6414 bccs 47736 <_Objects_Shrink_information+0x52> <== ALWAYS TAKEN if ( information->inactive_per_block[ block ] == 47722: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 47726: 671a beqs 47742 <_Objects_Shrink_information+0x5e> 47728: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4772a: 2042 moveal %d2,%a0 4772c: d681 addl %d1,%d3 4772e: 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++ ) { 47730: 5280 addql #1,%d0 47732: b084 cmpl %d4,%d0 47734: 65ec bcss 47722 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 47736: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4773c: 4e5e unlk %fp 4773e: 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 ] == 47740: 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; 47742: 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 ); 47746: 47f9 0004 afec lea 4afec <_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 ); 4774c: 4280 clrl %d0 4774e: 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; 47752: 2810 movel %a0@,%d4 if ((index >= index_base) && 47754: b680 cmpl %d0,%d3 47756: 620c bhis 47764 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 47758: 4281 clrl %d1 4775a: 322a 0012 movew %a2@(18),%d1 4775e: d283 addl %d3,%d1 47760: b280 cmpl %d0,%d1 47762: 623e bhis 477a2 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 47764: 2044 moveal %d4,%a0 47766: 4a84 tstl %d4 47768: 66e2 bnes 4774c <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4776a: 206a 002e moveal %a2@(46),%a0 4776e: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 47772: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> information->object_blocks[ block ] = NULL; 47778: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 4777c: 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; 4777e: 302a 0028 movew %a2@(40),%d0 47782: 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; 47786: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 4778a: 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; 4778c: 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; 47790: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47794: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 47798: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4779e: 4e5e unlk %fp 477a0: 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 ); 477a2: 2f08 movel %a0,%sp@- 477a4: 4e93 jsr %a3@ 477a6: 588f addql #4,%sp } } while ( the_object ); 477a8: 2044 moveal %d4,%a0 477aa: 4a84 tstl %d4 477ac: 669e bnes 4774c <_Objects_Shrink_information+0x68> 477ae: 60ba bras 4776a <_Objects_Shrink_information+0x86> <== ALWAYS TAKEN 0004af00 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 4af00: 4e56 0000 linkw %fp,#0 void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { 4af04: 2039 0005 da0e movel 5da0e <_Thread_Executing>,%d0 void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 4af0a: 2f0a movel %a2,%sp@- 4af0c: 246e 000c moveal %fp@(12),%a2 void (*dtor)(void *); void *value; dtor = tvp->dtor; 4af10: 206a 0010 moveal %a2@(16),%a0 if (_Thread_Is_executing(the_thread)) { 4af14: b0ae 0008 cmpl %fp@(8),%d0 4af18: 671e beqs 4af38 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x38> value = *tvp->ptr; *tvp->ptr = tvp->gval; } else { value = tvp->tval; 4af1a: 202a 000c movel %a2@(12),%d0 } if ( dtor ) 4af1e: 4a88 tstl %a0 4af20: 6706 beqs 4af28 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x28> (*dtor)(value); 4af22: 2f00 movel %d0,%sp@- 4af24: 4e90 jsr %a0@ 4af26: 588f addql #4,%sp _Workspace_Free(tvp); 4af28: 2d4a 0008 movel %a2,%fp@(8) } 4af2c: 246e fffc moveal %fp@(-4),%a2 4af30: 4e5e unlk %fp } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 4af32: 4ef9 0004 90cc jmp 490cc <_Workspace_Free> void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { value = *tvp->ptr; 4af38: 226a 0004 moveal %a2@(4),%a1 4af3c: 2011 movel %a1@,%d0 *tvp->ptr = tvp->gval; 4af3e: 22aa 0008 movel %a2@(8),%a1@ 4af42: 60da bras 4af1e <_RTEMS_Tasks_Invoke_task_variable_dtor+0x1e> <== ALWAYS TAKEN 0004ae76 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4ae76: 4e56 0000 linkw %fp,#0 4ae7a: 2f0a movel %a2,%sp@- 4ae7c: 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() ) 4ae80: 4a39 0005 c1f4 tstb 5c1f4 4ae86: 665c bnes 4aee4 <_RTEMS_tasks_Create_extension+0x6e> 4ae88: 701e moveq #30,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4ae8a: 2f00 movel %d0,%sp@- 4ae8c: 4eb9 0004 90b0 jsr 490b0 <_Workspace_Allocate> if ( !api ) 4ae92: 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 ); 4ae94: 2040 moveal %d0,%a0 if ( !api ) 4ae96: 4a80 tstl %d0 4ae98: 675c beqs 4aef6 <_RTEMS_tasks_Create_extension+0x80> <== ALWAYS 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; 4ae9a: 42aa 0118 clrl %a2@(280) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4ae9e: 4200 clrb %d0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4aea0: 2548 0108 movel %a0,%a2@(264) 4aea4: 1140 0008 moveb %d0,%a0@(8) api->pending_events = EVENT_SETS_NONE_PENDING; 4aea8: 4290 clrl %a0@ api->event_condition = 0; 4aeaa: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4aeae: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4aeb2: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4aeb6: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4aeba: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4aebe: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 4aec2: 4a39 0005 c1f4 tstb 5c1f4 4aec8: 6710 beqs 4aeda <_RTEMS_tasks_Create_extension+0x64> 4aeca: 41e8 001e lea %a0@(30),%a0 4aece: 4280 clrl %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4aed0: 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++) 4aed2: 5280 addql #1,%d0 4aed4: 7210 moveq #16,%d1 4aed6: b280 cmpl %d0,%d1 4aed8: 66f6 bnes 4aed0 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4aeda: 246e fffc moveal %fp@(-4),%a2 4aede: 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++) 4aee0: 7001 moveq #1,%d0 api->Notepads[i] = 0; } return true; } 4aee2: 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() ) 4aee4: 705e moveq #94,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4aee6: 2f00 movel %d0,%sp@- 4aee8: 4eb9 0004 90b0 jsr 490b0 <_Workspace_Allocate> if ( !api ) 4aeee: 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 ); 4aef0: 2040 moveal %d0,%a0 if ( !api ) 4aef2: 4a80 tstl %d0 4aef4: 66a4 bnes 4ae9a <_RTEMS_tasks_Create_extension+0x24> for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4aef6: 246e fffc moveal %fp@(-4),%a2 4aefa: 4e5e unlk %fp if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) 4aefc: 4200 clrb %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4aefe: 4e75 rts 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 c21a moveal 5c21a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 4615e: 2639 0005 c216 movel 5c216 ,%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> <== ALWAYS 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> <== ALWAYS 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 6f7c jsr 46f7c <_Internal_error_Occurred> ... 0004adb2 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4adb2: 4e56 ffec linkw %fp,#-20 4adb6: 206e 0008 moveal %fp@(8),%a0 4adba: 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 ]; 4adbe: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 4adc2: 4a8a tstl %a2 4adc4: 671a beqs 4ade0 <_RTEMS_tasks_Post_switch_extension+0x2e> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4adc6: 203c 0000 0700 movel #1792,%d0 4adcc: 40c1 movew %sr,%d1 4adce: 8081 orl %d1,%d0 4add0: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4add2: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4add6: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4adda: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4addc: 4a82 tstl %d2 4adde: 660a bnes 4adea <_RTEMS_tasks_Post_switch_extension+0x38> <== NEVER TAKEN (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4ade0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4ade6: 4e5e unlk %fp <== NOT EXECUTED 4ade8: 4e75 rts <== NOT EXECUTED if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4adea: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4adee: 260e movel %fp,%d3 4adf0: 5983 subql #4,%d3 4adf2: 47f9 0004 cd28 lea 4cd28 ,%a3 4adf8: 2f03 movel %d3,%sp@- 4adfa: 2f3c 0000 ffff movel #65535,%sp@- 4ae00: 2f2a 000e movel %a2@(14),%sp@- 4ae04: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4ae06: 2f02 movel %d2,%sp@- 4ae08: 206a 000a moveal %a2@(10),%a0 4ae0c: 4e90 jsr %a0@ asr->nest_level -= 1; 4ae0e: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4ae12: 2f03 movel %d3,%sp@- 4ae14: 2f3c 0000 ffff movel #65535,%sp@- 4ae1a: 2f2e fffc movel %fp@(-4),%sp@- 4ae1e: 4e93 jsr %a3@ 4ae20: 4fef 001c lea %sp@(28),%sp } 4ae24: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ae2a: 4e5e unlk %fp 4ae2c: 4e75 rts 0004ad0e <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4ad0e: 4e56 0000 linkw %fp,#0 4ad12: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4ad16: 2068 0118 moveal %a0@(280),%a0 while (tvp) { 4ad1a: 4a88 tstl %a0 4ad1c: 6712 beqs 4ad30 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4ad1e: 2268 0004 moveal %a0@(4),%a1 4ad22: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4ad26: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4ad2a: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4ad2c: 4a88 tstl %a0 4ad2e: 66ee bnes 4ad1e <_RTEMS_tasks_Switch_extension+0x10> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4ad30: 206e 000c moveal %fp@(12),%a0 4ad34: 2068 0118 moveal %a0@(280),%a0 while (tvp) { 4ad38: 4a88 tstl %a0 4ad3a: 6712 beqs 4ad4e <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4ad3c: 2268 0004 moveal %a0@(4),%a1 4ad40: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4ad44: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4ad48: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4ad4a: 4a88 tstl %a0 4ad4c: 66ee bnes 4ad3c <_RTEMS_tasks_Switch_extension+0x2e> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4ad4e: 4e5e unlk %fp 4ad50: 4e75 rts 0007a372 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 7a372: 4e56 ffd0 linkw %fp,#-48 7a376: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 7a37a: 266e 0008 moveal %fp@(8),%a3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 7a37e: 280e movel %fp,%d4 7a380: 5184 subql #8,%d4 _Timestamp_Subtract( 7a382: 45f9 0004 f190 lea 4f190 <_Timespec_Subtract>,%a2 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 7a388: 2f04 movel %d4,%sp@- ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 7a38a: 286b 0040 moveal %a3@(64),%a4 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 7a38e: 4eb9 0006 a1f8 jsr 6a1f8 <_TOD_Get_uptime> _Timestamp_Subtract( 7a394: 2f2e 000c movel %fp@(12),%sp@- 7a398: 2f04 movel %d4,%sp@- 7a39a: 486b 004c pea %a3@(76) 7a39e: 4e92 jsr %a2@ * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 7a3a0: 4fef 0010 lea %sp@(16),%sp #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 7a3a4: 202c 0082 movel %a4@(130),%d0 7a3a8: 222c 0086 movel %a4@(134),%d1 7a3ac: 2d40 fff0 movel %d0,%fp@(-16) 7a3b0: 2d41 fff4 movel %d1,%fp@(-12) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 7a3b4: b9f9 000a 5322 cmpal a5322 <_Thread_Executing>,%a4 7a3ba: 670c beqs 7a3c8 <_Rate_monotonic_Get_status+0x56> */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 7a3bc: 7001 moveq #1,%d0 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 7a3be: 4cee 1c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a4 7a3c4: 4e5e unlk %fp 7a3c6: 4e75 rts if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 7a3c8: 49ee ffe8 lea %fp@(-24),%a4 &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 7a3cc: 240e movel %fp,%d2 7a3ce: 0682 ffff fff0 addil #-16,%d2 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 7a3d4: 260b movel %a3,%d3 7a3d6: 0683 0000 0044 addil #68,%d3 if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 7a3dc: 2f0c movel %a4,%sp@- 7a3de: 2f04 movel %d4,%sp@- 7a3e0: 4879 000a 532a pea a532a <_Thread_Time_of_last_context_switch> 7a3e6: 4e92 jsr %a2@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 7a3e8: 2f0c movel %a4,%sp@- 7a3ea: 2f02 movel %d2,%sp@- 7a3ec: 4eb9 0004 f148 jsr 4f148 <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 7a3f2: 2f03 movel %d3,%sp@- 7a3f4: 2f02 movel %d2,%sp@- 7a3f6: 4eb9 0007 ae50 jsr 7ae50 <_Timespec_Less_than> 7a3fc: 4fef 001c lea %sp@(28),%sp 7a400: 4a00 tstb %d0 7a402: 670c beqs 7a410 <_Rate_monotonic_Get_status+0x9e> return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 7a404: 4cee 1c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a4 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 7a40a: 4200 clrb %d0 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 7a40c: 4e5e unlk %fp 7a40e: 4e75 rts */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 7a410: 2f2e 0010 movel %fp@(16),%sp@- 7a414: 2f02 movel %d2,%sp@- 7a416: 2f03 movel %d3,%sp@- 7a418: 4e92 jsr %a2@ 7a41a: 4fef 000c lea %sp@(12),%sp 7a41e: 7001 moveq #1,%d0 7a420: 609c bras 7a3be <_Rate_monotonic_Get_status+0x4c> <== ALWAYS TAKEN 0007a728 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 7a728: 4e56 fffc linkw %fp,#-4 7a72c: 2f0a movel %a2,%sp@- 7a72e: 486e fffc pea %fp@(-4) 7a732: 2f2e 0008 movel %fp@(8),%sp@- 7a736: 4879 000a 5692 pea a5692 <_Rate_monotonic_Information> 7a73c: 4eb9 0004 daa4 jsr 4daa4 <_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 ) { 7a742: 4fef 000c lea %sp@(12),%sp 7a746: 2440 moveal %d0,%a2 7a748: 4aae fffc tstl %fp@(-4) 7a74c: 6636 bnes 7a784 <_Rate_monotonic_Timeout+0x5c> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 7a74e: 206a 0040 moveal %a2@(64),%a0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 7a752: 2028 0010 movel %a0@(16),%d0 7a756: 0280 0000 4000 andil #16384,%d0 7a75c: 670a beqs 7a768 <_Rate_monotonic_Timeout+0x40> the_thread->Wait.id == the_period->Object.id ) { 7a75e: 202a 0008 movel %a2@(8),%d0 7a762: b0a8 0020 cmpl %a0@(32),%d0 7a766: 675e beqs 7a7c6 <_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 ) { 7a768: 7001 moveq #1,%d0 7a76a: b0aa 0038 cmpl %a2@(56),%d0 7a76e: 671c beqs 7a78c <_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; 7a770: 7004 moveq #4,%d0 7a772: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 7a776: 2039 000a 5268 movel a5268 <_Thread_Dispatch_disable_level>,%d0 7a77c: 5380 subql #1,%d0 7a77e: 23c0 000a 5268 movel %d0,a5268 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 7a784: 246e fff8 moveal %fp@(-8),%a2 7a788: 4e5e unlk %fp 7a78a: 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; 7a78c: 103c 0003 moveb #3,%d0 7a790: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 7a794: 2f0a movel %a2,%sp@- 7a796: 4eb9 0007 a2f4 jsr 7a2f4 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a79c: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a7a2: 486a 0010 pea %a2@(16) 7a7a6: 4879 000a 5340 pea a5340 <_Watchdog_Ticks_chain> 7a7ac: 4eb9 0004 f490 jsr 4f490 <_Watchdog_Insert> 7a7b2: 4fef 000c lea %sp@(12),%sp 7a7b6: 2039 000a 5268 movel a5268 <_Thread_Dispatch_disable_level>,%d0 7a7bc: 5380 subql #1,%d0 7a7be: 23c0 000a 5268 movel %d0,a5268 <_Thread_Dispatch_disable_level> 7a7c4: 60be bras 7a784 <_Rate_monotonic_Timeout+0x5c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 7a7c6: 2f3c 1003 fff8 movel #268697592,%sp@- 7a7cc: 2f08 movel %a0,%sp@- 7a7ce: 4eb9 0004 dfec jsr 4dfec <_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 ); 7a7d4: 2f0a movel %a2,%sp@- 7a7d6: 4eb9 0007 a2f4 jsr 7a2f4 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a7dc: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a7e2: 486a 0010 pea %a2@(16) 7a7e6: 4879 000a 5340 pea a5340 <_Watchdog_Ticks_chain> 7a7ec: 4eb9 0004 f490 jsr 4f490 <_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 ) && 7a7f2: 4fef 0014 lea %sp@(20),%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 7a7f6: 2039 000a 5268 movel a5268 <_Thread_Dispatch_disable_level>,%d0 7a7fc: 5380 subql #1,%d0 7a7fe: 23c0 000a 5268 movel %d0,a5268 <_Thread_Dispatch_disable_level> 7a804: 6000 ff7e braw 7a784 <_Rate_monotonic_Timeout+0x5c> <== ALWAYS TAKEN 0007a422 <_Rate_monotonic_Update_statistics>: * Update the counts. */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 7a422: 7004 moveq #4,%d0 } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 7a424: 4e56 ffd8 linkw %fp,#-40 7a428: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 7a42c: 246e 0008 moveal %fp@(8),%a2 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 7a430: 52aa 0054 addql #1,%a2@(84) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 7a434: b0aa 0038 cmpl %a2@(56),%d0 7a438: 6700 00c6 beqw 7a500 <_Rate_monotonic_Update_statistics+0xde> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 7a43c: 260e movel %fp,%d3 7a43e: 5183 subql #8,%d3 7a440: 240e movel %fp,%d2 7a442: 0682 ffff fff0 addil #-16,%d2 7a448: 2f03 movel %d3,%sp@- 7a44a: 2f02 movel %d2,%sp@- 7a44c: 2f0a movel %a2,%sp@- 7a44e: 4eb9 0007 a372 jsr 7a372 <_Rate_monotonic_Get_status> if (!valid_status) 7a454: 4fef 000c lea %sp@(12),%sp 7a458: 4a00 tstb %d0 7a45a: 660a bnes 7a466 <_Rate_monotonic_Update_statistics+0x44> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 7a45c: 4cee 3c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a5 7a462: 4e5e unlk %fp 7a464: 4e75 rts /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 7a466: 2f03 movel %d3,%sp@- 7a468: 486a 006c pea %a2@(108) 7a46c: 4bf9 0004 f148 lea 4f148 <_Timespec_Add_to>,%a5 if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 7a472: 49f9 0007 ae50 lea 7ae50 <_Timespec_Less_than>,%a4 /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 7a478: 4e95 jsr %a5@ if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 7a47a: 486a 005c pea %a2@(92) 7a47e: 2f03 movel %d3,%sp@- 7a480: 4e94 jsr %a4@ 7a482: 4fef 0010 lea %sp@(16),%sp 7a486: 4a00 tstb %d0 7a488: 6710 beqs 7a49a <_Rate_monotonic_Update_statistics+0x78> stats->min_cpu_time = executed; 7a48a: 202e fff8 movel %fp@(-8),%d0 7a48e: 222e fffc movel %fp@(-4),%d1 7a492: 2540 005c movel %d0,%a2@(92) 7a496: 2541 0060 movel %d1,%a2@(96) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 7a49a: 486a 0064 pea %a2@(100) 7a49e: 47f9 0007 ae1c lea 7ae1c <_Timespec_Greater_than>,%a3 7a4a4: 2f03 movel %d3,%sp@- 7a4a6: 4e93 jsr %a3@ 7a4a8: 508f addql #8,%sp 7a4aa: 4a00 tstb %d0 7a4ac: 6710 beqs 7a4be <_Rate_monotonic_Update_statistics+0x9c> stats->max_cpu_time = executed; 7a4ae: 202e fff8 movel %fp@(-8),%d0 7a4b2: 222e fffc movel %fp@(-4),%d1 7a4b6: 2540 0064 movel %d0,%a2@(100) 7a4ba: 2541 0068 movel %d1,%a2@(104) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 7a4be: 2f02 movel %d2,%sp@- 7a4c0: 486a 0084 pea %a2@(132) 7a4c4: 4e95 jsr %a5@ if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 7a4c6: 486a 0074 pea %a2@(116) 7a4ca: 2f02 movel %d2,%sp@- 7a4cc: 4e94 jsr %a4@ 7a4ce: 4fef 0010 lea %sp@(16),%sp 7a4d2: 4a00 tstb %d0 7a4d4: 6654 bnes 7a52a <_Rate_monotonic_Update_statistics+0x108> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 7a4d6: 486a 007c pea %a2@(124) 7a4da: 2f02 movel %d2,%sp@- 7a4dc: 4e93 jsr %a3@ 7a4de: 508f addql #8,%sp 7a4e0: 4a00 tstb %d0 7a4e2: 6700 ff78 beqw 7a45c <_Rate_monotonic_Update_statistics+0x3a> stats->max_wall_time = since_last_period; 7a4e6: 202e fff0 movel %fp@(-16),%d0 7a4ea: 222e fff4 movel %fp@(-12),%d1 7a4ee: 2540 007c movel %d0,%a2@(124) 7a4f2: 2541 0080 movel %d1,%a2@(128) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 7a4f6: 4cee 3c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a5 7a4fc: 4e5e unlk %fp 7a4fe: 4e75 rts */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 7a500: 52aa 0058 addql #1,%a2@(88) /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 7a504: 260e movel %fp,%d3 7a506: 5183 subql #8,%d3 7a508: 240e movel %fp,%d2 7a50a: 0682 ffff fff0 addil #-16,%d2 7a510: 2f03 movel %d3,%sp@- 7a512: 2f02 movel %d2,%sp@- 7a514: 2f0a movel %a2,%sp@- 7a516: 4eb9 0007 a372 jsr 7a372 <_Rate_monotonic_Get_status> if (!valid_status) 7a51c: 4fef 000c lea %sp@(12),%sp 7a520: 4a00 tstb %d0 7a522: 6700 ff38 beqw 7a45c <_Rate_monotonic_Update_statistics+0x3a> <== ALWAYS TAKEN 7a526: 6000 ff3e braw 7a466 <_Rate_monotonic_Update_statistics+0x44> <== ALWAYS TAKEN */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 7a52a: 202e fff0 movel %fp@(-16),%d0 7a52e: 222e fff4 movel %fp@(-12),%d1 7a532: 2540 0074 movel %d0,%a2@(116) 7a536: 2541 0078 movel %d1,%a2@(120) 7a53a: 609a bras 7a4d6 <_Rate_monotonic_Update_statistics+0xb4> <== ALWAYS TAKEN 00046b9c <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 46b9c: 4e56 ffec linkw %fp,#-20 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 46ba0: 2239 0005 c230 movel 5c230 ,%d1 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 46ba6: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 46baa: 240e movel %fp,%d2 46bac: 5182 subql #8,%d2 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 46bae: 263c 0000 03e8 movel #1000,%d3 46bb4: 4c03 1800 mulsl %d3,%d1 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 46bb8: 45f9 0004 8ad0 lea 48ad0 <_Timespec_Add_to>,%a2 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 46bbe: 2039 0005 da94 movel 5da94 <_Watchdog_Ticks_since_boot>,%d0 46bc4: 5280 addql #1,%d0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 46bc6: 2f02 movel %d2,%sp@- 46bc8: 4879 0005 d9d2 pea 5d9d2 <_TOD_Uptime> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 46bce: 2d41 fffc movel %d1,%fp@(-4) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 46bd2: 23c0 0005 da94 movel %d0,5da94 <_Watchdog_Ticks_since_boot> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 46bd8: 42ae fff8 clrl %fp@(-8) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 46bdc: 4e92 jsr %a2@ /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 46bde: 2f02 movel %d2,%sp@- 46be0: 4879 0005 d9e6 pea 5d9e6 <_TOD_Now> 46be6: 4e92 jsr %a2@ while ( seconds ) { 46be8: 4fef 0010 lea %sp@(16),%sp /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 46bec: 2400 movel %d0,%d2 while ( seconds ) { 46bee: 6716 beqs 46c06 <_TOD_Tickle_ticks+0x6a> 46bf0: 45f9 0004 9000 lea 49000 <_Watchdog_Tickle>,%a2 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 46bf6: 4879 0005 da20 pea 5da20 <_Watchdog_Seconds_chain> _Watchdog_Tickle_seconds(); seconds--; 46bfc: 5382 subql #1,%d2 46bfe: 4e92 jsr %a2@ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 46c00: 588f addql #4,%sp 46c02: 4a82 tstl %d2 46c04: 66f0 bnes 46bf6 <_TOD_Tickle_ticks+0x5a> <== ALWAYS TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 46c06: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46c0c: 4e5e unlk %fp 46c0e: 4e75 rts 00046bc8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46bc8: 4e56 0000 linkw %fp,#0 46bcc: 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(); 46bd0: 2039 0005 e9f0 movel 5e9f0 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46bd6: 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) || 46bd8: 4a88 tstl %a0 46bda: 6762 beqs 46c3e <_TOD_Validate+0x76> <== ALWAYS TAKEN 46bdc: 243c 000f 4240 movel #1000000,%d2 46be2: 4c40 2002 remul %d0,%d2,%d2 (the_tod->ticks >= ticks_per_second) || 46be6: b4a8 0018 cmpl %a0@(24),%d2 46bea: 6352 blss 46c3e <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 46bec: 703b moveq #59,%d0 46bee: b0a8 0014 cmpl %a0@(20),%d0 46bf2: 654a bcss 46c3e <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 46bf4: b0a8 0010 cmpl %a0@(16),%d0 46bf8: 6544 bcss 46c3e <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || 46bfa: 7217 moveq #23,%d1 46bfc: b2a8 000c cmpl %a0@(12),%d1 46c00: 653c bcss 46c3e <_TOD_Validate+0x76> (the_tod->month == 0) || 46c02: 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) || 46c06: 6736 beqs 46c3e <_TOD_Validate+0x76> <== ALWAYS TAKEN 46c08: 740c moveq #12,%d2 46c0a: b480 cmpl %d0,%d2 46c0c: 6530 bcss 46c3e <_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) || 46c0e: 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) || 46c10: 0c81 0000 07c3 cmpil #1987,%d1 46c16: 6326 blss 46c3e <_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) ) 46c18: 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) || 46c1c: 4a88 tstl %a0 46c1e: 671e beqs 46c3e <_TOD_Validate+0x76> <== ALWAYS 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 ) 46c20: 143c 0003 moveb #3,%d2 46c24: c282 andl %d2,%d1 46c26: 661e bnes 46c46 <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 46c28: 43f9 0005 d99e lea 5d99e <_TOD_Days_per_month>,%a1 46c2e: 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( 46c32: b1c0 cmpal %d0,%a0 46c34: 53c0 sls %d0 46c36: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46c38: 241f movel %sp@+,%d2 46c3a: 4e5e unlk %fp 46c3c: 4e75 rts 46c3e: 241f movel %sp@+,%d2 46c40: 4e5e unlk %fp * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 46c42: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46c44: 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 ]; 46c46: 43f9 0005 d99e lea 5d99e <_TOD_Days_per_month>,%a1 46c4c: 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( 46c50: b1c0 cmpal %d0,%a0 46c52: 53c0 sls %d0 46c54: 4480 negl %d0 46c56: 60e0 bras 46c38 <_TOD_Validate+0x70> <== ALWAYS TAKEN 00047828 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47828: 4e56 fff0 linkw %fp,#-16 4782c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 47830: 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 ); 47834: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47836: 242e 000c movel %fp@(12),%d2 */ /* * Save original state */ original_state = the_thread->current_state; 4783a: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4783e: 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 ); 47842: 4eb9 0004 8728 jsr 48728 <_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 ) 47848: 588f addql #4,%sp 4784a: b4aa 0014 cmpl %a2@(20),%d2 4784e: 670c beqs 4785c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 47850: 2f02 movel %d2,%sp@- 47852: 2f0a movel %a2,%sp@- 47854: 4eb9 0004 85a4 jsr 485a4 <_Thread_Set_priority> 4785a: 508f addql #8,%sp _ISR_Disable( level ); 4785c: 203c 0000 0700 movel #1792,%d0 47862: 40c1 movew %sr,%d1 47864: 8081 orl %d1,%d0 47866: 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; 47868: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 4786c: 7404 moveq #4,%d2 4786e: b480 cmpl %d0,%d2 47870: 6738 beqs 478aa <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 47872: 44c3 movew %d3,%ccr 47874: 6708 beqs 4787e <_Thread_Change_priority+0x56> <== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 47876: 74fb moveq #-5,%d2 47878: c480 andl %d0,%d2 4787a: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 4787e: 46c1 movew %d1,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 47880: 0280 0003 bee0 andil #245472,%d0 47886: 660a bnes 47892 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 47888: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4788e: 4e5e unlk %fp 47890: 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 ); 47892: 2d4a 000c movel %a2,%fp@(12) 47896: 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 ); } 4789c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 478a2: 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 ); 478a4: 4ef9 0004 84f8 jmp 484f8 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 478aa: 44c3 movew %d3,%ccr 478ac: 673c beqs 478ea <_Thread_Change_priority+0xc2> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 478ae: 206a 008e moveal %a2@(142),%a0 478b2: 302a 0094 movew %a2@(148),%d0 478b6: 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 ); 478b8: 42aa 0010 clrl %a2@(16) 478bc: 8082 orl %d2,%d0 478be: 3080 movew %d0,%a0@ _Priority_Major_bit_map |= the_priority_map->ready_major; 478c0: 3439 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d2 478c6: 302a 0092 movew %a2@(146),%d0 478ca: 8082 orl %d2,%d0 478cc: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 478d2: 4a04 tstb %d4 478d4: 6700 0082 beqw 47958 <_Thread_Change_priority+0x130> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 478d8: 206a 008a moveal %a2@(138),%a0 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 478dc: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 478de: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 478e2: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 478e4: 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; 478e8: 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 ); 478ea: 203c 0000 0700 movel #1792,%d0 478f0: 46c1 movew %d1,%sr 478f2: 8081 orl %d1,%d0 478f4: 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 ); 478f6: 3039 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d0 478fc: 4840 swap %d0 478fe: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 47900: 4282 clrl %d2 47902: 41f9 0005 da70 lea 5da70 <_Priority_Bit_map>,%a0 47908: 3400 movew %d0,%d2 4790a: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 4790e: 4840 swap %d0 47910: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47912: 4283 clrl %d3 47914: e98a lsll #4,%d2 47916: 3600 movew %d0,%d3 47918: 2279 0005 d900 moveal 5d900 <_Thread_Ready_chain>,%a1 4791e: 2002 movel %d2,%d0 47920: d083 addl %d3,%d0 47922: 2400 movel %d0,%d2 47924: e58a lsll #2,%d2 47926: 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 ); 47928: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4792e: 93c2 subal %d2,%a1 47930: 2031 0800 movel %a1@(00000000,%d0:l),%d0 47934: 23c0 0005 d9e2 movel %d0,5d9e2 <_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() && 4793a: b1c0 cmpal %d0,%a0 4793c: 670e beqs 4794c <_Thread_Change_priority+0x124> _Thread_Executing->is_preemptible ) 4793e: 4a28 0075 tstb %a0@(117) 47942: 6708 beqs 4794c <_Thread_Change_priority+0x124> _Context_Switch_necessary = true; 47944: 7401 moveq #1,%d2 47946: 13c2 0005 da1e moveb %d2,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 4794c: 46c1 movew %d1,%sr } 4794e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47954: 4e5e unlk %fp 47956: 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 ); 47958: 206a 008a moveal %a2@(138),%a0 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4795c: 2008 movel %a0,%d0 4795e: 5880 addql #4,%d0 47960: 2480 movel %d0,%a2@ old_last_node = the_chain->last; 47962: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 47966: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4796a: 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; 4796e: 228a movel %a2,%a1@ 47970: 6000 ff78 braw 478ea <_Thread_Change_priority+0xc2> <== ALWAYS TAKEN 00047974 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47974: 327c 0700 moveaw #1792,%a1 47978: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4797a: 4e56 ffec linkw %fp,#-20 4797e: 206e 0008 moveal %fp@(8),%a0 47982: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 47986: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4798a: 40c3 movew %sr,%d3 4798c: 8083 orl %d3,%d0 4798e: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47990: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47994: 2002 movel %d2,%d0 47996: c081 andl %d1,%d0 47998: 6776 beqs 47a10 <_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); 4799a: 2002 movel %d2,%d0 4799c: 4680 notl %d0 4799e: c081 andl %d1,%d0 current_state = 479a0: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 479a4: 666a bnes 47a10 <_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; 479a6: 2868 008e moveal %a0@(142),%a4 479aa: 3028 0094 movew %a0@(148),%d0 479ae: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 479b0: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 479b4: 240a movel %a2,%d2 479b6: 5882 addql #4,%d2 479b8: 8081 orl %d1,%d0 479ba: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 479bc: 266a 0008 moveal %a2@(8),%a3 479c0: 3880 movew %d0,%a4@ the_chain->last = the_node; 479c2: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 479c6: 3239 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d1 479cc: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 479d0: 214b 0004 movel %a3,%a0@(4) 479d4: 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; 479d6: 2688 movel %a0,%a3@ 479d8: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> _ISR_Flash( level ); 479de: 2009 movel %a1,%d0 479e0: 46c3 movew %d3,%sr 479e2: 8083 orl %d3,%d0 479e4: 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 ) { 479e6: 2028 0014 movel %a0@(20),%d0 479ea: 2279 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a1 479f0: b0a9 0014 cmpl %a1@(20),%d0 479f4: 641a bccs 47a10 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 479f6: 23c8 0005 d9e2 movel %a0,5d9e2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 479fc: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 47a02: 4a28 0075 tstb %a0@(117) 47a06: 6712 beqs 47a1a <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a08: 7001 moveq #1,%d0 47a0a: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a10: 46c3 movew %d3,%sr } 47a12: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a16: 4e5e unlk %fp 47a18: 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 || 47a1a: 4a80 tstl %d0 47a1c: 66f2 bnes 47a10 <_Thread_Clear_state+0x9c> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a1e: 7001 moveq #1,%d0 <== NOT EXECUTED 47a20: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED 47a26: 60e8 bras 47a10 <_Thread_Clear_state+0x9c> <== NOT EXECUTED 00047a28 <_Thread_Close>: 47a28: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47a2a: 4e56 0000 linkw %fp,#0 47a2e: 2f0b movel %a3,%sp@- 47a30: 266e 0008 moveal %fp@(8),%a3 47a34: 2f0a movel %a2,%sp@- 47a36: 246e 000c moveal %fp@(12),%a2 47a3a: 206b 0018 moveal %a3@(24),%a0 47a3e: 302a 000a movew %a2@(10),%d0 47a42: 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; 47a46: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47a4c: 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 ); 47a4e: 2f0a movel %a2,%sp@- 47a50: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 47a56: 4eb9 0004 8d4c jsr 48d4c <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47a5c: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47a62: 5280 addql #1,%d0 47a64: 23c0 0005 d954 movel %d0,5d954 <_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 ); 47a6a: 2f0a movel %a2,%sp@- 47a6c: 2f0b movel %a3,%sp@- 47a6e: 4eb9 0004 70d0 jsr 470d0 <_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 ); 47a74: 4878 0001 pea 1 47a78: 2f0a movel %a2,%sp@- 47a7a: 4eb9 0004 8614 jsr 48614 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47a80: 2f0a movel %a2,%sp@- 47a82: 4eb9 0004 8420 jsr 48420 <_Thread_queue_Extract_with_proxy> 47a88: 4fef 0018 lea %sp@(24),%sp 47a8c: 4a00 tstb %d0 47a8e: 6608 bnes 47a98 <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47a90: 7002 moveq #2,%d0 47a92: b0aa 0050 cmpl %a2@(80),%d0 47a96: 6756 beqs 47aee <_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 ) ) 47a98: b5f9 0005 d9da cmpal 5d9da <_Thread_Allocated_fp>,%a2 47a9e: 6746 beqs 47ae6 <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47aa0: 202a 00c4 movel %a2@(196),%d0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 47aa4: 42aa 0100 clrl %a2@(256) if ( the_thread->Start.fp_context ) 47aa8: 4a80 tstl %d0 47aaa: 670a beqs 47ab6 <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47aac: 2f00 movel %d0,%sp@- 47aae: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> 47ab4: 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 ); 47ab6: 2f0a movel %a2,%sp@- 47ab8: 4eb9 0004 8810 jsr 48810 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47abe: 202a 0114 movel %a2@(276),%d0 47ac2: 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; 47ac4: 42aa 00c8 clrl %a2@(200) if ( the_thread->extensions ) 47ac8: 4a80 tstl %d0 47aca: 670a beqs 47ad6 <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47acc: 2f00 movel %d0,%sp@- 47ace: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> 47ad4: 588f addql #4,%sp the_thread->extensions = NULL; 47ad6: 42aa 0114 clrl %a2@(276) } 47ada: 246e fff8 moveal %fp@(-8),%a2 47ade: 266e fffc moveal %fp@(-4),%a3 47ae2: 4e5e unlk %fp 47ae4: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47ae6: 42b9 0005 d9da clrl 5d9da <_Thread_Allocated_fp> 47aec: 60b2 bras 47aa0 <_Thread_Close+0x78> <== ALWAYS TAKEN */ _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 ); 47aee: 486a 0048 pea %a2@(72) 47af2: 4eb9 0004 8f60 jsr 48f60 <_Watchdog_Remove> 47af8: 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 ) ) 47afa: b5f9 0005 d9da cmpal 5d9da <_Thread_Allocated_fp>,%a2 47b00: 669e bnes 47aa0 <_Thread_Close+0x78> <== NEVER TAKEN 47b02: 60e2 bras 47ae6 <_Thread_Close+0xbe> <== NOT EXECUTED 00047bb4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 47bb4: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47bb8: 486e fffc pea %fp@(-4) 47bbc: 2f2e 0008 movel %fp@(8),%sp@- 47bc0: 4eb9 0004 7d70 jsr 47d70 <_Thread_Get> switch ( location ) { 47bc6: 508f addql #8,%sp 47bc8: 4aae fffc tstl %fp@(-4) 47bcc: 661e bnes 47bec <_Thread_Delay_ended+0x38> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 47bce: 2f3c 1000 0018 movel #268435480,%sp@- 47bd4: 2f00 movel %d0,%sp@- 47bd6: 4eb9 0004 7974 jsr 47974 <_Thread_Clear_state> 47bdc: 508f addql #8,%sp 47bde: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47be4: 5380 subql #1,%d0 47be6: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 47bec: 4e5e unlk %fp 47bee: 4e75 rts 00047bf0 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 47bf0: 4e56 ffc8 linkw %fp,#-56 47bf4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 47bf8: 2e3c 0000 0700 movel #1792,%d7 47bfe: 2007 movel %d7,%d0 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 47c00: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 _ISR_Disable( level ); 47c06: 40c1 movew %sr,%d1 47c08: 8081 orl %d1,%d0 47c0a: 46c0 movew %d0,%sr while ( _Context_Switch_necessary == true ) { 47c0c: 1039 0005 da1e moveb 5da1e <_Context_Switch_necessary>,%d0 47c12: 6700 00fa beqw 47d0e <_Thread_Dispatch+0x11e> 47c16: 260e movel %fp,%d3 47c18: 240e movel %fp,%d2 47c1a: 5183 subql #8,%d3 47c1c: 2c3c 0004 b278 movel #307832,%d6 47c22: 0682 ffff fff0 addil #-16,%d2 47c28: 2a3c 0004 8b18 movel #297752,%d5 47c2e: 283c 0004 8ad0 movel #297680,%d4 47c34: 4bf9 0004 8dd8 lea 48dd8 <_User_extensions_Thread_switch>,%a5 47c3a: 49f9 0004 914c lea 4914c <_CPU_Context_switch>,%a4 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 47c40: 7001 moveq #1,%d0 47c42: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 47c48: 2679 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 47c4e: 4200 clrb %d0 _Thread_Executing = heir; 47c50: 23cb 0005 da0e movel %a3,5da0e <_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; 47c56: 13c0 0005 da1e moveb %d0,5da1e <_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 ) 47c5c: 7001 moveq #1,%d0 47c5e: b0ab 007a cmpl %a3@(122),%d0 47c62: 6700 00d6 beqw 47d3a <_Thread_Dispatch+0x14a> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 47c66: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47c68: 2f03 movel %d3,%sp@- 47c6a: 2046 moveal %d6,%a0 47c6c: 4e90 jsr %a0@ _Timestamp_Subtract( 47c6e: 2045 moveal %d5,%a0 47c70: 2f02 movel %d2,%sp@- 47c72: 2f03 movel %d3,%sp@- 47c74: 4879 0005 da16 pea 5da16 <_Thread_Time_of_last_context_switch> 47c7a: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47c7c: 2044 moveal %d4,%a0 47c7e: 2f02 movel %d2,%sp@- 47c80: 486a 0082 pea %a2@(130) 47c84: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47c86: 2079 0005 d9de moveal 5d9de <_Thread_libc_reent>,%a0 47c8c: 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; 47c90: 202e fff8 movel %fp@(-8),%d0 47c94: 222e fffc movel %fp@(-4),%d1 47c98: 23c0 0005 da16 movel %d0,5da16 <_Thread_Time_of_last_context_switch> 47c9e: 23c1 0005 da1a movel %d1,5da1a <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47ca4: 4a88 tstl %a0 47ca6: 6708 beqs 47cb0 <_Thread_Dispatch+0xc0> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 47ca8: 2550 0104 movel %a0@,%a2@(260) *_Thread_libc_reent = heir->libc_reent; 47cac: 20ab 0104 movel %a3@(260),%a0@ } _User_extensions_Thread_switch( executing, heir ); 47cb0: 2f0b movel %a3,%sp@- 47cb2: 2f0a movel %a2,%sp@- 47cb4: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 47cb6: 486b 00cc pea %a3@(204) 47cba: 486a 00cc pea %a2@(204) 47cbe: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 47cc0: 4fef 0010 lea %sp@(16),%sp 47cc4: 4aaa 0100 tstl %a2@(256) 47cc8: 672c beqs 47cf6 <_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 ); 47cca: 2079 0005 d9da moveal 5d9da <_Thread_Allocated_fp>,%a0 47cd0: b1ca cmpal %a2,%a0 47cd2: 6722 beqs 47cf6 <_Thread_Dispatch+0x106> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 47cd4: 4a88 tstl %a0 47cd6: 670c beqs 47ce4 <_Thread_Dispatch+0xf4> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 47cd8: 4868 0100 pea %a0@(256) 47cdc: 4eb9 0004 927a jsr 4927a <_CPU_Context_save_fp> 47ce2: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 47ce4: 486a 0100 pea %a2@(256) 47ce8: 4eb9 0004 92b2 jsr 492b2 <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 47cee: 588f addql #4,%sp 47cf0: 23ca 0005 d9da movel %a2,5d9da <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 47cf6: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 _ISR_Disable( level ); 47cfc: 2007 movel %d7,%d0 47cfe: 40c1 movew %sr,%d1 47d00: 8081 orl %d1,%d0 47d02: 46c0 movew %d0,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 47d04: 1039 0005 da1e moveb 5da1e <_Context_Switch_necessary>,%d0 47d0a: 6600 ff34 bnew 47c40 <_Thread_Dispatch+0x50> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 47d0e: 42b9 0005 d954 clrl 5d954 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 47d14: 46c1 movew %d1,%sr if ( _Thread_Do_post_task_switch_extension || 47d16: 4ab9 0005 d9f6 tstl 5d9f6 <_Thread_Do_post_task_switch_extension> 47d1c: 6606 bnes 47d24 <_Thread_Dispatch+0x134> <== ALWAYS TAKEN executing->do_post_task_switch_extension ) { 47d1e: 4a2a 0074 tstb %a2@(116) 47d22: 670c beqs 47d30 <_Thread_Dispatch+0x140> executing->do_post_task_switch_extension = false; 47d24: 4201 clrb %d1 47d26: 1541 0074 moveb %d1,%a2@(116) _API_extensions_Run_postswitch(); 47d2a: 4eb9 0004 6600 jsr 46600 <_API_extensions_Run_postswitch> } } 47d30: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47d36: 4e5e unlk %fp 47d38: 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; 47d3a: 41f9 0005 d904 lea 5d904 <_Thread_Ticks_per_timeslice>,%a0 47d40: 2750 0076 movel %a0@,%a3@(118) 47d44: 6000 ff20 braw 47c66 <_Thread_Dispatch+0x76> <== ALWAYS TAKEN 0004d178 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4d178: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4d17c: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4d182: 4aa8 0010 tstl %a0@(16) 4d186: 660e bnes 4d196 <_Thread_Evaluate_mode+0x1e> <== ALWAYS TAKEN 4d188: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 4d18e: 6712 beqs 4d1a2 <_Thread_Evaluate_mode+0x2a> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4d190: 4a28 0075 tstb %a0@(117) 4d194: 670c beqs 4d1a2 <_Thread_Evaluate_mode+0x2a> <== ALWAYS TAKEN _Context_Switch_necessary = true; return true; } return false; } 4d196: 4e5e unlk %fp executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; 4d198: 7001 moveq #1,%d0 4d19a: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> return true; } return false; } 4d1a0: 4e75 rts 4d1a2: 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; 4d1a4: 4200 clrb %d0 } return false; } 4d1a6: 4e75 rts 0004d1a8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d1a8: 4e56 0000 linkw %fp,#0 4d1ac: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4d1ae: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d1b4: 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; 4d1b6: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4d1ba: 40c0 movew %sr,%d0 4d1bc: e189 lsll #8,%d1 4d1be: 0280 0000 f8ff andil #63743,%d0 4d1c4: 8081 orl %d1,%d0 4d1c6: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4d1c8: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4d1ca: 1439 0005 d108 moveb 5d108 ,%d2 doneConstructors = 1; 4d1d0: 13c0 0005 d108 moveb %d0,5d108 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4d1d6: 4aaa 0100 tstl %a2@(256) 4d1da: 6720 beqs 4d1fc <_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 ); 4d1dc: 2079 0005 d9da moveal 5d9da <_Thread_Allocated_fp>,%a0 4d1e2: b1ca cmpal %a2,%a0 4d1e4: 6716 beqs 4d1fc <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4d1e6: 4a88 tstl %a0 4d1e8: 670c beqs 4d1f6 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4d1ea: 4868 0100 pea %a0@(256) 4d1ee: 4eb9 0004 927a jsr 4927a <_CPU_Context_save_fp> 4d1f4: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4d1f6: 23ca 0005 d9da movel %a2,5d9da <_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 ); 4d1fc: 2f0a movel %a2,%sp@- 4d1fe: 4eb9 0004 8c30 jsr 48c30 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4d204: 4eb9 0004 7d48 jsr 47d48 <_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) */ { 4d20a: 588f addql #4,%sp 4d20c: 4a02 tstb %d2 4d20e: 6746 beqs 4d256 <_Thread_Handler+0xae> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d210: 4aaa 009e tstl %a2@(158) 4d214: 6718 beqs 4d22e <_Thread_Handler+0x86> <== NEVER 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 ); 4d216: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d218: 4eb9 0004 8c6e jsr 48c6e <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4d21e: 4878 0006 pea 6 <== NOT EXECUTED 4d222: 4878 0001 pea 1 <== NOT EXECUTED 4d226: 42a7 clrl %sp@- <== NOT EXECUTED 4d228: 4eb9 0004 6f7c jsr 46f7c <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4d22e: 2f2a 00a6 movel %a2@(166),%sp@- 4d232: 206a 009a moveal %a2@(154),%a0 4d236: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4d238: 588f addql #4,%sp 4d23a: 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 ); 4d23e: 2f0a movel %a2,%sp@- 4d240: 4eb9 0004 8c6e jsr 48c6e <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4d246: 4878 0006 pea 6 4d24a: 4878 0001 pea 1 4d24e: 42a7 clrl %sp@- 4d250: 4eb9 0004 6f7c jsr 46f7c <_Internal_error_Occurred> * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4d256: 4eb9 0005 a858 jsr 5a858 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d25c: 4aaa 009e tstl %a2@(158) 4d260: 66b4 bnes 4d216 <_Thread_Handler+0x6e> <== ALWAYS TAKEN 4d262: 60ca bras 4d22e <_Thread_Handler+0x86> <== ALWAYS TAKEN 00047e0c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e0c: 4e56 ffe4 linkw %fp,#-28 47e10: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 47e14: 242e 0014 movel %fp@(20),%d2 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 47e18: 2f02 movel %d2,%sp@- Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e1a: 246e 000c moveal %fp@(12),%a2 47e1e: 262e 0018 movel %fp@(24),%d3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47e22: 42aa 0108 clrl %a2@(264) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e26: 266e 001c moveal %fp@(28),%a3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47e2a: 42aa 010c clrl %a2@(268) 47e2e: 42aa 0110 clrl %a2@(272) extensions_area = NULL; the_thread->libc_reent = NULL; 47e32: 42aa 0104 clrl %a2@(260) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 47e36: 2f0a movel %a2,%sp@- Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e38: 182e 0023 moveb %fp@(35),%d4 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 47e3c: 4eb9 0004 87ac jsr 487ac <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 47e42: 508f addql #8,%sp 47e44: 4a80 tstl %d0 47e46: 6700 0110 beqw 47f58 <_Thread_Initialize+0x14c> 47e4a: b082 cmpl %d2,%d0 47e4c: 6500 010a bcsw 47f58 <_Thread_Initialize+0x14c> <== ALWAYS TAKEN void *starting_address, size_t size ) { the_stack->area = starting_address; the_stack->size = size; 47e50: 2540 00bc movel %d0,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 47e54: 256a 00c8 00c0 movel %a2@(200),%a2@(192) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 47e5a: 4a03 tstb %d3 47e5c: 6600 0112 bnew 47f70 <_Thread_Initialize+0x164> 47e60: 4280 clrl %d0 47e62: 4285 clrl %d5 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47e64: 2239 0005 d9f2 movel 5d9f2 <_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; 47e6a: 2540 00c4 movel %d0,%a2@(196) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 47e6e: 2540 0100 movel %d0,%a2@(256) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47e72: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 47e76: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 47e7a: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 47e7e: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47e82: 4a81 tstl %d1 47e84: 6600 010c bnew 47f92 <_Thread_Initialize+0x186> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 47e88: 42aa 0114 clrl %a2@(276) 47e8c: 4283 clrl %d3 #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 ); 47e8e: 2f0b movel %a3,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 47e90: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 47e96: 7001 moveq #1,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 47e98: 256e 0024 00ac movel %fp@(36),%a2@(172) the_thread->Start.budget_callout = budget_callout; 47e9e: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 47ea4: 1544 00aa moveb %d4,%a2@(170) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 47ea8: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47eaa: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 47eae: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 47eb2: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 47eb6: 254b 0018 movel %a3,%a2@(24) the_thread->Start.initial_priority = priority; 47eba: 254b 00b8 movel %a3,%a2@(184) _Thread_Set_priority( the_thread, priority ); 47ebe: 4eb9 0004 85a4 jsr 485a4 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47ec4: 206e 0008 moveal %fp@(8),%a0 47ec8: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 47eca: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47ed0: 2068 0018 moveal %a0@(24),%a0 47ed4: 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 ); 47ed8: 42aa 0082 clrl %a2@(130) 47edc: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 47ee0: 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 ); 47ee4: 2f0a movel %a2,%sp@- 47ee6: 4eb9 0004 8d00 jsr 48d00 <_User_extensions_Thread_create> if ( extension_status ) 47eec: 4fef 000c lea %sp@(12),%sp 47ef0: 4a00 tstb %d0 47ef2: 6670 bnes 47f64 <_Thread_Initialize+0x158> return true; failed: if ( the_thread->libc_reent ) 47ef4: 202a 0104 movel %a2@(260),%d0 47ef8: 670a beqs 47f04 <_Thread_Initialize+0xf8> _Workspace_Free( the_thread->libc_reent ); 47efa: 2f00 movel %d0,%sp@- 47efc: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> 47f02: 588f addql #4,%sp 47f04: 47ea 0108 lea %a2@(264),%a3 47f08: 4282 clrl %d2 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); 47f0a: 49f9 0004 90cc lea 490cc <_Workspace_Free>,%a4 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] ) 47f10: 2013 movel %a3@,%d0 failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 47f12: 5282 addql #1,%d2 47f14: 588b addql #4,%a3 if ( the_thread->API_Extensions[i] ) 47f16: 4a80 tstl %d0 47f18: 6706 beqs 47f20 <_Thread_Initialize+0x114> _Workspace_Free( the_thread->API_Extensions[i] ); 47f1a: 2f00 movel %d0,%sp@- 47f1c: 4e94 jsr %a4@ 47f1e: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 47f20: 7003 moveq #3,%d0 47f22: b082 cmpl %d2,%d0 47f24: 66ea bnes 47f10 <_Thread_Initialize+0x104> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 47f26: 4a83 tstl %d3 47f28: 670a beqs 47f34 <_Thread_Initialize+0x128> (void) _Workspace_Free( extensions_area ); 47f2a: 2f03 movel %d3,%sp@- 47f2c: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> 47f32: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 47f34: 4a85 tstl %d5 47f36: 670a beqs 47f42 <_Thread_Initialize+0x136> (void) _Workspace_Free( fp_area ); 47f38: 2f05 movel %d5,%sp@- 47f3a: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> 47f40: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 47f42: 2f0a movel %a2,%sp@- 47f44: 4eb9 0004 8810 jsr 48810 <_Thread_Stack_Free> return false; 47f4a: 588f addql #4,%sp } 47f4c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 47f52: 4200 clrb %d0 return false; } 47f54: 4e5e unlk %fp 47f56: 4e75 rts 47f58: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 47f5e: 4200 clrb %d0 } 47f60: 4e5e unlk %fp 47f62: 4e75 rts 47f64: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 * 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 ) 47f6a: 7001 moveq #1,%d0 _Thread_Stack_Free( the_thread ); return false; } 47f6c: 4e5e unlk %fp 47f6e: 4e75 rts /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 47f70: 4878 001c pea 1c 47f74: 4eb9 0004 90b0 jsr 490b0 <_Workspace_Allocate> if ( !fp_area ) 47f7a: 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 ); 47f7c: 2a00 movel %d0,%d5 if ( !fp_area ) 47f7e: 6600 fee4 bnew 47e64 <_Thread_Initialize+0x58> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 47f82: 202a 0104 movel %a2@(260),%d0 * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) 47f86: 4283 clrl %d3 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 47f88: 4a80 tstl %d0 47f8a: 6600 ff6e bnew 47efa <_Thread_Initialize+0xee> <== ALWAYS TAKEN 47f8e: 6000 ff74 braw 47f04 <_Thread_Initialize+0xf8> <== ALWAYS TAKEN /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 47f92: e589 lsll #2,%d1 47f94: 2041 moveal %d1,%a0 47f96: 4868 0004 pea %a0@(4) 47f9a: 4eb9 0004 90b0 jsr 490b0 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47fa0: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 47fa2: 2600 movel %d0,%d3 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47fa4: 6700 ff4e beqw 47ef4 <_Thread_Initialize+0xe8> goto failed; } the_thread->extensions = (void **) extensions_area; 47fa8: 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++ ) 47faa: 4281 clrl %d1 47fac: 4280 clrl %d0 47fae: 2279 0005 d9f2 moveal 5d9f2 <_Thread_Maximum_extensions>,%a1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 47fb4: 2543 0114 movel %d3,%a2@(276) * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 47fb8: 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++ ) 47fbc: 5280 addql #1,%d0 47fbe: 2200 movel %d0,%d1 47fc0: b3c0 cmpal %d0,%a1 47fc2: 6500 feca bcsw 47e8e <_Thread_Initialize+0x82> 47fc6: 206a 0114 moveal %a2@(276),%a0 47fca: 60ec bras 47fb8 <_Thread_Initialize+0x1ac> <== ALWAYS TAKEN 0004c708 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4c708: 4e56 0000 linkw %fp,#0 4c70c: 2f0a movel %a2,%sp@- 4c70e: 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; 4c712: 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; 4c718: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4c71e: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4c724: 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; 4c72a: 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; 4c730: 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 ) ) { 4c734: 2f0a movel %a2,%sp@- 4c736: 4eb9 0004 8fd8 jsr 48fd8 <_Thread_queue_Extract_with_proxy> 4c73c: 588f addql #4,%sp 4c73e: 4a00 tstb %d0 4c740: 6608 bnes 4c74a <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4c742: 7002 moveq #2,%d0 4c744: b0aa 0050 cmpl %a2@(80),%d0 4c748: 672a beqs 4c774 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4c74a: 202a 00b8 movel %a2@(184),%d0 4c74e: b0aa 0014 cmpl %a2@(20),%d0 4c752: 6718 beqs 4c76c <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4c754: 2d4a 0008 movel %a2,%fp@(8) 4c758: 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; 4c75c: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 4c760: 246e fffc moveal %fp@(-4),%a2 4c764: 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 ); 4c766: 4ef9 0004 91f8 jmp 491f8 <_Thread_Set_priority> } } 4c76c: 246e fffc moveal %fp@(-4),%a2 4c770: 4e5e unlk %fp 4c772: 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 ); 4c774: 486a 0048 pea %a2@(72) 4c778: 4eb9 0004 9bf8 jsr 49bf8 <_Watchdog_Remove> 4c77e: 588f addql #4,%sp 4c780: 60c8 bras 4c74a <_Thread_Reset+0x42> <== ALWAYS TAKEN ... 0004ba70 <_Thread_Reset_timeslice>: Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4ba70: 223c 0000 0700 movel #1792,%d1 4ba76: 2001 movel %d1,%d0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4ba78: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4ba7c: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4ba82: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4ba86: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4ba8a: 40c2 movew %sr,%d2 4ba8c: 8082 orl %d2,%d0 4ba8e: 46c0 movew %d0,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4ba90: 2029 0008 movel %a1@(8),%d0 4ba94: b091 cmpl %a1@,%d0 4ba96: 6752 beqs 4baea <_Thread_Reset_timeslice+0x7a> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4ba98: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ba9a: 2009 movel %a1,%d0 4ba9c: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4ba9e: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4baa2: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4baa4: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4baa8: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4baaa: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4baae: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4bab2: 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; 4bab6: 2488 movel %a0,%a2@ return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4bab8: 46c2 movew %d2,%sr 4baba: 8282 orl %d2,%d1 4babc: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4babe: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 4bac4: 6712 beqs 4bad8 <_Thread_Reset_timeslice+0x68> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4bac6: 7001 moveq #1,%d0 <== NOT EXECUTED 4bac8: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4bace: 46c2 movew %d2,%sr <== NOT EXECUTED } 4bad0: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4bad4: 4e5e unlk %fp 4bad6: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4bad8: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _Context_Switch_necessary = true; 4bade: 7001 moveq #1,%d0 4bae0: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 4bae6: 46c2 movew %d2,%sr 4bae8: 60e6 bras 4bad0 <_Thread_Reset_timeslice+0x60> <== ALWAYS TAKEN executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4baea: 46c2 movew %d2,%sr _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 4baec: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4baf0: 4e5e unlk %fp 4baf2: 4e75 rts 0004915c <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 4915c: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4915e: 4e56 0000 linkw %fp,#0 49162: 2f0a movel %a2,%sp@- 49164: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 49168: c0aa 0010 andl %a2@(16),%d0 4916c: 4a00 tstb %d0 4916e: 670a beqs 4917a <_Thread_Restart+0x1e> return true; } return false; } 49170: 246e fffc moveal %fp@(-4),%a2 49174: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 49176: 4200 clrb %d0 return true; } return false; } 49178: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 4917a: 2f0a movel %a2,%sp@- 4917c: 4eb9 0004 937c jsr 4937c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 49182: 2f2e 0010 movel %fp@(16),%sp@- 49186: 2f2e 000c movel %fp@(12),%sp@- 4918a: 2f0a movel %a2,%sp@- 4918c: 4eb9 0004 c708 jsr 4c708 <_Thread_Reset> _Thread_Load_environment( the_thread ); 49192: 2f0a movel %a2,%sp@- 49194: 4eb9 0004 c35c jsr 4c35c <_Thread_Load_environment> _Thread_Ready( the_thread ); 4919a: 2f0a movel %a2,%sp@- 4919c: 4eb9 0004 c648 jsr 4c648 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 491a2: 2f0a movel %a2,%sp@- 491a4: 4eb9 0004 99e8 jsr 499e8 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 491aa: 4fef 001c lea %sp@(28),%sp 491ae: b5f9 0005 e956 cmpal 5e956 <_Thread_Executing>,%a2 491b4: 670a beqs 491c0 <_Thread_Restart+0x64> return true; } return false; } 491b6: 246e fffc moveal %fp@(-4),%a2 491ba: 4e5e unlk %fp _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) 491bc: 7001 moveq #1,%d0 return true; } return false; } 491be: 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 ) 491c0: 4aaa 0100 tstl %a2@(256) 491c4: 6712 beqs 491d8 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 491c6: 486a 0100 pea %a2@(256) 491ca: 4eb9 0004 9f4a jsr 49f4a <_CPU_Context_restore_fp> 491d0: 2479 0005 e956 moveal 5e956 <_Thread_Executing>,%a2 491d6: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 491d8: 222a 00cc movel %a2@(204),%d1 491dc: 202a 00fc movel %a2@(252),%d0 491e0: 46c1 movew %d1,%sr 491e2: 2e40 moveal %d0,%sp 491e4: 4e75 rts 491e6: 2540 00fc movel %d0,%a2@(252) <== NOT EXECUTED 491ea: 2541 00cc movel %d1,%a2@(204) <== NOT EXECUTED 491ee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 491f2: 4e5e unlk %fp <== NOT EXECUTED 491f4: 7001 moveq #1,%d0 <== NOT EXECUTED 491f6: 4e75 rts 0004c6d0 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c6d0: 327c 0700 moveaw #1792,%a1 4c6d4: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c6d6: 4e56 ffec linkw %fp,#-20 4c6da: 206e 0008 moveal %fp@(8),%a0 4c6de: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c6e2: 40c1 movew %sr,%d1 4c6e4: 8081 orl %d1,%d0 4c6e6: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c6e8: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c6ec: 0800 0001 btst #1,%d0 4c6f0: 6774 beqs 4c766 <_Thread_Resume+0x96> <== ALWAYS TAKEN 4c6f2: 74fd moveq #-3,%d2 4c6f4: c082 andl %d2,%d0 current_state = 4c6f6: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c6fa: 666a bnes 4c766 <_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; 4c6fc: 2868 008e moveal %a0@(142),%a4 4c700: 3028 0094 movew %a0@(148),%d0 4c704: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c706: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c70a: 260a movel %a2,%d3 4c70c: 5883 addql #4,%d3 4c70e: 8082 orl %d2,%d0 4c710: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c712: 266a 0008 moveal %a2@(8),%a3 4c716: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c718: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c71c: 3439 0006 377c movew 6377c <_Priority_Major_bit_map>,%d2 4c722: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c726: 214b 0004 movel %a3,%a0@(4) 4c72a: 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; 4c72c: 2688 movel %a0,%a3@ 4c72e: 33c0 0006 377c movew %d0,6377c <_Priority_Major_bit_map> _ISR_Flash( level ); 4c734: 2009 movel %a1,%d0 4c736: 46c1 movew %d1,%sr 4c738: 8081 orl %d1,%d0 4c73a: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c73c: 2028 0014 movel %a0@(20),%d0 4c740: 2279 0006 375a moveal 6375a <_Thread_Heir>,%a1 4c746: b0a9 0014 cmpl %a1@(20),%d0 4c74a: 641a bccs 4c766 <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c74c: 23c8 0006 375a movel %a0,6375a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c752: 2079 0006 3786 moveal 63786 <_Thread_Executing>,%a0 4c758: 4a28 0075 tstb %a0@(117) 4c75c: 6712 beqs 4c770 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c75e: 7001 moveq #1,%d0 4c760: 13c0 0006 3796 moveb %d0,63796 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c766: 46c1 movew %d1,%sr } 4c768: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c76c: 4e5e unlk %fp 4c76e: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c770: 4a80 tstl %d0 4c772: 66f2 bnes 4c766 <_Thread_Resume+0x96> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c774: 7001 moveq #1,%d0 <== NOT EXECUTED 4c776: 13c0 0006 3796 moveb %d0,63796 <_Context_Switch_necessary> <== NOT EXECUTED 4c77c: 60e8 bras 4c766 <_Thread_Resume+0x96> <== NOT EXECUTED ... 00048614 <_Thread_Set_state>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 48614: 203c 0000 0700 movel #1792,%d0 void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 4861a: 4e56 fff4 linkw %fp,#-12 4861e: 206e 0008 moveal %fp@(8),%a0 48622: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48626: 242e 000c movel %fp@(12),%d2 ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 4862a: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4862e: 40c1 movew %sr,%d1 48630: 8081 orl %d1,%d0 48632: 46c0 movew %d0,%sr if ( !_States_Is_ready( the_thread->current_state ) ) { 48634: 2028 0010 movel %a0@(16),%d0 48638: 6640 bnes 4867a <_Thread_Set_state+0x66> return; } the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { 4863a: 2029 0008 movel %a1@(8),%d0 _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 4863e: 2142 0010 movel %d2,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 48642: b091 cmpl %a1@,%d0 48644: 6700 0096 beqw 486dc <_Thread_Set_state+0xc8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48648: 2250 moveal %a0@,%a1 previous = the_node->previous; 4864a: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 4864e: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48650: 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 ); 48654: 203c 0000 0700 movel #1792,%d0 4865a: 46c1 movew %d1,%sr 4865c: 8081 orl %d1,%d0 4865e: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 48660: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48666: 672e beqs 48696 <_Thread_Set_state+0x82> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 48668: b1f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a0 4866e: 671a beqs 4868a <_Thread_Set_state+0x76> _Context_Switch_necessary = true; _ISR_Enable( level ); 48670: 46c1 movew %d1,%sr } 48672: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48676: 4e5e unlk %fp 48678: 4e75 rts Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 4867a: 8480 orl %d0,%d2 4867c: 2142 0010 movel %d2,%a0@(16) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 48680: 46c1 movew %d1,%sr if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 48682: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48686: 4e5e unlk %fp 48688: 4e75 rts if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 4868a: 7001 moveq #1,%d0 4868c: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 48692: 46c1 movew %d1,%sr 48694: 60dc bras 48672 <_Thread_Set_state+0x5e> <== ALWAYS TAKEN 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 ); 48696: 3039 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d0 4869c: 4840 swap %d0 4869e: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 486a0: 4282 clrl %d2 486a2: 43f9 0005 da70 lea 5da70 <_Priority_Bit_map>,%a1 486a8: 3400 movew %d0,%d2 486aa: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 486ae: 4840 swap %d0 486b0: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 486b2: 4283 clrl %d3 486b4: e98a lsll #4,%d2 486b6: 3600 movew %d0,%d3 486b8: 2279 0005 d900 moveal 5d900 <_Thread_Ready_chain>,%a1 486be: 2002 movel %d2,%d0 486c0: d083 addl %d3,%d0 486c2: 2400 movel %d0,%d2 486c4: e58a lsll #2,%d2 486c6: e988 lsll #4,%d0 486c8: 93c2 subal %d2,%a1 486ca: d3c0 addal %d0,%a1 486cc: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 486d2: b1f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a0 486d8: 6696 bnes 48670 <_Thread_Set_state+0x5c> 486da: 60ae bras 4868a <_Thread_Set_state+0x76> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 486dc: 2009 movel %a1,%d0 486de: 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; 486e0: 2468 008e moveal %a0@(142),%a2 486e4: 2280 movel %d0,%a1@ 486e6: 3412 movew %a2@,%d2 486e8: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 486ec: 2349 0008 movel %a1,%a1@(8) 486f0: 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; 486f2: 42a9 0004 clrl %a1@(4) 486f6: 3480 movew %d0,%a2@ the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 486f8: 6600 ff5a bnew 48654 <_Thread_Set_state+0x40> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 486fc: 3439 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d2 48702: 3028 0096 movew %a0@(150),%d0 48706: c082 andl %d2,%d0 48708: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 4870e: 203c 0000 0700 movel #1792,%d0 48714: 46c1 movew %d1,%sr 48716: 8081 orl %d1,%d0 48718: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 4871a: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48720: 6600 ff46 bnew 48668 <_Thread_Set_state+0x54> 48724: 6000 ff70 braw 48696 <_Thread_Set_state+0x82> <== ALWAYS TAKEN 000488e4 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 488e4: 203c 0000 0700 movel #1792,%d0 */ void _Thread_Suspend( Thread_Control *the_thread ) { 488ea: 4e56 fff4 linkw %fp,#-12 488ee: 206e 0008 moveal %fp@(8),%a0 488f2: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 488f6: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 488fa: 40c1 movew %sr,%d1 488fc: 8081 orl %d1,%d0 488fe: 46c0 movew %d0,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 48900: 2028 0010 movel %a0@(16),%d0 48904: 6642 bnes 48948 <_Thread_Suspend+0x64> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 48906: 7002 moveq #2,%d0 if ( _Chain_Has_only_one_node( ready ) ) { 48908: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 4890c: 2140 0010 movel %d0,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 48910: b491 cmpl %a1@,%d2 48912: 6700 0098 beqw 489ac <_Thread_Suspend+0xc8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48916: 2250 moveal %a0@,%a1 previous = the_node->previous; 48918: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 4891c: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4891e: 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 ); 48922: 203c 0000 0700 movel #1792,%d0 48928: 46c1 movew %d1,%sr 4892a: 8081 orl %d1,%d0 4892c: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 4892e: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48934: 6730 beqs 48966 <_Thread_Suspend+0x82> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 48936: b1f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a0 4893c: 671c beqs 4895a <_Thread_Suspend+0x76> <== ALWAYS TAKEN _Context_Switch_necessary = true; _ISR_Enable( level ); 4893e: 46c1 movew %d1,%sr } 48940: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48944: 4e5e unlk %fp 48946: 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 = 48948: 7402 moveq #2,%d2 4894a: 8480 orl %d0,%d2 4894c: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 48950: 46c1 movew %d1,%sr if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 48952: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48956: 4e5e unlk %fp 48958: 4e75 rts if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 4895a: 7401 moveq #1,%d2 4895c: 13c2 0005 da1e moveb %d2,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 48962: 46c1 movew %d1,%sr 48964: 60da bras 48940 <_Thread_Suspend+0x5c> <== ALWAYS TAKEN 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 ); 48966: 3039 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d0 4896c: 4840 swap %d0 4896e: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 48970: 4282 clrl %d2 48972: 43f9 0005 da70 lea 5da70 <_Priority_Bit_map>,%a1 48978: 3400 movew %d0,%d2 4897a: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 4897e: 4840 swap %d0 48980: 04c0 ff1 %d0 48982: 4283 clrl %d3 48984: e98a lsll #4,%d2 48986: 3600 movew %d0,%d3 48988: 2279 0005 d900 moveal 5d900 <_Thread_Ready_chain>,%a1 4898e: 2002 movel %d2,%d0 48990: d083 addl %d3,%d0 48992: 2400 movel %d0,%d2 48994: e58a lsll #2,%d2 48996: e988 lsll #4,%d0 48998: 93c2 subal %d2,%a1 4899a: d3c0 addal %d0,%a1 4899c: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 489a2: b1f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a0 489a8: 6694 bnes 4893e <_Thread_Suspend+0x5a> <== ALWAYS TAKEN 489aa: 60ae bras 4895a <_Thread_Suspend+0x76> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 489ac: 2009 movel %a1,%d0 489ae: 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; 489b0: 2468 008e moveal %a0@(142),%a2 489b4: 2280 movel %d0,%a1@ 489b6: 3412 movew %a2@,%d2 489b8: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 489bc: 2349 0008 movel %a1,%a1@(8) 489c0: 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; 489c2: 42a9 0004 clrl %a1@(4) 489c6: 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 ); 489c8: 6600 ff58 bnew 48922 <_Thread_Suspend+0x3e> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 489cc: 3439 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d2 489d2: 3028 0096 movew %a0@(150),%d0 489d6: c082 andl %d2,%d0 489d8: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 489de: 203c 0000 0700 movel #1792,%d0 489e4: 46c1 movew %d1,%sr 489e6: 8081 orl %d1,%d0 489e8: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 489ea: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 489f0: 6600 ff44 bnew 48936 <_Thread_Suspend+0x52> <== ALWAYS TAKEN 489f4: 6000 ff70 braw 48966 <_Thread_Suspend+0x82> <== ALWAYS TAKEN 00048a44 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a44: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48a48: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a4e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48a52: 243c 0000 0700 movel #1792,%d2 48a58: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48a5a: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48a5e: 40c1 movew %sr,%d1 48a60: 8081 orl %d1,%d0 48a62: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48a64: 2029 0008 movel %a1@(8),%d0 48a68: b091 cmpl %a1@,%d0 48a6a: 6750 beqs 48abc <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48a6c: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a6e: 2009 movel %a1,%d0 48a70: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48a72: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48a76: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48a78: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a7c: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48a7e: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48a82: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48a86: 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; 48a8a: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48a8c: 46c1 movew %d1,%sr 48a8e: 8481 orl %d1,%d2 48a90: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48a92: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48a98: 6712 beqs 48aac <_Thread_Yield_processor+0x68> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48a9a: 7001 moveq #1,%d0 <== NOT EXECUTED 48a9c: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48aa2: 46c1 movew %d1,%sr } 48aa4: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48aa8: 4e5e unlk %fp 48aaa: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48aac: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48ab2: 7001 moveq #1,%d0 48ab4: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> 48aba: 60e6 bras 48aa2 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48abc: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48ac2: 67de beqs 48aa2 <_Thread_Yield_processor+0x5e> <== NEVER TAKEN _Context_Switch_necessary = true; 48ac4: 7001 moveq #1,%d0 <== NOT EXECUTED 48ac6: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED 48acc: 60d4 bras 48aa2 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... 00048114 <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 48114: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4811a: 4e56 ffec linkw %fp,#-20 4811e: 226e 0008 moveal %fp@(8),%a1 48122: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 48126: 40c2 movew %sr,%d2 48128: 8082 orl %d2,%d0 4812a: 46c0 movew %d0,%sr 4812c: 4280 clrl %d0 4812e: 2049 moveal %a1,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 48130: 2208 movel %a0,%d1 48132: 5881 addql #4,%d1 48134: b290 cmpl %a0@,%d1 48136: 661c bnes 48154 <_Thread_queue_Dequeue_priority+0x40> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 48138: 5280 addql #1,%d0 4813a: 41e8 000c lea %a0@(12),%a0 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 4813e: 7204 moveq #4,%d1 48140: b280 cmpl %d0,%d1 48142: 66ec bnes 48130 <_Thread_queue_Dequeue_priority+0x1c> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 48144: 46c2 movew %d2,%sr 48146: 95ca subal %a2,%a2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 48148: 200a movel %a2,%d0 4814a: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48150: 4e5e unlk %fp 48152: 4e75 rts _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 48154: 2200 movel %d0,%d1 48156: e588 lsll #2,%d0 48158: e989 lsll #4,%d1 4815a: 9280 subl %d0,%d1 4815c: 2471 1800 moveal %a1@(00000000,%d1:l),%a2 48160: 200a movel %a2,%d0 48162: 0680 0000 003c addil #60,%d0 _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; 48168: 206a 0038 moveal %a2@(56),%a0 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 4816c: 2652 moveal %a2@,%a3 previous_node = the_thread->Object.Node.previous; 4816e: 226a 0004 moveal %a2@(4),%a1 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 48172: 42aa 0044 clrl %a2@(68) 48176: b088 cmpl %a0,%d0 48178: 6700 008a beqw 48204 <_Thread_queue_Dequeue_priority+0xf0> new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 4817c: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 48180: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 48182: 2748 0004 movel %a0,%a3@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 48186: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 48188: 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; 4818c: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4818e: 226a 0040 moveal %a2@(64),%a1 48192: b3ea 0038 cmpal %a2@(56),%a1 48196: 6716 beqs 481ae <_Thread_queue_Dequeue_priority+0x9a> /* > two threads on 2-n */ new_second_node->previous = 48198: 43e8 0038 lea %a0@(56),%a1 4819c: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 481a0: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 481a4: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 481a8: 41e8 003c lea %a0@(60),%a0 481ac: 2888 movel %a0,%a4@ } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 481ae: 7002 moveq #2,%d0 481b0: b0aa 0050 cmpl %a2@(80),%d0 481b4: 671e beqs 481d4 <_Thread_queue_Dequeue_priority+0xc0> _ISR_Enable( level ); 481b6: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 481b8: 2f3c 1003 fff8 movel #268697592,%sp@- 481be: 2f0a movel %a2,%sp@- 481c0: 4eb9 0004 7974 jsr 47974 <_Thread_Clear_state> 481c6: 508f addql #8,%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 481c8: 200a movel %a2,%d0 481ca: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 481d0: 4e5e unlk %fp 481d2: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 481d4: 7203 moveq #3,%d1 481d6: 2541 0050 movel %d1,%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 ); 481da: 46c2 movew %d2,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 481dc: 486a 0048 pea %a2@(72) 481e0: 4eb9 0004 8f60 jsr 48f60 <_Watchdog_Remove> 481e6: 2f3c 1003 fff8 movel #268697592,%sp@- 481ec: 2f0a movel %a2,%sp@- 481ee: 4eb9 0004 7974 jsr 47974 <_Thread_Clear_state> 481f4: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 481f8: 200a movel %a2,%d0 481fa: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48200: 4e5e unlk %fp 48202: 4e75 rts last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 48204: 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; 48208: 228b movel %a3,%a1@ 4820a: 60a2 bras 481ae <_Thread_queue_Dequeue_priority+0x9a> <== ALWAYS TAKEN 000482a8 <_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 ) { 482a8: 4e56 ffe4 linkw %fp,#-28 482ac: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 482b0: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 482b4: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 482b8: 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; 482be: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 482c2: 2401 movel %d1,%d2 482c4: ec8a lsrl #6,%d2 482c6: 2002 movel %d2,%d0 482c8: e58a lsll #2,%d2 482ca: 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 ) { 482cc: 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 ]; 482d0: 9082 subl %d2,%d0 482d2: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 482d6: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 482da: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 482de: 242c 0038 movel %a4@(56),%d2 482e2: 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; 482e6: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 482ea: 0801 0005 btst #5,%d1 482ee: 6656 bnes 48346 <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 482f0: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 482f2: 2803 movel %d3,%d4 482f4: 5885 addql #4,%d5 482f6: 2004 movel %d4,%d0 482f8: 40c3 movew %sr,%d3 482fa: 8083 orl %d3,%d0 482fc: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 482fe: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48300: ba88 cmpl %a0,%d5 48302: 6700 010a beqw 4840e <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 48306: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 4830a: b3c1 cmpal %d1,%a1 4830c: 6418 bccs 48326 <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4830e: 2004 movel %d4,%d0 48310: 46c3 movew %d3,%sr 48312: 8083 orl %d3,%d0 48314: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48316: 2002 movel %d2,%d0 48318: c0a8 0010 andl %a0@(16),%d0 4831c: 6700 0092 beqw 483b0 <_Thread_queue_Enqueue_priority+0x108> <== ALWAYS TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 48320: 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 ) ) { 48322: ba88 cmpl %a0,%d5 48324: 66e0 bnes 48306 <_Thread_queue_Enqueue_priority+0x5e> 48326: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48328: 7001 moveq #1,%d0 4832a: b0ac 0030 cmpl %a4@(48),%d0 4832e: 6700 0094 beqw 483c4 <_Thread_queue_Enqueue_priority+0x11c> <== NEVER TAKEN * 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; 48332: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 48336: 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; 4833a: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 4833c: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48340: 4e5e unlk %fp 48342: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48344: 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; 48346: 4284 clrl %d4 48348: 1839 0005 c222 moveb 5c222 ,%d4 _ISR_Disable( level ); 4834e: 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; 48350: 2244 moveal %d4,%a1 48352: 5289 addql #1,%a1 _ISR_Disable( level ); 48354: 40c4 movew %sr,%d4 48356: 8084 orl %d4,%d0 48358: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 4835a: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4835e: b5c8 cmpal %a0,%a2 48360: 6720 beqs 48382 <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 48362: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 48366: b3c1 cmpal %d1,%a1 48368: 6318 blss 48382 <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4836a: 2003 movel %d3,%d0 4836c: 46c4 movew %d4,%sr 4836e: 8084 orl %d4,%d0 48370: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48372: 2002 movel %d2,%d0 48374: c0a8 0010 andl %a0@(16),%d0 48378: 67ca beqs 48344 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4837a: 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 ) ) { 4837e: b5c8 cmpal %a0,%a2 48380: 66e0 bnes 48362 <_Thread_queue_Enqueue_priority+0xba> 48382: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48384: 7001 moveq #1,%d0 48386: b0ac 0030 cmpl %a4@(48),%d0 4838a: 66a6 bnes 48332 <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4838c: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 48390: b3c1 cmpal %d1,%a1 48392: 6756 beqs 483ea <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48394: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 48396: 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; 4839a: 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; 4839c: 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; 483a0: 208b movel %a3,%a0@ next_node->previous = the_node; 483a2: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483a6: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483a8: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483ac: 4e5e unlk %fp 483ae: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 483b0: 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 ); 483b2: 2004 movel %d4,%d0 <== NOT EXECUTED 483b4: 40c3 movew %sr,%d3 <== NOT EXECUTED 483b6: 8083 orl %d3,%d0 <== NOT EXECUTED 483b8: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 483ba: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 483bc: ba88 cmpl %a0,%d5 <== NOT EXECUTED 483be: 6600 ff46 bnew 48306 <_Thread_queue_Enqueue_priority+0x5e> <== NOT EXECUTED 483c2: 604a bras 4840e <_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; 483c4: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 483c8: b3c1 cmpal %d1,%a1 483ca: 671e beqs 483ea <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 483cc: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483d0: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483d2: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483d6: 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; 483da: 228b movel %a3,%a1@ search_node->previous = the_node; 483dc: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483e0: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483e2: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483e6: 4e5e unlk %fp 483e8: 4e75 rts 483ea: 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; 483ee: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483f2: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483f4: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483f8: 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; 483fc: 228b movel %a3,%a1@ search_node->previous = the_node; 483fe: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 48402: 46c2 movew %d2,%sr 48404: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 48406: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 4840a: 4e5e unlk %fp 4840c: 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 ) ) { 4840e: 2403 movel %d3,%d2 48410: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48414: 7001 moveq #1,%d0 48416: b0ac 0030 cmpl %a4@(48),%d0 4841a: 6600 ff16 bnew 48332 <_Thread_queue_Enqueue_priority+0x8a> 4841e: 60a4 bras 483c4 <_Thread_queue_Enqueue_priority+0x11c> <== ALWAYS TAKEN 0004820c <_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 ) { 4820c: 4e56 fff0 linkw %fp,#-16 48210: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48214: 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 ); 48218: 2f2b 0038 movel %a3@(56),%sp@- Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 4821c: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48222: 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 ); 48226: 2f0a movel %a2,%sp@- 48228: 4eb9 0004 8614 jsr 48614 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 4822e: 508f addql #8,%sp 48230: 4a82 tstl %d2 48232: 6644 bnes 48278 <_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 ) 48234: 41f9 0004 82a8 lea 482a8 <_Thread_queue_Enqueue_priority>,%a0 4823a: 7001 moveq #1,%d0 4823c: b0ab 0034 cmpl %a3@(52),%d0 48240: 6706 beqs 48248 <_Thread_queue_Enqueue_with_handler+0x3c> 48242: 41f9 0004 b7e4 lea 4b7e4 <_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 ); 48248: 486e fffc pea %fp@(-4) 4824c: 2f0a movel %a2,%sp@- 4824e: 2f0b movel %a3,%sp@- 48250: 4e90 jsr %a0@ if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 48252: 4fef 000c lea %sp@(12),%sp 48256: 7201 moveq #1,%d1 48258: b280 cmpl %d0,%d1 4825a: 6712 beqs 4826e <_Thread_queue_Enqueue_with_handler+0x62> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 4825c: 2f2e fffc movel %fp@(-4),%sp@- 48260: 2f0a movel %a2,%sp@- 48262: 2f00 movel %d0,%sp@- 48264: 4eb9 0004 77c0 jsr 477c0 <_Thread_blocking_operation_Cancel> 4826a: 4fef 000c lea %sp@(12),%sp } 4826e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48274: 4e5e unlk %fp 48276: 4e75 rts /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 48278: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4827c: 256e 0010 0064 movel %fp@(16),%a2@(100) the_watchdog->id = id; 48282: 2540 0068 movel %d0,%a2@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 48286: 2542 0054 movel %d2,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4828a: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4828e: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 48292: 486a 0048 pea %a2@(72) 48296: 4879 0005 da2c pea 5da2c <_Watchdog_Ticks_chain> 4829c: 4eb9 0004 8e18 jsr 48e18 <_Watchdog_Insert> 482a2: 508f addql #8,%sp 482a4: 608e bras 48234 <_Thread_queue_Enqueue_with_handler+0x28> <== ALWAYS TAKEN ... 0004b878 <_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 ); 4b878: 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 ) { 4b87e: 4e56 ffec linkw %fp,#-20 4b882: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b886: 246e 000c moveal %fp@(12),%a2 4b88a: 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 ); 4b88e: 40c1 movew %sr,%d1 4b890: 8081 orl %d1,%d0 4b892: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4b894: 202a 0010 movel %a2@(16),%d0 4b898: 0280 0003 bee0 andil #245472,%d0 4b89e: 677e beqs 4b91e <_Thread_queue_Extract_priority_helper+0xa6> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b8a0: 200a movel %a2,%d0 4b8a2: 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; 4b8a8: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4b8aa: 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)); 4b8ae: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b8b2: b088 cmpl %a0,%d0 4b8b4: 6774 beqs 4b92a <_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; 4b8b6: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4b8ba: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4b8bc: 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; 4b8c0: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4b8c2: 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; 4b8c6: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4b8c8: 202a 0040 movel %a2@(64),%d0 4b8cc: b0aa 0038 cmpl %a2@(56),%d0 4b8d0: 6716 beqs 4b8e8 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 4b8d2: 43e8 0038 lea %a0@(56),%a1 4b8d6: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4b8da: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4b8de: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4b8e2: 41e8 003c lea %a0@(60),%a0 4b8e6: 2888 movel %a0,%a4@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4b8e8: 4a02 tstb %d2 4b8ea: 6626 bnes 4b912 <_Thread_queue_Extract_priority_helper+0x9a> <== ALWAYS TAKEN _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b8ec: 7002 moveq #2,%d0 4b8ee: b0aa 0050 cmpl %a2@(80),%d0 4b8f2: 6742 beqs 4b936 <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4b8f4: 46c1 movew %d1,%sr 4b8f6: 2d4a 0008 movel %a2,%fp@(8) 4b8fa: 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 } 4b900: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b906: 2d49 000c movel %a1,%fp@(12) 4b90a: 4e5e unlk %fp 4b90c: 4ef9 0004 7974 jmp 47974 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4b912: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b914: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b91a: 4e5e unlk %fp 4b91c: 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 ); 4b91e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b920: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b926: 4e5e unlk %fp 4b928: 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; 4b92a: 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; 4b92e: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4b930: 4a02 tstb %d2 4b932: 67b8 beqs 4b8ec <_Thread_queue_Extract_priority_helper+0x74> 4b934: 60dc bras 4b912 <_Thread_queue_Extract_priority_helper+0x9a> <== ALWAYS TAKEN 4b936: 7003 moveq #3,%d0 4b938: 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 ); 4b93c: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4b93e: 486a 0048 pea %a2@(72) 4b942: 4eb9 0004 8f60 jsr 48f60 <_Watchdog_Remove> 4b948: 588f addql #4,%sp 4b94a: 227c 1003 fff8 moveal #268697592,%a1 4b950: 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 } 4b954: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b95a: 2d49 000c movel %a1,%fp@(12) 4b95e: 4e5e unlk %fp 4b960: 4ef9 0004 7974 jmp 47974 <_Thread_Clear_state> ... 00048488 <_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 ) { 48488: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4848a: 4e56 0000 linkw %fp,#0 4848e: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 48492: 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 ) { 48498: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 4849c: 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; 484a2: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 484a6: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 484aa: b280 cmpl %d0,%d1 484ac: 6712 beqs 484c0 <_Thread_queue_Initialize+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484ae: 2008 movel %a0,%d0 484b0: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484b2: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484b6: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 484b8: 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 ); } } 484bc: 4e5e unlk %fp 484be: 4e75 rts * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 484c0: 2008 movel %a0,%d0 484c2: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484c8: 2208 movel %a0,%d1 484ca: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 484cc: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484d0: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484d2: 2148 0008 movel %a0,%a0@(8) 484d6: 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 ; 484da: b088 cmpl %a0,%d0 484dc: 67de beqs 484bc <_Thread_queue_Initialize+0x34> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484de: 2208 movel %a0,%d1 484e0: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 484e2: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484e6: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484e8: 2148 0008 movel %a0,%a0@(8) 484ec: 41e8 000c lea %a0@(12),%a0 484f0: b088 cmpl %a0,%d0 484f2: 66d4 bnes 484c8 <_Thread_queue_Initialize+0x40> 484f4: 60c6 bras 484bc <_Thread_queue_Initialize+0x34> <== ALWAYS TAKEN ... 000484f8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 484f8: 4e56 fff0 linkw %fp,#-16 484fc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48500: 246e 0008 moveal %fp@(8),%a2 48504: 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 ) 48508: 4a8a tstl %a2 4850a: 6708 beqs 48514 <_Thread_queue_Requeue+0x1c> <== ALWAYS 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 ) { 4850c: 7001 moveq #1,%d0 4850e: b0aa 0034 cmpl %a2@(52),%d0 48512: 670a beqs 4851e <_Thread_queue_Requeue+0x26> <== NEVER TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 48514: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4851a: 4e5e unlk %fp <== NOT EXECUTED 4851c: 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 ); 4851e: 303c 0700 movew #1792,%d0 48522: 40c2 movew %sr,%d2 48524: 8082 orl %d2,%d0 48526: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 48528: 202b 0010 movel %a3@(16),%d0 4852c: 0280 0003 bee0 andil #245472,%d0 48532: 660c bnes 48540 <_Thread_queue_Requeue+0x48> <== NEVER 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 ); 48534: 46c2 movew %d2,%sr <== NOT EXECUTED } } 48536: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4853c: 4e5e unlk %fp 4853e: 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 ); 48540: 4878 0001 pea 1 48544: 7001 moveq #1,%d0 48546: 2f0b movel %a3,%sp@- 48548: 2540 0030 movel %d0,%a2@(48) 4854c: 2f0a movel %a2,%sp@- 4854e: 4eb9 0004 b878 jsr 4b878 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48554: 486e fffc pea %fp@(-4) 48558: 2f0b movel %a3,%sp@- 4855a: 2f0a movel %a2,%sp@- 4855c: 4eb9 0004 82a8 jsr 482a8 <_Thread_queue_Enqueue_priority> 48562: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 48566: 46c2 movew %d2,%sr 48568: 60cc bras 48536 <_Thread_queue_Requeue+0x3e> <== ALWAYS TAKEN ... 0004856c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 4856c: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48570: 486e fffc pea %fp@(-4) 48574: 2f2e 0008 movel %fp@(8),%sp@- 48578: 4eb9 0004 7d70 jsr 47d70 <_Thread_Get> switch ( location ) { 4857e: 508f addql #8,%sp 48580: 4aae fffc tstl %fp@(-4) 48584: 6618 bnes 4859e <_Thread_queue_Timeout+0x32> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 48586: 2f00 movel %d0,%sp@- 48588: 4eb9 0004 b968 jsr 4b968 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4858e: 588f addql #4,%sp 48590: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 48596: 5380 subql #1,%d0 48598: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 4859e: 4e5e unlk %fp 485a0: 4e75 rts ... 00058ce8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 58ce8: 4e56 ffb0 linkw %fp,#-80 58cec: 41ee ffec lea %fp@(-20),%a0 58cf0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 58cf4: 246e 0008 moveal %fp@(8),%a2 58cf8: 2c0e movel %fp,%d6 58cfa: 260e movel %fp,%d3 58cfc: 5186 subql #8,%d6 58cfe: 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 ); 58d04: 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 ); 58d06: 2a0a movel %a2,%d5 58d08: 4bf9 0005 cd94 lea 5cd94 <_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 ); 58d0e: 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 ); 58d14: 0685 0000 0068 addil #104,%d5 58d1a: 47f9 0005 9754 lea 59754 <_Chain_Get>,%a3 58d20: 49f9 0005 ce24 lea 5ce24 <_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 ); 58d26: 283c 0000 0700 movel #1792,%d4 58d2c: 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 ); 58d30: 41ea 0008 lea %a2@(8),%a0 58d34: 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 ); 58d38: 41ea 0040 lea %a2@(64),%a0 58d3c: 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); 58d40: 41ee fff4 lea %fp@(-12),%a0 58d44: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58d48: 41ee ffec lea %fp@(-20),%a0 58d4c: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 58d50: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58d54: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 58d58: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 58d5c: 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; 58d60: 41ee fff4 lea %fp@(-12),%a0 58d64: 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; 58d68: 2039 0007 ca30 movel 7ca30 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 58d6e: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 58d72: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d76: 9081 subl %d1,%d0 58d78: 2f03 movel %d3,%sp@- 58d7a: 2f00 movel %d0,%sp@- 58d7c: 2f02 movel %d2,%sp@- 58d7e: 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(); 58d80: 2039 0007 c982 movel 7c982 <_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 ) { 58d86: 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; 58d8a: 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 ) { 58d8e: b280 cmpl %d0,%d1 58d90: 6500 0086 bcsw 58e18 <_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 ) { 58d94: b280 cmpl %d0,%d1 58d96: 6200 00a4 bhiw 58e3c <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 58d9a: 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 ); 58d9e: 202a 0078 movel %a2@(120),%d0 58da2: 2f00 movel %d0,%sp@- 58da4: 4e93 jsr %a3@ if ( timer == NULL ) { 58da6: 588f addql #4,%sp 58da8: 4a80 tstl %d0 58daa: 672e beqs 58dda <_Timer_server_Body+0xf2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58dac: 2040 moveal %d0,%a0 58dae: 7e01 moveq #1,%d7 58db0: 2228 0038 movel %a0@(56),%d1 58db4: be81 cmpl %d1,%d7 58db6: 6700 00a8 beqw 58e60 <_Timer_server_Body+0x178> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 58dba: 7e03 moveq #3,%d7 58dbc: be81 cmpl %d1,%d7 58dbe: 66de bnes 58d9e <_Timer_server_Body+0xb6> <== ALWAYS TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58dc0: 2040 moveal %d0,%a0 58dc2: 4868 0010 pea %a0@(16) 58dc6: 2f05 movel %d5,%sp@- 58dc8: 4e94 jsr %a4@ } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58dca: 202a 0078 movel %a2@(120),%d0 ) { 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 ); 58dce: 508f addql #8,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58dd0: 2f00 movel %d0,%sp@- 58dd2: 4e93 jsr %a3@ if ( timer == NULL ) { 58dd4: 588f addql #4,%sp 58dd6: 4a80 tstl %d0 58dd8: 66d2 bnes 58dac <_Timer_server_Body+0xc4> <== ALWAYS TAKEN * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 58dda: 2004 movel %d4,%d0 58ddc: 40c1 movew %sr,%d1 58dde: 8081 orl %d1,%d0 58de0: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 58de2: bcae fff4 cmpl %fp@(-12),%d6 58de6: 6700 0086 beqw 58e6e <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 58dea: 46c1 movew %d1,%sr static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 58dec: 2039 0007 ca30 movel 7ca30 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 58df2: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 58df6: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58dfa: 9081 subl %d1,%d0 58dfc: 2f03 movel %d3,%sp@- 58dfe: 2f00 movel %d0,%sp@- 58e00: 2f02 movel %d2,%sp@- 58e02: 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(); 58e04: 2039 0007 c982 movel 7c982 <_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 ) { 58e0a: 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; 58e0e: 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 ) { 58e12: b280 cmpl %d0,%d1 58e14: 6400 ff7e bccw 58d94 <_Timer_server_Body+0xac> <== NEVER TAKEN /* * 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 ); 58e18: 2f03 movel %d3,%sp@- 58e1a: 2e00 movel %d0,%d7 58e1c: 9e81 subl %d1,%d7 58e1e: 2f07 movel %d7,%sp@- 58e20: 2d40 ffdc movel %d0,%fp@(-36) 58e24: 2f05 movel %d5,%sp@- 58e26: 4eb9 0005 cd94 jsr 5cd94 <_Watchdog_Adjust_to_chain> 58e2c: 202e ffdc movel %fp@(-36),%d0 58e30: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 58e34: 2540 0074 movel %d0,%a2@(116) 58e38: 6000 ff64 braw 58d9e <_Timer_server_Body+0xb6> <== ALWAYS TAKEN /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 58e3c: 9280 subl %d0,%d1 58e3e: 2f01 movel %d1,%sp@- 58e40: 4878 0001 pea 1 58e44: 2d40 ffdc movel %d0,%fp@(-36) 58e48: 2f05 movel %d5,%sp@- 58e4a: 4eb9 0005 cd00 jsr 5cd00 <_Watchdog_Adjust> 58e50: 202e ffdc movel %fp@(-36),%d0 58e54: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 58e58: 2540 0074 movel %d0,%a2@(116) 58e5c: 6000 ff40 braw 58d9e <_Timer_server_Body+0xb6> <== ALWAYS TAKEN Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 58e60: 4868 0010 pea %a0@(16) 58e64: 2f02 movel %d2,%sp@- 58e66: 4e94 jsr %a4@ 58e68: 508f addql #8,%sp 58e6a: 6000 ff32 braw 58d9e <_Timer_server_Body+0xb6> <== ALWAYS TAKEN */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 58e6e: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 58e72: 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 ) ) { 58e74: 202e ffd8 movel %fp@(-40),%d0 58e78: b0ae ffe8 cmpl %fp@(-24),%d0 58e7c: 6752 beqs 58ed0 <_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 ); 58e7e: 2204 movel %d4,%d1 58e80: 40c0 movew %sr,%d0 58e82: 8280 orl %d0,%d1 58e84: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58e86: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 58e8a: b1ee ffd8 cmpal %fp@(-40),%a0 58e8e: 6732 beqs 58ec2 <_Timer_server_Body+0x1da> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 58e90: 2250 moveal %a0@,%a1 the_chain->first = new_first; 58e92: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 58e96: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 58e9a: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 58e9e: 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 ); 58ea0: 2f28 0024 movel %a0@(36),%sp@- 58ea4: 2f28 0020 movel %a0@(32),%sp@- 58ea8: 2068 001c moveal %a0@(28),%a0 58eac: 4e90 jsr %a0@ } 58eae: 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 ); 58eb0: 2204 movel %d4,%d1 58eb2: 40c0 movew %sr,%d0 58eb4: 8280 orl %d0,%d1 58eb6: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58eb8: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 58ebc: b1ee ffd8 cmpal %fp@(-40),%a0 58ec0: 66ce bnes 58e90 <_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 ); 58ec2: 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; 58ec4: 41ee fff4 lea %fp@(-12),%a0 58ec8: 2548 0078 movel %a0,%a2@(120) 58ecc: 6000 fe9a braw 58d68 <_Timer_server_Body+0x80> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 58ed0: 4207 clrb %d7 58ed2: 1547 007c moveb %d7,%a2@(124) 58ed6: 2039 0007 c8f0 movel 7c8f0 <_Thread_Dispatch_disable_level>,%d0 58edc: 5280 addql #1,%d0 58ede: 23c0 0007 c8f0 movel %d0,7c8f0 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 58ee4: 4878 0008 pea 8 58ee8: 2f12 movel %a2@,%sp@- 58eea: 4eb9 0005 c450 jsr 5c450 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 58ef0: 2f0a movel %a2,%sp@- 58ef2: 4eba fd1c jsr %pc@(58c10 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 58ef6: 2f0a movel %a2,%sp@- 58ef8: 4eba fd80 jsr %pc@(58c7a <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 58efc: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> ts->active = true; 58f02: 7001 moveq #1,%d0 58f04: 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 ); 58f08: 2f2e ffe0 movel %fp@(-32),%sp@- 58f0c: 4eb9 0005 cf6c jsr 5cf6c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 58f12: 2f2e ffe4 movel %fp@(-28),%sp@- 58f16: 4eb9 0005 cf6c jsr 5cf6c <_Watchdog_Remove> 58f1c: 4fef 0018 lea %sp@(24),%sp 58f20: 6000 fe3e braw 58d60 <_Timer_server_Body+0x78> <== ALWAYS TAKEN 00058f24 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 58f24: 4e56 fff0 linkw %fp,#-16 58f28: 206e 000c moveal %fp@(12),%a0 58f2c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 58f30: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 58f34: 202a 0078 movel %a2@(120),%d0 58f38: 671a beqs 58f54 <_Timer_server_Schedule_operation_method+0x30> * 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 ); 58f3a: 202a 0078 movel %a2@(120),%d0 58f3e: 2d48 000c movel %a0,%fp@(12) } } 58f42: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 * 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 ); 58f48: 2d40 0008 movel %d0,%fp@(8) } } 58f4c: 4e5e unlk %fp * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 58f4e: 4ef9 0005 971c jmp 5971c <_Chain_Append> 58f54: 2039 0007 c8f0 movel 7c8f0 <_Thread_Dispatch_disable_level>,%d0 58f5a: 5280 addql #1,%d0 58f5c: 23c0 0007 c8f0 movel %d0,7c8f0 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58f62: 2028 0038 movel %a0@(56),%d0 58f66: 7201 moveq #1,%d1 58f68: b280 cmpl %d0,%d1 58f6a: 6700 0088 beqw 58ff4 <_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 ) { 58f6e: 7203 moveq #3,%d1 58f70: b280 cmpl %d0,%d1 58f72: 670e beqs 58f82 <_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 ); } } 58f74: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 58f7a: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 58f7c: 4ef9 0005 ba08 jmp 5ba08 <_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 ); 58f82: 203c 0000 0700 movel #1792,%d0 58f88: 40c2 movew %sr,%d2 58f8a: 8082 orl %d2,%d0 58f8c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 58f8e: 260a movel %a2,%d3 58f90: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58f96: 2039 0007 c982 movel 7c982 <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 58f9c: 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)); 58fa0: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 58fa4: b689 cmpl %a1,%d3 58fa6: 671a beqs 58fc2 <_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; 58fa8: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 58fac: b280 cmpl %d0,%d1 58fae: 6400 00b8 bccw 59068 <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 58fb2: 2800 movel %d0,%d4 58fb4: 9881 subl %d1,%d4 if (delta_interval > delta) { 58fb6: b883 cmpl %d3,%d4 58fb8: 6500 00ba bcsw 59074 <_Timer_server_Schedule_operation_method+0x150> <== NEVER TAKEN 58fbc: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 58fbe: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 58fc2: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 58fc6: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58fc8: 4868 0010 pea %a0@(16) 58fcc: 486a 0068 pea %a2@(104) 58fd0: 4eb9 0005 ce24 jsr 5ce24 <_Watchdog_Insert> if ( !ts->active ) { 58fd6: 508f addql #8,%sp 58fd8: 102a 007c moveb %a2@(124),%d0 58fdc: 6696 bnes 58f74 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 58fde: 2f0a movel %a2,%sp@- 58fe0: 4eba fc98 jsr %pc@(58c7a <_Timer_server_Reset_tod_system_watchdog>) 58fe4: 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 ); } } 58fe6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 58fec: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 58fee: 4ef9 0005 ba08 jmp 5ba08 <_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 ); 58ff4: 203c 0000 0700 movel #1792,%d0 58ffa: 40c3 movew %sr,%d3 58ffc: 8083 orl %d3,%d0 58ffe: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59000: 2039 0007 ca30 movel 7ca30 <_Watchdog_Ticks_since_boot>,%d0 59006: 240a movel %a2,%d2 59008: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 5900e: 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)); 59012: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59016: b489 cmpl %a1,%d2 59018: 6712 beqs 5902c <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5901a: 2800 movel %d0,%d4 5901c: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 5901e: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59022: b484 cmpl %d4,%d2 59024: 623a bhis 59060 <_Timer_server_Schedule_operation_method+0x13c> 59026: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 59028: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 5902c: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59030: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59032: 4868 0010 pea %a0@(16) 59036: 486a 0030 pea %a2@(48) 5903a: 4eb9 0005 ce24 jsr 5ce24 <_Watchdog_Insert> if ( !ts->active ) { 59040: 508f addql #8,%sp 59042: 102a 007c moveb %a2@(124),%d0 59046: 6600 ff2c bnew 58f74 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 5904a: 2f0a movel %a2,%sp@- 5904c: 4eba fbc2 jsr %pc@(58c10 <_Timer_server_Reset_interval_system_watchdog>) 59050: 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 ); } } 59052: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59058: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5905a: 4ef9 0005 ba08 jmp 5ba08 <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 59060: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 59062: 2342 0010 movel %d2,%a1@(16) 59066: 60c4 bras 5902c <_Timer_server_Schedule_operation_method+0x108> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 59068: d283 addl %d3,%d1 delta_interval += delta; 5906a: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 5906c: 2341 0010 movel %d1,%a1@(16) 59070: 6000 ff50 braw 58fc2 <_Timer_server_Schedule_operation_method+0x9e> <== ALWAYS TAKEN /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 59074: 9684 subl %d4,%d3 59076: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59078: 2341 0010 movel %d1,%a1@(16) 5907c: 6000 ff44 braw 58fc2 <_Timer_server_Schedule_operation_method+0x9e> <== ALWAYS TAKEN 00048ad0 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 48ad0: 4e56 0000 linkw %fp,#0 48ad4: 226e 0008 moveal %fp@(8),%a1 48ad8: 2f0a movel %a2,%sp@- 48ada: 246e 000c moveal %fp@(12),%a2 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 48ade: 206a 0004 moveal %a2@(4),%a0 48ae2: d1e9 0004 addal %a1@(4),%a0 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 48ae6: 2208 movel %a0,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 48ae8: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 48aea: d191 addl %d0,%a1@ time->tv_nsec += add->tv_nsec; 48aec: 2348 0004 movel %a0,%a1@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 48af0: b1fc 3b9a c9ff cmpal #999999999,%a0 48af6: 631a blss 48b12 <_Timespec_Add_to+0x42> 48af8: 2051 moveal %a1@,%a0 * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 48afa: 5288 addql #1,%a0 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 48afc: 0681 c465 3600 addil #-1000000000,%d1 time->tv_sec++; seconds++; 48b02: 5280 addql #1,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 48b04: 0c81 3b9a c9ff cmpil #999999999,%d1 48b0a: 62ee bhis 48afa <_Timespec_Add_to+0x2a> <== ALWAYS TAKEN 48b0c: 2288 movel %a0,%a1@ 48b0e: 2341 0004 movel %d1,%a1@(4) time->tv_sec++; seconds++; } return seconds; } 48b12: 245f moveal %sp@+,%a2 48b14: 4e5e unlk %fp 48b16: 4e75 rts 0007ae1c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 7ae1c: 4e56 0000 linkw %fp,#0 7ae20: 226e 0008 moveal %fp@(8),%a1 7ae24: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 7ae28: 2211 movel %a1@,%d1 7ae2a: 2010 movel %a0@,%d0 7ae2c: b081 cmpl %d1,%d0 7ae2e: 6d18 blts 7ae48 <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 7ae30: 6e10 bgts 7ae42 <_Timespec_Greater_than+0x26> <== ALWAYS TAKEN #include #include #include bool _Timespec_Greater_than( 7ae32: 2068 0004 moveal %a0@(4),%a0 7ae36: b1e9 0004 cmpal %a1@(4),%a0 7ae3a: 5dc0 slt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ae3c: 4e5e unlk %fp #include #include #include bool _Timespec_Greater_than( 7ae3e: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ae40: 4e75 rts 7ae42: 4e5e unlk %fp <== NOT EXECUTED ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 7ae44: 4200 clrb %d0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ae46: 4e75 rts <== NOT EXECUTED 7ae48: 4e5e unlk %fp bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 7ae4a: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ae4c: 4e75 rts ... 00048cae <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48cae: 4e56 fff0 linkw %fp,#-16 48cb2: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48cb6: 242e 0008 movel %fp@(8),%d2 48cba: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48cbe: 2479 0005 daea moveal 5daea <_User_extensions_List+0x8>,%a2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48cc4: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48cc8: b5fc 0005 dae2 cmpal #383714,%a2 48cce: 6726 beqs 48cf6 <_User_extensions_Fatal+0x48> <== ALWAYS 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 ); 48cd0: 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 ) 48cd6: 206a 0030 moveal %a2@(48),%a0 48cda: 4a88 tstl %a0 48cdc: 670c beqs 48cea <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 48cde: 2f03 movel %d3,%sp@- 48ce0: 2f04 movel %d4,%sp@- 48ce2: 2f02 movel %d2,%sp@- 48ce4: 4e90 jsr %a0@ 48ce6: 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 ) { 48cea: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48cee: b5fc 0005 dae2 cmpal #383714,%a2 48cf4: 66e0 bnes 48cd6 <_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 ); } } 48cf6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48cfc: 4e5e unlk %fp 48cfe: 4e75 rts 00048b6c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48b6c: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48b70: 203c 0005 dae6 movel #383718,%d0 48b76: 23c0 0005 dae2 movel %d0,5dae2 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48b7c: 203c 0005 dae2 movel #383714,%d0 48b82: 23c0 0005 daea movel %d0,5daea <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48b88: 203c 0005 d95c movel #383324,%d0 48b8e: 23c0 0005 d958 movel %d0,5d958 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48b94: 203c 0005 d958 movel #383320,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48b9a: 42b9 0005 dae6 clrl 5dae6 <_User_extensions_List+0x4> 48ba0: 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; 48ba4: 2439 0005 c25a movel 5c25a ,%d2 initial_extensions = Configuration.User_extension_table; 48baa: 2639 0005 c25e movel 5c25e ,%d3 48bb0: 42b9 0005 d95c clrl 5d95c <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 48bb6: 23c0 0005 d960 movel %d0,5d960 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48bbc: 4a83 tstl %d3 48bbe: 6764 beqs 48c24 <_User_extensions_Handler_initialization+0xb8> extension = (User_extensions_Control *) 48bc0: 7834 moveq #52,%d4 48bc2: 4c02 4800 mulsl %d2,%d4 48bc6: 2f04 movel %d4,%sp@- 48bc8: 4eb9 0004 907c jsr 4907c <_Workspace_Allocate_or_fatal_error> 48bce: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48bd0: 2f04 movel %d4,%sp@- 48bd2: 42a7 clrl %sp@- 48bd4: 2f00 movel %d0,%sp@- 48bd6: 4eb9 0004 e098 jsr 4e098 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48bdc: 4fef 0010 lea %sp@(16),%sp 48be0: 4a82 tstl %d2 48be2: 6740 beqs 48c24 <_User_extensions_Handler_initialization+0xb8> <== ALWAYS TAKEN 48be4: 4284 clrl %d4 48be6: 47f9 0004 baf4 lea 4baf4 <_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; 48bec: 2043 moveal %d3,%a0 48bee: 5284 addql #1,%d4 48bf0: 0683 0000 0020 addil #32,%d3 48bf6: 2558 0014 movel %a0@+,%a2@(20) 48bfa: 2558 0018 movel %a0@+,%a2@(24) 48bfe: 2558 001c movel %a0@+,%a2@(28) 48c02: 2558 0020 movel %a0@+,%a2@(32) 48c06: 2558 0024 movel %a0@+,%a2@(36) 48c0a: 2558 0028 movel %a0@+,%a2@(40) 48c0e: 2558 002c movel %a0@+,%a2@(44) 48c12: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 48c16: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 48c18: 45ea 0034 lea %a2@(52),%a2 48c1c: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48c1e: 588f addql #4,%sp 48c20: b882 cmpl %d2,%d4 48c22: 65c8 bcss 48bec <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 48c24: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48c2a: 4e5e unlk %fp 48c2c: 4e75 rts ... 00048c30 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 48c30: 4e56 0000 linkw %fp,#0 48c34: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48c36: 2479 0005 dae2 moveal 5dae2 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 48c3c: 2f02 movel %d2,%sp@- 48c3e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48c42: b5fc 0005 dae6 cmpal #383718,%a2 48c48: 6718 beqs 48c62 <_User_extensions_Thread_begin+0x32> <== ALWAYS 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 ) 48c4a: 206a 0028 moveal %a2@(40),%a0 48c4e: 4a88 tstl %a0 48c50: 6706 beqs 48c58 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 48c52: 2f02 movel %d2,%sp@- 48c54: 4e90 jsr %a0@ 48c56: 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 ) { 48c58: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48c5a: b5fc 0005 dae6 cmpal #383718,%a2 48c60: 66e8 bnes 48c4a <_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 ); } } 48c62: 242e fff8 movel %fp@(-8),%d2 48c66: 246e fffc moveal %fp@(-4),%a2 48c6a: 4e5e unlk %fp 48c6c: 4e75 rts 00048d00 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48d00: 4e56 0000 linkw %fp,#0 48d04: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d06: 2479 0005 dae2 moveal 5dae2 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48d0c: 2f02 movel %d2,%sp@- 48d0e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d12: b5fc 0005 dae6 cmpal #383718,%a2 48d18: 6722 beqs 48d3c <_User_extensions_Thread_create+0x3c> <== ALWAYS 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 ) { 48d1a: 206a 0014 moveal %a2@(20),%a0 48d1e: 4a88 tstl %a0 48d20: 6710 beqs 48d32 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 48d22: 2f02 movel %d2,%sp@- 48d24: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 48d2a: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 48d2c: 508f addql #8,%sp 48d2e: 4a00 tstb %d0 48d30: 670c beqs 48d3e <_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 ) { 48d32: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d34: b5fc 0005 dae6 cmpal #383718,%a2 48d3a: 66de bnes 48d1a <_User_extensions_Thread_create+0x1a> 48d3c: 7001 moveq #1,%d0 return false; } } return true; } 48d3e: 242e fff8 movel %fp@(-8),%d2 48d42: 246e fffc moveal %fp@(-4),%a2 48d46: 4e5e unlk %fp 48d48: 4e75 rts ... 00048d4c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48d4c: 4e56 0000 linkw %fp,#0 48d50: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d52: 2479 0005 daea moveal 5daea <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48d58: 2f02 movel %d2,%sp@- 48d5a: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d5e: b5fc 0005 dae2 cmpal #383714,%a2 48d64: 6720 beqs 48d86 <_User_extensions_Thread_delete+0x3a> <== ALWAYS 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 ) 48d66: 206a 0020 moveal %a2@(32),%a0 48d6a: 4a88 tstl %a0 48d6c: 670c beqs 48d7a <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 48d6e: 2f02 movel %d2,%sp@- 48d70: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 48d76: 4e90 jsr %a0@ 48d78: 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 ) { 48d7a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d7e: b5fc 0005 dae2 cmpal #383714,%a2 48d84: 66e0 bnes 48d66 <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 48d86: 242e fff8 movel %fp@(-8),%d2 48d8a: 246e fffc moveal %fp@(-4),%a2 48d8e: 4e5e unlk %fp 48d90: 4e75 rts ... 00048c6e <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c6e: 4e56 0000 linkw %fp,#0 48c72: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c74: 2479 0005 daea moveal 5daea <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c7a: 2f02 movel %d2,%sp@- 48c7c: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c80: b5fc 0005 dae2 cmpal #383714,%a2 48c86: 671a beqs 48ca2 <_User_extensions_Thread_exitted+0x34> <== ALWAYS 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 ) 48c88: 206a 002c moveal %a2@(44),%a0 48c8c: 4a88 tstl %a0 48c8e: 6706 beqs 48c96 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 48c90: 2f02 movel %d2,%sp@- 48c92: 4e90 jsr %a0@ 48c94: 588f addql #4,%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48c96: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c9a: b5fc 0005 dae2 cmpal #383714,%a2 48ca0: 66e6 bnes 48c88 <_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 ); } } 48ca2: 242e fff8 movel %fp@(-8),%d2 48ca6: 246e fffc moveal %fp@(-4),%a2 48caa: 4e5e unlk %fp 48cac: 4e75 rts 000499e8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 499e8: 4e56 0000 linkw %fp,#0 499ec: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 499ee: 2479 0005 ea2a moveal 5ea2a <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 499f4: 2f02 movel %d2,%sp@- 499f6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 499fa: b5fc 0005 ea2e cmpal #387630,%a2 49a00: 671e beqs 49a20 <_User_extensions_Thread_restart+0x38> <== ALWAYS 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 ) 49a02: 206a 001c moveal %a2@(28),%a0 49a06: 4a88 tstl %a0 49a08: 670c beqs 49a16 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 49a0a: 2f02 movel %d2,%sp@- 49a0c: 2f39 0005 e956 movel 5e956 <_Thread_Executing>,%sp@- 49a12: 4e90 jsr %a0@ 49a14: 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 ) { 49a16: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49a18: b5fc 0005 ea2e cmpal #387630,%a2 49a1e: 66e2 bnes 49a02 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 49a20: 242e fff8 movel %fp@(-8),%d2 49a24: 246e fffc moveal %fp@(-4),%a2 49a28: 4e5e unlk %fp 49a2a: 4e75 rts 00048d94 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 48d94: 4e56 0000 linkw %fp,#0 48d98: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48d9a: 2479 0005 dae2 moveal 5dae2 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 48da0: 2f02 movel %d2,%sp@- 48da2: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48da6: b5fc 0005 dae6 cmpal #383718,%a2 48dac: 671e beqs 48dcc <_User_extensions_Thread_start+0x38> <== ALWAYS 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 ) 48dae: 206a 0018 moveal %a2@(24),%a0 48db2: 4a88 tstl %a0 48db4: 670c beqs 48dc2 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 48db6: 2f02 movel %d2,%sp@- 48db8: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 48dbe: 4e90 jsr %a0@ 48dc0: 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 ) { 48dc2: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48dc4: b5fc 0005 dae6 cmpal #383718,%a2 48dca: 66e2 bnes 48dae <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 48dcc: 242e fff8 movel %fp@(-8),%d2 48dd0: 246e fffc moveal %fp@(-4),%a2 48dd4: 4e5e unlk %fp 48dd6: 4e75 rts 00048dd8 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 48dd8: 4e56 fff4 linkw %fp,#-12 48ddc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48de0: 262e 0008 movel %fp@(8),%d3 48de4: 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 ; 48de8: 2479 0005 d958 moveal 5d958 <_User_extensions_Switches_list>,%a2 48dee: b5fc 0005 d95c cmpal #383324,%a2 48df4: 6716 beqs 48e0c <_User_extensions_Thread_switch+0x34> <== ALWAYS 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 ); 48df6: 2f02 movel %d2,%sp@- 48df8: 2f03 movel %d3,%sp@- 48dfa: 206a 0008 moveal %a2@(8),%a0 48dfe: 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 ) { 48e00: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48e02: 508f addql #8,%sp 48e04: b5fc 0005 d95c cmpal #383324,%a2 48e0a: 66ea bnes 48df6 <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 48e0c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48e12: 4e5e unlk %fp 48e14: 4e75 rts ... 0004aaf4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4aaf4: 4e56 ffe8 linkw %fp,#-24 4aaf8: 226e 000c moveal %fp@(12),%a1 4aafc: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4ab00: 283c 0000 0700 movel #1792,%d4 4ab06: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4ab08: 266e 0008 moveal %fp@(8),%a3 4ab0c: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4ab10: 40c1 movew %sr,%d1 4ab12: 8081 orl %d1,%d0 4ab14: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4ab16: 244b moveal %a3,%a2 4ab18: 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 ) ) { 4ab1a: b5c8 cmpal %a0,%a2 4ab1c: 6748 beqs 4ab66 <_Watchdog_Adjust+0x72> switch ( direction ) { 4ab1e: 4a89 tstl %a1 4ab20: 6650 bnes 4ab72 <_Watchdog_Adjust+0x7e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4ab22: 4a82 tstl %d2 4ab24: 6740 beqs 4ab66 <_Watchdog_Adjust+0x72> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4ab26: 2628 0010 movel %a0@(16),%d3 4ab2a: 49f9 0004 ad70 lea 4ad70 <_Watchdog_Tickle>,%a4 4ab30: b682 cmpl %d2,%d3 4ab32: 622c bhis 4ab60 <_Watchdog_Adjust+0x6c> <== ALWAYS TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4ab34: 7001 moveq #1,%d0 4ab36: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4ab3a: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4ab3c: 2f0b movel %a3,%sp@- 4ab3e: 4e94 jsr %a4@ _ISR_Disable( level ); 4ab40: 2004 movel %d4,%d0 4ab42: 40c1 movew %sr,%d1 4ab44: 8081 orl %d1,%d0 4ab46: 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; 4ab48: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4ab4a: 588f addql #4,%sp 4ab4c: 2013 movel %a3@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 4ab4e: 2040 moveal %d0,%a0 4ab50: b08a cmpl %a2,%d0 4ab52: 6712 beqs 4ab66 <_Watchdog_Adjust+0x72> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4ab54: 4a82 tstl %d2 4ab56: 670e beqs 4ab66 <_Watchdog_Adjust+0x72> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4ab58: 2628 0010 movel %a0@(16),%d3 4ab5c: b483 cmpl %d3,%d2 4ab5e: 64d4 bccs 4ab34 <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4ab60: 9682 subl %d2,%d3 4ab62: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4ab66: 46c1 movew %d1,%sr } 4ab68: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4ab6e: 4e5e unlk %fp 4ab70: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4ab72: 7001 moveq #1,%d0 4ab74: b089 cmpl %a1,%d0 4ab76: 66ee bnes 4ab66 <_Watchdog_Adjust+0x72> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4ab78: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4ab7c: 46c1 movew %d1,%sr } 4ab7e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4ab84: 4e5e unlk %fp 4ab86: 4e75 rts 0005cd94 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5cd94: 4e56 ffe4 linkw %fp,#-28 5cd98: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5cd9c: 2a6e 0008 moveal %fp@(8),%a5 5cda0: 282e 000c movel %fp@(12),%d4 5cda4: 266e 0010 moveal %fp@(16),%a3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 5cda8: 675e beqs 5ce08 <_Watchdog_Adjust_to_chain+0x74> return; } _ISR_Disable( level ); 5cdaa: 263c 0000 0700 movel #1792,%d3 5cdb0: 2003 movel %d3,%d0 5cdb2: 40c1 movew %sr,%d1 5cdb4: 8081 orl %d1,%d0 5cdb6: 46c0 movew %d0,%sr 5cdb8: 284d moveal %a5,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5cdba: 240b movel %a3,%d2 5cdbc: 5882 addql #4,%d2 5cdbe: 205c moveal %a4@+,%a0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 5cdc0: b1cc cmpal %a4,%a0 5cdc2: 6742 beqs 5ce06 <_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 ) { 5cdc4: 2028 0010 movel %a0@(16),%d0 5cdc8: b880 cmpl %d0,%d4 5cdca: 654c bcss 5ce18 <_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; 5cdcc: 9880 subl %d0,%d4 first->delta_interval = 0; 5cdce: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5cdd2: 2250 moveal %a0@,%a1 previous = the_node->previous; 5cdd4: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 5cdd8: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 5cdda: 234a 0004 movel %a2,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5cdde: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 5cde0: 226b 0008 moveal %a3@(8),%a1 the_chain->last = the_node; 5cde4: 2748 0008 movel %a0,%a3@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 5cde8: 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; 5cdec: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5cdee: 2003 movel %d3,%d0 5cdf0: 46c1 movew %d1,%sr 5cdf2: 8081 orl %d1,%d0 5cdf4: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5cdf6: 2055 moveal %a5@,%a0 if ( _Chain_Is_empty( header ) ) 5cdf8: b1cc cmpal %a4,%a0 5cdfa: 6714 beqs 5ce10 <_Watchdog_Adjust_to_chain+0x7c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5cdfc: 4aa8 0010 tstl %a0@(16) 5ce00: 67d0 beqs 5cdd2 <_Watchdog_Adjust_to_chain+0x3e> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5ce02: 4a84 tstl %d4 5ce04: 66ba bnes 5cdc0 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5ce06: 46c1 movew %d1,%sr } 5ce08: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5ce0c: 4e5e unlk %fp 5ce0e: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5ce10: 204c moveal %a4,%a0 } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5ce12: 4a84 tstl %d4 5ce14: 66aa bnes 5cdc0 <_Watchdog_Adjust_to_chain+0x2c> 5ce16: 60ee bras 5ce06 <_Watchdog_Adjust_to_chain+0x72> <== ALWAYS TAKEN /* * 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; 5ce18: 9084 subl %d4,%d0 5ce1a: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5ce1e: 46c1 movew %d1,%sr 5ce20: 60e6 bras 5ce08 <_Watchdog_Adjust_to_chain+0x74> <== ALWAYS TAKEN ... 00048e18 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 48e18: 4e56 ffec linkw %fp,#-20 48e1c: 226e 000c moveal %fp@(12),%a1 48e20: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48e24: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 48e28: 2a3c 0000 0700 movel #1792,%d5 48e2e: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 48e30: 2839 0005 d9ee movel 5d9ee <_ISR_Nest_level>,%d4 _ISR_Disable( level ); 48e36: 40c3 movew %sr,%d3 48e38: 8083 orl %d3,%d0 48e3a: 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 ) { 48e3c: 4aa9 0008 tstl %a1@(8) 48e40: 6600 00c6 bnew 48f08 <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 48e44: 2039 0005 da90 movel 5da90 <_Watchdog_Sync_count>,%d0 48e4a: 5280 addql #1,%d0 48e4c: 23c0 0005 da90 movel %d0,5da90 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 48e52: 7001 moveq #1,%d0 48e54: 2340 0008 movel %d0,%a1@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 48e58: 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 ; 48e5c: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48e5e: 6764 beqs 48ec4 <_Watchdog_Insert+0xac> 48e60: 4a90 tstl %a0@ 48e62: 6760 beqs 48ec4 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48e64: 2228 0010 movel %a0@(16),%d1 48e68: b280 cmpl %d0,%d1 48e6a: 6252 bhis 48ebe <_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 ); 48e6c: 2405 movel %d5,%d2 48e6e: 46c3 movew %d3,%sr 48e70: 8483 orl %d3,%d2 48e72: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48e74: 7401 moveq #1,%d2 48e76: b4a9 0008 cmpl %a1@(8),%d2 48e7a: 666e bnes 48eea <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48e7c: 2439 0005 da0a movel 5da0a <_Watchdog_Sync_level>,%d2 48e82: b484 cmpl %d4,%d2 48e84: 6230 bhis 48eb6 <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48e86: 9081 subl %d1,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48e88: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48e8a: 4a80 tstl %d0 48e8c: 6736 beqs 48ec4 <_Watchdog_Insert+0xac> 48e8e: 4a90 tstl %a0@ 48e90: 6732 beqs 48ec4 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48e92: 2228 0010 movel %a0@(16),%d1 48e96: b081 cmpl %d1,%d0 48e98: 6524 bcss 48ebe <_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 ); 48e9a: 2405 movel %d5,%d2 48e9c: 46c3 movew %d3,%sr 48e9e: 8483 orl %d3,%d2 48ea0: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48ea2: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48ea4: 7201 moveq #1,%d1 48ea6: b2a9 0008 cmpl %a1@(8),%d1 48eaa: 663e bnes 48eea <_Watchdog_Insert+0xd2> <== ALWAYS TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48eac: 2239 0005 da0a movel 5da0a <_Watchdog_Sync_level>,%d1 48eb2: b284 cmpl %d4,%d1 48eb4: 63d2 blss 48e88 <_Watchdog_Insert+0x70> _Watchdog_Sync_level = insert_isr_nest_level; 48eb6: 23c4 0005 da0a movel %d4,5da0a <_Watchdog_Sync_level> goto restart; 48ebc: 609a bras 48e58 <_Watchdog_Insert+0x40> <== ALWAYS TAKEN if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 48ebe: 9280 subl %d0,%d1 48ec0: 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 ); 48ec4: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 48ec8: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48eca: 2450 moveal %a0@,%a2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 48ecc: 2239 0005 da94 movel 5da94 <_Watchdog_Ticks_since_boot>,%d1 after_node->next = the_node; 48ed2: 2089 movel %a1,%a0@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48ed4: 2348 0004 movel %a0,%a1@(4) 48ed8: 2341 0014 movel %d1,%a1@(20) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 48edc: 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; 48ee0: 2549 0004 movel %a1,%a2@(4) 48ee4: 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; 48ee8: 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; 48eea: 23c4 0005 da0a movel %d4,5da0a <_Watchdog_Sync_level> _Watchdog_Sync_count--; 48ef0: 2039 0005 da90 movel 5da90 <_Watchdog_Sync_count>,%d0 48ef6: 5380 subql #1,%d0 48ef8: 23c0 0005 da90 movel %d0,5da90 <_Watchdog_Sync_count> _ISR_Enable( level ); 48efe: 46c3 movew %d3,%sr } 48f00: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48f04: 4e5e unlk %fp 48f06: 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 ); 48f08: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 48f0a: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48f0e: 4e5e unlk %fp 48f10: 4e75 rts ... 00048f60 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48f60: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 48f66: 4e56 0000 linkw %fp,#0 48f6a: 206e 0008 moveal %fp@(8),%a0 48f6e: 2f0a movel %a2,%sp@- 48f70: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48f72: 40c1 movew %sr,%d1 48f74: 8081 orl %d1,%d0 48f76: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 48f78: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 48f7c: 7401 moveq #1,%d2 48f7e: b480 cmpl %d0,%d2 48f80: 6764 beqs 48fe6 <_Watchdog_Remove+0x86> 48f82: 6314 blss 48f98 <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48f84: 2279 0005 da94 moveal 5da94 <_Watchdog_Ticks_since_boot>,%a1 48f8a: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48f8e: 46c1 movew %d1,%sr return( previous_state ); } 48f90: 241f movel %sp@+,%d2 48f92: 245f moveal %sp@+,%a2 48f94: 4e5e unlk %fp 48f96: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 48f98: 143c 0003 moveb #3,%d2 48f9c: b480 cmpl %d0,%d2 48f9e: 65e4 bcss 48f84 <_Watchdog_Remove+0x24> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48fa0: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 48fa2: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 48fa6: 4a91 tstl %a1@ 48fa8: 6708 beqs 48fb2 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 48faa: 2428 0010 movel %a0@(16),%d2 48fae: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 48fb2: 2479 0005 da90 moveal 5da90 <_Watchdog_Sync_count>,%a2 48fb8: 4a8a tstl %a2 48fba: 670c beqs 48fc8 <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 48fbc: 2479 0005 d9ee moveal 5d9ee <_ISR_Nest_level>,%a2 48fc2: 23ca 0005 da0a movel %a2,5da0a <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48fc8: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 48fcc: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48fce: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fd2: 2279 0005 da94 moveal 5da94 <_Watchdog_Ticks_since_boot>,%a1 48fd8: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48fdc: 46c1 movew %d1,%sr return( previous_state ); } 48fde: 241f movel %sp@+,%d2 48fe0: 245f moveal %sp@+,%a2 48fe2: 4e5e unlk %fp 48fe4: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fe6: 2279 0005 da94 moveal 5da94 <_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; 48fec: 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; 48ff0: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48ff4: 46c1 movew %d1,%sr return( previous_state ); } 48ff6: 241f movel %sp@+,%d2 48ff8: 245f moveal %sp@+,%a2 48ffa: 4e5e unlk %fp 48ffc: 4e75 rts ... 0004a4b0 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a4b0: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4a4b6: 4e56 ffe8 linkw %fp,#-24 4a4ba: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a4be: 242e 0008 movel %fp@(8),%d2 4a4c2: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a4c6: 40c3 movew %sr,%d3 4a4c8: 8083 orl %d3,%d0 4a4ca: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4a4cc: 2f0b movel %a3,%sp@- 4a4ce: 4bf9 0004 402c lea 4402c ,%a5 4a4d4: 2f02 movel %d2,%sp@- 4a4d6: 4879 0005 d372 pea 5d372 <_Status_Object_name_errors_to_status+0x14> 4a4dc: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a4de: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4a4e0: 4fef 000c lea %sp@(12),%sp 4a4e4: b7ca cmpal %a2,%a3 4a4e6: 672c beqs 4a514 <_Watchdog_Report_chain+0x64> 4a4e8: 49f9 0004 a52c lea 4a52c <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4a4ee: 2f0a movel %a2,%sp@- 4a4f0: 42a7 clrl %sp@- 4a4f2: 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 ) 4a4f4: 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 ; 4a4f6: 508f addql #8,%sp 4a4f8: b7ca cmpal %a2,%a3 4a4fa: 66f2 bnes 4a4ee <_Watchdog_Report_chain+0x3e> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4a4fc: 2f02 movel %d2,%sp@- 4a4fe: 4879 0005 d389 pea 5d389 <_Status_Object_name_errors_to_status+0x2b> 4a504: 4e95 jsr %a5@ 4a506: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4a508: 46c3 movew %d3,%sr } 4a50a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a510: 4e5e unlk %fp 4a512: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4a514: 4879 0005 d398 pea 5d398 <_Status_Object_name_errors_to_status+0x3a> 4a51a: 4e95 jsr %a5@ 4a51c: 588f addql #4,%sp } _ISR_Enable( level ); 4a51e: 46c3 movew %d3,%sr } 4a520: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a526: 4e5e unlk %fp 4a528: 4e75 rts ... 00049000 <_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 ); 49000: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 49006: 4e56 ffe8 linkw %fp,#-24 4900a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4900e: 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 ); 49012: 40c2 movew %sr,%d2 49014: 8082 orl %d2,%d0 49016: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 49018: 264c moveal %a4,%a3 4901a: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 4901c: b7ca cmpal %a2,%a3 4901e: 673e beqs 4905e <_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) { 49020: 202a 0010 movel %a2@(16),%d0 49024: 4bf9 0004 8f60 lea 48f60 <_Watchdog_Remove>,%a5 4902a: 6708 beqs 49034 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 4902c: 5380 subql #1,%d0 4902e: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 49032: 662a bnes 4905e <_Watchdog_Tickle+0x5e> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49034: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4903a: 2f0a movel %a2,%sp@- 4903c: 4e95 jsr %a5@ _ISR_Enable( level ); 4903e: 46c2 movew %d2,%sr switch( watchdog_state ) { 49040: 7202 moveq #2,%d1 49042: 588f addql #4,%sp 49044: b280 cmpl %d0,%d1 49046: 6722 beqs 4906a <_Watchdog_Tickle+0x6a> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49048: 2003 movel %d3,%d0 4904a: 40c2 movew %sr,%d2 4904c: 8082 orl %d2,%d0 4904e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49050: 2014 movel %a4@,%d0 49052: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 49054: b08b cmpl %a3,%d0 49056: 6706 beqs 4905e <_Watchdog_Tickle+0x5e> 49058: 4aaa 0010 tstl %a2@(16) 4905c: 67dc beqs 4903a <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 4905e: 46c2 movew %d2,%sr } 49060: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49066: 4e5e unlk %fp 49068: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 4906a: 2f2a 0024 movel %a2@(36),%sp@- 4906e: 2f2a 0020 movel %a2@(32),%sp@- 49072: 206a 001c moveal %a2@(28),%a0 49076: 4e90 jsr %a0@ 49078: 508f addql #8,%sp 4907a: 60cc bras 49048 <_Watchdog_Tickle+0x48> <== ALWAYS TAKEN 000490e4 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 490e4: 4e56 0000 linkw %fp,#0 490e8: 2f03 movel %d3,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; 490ea: 2639 0005 c228 movel 5c228 ,%d3 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 490f0: 2f02 movel %d2,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 490f2: 2439 0005 c224 movel 5c224 ,%d2 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) 490f8: 4a39 0005 c24c tstb 5c24c 490fe: 6628 bnes 49128 <_Workspace_Handler_initialization+0x44> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 49100: 4878 0004 pea 4 49104: 2f03 movel %d3,%sp@- 49106: 2f02 movel %d2,%sp@- 49108: 4879 0005 d976 pea 5d976 <_Workspace_Area> 4910e: 4eb9 0004 6c10 jsr 46c10 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 49114: 4fef 0010 lea %sp@(16),%sp 49118: 4a80 tstl %d0 4911a: 671e beqs 4913a <_Workspace_Handler_initialization+0x56> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 4911c: 242e fff8 movel %fp@(-8),%d2 49120: 262e fffc movel %fp@(-4),%d3 49124: 4e5e unlk %fp 49126: 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 ); 49128: 2f03 movel %d3,%sp@- 4912a: 42a7 clrl %sp@- 4912c: 2f02 movel %d2,%sp@- 4912e: 4eb9 0004 e098 jsr 4e098 49134: 4fef 000c lea %sp@(12),%sp 49138: 60c6 bras 49100 <_Workspace_Handler_initialization+0x1c> <== ALWAYS TAKEN size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4913a: 4878 0003 pea 3 4913e: 4878 0001 pea 1 49142: 42a7 clrl %sp@- 49144: 4eb9 0004 6f7c jsr 46f7c <_Internal_error_Occurred> ... 0005a110 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 5a110: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 5a112: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a116: 4e5e unlk %fp <== NOT EXECUTED 5a118: 4e75 rts <== NOT EXECUTED ... 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 a86c jsr 5a86c <_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 63f4 jsr 463f4 42e24: 588f addql #4,%sp 42e26: 60fe bras 42e26 <_exit+0x1c> <== ALWAYS TAKEN 00079f38 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 79f38: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 79f3c: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 79f40: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 79f44: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 79f4a: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 79f4e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 79f52: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 79f54: 4ef9 0007 9d14 jmp 79d14 <== NOT EXECUTED ... 0005a0de <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 5a0de: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 5a0e0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 5a0e4: 4e5e unlk %fp <== NOT EXECUTED 5a0e6: 4e75 rts 0004a6f8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 4a6f8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 4a6fc: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4a6fe: 4ef9 0004 a694 jmp 4a694 <== NOT EXECUTED 0005a106 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 5a106: 4280 clrl %d0 <== NOT EXECUTED #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5a108: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a10c: 4e5e unlk %fp <== NOT EXECUTED 5a10e: 4e75 rts 000681a0 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 681a0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 681a4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 681a8: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 681ae: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 681b2: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 681b4: 4ef9 0006 7f84 jmp 67f84 <== NOT EXECUTED ... 00068444 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 68444: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 68448: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 6844c: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 68452: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 68456: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 68458: 4ef9 0006 8360 jmp 68360 <== NOT EXECUTED ... 0005a3c4 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5a3c4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5a3c8: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 5a3cc: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5a3d2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 5a3d6: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5a3d8: 4ef9 0005 a404 jmp 5a404 <== NOT EXECUTED ... 00096914 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 96914: 4e56 ffa0 linkw %fp,#-96 <== NOT EXECUTED 96918: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ <== NOT EXECUTED 9691c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 96920: 2f0a movel %a2,%sp@- <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 96922: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 96926: 4eb9 0004 75dc jsr 475dc <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 9692c: 588f addql #4,%sp <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 9692e: 2400 movel %d0,%d2 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 96930: 6600 0338 bnew 96c6a <_rename_r+0x356> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 96934: 762f moveq #47,%d3 <== NOT EXECUTED 96936: 1212 moveb %a2@,%d1 <== NOT EXECUTED 96938: 1001 moveb %d1,%d0 <== NOT EXECUTED 9693a: 49c0 extbl %d0 <== NOT EXECUTED 9693c: b680 cmpl %d0,%d3 <== NOT EXECUTED 9693e: 670e beqs 9694e <_rename_r+0x3a> <== NOT EXECUTED 96940: 163c 005c moveb #92,%d3 <== NOT EXECUTED 96944: b680 cmpl %d0,%d3 <== NOT EXECUTED 96946: 6706 beqs 9694e <_rename_r+0x3a> <== NOT EXECUTED 96948: 4a01 tstb %d1 <== NOT EXECUTED 9694a: 6600 01ac bnew 96af8 <_rename_r+0x1e4> <== NOT EXECUTED 9694e: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 96954: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 96958: 220e movel %fp,%d1 <== NOT EXECUTED 9695a: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 96960: 2841 moveal %d1,%a4 <== NOT EXECUTED 96962: 200e movel %fp,%d0 <== NOT EXECUTED 96964: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 9696a: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 9696e: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 96972: 26a8 0018 movel %a0@(24),%a3@ <== NOT EXECUTED 96976: 28a8 001c movel %a0@(28),%a4@ <== NOT EXECUTED 9697a: 2840 moveal %d0,%a4 <== NOT EXECUTED 9697c: 28a8 0020 movel %a0@(32),%a4@ <== NOT EXECUTED 96980: 2aa8 0024 movel %a0@(36),%a5@ <== NOT EXECUTED 96984: 22a8 0028 movel %a0@(40),%a1@ <== NOT EXECUTED 96988: 4204 clrb %d4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 9698a: 2041 moveal %d1,%a0 <== NOT EXECUTED 9698c: 2840 moveal %d0,%a4 <== NOT EXECUTED name = old + old_parent_pathlen; 9698e: d48a addl %a2,%d2 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 96990: 45f9 0008 5a18 lea 85a18 ,%a2 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 96996: 260e movel %fp,%d3 <== NOT EXECUTED 96998: 0683 ffff ffe8 addil #-24,%d3 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 9699e: 2d50 ffec movel %a0@,%fp@(-20) <== NOT EXECUTED 969a2: 2d51 fff8 movel %a1@,%fp@(-8) <== NOT EXECUTED 969a6: 2d54 fff0 movel %a4@,%fp@(-16) <== NOT EXECUTED 969aa: 2d55 fff4 movel %a5@,%fp@(-12) <== NOT EXECUTED 969ae: 2d53 ffe8 movel %a3@,%fp@(-24) <== NOT EXECUTED name = old + old_parent_pathlen; 969b2: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 969b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 969b8: 4e92 jsr %a2@ <== NOT EXECUTED 969ba: 2e80 movel %d0,%sp@ <== NOT EXECUTED 969bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 969be: 4eb9 0004 7594 jsr 47594 <== NOT EXECUTED 969c4: d480 addl %d0,%d2 <== NOT EXECUTED 969c6: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 969ca: 2f02 movel %d2,%sp@- <== NOT EXECUTED 969cc: 4e92 jsr %a2@ <== NOT EXECUTED 969ce: 4297 clrl %sp@ <== NOT EXECUTED 969d0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 969d2: 42a7 clrl %sp@- <== NOT EXECUTED 969d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 969d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 969d8: 4eb9 0004 764e jsr 4764e <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 969de: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 969e2: 2400 movel %d0,%d2 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 969e4: 6600 01ac bnew 96b92 <_rename_r+0x27e> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 969e8: 2245 moveal %d5,%a1 <== NOT EXECUTED 969ea: 742f moveq #47,%d2 <== NOT EXECUTED 969ec: 1211 moveb %a1@,%d1 <== NOT EXECUTED 969ee: 1001 moveb %d1,%d0 <== NOT EXECUTED 969f0: 49c0 extbl %d0 <== NOT EXECUTED 969f2: b480 cmpl %d0,%d2 <== NOT EXECUTED 969f4: 6700 00d6 beqw 96acc <_rename_r+0x1b8> <== NOT EXECUTED 969f8: 143c 005c moveb #92,%d2 <== NOT EXECUTED 969fc: b480 cmpl %d0,%d2 <== NOT EXECUTED 969fe: 6700 00cc beqw 96acc <_rename_r+0x1b8> <== NOT EXECUTED 96a02: 4a01 tstb %d1 <== NOT EXECUTED 96a04: 6700 00c6 beqw 96acc <_rename_r+0x1b8> <== NOT EXECUTED 96a08: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 96a0e: 45ee ffc0 lea %fp@(-64),%a2 <== NOT EXECUTED 96a12: 5888 addql #4,%a0 <== NOT EXECUTED 96a14: 4280 clrl %d0 <== NOT EXECUTED 96a16: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 96a18: 2d58 ffc4 movel %a0@+,%fp@(-60) <== NOT EXECUTED 96a1c: 2d58 ffc8 movel %a0@+,%fp@(-56) <== NOT EXECUTED 96a20: 2d58 ffcc movel %a0@+,%fp@(-52) <== NOT EXECUTED 96a24: 2d50 ffd0 movel %a0@,%fp@(-48) <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 96a28: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 96a2c: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 96a30: 4a88 tstl %a0 <== NOT EXECUTED 96a32: 6700 01e8 beqw 96c1c <_rename_r+0x308> <== NOT EXECUTED 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 ); 96a36: 486e fffc pea %fp@(-4) <== NOT EXECUTED 96a3a: 2245 moveal %d5,%a1 <== NOT EXECUTED 96a3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96a3e: 4871 0800 pea %a1@(00000000,%d0:l) <== NOT EXECUTED 96a42: 4e90 jsr %a0@ <== NOT EXECUTED if ( result != 0 ) { 96a44: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 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 ); 96a48: 2400 movel %d0,%d2 <== NOT EXECUTED if ( result != 0 ) { 96a4a: 6600 017a bnew 96bc6 <_rename_r+0x2b2> <== NOT EXECUTED /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 96a4e: 226e ffd0 moveal %fp@(-48),%a1 <== NOT EXECUTED 96a52: b3ee ffe4 cmpal %fp@(-28),%a1 <== NOT EXECUTED 96a56: 6600 00d8 bnew 96b30 <_rename_r+0x21c> <== NOT EXECUTED 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 ) { 96a5a: 226e ffcc moveal %fp@(-52),%a1 <== NOT EXECUTED 96a5e: 2069 0040 moveal %a1@(64),%a0 <== NOT EXECUTED 96a62: 4a88 tstl %a0 <== NOT EXECUTED 96a64: 6700 0240 beqw 96ca6 <_rename_r+0x392> <== NOT EXECUTED 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 ); 96a68: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 96a6c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96a6e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96a70: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96a72: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 96a74: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 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 ); 96a78: 2840 moveal %d0,%a4 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 96a7a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 96a7e: 4a88 tstl %a0 <== NOT EXECUTED 96a80: 670e beqs 96a90 <_rename_r+0x17c> <== NOT EXECUTED 96a82: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96a86: 4a88 tstl %a0 <== NOT EXECUTED 96a88: 6706 beqs 96a90 <_rename_r+0x17c> <== NOT EXECUTED 96a8a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96a8c: 4e90 jsr %a0@ <== NOT EXECUTED 96a8e: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 96a90: 4a04 tstb %d4 <== NOT EXECUTED 96a92: 6716 beqs 96aaa <_rename_r+0x196> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96a94: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96a98: 4a88 tstl %a0 <== NOT EXECUTED 96a9a: 670e beqs 96aaa <_rename_r+0x196> <== NOT EXECUTED 96a9c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96aa0: 4a88 tstl %a0 <== NOT EXECUTED 96aa2: 6706 beqs 96aaa <_rename_r+0x196> <== NOT EXECUTED 96aa4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96aa6: 4e90 jsr %a0@ <== NOT EXECUTED 96aa8: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96aaa: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96aae: 4a88 tstl %a0 <== NOT EXECUTED 96ab0: 670e beqs 96ac0 <_rename_r+0x1ac> <== NOT EXECUTED 96ab2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96ab6: 4a88 tstl %a0 <== NOT EXECUTED 96ab8: 6706 beqs 96ac0 <_rename_r+0x1ac> <== NOT EXECUTED 96aba: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96abc: 4e90 jsr %a0@ <== NOT EXECUTED 96abe: 588f addql #4,%sp <== NOT EXECUTED return result; } 96ac0: 200c movel %a4,%d0 <== NOT EXECUTED 96ac2: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 96ac8: 4e5e unlk %fp <== NOT EXECUTED 96aca: 4e75 rts <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 96acc: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 96ad2: 45ee ffc0 lea %fp@(-64),%a2 <== NOT EXECUTED 96ad6: 7001 moveq #1,%d0 <== NOT EXECUTED 96ad8: 24a8 0018 movel %a0@(24),%a2@ <== NOT EXECUTED 96adc: 2d68 001c ffc4 movel %a0@(28),%fp@(-60) <== NOT EXECUTED 96ae2: 2d68 0020 ffc8 movel %a0@(32),%fp@(-56) <== NOT EXECUTED 96ae8: 2d68 0024 ffcc movel %a0@(36),%fp@(-52) <== NOT EXECUTED 96aee: 2d68 0028 ffd0 movel %a0@(40),%fp@(-48) <== NOT EXECUTED 96af4: 6000 ff32 braw 96a28 <_rename_r+0x114> <== NOT EXECUTED */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 96af8: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 96afe: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 96b02: 5888 addql #4,%a0 <== NOT EXECUTED 96b04: 220e movel %fp,%d1 <== NOT EXECUTED 96b06: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 96b0c: 2841 moveal %d1,%a4 <== NOT EXECUTED 96b0e: 200e movel %fp,%d0 <== NOT EXECUTED 96b10: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 96b16: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 96b1a: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 96b1e: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 96b20: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 96b22: 2840 moveal %d0,%a4 <== NOT EXECUTED 96b24: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 96b26: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 96b28: 2290 movel %a0@,%a1@ <== NOT EXECUTED 96b2a: 4204 clrb %d4 <== NOT EXECUTED 96b2c: 6000 fe5c braw 9698a <_rename_r+0x76> <== NOT EXECUTED * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 96b30: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 96b34: 4a88 tstl %a0 <== NOT EXECUTED 96b36: 670e beqs 96b46 <_rename_r+0x232> <== NOT EXECUTED 96b38: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96b3c: 4a88 tstl %a0 <== NOT EXECUTED 96b3e: 6706 beqs 96b46 <_rename_r+0x232> <== NOT EXECUTED 96b40: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96b42: 4e90 jsr %a0@ <== NOT EXECUTED 96b44: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 96b46: 4a04 tstb %d4 <== NOT EXECUTED 96b48: 6716 beqs 96b60 <_rename_r+0x24c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96b4a: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96b4e: 4a88 tstl %a0 <== NOT EXECUTED 96b50: 670e beqs 96b60 <_rename_r+0x24c> <== NOT EXECUTED 96b52: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96b56: 4a88 tstl %a0 <== NOT EXECUTED 96b58: 6706 beqs 96b60 <_rename_r+0x24c> <== NOT EXECUTED 96b5a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96b5c: 4e90 jsr %a0@ <== NOT EXECUTED 96b5e: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96b60: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96b64: 4a88 tstl %a0 <== NOT EXECUTED 96b66: 670e beqs 96b76 <_rename_r+0x262> <== NOT EXECUTED 96b68: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96b6c: 4a88 tstl %a0 <== NOT EXECUTED 96b6e: 6706 beqs 96b76 <_rename_r+0x262> <== NOT EXECUTED 96b70: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96b72: 4e90 jsr %a0@ <== NOT EXECUTED 96b74: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 96b76: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 96b7c: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 96b80: 2040 moveal %d0,%a0 <== NOT EXECUTED 96b82: 7012 moveq #18,%d0 <== NOT EXECUTED 96b84: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96b86: 200c movel %a4,%d0 <== NOT EXECUTED 96b88: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 96b8e: 4e5e unlk %fp <== NOT EXECUTED 96b90: 4e75 rts <== NOT EXECUTED 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 ) 96b92: 4a04 tstb %d4 <== NOT EXECUTED 96b94: 6716 beqs 96bac <_rename_r+0x298> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96b96: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96b9a: 4a88 tstl %a0 <== NOT EXECUTED 96b9c: 670e beqs 96bac <_rename_r+0x298> <== NOT EXECUTED 96b9e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96ba2: 4a88 tstl %a0 <== NOT EXECUTED 96ba4: 6706 beqs 96bac <_rename_r+0x298> <== NOT EXECUTED 96ba6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96ba8: 4e90 jsr %a0@ <== NOT EXECUTED 96baa: 588f addql #4,%sp <== NOT EXECUTED if ( result != 0 ) { 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( result ); 96bac: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 96bb2: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 96bb6: 2040 moveal %d0,%a0 <== NOT EXECUTED 96bb8: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96bba: 200c movel %a4,%d0 <== NOT EXECUTED 96bbc: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 96bc2: 4e5e unlk %fp <== NOT EXECUTED 96bc4: 4e75 rts <== NOT EXECUTED 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 ); 96bc6: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 96bca: 4a88 tstl %a0 <== NOT EXECUTED 96bcc: 670e beqs 96bdc <_rename_r+0x2c8> <== NOT EXECUTED 96bce: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96bd2: 4a88 tstl %a0 <== NOT EXECUTED 96bd4: 6706 beqs 96bdc <_rename_r+0x2c8> <== NOT EXECUTED 96bd6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96bd8: 4e90 jsr %a0@ <== NOT EXECUTED 96bda: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 96bdc: 4a04 tstb %d4 <== NOT EXECUTED 96bde: 6716 beqs 96bf6 <_rename_r+0x2e2> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96be0: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96be4: 4a88 tstl %a0 <== NOT EXECUTED 96be6: 670e beqs 96bf6 <_rename_r+0x2e2> <== NOT EXECUTED 96be8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96bec: 4a88 tstl %a0 <== NOT EXECUTED 96bee: 6706 beqs 96bf6 <_rename_r+0x2e2> <== NOT EXECUTED 96bf0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96bf2: 4e90 jsr %a0@ <== NOT EXECUTED 96bf4: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96bf6: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96bfa: 4a88 tstl %a0 <== NOT EXECUTED 96bfc: 67ae beqs 96bac <_rename_r+0x298> <== NOT EXECUTED 96bfe: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96c02: 4a88 tstl %a0 <== NOT EXECUTED 96c04: 67a6 beqs 96bac <_rename_r+0x298> <== NOT EXECUTED 96c06: 2f03 movel %d3,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 96c08: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 96c0c: 4e90 jsr %a0@ <== NOT EXECUTED 96c0e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 96c10: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 96c16: 2040 moveal %d0,%a0 <== NOT EXECUTED 96c18: 2082 movel %d2,%a0@ <== NOT EXECUTED 96c1a: 609e bras 96bba <_rename_r+0x2a6> <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) 96c1c: 4a04 tstb %d4 <== NOT EXECUTED 96c1e: 6716 beqs 96c36 <_rename_r+0x322> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96c20: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96c24: 4a88 tstl %a0 <== NOT EXECUTED 96c26: 670e beqs 96c36 <_rename_r+0x322> <== NOT EXECUTED 96c28: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96c2c: 4a88 tstl %a0 <== NOT EXECUTED 96c2e: 6706 beqs 96c36 <_rename_r+0x322> <== NOT EXECUTED 96c30: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96c32: 4e90 jsr %a0@ <== NOT EXECUTED 96c34: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96c36: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96c3a: 4a88 tstl %a0 <== NOT EXECUTED 96c3c: 670e beqs 96c4c <_rename_r+0x338> <== NOT EXECUTED 96c3e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96c42: 4a88 tstl %a0 <== NOT EXECUTED 96c44: 6706 beqs 96c4c <_rename_r+0x338> <== NOT EXECUTED 96c46: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96c48: 4e90 jsr %a0@ <== NOT EXECUTED 96c4a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 96c4c: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 96c52: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 96c56: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96c58: 200c movel %a4,%d0 <== NOT EXECUTED 96c5a: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 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 ); 96c60: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96c66: 4e5e unlk %fp <== NOT EXECUTED 96c68: 4e75 rts <== NOT EXECUTED 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, 96c6a: 42a7 clrl %sp@- <== NOT EXECUTED 96c6c: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 96c70: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96c72: 4878 0002 pea 2 <== NOT EXECUTED 96c76: 2f00 movel %d0,%sp@- <== NOT EXECUTED 96c78: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96c7a: 4eb9 0004 7758 jsr 47758 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 96c80: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 96c84: 4a80 tstl %d0 <== NOT EXECUTED 96c86: 667a bnes 96d02 <_rename_r+0x3ee> <== NOT EXECUTED 96c88: 220e movel %fp,%d1 <== NOT EXECUTED 96c8a: 200e movel %fp,%d0 <== NOT EXECUTED 96c8c: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 96c92: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 96c98: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 96c9c: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 96ca0: 7801 moveq #1,%d4 <== NOT EXECUTED 96ca2: 6000 fce6 braw 9698a <_rename_r+0x76> <== NOT EXECUTED 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 ); 96ca6: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 96caa: 4a88 tstl %a0 <== NOT EXECUTED 96cac: 6706 beqs 96cb4 <_rename_r+0x3a0> <== NOT EXECUTED 96cae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96cb0: 4e90 jsr %a0@ <== NOT EXECUTED 96cb2: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 96cb4: 4a04 tstb %d4 <== NOT EXECUTED 96cb6: 6716 beqs 96cce <_rename_r+0x3ba> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96cb8: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96cbc: 4a88 tstl %a0 <== NOT EXECUTED 96cbe: 670e beqs 96cce <_rename_r+0x3ba> <== NOT EXECUTED 96cc0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96cc4: 4a88 tstl %a0 <== NOT EXECUTED 96cc6: 6706 beqs 96cce <_rename_r+0x3ba> <== NOT EXECUTED 96cc8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96cca: 4e90 jsr %a0@ <== NOT EXECUTED 96ccc: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96cce: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96cd2: 4a88 tstl %a0 <== NOT EXECUTED 96cd4: 670e beqs 96ce4 <_rename_r+0x3d0> <== NOT EXECUTED 96cd6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96cda: 4a88 tstl %a0 <== NOT EXECUTED 96cdc: 6706 beqs 96ce4 <_rename_r+0x3d0> <== NOT EXECUTED 96cde: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96ce0: 4e90 jsr %a0@ <== NOT EXECUTED 96ce2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 96ce4: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 96cea: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 96cee: 2240 moveal %d0,%a1 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96cf0: 200c movel %a4,%d0 <== NOT EXECUTED 96cf2: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 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 ); 96cf8: 22bc 0000 0086 movel #134,%a1@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96cfe: 4e5e unlk %fp <== NOT EXECUTED 96d00: 4e75 rts <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 96d02: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96d06: 200c movel %a4,%d0 <== NOT EXECUTED 96d08: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 96d0e: 4e5e unlk %fp <== NOT EXECUTED 96d10: 4e75 rts <== NOT EXECUTED ... 00049022 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 49022: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49026: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 4902a: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 49030: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 49034: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 49036: 4ef9 0004 8f3c jmp 48f3c <== NOT EXECUTED 0004d7ac <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4d7ac: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4d7b0: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4d7b6: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4d7b8: 4ef9 0004 d544 jmp 4d544 <== NOT EXECUTED ... 00066da8 : int access( const char *path, int amode ) { 66da8: 4e56 ffb8 linkw %fp,#-72 66dac: 2f02 movel %d2,%sp@- struct stat statbuf; if ( stat(path, &statbuf) ) 66dae: 486e ffba pea %fp@(-70) 66db2: 2f2e 0008 movel %fp@(8),%sp@- int access( const char *path, int amode ) { 66db6: 242e 000c movel %fp@(12),%d2 struct stat statbuf; if ( stat(path, &statbuf) ) 66dba: 4eb9 0004 8f3c jsr 48f3c 66dc0: 508f addql #8,%sp 66dc2: 4a80 tstl %d0 66dc4: 6626 bnes 66dec return -1; if ( amode & R_OK ) { 66dc6: 44c2 movew %d2,%ccr 66dc8: 6716 beqs 66de0 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 66dca: 0802 0001 btst #1,%d2 66dce: 6626 bnes 66df6 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 66dd0: 0802 0000 btst #0,%d2 66dd4: 6632 bnes 66e08 if ( !( statbuf.st_mode & S_IEXEC ) ) 66dd6: 4280 clrl %d0 return -1; } return 0; } 66dd8: 242e ffb4 movel %fp@(-76),%d2 66ddc: 4e5e unlk %fp 66dde: 4e75 rts if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 66de0: 202e ffc6 movel %fp@(-58),%d0 66de4: 0280 0000 0100 andil #256,%d0 66dea: 66de bnes 66dca if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 66dec: 242e ffb4 movel %fp@(-76),%d2 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 66df0: 70ff moveq #-1,%d0 return -1; } return 0; } 66df2: 4e5e unlk %fp 66df4: 4e75 rts if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 66df6: 202e ffc6 movel %fp@(-58),%d0 66dfa: 0280 0000 0080 andil #128,%d0 66e00: 67ea beqs 66dec return -1; } if ( amode & X_OK ) { 66e02: 0802 0000 btst #0,%d2 66e06: 67ce beqs 66dd6 <== ALWAYS TAKEN if ( !( statbuf.st_mode & S_IEXEC ) ) 66e08: 7040 moveq #64,%d0 66e0a: c0ae ffc6 andl %fp@(-58),%d0 66e0e: 67dc beqs 66dec 66e10: 4280 clrl %d0 66e12: 60c4 bras 66dd8 <== ALWAYS TAKEN 0004a430 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a430: 4e56 0000 linkw %fp,#0 length = nelem * elsize; 4a434: 41ee 0008 lea %fp@(8),%a0 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a438: 52b9 0005 d818 addql #1,5d818 4a43e: 2f03 movel %d3,%sp@- length = nelem * elsize; 4a440: 262e 000c movel %fp@(12),%d3 4a444: 4c10 3800 mulsl %a0@,%d3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a448: 2f02 movel %d2,%sp@- length = nelem * elsize; cptr = malloc( length ); 4a44a: 2f03 movel %d3,%sp@- 4a44c: 4eb9 0004 aa8c jsr 4aa8c if ( cptr ) 4a452: 588f addql #4,%sp size_t length; MSBUMP(calloc_calls, 1); length = nelem * elsize; cptr = malloc( length ); 4a454: 2400 movel %d0,%d2 if ( cptr ) 4a456: 6710 beqs 4a468 <== ALWAYS TAKEN memset( cptr, '\0', length ); 4a458: 2f03 movel %d3,%sp@- 4a45a: 42a7 clrl %sp@- 4a45c: 2f00 movel %d0,%sp@- 4a45e: 4eb9 0004 e098 jsr 4e098 4a464: 4fef 000c lea %sp@(12),%sp MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ return cptr; } 4a468: 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 */ 4a46a: 53b9 0005 d808 subql #1,5d808 return cptr; } 4a470: 242e fff8 movel %fp@(-8),%d2 4a474: 262e fffc movel %fp@(-4),%d3 4a478: 4e5e unlk %fp 4a47a: 4e75 rts 00066fec : #include int chdir( const char *pathname ) { 66fec: 4e56 ffec linkw %fp,#-20 66ff0: 2f0a movel %a2,%sp@- /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 66ff2: 45ee ffec lea %fp@(-20),%a2 #include int chdir( const char *pathname ) { 66ff6: 2f02 movel %d2,%sp@- 66ff8: 242e 0008 movel %fp@(8),%d2 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 66ffc: 2f02 movel %d2,%sp@- 66ffe: 4eb9 0008 5a18 jsr 85a18 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 67004: 7201 moveq #1,%d1 67006: 2e81 movel %d1,%sp@ 67008: 2f0a movel %a2,%sp@- 6700a: 4878 0001 pea 1 6700e: 2f00 movel %d0,%sp@- 67010: 2f02 movel %d2,%sp@- 67012: 4eb9 0004 7758 jsr 47758 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 67018: 4fef 0014 lea %sp@(20),%sp 6701c: 4a80 tstl %d0 6701e: 6660 bnes 67080 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 67020: 226e fff8 moveal %fp@(-8),%a1 67024: 2069 0010 moveal %a1@(16),%a0 67028: 4a88 tstl %a0 6702a: 6700 0092 beqw 670be <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 6702e: 2f0a movel %a2,%sp@- 67030: 4e90 jsr %a0@ 67032: 588f addql #4,%sp 67034: 7201 moveq #1,%d1 67036: b280 cmpl %d0,%d1 67038: 6654 bnes 6708e rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 6703a: 2079 000a 07dc moveal a07dc ,%a0 67040: 2268 0010 moveal %a0@(16),%a1 67044: 4a89 tstl %a1 67046: 6716 beqs 6705e <== ALWAYS TAKEN 67048: 2269 001c moveal %a1@(28),%a1 6704c: 4a89 tstl %a1 6704e: 670e beqs 6705e <== ALWAYS TAKEN 67050: 4868 0004 pea %a0@(4) 67054: 4e91 jsr %a1@ 67056: 2079 000a 07dc moveal a07dc ,%a0 6705c: 588f addql #4,%sp rtems_filesystem_current = loc; 6705e: 5888 addql #4,%a0 67060: 4280 clrl %d0 67062: 20d2 movel %a2@,%a0@+ 67064: 20ee fff0 movel %fp@(-16),%a0@+ 67068: 20ee fff4 movel %fp@(-12),%a0@+ 6706c: 20ee fff8 movel %fp@(-8),%a0@+ return 0; } 67070: 242e ffe4 movel %fp@(-28),%d2 rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 67074: 20ae fffc movel %fp@(-4),%a0@ return 0; } 67078: 246e ffe8 moveal %fp@(-24),%a2 6707c: 4e5e unlk %fp 6707e: 4e75 rts 67080: 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 ) 67084: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 67086: 246e ffe8 moveal %fp@(-24),%a2 6708a: 4e5e unlk %fp 6708c: 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 ); 6708e: 206e fff8 moveal %fp@(-8),%a0 67092: 4a88 tstl %a0 67094: 670e beqs 670a4 <== ALWAYS TAKEN 67096: 2068 001c moveal %a0@(28),%a0 6709a: 4a88 tstl %a0 6709c: 6706 beqs 670a4 <== ALWAYS TAKEN 6709e: 2f0a movel %a2,%sp@- 670a0: 4e90 jsr %a0@ 670a2: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 670a4: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 670aa: 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 ); 670ae: 2040 moveal %d0,%a0 670b0: 7214 moveq #20,%d1 670b2: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 670b4: 246e ffe8 moveal %fp@(-24),%a2 670b8: 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 ); 670ba: 2081 movel %d1,%a0@ rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 670bc: 4e75 rts /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 670be: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 670c2: 4a88 tstl %a0 <== NOT EXECUTED 670c4: 6706 beqs 670cc <== NOT EXECUTED 670c6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 670c8: 4e90 jsr %a0@ <== NOT EXECUTED 670ca: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 670cc: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 670d2: 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 ); 670d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 670d8: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 670da: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 670de: 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 ); 670e0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 670e6: 4e75 rts 000471c4 : int chmod( const char *path, mode_t mode ) { 471c4: 4e56 ffec linkw %fp,#-20 471c8: 2f03 movel %d3,%sp@- 471ca: 262e 0008 movel %fp@(8),%d3 471ce: 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 ); 471d0: 240e movel %fp,%d2 471d2: 0682 ffff ffec addil #-20,%d2 471d8: 2f03 movel %d3,%sp@- 471da: 4eb9 0008 5a18 jsr 85a18 471e0: 7201 moveq #1,%d1 471e2: 2e81 movel %d1,%sp@ 471e4: 2f02 movel %d2,%sp@- 471e6: 42a7 clrl %sp@- 471e8: 2f00 movel %d0,%sp@- 471ea: 2f03 movel %d3,%sp@- 471ec: 4eb9 0004 7758 jsr 47758 if ( status != 0 ) 471f2: 4fef 0014 lea %sp@(20),%sp 471f6: 4a80 tstl %d0 471f8: 6640 bnes 4723a return -1; if ( !loc.handlers ){ 471fa: 206e fff4 moveal %fp@(-12),%a0 471fe: 4a88 tstl %a0 47200: 677c beqs 4727e <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 47202: 2068 001c moveal %a0@(28),%a0 47206: 4a88 tstl %a0 47208: 6740 beqs 4724a <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4720a: 2f2e 000c movel %fp@(12),%sp@- 4720e: 2f02 movel %d2,%sp@- 47210: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 47212: 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 ); 47216: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 47218: 508f addql #8,%sp 4721a: 4a88 tstl %a0 4721c: 670e beqs 4722c <== ALWAYS TAKEN 4721e: 2068 001c moveal %a0@(28),%a0 47222: 4a88 tstl %a0 47224: 6706 beqs 4722c <== ALWAYS TAKEN 47226: 2f02 movel %d2,%sp@- 47228: 4e90 jsr %a0@ 4722a: 588f addql #4,%sp return result; } 4722c: 2003 movel %d3,%d0 4722e: 242e ffe4 movel %fp@(-28),%d2 47232: 262e ffe8 movel %fp@(-24),%d3 47236: 4e5e unlk %fp 47238: 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 ) 4723a: 76ff moveq #-1,%d3 result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 4723c: 2003 movel %d3,%d0 4723e: 242e ffe4 movel %fp@(-28),%d2 47242: 262e ffe8 movel %fp@(-24),%d3 47246: 4e5e unlk %fp 47248: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 4724a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4724e: 4a88 tstl %a0 <== NOT EXECUTED 47250: 670e beqs 47260 <== NOT EXECUTED 47252: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47256: 4a88 tstl %a0 <== NOT EXECUTED 47258: 6706 beqs 47260 <== NOT EXECUTED 4725a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4725c: 4e90 jsr %a0@ <== NOT EXECUTED 4725e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 47260: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 47266: 76ff moveq #-1,%d3 <== NOT EXECUTED 47268: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 4726a: 2003 movel %d3,%d0 <== NOT EXECUTED 4726c: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 47270: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 47274: 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 ); 47276: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 4727c: 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 ); 4727e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 47282: 4a88 tstl %a0 <== NOT EXECUTED 47284: 670e beqs 47294 <== NOT EXECUTED 47286: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4728a: 4a88 tstl %a0 <== NOT EXECUTED 4728c: 6706 beqs 47294 <== NOT EXECUTED 4728e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47290: 4e90 jsr %a0@ <== NOT EXECUTED 47292: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 47294: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 4729a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4729c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4729e: 7009 moveq #9,%d0 <== NOT EXECUTED 472a0: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 472a2: 2003 movel %d3,%d0 <== NOT EXECUTED 472a4: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 472a8: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 472ac: 4e5e unlk %fp <== NOT EXECUTED 472ae: 4e75 rts 000670e8 : int chown( const char *path, uid_t owner, gid_t group ) { 670e8: 4e56 ffdc linkw %fp,#-36 670ec: 48d7 003c moveml %d2-%d5,%sp@ 670f0: 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 ) ) 670f4: 240e movel %fp,%d2 670f6: 0682 ffff ffec addil #-20,%d2 670fc: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 670fe: 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 ) ) 67102: 4eb9 0008 5a18 jsr 85a18 67108: 7201 moveq #1,%d1 6710a: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 6710c: 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 ) ) 67110: 2f02 movel %d2,%sp@- 67112: 42a7 clrl %sp@- 67114: 2f00 movel %d0,%sp@- 67116: 2f03 movel %d3,%sp@- 67118: 4eb9 0004 7758 jsr 47758 6711e: 4fef 0014 lea %sp@(20),%sp 67122: 4a80 tstl %d0 67124: 6640 bnes 67166 return -1; if ( !loc.ops->chown_h ) { 67126: 226e fff8 moveal %fp@(-8),%a1 6712a: 2069 0018 moveal %a1@(24),%a0 6712e: 4a88 tstl %a0 67130: 6742 beqs 67174 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 67132: 3f05 movew %d5,%sp@- 67134: 4267 clrw %sp@- 67136: 3f04 movew %d4,%sp@- 67138: 4267 clrw %sp@- 6713a: 2f02 movel %d2,%sp@- 6713c: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 6713e: 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 ); 67142: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 67144: 4fef 000c lea %sp@(12),%sp 67148: 4a88 tstl %a0 6714a: 670e beqs 6715a <== ALWAYS TAKEN 6714c: 2068 001c moveal %a0@(28),%a0 67150: 4a88 tstl %a0 67152: 6706 beqs 6715a <== ALWAYS TAKEN 67154: 2f02 movel %d2,%sp@- 67156: 4e90 jsr %a0@ 67158: 588f addql #4,%sp return result; } 6715a: 2003 movel %d3,%d0 6715c: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 67162: 4e5e unlk %fp 67164: 4e75 rts ) { rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 67166: 76ff moveq #-1,%d3 result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 67168: 2003 movel %d3,%d0 6716a: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 67170: 4e5e unlk %fp 67172: 4e75 rts if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 67174: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 67178: 4a88 tstl %a0 <== NOT EXECUTED 6717a: 6706 beqs 67182 <== NOT EXECUTED 6717c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6717e: 4e90 jsr %a0@ <== NOT EXECUTED 67180: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 67182: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 67188: 76ff moveq #-1,%d3 <== NOT EXECUTED 6718a: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 6718c: 2003 movel %d3,%d0 <== NOT EXECUTED 6718e: 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 ); 67194: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 6719a: 4e5e unlk %fp <== NOT EXECUTED 6719c: 4e75 rts <== NOT EXECUTED ... 000671a0 : #include int chroot( const char *pathname ) { 671a0: 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) { 671a4: 203c 000a 515c movel #676188,%d0 #include int chroot( const char *pathname ) { 671aa: 2f0b movel %a3,%sp@- 671ac: 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) { 671ae: b0b9 000a 07dc cmpl a07dc ,%d0 671b4: 6700 0086 beqw 6723c <== NEVER TAKEN 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); 671b8: 2f2e 0008 movel %fp@(8),%sp@- 671bc: 4eb9 0006 6fec jsr 66fec if (result) { 671c2: 588f addql #4,%sp 671c4: 4a80 tstl %d0 671c6: 6600 00a6 bnew 6726e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 671ca: 42a7 clrl %sp@- 671cc: 45ee ffec lea %fp@(-20),%a2 671d0: 2f0a movel %a2,%sp@- 671d2: 42a7 clrl %sp@- 671d4: 4878 0001 pea 1 671d8: 4879 0009 9927 pea 99927 671de: 4eb9 0004 7758 jsr 47758 671e4: 4fef 0014 lea %sp@(20),%sp 671e8: 4a80 tstl %d0 671ea: 6600 0082 bnew 6726e <== ALWAYS TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 671ee: 2079 000a 07dc moveal a07dc ,%a0 671f4: 2268 0024 moveal %a0@(36),%a1 671f8: 4a89 tstl %a1 671fa: 6716 beqs 67212 <== ALWAYS TAKEN 671fc: 2269 001c moveal %a1@(28),%a1 67200: 4a89 tstl %a1 67202: 670e beqs 67212 <== ALWAYS TAKEN 67204: 4868 0018 pea %a0@(24) 67208: 4e91 jsr %a1@ 6720a: 2079 000a 07dc moveal a07dc ,%a0 67210: 588f addql #4,%sp rtems_filesystem_root = loc; 67212: 2152 0018 movel %a2@,%a0@(24) 67216: 4280 clrl %d0 67218: 216e fff0 001c movel %fp@(-16),%a0@(28) 6721e: 216e fff4 0020 movel %fp@(-12),%a0@(32) 67224: 216e fff8 0024 movel %fp@(-8),%a0@(36) return 0; } 6722a: 246e ffe4 moveal %fp@(-28),%a2 6722e: 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; 67232: 216e fffc 0028 movel %fp@(-4),%a0@(40) return 0; } 67238: 4e5e unlk %fp 6723a: 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*/ 6723c: 4eb9 0006 86c4 jsr 686c4 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 67242: 203c 000a 515c movel #676188,%d0 67248: b0b9 000a 07dc cmpl a07dc ,%d0 6724e: 6600 ff68 bnew 671b8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 67252: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 67258: 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 ); 6725c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6725e: 70ff moveq #-1,%d0 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 67260: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 67264: 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 ); 67266: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 6726c: 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 ); 6726e: 45f9 0007 f9b4 lea 7f9b4 <__errno>,%a2 <== NOT EXECUTED 67274: 4e92 jsr %a2@ <== NOT EXECUTED 67276: 2640 moveal %d0,%a3 <== NOT EXECUTED 67278: 4e92 jsr %a2@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 6727a: 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 ); 6727e: 2040 moveal %d0,%a0 <== NOT EXECUTED 67280: 70ff moveq #-1,%d0 <== NOT EXECUTED 67282: 2690 movel %a0@,%a3@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 67284: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 67288: 4e5e unlk %fp <== NOT EXECUTED 6728a: 4e75 rts 0004a47c : #include int close( int fd ) { 4a47c: 4e56 0000 linkw %fp,#0 4a480: 202e 0008 movel %fp@(8),%d0 4a484: 2f0a movel %a2,%sp@- 4a486: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 4a488: b0b9 0005 c174 cmpl 5c174 ,%d0 4a48e: 645e bccs 4a4ee iop = rtems_libio_iop(fd); 4a490: 2479 0005 d7f8 moveal 5d7f8 ,%a2 4a496: ed88 lsll #6,%d0 4a498: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a49a: 202a 0014 movel %a2@(20),%d0 4a49e: 0280 0000 0100 andil #256,%d0 4a4a4: 6748 beqs 4a4ee rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4a4a6: 206a 003c moveal %a2@(60),%a0 4a4aa: 2068 0004 moveal %a0@(4),%a0 4a4ae: 4a88 tstl %a0 4a4b0: 6738 beqs 4a4ea <== ALWAYS TAKEN rc = (*iop->handlers->close_h)( iop ); 4a4b2: 2f0a movel %a2,%sp@- 4a4b4: 4e90 jsr %a0@ 4a4b6: 588f addql #4,%sp 4a4b8: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 4a4ba: 206a 0024 moveal %a2@(36),%a0 4a4be: 4a88 tstl %a0 4a4c0: 6710 beqs 4a4d2 <== ALWAYS TAKEN 4a4c2: 2068 001c moveal %a0@(28),%a0 4a4c6: 4a88 tstl %a0 4a4c8: 6708 beqs 4a4d2 4a4ca: 486a 0018 pea %a2@(24) 4a4ce: 4e90 jsr %a0@ 4a4d0: 588f addql #4,%sp rtems_libio_free( iop ); 4a4d2: 2f0a movel %a2,%sp@- 4a4d4: 4eb9 0004 a86a jsr 4a86a return rc; } 4a4da: 246e fffc moveal %fp@(-4),%a2 4a4de: 2002 movel %d2,%d0 rc = (*iop->handlers->close_h)( iop ); rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; 4a4e0: 588f addql #4,%sp } 4a4e2: 242e fff8 movel %fp@(-8),%d2 4a4e6: 4e5e unlk %fp 4a4e8: 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 ) 4a4ea: 4282 clrl %d2 <== NOT EXECUTED 4a4ec: 60cc bras 4a4ba <== 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); 4a4ee: 4eb9 0004 d808 jsr 4d808 <__errno> 4a4f4: 74ff moveq #-1,%d2 4a4f6: 2040 moveal %d0,%a0 4a4f8: 7009 moveq #9,%d0 4a4fa: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; } 4a4fc: 2002 movel %d2,%d0 4a4fe: 242e fff8 movel %fp@(-8),%d2 4a502: 246e fffc moveal %fp@(-4),%a2 4a506: 4e5e unlk %fp 4a508: 4e75 rts 000496a0 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 496a0: 4e56 fff4 linkw %fp,#-12 496a4: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 496a8: 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; 496ac: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 496b0: 42ae fff8 clrl %fp@(-8) args.mode = 0; 496b4: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 496b8: 2f29 000c movel %a1@(12),%sp@- 496bc: 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; 496c0: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 496c4: 4eb9 0004 a384 jsr 4a384 np->major, np->minor, (void *) &args ); if ( status ) { 496ca: 4fef 000c lea %sp@(12),%sp 496ce: 4a80 tstl %d0 496d0: 6604 bnes 496d6 <== ALWAYS TAKEN return rtems_deviceio_errno(status); } return 0; } 496d2: 4e5e unlk %fp 496d4: 4e75 rts np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 496d6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 496d8: 4eb9 0004 97b0 jsr 497b0 <== NOT EXECUTED 496de: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 496e0: 4e5e unlk %fp <== NOT EXECUTED 496e2: 4e75 rts 000496f6 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 496f6: 4e56 ffdc linkw %fp,#-36 496fa: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 496fe: 286e 0014 moveal %fp@(20),%a4 49702: 2c2e 0008 movel %fp@(8),%d6 49706: 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; 4970a: 2814 movel %a4@,%d4 if (!device_name_table) 4970c: 6700 008a beqw 49798 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 49710: 2a39 0005 98d8 movel 598d8 ,%d5 49716: 673c beqs 49754 <== 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 ); 49718: 4280 clrl %d0 4971a: 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) 4971c: 4bf9 0004 c600 lea 4c600 ,%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) 49722: 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++) { 49724: 5282 addql #1,%d2 if (!device_name_table[i].device_name) 49726: e989 lsll #4,%d1 49728: 2041 moveal %d1,%a0 4972a: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4972e: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 49732: 2453 moveal %a3@,%a2 49734: 4a8a tstl %a2 49736: 6716 beqs 4974e continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 49738: 2f03 movel %d3,%sp@- 4973a: 2f0a movel %a2,%sp@- 4973c: 2f06 movel %d6,%sp@- 4973e: 4e95 jsr %a5@ 49740: 4fef 000c lea %sp@(12),%sp 49744: 4a80 tstl %d0 49746: 6606 bnes 4974e continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 49748: 4a32 3800 tstb %a2@(00000000,%d3:l) 4974c: 671e beqs 4976c <== 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 ); for (i = 0; i < rtems_device_table_size; i++) { 4974e: 2002 movel %d2,%d0 49750: b485 cmpl %d5,%d2 49752: 65ce bcss 49722 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 49754: 4eb9 0004 b2f8 jsr 4b2f8 <__errno> 4975a: 7202 moveq #2,%d1 4975c: 2040 moveal %d0,%a0 4975e: 70ff moveq #-1,%d0 } 49760: 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 ); 49766: 2081 movel %d1,%a0@ } 49768: 4e5e unlk %fp 4976a: 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; 4976c: 2079 0005 9a50 moveal 59a50 ,%a0 49772: 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; 49778: 223c 0005 9a04 movel #367108,%d1 pathloc->ops = &devFS_ops; 4977e: 41f9 0005 99bc lea 599bc ,%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; 49784: 2941 0008 movel %d1,%a4@(8) pathloc->ops = &devFS_ops; 49788: 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]; 4978c: 288b movel %a3,%a4@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4978e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 49794: 4e5e unlk %fp 49796: 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 ); 49798: 4eb9 0004 b2f8 jsr 4b2f8 <__errno> <== NOT EXECUTED 4979e: 740e moveq #14,%d2 <== NOT EXECUTED 497a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 497a2: 70ff moveq #-1,%d0 <== NOT EXECUTED 497a4: 2082 movel %d2,%a0@ <== NOT EXECUTED return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 497a6: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 497ac: 4e5e unlk %fp <== NOT EXECUTED 497ae: 4e75 rts 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 98d8 movel 598d8 ,%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 9464 jsr 49464 <_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 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 42050: 2039 0005 98d8 movel 598d8 ,%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 bb48 jsr 4bb48 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 9a04 movel #367108,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 42074: 41f9 0005 99bc lea 599bc ,%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 b2f8 jsr 4b2f8 <__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; } 420ac: 4e75 rts <== NOT EXECUTED ... 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 6734 jsr 46734 np->major, np->minor, (void *) &args ); if ( status ) 42252: 4fef 000c lea %sp@(12),%sp 42256: 4a80 tstl %d0 42258: 6608 bnes 42262 <== ALWAYS 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 97b0 jsr 497b0 <== NOT EXECUTED 4226a: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4226c: 4e5e unlk %fp <== NOT EXECUTED 4226e: 4e75 rts 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 <== NEVER TAKEN (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 <== ALWAYS TAKEN 420e4: 0c80 0000 2000 cmpil #8192,%d0 420ea: 6600 00e2 bnew 421ce <== ALWAYS TAKEN 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 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 420fa: 2639 0005 98d8 movel 598d8 ,%d3 42100: 6700 00e4 beqw 421e6 <== ALWAYS TAKEN 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 c124 lea 4c124 ,%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 <== ALWAYS 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 <== ALWAYS TAKEN 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 c5e8 jsr 4c5e8 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 <== ALWAYS TAKEN 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 b2f8 jsr 4b2f8 <__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 <== ALWAYS TAKEN (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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN (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 b2f8 jsr 4b2f8 <__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 b2f8 jsr 4b2f8 <__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 b2f8 jsr 4b2f8 <__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 42214: 4e75 rts <== 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 6880 jsr 46880 np->major, np->minor, (void *) &args ); if ( status ) 4229e: 4fef 000c lea %sp@(12),%sp 422a2: 4a80 tstl %d0 422a4: 6604 bnes 422aa <== ALWAYS 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 97b0 jsr 497b0 <== NOT EXECUTED 422b2: 588f addql #4,%sp <== NOT EXECUTED return 0; } 422b4: 4e5e unlk %fp <== NOT EXECUTED 422b6: 4e75 rts 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 68dc jsr 468dc <== 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 97b0 jsr 497b0 <== NOT EXECUTED 42318: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4231a: 4e5e unlk %fp <== NOT EXECUTED 4231c: 4e75 rts <== 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 <== ALWAYS 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 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 ); buf->st_mode = the_dev->mode; 4233a: 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 ); 42340: 2368 0008 0016 movel %a0@(8),%a1@(22) 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 b2f8 jsr 4b2f8 <__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; } 4235c: 4e75 rts <== NOT EXECUTED ... 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 6938 jsr 46938 np->major, np->minor, (void *) &args ); if ( status ) 423a8: 4fef 000c lea %sp@(12),%sp 423ac: 4a80 tstl %d0 423ae: 6608 bnes 423b8 <== ALWAYS 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 97b0 jsr 497b0 <== NOT EXECUTED 423c0: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 423c2: 4e5e unlk %fp <== NOT EXECUTED 423c4: 4e75 rts <== NOT EXECUTED ... 0004bc6a : */ int device_close( rtems_libio_t *iop ) { 4bc6a: 4e56 fff4 linkw %fp,#-12 4bc6e: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4bc72: 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; 4bc76: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4bc7a: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4bc7e: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4bc82: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4bc86: 2f28 0050 movel %a0@(80),%sp@- 4bc8a: 2f28 004c movel %a0@(76),%sp@- 4bc8e: 4eb9 0004 cea0 jsr 4cea0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4bc94: 4fef 000c lea %sp@(12),%sp 4bc98: 4a80 tstl %d0 4bc9a: 6604 bnes 4bca0 <== ALWAYS TAKEN return rtems_deviceio_errno(status); } return 0; } 4bc9c: 4e5e unlk %fp 4bc9e: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4bca0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bca2: 4eb9 0004 d4c4 jsr 4d4c4 <== NOT EXECUTED 4bca8: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4bcaa: 4e5e unlk %fp <== NOT EXECUTED 4bcac: 4e75 rts 0004bb52 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4bb52: 4e56 fff0 linkw %fp,#-16 4bb56: 226e 0008 moveal %fp@(8),%a1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4bb5a: 486e fff0 pea %fp@(-16) rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4bb5e: 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; 4bb64: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4bb6a: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4bb6e: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4bb72: 2f28 0050 movel %a0@(80),%sp@- 4bb76: 2f28 004c movel %a0@(76),%sp@- 4bb7a: 4eb9 0004 cefc jsr 4cefc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4bb80: 4fef 000c lea %sp@(12),%sp 4bb84: 4a80 tstl %d0 4bb86: 6608 bnes 4bb90 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 4bb88: 202e fffc movel %fp@(-4),%d0 } 4bb8c: 4e5e unlk %fp 4bb8e: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4bb90: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bb92: 4eb9 0004 d4c4 jsr 4d4c4 <== NOT EXECUTED 4bb98: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4bb9a: 4e5e unlk %fp <== NOT EXECUTED 4bb9c: 4e75 rts 0004bcae : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4bcae: 4e56 fff4 linkw %fp,#-12 4bcb2: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4bcb6: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4bcba: 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; 4bcc0: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4bcc4: 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; 4bcca: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4bcce: 2f29 0050 movel %a1@(80),%sp@- 4bcd2: 2f29 004c movel %a1@(76),%sp@- 4bcd6: 4eb9 0004 cf58 jsr 4cf58 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4bcdc: 4fef 000c lea %sp@(12),%sp 4bce0: 4a80 tstl %d0 4bce2: 6604 bnes 4bce8 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return 0; } 4bce4: 4e5e unlk %fp 4bce6: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4bce8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bcea: 4eb9 0004 d4c4 jsr 4d4c4 <== NOT EXECUTED 4bcf0: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4bcf2: 4e5e unlk %fp <== NOT EXECUTED 4bcf4: 4e75 rts <== NOT EXECUTED ... 0004bc04 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4bc04: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4bc08: 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( 4bc0c: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4bc10: 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; 4bc16: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4bc1c: 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; 4bc22: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4bc26: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4bc2a: 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; 4bc2e: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4bc32: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4bc36: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4bc3a: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4bc3e: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4bc42: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4bc46: 4eb9 0004 cfb4 jsr 4cfb4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4bc4c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bc50: 4a80 tstl %d0 <== NOT EXECUTED 4bc52: 6608 bnes 4bc5c <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4bc54: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4bc58: 4e5e unlk %fp <== NOT EXECUTED 4bc5a: 4e75 rts <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4bc5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bc5e: 4eb9 0004 d4c4 jsr 4d4c4 <== NOT EXECUTED 4bc64: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4bc66: 4e5e unlk %fp <== NOT EXECUTED 4bc68: 4e75 rts 0004bb9e : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4bb9e: 4e56 ffe4 linkw %fp,#-28 4bba2: 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( 4bba6: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4bbaa: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4bbb0: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4bbb6: 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; 4bbbc: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4bbc0: 2028 000c movel %a0@(12),%d0 4bbc4: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4bbc8: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4bbcc: 2d40 ffe8 movel %d0,%fp@(-24) 4bbd0: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4bbd4: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4bbd8: 2f29 0050 movel %a1@(80),%sp@- 4bbdc: 2f29 004c movel %a1@(76),%sp@- 4bbe0: 4eb9 0004 d010 jsr 4d010 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4bbe6: 4fef 000c lea %sp@(12),%sp 4bbea: 4a80 tstl %d0 4bbec: 6608 bnes 4bbf6 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4bbee: 202e fffc movel %fp@(-4),%d0 } 4bbf2: 4e5e unlk %fp 4bbf4: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4bbf6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bbf8: 4eb9 0004 d4c4 jsr 4d4c4 <== NOT EXECUTED 4bbfe: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4bc00: 4e5e unlk %fp <== NOT EXECUTED 4bc02: 4e75 rts 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 <== ALWAYS 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 645c jsr 4645c <== NOT EXECUTED 00043380 : int dup2( int fildes, int fildes2 ) { 43380: 4e56 ffac linkw %fp,#-84 43384: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 43388: 240e movel %fp,%d2 4338a: 0682 ffff ffba addil #-70,%d2 43390: 45f9 0004 3d5c lea 43d5c ,%a2 43396: 2f02 movel %d2,%sp@- int dup2( int fildes, int fildes2 ) { 43398: 262e 0008 movel %fp@(8),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 4339c: 2f03 movel %d3,%sp@- 4339e: 4e92 jsr %a2@ if ( status == -1 ) 433a0: 508f addql #8,%sp 433a2: 72ff moveq #-1,%d1 433a4: b280 cmpl %d0,%d1 433a6: 660c bnes 433b4 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433a8: 70ff moveq #-1,%d0 } 433aa: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 433b0: 4e5e unlk %fp 433b2: 4e75 rts /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 433b4: 2f02 movel %d2,%sp@- 433b6: 2f2e 000c movel %fp@(12),%sp@- 433ba: 4e92 jsr %a2@ if ( status == -1 ) 433bc: 508f addql #8,%sp 433be: 72ff moveq #-1,%d1 433c0: b280 cmpl %d0,%d1 433c2: 67e4 beqs 433a8 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433c4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 433c8: 42a7 clrl %sp@- <== NOT EXECUTED 433ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED 433cc: 4eb9 0004 38f4 jsr 438f4 <== NOT EXECUTED 433d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 433d6: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 433dc: 4e5e unlk %fp <== NOT EXECUTED 433de: 4e75 rts 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 c308 moveal 5c308 <__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 43e6e: 4e75 rts 00067648 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 67648: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 6764c: 2039 000a 4892 movel a4892 ,%d0 <== NOT EXECUTED 67652: 670a beqs 6765e <== NOT EXECUTED fclose(group_fp); 67654: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67656: 4eb9 0007 faf2 jsr 7faf2 <== NOT EXECUTED 6765c: 588f addql #4,%sp <== NOT EXECUTED } 6765e: 4e5e unlk %fp <== NOT EXECUTED 67660: 4e75 rts 00067662 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 67662: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 67666: 2039 000a 47aa movel a47aa ,%d0 <== NOT EXECUTED 6766c: 670a beqs 67678 <== NOT EXECUTED fclose(passwd_fp); 6766e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67670: 4eb9 0007 faf2 jsr 7faf2 <== NOT EXECUTED 67676: 588f addql #4,%sp <== NOT EXECUTED } 67678: 4e5e unlk %fp <== NOT EXECUTED 6767a: 4e75 rts 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 c308 moveal 5c308 <__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 b29b pea 5b29b <== 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 c308 moveal 5c308 <__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 b29b pea 5b29b <== 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 c308 moveal 5c308 <__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 b29d pea 5b29d <== 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 b29d pea 5b29d <== 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 00079b78 : #include int fchdir( int fd ) { 79b78: 4e56 ffb4 linkw %fp,#-76 <== NOT EXECUTED 79b7c: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 79b80: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 79b84: b0b9 000a 04d4 cmpl a04d4 ,%d0 <== NOT EXECUTED 79b8a: 6400 0116 bccw 79ca2 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 79b8e: 2479 000a 5100 moveal a5100 ,%a2 <== NOT EXECUTED 79b94: ed88 lsll #6,%d0 <== NOT EXECUTED 79b96: d5c0 addal %d0,%a2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 79b98: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 79b9c: 0800 0008 btst #8,%d0 <== NOT EXECUTED 79ba0: 6700 0100 beqw 79ca2 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 79ba4: 0800 0001 btst #1,%d0 <== NOT EXECUTED 79ba8: 6700 0138 beqw 79ce2 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 79bac: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 79bb0: 4a88 tstl %a0 <== NOT EXECUTED 79bb2: 6700 0146 beqw 79cfa <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 79bb6: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED 79bba: 4a88 tstl %a0 <== NOT EXECUTED 79bbc: 6700 013c beqw 79cfa <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 79bc0: 47ea 0018 lea %a2@(24),%a3 <== NOT EXECUTED 79bc4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 79bc6: 4e90 jsr %a0@ <== NOT EXECUTED 79bc8: 588f addql #4,%sp <== NOT EXECUTED 79bca: 7201 moveq #1,%d1 <== NOT EXECUTED 79bcc: b280 cmpl %d0,%d1 <== NOT EXECUTED 79bce: 6600 00ba bnew 79c8a <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 79bd2: 2279 000a 07dc moveal a07dc ,%a1 <== NOT EXECUTED 79bd8: 2c0e movel %fp,%d6 <== NOT EXECUTED 79bda: 41e9 0004 lea %a1@(4),%a0 <== NOT EXECUTED 79bde: 0686 ffff ffd8 addil #-40,%d6 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 79be4: 2248 moveal %a0,%a1 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 79be6: 2a46 moveal %d6,%a5 <== NOT EXECUTED 79be8: 2a0e movel %fp,%d5 <== NOT EXECUTED 79bea: 0685 ffff ffdc addil #-36,%d5 <== NOT EXECUTED 79bf0: 280e movel %fp,%d4 <== NOT EXECUTED 79bf2: 0684 ffff ffe0 addil #-32,%d4 <== NOT EXECUTED 79bf8: 260e movel %fp,%d3 <== NOT EXECUTED 79bfa: 0683 ffff ffe4 addil #-28,%d3 <== NOT EXECUTED 79c00: 240e movel %fp,%d2 <== NOT EXECUTED 79c02: 0682 ffff ffe8 addil #-24,%d2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 79c08: 49ee ffec lea %fp@(-20),%a4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 79c0c: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 79c0e: 2a45 moveal %d5,%a5 <== NOT EXECUTED 79c10: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 79c12: 2a44 moveal %d4,%a5 <== NOT EXECUTED 79c14: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 79c16: 2a43 moveal %d3,%a5 <== NOT EXECUTED 79c18: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 79c1a: 2a42 moveal %d2,%a5 <== NOT EXECUTED 79c1c: 2a90 movel %a0@,%a5@ <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 79c1e: 22d3 movel %a3@,%a1@+ <== NOT EXECUTED 79c20: 22ea 001c movel %a2@(28),%a1@+ <== NOT EXECUTED 79c24: 22ea 0020 movel %a2@(32),%a1@+ <== NOT EXECUTED 79c28: 22aa 0024 movel %a2@(36),%a1@ <== NOT EXECUTED 79c2c: 20aa 0028 movel %a2@(40),%a0@ <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 79c30: 42a7 clrl %sp@- <== NOT EXECUTED 79c32: 2f0c movel %a4,%sp@- <== NOT EXECUTED 79c34: 42a7 clrl %sp@- <== NOT EXECUTED 79c36: 4878 0001 pea 1 <== NOT EXECUTED 79c3a: 4879 0009 9927 pea 99927 <== NOT EXECUTED 79c40: 4eb9 0004 7758 jsr 47758 <== NOT EXECUTED 79c46: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 79c4a: 4a80 tstl %d0 <== NOT EXECUTED 79c4c: 666c bnes 79cba <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 79c4e: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 79c52: 4a88 tstl %a0 <== NOT EXECUTED 79c54: 670e beqs 79c64 <== NOT EXECUTED 79c56: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 79c5a: 4a88 tstl %a0 <== NOT EXECUTED 79c5c: 6706 beqs 79c64 <== NOT EXECUTED 79c5e: 2f06 movel %d6,%sp@- <== NOT EXECUTED 79c60: 4e90 jsr %a0@ <== NOT EXECUTED 79c62: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_current = loc; 79c64: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 79c6a: 5888 addql #4,%a0 <== NOT EXECUTED 79c6c: 4280 clrl %d0 <== NOT EXECUTED 79c6e: 20d4 movel %a4@,%a0@+ <== NOT EXECUTED 79c70: 20ee fff0 movel %fp@(-16),%a0@+ <== NOT EXECUTED 79c74: 20ee fff4 movel %fp@(-12),%a0@+ <== NOT EXECUTED 79c78: 20ee fff8 movel %fp@(-8),%a0@+ <== NOT EXECUTED 79c7c: 20ae fffc movel %fp@(-4),%a0@ <== NOT EXECUTED return 0; } 79c80: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 79c86: 4e5e unlk %fp <== NOT EXECUTED 79c88: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 79c8a: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 79c90: 7214 moveq #20,%d1 <== NOT EXECUTED 79c92: 2040 moveal %d0,%a0 <== NOT EXECUTED 79c94: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79c96: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 79c9c: 2081 movel %d1,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79c9e: 4e5e unlk %fp <== NOT EXECUTED 79ca0: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 79ca2: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 79ca8: 7609 moveq #9,%d3 <== NOT EXECUTED 79caa: 2040 moveal %d0,%a0 <== NOT EXECUTED 79cac: 70ff moveq #-1,%d0 <== NOT EXECUTED 79cae: 2083 movel %d3,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79cb0: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 79cb6: 4e5e unlk %fp <== NOT EXECUTED 79cb8: 4e75 rts <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 79cba: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 79cc0: 2246 moveal %d6,%a1 <== NOT EXECUTED 79cc2: 5888 addql #4,%a0 <== NOT EXECUTED 79cc4: 2a45 moveal %d5,%a5 <== NOT EXECUTED 79cc6: 70ff moveq #-1,%d0 <== NOT EXECUTED 79cc8: 20d1 movel %a1@,%a0@+ <== NOT EXECUTED 79cca: 2244 moveal %d4,%a1 <== NOT EXECUTED 79ccc: 20d5 movel %a5@,%a0@+ <== NOT EXECUTED 79cce: 2a43 moveal %d3,%a5 <== NOT EXECUTED 79cd0: 20d1 movel %a1@,%a0@+ <== NOT EXECUTED 79cd2: 2242 moveal %d2,%a1 <== NOT EXECUTED 79cd4: 20d5 movel %a5@,%a0@+ <== NOT EXECUTED 79cd6: 2091 movel %a1@,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79cd8: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 79cde: 4e5e unlk %fp <== NOT EXECUTED 79ce0: 4e75 rts <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 79ce2: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 79ce8: 7416 moveq #22,%d2 <== NOT EXECUTED 79cea: 2040 moveal %d0,%a0 <== NOT EXECUTED 79cec: 70ff moveq #-1,%d0 <== NOT EXECUTED 79cee: 2082 movel %d2,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79cf0: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 79cf6: 4e5e unlk %fp <== NOT EXECUTED 79cf8: 4e75 rts <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 79cfa: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 79d00: 2040 moveal %d0,%a0 <== NOT EXECUTED 79d02: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79d04: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 79d0a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79d10: 4e5e unlk %fp <== NOT EXECUTED 79d12: 4e75 rts 0006728c : int fchmod( int fd, mode_t mode ) { 6728c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 67290: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 67294: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 67298: b0b9 000a 04d4 cmpl a04d4 ,%d0 <== NOT EXECUTED 6729e: 643a bccs 672da <== NOT EXECUTED iop = rtems_libio_iop( fd ); 672a0: 2079 000a 5100 moveal a5100 ,%a0 <== NOT EXECUTED 672a6: ed88 lsll #6,%d0 <== NOT EXECUTED 672a8: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 672aa: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 672ae: 0800 0008 btst #8,%d0 <== NOT EXECUTED 672b2: 6726 beqs 672da <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 672b4: 44c0 movew %d0,%ccr <== NOT EXECUTED 672b6: 6634 bnes 672ec <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 672b8: 2268 003c moveal %a0@(60),%a1 <== NOT EXECUTED 672bc: 4aa9 001c tstl %a1@(28) <== NOT EXECUTED 672c0: 673c beqs 672fe <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 672c2: 2268 0020 moveal %a0@(32),%a1 <== NOT EXECUTED 672c6: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 672ca: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 672ce: 2269 001c moveal %a1@(28),%a1 <== NOT EXECUTED 672d2: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED } 672d6: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 672d8: 4ed1 jmp %a1@ <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 672da: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 672e0: 7209 moveq #9,%d1 <== NOT EXECUTED 672e2: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 672e4: 70ff moveq #-1,%d0 <== NOT EXECUTED 672e6: 4e5e unlk %fp <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 672e8: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 672ea: 4e75 rts <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 672ec: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 672f2: 4e5e unlk %fp <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 672f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 672f6: 7016 moveq #22,%d0 <== NOT EXECUTED 672f8: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 672fa: 70ff moveq #-1,%d0 <== NOT EXECUTED 672fc: 4e75 rts <== NOT EXECUTED */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 672fe: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 67304: 4e5e unlk %fp <== NOT EXECUTED */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 67306: 2040 moveal %d0,%a0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 67308: 70ff moveq #-1,%d0 <== NOT EXECUTED */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 6730a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 67310: 4e75 rts <== NOT EXECUTED ... 00067314 : int fchown( int fd, uid_t owner, gid_t group ) { 67314: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 67318: 302e 000e movew %fp@(14),%d0 <== NOT EXECUTED 6731c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6731e: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 67322: 322e 0012 movew %fp@(18),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 67326: b4b9 000a 04d4 cmpl a04d4 ,%d2 <== NOT EXECUTED 6732c: 6448 bccs 67376 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 6732e: 2079 000a 5100 moveal a5100 ,%a0 <== NOT EXECUTED 67334: ed8a lsll #6,%d2 <== NOT EXECUTED 67336: d1c2 addal %d2,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 67338: 2428 0014 movel %a0@(20),%d2 <== NOT EXECUTED 6733c: 0802 0008 btst #8,%d2 <== NOT EXECUTED 67340: 6734 beqs 67376 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 67342: 44c2 movew %d2,%ccr <== NOT EXECUTED 67344: 6646 bnes 6738c <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 67346: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 6734a: 2269 0018 moveal %a1@(24),%a1 <== NOT EXECUTED 6734e: 4a89 tstl %a1 <== NOT EXECUTED 67350: 6750 beqs 673a2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 67352: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 67356: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 6735c: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED } 67362: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 67366: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED 6736a: 2d41 0010 movel %d1,%fp@(16) <== NOT EXECUTED 6736e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } 67372: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 67374: 4ed1 jmp %a1@ <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 67376: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 6737c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 67380: 2040 moveal %d0,%a0 <== NOT EXECUTED 67382: 7209 moveq #9,%d1 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 67384: 70ff moveq #-1,%d0 <== NOT EXECUTED 67386: 4e5e unlk %fp <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 67388: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 6738a: 4e75 rts <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 6738c: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 67392: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 67396: 2040 moveal %d0,%a0 <== NOT EXECUTED 67398: 7016 moveq #22,%d0 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 6739a: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 6739c: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 6739e: 70ff moveq #-1,%d0 <== NOT EXECUTED 673a0: 4e75 rts <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 673a2: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 673a8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 673ac: 2040 moveal %d0,%a0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 673ae: 70ff moveq #-1,%d0 <== NOT EXECUTED 673b0: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 673b2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 673b8: 4e75 rts <== NOT EXECUTED ... 00079d14 : int fcntl( int fd, int cmd, ... ) { 79d14: 4e56 fff4 linkw %fp,#-12 79d18: 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, ...)); 79d1c: 41ee 0010 lea %fp@(16),%a0 79d20: 48d7 040c moveml %d2-%d3/%a2,%sp@ 79d24: 242e 000c movel %fp@(12),%d2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 79d28: 2239 000a 04d4 movel a04d4 ,%d1 79d2e: b280 cmpl %d0,%d1 79d30: 6300 0192 blsw 79ec4 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 79d34: 2279 000a 5100 moveal a5100 ,%a1 79d3a: ed88 lsll #6,%d0 79d3c: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 79d40: 202a 0014 movel %a2@(20),%d0 79d44: 0800 0008 btst #8,%d0 79d48: 6700 017a beqw 79ec4 <== ALWAYS TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 79d4c: 7609 moveq #9,%d3 79d4e: b682 cmpl %d2,%d3 79d50: 641a bccs 79d6c errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 79d52: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 79d58: 76ff moveq #-1,%d3 79d5a: 2040 moveal %d0,%a0 79d5c: 7016 moveq #22,%d0 79d5e: 2080 movel %d0,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79d60: 2003 movel %d3,%d0 79d62: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 79d68: 4e5e unlk %fp 79d6a: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 79d6c: 363b 2a08 movew %pc@(79d76 ,%d2:l:2),%d3 79d70: 48c3 extl %d3 79d72: 4efb 3802 jmp %pc@(79d76 ,%d3:l) 79d76: 00b8 00ac 009c oril #11272348,%d0 <== NOT EXECUTED 79d7c: 0082 0030 0014 oril #3145748,%d2 <== NOT EXECUTED 79d82: 0014 024 <== NOT EXECUTED 79d84: 0014 024 <== NOT EXECUTED 79d86: 0014 024 <== NOT EXECUTED 79d88: 0014 024 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 79d8a: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 79d90: 76ff moveq #-1,%d3 79d92: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79d94: 2003 movel %d3,%d0 79d96: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 79d9c: 20bc 0000 0086 movel #134,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79da2: 4e5e unlk %fp 79da4: 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 ) ); 79da6: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 79da8: 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 ) ); 79daa: 4eb9 0004 7cc0 jsr 47cc0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 79db0: 222a 0014 movel %a2@(20),%d1 79db4: 588f addql #4,%sp 79db6: 0280 0000 0201 andil #513,%d0 79dbc: 0281 ffff fdfe andil #-514,%d1 79dc2: 8081 orl %d1,%d0 79dc4: 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) { 79dc8: 206a 003c moveal %a2@(60),%a0 79dcc: 2068 0030 moveal %a0@(48),%a0 79dd0: 4a88 tstl %a0 79dd2: 678c beqs 79d60 <== ALWAYS TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 79dd4: 2f0a movel %a2,%sp@- 79dd6: 2f02 movel %d2,%sp@- 79dd8: 4e90 jsr %a0@ if (err) { 79dda: 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 ); 79ddc: 2400 movel %d0,%d2 if (err) { 79dde: 6780 beqs 79d60 <== NEVER TAKEN errno = err; 79de0: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 79de6: 76ff moveq #-1,%d3 <== NOT EXECUTED 79de8: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79dea: 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; 79dec: 2082 movel %d2,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79dee: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 79df4: 4e5e unlk %fp <== NOT EXECUTED 79df6: 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 ); 79df8: 2f00 movel %d0,%sp@- 79dfa: 4eb9 0004 7a30 jsr 47a30 79e00: 588f addql #4,%sp 79e02: 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) { 79e04: 6cc2 bges 79dc8 <== NEVER TAKEN va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79e06: 2003 movel %d3,%d0 <== NOT EXECUTED 79e08: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 79e0e: 4e5e unlk %fp <== NOT EXECUTED 79e10: 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 ) ) 79e12: 4a90 tstl %a0@ 79e14: 6766 beqs 79e7c <== ALWAYS TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 79e16: 4283 clrl %d3 79e18: 08c0 000b bset #11,%d0 79e1c: 2540 0014 movel %d0,%a2@(20) 79e20: 60a6 bras 79dc8 <== ALWAYS TAKEN 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); 79e22: 2600 movel %d0,%d3 79e24: 720b moveq #11,%d1 79e26: e2ab lsrl %d1,%d3 79e28: 7001 moveq #1,%d0 79e2a: c680 andl %d0,%d3 79e2c: 609a bras 79dc8 <== ALWAYS TAKEN * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 79e2e: 2010 movel %a0@,%d0 if ( fd2 ) 79e30: 6700 00ac beqw 79ede <== NEVER TAKEN diop = rtems_libio_iop( fd2 ); 79e34: b081 cmpl %d1,%d0 <== NOT EXECUTED 79e36: 6452 bccs 79e8a <== NOT EXECUTED 79e38: ed88 lsll #6,%d0 <== NOT EXECUTED 79e3a: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 79e3e: 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); 79e40: 9689 subl %a1,%d3 <== NOT EXECUTED 79e42: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79e44: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 79e4a: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 79e50: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 79e56: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 79e5c: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79e62: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 79e68: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 79e6e: 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) { 79e74: 4a83 tstl %d3 79e76: 6c00 ff50 bgew 79dc8 <== NEVER TAKEN 79e7a: 608a bras 79e06 <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 79e7c: 4283 clrl %d3 <== NOT EXECUTED 79e7e: 0880 000b bclr #11,%d0 <== NOT EXECUTED 79e82: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED 79e86: 6000 ff40 braw 79dc8 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 79e8a: 91c8 subal %a0,%a0 <== NOT EXECUTED 79e8c: 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); 79e8e: 9689 subl %a1,%d3 <== NOT EXECUTED 79e90: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79e92: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 79e98: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 79e9e: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 79ea4: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 79eaa: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79eb0: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 79eb6: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 79ebc: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED 79ec2: 60b0 bras 79e74 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 79ec4: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 79eca: 76ff moveq #-1,%d3 <== NOT EXECUTED 79ecc: 7209 moveq #9,%d1 <== NOT EXECUTED 79ece: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79ed0: 2003 movel %d3,%d0 <== NOT EXECUTED 79ed2: 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); 79ed8: 2081 movel %d1,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79eda: 4e5e unlk %fp <== NOT EXECUTED 79edc: 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(); 79ede: 4eb9 0004 7c08 jsr 47c08 79ee4: 2040 moveal %d0,%a0 if ( diop == 0 ) { 79ee6: 4a80 tstl %d0 79ee8: 6740 beqs 79f2a <== ALWAYS TAKEN 79eea: 2279 000a 5100 moveal a5100 ,%a1 79ef0: 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); 79ef2: 9689 subl %a1,%d3 79ef4: ec83 asrl #6,%d3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79ef6: 216a 0018 0018 movel %a2@(24),%a0@(24) 79efc: 216a 001c 001c movel %a2@(28),%a0@(28) 79f02: 216a 0020 0020 movel %a2@(32),%a0@(32) 79f08: 216a 0024 0024 movel %a2@(36),%a0@(36) ret = -1; break; } } diop->handlers = iop->handlers; 79f0e: 216a 003c 003c movel %a2@(60),%a0@(60) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79f14: 216a 0028 0028 movel %a2@(40),%a0@(40) break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 79f1a: 216a 0038 0038 movel %a2@(56),%a0@(56) diop->flags = iop->flags; 79f20: 216a 0014 0014 movel %a2@(20),%a0@(20) 79f26: 6000 ff4c braw 79e74 <== ALWAYS TAKEN if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); if ( diop == 0 ) { 79f2a: 76ff moveq #-1,%d3 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79f2c: 2003 movel %d3,%d0 <== NOT EXECUTED 79f2e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 79f34: 4e5e unlk %fp <== NOT EXECUTED 79f36: 4e75 rts 00043b3c : #include int fdatasync( int fd ) { 43b3c: 4e56 0000 linkw %fp,#0 43b40: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43b44: b0b9 0006 0084 cmpl 60084 ,%d0 43b4a: 642c bccs 43b78 iop = rtems_libio_iop( fd ); 43b4c: 2079 0006 170c moveal 6170c ,%a0 43b52: ed88 lsll #6,%d0 43b54: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43b56: 2028 0014 movel %a0@(20),%d0 43b5a: 0800 0008 btst #8,%d0 43b5e: 6718 beqs 43b78 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43b60: 44c0 movew %d0,%ccr 43b62: 6626 bnes 43b8a /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 43b64: 2268 003c moveal %a0@(60),%a1 43b68: 2269 002c moveal %a1@(44),%a1 43b6c: 4a89 tstl %a1 43b6e: 672c beqs 43b9c rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43b70: 2d48 0008 movel %a0,%fp@(8) } 43b74: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43b76: 4ed1 jmp %a1@ { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43b78: 4eb9 0005 01f0 jsr 501f0 <__errno> 43b7e: 7209 moveq #9,%d1 43b80: 2040 moveal %d0,%a0 if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b82: 70ff moveq #-1,%d0 43b84: 4e5e unlk %fp { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43b86: 2081 movel %d1,%a0@ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b88: 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 ); 43b8a: 4eb9 0005 01f0 jsr 501f0 <__errno> if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b90: 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 ); 43b92: 2040 moveal %d0,%a0 43b94: 7016 moveq #22,%d0 43b96: 2080 movel %d0,%a0@ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b98: 70ff moveq #-1,%d0 43b9a: 4e75 rts /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43b9c: 4eb9 0005 01f0 jsr 501f0 <__errno> return (*iop->handlers->fdatasync_h)( iop ); } 43ba2: 4e5e unlk %fp /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43ba4: 2040 moveal %d0,%a0 return (*iop->handlers->fdatasync_h)( iop ); } 43ba6: 70ff moveq #-1,%d0 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43ba8: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fdatasync_h)( iop ); } 43bae: 4e75 rts 0004c2aa : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4c2aa: 4e56 ffe0 linkw %fp,#-32 4c2ae: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4c2b2: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4c2b4: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4c2b8: 47f9 0004 5d2c lea 45d2c ,%a3 4c2be: 42a7 clrl %sp@- 4c2c0: 2f39 0005 d104 movel 5d104 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4c2c6: 262e 000c movel %fp@(12),%d3 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4c2ca: 4e93 jsr %a3@ 4c2cc: 4fef 000c lea %sp@(12),%sp 4c2d0: 4a80 tstl %d0 4c2d2: 667e bnes 4c352 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4c2d4: 2414 movel %a4@,%d2 <== NOT EXECUTED if (pipe == NULL) { 4c2d6: 6700 008a beqw 4c362 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4c2da: 42a7 clrl %sp@- <== NOT EXECUTED 4c2dc: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c2de: 42a7 clrl %sp@- <== NOT EXECUTED 4c2e0: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c2e4: 4e93 jsr %a3@ <== NOT EXECUTED 4c2e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c2ea: 4a80 tstl %d0 <== NOT EXECUTED 4c2ec: 675a beqs 4c348 <== NOT EXECUTED 4c2ee: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4c2f2: 4a94 tstl %a4@ <== NOT EXECUTED 4c2f4: 6700 01ea beqw 4c4e0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c2f8: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c2fe: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED 4c304: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4c306: 588f addql #4,%sp <== NOT EXECUTED 4c308: 4a8a tstl %a2 <== NOT EXECUTED 4c30a: 6630 bnes 4c33c <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4c30c: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c30e: 7006 moveq #6,%d0 <== NOT EXECUTED 4c310: 7404 moveq #4,%d2 <== NOT EXECUTED 4c312: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4c316: c081 andl %d1,%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4c318: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4c31a: b480 cmpl %d0,%d2 <== NOT EXECUTED 4c31c: 6700 01ee beqw 4c50c <== NOT EXECUTED 4c320: 7206 moveq #6,%d1 <== NOT EXECUTED 4c322: b280 cmpl %d0,%d1 <== NOT EXECUTED 4c324: 6700 02c0 beqw 4c5e6 <== NOT EXECUTED 4c328: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 4c32c: b480 cmpl %d0,%d2 <== NOT EXECUTED 4c32e: 6700 013a beqw 4c46a <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4c332: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c336: 95ca subal %a2,%a2 <== NOT EXECUTED 4c338: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4c33a: 588f addql #4,%sp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 4c33c: 200a movel %a2,%d0 <== NOT EXECUTED 4c33e: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c344: 4e5e unlk %fp <== NOT EXECUTED 4c346: 4e75 rts <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4c348: 95ca subal %a2,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4c34a: 4a94 tstl %a4@ <== NOT EXECUTED 4c34c: 66aa bnes 4c2f8 <== NOT EXECUTED 4c34e: 6000 0190 braw 4c4e0 <== NOT EXECUTED ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4c352: 347c fffc moveaw #-4,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4c356: 200a movel %a2,%d0 4c358: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4c35e: 4e5e unlk %fp 4c360: 4e75 rts { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4c362: 4878 0034 pea 34 <== NOT EXECUTED 4c366: 45f9 0004 aa8c lea 4aa8c ,%a2 <== NOT EXECUTED 4c36c: 4e92 jsr %a2@ <== NOT EXECUTED if (pipe == NULL) 4c36e: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4c370: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4c372: 2400 movel %d0,%d2 <== NOT EXECUTED if (pipe == NULL) 4c374: 6700 0354 beqw 4c6ca <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4c378: 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)); 4c37c: 2040 moveal %d0,%a0 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4c37e: 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)); 4c384: 4298 clrl %a0@+ <== NOT EXECUTED 4c386: 5888 addql #4,%a0 <== NOT EXECUTED 4c388: 4298 clrl %a0@+ <== NOT EXECUTED 4c38a: 4298 clrl %a0@+ <== NOT EXECUTED 4c38c: 4298 clrl %a0@+ <== NOT EXECUTED 4c38e: 4298 clrl %a0@+ <== NOT EXECUTED 4c390: 4298 clrl %a0@+ <== NOT EXECUTED 4c392: 4298 clrl %a0@+ <== NOT EXECUTED 4c394: 4298 clrl %a0@+ <== NOT EXECUTED 4c396: 4298 clrl %a0@+ <== NOT EXECUTED 4c398: 4298 clrl %a0@+ <== NOT EXECUTED 4c39a: 4298 clrl %a0@+ <== NOT EXECUTED 4c39c: 4290 clrl %a0@ <== NOT EXECUTED pipe->Size = PIPE_BUF; 4c39e: 2b40 0004 movel %d0,%a5@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4c3a2: 4e92 jsr %a2@ <== NOT EXECUTED if (! pipe->Buffer) 4c3a4: 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); 4c3a6: 2a80 movel %d0,%a5@ <== NOT EXECUTED if (! pipe->Buffer) 4c3a8: 6700 033e beqw 4c6e8 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4c3ac: 486d 002c pea %a5@(44) <== NOT EXECUTED 4c3b0: 45f9 0004 cad8 lea 4cad8 ,%a2 <== NOT EXECUTED 4c3b6: 1039 0005 c2cc moveb 5c2cc ,%d0 <== NOT EXECUTED 4c3bc: 42a7 clrl %sp@- <== NOT EXECUTED 4c3be: 49c0 extbl %d0 <== NOT EXECUTED 4c3c0: 42a7 clrl %sp@- <== NOT EXECUTED 4c3c2: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4c3c8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c3ca: 4e92 jsr %a2@ <== NOT EXECUTED 4c3cc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4c3d0: 4a80 tstl %d0 <== NOT EXECUTED 4c3d2: 6600 0174 bnew 4c548 <== 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( 4c3d6: 486d 0030 pea %a5@(48) <== NOT EXECUTED 4c3da: 283c 0004 cbd4 movel #314324,%d4 <== NOT EXECUTED 4c3e0: 1039 0005 c2cc moveb 5c2cc ,%d0 <== NOT EXECUTED 4c3e6: 42a7 clrl %sp@- <== NOT EXECUTED 4c3e8: 49c0 extbl %d0 <== NOT EXECUTED 4c3ea: 42a7 clrl %sp@- <== NOT EXECUTED 4c3ec: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4c3f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c3f4: 4e92 jsr %a2@ <== NOT EXECUTED 4c3f6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4c3fa: 4a80 tstl %d0 <== NOT EXECUTED 4c3fc: 6600 0140 bnew 4c53e <== 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( 4c400: 486d 0028 pea %a5@(40) <== NOT EXECUTED 4c404: 1039 0005 c2cc moveb 5c2cc ,%d0 <== NOT EXECUTED 4c40a: 42a7 clrl %sp@- <== NOT EXECUTED 4c40c: 4878 0010 pea 10 <== NOT EXECUTED 4c410: 49c0 extbl %d0 <== NOT EXECUTED 4c412: 4878 0001 pea 1 <== NOT EXECUTED 4c416: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4c41c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c41e: 4eb9 0004 5a8c jsr 45a8c <== NOT EXECUTED 4c424: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4c428: 4a80 tstl %d0 <== NOT EXECUTED 4c42a: 6600 0108 bnew 4c534 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4c42e: 1039 0005 c2cc moveb 5c2cc ,%d0 <== NOT EXECUTED 4c434: 49c0 extbl %d0 <== NOT EXECUTED 4c436: 2200 movel %d0,%d1 <== NOT EXECUTED 4c438: 5281 addql #1,%d1 <== NOT EXECUTED 4c43a: 13c1 0005 c2cc moveb %d1,5c2cc <== NOT EXECUTED 4c440: 727a moveq #122,%d1 <== NOT EXECUTED 4c442: b280 cmpl %d0,%d1 <== NOT EXECUTED 4c444: 6600 fe94 bnew 4c2da <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4c448: 2042 moveal %d2,%a0 <== NOT EXECUTED pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') c = 'a'; 4c44a: 7061 moveq #97,%d0 <== NOT EXECUTED 4c44c: 13c0 0005 c2cc moveb %d0,5c2cc <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4c452: 42a7 clrl %sp@- <== NOT EXECUTED 4c454: 42a7 clrl %sp@- <== NOT EXECUTED 4c456: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c45a: 4e93 jsr %a3@ <== NOT EXECUTED 4c45c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c460: 4a80 tstl %d0 <== NOT EXECUTED 4c462: 6700 fee4 beqw 4c348 <== NOT EXECUTED 4c466: 6000 fe86 braw 4c2ee <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4c46a: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4c46e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c470: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4c472: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4c476: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4c47a: 4a80 tstl %d0 <== NOT EXECUTED 4c47c: 6700 01c2 beqw 4c640 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4c480: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c484: 6600 feac bnew 4c332 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4c488: 7001 moveq #1,%d0 <== NOT EXECUTED 4c48a: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c48c: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4c490: 6600 fea0 bnew 4c332 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4c494: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 4c498: 243c 0004 ccbc movel #314556,%d2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4c49e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c4a2: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4c4a4: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c4a6: 42a7 clrl %sp@- <== NOT EXECUTED 4c4a8: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c4ac: 4e90 jsr %a0@ <== NOT EXECUTED 4c4ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c4b2: 4a80 tstl %d0 <== NOT EXECUTED 4c4b4: 6600 01b2 bnew 4c668 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4c4b8: 42a7 clrl %sp@- <== NOT EXECUTED 4c4ba: 42a7 clrl %sp@- <== NOT EXECUTED 4c4bc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c4c0: 4e93 jsr %a3@ <== NOT EXECUTED 4c4c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c4c6: 4a80 tstl %d0 <== NOT EXECUTED 4c4c8: 6600 019e bnew 4c668 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4c4cc: b8aa 0024 cmpl %a2@(36),%d4 <== NOT EXECUTED 4c4d0: 67cc beqs 4c49e <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4c4d2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c4d6: 95ca subal %a2,%a2 <== NOT EXECUTED 4c4d8: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4c4da: 588f addql #4,%sp <== NOT EXECUTED 4c4dc: 6000 fe5e braw 4c33c <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4c4e0: 4a8a tstl %a2 <== NOT EXECUTED 4c4e2: 6600 0198 bnew 4c67c <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c4e6: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c4ec: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4c4f2: 2882 movel %d2,%a4@ <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4c4f4: 7404 moveq #4,%d2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c4f6: 4e95 jsr %a5@ <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4c4f8: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4c4fa: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c4fc: 7006 moveq #6,%d0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c4fe: 588f addql #4,%sp <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4c500: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4c504: c081 andl %d1,%d0 <== NOT EXECUTED 4c506: b480 cmpl %d0,%d2 <== NOT EXECUTED 4c508: 6600 fe16 bnew 4c320 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4c50c: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c510: 666a bnes 4c57c <== NOT EXECUTED 4c512: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4c516: 6764 beqs 4c57c <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4c518: 2f03 movel %d3,%sp@- <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4c51a: 347c fffa moveaw #-6,%a2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4c51e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4c520: 4eb9 0004 c18a jsr 4c18a <== NOT EXECUTED return err; 4c526: 508f addql #8,%sp <== NOT EXECUTED } 4c528: 200a movel %a2,%d0 <== NOT EXECUTED 4c52a: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c530: 4e5e unlk %fp <== NOT EXECUTED 4c532: 4e75 rts <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4c534: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4c538: 2044 moveal %d4,%a0 <== NOT EXECUTED 4c53a: 4e90 jsr %a0@ <== NOT EXECUTED 4c53c: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4c53e: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4c542: 2044 moveal %d4,%a0 <== NOT EXECUTED 4c544: 4e90 jsr %a0@ <== NOT EXECUTED 4c546: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4c548: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4c54a: 243c 0004 a51c movel #304412,%d2 <== NOT EXECUTED 4c550: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c552: 4e90 jsr %a0@ <== NOT EXECUTED 4c554: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4c556: 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); 4c558: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err_buf: free(pipe); 4c55c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4c55e: 4e90 jsr %a0@ <== NOT EXECUTED 4c560: 588f addql #4,%sp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c562: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c568: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED 4c56e: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4c570: 588f addql #4,%sp <== NOT EXECUTED 4c572: 4a8a tstl %a2 <== NOT EXECUTED 4c574: 6700 fd96 beqw 4c30c <== NOT EXECUTED 4c578: 6000 fdc2 braw 4c33c <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4c57c: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4c580: 2200 movel %d0,%d1 <== NOT EXECUTED 4c582: 5281 addql #1,%d1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4c584: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4c588: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4c58c: 4a80 tstl %d0 <== NOT EXECUTED 4c58e: 6700 00c4 beqw 4c654 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 4c592: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c596: 6600 fd9a bnew 4c332 <== NOT EXECUTED prevCounter = pipe->readerCounter; 4c59a: 282a 0020 movel %a2@(32),%d4 <== NOT EXECUTED 4c59e: 243c 0004 ccbc movel #314556,%d2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4c5a4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c5a8: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4c5aa: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c5ac: 42a7 clrl %sp@- <== NOT EXECUTED 4c5ae: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c5b2: 4e90 jsr %a0@ <== NOT EXECUTED 4c5b4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c5b8: 4a80 tstl %d0 <== NOT EXECUTED 4c5ba: 6600 00ac bnew 4c668 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4c5be: 42a7 clrl %sp@- <== NOT EXECUTED 4c5c0: 42a7 clrl %sp@- <== NOT EXECUTED 4c5c2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c5c6: 4e93 jsr %a3@ <== NOT EXECUTED 4c5c8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c5cc: 4a80 tstl %d0 <== NOT EXECUTED 4c5ce: 6600 0098 bnew 4c668 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4c5d2: b8aa 0020 cmpl %a2@(32),%d4 <== NOT EXECUTED 4c5d6: 67cc beqs 4c5a4 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4c5d8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c5dc: 95ca subal %a2,%a2 <== NOT EXECUTED 4c5de: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4c5e0: 588f addql #4,%sp <== NOT EXECUTED 4c5e2: 6000 fd58 braw 4c33c <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4c5e6: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4c5ea: 2200 movel %d0,%d1 <== NOT EXECUTED 4c5ec: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4c5ee: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4c5f2: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4c5f6: 4a80 tstl %d0 <== NOT EXECUTED 4c5f8: 6734 beqs 4c62e <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4c5fa: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4c5fe: 2400 movel %d0,%d2 <== NOT EXECUTED 4c600: 5282 addql #1,%d2 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4c602: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4c606: 2542 0014 movel %d2,%a2@(20) <== NOT EXECUTED 4c60a: 4a80 tstl %d0 <== NOT EXECUTED 4c60c: 6600 fd24 bnew 4c332 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4c610: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c614: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c618: 4eb9 0004 cc44 jsr 4cc44 <== NOT EXECUTED 4c61e: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4c620: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c624: 95ca subal %a2,%a2 <== NOT EXECUTED 4c626: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4c628: 588f addql #4,%sp <== NOT EXECUTED 4c62a: 6000 fd10 braw 4c33c <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4c62e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c632: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c636: 4eb9 0004 cc44 jsr 4cc44 <== NOT EXECUTED 4c63c: 508f addql #8,%sp <== NOT EXECUTED 4c63e: 60ba bras 4c5fa <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4c640: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c644: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c648: 4eb9 0004 cc44 jsr 4cc44 <== NOT EXECUTED 4c64e: 508f addql #8,%sp <== NOT EXECUTED 4c650: 6000 fe2e braw 4c480 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4c654: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c658: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c65c: 4eb9 0004 cc44 jsr 4cc44 <== NOT EXECUTED 4c662: 508f addql #8,%sp <== NOT EXECUTED 4c664: 6000 ff2c braw 4c592 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4c668: 2f03 movel %d3,%sp@- <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4c66a: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4c66e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4c670: 4eb9 0004 c18a jsr 4c18a <== NOT EXECUTED return err; 4c676: 508f addql #8,%sp <== NOT EXECUTED 4c678: 6000 feae braw 4c528 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4c67c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c67e: 49f9 0004 cbd4 lea 4cbd4 ,%a4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4c684: 47f9 0004 a51c lea 4a51c ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4c68a: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4c68e: 4e94 jsr %a4@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4c690: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c692: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4c696: 4e94 jsr %a4@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4c698: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c69a: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c69e: 4eb9 0004 5c54 jsr 45c54 <== NOT EXECUTED free(pipe->Buffer); 4c6a4: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c6a6: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4c6a8: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4c6aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c6ac: 4e93 jsr %a3@ <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c6ae: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c6b4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED 4c6ba: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4c6be: 200a movel %a2,%d0 <== NOT EXECUTED 4c6c0: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c6c6: 4e5e unlk %fp <== NOT EXECUTED 4c6c8: 4e75 rts <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c6ca: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c6d0: 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) 4c6d6: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c6da: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4c6dc: 588f addql #4,%sp <== NOT EXECUTED 4c6de: 4a8a tstl %a2 <== NOT EXECUTED 4c6e0: 6700 fc2a beqw 4c30c <== NOT EXECUTED 4c6e4: 6000 fc56 braw 4c33c <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4c6e8: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4c6ea: 243c 0004 a51c movel #304412,%d2 <== NOT EXECUTED 4c6f0: 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) 4c6f2: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4c6f6: 4e90 jsr %a0@ <== NOT EXECUTED 4c6f8: 588f addql #4,%sp <== NOT EXECUTED 4c6fa: 6000 fe66 braw 4c562 <== NOT EXECUTED ... 0004b144 : 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)) ) { 4b144: 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; 4b148: 2079 000a 5144 moveal a5144 ,%a0 <== NOT EXECUTED 4b14e: b1fc 000a 5148 cmpal #676168,%a0 <== NOT EXECUTED 4b154: 6724 beqs 4b17a <== 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 ) { 4b156: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4b15a: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 4b15e: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 4b162: 6710 beqs 4b174 <== 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 ) { 4b164: 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; 4b166: b1fc 000a 5148 cmpal #676168,%a0 <== NOT EXECUTED 4b16c: 670c beqs 4b17a <== 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 ) { 4b16e: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 4b172: 66f0 bnes 4b164 <== NOT EXECUTED return true; } } return false; } 4b174: 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; 4b176: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } } return false; } 4b178: 4e75 rts <== NOT EXECUTED 4b17a: 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; 4b17c: 4200 clrb %d0 <== NOT EXECUTED return true; } } return false; } 4b17e: 4e75 rts 00043bb0 : long fpathconf( int fd, int name ) { 43bb0: 4e56 0000 linkw %fp,#0 43bb4: 202e 0008 movel %fp@(8),%d0 43bb8: 222e 000c movel %fp@(12),%d1 43bbc: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43bbe: b0b9 0006 0084 cmpl 60084 ,%d0 43bc4: 6400 00f0 bccw 43cb6 <== ALWAYS TAKEN iop = rtems_libio_iop(fd); 43bc8: 2079 0006 170c moveal 6170c ,%a0 43bce: ed88 lsll #6,%d0 43bd0: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43bd2: 2428 0014 movel %a0@(20),%d2 43bd6: 0802 0008 btst #8,%d2 43bda: 6700 00da beqw 43cb6 <== ALWAYS TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 43bde: 0802 0001 btst #1,%d2 43be2: 670a beqs 43bee <== ALWAYS TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43be4: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 43be8: 700b moveq #11,%d0 43bea: b081 cmpl %d1,%d0 43bec: 6416 bccs 43c04 <== ALWAYS TAKEN break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43bee: 4eb9 0005 01f0 jsr 501f0 <__errno> break; } return return_value; } 43bf4: 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 ); 43bf8: 2040 moveal %d0,%a0 43bfa: 7216 moveq #22,%d1 43bfc: 70ff moveq #-1,%d0 break; } return return_value; } 43bfe: 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 ); 43c00: 2081 movel %d1,%a0@ break; } return return_value; } 43c02: 4e75 rts * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 43c04: 303b 1a08 movew %pc@(43c0e ,%d1:l:2),%d0 43c08: 48c0 extl %d0 43c0a: 4efb 0802 jmp %pc@(43c0e ,%d0:l) 43c0e: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43c14: 006c 0154 <== NOT EXECUTED 43c16: 0060 0140 <== NOT EXECUTED 43c18: 0054 0124 <== NOT EXECUTED 43c1a: 0048 0110 <== NOT EXECUTED 43c1c: 003c 074 <== NOT EXECUTED 43c1e: 0030 060 <== NOT EXECUTED 43c20: 0024 044 <== NOT EXECUTED 43c22: 0018 030 <== NOT EXECUTED 43c24: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c2a: 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; 43c2c: 2028 005c movel %a0@(92),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c30: 4e75 rts 43c32: 242e fffc movel %fp@(-4),%d2 43c36: 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; 43c38: 2028 0050 movel %a0@(80),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c3c: 4e75 rts 43c3e: 242e fffc movel %fp@(-4),%d2 43c42: 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; 43c44: 2028 0064 movel %a0@(100),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c48: 4e75 rts 43c4a: 242e fffc movel %fp@(-4),%d2 43c4e: 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; 43c50: 2028 0058 movel %a0@(88),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c54: 4e75 rts 43c56: 242e fffc movel %fp@(-4),%d2 43c5a: 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; 43c5c: 2028 0054 movel %a0@(84),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c60: 4e75 rts 43c62: 242e fffc movel %fp@(-4),%d2 43c66: 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; 43c68: 2028 004c movel %a0@(76),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c6c: 4e75 rts 43c6e: 242e fffc movel %fp@(-4),%d2 43c72: 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; 43c74: 2028 0048 movel %a0@(72),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c78: 4e75 rts 43c7a: 242e fffc movel %fp@(-4),%d2 43c7e: 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; 43c80: 2028 0044 movel %a0@(68),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c84: 4e75 rts 43c86: 242e fffc movel %fp@(-4),%d2 43c8a: 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; 43c8c: 2028 0040 movel %a0@(64),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c90: 4e75 rts 43c92: 242e fffc movel %fp@(-4),%d2 43c96: 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; 43c98: 2028 003c movel %a0@(60),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c9c: 4e75 rts 43c9e: 242e fffc movel %fp@(-4),%d2 43ca2: 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; 43ca4: 2028 0038 movel %a0@(56),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43ca8: 4e75 rts 43caa: 242e fffc movel %fp@(-4),%d2 43cae: 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; 43cb0: 2028 0060 movel %a0@(96),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cb4: 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); 43cb6: 4eb9 0005 01f0 jsr 501f0 <__errno> 43cbc: 7409 moveq #9,%d2 43cbe: 2040 moveal %d0,%a0 43cc0: 70ff moveq #-1,%d0 43cc2: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cc4: 242e fffc movel %fp@(-4),%d2 43cc8: 4e5e unlk %fp 43cca: 4e75 rts 0004a51c : void free( void *ptr ) { MSBUMP(free_calls, 1); 4a51c: 4e56 0000 linkw %fp,#0 4a520: 52b9 0005 d810 addql #1,5d810 4a526: 2f02 movel %d2,%sp@- 4a528: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 4a52c: 6732 beqs 4a560 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4a52e: 7003 moveq #3,%d0 4a530: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 4a536: 6758 beqs 4a590 <== NEVER TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4a538: 2079 0005 c7c6 moveal 5c7c6 ,%a0 4a53e: 4a88 tstl %a0 4a540: 670a beqs 4a54c <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 4a542: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a544: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 4a548: 4e90 jsr %a0@ <== NOT EXECUTED 4a54a: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4a54c: 2f02 movel %d2,%sp@- 4a54e: 2f39 0005 c180 movel 5c180 ,%sp@- 4a554: 4eb9 0004 b68c jsr 4b68c <_Protected_heap_Free> 4a55a: 508f addql #8,%sp 4a55c: 4a00 tstb %d0 4a55e: 6708 beqs 4a568 <== ALWAYS TAKEN RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a560: 242e fffc movel %fp@(-4),%d2 4a564: 4e5e unlk %fp 4a566: 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 4a568: 2079 0005 c180 moveal 5c180 ,%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", 4a56e: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 4a572: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 4a576: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a578: 4879 0005 b5e2 pea 5b5e2 <== NOT EXECUTED 4a57e: 4eb9 0004 33ac jsr 433ac <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a584: 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", 4a588: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a58c: 4e5e unlk %fp <== NOT EXECUTED 4a58e: 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()) && 4a590: 4eb9 0004 a9f0 jsr 4a9f0 4a596: 4a00 tstb %d0 4a598: 669e bnes 4a538 <== NEVER TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4a59a: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a59e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a5a2: 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); 4a5a4: 4ef9 0004 aa30 jmp 4aa30 <== NOT EXECUTED ... 000685ac : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 685ac: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 685b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 685b2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 685b6: b5fc 000a 515c cmpal #676188,%a2 <== NOT EXECUTED 685bc: 6740 beqs 685fe <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 685be: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 685c2: 4a88 tstl %a0 <== NOT EXECUTED 685c4: 6710 beqs 685d6 <== NOT EXECUTED 685c6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 685ca: 4a88 tstl %a0 <== NOT EXECUTED 685cc: 6708 beqs 685d6 <== NOT EXECUTED 685ce: 486a 0004 pea %a2@(4) <== NOT EXECUTED 685d2: 4e90 jsr %a0@ <== NOT EXECUTED 685d4: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 685d6: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 685da: 4a88 tstl %a0 <== NOT EXECUTED 685dc: 6710 beqs 685ee <== NOT EXECUTED 685de: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 685e2: 4a88 tstl %a0 <== NOT EXECUTED 685e4: 6708 beqs 685ee <== NOT EXECUTED 685e6: 486a 0018 pea %a2@(24) <== NOT EXECUTED 685ea: 4e90 jsr %a0@ <== NOT EXECUTED 685ec: 588f addql #4,%sp <== NOT EXECUTED free(env); 685ee: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 685f2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 685f6: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 685f8: 4ef9 0004 784c jmp 4784c <== NOT EXECUTED } } 685fe: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 68602: 4e5e unlk %fp <== NOT EXECUTED 68604: 4e75 rts 00059ff8 : int fstat( int fd, struct stat *sbuf ) { 59ff8: 4e56 0000 linkw %fp,#0 59ffc: 202e 0008 movel %fp@(8),%d0 5a000: 2f0a movel %a2,%sp@- 5a002: 2f02 movel %d2,%sp@- 5a004: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5a008: 6700 0096 beqw 5a0a0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5a00c: b0b9 0005 c174 cmpl 5c174 ,%d0 5a012: 6456 bccs 5a06a 5a014: 2479 0005 d7f8 moveal 5d7f8 ,%a2 5a01a: ed88 lsll #6,%d0 5a01c: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5a01e: 202a 0014 movel %a2@(20),%d0 5a022: 0280 0000 0100 andil #256,%d0 5a028: 6740 beqs 5a06a <== ALWAYS TAKEN if ( !iop->handlers ) 5a02a: 206a 003c moveal %a2@(60),%a0 5a02e: 4a88 tstl %a0 5a030: 6738 beqs 5a06a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 5a032: 4aa8 0018 tstl %a0@(24) 5a036: 674c beqs 5a084 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5a038: 4878 0046 pea 46 5a03c: 42a7 clrl %sp@- 5a03e: 2f02 movel %d2,%sp@- 5a040: 4eb9 0004 e098 jsr 4e098 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5a046: 206a 003c moveal %a2@(60),%a0 5a04a: 45ea 0018 lea %a2@(24),%a2 5a04e: 4fef 000c lea %sp@(12),%sp 5a052: 2d42 000c movel %d2,%fp@(12) } 5a056: 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 ); 5a05a: 2d4a 0008 movel %a2,%fp@(8) } 5a05e: 246e fffc moveal %fp@(-4),%a2 5a062: 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 ); 5a064: 2268 0018 moveal %a0@(24),%a1 5a068: 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 ); 5a06a: 4eb9 0004 d808 jsr 4d808 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a070: 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 ); 5a074: 2040 moveal %d0,%a0 5a076: 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 ); } 5a078: 246e fffc moveal %fp@(-4),%a2 5a07c: 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 ); 5a07e: 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 ); } 5a080: 70ff moveq #-1,%d0 5a082: 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 ); 5a084: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a08a: 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 ); 5a08e: 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 ); } 5a090: 70ff moveq #-1,%d0 <== NOT EXECUTED 5a092: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5a096: 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 ); 5a098: 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 ); } 5a09e: 4e75 rts <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5a0a0: 4eb9 0004 d808 jsr 4d808 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a0a6: 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 ); 5a0aa: 2040 moveal %d0,%a0 5a0ac: 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 ); } 5a0ae: 70ff moveq #-1,%d0 5a0b0: 246e fffc moveal %fp@(-4),%a2 5a0b4: 4e5e unlk %fp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5a0b6: 2081 movel %d1,%a0@ * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a0b8: 4e75 rts 00067498 : #include int fsync( int fd ) { 67498: 4e56 0000 linkw %fp,#0 6749c: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 674a0: b0b9 000a 04d4 cmpl a04d4 ,%d0 674a6: 6430 bccs 674d8 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 674a8: 2079 000a 5100 moveal a5100 ,%a0 674ae: ed88 lsll #6,%d0 674b0: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 674b2: 2028 0014 movel %a0@(20),%d0 674b6: 0800 0008 btst #8,%d0 674ba: 671c beqs 674d8 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 674bc: 44c0 movew %d0,%ccr 674be: 662a bnes 674ea /* * Now process the fsync(). */ if ( !iop->handlers ) 674c0: 2268 003c moveal %a0@(60),%a1 674c4: 4a89 tstl %a1 674c6: 6710 beqs 674d8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 674c8: 2269 0028 moveal %a1@(40),%a1 674cc: 4a89 tstl %a1 674ce: 672c beqs 674fc rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 674d0: 2d48 0008 movel %a0,%fp@(8) } 674d4: 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 ); 674d6: 4ed1 jmp %a1@ /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 674d8: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 674de: 4e5e unlk %fp <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 674e0: 2040 moveal %d0,%a0 <== NOT EXECUTED 674e2: 7009 moveq #9,%d0 <== NOT EXECUTED 674e4: 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 ); } 674e6: 70ff moveq #-1,%d0 <== NOT EXECUTED 674e8: 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 ); 674ea: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 674f0: 7216 moveq #22,%d1 674f2: 2040 moveal %d0,%a0 if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 674f4: 70ff moveq #-1,%d0 674f6: 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 ); 674f8: 2081 movel %d1,%a0@ if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 674fa: 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 ); 674fc: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> return (*iop->handlers->fsync_h)( iop ); } 67502: 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 ); 67504: 2040 moveal %d0,%a0 return (*iop->handlers->fsync_h)( iop ); } 67506: 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 ); 67508: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fsync_h)( iop ); } 6750e: 4e75 rts 0004a5ac : int ftruncate( int fd, off_t length ) { 4a5ac: 4e56 ffec linkw %fp,#-20 4a5b0: 202e 0008 movel %fp@(8),%d0 4a5b4: 2f0a movel %a2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4a5b6: b0b9 0005 c174 cmpl 5c174 ,%d0 4a5bc: 647a bccs 4a638 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 4a5be: 2479 0005 d7f8 moveal 5d7f8 ,%a2 4a5c4: ed88 lsll #6,%d0 4a5c6: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a5c8: 202a 0014 movel %a2@(20),%d0 4a5cc: 0280 0000 0100 andil #256,%d0 4a5d2: 6764 beqs 4a638 <== ALWAYS TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a5d4: 43ee ffec lea %fp@(-20),%a1 4a5d8: 22aa 0018 movel %a2@(24),%a1@ 4a5dc: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4a5e2: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4a5e8: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 4a5ee: 206e fff8 moveal %fp@(-8),%a0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a5f2: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 4a5f8: 2068 0010 moveal %a0@(16),%a0 4a5fc: 4a88 tstl %a0 4a5fe: 6764 beqs 4a664 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4a600: 2f09 movel %a1,%sp@- 4a602: 4e90 jsr %a0@ 4a604: 588f addql #4,%sp 4a606: 7201 moveq #1,%d1 4a608: b280 cmpl %d0,%d1 4a60a: 6770 beqs 4a67c rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a60c: 7004 moveq #4,%d0 4a60e: c0aa 0014 andl %a2@(20),%d0 4a612: 673a beqs 4a64e <== ALWAYS TAKEN if ( !iop->handlers->ftruncate_h ) 4a614: 206a 003c moveal %a2@(60),%a0 4a618: 2068 0020 moveal %a0@(32),%a0 4a61c: 4a88 tstl %a0 4a61e: 6744 beqs 4a664 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4a620: 2f2e 0010 movel %fp@(16),%sp@- 4a624: 2f2e 000c movel %fp@(12),%sp@- 4a628: 2f0a movel %a2,%sp@- 4a62a: 4e90 jsr %a0@ } 4a62c: 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 ); 4a630: 4fef 000c lea %sp@(12),%sp } 4a634: 4e5e unlk %fp 4a636: 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); 4a638: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a63e: 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); 4a642: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a644: 7209 moveq #9,%d1 <== NOT EXECUTED 4a646: 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 ); } 4a648: 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); 4a64a: 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 ); } 4a64c: 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 ); 4a64e: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a654: 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 ); 4a658: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a65a: 7216 moveq #22,%d1 <== NOT EXECUTED 4a65c: 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 ); } 4a65e: 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 ); 4a660: 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 ); } 4a662: 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 ); 4a664: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a66a: 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 ); 4a66e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a670: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a672: 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 ); 4a674: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a67a: 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 ); 4a67c: 4eb9 0004 d808 jsr 4d808 <__errno> if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a682: 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 ); 4a686: 2040 moveal %d0,%a0 4a688: 7215 moveq #21,%d1 4a68a: 70ff moveq #-1,%d0 if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a68c: 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 ); 4a68e: 2081 movel %d1,%a0@ if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a690: 4e75 rts ... 000967f0 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 967f0: 4e56 ffec linkw %fp,#-20 967f4: 202e 0008 movel %fp@(8),%d0 967f8: 2f0a movel %a2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 967fa: b0b9 000a 04d4 cmpl a04d4 ,%d0 96800: 655e bcss 96860 <== NEVER TAKEN 96802: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 96804: 43ee ffec lea %fp@(-20),%a1 96808: 22aa 0018 movel %a2@(24),%a1@ 9680c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 96812: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 96818: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 9681e: 206e fff8 moveal %fp@(-8),%a0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 96822: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 96828: 2068 0010 moveal %a0@(16),%a0 9682c: 4a88 tstl %a0 9682e: 6752 beqs 96882 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 96830: 2f09 movel %a1,%sp@- 96832: 4e90 jsr %a0@ 96834: 588f addql #4,%sp 96836: 7201 moveq #1,%d1 96838: b280 cmpl %d0,%d1 9683a: 6630 bnes 9686c /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 9683c: 206a 003c moveal %a2@(60),%a0 96840: 2068 0008 moveal %a0@(8),%a0 96844: 4a88 tstl %a0 96846: 673a beqs 96882 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 96848: 2f2e 0010 movel %fp@(16),%sp@- 9684c: 2f2e 000c movel %fp@(12),%sp@- 96850: 2f0a movel %a2,%sp@- 96852: 4e90 jsr %a0@ } 96854: 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 ); 96858: 4fef 000c lea %sp@(12),%sp } 9685c: 4e5e unlk %fp 9685e: 4e75 rts /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 96860: 2479 000a 5100 moveal a5100 ,%a2 96866: ed88 lsll #6,%d0 96868: d5c0 addal %d0,%a2 9686a: 6098 bras 96804 <== ALWAYS TAKEN 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 ); 9686c: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 96872: 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 ); 96876: 2040 moveal %d0,%a0 96878: 7214 moveq #20,%d1 9687a: 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 ); } 9687c: 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 ); 9687e: 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 ); } 96880: 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 ); 96882: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 96888: 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 ); 9688c: 2040 moveal %d0,%a0 <== NOT EXECUTED 9688e: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 96890: 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 ); 96892: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 96898: 4e75 rts <== NOT EXECUTED ... 00067620 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 67620: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 67624: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED return _POSIX_types_Gid; } 6762a: 4e5e unlk %fp <== NOT EXECUTED 6762c: 3028 0034 movew %a0@(52),%d0 <== NOT EXECUTED 67630: 4e75 rts 00067bb6 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67bb6: 4e56 ffe0 linkw %fp,#-32 67bba: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 67bbe: 242e 0008 movel %fp@(8),%d2 67bc2: 47fa fc26 lea %pc@(677ea ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 67bc6: 49f9 0008 54a0 lea 854a0 ,%a4 struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67bcc: 2c2e 000c movel %fp@(12),%d6 67bd0: 246e 0010 moveal %fp@(16),%a2 67bd4: 2a2e 0014 movel %fp@(20),%d5 67bd8: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 67bdc: 4eb9 0006 7a72 jsr 67a72 if ((fp = fopen("/etc/group", "r")) == NULL) { 67be2: 4879 0009 90a7 pea 990a7 67be8: 4879 0009 77e5 pea 977e5 <_rodata_start+0x845> 67bee: 4eb9 0008 0358 jsr 80358 67bf4: 508f addql #8,%sp 67bf6: 2600 movel %d0,%d3 67bf8: 6778 beqs 67c72 <== ALWAYS TAKEN errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 67bfa: 2f04 movel %d4,%sp@- 67bfc: 2f05 movel %d5,%sp@- 67bfe: 2f0a movel %a2,%sp@- 67c00: 2f03 movel %d3,%sp@- 67c02: 4e93 jsr %a3@ 67c04: 4fef 0010 lea %sp@(16),%sp 67c08: 4a80 tstl %d0 67c0a: 6744 beqs 67c50 <== ALWAYS TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 67c0c: 4a82 tstl %d2 67c0e: 672e beqs 67c3e <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); 67c10: 2f02 movel %d2,%sp@- 67c12: 2f12 movel %a2@,%sp@- 67c14: 4e94 jsr %a4@ 67c16: 508f addql #8,%sp 67c18: 4a80 tstl %d0 67c1a: 57c0 seq %d0 67c1c: 49c0 extbl %d0 67c1e: 4480 negl %d0 } else { match = (grp->gr_gid == gid); } if (match) { 67c20: 67d8 beqs 67bfa fclose(fp); 67c22: 2f03 movel %d3,%sp@- 67c24: 4eb9 0007 faf2 jsr 7faf2 *result = grp; 67c2a: 206e 001c moveal %fp@(28),%a0 return 0; 67c2e: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 67c30: 4280 clrl %d0 67c32: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 67c34: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 67c3a: 4e5e unlk %fp 67c3c: 4e75 rts } if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 67c3e: 4280 clrl %d0 <== NOT EXECUTED 67c40: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 67c44: bc80 cmpl %d0,%d6 <== NOT EXECUTED 67c46: 57c0 seq %d0 <== NOT EXECUTED 67c48: 49c0 extbl %d0 <== NOT EXECUTED 67c4a: 4480 negl %d0 <== NOT EXECUTED } if (match) { 67c4c: 67ac beqs 67bfa <== NOT EXECUTED 67c4e: 60d2 bras 67c22 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 67c50: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 67c56: 2040 moveal %d0,%a0 <== NOT EXECUTED 67c58: 7016 moveq #22,%d0 <== NOT EXECUTED 67c5a: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 67c5c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67c5e: 4eb9 0007 faf2 jsr 7faf2 <== NOT EXECUTED return -1; 67c64: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 67c66: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67c68: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 67c6e: 4e5e unlk %fp <== NOT EXECUTED 67c70: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 67c72: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 67c78: 7216 moveq #22,%d1 <== NOT EXECUTED 67c7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 67c7c: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67c7e: 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; 67c84: 2081 movel %d1,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67c86: 4e5e unlk %fp <== NOT EXECUTED 67c88: 4e75 rts 00067906 : return NULL; return p; } struct group *getgrent(void) { 67906: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 6790a: 2039 000a 4892 movel a4892 ,%d0 <== NOT EXECUTED 67910: 6608 bnes 6791a <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 67912: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 67914: 2001 movel %d1,%d0 <== NOT EXECUTED 67916: 4e5e unlk %fp <== NOT EXECUTED 67918: 4e75 rts <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 6791a: 4878 00c8 pea c8 <== NOT EXECUTED 6791e: 4879 000a 4896 pea a4896 <== NOT EXECUTED 67924: 4879 000a 495e pea a495e <== NOT EXECUTED 6792a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6792c: 4eba febc jsr %pc@(677ea ) <== NOT EXECUTED 67930: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 67934: 223c 000a 495e movel #674142,%d1 <== NOT EXECUTED 6793a: 4a80 tstl %d0 <== NOT EXECUTED 6793c: 67d4 beqs 67912 <== NOT EXECUTED return NULL; return &grent; } 6793e: 2001 movel %d1,%d0 <== NOT EXECUTED 67940: 4e5e unlk %fp <== NOT EXECUTED 67942: 4e75 rts 00067cb0 : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 67cb0: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 67cb2: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 67cb6: 486e fffc pea %fp@(-4) <== NOT EXECUTED 67cba: 4878 00c8 pea c8 <== NOT EXECUTED 67cbe: 4879 000a 4896 pea a4896 <== NOT EXECUTED 67cc4: 4879 000a 495e pea a495e <== NOT EXECUTED 67cca: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67cce: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67cd0: 4eb9 0006 7c8a jsr 67c8a <== NOT EXECUTED 67cd6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 67cda: 4a80 tstl %d0 <== NOT EXECUTED 67cdc: 6608 bnes 67ce6 <== NOT EXECUTED return NULL; return p; 67cde: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 67ce2: 4e5e unlk %fp <== NOT EXECUTED 67ce4: 4e75 rts <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 67ce6: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 67ce8: 4e5e unlk %fp <== NOT EXECUTED 67cea: 4e75 rts 00067c8a : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 67c8a: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67c8c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 67c90: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 67c94: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 67c98: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 67c9c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 67ca0: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67ca4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67ca6: 42a7 clrl %sp@- <== NOT EXECUTED 67ca8: 4eba ff0c jsr %pc@(67bb6 ) <== NOT EXECUTED } 67cac: 4e5e unlk %fp <== NOT EXECUTED 67cae: 4e75 rts 00067d0e : struct group *getgrnam( const char *name ) { 67d0e: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 67d12: 486e fffc pea %fp@(-4) 67d16: 4878 00c8 pea c8 67d1a: 4879 000a 4896 pea a4896 67d20: 4879 000a 495e pea a495e 67d26: 2f2e 0008 movel %fp@(8),%sp@- 67d2a: 4eb9 0006 7cec jsr 67cec 67d30: 4fef 0014 lea %sp@(20),%sp 67d34: 4a80 tstl %d0 67d36: 6608 bnes 67d40 <== ALWAYS TAKEN return NULL; return p; 67d38: 202e fffc movel %fp@(-4),%d0 } 67d3c: 4e5e unlk %fp 67d3e: 4e75 rts const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 67d40: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 67d42: 4e5e unlk %fp <== NOT EXECUTED 67d44: 4e75 rts 0005a0d4 : */ pid_t getpid( void ) { return _Objects_Local_node; } 5a0d4: 7001 moveq #1,%d0 <== NOT EXECUTED * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 5a0d6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return _Objects_Local_node; } 5a0da: 4e5e unlk %fp <== NOT EXECUTED 5a0dc: 4e75 rts 00067d80 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 67d80: 4e56 ffe0 linkw %fp,#-32 67d84: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 67d88: 242e 0008 movel %fp@(8),%d2 67d8c: 47fa fbb6 lea %pc@(67944 ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 67d90: 49f9 0008 54a0 lea 854a0 ,%a4 struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 67d96: 2c2e 000c movel %fp@(12),%d6 67d9a: 246e 0010 moveal %fp@(16),%a2 67d9e: 2a2e 0014 movel %fp@(20),%d5 67da2: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 67da6: 4eb9 0006 7a72 jsr 67a72 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 67dac: 4879 0009 90a7 pea 990a7 67db2: 4879 0009 77a0 pea 977a0 <_rodata_start+0x800> 67db8: 4eb9 0008 0358 jsr 80358 67dbe: 508f addql #8,%sp 67dc0: 2600 movel %d0,%d3 67dc2: 6778 beqs 67e3c <== ALWAYS TAKEN errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 67dc4: 2f04 movel %d4,%sp@- 67dc6: 2f05 movel %d5,%sp@- 67dc8: 2f0a movel %a2,%sp@- 67dca: 2f03 movel %d3,%sp@- 67dcc: 4e93 jsr %a3@ 67dce: 4fef 0010 lea %sp@(16),%sp 67dd2: 4a80 tstl %d0 67dd4: 6744 beqs 67e1a <== ALWAYS TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 67dd6: 4a82 tstl %d2 67dd8: 672e beqs 67e08 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); 67dda: 2f02 movel %d2,%sp@- 67ddc: 2f12 movel %a2@,%sp@- 67dde: 4e94 jsr %a4@ 67de0: 508f addql #8,%sp 67de2: 4a80 tstl %d0 67de4: 57c0 seq %d0 67de6: 49c0 extbl %d0 67de8: 4480 negl %d0 } else { match = (pwd->pw_uid == uid); } if (match) { 67dea: 67d8 beqs 67dc4 fclose(fp); 67dec: 2f03 movel %d3,%sp@- 67dee: 4eb9 0007 faf2 jsr 7faf2 *result = pwd; 67df4: 206e 001c moveal %fp@(28),%a0 return 0; 67df8: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 67dfa: 4280 clrl %d0 67dfc: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 67dfe: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 67e04: 4e5e unlk %fp 67e06: 4e75 rts } if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 67e08: 4280 clrl %d0 <== NOT EXECUTED 67e0a: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 67e0e: bc80 cmpl %d0,%d6 <== NOT EXECUTED 67e10: 57c0 seq %d0 <== NOT EXECUTED 67e12: 49c0 extbl %d0 <== NOT EXECUTED 67e14: 4480 negl %d0 <== NOT EXECUTED } if (match) { 67e16: 67ac beqs 67dc4 <== NOT EXECUTED 67e18: 60d2 bras 67dec <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 67e1a: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 67e20: 7416 moveq #22,%d2 <== NOT EXECUTED 67e22: 2040 moveal %d0,%a0 <== NOT EXECUTED 67e24: 2082 movel %d2,%a0@ <== NOT EXECUTED fclose(fp); 67e26: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67e28: 4eb9 0007 faf2 jsr 7faf2 <== NOT EXECUTED return -1; 67e2e: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 67e30: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67e32: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 67e38: 4e5e unlk %fp <== NOT EXECUTED 67e3a: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 67e3c: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 67e42: 7616 moveq #22,%d3 <== NOT EXECUTED 67e44: 2040 moveal %d0,%a0 <== NOT EXECUTED 67e46: 70ff moveq #-1,%d0 <== NOT EXECUTED 67e48: 2083 movel %d3,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67e4a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 67e50: 4e5e unlk %fp <== NOT EXECUTED 67e52: 4e75 rts 00067a34 : return NULL; return p; } struct passwd *getpwent(void) { 67a34: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 67a38: 2039 000a 47aa movel a47aa ,%d0 <== NOT EXECUTED 67a3e: 6608 bnes 67a48 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 67a40: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 67a42: 2001 movel %d1,%d0 <== NOT EXECUTED 67a44: 4e5e unlk %fp <== NOT EXECUTED 67a46: 4e75 rts <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 67a48: 4878 00c8 pea c8 <== NOT EXECUTED 67a4c: 4879 000a 47ae pea a47ae <== NOT EXECUTED 67a52: 4879 000a 4876 pea a4876 <== NOT EXECUTED 67a58: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67a5a: 4eba fee8 jsr %pc@(67944 ) <== NOT EXECUTED 67a5e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 67a62: 223c 000a 4876 movel #673910,%d1 <== NOT EXECUTED 67a68: 4a80 tstl %d0 <== NOT EXECUTED 67a6a: 67d4 beqs 67a40 <== NOT EXECUTED return NULL; return &pwent; } 67a6c: 2001 movel %d1,%d0 <== NOT EXECUTED 67a6e: 4e5e unlk %fp <== NOT EXECUTED 67a70: 4e75 rts 00067ed8 : struct passwd *getpwnam( const char *name ) { 67ed8: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 67edc: 486e fffc pea %fp@(-4) 67ee0: 4878 00c8 pea c8 67ee4: 4879 000a 47ae pea a47ae 67eea: 4879 000a 4876 pea a4876 67ef0: 2f2e 0008 movel %fp@(8),%sp@- 67ef4: 4eb9 0006 7eb6 jsr 67eb6 67efa: 4fef 0014 lea %sp@(20),%sp 67efe: 4a80 tstl %d0 67f00: 6608 bnes 67f0a <== ALWAYS TAKEN return NULL; return p; 67f02: 202e fffc movel %fp@(-4),%d0 } 67f06: 4e5e unlk %fp 67f08: 4e75 rts const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 67f0a: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 67f0c: 4e5e unlk %fp <== NOT EXECUTED 67f0e: 4e75 rts 00067e7a : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 67e7a: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 67e7c: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 67e80: 486e fffc pea %fp@(-4) <== NOT EXECUTED 67e84: 4878 00c8 pea c8 <== NOT EXECUTED 67e88: 4879 000a 47ae pea a47ae <== NOT EXECUTED 67e8e: 4879 000a 4876 pea a4876 <== NOT EXECUTED 67e94: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67e98: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67e9a: 4eb9 0006 7e54 jsr 67e54 <== NOT EXECUTED 67ea0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 67ea4: 4a80 tstl %d0 <== NOT EXECUTED 67ea6: 6608 bnes 67eb0 <== NOT EXECUTED return NULL; return p; 67ea8: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 67eac: 4e5e unlk %fp <== NOT EXECUTED 67eae: 4e75 rts <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 67eb0: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 67eb2: 4e5e unlk %fp <== NOT EXECUTED 67eb4: 4e75 rts 00067e54 : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 67e54: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 67e56: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 67e5a: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 67e5e: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 67e62: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 67e66: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 67e6a: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67e6e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67e70: 42a7 clrl %sp@- <== NOT EXECUTED 67e72: 4eba ff0c jsr %pc@(67d80 ) <== NOT EXECUTED } 67e76: 4e5e unlk %fp <== NOT EXECUTED 67e78: 4e75 rts 0004a694 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4a694: 4e56 ffec linkw %fp,#-20 4a698: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a69c: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4a6a0: 4a8a tstl %a2 4a6a2: 673c beqs 4a6e0 <== ALWAYS TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4a6a4: 203c 0000 0700 movel #1792,%d0 4a6aa: 40c2 movew %sr,%d2 4a6ac: 8082 orl %d2,%d0 4a6ae: 46c0 movew %d0,%sr _TOD_Get( &now ); 4a6b0: 486e fff8 pea %fp@(-8) 4a6b4: 4eb9 0004 b1dc jsr 4b1dc <_TOD_Get> _ISR_Enable(level); 4a6ba: 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; 4a6bc: 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; 4a6c2: 588f addql #4,%sp 4a6c4: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4a6c6: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4a6ca: 4c43 1801 remsl %d3,%d1,%d1 4a6ce: 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; 4a6d2: 24ae fff8 movel %fp@(-8),%a2@ } 4a6d6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4a6dc: 4e5e unlk %fp 4a6de: 4e75 rts void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4a6e0: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 4a6e6: 720e moveq #14,%d1 <== NOT EXECUTED 4a6e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a6ea: 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; } 4a6ec: 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; 4a6f2: 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; } 4a6f4: 4e5e unlk %fp <== NOT EXECUTED 4a6f6: 4e75 rts 00047968 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 47968: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4796c: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED return _POSIX_types_Uid; } 47972: 4e5e unlk %fp <== NOT EXECUTED 47974: 3028 0032 movew %a0@(50),%d0 <== NOT EXECUTED 47978: 4e75 rts 000528bc : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 528bc: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 528be: 4e56 0000 linkw %fp,#0 528c2: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 528c6: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 528ca: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 528cc: b0a9 0048 cmpl %a1@(72),%d0 528d0: 6708 beqs 528da <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 528d2: 241f movel %sp@+,%d2 <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 528d4: 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; } 528d6: 4e5e unlk %fp <== NOT EXECUTED 528d8: 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; 528da: 4280 clrl %d0 528dc: 4281 clrl %d1 528de: 4282 clrl %d2 528e0: 2141 000c movel %d1,%a0@(12) 528e4: 2142 0010 movel %d2,%a0@(16) return 0; } 528e8: 241f movel %sp@+,%d2 528ea: 4e5e unlk %fp 528ec: 4e75 rts 00052b1c : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 52b1c: 4e56 fec4 linkw %fp,#-316 52b20: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52b24: 266e 0008 moveal %fp@(8),%a3 int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 52b28: 206b 0038 moveal %a3@(56),%a0 52b2c: 2a08 movel %a0,%d5 52b2e: 0685 0000 0050 addil #80,%d5 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 52b34: 262e 0010 movel %fp@(16),%d3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 52b38: 2468 004c moveal %a0@(76),%a2 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 52b3c: ba8a cmpl %a2,%d5 52b3e: 6700 00c4 beqw 52c04 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 52b42: 223c 0000 0110 movel #272,%d1 52b48: 4c41 3003 remul %d1,%d3,%d3 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 52b4c: 282b 0010 movel %a3@(16),%d4 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 52b50: 2003 movel %d3,%d0 52b52: e98b lsll #4,%d3 52b54: e188 lsll #8,%d0 52b56: d680 addl %d0,%d3 52b58: d684 addl %d4,%d3 /* The directory was not empty so try to move to the desired entry in chain*/ for ( 52b5a: 4a83 tstl %d3 52b5c: 6f00 00a6 blew 52c04 <== ALWAYS TAKEN tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 52b60: 49ee fef0 lea %fp@(-272),%a4 52b64: 41ec 0010 lea %a4@(16),%a0 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 52b68: 4282 clrl %d2 52b6a: 4286 clrl %d6 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy( 52b6c: 4bf9 0005 3958 lea 53958 ,%a5 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 52b72: 2d48 feec movel %a0,%fp@(-276) /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 52b76: b484 cmpl %d4,%d2 52b78: 6c1c bges 52b96 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 52b7a: 2452 moveal %a2@,%a2 * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 52b7c: 0682 0000 0110 addil #272,%d2 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 52b82: b682 cmpl %d2,%d3 52b84: 6f04 bles 52b8a current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 52b86: ba8a cmpl %a2,%d5 52b88: 66ec bnes 52b76 the_node = the_node->next; } /* Success */ return bytes_transferred; } 52b8a: 2006 movel %d6,%d0 52b8c: 4cee 3cfc fec4 moveml %fp@(-316),%d2-%d7/%a2-%a5 52b92: 4e5e unlk %fp 52b94: 4e75 rts /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 52b96: 2e0a movel %a2,%d7 52b98: 0687 0000 000c addil #12,%d7 if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 52b9e: 2d6a 0034 fef0 movel %a2@(52),%fp@(-272) } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 52ba4: 323c 0110 movew #272,%d1 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 52ba8: 2d42 fef8 movel %d2,%fp@(-264) 52bac: 5bc0 smi %d0 52bae: 49c0 extbl %d0 52bb0: 2d40 fef4 movel %d0,%fp@(-268) tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 52bb4: 2f07 movel %d7,%sp@- } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 52bb6: 3d41 fefc movew %d1,%fp@(-260) the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 52bba: 4eb9 0005 44b4 jsr 544b4 strcpy( tmp_dirent.d_name, the_jnode->name ); 52bc0: 2e87 movel %d7,%sp@ /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 52bc2: 3d40 fefe movew %d0,%fp@(-258) strcpy( tmp_dirent.d_name, the_jnode->name ); 52bc6: 2f2e feec movel %fp@(-276),%sp@- 52bca: 4eb9 0005 4008 jsr 54008 memcpy( 52bd0: 4878 0110 pea 110 52bd4: 2f0c movel %a4,%sp@- 52bd6: 206e 000c moveal %fp@(12),%a0 52bda: 4870 6800 pea %a0@(00000000,%d6:l) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 52bde: 0686 0000 0110 addil #272,%d6 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy( 52be4: 4e95 jsr %a5@ buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 52be6: 4fef 0014 lea %sp@(20),%sp memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 52bea: 4280 clrl %d0 52bec: 223c 0000 0110 movel #272,%d1 52bf2: d3ab 0010 addl %d1,%a3@(16) 52bf6: 2e2b 000c movel %a3@(12),%d7 52bfa: df80 addxl %d0,%d7 52bfc: 2747 000c movel %d7,%a3@(12) 52c00: 6000 ff78 braw 52b7a <== ALWAYS TAKEN /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 52c04: 4286 clrl %d6 the_node = the_node->next; } /* Success */ return bytes_transferred; } 52c06: 2006 movel %d6,%d0 52c08: 4cee 3cfc fec4 moveml %fp@(-316),%d2-%d7/%a2-%a5 52c0e: 4e5e unlk %fp 52c10: 4e75 rts ... 00052a2a : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 52a2a: 4e56 fff8 linkw %fp,#-8 52a2e: 2f0b movel %a3,%sp@- 52a30: 266e 000c moveal %fp@(12),%a3 52a34: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 52a36: 2453 moveal %a3@,%a2 52a38: 200a movel %a2,%d0 52a3a: 0680 0000 0050 addil #80,%d0 52a40: b0aa 004c cmpl %a2@(76),%d0 52a44: 6600 0090 bnew 52ad6 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 52a48: 206b 0010 moveal %a3@(16),%a0 52a4c: b5e8 001c cmpal %a0@(28),%a2 52a50: 6700 009e beqw 52af0 <== ALWAYS TAKEN /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 52a54: 4aaa 0058 tstl %a2@(88) 52a58: 6600 0096 bnew 52af0 <== ALWAYS TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 52a5c: 4aaa 0008 tstl %a2@(8) 52a60: 670e beqs 52a70 52a62: 2f0a movel %a2,%sp@- 52a64: 4eb9 0004 86c8 jsr 486c8 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 52a6a: 588f addql #4,%sp 52a6c: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 52a70: 302a 0032 movew %a2@(50),%d0 52a74: 5380 subql #1,%d0 52a76: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 52a7a: 42a7 clrl %sp@- 52a7c: 486e fff8 pea %fp@(-8) 52a80: 4eb9 0004 4058 jsr 44058 52a86: 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) ) { 52a8c: 2f0a movel %a2,%sp@- 52a8e: 4eb9 0004 fe0a jsr 4fe0a 52a94: 4fef 000c lea %sp@(12),%sp 52a98: 4a80 tstl %d0 52a9a: 662c bnes 52ac8 52a9c: 4a6a 0032 tstw %a2@(50) 52aa0: 6626 bnes 52ac8 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 52aa2: 2079 0006 23ec moveal 623ec ,%a0 52aa8: 2653 moveal %a3@,%a3 52aaa: b7e8 0004 cmpal %a0@(4),%a3 52aae: 675a beqs 52b0a <== ALWAYS TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 52ab0: 2f0a movel %a2,%sp@- 52ab2: 4eb9 0004 3fc8 jsr 43fc8 52ab8: 588f addql #4,%sp 52aba: 4280 clrl %d0 } return 0; } 52abc: 246e fff0 moveal %fp@(-16),%a2 52ac0: 266e fff4 moveal %fp@(-12),%a3 52ac4: 4e5e unlk %fp 52ac6: 4e75 rts 52ac8: 246e fff0 moveal %fp@(-16),%a2 /* * Free memory associated with a memory file. */ free( the_jnode ); 52acc: 4280 clrl %d0 } return 0; } 52ace: 266e fff4 moveal %fp@(-12),%a3 52ad2: 4e5e unlk %fp 52ad4: 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 ); 52ad6: 4eb9 0005 3138 jsr 53138 <__errno> free( the_jnode ); } return 0; } 52adc: 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 ); 52ae0: 2040 moveal %d0,%a0 52ae2: 725a moveq #90,%d1 52ae4: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 52ae6: 266e fff4 moveal %fp@(-12),%a3 52aea: 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 ); 52aec: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 52aee: 4e75 rts /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 52af0: 4eb9 0005 3138 jsr 53138 <__errno> free( the_jnode ); } return 0; } 52af6: 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 ); 52afa: 2040 moveal %d0,%a0 52afc: 7210 moveq #16,%d1 52afe: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 52b00: 266e fff4 moveal %fp@(-12),%a3 52b04: 4e5e unlk %fp /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 52b06: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 52b08: 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; 52b0a: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 52b0e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52b10: 4eb9 0004 3fc8 jsr 43fc8 <== NOT EXECUTED 52b16: 588f addql #4,%sp <== NOT EXECUTED 52b18: 4280 clrl %d0 <== NOT EXECUTED 52b1a: 60a0 bras 52abc <== NOT EXECUTED 00067a72 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 67a72: 4e56 0000 linkw %fp,#0 67a76: 2f0a movel %a2,%sp@- 67a78: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 67a7a: 4a39 000a 47a8 tstb a47a8 67a80: 670c beqs 67a8e fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 67a82: 242e fff8 movel %fp@(-8),%d2 67a86: 246e fffc moveal %fp@(-4),%a2 67a8a: 4e5e unlk %fp 67a8c: 4e75 rts static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 67a8e: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 67a92: 45f9 0008 0358 lea 80358 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 67a98: 4879 0009 7686 pea 97686 <_rodata_start+0x6e6> FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 67a9e: 7001 moveq #1,%d0 67aa0: 13c0 000a 47a8 moveb %d0,a47a8 mkdir("/etc", 0777); 67aa6: 4eb9 0004 805c jsr 4805c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 67aac: 4879 0009 90a7 pea 990a7 67ab2: 4879 0009 77a0 pea 977a0 <_rodata_start+0x800> 67ab8: 4e92 jsr %a2@ 67aba: 4fef 0010 lea %sp@(16),%sp 67abe: 4a80 tstl %d0 67ac0: 677e beqs 67b40 <== NEVER TAKEN fclose(fp); 67ac2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67ac4: 4eb9 0007 faf2 jsr 7faf2 <== NOT EXECUTED 67aca: 588f addql #4,%sp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 67acc: 4879 0009 90a7 pea 990a7 67ad2: 4879 0009 77e5 pea 977e5 <_rodata_start+0x845> 67ad8: 4e92 jsr %a2@ 67ada: 508f addql #8,%sp 67adc: 4a80 tstl %d0 67ade: 6716 beqs 67af6 <== NEVER TAKEN fclose(fp); 67ae0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67ae2: 4eb9 0007 faf2 jsr 7faf2 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 67ae8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); 67aec: 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); } } 67aee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 67af2: 4e5e unlk %fp <== NOT EXECUTED 67af4: 4e75 rts <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 67af6: 4879 0009 8d18 pea 98d18 67afc: 4879 0009 77e5 pea 977e5 <_rodata_start+0x845> 67b02: 4eb9 0008 0358 jsr 80358 67b08: 508f addql #8,%sp 67b0a: 2440 moveal %d0,%a2 67b0c: 4a80 tstl %d0 67b0e: 6700 ff72 beqw 67a82 <== ALWAYS TAKEN fprintf( fp, "root:x:0:root\n" 67b12: 2f00 movel %d0,%sp@- 67b14: 4878 002a pea 2a 67b18: 4878 0001 pea 1 67b1c: 4879 0009 be9f pea 9be9f 67b22: 4eb9 0008 15d4 jsr 815d4 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 67b28: 2f0a movel %a2,%sp@- 67b2a: 4eb9 0007 faf2 jsr 7faf2 } } 67b30: 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); 67b34: 4fef 0014 lea %sp@(20),%sp } } 67b38: 246e fffc moveal %fp@(-4),%a2 67b3c: 4e5e unlk %fp 67b3e: 4e75 rts * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 67b40: 4879 0009 8d18 pea 98d18 67b46: 4879 0009 77a0 pea 977a0 <_rodata_start+0x800> 67b4c: 4e92 jsr %a2@ 67b4e: 508f addql #8,%sp 67b50: 2400 movel %d0,%d2 67b52: 6700 ff78 beqw 67acc <== ALWAYS TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 67b56: 2f00 movel %d0,%sp@- 67b58: 4878 0066 pea 66 67b5c: 4878 0001 pea 1 67b60: 4879 0009 be38 pea 9be38 67b66: 4eb9 0008 15d4 jsr 815d4 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 67b6c: 2f02 movel %d2,%sp@- 67b6e: 4eb9 0007 faf2 jsr 7faf2 67b74: 4fef 0014 lea %sp@(20),%sp 67b78: 6000 ff52 braw 67acc <== ALWAYS TAKEN 0004658c : int ioctl( int fd, ioctl_command_t command, ... ) { 4658c: 4e56 0000 linkw %fp,#0 46590: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 46594: b0b9 0006 2524 cmpl 62524 ,%d0 4659a: 643c bccs 465d8 iop = rtems_libio_iop( fd ); 4659c: 2079 0006 3c78 moveal 63c78 ,%a0 465a2: ed88 lsll #6,%d0 465a4: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 465a6: 2028 0014 movel %a0@(20),%d0 465aa: 0280 0000 0100 andil #256,%d0 465b0: 6726 beqs 465d8 <== ALWAYS TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 465b2: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 465b6: 2268 003c moveal %a0@(60),%a1 465ba: 4a89 tstl %a1 465bc: 671a beqs 465d8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 465be: 2269 0010 moveal %a1@(16),%a1 465c2: 4a89 tstl %a1 465c4: 6724 beqs 465ea <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 465c6: 2f00 movel %d0,%sp@- 465c8: 2f2e 000c movel %fp@(12),%sp@- 465cc: 2f08 movel %a0,%sp@- 465ce: 4e91 jsr %a1@ return rc; 465d0: 4fef 000c lea %sp@(12),%sp } 465d4: 4e5e unlk %fp 465d6: 4e75 rts /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 465d8: 4eb9 0005 3314 jsr 53314 <__errno> 465de: 7209 moveq #9,%d1 465e0: 2040 moveal %d0,%a0 465e2: 70ff moveq #-1,%d0 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465e4: 4e5e unlk %fp /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 465e6: 2081 movel %d1,%a0@ rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465e8: 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 ); 465ea: 4eb9 0005 3314 jsr 53314 <__errno> <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465f0: 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 ); 465f2: 2040 moveal %d0,%a0 <== NOT EXECUTED 465f4: 70ff moveq #-1,%d0 <== NOT EXECUTED 465f6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465fc: 4e75 rts <== NOT EXECUTED ... 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 c308 moveal 5c308 <__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 c274 movel 5c274 ,%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 4425a: 4e75 rts 0005a0fc : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 5a0fc: 4280 clrl %d0 <== NOT EXECUTED * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 5a0fe: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a102: 4e5e unlk %fp <== NOT EXECUTED 5a104: 4e75 rts 00067f84 : int link( const char *existing, const char *new ) { 67f84: 4e56 ffc4 linkw %fp,#-60 67f88: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 67f8c: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 67f90: 260e movel %fp,%d3 67f92: 0683 ffff ffe8 addil #-24,%d3 67f98: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 67f9a: 266e 000c moveal %fp@(12),%a3 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 67f9e: 4eb9 0008 5a18 jsr 85a18 67fa4: 7201 moveq #1,%d1 67fa6: 2e81 movel %d1,%sp@ 67fa8: 2f03 movel %d3,%sp@- 67faa: 42a7 clrl %sp@- 67fac: 2f00 movel %d0,%sp@- 67fae: 2f02 movel %d2,%sp@- 67fb0: 4eb9 0004 7758 jsr 47758 0, &existing_loc, true ); if ( result != 0 ) 67fb6: 4fef 0014 lea %sp@(20),%sp 67fba: 4a80 tstl %d0 67fbc: 6600 00cc bnew 6808a /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 67fc0: 742f moveq #47,%d2 67fc2: 1213 moveb %a3@,%d1 67fc4: 1001 moveb %d1,%d0 67fc6: 49c0 extbl %d0 67fc8: b480 cmpl %d0,%d2 67fca: 670e beqs 67fda 67fcc: 143c 005c moveb #92,%d2 67fd0: b480 cmpl %d0,%d2 67fd2: 6706 beqs 67fda <== ALWAYS TAKEN 67fd4: 4a01 tstb %d1 67fd6: 6600 00c0 bnew 68098 <== NEVER TAKEN 67fda: 2079 000a 07dc moveal a07dc ,%a0 67fe0: 45ee ffd4 lea %fp@(-44),%a2 67fe4: 7001 moveq #1,%d0 67fe6: 24a8 0018 movel %a0@(24),%a2@ 67fea: 2d68 001c ffd8 movel %a0@(28),%fp@(-40) 67ff0: 2d68 0020 ffdc movel %a0@(32),%fp@(-36) 67ff6: 2d68 0024 ffe0 movel %a0@(36),%fp@(-32) 67ffc: 2d68 0028 ffe4 movel %a0@(40),%fp@(-28) if ( !parent_loc.ops->evalformake_h ) { 68002: 206e ffe0 moveal %fp@(-32),%a0 68006: 2068 0004 moveal %a0@(4),%a0 6800a: 4a88 tstl %a0 6800c: 6700 0122 beqw 68130 <== ALWAYS TAKEN 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 ); 68010: 486e fffc pea %fp@(-4) 68014: 2f0a movel %a2,%sp@- 68016: 4873 0800 pea %a3@(00000000,%d0:l) 6801a: 4e90 jsr %a0@ if ( result != 0 ) { 6801c: 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 ); 68020: 2640 moveal %d0,%a3 if ( result != 0 ) { 68022: 4a80 tstl %d0 68024: 6600 00dc bnew 68102 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 68028: 202e fff8 movel %fp@(-8),%d0 6802c: b0ae ffe4 cmpl %fp@(-28),%d0 68030: 6600 008a bnew 680bc rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 68034: 226e ffe0 moveal %fp@(-32),%a1 68038: 2069 0008 moveal %a1@(8),%a0 6803c: 4a88 tstl %a0 6803e: 6700 0122 beqw 68162 <== ALWAYS TAKEN 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 ); 68042: 2f2e fffc movel %fp@(-4),%sp@- 68046: 2f0a movel %a2,%sp@- 68048: 2f03 movel %d3,%sp@- 6804a: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 6804c: 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 ); 68050: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 68052: 4fef 000c lea %sp@(12),%sp 68056: 4a88 tstl %a0 68058: 670e beqs 68068 <== ALWAYS TAKEN 6805a: 2068 001c moveal %a0@(28),%a0 6805e: 4a88 tstl %a0 68060: 6706 beqs 68068 <== ALWAYS TAKEN 68062: 2f03 movel %d3,%sp@- 68064: 4e90 jsr %a0@ 68066: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 68068: 206e ffe0 moveal %fp@(-32),%a0 6806c: 4a88 tstl %a0 6806e: 670e beqs 6807e <== ALWAYS TAKEN 68070: 2068 001c moveal %a0@(28),%a0 68074: 4a88 tstl %a0 68076: 6706 beqs 6807e <== ALWAYS TAKEN 68078: 2f0a movel %a2,%sp@- 6807a: 4e90 jsr %a0@ 6807c: 588f addql #4,%sp return result; } 6807e: 2002 movel %d2,%d0 68080: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 68086: 4e5e unlk %fp 68088: 4e75 rts * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 0, &existing_loc, true ); if ( result != 0 ) 6808a: 74ff moveq #-1,%d2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 6808c: 2002 movel %d2,%d0 6808e: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 68094: 4e5e unlk %fp 68096: 4e75 rts /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 68098: 2079 000a 07dc moveal a07dc ,%a0 6809e: 45ee ffd4 lea %fp@(-44),%a2 680a2: 5888 addql #4,%a0 680a4: 4280 clrl %d0 680a6: 2498 movel %a0@+,%a2@ 680a8: 2d58 ffd8 movel %a0@+,%fp@(-40) 680ac: 2d58 ffdc movel %a0@+,%fp@(-36) 680b0: 2d58 ffe0 movel %a0@+,%fp@(-32) 680b4: 2d50 ffe4 movel %a0@,%fp@(-28) 680b8: 6000 ff48 braw 68002 <== ALWAYS TAKEN * 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 ); 680bc: 206e fff4 moveal %fp@(-12),%a0 680c0: 4a88 tstl %a0 680c2: 670e beqs 680d2 <== ALWAYS TAKEN 680c4: 2068 001c moveal %a0@(28),%a0 680c8: 4a88 tstl %a0 680ca: 6706 beqs 680d2 <== ALWAYS TAKEN 680cc: 2f03 movel %d3,%sp@- 680ce: 4e90 jsr %a0@ 680d0: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 680d2: 206e ffe0 moveal %fp@(-32),%a0 680d6: 4a88 tstl %a0 680d8: 670e beqs 680e8 <== ALWAYS TAKEN 680da: 2068 001c moveal %a0@(28),%a0 680de: 4a88 tstl %a0 680e0: 6706 beqs 680e8 <== ALWAYS TAKEN 680e2: 2f0a movel %a2,%sp@- 680e4: 4e90 jsr %a0@ 680e6: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 680e8: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 680ee: 74ff moveq #-1,%d2 680f0: 2040 moveal %d0,%a0 680f2: 7012 moveq #18,%d0 680f4: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 680f6: 2002 movel %d2,%d0 680f8: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 680fe: 4e5e unlk %fp 68100: 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 ); 68102: 206e fff4 moveal %fp@(-12),%a0 68106: 4a88 tstl %a0 68108: 670e beqs 68118 <== ALWAYS TAKEN 6810a: 2068 001c moveal %a0@(28),%a0 6810e: 4a88 tstl %a0 68110: 6706 beqs 68118 <== ALWAYS TAKEN 68112: 2f03 movel %d3,%sp@- 68114: 4e90 jsr %a0@ 68116: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 68118: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 6811e: 74ff moveq #-1,%d2 68120: 2040 moveal %d0,%a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 68122: 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 ); 68124: 208b movel %a3,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 68126: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 6812c: 4e5e unlk %fp 6812e: 4e75 rts */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 68130: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 68134: 4a88 tstl %a0 <== NOT EXECUTED 68136: 670e beqs 68146 <== NOT EXECUTED 68138: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6813c: 4a88 tstl %a0 <== NOT EXECUTED 6813e: 6706 beqs 68146 <== NOT EXECUTED 68140: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68142: 4e90 jsr %a0@ <== NOT EXECUTED 68144: 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 ); 68146: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 6814c: 74ff moveq #-1,%d2 <== NOT EXECUTED 6814e: 2040 moveal %d0,%a0 <== NOT EXECUTED 68150: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 68156: 2002 movel %d2,%d0 <== NOT EXECUTED 68158: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 <== NOT EXECUTED 6815e: 4e5e unlk %fp <== NOT EXECUTED 68160: 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 ); 68162: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 68166: 4a88 tstl %a0 <== NOT EXECUTED 68168: 6712 beqs 6817c <== NOT EXECUTED 6816a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6816e: 4a88 tstl %a0 <== NOT EXECUTED 68170: 670a beqs 6817c <== NOT EXECUTED 68172: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68174: 4e90 jsr %a0@ <== NOT EXECUTED 68176: 226e ffe0 moveal %fp@(-32),%a1 <== NOT EXECUTED 6817a: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 6817c: 4a89 tstl %a1 <== NOT EXECUTED 6817e: 67c6 beqs 68146 <== NOT EXECUTED 68180: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68184: 4a88 tstl %a0 <== NOT EXECUTED 68186: 67be beqs 68146 <== NOT EXECUTED 68188: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6818a: 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 ); 6818c: 4e90 jsr %a0@ <== NOT EXECUTED 6818e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68190: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 68196: 2040 moveal %d0,%a0 <== NOT EXECUTED 68198: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 6819e: 60b6 bras 68156 <== NOT EXECUTED 0005a11c : off_t lseek( int fd, off_t offset, int whence ) { 5a11c: 4e56 ffe4 linkw %fp,#-28 5a120: 222e 0008 movel %fp@(8),%d1 5a124: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 5a128: 202e 0014 movel %fp@(20),%d0 5a12c: 282e 000c movel %fp@(12),%d4 5a130: 2a2e 0010 movel %fp@(16),%d5 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 5a134: b2b9 0005 c174 cmpl 5c174 ,%d1 5a13a: 6400 0118 bccw 5a254 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 5a13e: 2479 0005 d7f8 moveal 5d7f8 ,%a2 5a144: ed89 lsll #6,%d1 5a146: d5c1 addal %d1,%a2 rtems_libio_check_is_open(iop); 5a148: 222a 0014 movel %a2@(20),%d1 5a14c: 0281 0000 0100 andil #256,%d1 5a152: 6700 0100 beqw 5a254 <== ALWAYS TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 5a156: 206a 003c moveal %a2@(60),%a0 5a15a: 4aa8 0014 tstl %a0@(20) 5a15e: 6700 0112 beqw 5a272 <== ALWAYS TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 5a162: 7201 moveq #1,%d1 /* * Now process the lseek(). */ old_offset = iop->offset; 5a164: 242a 000c movel %a2@(12),%d2 5a168: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 5a16c: b280 cmpl %d0,%d1 5a16e: 6700 00ae beqw 5a21e 5a172: 7c02 moveq #2,%d6 5a174: bc80 cmpl %d0,%d6 5a176: 6752 beqs 5a1ca 5a178: 4a80 tstl %d0 5a17a: 6600 0084 bnew 5a200 <== ALWAYS TAKEN case SEEK_SET: iop->offset = offset; 5a17e: 2544 000c movel %d4,%a2@(12) 5a182: 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 ); 5a186: 2f00 movel %d0,%sp@- 5a188: 2f05 movel %d5,%sp@- 5a18a: 2f04 movel %d4,%sp@- 5a18c: 2f0a movel %a2,%sp@- 5a18e: 2068 0014 moveal %a0@(20),%a0 5a192: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5a194: 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 ); 5a198: 2800 movel %d0,%d4 5a19a: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5a19c: 70ff moveq #-1,%d0 5a19e: 72ff moveq #-1,%d1 5a1a0: 9285 subl %d5,%d1 5a1a2: 9184 subxl %d4,%d0 5a1a4: 670e beqs 5a1b4 <== ALWAYS TAKEN /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a1a6: 2205 movel %d5,%d1 5a1a8: 2004 movel %d4,%d0 5a1aa: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a1b0: 4e5e unlk %fp 5a1b2: 4e75 rts 5a1b4: 2205 movel %d5,%d1 5a1b6: 2004 movel %d4,%d0 * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; 5a1b8: 2542 000c movel %d2,%a2@(12) 5a1bc: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a1c0: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a1c6: 4e5e unlk %fp 5a1c8: 4e75 rts case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 5a1ca: 2c2a 0004 movel %a2@(4),%d6 5a1ce: 2e2a 0008 movel %a2@(8),%d7 5a1d2: de85 addl %d5,%d7 5a1d4: dd84 addxl %d4,%d6 5a1d6: 2546 000c movel %d6,%a2@(12) 5a1da: 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 ); 5a1de: 2f00 movel %d0,%sp@- 5a1e0: 2f05 movel %d5,%sp@- 5a1e2: 2f04 movel %d4,%sp@- 5a1e4: 2f0a movel %a2,%sp@- 5a1e6: 2068 0014 moveal %a0@(20),%a0 5a1ea: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5a1ec: 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 ); 5a1f0: 2800 movel %d0,%d4 5a1f2: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5a1f4: 70ff moveq #-1,%d0 5a1f6: 72ff moveq #-1,%d1 5a1f8: 9285 subl %d5,%d1 5a1fa: 9184 subxl %d4,%d0 5a1fc: 66a8 bnes 5a1a6 <== ALWAYS TAKEN 5a1fe: 60b4 bras 5a1b4 <== ALWAYS TAKEN case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 5a200: 4eb9 0004 d808 jsr 4d808 <__errno> 5a206: 2040 moveal %d0,%a0 5a208: 7016 moveq #22,%d0 5a20a: 78ff moveq #-1,%d4 5a20c: 7aff moveq #-1,%d5 5a20e: 2080 movel %d0,%a0@ /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a210: 2205 movel %d5,%d1 5a212: 2004 movel %d4,%d0 5a214: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a21a: 4e5e unlk %fp 5a21c: 4e75 rts case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 5a21e: 2c04 movel %d4,%d6 5a220: 2e05 movel %d5,%d7 5a222: de83 addl %d3,%d7 5a224: dd82 addxl %d2,%d6 5a226: 2546 000c movel %d6,%a2@(12) 5a22a: 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 ); 5a22e: 2f00 movel %d0,%sp@- 5a230: 2f05 movel %d5,%sp@- 5a232: 2f04 movel %d4,%sp@- 5a234: 2f0a movel %a2,%sp@- 5a236: 2068 0014 moveal %a0@(20),%a0 5a23a: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5a23c: 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 ); 5a240: 2800 movel %d0,%d4 5a242: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5a244: 70ff moveq #-1,%d0 5a246: 72ff moveq #-1,%d1 5a248: 9285 subl %d5,%d1 5a24a: 9184 subxl %d4,%d0 5a24c: 6600 ff58 bnew 5a1a6 <== NEVER TAKEN 5a250: 6000 ff62 braw 5a1b4 <== 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); 5a254: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 5a25a: 7209 moveq #9,%d1 <== NOT EXECUTED 5a25c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a25e: 78ff moveq #-1,%d4 <== NOT EXECUTED 5a260: 7aff moveq #-1,%d5 <== NOT EXECUTED 5a262: 2081 movel %d1,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a264: 2205 movel %d5,%d1 <== NOT EXECUTED 5a266: 2004 movel %d4,%d0 <== NOT EXECUTED 5a268: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5a26e: 4e5e unlk %fp <== NOT EXECUTED 5a270: 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 ); 5a272: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 5a278: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a27a: 78ff moveq #-1,%d4 <== NOT EXECUTED 5a27c: 7aff moveq #-1,%d5 <== NOT EXECUTED 5a27e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a284: 2205 movel %d5,%d1 <== NOT EXECUTED 5a286: 2004 movel %d4,%d0 <== NOT EXECUTED 5a288: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5a28e: 4e5e unlk %fp <== NOT EXECUTED 5a290: 4e75 rts 00068360 : int _STAT_NAME( const char *path, struct stat *buf ) { 68360: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 68364: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 68368: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED 6836c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 68370: 6700 0086 beqw 683f8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 68374: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68376: 280e movel %fp,%d4 <== NOT EXECUTED 68378: 0684 ffff ffec addil #-20,%d4 <== NOT EXECUTED 6837e: 4eb9 0008 5a18 jsr 85a18 <== NOT EXECUTED 68384: 4297 clrl %sp@ <== NOT EXECUTED 68386: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68388: 42a7 clrl %sp@- <== NOT EXECUTED 6838a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6838c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 6838e: 4eb9 0004 7758 jsr 47758 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 68394: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 68398: 4a80 tstl %d0 <== NOT EXECUTED 6839a: 664e bnes 683ea <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 6839c: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 683a0: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 683a4: 676c beqs 68412 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 683a6: 4878 0046 pea 46 <== NOT EXECUTED 683aa: 42a7 clrl %sp@- <== NOT EXECUTED 683ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED 683ae: 4eb9 0008 2b58 jsr 82b58 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 683b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 683b6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 683b8: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 683bc: 2068 0018 moveal %a0@(24),%a0 <== NOT EXECUTED 683c0: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 683c2: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 683c6: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 683c8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 683cc: 4a88 tstl %a0 <== NOT EXECUTED 683ce: 670e beqs 683de <== NOT EXECUTED 683d0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 683d4: 4a88 tstl %a0 <== NOT EXECUTED 683d6: 6706 beqs 683de <== NOT EXECUTED 683d8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 683da: 4e90 jsr %a0@ <== NOT EXECUTED 683dc: 588f addql #4,%sp <== NOT EXECUTED return status; } 683de: 2002 movel %d2,%d0 <== NOT EXECUTED 683e0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 683e6: 4e5e unlk %fp <== NOT EXECUTED 683e8: 4e75 rts <== NOT EXECUTED 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 ) 683ea: 74ff moveq #-1,%d2 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 683ec: 2002 movel %d2,%d0 <== NOT EXECUTED 683ee: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 683f4: 4e5e unlk %fp <== NOT EXECUTED 683f6: 4e75 rts <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 683f8: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 683fe: 74ff moveq #-1,%d2 <== NOT EXECUTED 68400: 2040 moveal %d0,%a0 <== NOT EXECUTED 68402: 700e moveq #14,%d0 <== NOT EXECUTED 68404: 2080 movel %d0,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 68406: 2002 movel %d2,%d0 <== NOT EXECUTED 68408: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 6840e: 4e5e unlk %fp <== NOT EXECUTED 68410: 4e75 rts <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 68412: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 68416: 4a88 tstl %a0 <== NOT EXECUTED 68418: 670e beqs 68428 <== NOT EXECUTED 6841a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6841e: 4a88 tstl %a0 <== NOT EXECUTED 68420: 6706 beqs 68428 <== NOT EXECUTED 68422: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68424: 4e90 jsr %a0@ <== NOT EXECUTED 68426: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68428: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 6842e: 74ff moveq #-1,%d2 <== NOT EXECUTED 68430: 2040 moveal %d0,%a0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 68432: 2002 movel %d2,%d0 <== NOT EXECUTED 68434: 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 ); 6843a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 68440: 4e5e unlk %fp <== NOT EXECUTED 68442: 4e75 rts 0004aa8c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4aa8c: 4e56 fff4 linkw %fp,#-12 4aa90: 52b9 0005 d808 addql #1,5d808 4aa96: 48d7 001c moveml %d2-%d4,%sp@ 4aa9a: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4aa9e: 4eb9 0004 aa4a jsr 4aa4a /* * Validate the parameters */ if ( !size ) 4aaa4: 4a83 tstl %d3 4aaa6: 6766 beqs 4ab0e <== ALWAYS TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4aaa8: 7003 moveq #3,%d0 4aaaa: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 4aab0: 6752 beqs 4ab04 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4aab2: 42a7 clrl %sp@- 4aab4: 42a7 clrl %sp@- 4aab6: 2f03 movel %d3,%sp@- 4aab8: 2f39 0005 c180 movel 5c180 ,%sp@- 4aabe: 4eb9 0004 b64c jsr 4b64c <_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 ) { 4aac4: 4fef 0010 lea %sp@(16),%sp 4aac8: 2400 movel %d0,%d2 4aaca: 675e beqs 4ab2a if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 4aacc: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4aace: 2079 0005 c7ce moveal 5c7ce ,%a0 4aad4: 4a88 tstl %a0 4aad6: 670a beqs 4aae2 <== NEVER TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 4aad8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4aada: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4aadc: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4aade: 4e90 jsr %a0@ <== NOT EXECUTED 4aae0: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4aae2: 2079 0005 c7c6 moveal 5c7c6 ,%a0 4aae8: 4a88 tstl %a0 4aaea: 6730 beqs 4ab1c <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4aaec: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4aaee: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4aaf2: 2404 movel %d4,%d2 <== NOT EXECUTED 4aaf4: 4e90 jsr %a0@ <== NOT EXECUTED 4aaf6: 588f addql #4,%sp <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4aaf8: 2002 movel %d2,%d0 <== NOT EXECUTED 4aafa: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ab00: 4e5e unlk %fp <== NOT EXECUTED 4ab02: 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()) && 4ab04: 4eb9 0004 a9f0 jsr 4a9f0 4ab0a: 4a00 tstb %d0 4ab0c: 66a4 bnes 4aab2 <== NEVER TAKEN /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4ab0e: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ab10: 2002 movel %d2,%d0 <== NOT EXECUTED 4ab12: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ab18: 4e5e unlk %fp <== NOT EXECUTED 4ab1a: 4e75 rts <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4ab1c: 2404 movel %d4,%d2 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ab1e: 2002 movel %d2,%d0 4ab20: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4ab26: 4e5e unlk %fp 4ab28: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 4ab2a: 2079 0005 c7ca moveal 5c7ca ,%a0 4ab30: 4a88 tstl %a0 4ab32: 670e beqs 4ab42 <== NEVER TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4ab34: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ab36: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4ab3a: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 4ab3c: 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 ); 4ab3e: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 4ab40: 668c bnes 4aace <== NOT EXECUTED errno = ENOMEM; 4ab42: 4eb9 0004 d808 jsr 4d808 <__errno> 4ab48: 2040 moveal %d0,%a0 4ab4a: 700c moveq #12,%d0 4ab4c: 2080 movel %d0,%a0@ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ab4e: 2002 movel %d2,%d0 4ab50: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4ab56: 4e5e unlk %fp 4ab58: 4e75 rts ... 0004aa30 : } void malloc_deferred_free( void *pointer ) { 4aa30: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4aa34: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4aa38: 4879 0005 db26 pea 5db26 <== NOT EXECUTED 4aa3e: 4eb9 0004 6748 jsr 46748 <_Chain_Append> <== NOT EXECUTED 4aa44: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 4aa46: 4e5e unlk %fp <== NOT EXECUTED 4aa48: 4e75 rts 0004aa4a : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4aa4a: 4e56 0000 linkw %fp,#0 4aa4e: 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); 4aa50: 47f9 0004 a51c lea 4a51c ,%a3 { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4aa56: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4aa58: 4879 0005 db26 pea 5db26 4aa5e: 45f9 0004 b014 lea 4b014 <_Chain_Get>,%a2 4aa64: 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) 4aa66: 588f addql #4,%sp 4aa68: 4a80 tstl %d0 4aa6a: 6714 beqs 4aa80 <== NEVER TAKEN free(to_be_freed); 4aa6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4aa6e: 4e93 jsr %a3@ <== NOT EXECUTED 4aa70: 588f addql #4,%sp <== NOT EXECUTED 4aa72: 4879 0005 db26 pea 5db26 <== NOT EXECUTED 4aa78: 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) 4aa7a: 588f addql #4,%sp <== NOT EXECUTED 4aa7c: 4a80 tstl %d0 <== NOT EXECUTED 4aa7e: 66ec bnes 4aa6c <== NOT EXECUTED free(to_be_freed); } 4aa80: 246e fff8 moveal %fp@(-8),%a2 4aa84: 266e fffc moveal %fp@(-4),%a3 4aa88: 4e5e unlk %fp 4aa8a: 4e75 rts 0004a9f0 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 4a9f0: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 4a9f4: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4a9fa: 660e bnes 4aa0a <== ALWAYS TAKEN return false; if ( _ISR_Nest_level > 0 ) 4a9fc: 2039 0005 d9ee movel 5d9ee <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4aa02: 57c0 seq %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4aa04: 4e5e unlk %fp #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4aa06: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4aa08: 4e75 rts 4aa0a: 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 ) 4aa0c: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Nest_level > 0 ) return false; return true; } 4aa0e: 4e75 rts 000516a8 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 516a8: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 516ac: 2f39 0006 31a8 movel 631a8 ,%sp@- 516b2: 4878 0001 pea 1 516b6: 4eb9 0004 3a80 jsr 43a80 if ( memory ) 516bc: 508f addql #8,%sp 516be: 4a80 tstl %d0 516c0: 6706 beqs 516c8 <== ALWAYS TAKEN memfile_blocks_allocated++; 516c2: 52b9 0006 3340 addql #1,63340 return memory; } 516c8: 4e5e unlk %fp 516ca: 4e75 rts 00051ad0 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 51ad0: 4e56 0000 linkw %fp,#0 51ad4: 2f0a movel %a2,%sp@- 51ad6: 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) ) { 51ada: 2f0a movel %a2,%sp@- 51adc: 4eb9 0004 fe0a jsr 4fe0a 51ae2: 588f addql #4,%sp 51ae4: 4a80 tstl %d0 51ae6: 662e bnes 51b16 51ae8: 4a6a 0032 tstw %a2@(50) 51aec: 6628 bnes 51b16 <== ALWAYS TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 51aee: 2079 0006 23ec moveal 623ec ,%a0 51af4: b5e8 0004 cmpal %a0@(4),%a2 51af8: 6726 beqs 51b20 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 51afa: 7006 moveq #6,%d0 51afc: b0aa 0048 cmpl %a2@(72),%d0 51b00: 670a beqs 51b0c <== ALWAYS TAKEN IMFS_memfile_remove( the_jnode ); 51b02: 2f0a movel %a2,%sp@- 51b04: 4eb9 0005 197c jsr 5197c 51b0a: 588f addql #4,%sp free( the_jnode ); 51b0c: 2f0a movel %a2,%sp@- 51b0e: 4eb9 0004 3fc8 jsr 43fc8 51b14: 588f addql #4,%sp } return 0; } 51b16: 246e fffc moveal %fp@(-4),%a2 51b1a: 4280 clrl %d0 51b1c: 4e5e unlk %fp 51b1e: 4e75 rts /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 51b20: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 51b24: 7006 moveq #6,%d0 <== NOT EXECUTED 51b26: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 51b2a: 66d6 bnes 51b02 <== NOT EXECUTED 51b2c: 60de bras 51b0c <== NOT EXECUTED 000518ca : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 518ca: 4e56 ffec linkw %fp,#-20 518ce: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 518d2: 286e 0008 moveal %fp@(8),%a4 518d6: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 518da: 4a8c tstl %a4 518dc: 6736 beqs 51914 <== ALWAYS TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 518de: 2454 moveal %a4@,%a2 518e0: 47f9 0005 168e lea 5168e ,%a3 for ( i=0 ; i <== ALWAYS TAKEN 518ea: 4282 clrl %d2 if ( b[i] ) { 518ec: 2012 movel %a2@,%d0 518ee: 6708 beqs 518f8 memfile_free_block( b[i] ); 518f0: 2f00 movel %d0,%sp@- 518f2: 4e93 jsr %a3@ b[i] = 0; 518f4: 588f addql #4,%sp 518f6: 4292 clrl %a2@ * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 51900: 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 ); 51902: 2f0a movel %a2,%sp@- 51904: 4e93 jsr %a3@ *block_table = 0; 51906: 588f addql #4,%sp 51908: 4294 clrl %a4@ } 5190a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 51910: 4e5e unlk %fp 51912: 4e75 rts /* * Perform internal consistency checks */ assert( block_table ); 51914: 4879 0006 17d8 pea 617d8 <== NOT EXECUTED 5191a: 4879 0006 1896 pea 61896 <__FUNCTION__.6025> <== NOT EXECUTED 51920: 4878 01b3 pea 1b3 <== NOT EXECUTED 51924: 4879 0006 176e pea 6176e <== NOT EXECUTED 5192a: 4eb9 0004 fb34 jsr 4fb34 <__assert_func> <== NOT EXECUTED 00051d90 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 51d90: 4e56 ffec linkw %fp,#-20 51d94: 206e 0008 moveal %fp@(8),%a0 51d98: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 51d9c: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 51da0: 202e 000c movel %fp@(12),%d0 51da4: 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 ) 51da8: 242a 004c movel %a2@(76),%d2 51dac: 262a 0050 movel %a2@(80),%d3 51db0: 9681 subl %d1,%d3 51db2: 9580 subxl %d0,%d2 51db4: 6d30 blts 51de6 <== ALWAYS 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; 51db6: 2540 004c movel %d0,%a2@(76) 51dba: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 51dbe: 2140 0004 movel %d0,%a0@(4) 51dc2: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 51dc6: 42a7 clrl %sp@- 51dc8: 486e fff8 pea %fp@(-8) 51dcc: 4eb9 0004 4058 jsr 44058 51dd2: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 51dd8: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 51dda: 4280 clrl %d0 return 0; } 51ddc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 51de2: 4e5e unlk %fp 51de4: 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 ); 51de6: 2f01 movel %d1,%sp@- <== NOT EXECUTED 51de8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51dea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51dec: 4eb9 0005 1c3e jsr 51c3e <== NOT EXECUTED 51df2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 51df6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 51dfc: 4e5e unlk %fp <== NOT EXECUTED 51dfe: 4e75 rts 00051e00 : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 51e00: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 51e02: 4e56 ffe8 linkw %fp,#-24 51e06: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 51e0a: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 51e0e: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 51e12: b0ab 0048 cmpl %a3@(72),%d0 51e16: 673e beqs 51e56 <== ALWAYS 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 )) 51e18: 2f2a 0010 movel %a2@(16),%sp@- 51e1c: 2f2a 000c movel %a2@(12),%sp@- 51e20: 2f0b movel %a3,%sp@- 51e22: 4eb9 0005 1c3e jsr 51c3e 51e28: 4fef 000c lea %sp@(12),%sp 51e2c: 4a80 tstl %d0 51e2e: 6668 bnes 51e98 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 51e30: 202b 004c movel %a3@(76),%d0 51e34: 222b 0050 movel %a3@(80),%d1 51e38: 242a 000c movel %a2@(12),%d2 51e3c: 262a 0010 movel %a2@(16),%d3 51e40: 2540 0004 movel %d0,%a2@(4) 51e44: 2541 0008 movel %d1,%a2@(8) } return iop->offset; } 51e48: 2203 movel %d3,%d1 51e4a: 2002 movel %d2,%d0 51e4c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 51e52: 4e5e unlk %fp 51e54: 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) 51e56: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 51e5a: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED 51e5e: 242b 004c movel %a3@(76),%d2 <== NOT EXECUTED 51e62: 262b 0050 movel %a3@(80),%d3 <== NOT EXECUTED 51e66: 2800 movel %d0,%d4 <== NOT EXECUTED 51e68: 2a01 movel %d1,%d5 <== NOT EXECUTED 51e6a: 9a83 subl %d3,%d5 <== NOT EXECUTED 51e6c: 9982 subxl %d2,%d4 <== NOT EXECUTED 51e6e: 6e12 bgts 51e82 <== NOT EXECUTED 51e70: 2400 movel %d0,%d2 <== NOT EXECUTED 51e72: 2601 movel %d1,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 51e74: 2203 movel %d3,%d1 <== NOT EXECUTED 51e76: 2002 movel %d2,%d0 <== NOT EXECUTED 51e78: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51e7e: 4e5e unlk %fp <== NOT EXECUTED 51e80: 4e75 rts <== NOT EXECUTED 51e82: 2203 movel %d3,%d1 <== NOT EXECUTED 51e84: 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; 51e86: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 51e8a: 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; } 51e8e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51e94: 4e5e unlk %fp <== NOT EXECUTED 51e96: 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 ); 51e98: 4eb9 0005 3138 jsr 53138 <__errno> <== NOT EXECUTED 51e9e: 761c moveq #28,%d3 <== NOT EXECUTED 51ea0: 2040 moveal %d0,%a0 <== NOT EXECUTED 51ea2: 2083 movel %d3,%a0@ <== NOT EXECUTED 51ea4: 74ff moveq #-1,%d2 <== NOT EXECUTED 51ea6: 76ff moveq #-1,%d3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; } return iop->offset; } 51ea8: 2203 movel %d3,%d1 <== NOT EXECUTED 51eaa: 2002 movel %d2,%d0 <== NOT EXECUTED 51eac: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51eb2: 4e5e unlk %fp <== NOT EXECUTED 51eb4: 4e75 rts 00052180 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 52180: 4e56 fff0 linkw %fp,#-16 52184: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 52188: 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)) 5218c: 202a 0014 movel %a2@(20),%d0 52190: 2200 movel %d0,%d1 52192: 0281 0000 0204 andil #516,%d1 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 52198: 266a 0038 moveal %a2@(56),%a3 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 5219c: 6708 beqs 521a6 && (the_jnode->type == IMFS_LINEAR_FILE)) { 5219e: 7206 moveq #6,%d1 521a0: b2ab 0048 cmpl %a3@(72),%d1 521a4: 6732 beqs 521d8 <== ALWAYS 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) 521a6: 222b 004c movel %a3@(76),%d1 521aa: 242b 0050 movel %a3@(80),%d2 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 521ae: 0800 0009 btst #9,%d0 521b2: 6710 beqs 521c4 iop->offset = the_jnode->info.file.size; 521b4: 2541 000c movel %d1,%a2@(12) 521b8: 2542 0010 movel %d2,%a2@(16) 521bc: 222b 004c movel %a3@(76),%d1 521c0: 242b 0050 movel %a3@(80),%d2 iop->size = the_jnode->info.file.size; 521c4: 4280 clrl %d0 521c6: 2541 0004 movel %d1,%a2@(4) 521ca: 2542 0008 movel %d2,%a2@(8) return 0; } 521ce: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 521d4: 4e5e unlk %fp 521d6: 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; 521d8: 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; 521dc: 4282 clrl %d2 <== NOT EXECUTED 521de: 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; 521e0: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 521e4: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 521e8: 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; 521ec: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 521ee: 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; 521f2: 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; 521f6: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 521fa: 42ab 005c clrl %a3@(92) <== NOT EXECUTED if ((count != 0) 521fe: 4a80 tstl %d0 <== NOT EXECUTED 52200: 6610 bnes 52212 <== NOT EXECUTED 52202: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52206: 4281 clrl %d1 <== NOT EXECUTED 52208: 4282 clrl %d2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 5220a: 0800 0009 btst #9,%d0 <== NOT EXECUTED 5220e: 67b4 beqs 521c4 <== NOT EXECUTED 52210: 60a2 bras 521b4 <== 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)) 52212: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52214: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52216: 42a7 clrl %sp@- <== NOT EXECUTED 52218: 42a7 clrl %sp@- <== NOT EXECUTED 5221a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5221c: 4eb9 0005 1eb6 jsr 51eb6 <== 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) 52222: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52226: 72ff moveq #-1,%d1 <== NOT EXECUTED 52228: b280 cmpl %d0,%d1 <== NOT EXECUTED 5222a: 6710 beqs 5223c <== NOT EXECUTED 5222c: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52230: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED 52234: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED 52238: 6000 ff74 braw 521ae <== NOT EXECUTED 5223c: 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; } 5223e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 52244: 4e5e unlk %fp <== NOT EXECUTED 52246: 4e75 rts 00051b2e : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 51b2e: 4e56 fff8 linkw %fp,#-8 51b32: 206e 000c moveal %fp@(12),%a0 51b36: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 51b38: 2450 moveal %a0@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 51b3a: 4aaa 0008 tstl %a2@(8) 51b3e: 670e beqs 51b4e <== ALWAYS TAKEN 51b40: 2f0a movel %a2,%sp@- 51b42: 4eb9 0004 86c8 jsr 486c8 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 51b48: 588f addql #4,%sp 51b4a: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 51b4e: 302a 0032 movew %a2@(50),%d0 51b52: 5380 subql #1,%d0 51b54: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 51b58: 42a7 clrl %sp@- 51b5a: 486e fff8 pea %fp@(-8) 51b5e: 4eb9 0004 4058 jsr 44058 51b64: 256e fff8 0044 movel %fp@(-8),%a2@(68) return memfile_check_rmnod( the_jnode ); 51b6a: 2f0a movel %a2,%sp@- 51b6c: 4eb9 0005 1ad0 jsr 51ad0 } 51b72: 246e fff4 moveal %fp@(-12),%a2 51b76: 4e5e unlk %fp 51b78: 4e75 rts 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 429d8: 4a01 tstb %d1 429da: 6600 0096 bnew 42a72 <== NEVER TAKEN 429de: 2079 0005 c284 moveal 5c284 ,%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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 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 <== ALWAYS 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 c284 moveal 5c284 ,%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 <== NEVER TAKEN 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 d808 jsr 4d808 <__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 d808 jsr 4d808 <__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 d808 jsr 4d808 <__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 <== ALWAYS TAKEN /* * 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 42b58: 4a82 tstl %d2 42b5a: 6700 0188 beqw 42ce4 <== NEVER TAKEN size += strlen( device ) + 1; 42b5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42b60: 4eb9 0004 ebd4 jsr 4ebd4 <== 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 aa8c jsr 4aa8c 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 <== ALWAYS TAKEN 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 <== NEVER TAKEN 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 e788 jsr 4e788 <== 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 ebd4 jsr 4ebd4 * 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 <== ALWAYS TAKEN /* * 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 <== ALWAYS TAKEN /* * 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 <== ALWAYS TAKEN /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 42bf6: 2079 0005 d830 moveal 5d830 ,%a0 42bfc: b1fc 0005 d834 cmpal #383028,%a0 42c02: 6758 beqs 42c5c <== ALWAYS 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 <== ALWAYS 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 d834 cmpal #383028,%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 d808 jsr 4d808 <__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 a51c jsr 4a51c 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 <== ALWAYS TAKEN 42c40: 2028 001c movel %a0@(28),%d0 42c44: 6700 00c6 beqw 42d0c <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 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 <== ALWAYS 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 <== ALWAYS 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 d830 pea 5d830 42ca2: 4eb9 0004 6748 jsr 46748 <_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 <== ALWAYS 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN /* * 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 <== ALWAYS TAKEN 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 a51c jsr 4a51c <== 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 d808 jsr 4d808 <__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 d808 jsr 4d808 <__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 a51c jsr 4a51c 42d44: 588f addql #4,%sp 42d46: 6000 feec braw 42c34 <== ALWAYS TAKEN return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 42d4a: 4eb9 0004 d808 jsr 4d808 <__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 a51c jsr 4a51c <== 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 d808 jsr 4d808 <__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 a51c jsr 4a51c <== 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 d808 jsr 4d808 <__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 42da2: 4e75 rts 00042ef8 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 42ef8: 4e56 0000 linkw %fp,#0 42efc: 2f0a movel %a2,%sp@- struct _reent *ptr; if (_Thread_libc_reent == 0) 42efe: 4ab9 0005 d9de tstl 5d9de <_Thread_libc_reent> 42f04: 6700 018e beqw 43094 ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 42f08: 4878 0422 pea 422 42f0c: 4eb9 0004 90b0 jsr 490b0 <_Workspace_Allocate> #endif if (ptr) { 42f12: 588f addql #4,%sp ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 42f14: 2440 moveal %d0,%a2 #endif if (ptr) { 42f16: 4a80 tstl %d0 42f18: 6700 0170 beqw 4308a _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 42f1c: 42aa 0078 clrl %a2@(120) 42f20: 41ea 007c lea %a2@(124),%a0 42f24: 4298 clrl %a0@+ 42f26: 43ea 02ea lea %a2@(746),%a1 42f2a: 4298 clrl %a0@+ 42f2c: 203c 0005 b28e movel #373390,%d0 42f32: 4298 clrl %a0@+ 42f34: 4201 clrb %d1 42f36: 4298 clrl %a0@+ 42f38: 1541 002c moveb %d1,%a2@(44) 42f3c: 4298 clrl %a0@+ 42f3e: 1541 005e moveb %d1,%a2@(94) 42f42: 2549 0004 movel %a1,%a2@(4) 42f46: 43ea 0352 lea %a2@(850),%a1 42f4a: 4298 clrl %a0@+ 42f4c: 2549 0008 movel %a1,%a2@(8) 42f50: 43ea 03ba lea %a2@(954),%a1 42f54: 2540 0032 movel %d0,%a2@(50) 42f58: 4280 clrl %d0 42f5a: 7201 moveq #1,%d1 42f5c: 2549 000c movel %a1,%a2@(12) 42f60: 327c 1234 moveaw #4660,%a1 42f64: 4298 clrl %a0@+ 42f66: 4292 clrl %a2@ 42f68: 42aa 0010 clrl %a2@(16) 42f6c: 42aa 0014 clrl %a2@(20) 42f70: 42aa 0018 clrl %a2@(24) 42f74: 42aa 001c clrl %a2@(28) 42f78: 42aa 0020 clrl %a2@(32) 42f7c: 42aa 0024 clrl %a2@(36) 42f80: 42aa 0028 clrl %a2@(40) 42f84: 42aa 002e clrl %a2@(46) 42f88: 42aa 0036 clrl %a2@(54) 42f8c: 42aa 003a clrl %a2@(58) 42f90: 42aa 003e clrl %a2@(62) 42f94: 42aa 0042 clrl %a2@(66) 42f98: 42aa 0046 clrl %a2@(70) 42f9c: 42aa 004a clrl %a2@(74) 42fa0: 42aa 004e clrl %a2@(78) 42fa4: 42aa 0052 clrl %a2@(82) 42fa8: 42aa 0056 clrl %a2@(86) 42fac: 42aa 005a clrl %a2@(90) 42fb0: 4290 clrl %a0@ 42fb2: 2540 00a0 movel %d0,%a2@(160) 42fb6: 2541 00a4 movel %d1,%a2@(164) 42fba: 323c 330e movew #13070,%d1 42fbe: 303c e66d movew #-6547,%d0 42fc2: 307c abcd moveaw #-21555,%a0 42fc6: 42aa 009c clrl %a2@(156) 42fca: 3541 00a8 movew %d1,%a2@(168) 42fce: 3540 00ae movew %d0,%a2@(174) 42fd2: 42aa 00b6 clrl %a2@(182) 42fd6: 323c deec movew #-8468,%d1 42fda: 7005 moveq #5,%d0 42fdc: 42aa 00ba clrl %a2@(186) 42fe0: 3541 00b0 movew %d1,%a2@(176) 42fe4: 3540 00b2 movew %d0,%a2@(178) 42fe8: 42aa 00be clrl %a2@(190) 42fec: 4200 clrb %d0 42fee: 720b moveq #11,%d1 42ff0: 42aa 00c2 clrl %a2@(194) 42ff4: 42aa 00c6 clrl %a2@(198) 42ff8: 3548 00aa movew %a0,%a2@(170) 42ffc: 42aa 00ca clrl %a2@(202) 43000: 3549 00ac movew %a1,%a2@(172) 43004: 42aa 00f2 clrl %a2@(242) 43008: 42aa 00f6 clrl %a2@(246) 4300c: 3541 00b4 movew %d1,%a2@(180) 43010: 42aa 00fa clrl %a2@(250) 43014: 1540 00ce moveb %d0,%a2@(206) 43018: 42aa 00fe clrl %a2@(254) 4301c: 42aa 0102 clrl %a2@(258) 43020: 1540 00d6 moveb %d0,%a2@(214) 43024: 42aa 0106 clrl %a2@(262) 43028: 42aa 010a clrl %a2@(266) 4302c: 42aa 010e clrl %a2@(270) 43030: 42aa 0112 clrl %a2@(274) 43034: 42aa 0116 clrl %a2@(278) 43038: 42aa 00ee clrl %a2@(238) <== ALWAYS TAKEN 4303c: 42aa 0146 clrl %a2@(326) 43040: 42aa 014a clrl %a2@(330) 43044: 42aa 014e clrl %a2@(334) 43048: 42aa 0152 clrl %a2@(338) 4304c: 42aa 02d2 clrl %a2@(722) 43050: 42aa 01d2 clrl %a2@(466) 43054: 42aa 02da clrl %a2@(730) 43058: 42aa 02de clrl %a2@(734) 4305c: 42aa 02e2 clrl %a2@(738) 43060: 42aa 02e6 clrl %a2@(742) 43064: 4878 0138 pea 138 43068: 42a7 clrl %sp@- 4306a: 486a 02ea pea %a2@(746) 4306e: 4eb9 0004 e098 jsr 4e098 creating_task->libc_reent = ptr; 43074: 206e 000c moveal %fp@(12),%a0 return TRUE; 43078: 4fef 000c lea %sp@(12),%sp ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; 4307c: 214a 0104 movel %a2,%a0@(260) return TRUE; } return FALSE; } 43080: 246e fffc moveal %fp@(-4),%a2 43084: 4e5e unlk %fp ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; 43086: 7001 moveq #1,%d0 return TRUE; } return FALSE; } 43088: 4e75 rts 4308a: 246e fffc moveal %fp@(-4),%a2 4308e: 4e5e unlk %fp * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { 43090: 4200 clrb %d0 creating_task->libc_reent = ptr; return TRUE; } return FALSE; } 43092: 4e75 rts { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 43094: 41f9 0005 b972 lea 5b972 <_global_impure_ptr>,%a0 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 4309a: 43f9 0005 c30c lea 5c30c <_impure_ptr>,%a1 430a0: 23d0 0005 c30c movel %a0@,5c30c <_impure_ptr> 430a6: 23c9 0005 d9de movel %a1,5d9de <_Thread_libc_reent> 430ac: 6000 fe5a braw 42f08 <== ALWAYS TAKEN 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 0104 movel %a2@(260),%d2 } if (ptr && ptr != _global_impure_ptr) { 42e48: 4a82 tstl %d2 42e4a: 6722 beqs 42e6e <== ALWAYS TAKEN 42e4c: b4b9 0005 b972 cmpl 5b972 <_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 dfae jsr 4dfae <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 42e62: 2f02 movel %d2,%sp@- 42e64: 4eb9 0004 90cc jsr 490cc <_Workspace_Free> 42e6a: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 42e6e: 42aa 0104 clrl %a2@(260) /* * 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 c30c clrl 5c30c <_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 c30c movel 5c30c <_impure_ptr>,%d2 42e96: 60b0 bras 42e48 <== ALWAYS TAKEN 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 db9c jsr 4db9c 42eaa: 588f addql #4,%sp 42eac: 7202 moveq #2,%d1 42eae: b280 cmpl %d0,%d1 42eb0: 6414 bccs 42ec6 <== NEVER 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 d946 jsr 4d946 <== 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 <== NEVER TAKEN free( fp->_bf._base ); 42ed0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42ed4: 4eb9 0004 a51c jsr 4a51c <== 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 42ef6: 4e75 rts 000432a4 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 432a4: 4e56 0000 linkw %fp,#0 432a8: 2f02 movel %d2,%sp@- 432aa: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 432ae: 4a39 0005 ea20 tstb 5ea20 432b4: 670a beqs 432c0 NULL_major = major; } return RTEMS_SUCCESSFUL; } 432b6: 242e fffc movel %fp@(-4),%d2 432ba: 4280 clrl %d0 432bc: 4e5e unlk %fp 432be: 4e75 rts rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 432c0: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 432c2: 7001 moveq #1,%d0 432c4: 13c0 0005 ea20 moveb %d0,5ea20 status = rtems_io_register_name( 432ca: 2f02 movel %d2,%sp@- 432cc: 4879 0005 c7c4 pea 5c7c4 432d2: 4eb9 0004 33fa jsr 433fa "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 432d8: 4fef 000c lea %sp@(12),%sp 432dc: 4a80 tstl %d0 432de: 6610 bnes 432f0 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 432e0: 23c2 0005 f240 movel %d2,5f240 } return RTEMS_SUCCESSFUL; } 432e6: 242e fffc movel %fp@(-4),%d2 432ea: 4280 clrl %d0 432ec: 4e5e unlk %fp 432ee: 4e75 rts major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 432f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432f2: 4eb9 0004 7650 jsr 47650 <== NOT EXECUTED 00043282 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 43282: 4e56 0000 linkw %fp,#0 43286: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 4328a: 4a88 tstl %a0 4328c: 6706 beqs 43294 <== NEVER TAKEN rw_args->bytes_moved = rw_args->count; 4328e: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED return NULL_SUCCESSFUL; } 43294: 4280 clrl %d0 43296: 4e5e unlk %fp 43298: 4e75 rts 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 a8f8 jsr 4a8f8 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 ebd4 lea 4ebd4 ,%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 <== ALWAYS TAKEN * 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 a9b0 jsr 4a9b0 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 <== ALWAYS TAKEN 431e4: 2050 moveal %a0@,%a0 431e6: 4a88 tstl %a0 431e8: 6700 00fc beqw 432e6 <== ALWAYS TAKEN 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 d7f8 subl 5d7f8 ,%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 <== ALWAYS TAKEN * 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 d808 movel #317448,%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 d808 movel #317448,%d3 done: va_end(ap); if ( rc ) { if ( iop ) 43244: 4a8a tstl %a2 43246: 670a beqs 43252 <== ALWAYS TAKEN rtems_libio_free( iop ); 43248: 2f0a movel %a2,%sp@- 4324a: 4eb9 0004 a86a jsr 4a86a 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 <== ALWAYS TAKEN 4325e: 2068 001c moveal %a0@(28),%a0 43262: 4a88 tstl %a0 43264: 67c2 beqs 43228 <== ALWAYS 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 <== ALWAYS TAKEN goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 43278: 263c 0004 d808 movel #317448,%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 <== NEVER 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 d7f8 subl 5d7f8 ,%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 d7f8 subl 5d7f8 ,%d0 4329e: ec80 asrl #6,%d0 432a0: 42a7 clrl %sp@- 432a2: 42a7 clrl %sp@- 432a4: 2f00 movel %d0,%sp@- 432a6: 4eb9 0004 a5ac jsr 4a5ac 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 <== NEVER TAKEN if(errno) rc = errno; 432b6: 263c 0004 d808 movel #317448,%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 d7f8 subl 5d7f8 ,%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 a47c jsr 4a47c <== 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 d808 movel #317448,%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 d808 movel #317448,%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 <== ALWAYS TAKEN 43316: 6000 ff2c braw 43244 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN */ 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 d7f8 subl 5d7f8 ,%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 a47c jsr 4a47c <== 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 <== ALWAYS 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 <== NEVER TAKEN 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 ad7c pea 5ad7c 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 ad7c pea 5ad7c 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 <== ALWAYS 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 ad7c pea 5ad7c 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 <== ALWAYS 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 645c jsr 4645c <== 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 645c jsr 4645c <== 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 <== ALWAYS 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 <== ALWAYS 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 43c38: 2079 0005 c308 moveal 5c308 <__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 <== ALWAYS 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 <== NEVER 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 <== ALWAYS TAKEN rtems_termios_puts ("\r", 1, tty); 43cae: 2f0a movel %a2,%sp@- 43cb0: 4878 0001 pea 1 43cb4: 4879 0005 b290 pea 5b290 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 <== ALWAYS TAKEN 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 <== NEVER 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 c308 moveal 5c308 <__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 b292 pea 5b292 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 43dca: 4e75 rts 0004d2f4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4d2f4: 4e56 ffcc linkw %fp,#-52 4d2f8: 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) 4d2fc: 4878 0001 pea 1 4d300: 45ee ffdc lea %fp@(-36),%a2 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4d304: 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) 4d308: 2f0a movel %a2,%sp@- 4d30a: 4878 0007 pea 7 4d30e: 4878 0003 pea 3 4d312: 4879 0005 b776 pea 5b776 <__FUNCTION__.5815+0x11> 4d318: 4eb9 0004 2720 jsr 42720 4d31e: 4fef 0014 lea %sp@(20),%sp 4d322: 4a80 tstl %d0 4d324: 6600 00e0 bnew 4d406 <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 4d328: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4d32c: 47f9 0004 d808 lea 4d808 <__errno>,%a3 <== NOT EXECUTED 4d332: 4a88 tstl %a0 <== NOT EXECUTED 4d334: 670e beqs 4d344 <== NOT EXECUTED 4d336: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d33a: 4a88 tstl %a0 <== NOT EXECUTED 4d33c: 6706 beqs 4d344 <== NOT EXECUTED 4d33e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d340: 4e90 jsr %a0@ <== NOT EXECUTED 4d342: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d344: 45ee fff1 lea %fp@(-15),%a2 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d348: 3039 0005 d10c movew 5d10c ,%d0 <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d34e: 24bc 2f74 6d70 movel #796159344,%a2@ <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d354: 2200 movel %d0,%d1 <== NOT EXECUTED 4d356: 5281 addql #1,%d1 <== NOT EXECUTED 4d358: 3f00 movew %d0,%sp@- <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d35a: 203c 2f2e 6669 movel #791570025,%d0 <== NOT EXECUTED 4d360: 2d40 fff5 movel %d0,%fp@(-11) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d364: 4267 clrw %sp@- <== NOT EXECUTED 4d366: 33c1 0005 d10c movew %d1,5d10c <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d36c: 323c 666f movew #26223,%d1 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d370: 4879 0005 b77b pea 5b77b <__FUNCTION__.5815+0x16> <== NOT EXECUTED 4d376: 486e fffb pea %fp@(-5) <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d37a: 3d41 fff9 movew %d1,%fp@(-7) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d37e: 4eb9 0004 e500 jsr 4e500 <== NOT EXECUTED /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4d384: 4878 0180 pea 180 <== NOT EXECUTED 4d388: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d38a: 4eb9 0004 d524 jsr 4d524 <== NOT EXECUTED 4d390: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4d394: 4a80 tstl %d0 <== NOT EXECUTED 4d396: 6660 bnes 4d3f8 <== 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); 4d398: 4878 4000 pea 4000 4d39c: 4bf9 0004 3124 lea 43124 ,%a5 4d3a2: 2f0a movel %a2,%sp@- 4d3a4: 4e95 jsr %a5@ if (filsdes[0] < 0) { 4d3a6: 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); 4d3a8: 2880 movel %d0,%a4@ if (filsdes[0] < 0) { 4d3aa: 6d00 00e0 bltw 4d48c <== NEVER TAKEN 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]); 4d3ae: b0b9 0005 c174 cmpl 5c174 ,%d0 <== NOT EXECUTED 4d3b4: 6400 00d0 bccw 4d486 <== NOT EXECUTED 4d3b8: 2079 0005 d7f8 moveal 5d7f8 ,%a0 <== NOT EXECUTED 4d3be: ed88 lsll #6,%d0 <== NOT EXECUTED 4d3c0: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4d3c2: 70fe moveq #-2,%d0 <== NOT EXECUTED 4d3c4: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4d3c8: 4878 0001 pea 1 <== NOT EXECUTED 4d3cc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d3ce: 4e95 jsr %a5@ <== NOT EXECUTED if (filsdes[1] < 0) { 4d3d0: 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); 4d3d2: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4d3d6: 6d00 00ce bltw 4d4a6 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4d3da: 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) { 4d3dc: 9bcd subal %a5,%a5 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4d3de: 4eb9 0004 d544 jsr 4d544 <== NOT EXECUTED 4d3e4: 588f addql #4,%sp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4d3e6: 4e93 jsr %a3@ <== NOT EXECUTED 4d3e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d3ea: 208d movel %a5,%a0@ <== NOT EXECUTED } 4d3ec: 70ff moveq #-1,%d0 4d3ee: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 4d3f4: 4e5e unlk %fp 4d3f6: 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){ 4d3f8: 4e93 jsr %a3@ <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4d3fa: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 <== NOT EXECUTED 4d400: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d402: 4e5e unlk %fp <== NOT EXECUTED 4d404: 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) 4d406: 47f9 0004 d808 lea 4d808 <__errno>,%a3 4d40c: 4e93 jsr %a3@ 4d40e: 7202 moveq #2,%d1 4d410: 2040 moveal %d0,%a0 4d412: b290 cmpl %a0@,%d1 4d414: 66d6 bnes 4d3ec <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4d416: 4878 03ff pea 3ff 4d41a: 4879 0005 b776 pea 5b776 <__FUNCTION__.5815+0x11> 4d420: 4eb9 0004 2988 jsr 42988 4d426: 508f addql #8,%sp 4d428: 4a80 tstl %d0 4d42a: 66c0 bnes 4d3ec <== ALWAYS TAKEN else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d42c: 45ee fff1 lea %fp@(-15),%a2 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d430: 3039 0005 d10c movew 5d10c ,%d0 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d436: 24bc 2f74 6d70 movel #796159344,%a2@ sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d43c: 2200 movel %d0,%d1 4d43e: 5281 addql #1,%d1 4d440: 3f00 movew %d0,%sp@- else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d442: 203c 2f2e 6669 movel #791570025,%d0 4d448: 2d40 fff5 movel %d0,%fp@(-11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d44c: 4267 clrw %sp@- 4d44e: 33c1 0005 d10c movew %d1,5d10c else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d454: 323c 666f movew #26223,%d1 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d458: 4879 0005 b77b pea 5b77b <__FUNCTION__.5815+0x16> 4d45e: 486e fffb pea %fp@(-5) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d462: 3d41 fff9 movew %d1,%fp@(-7) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d466: 4eb9 0004 e500 jsr 4e500 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4d46c: 4878 0180 pea 180 4d470: 2f0a movel %a2,%sp@- 4d472: 4eb9 0004 d524 jsr 4d524 4d478: 4fef 0014 lea %sp@(20),%sp 4d47c: 4a80 tstl %d0 4d47e: 6700 ff18 beqw 4d398 <== NEVER TAKEN 4d482: 6000 ff74 braw 4d3f8 <== 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]); 4d486: 91c8 subal %a0,%a0 <== NOT EXECUTED 4d488: 6000 ff38 braw 4d3c2 <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 4d48c: 4e93 jsr %a3@ 4d48e: 2040 moveal %d0,%a0 4d490: 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); 4d492: 2f0a movel %a2,%sp@- 4d494: 4eb9 0004 d544 jsr 4d544 4d49a: 588f addql #4,%sp close(filsdes[0]); } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); 4d49c: 4e93 jsr %a3@ 4d49e: 2040 moveal %d0,%a0 4d4a0: 208d movel %a5,%a0@ 4d4a2: 6000 ff48 braw 4d3ec <== ALWAYS TAKEN iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4d4a6: 4e93 jsr %a3@ <== NOT EXECUTED 4d4a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d4aa: 2a50 moveal %a0@,%a5 <== NOT EXECUTED close(filsdes[0]); 4d4ac: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4d4ae: 4eb9 0004 a47c jsr 4a47c <== NOT EXECUTED 4d4b4: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4d4b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d4b8: 4eb9 0004 d544 jsr 4d544 <== NOT EXECUTED 4d4be: 588f addql #4,%sp <== NOT EXECUTED 4d4c0: 6000 ff24 braw 4d3e6 <== NOT EXECUTED 0004bd56 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4bd56: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 4bd5a: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED 4bd60: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4bd64: 6706 beqs 4bd6c <== NOT EXECUTED 4bd66: 70ea moveq #-22,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4bd68: 4e5e unlk %fp <== NOT EXECUTED 4bd6a: 4e75 rts <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 4bd6c: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4bd70: 6606 bnes 4bd78 <== NOT EXECUTED 4bd72: 70f2 moveq #-14,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4bd74: 4e5e unlk %fp <== NOT EXECUTED 4bd76: 4e75 rts <== NOT EXECUTED { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) 4bd78: 42a7 clrl %sp@- <== NOT EXECUTED 4bd7a: 42a7 clrl %sp@- <== NOT EXECUTED 4bd7c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4bd80: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4bd84: 4eb9 0004 5d2c jsr 45d2c <== NOT EXECUTED 4bd8a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bd8e: 4a80 tstl %d0 <== NOT EXECUTED 4bd90: 6706 beqs 4bd98 <== NOT EXECUTED 4bd92: 70fc moveq #-4,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4bd94: 4e5e unlk %fp <== NOT EXECUTED 4bd96: 4e75 rts <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4bd98: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4bd9c: 2f29 0028 movel %a1@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4bda0: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4bda4: 20a9 000c movel %a1@(12),%a0@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 4bda8: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return 0; 4bdae: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4bdb0: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 4bdb2: 4e5e unlk %fp <== NOT EXECUTED 4bdb4: 4e75 rts 0004bcf8 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4bcf8: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 4bcfa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 4bcfe: 4e5e unlk %fp <== NOT EXECUTED 4bd00: 4e75 rts 0004bf94 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4bf94: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 4bf98: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4bf9c: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4bf9e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4bfa2: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4bfa8: 42a7 clrl %sp@- <== NOT EXECUTED 4bfaa: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4bfae: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED 4bfb2: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4bfb6: 4e93 jsr %a3@ <== NOT EXECUTED 4bfb8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bfbc: 4a80 tstl %d0 <== NOT EXECUTED 4bfbe: 6600 00ac bnew 4c06c <== NOT EXECUTED return -EINTR; while (read < count) { 4bfc2: 4a84 tstl %d4 <== NOT EXECUTED 4bfc4: 6700 01ac beqw 4c172 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4bfc8: 4285 clrl %d5 <== NOT EXECUTED 4bfca: 4283 clrl %d3 <== NOT EXECUTED 4bfcc: 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)) 4bfd2: 243c 0004 ccbc movel #314556,%d2 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4bfd8: 2e3c 0004 cc44 movel #314436,%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); 4bfde: 2c3c 0004 e028 movel #319528,%d6 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4bfe4: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4bfe8: 6600 0090 bnew 4c07a <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4bfec: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4bff0: 6700 010a beqw 4c0fc <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4bff4: 7001 moveq #1,%d0 <== NOT EXECUTED 4bff6: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4bffa: 6600 0110 bnew 4c10c <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4bffe: 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 ++; 4c002: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4c006: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4c008: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c00a: 42a7 clrl %sp@- <== NOT EXECUTED 4c00c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c010: 4e90 jsr %a0@ <== NOT EXECUTED 4c012: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c016: 4a80 tstl %d0 <== NOT EXECUTED 4c018: 673c beqs 4c056 <== NOT EXECUTED 4c01a: 70fc moveq #-4,%d0 <== NOT EXECUTED 4c01c: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4c020: 42a7 clrl %sp@- <== NOT EXECUTED 4c022: 42a7 clrl %sp@- <== NOT EXECUTED 4c024: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c028: 4e93 jsr %a3@ <== NOT EXECUTED 4c02a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c02e: 4a80 tstl %d0 <== NOT EXECUTED 4c030: 6600 00ec bnew 4c11e <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4c034: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4c038: 4aae fff8 tstl %fp@(-8) <== NOT EXECUTED 4c03c: 67a6 beqs 4bfe4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c03e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c042: 4e94 jsr %a4@ <== NOT EXECUTED 4c044: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4c046: 4a83 tstl %d3 <== NOT EXECUTED 4c048: 6f12 bles 4c05c <== NOT EXECUTED return read; return ret; } 4c04a: 2003 movel %d3,%d0 <== NOT EXECUTED 4c04c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c052: 4e5e unlk %fp <== NOT EXECUTED 4c054: 4e75 rts <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4c056: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 4c05a: 60c4 bras 4c020 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4c05c: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED return read; return ret; } 4c060: 2003 movel %d3,%d0 <== NOT EXECUTED 4c062: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c068: 4e5e unlk %fp <== NOT EXECUTED 4c06a: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c06c: 76fc moveq #-4,%d3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 4c06e: 2003 movel %d3,%d0 <== NOT EXECUTED 4c070: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c076: 4e5e unlk %fp <== NOT EXECUTED 4c078: 4e75 rts <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4c07a: 2004 movel %d4,%d0 <== NOT EXECUTED 4c07c: 9085 subl %d5,%d0 <== NOT EXECUTED 4c07e: b081 cmpl %d1,%d0 <== NOT EXECUTED 4c080: 6402 bccs 4c084 <== NOT EXECUTED 4c082: 2200 movel %d0,%d1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4c084: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 4c088: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4c08c: 91c0 subal %d0,%a0 <== NOT EXECUTED if (chunk > chunk1) { 4c08e: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4c090: 6d00 009c bltw 4c12e <== 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); 4c094: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4c096: d092 addl %a2@,%d0 <== NOT EXECUTED 4c098: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c09a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c09c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c0a0: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c0a4: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c0a8: 4e91 jsr %a1@ <== NOT EXECUTED 4c0aa: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c0ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4c0b2: 2041 moveal %d1,%a0 <== NOT EXECUTED 4c0b4: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4c0b8: 2008 movel %a0,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4c0ba: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 4c0be: 93c1 subal %d1,%a1 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4c0c0: 4c6a 0005 0004 remul %a2@(4),%d5,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4c0c6: 2549 000c movel %a1,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4c0ca: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4c0ce: 4a89 tstl %a1 <== NOT EXECUTED 4c0d0: 6604 bnes 4c0d6 <== NOT EXECUTED pipe->Start = 0; 4c0d2: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4c0d6: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4c0da: 6716 beqs 4c0f2 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4c0dc: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c0e0: 2047 moveal %d7,%a0 <== NOT EXECUTED 4c0e2: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c0e6: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c0ea: 4e90 jsr %a0@ <== NOT EXECUTED 4c0ec: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c0f0: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4c0f2: d681 addl %d1,%d3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c0f4: 2a03 movel %d3,%d5 <== NOT EXECUTED 4c0f6: b883 cmpl %d3,%d4 <== NOT EXECUTED 4c0f8: 6200 feea bhiw 4bfe4 <== NOT EXECUTED 4c0fc: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c100: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c104: 4e94 jsr %a4@ <== NOT EXECUTED 4c106: 588f addql #4,%sp <== NOT EXECUTED 4c108: 6000 ff3c braw 4c046 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 4c10c: 70f5 moveq #-11,%d0 <== NOT EXECUTED 4c10e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c112: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c116: 4e94 jsr %a4@ <== NOT EXECUTED 4c118: 588f addql #4,%sp <== NOT EXECUTED 4c11a: 6000 ff2a braw 4c046 <== 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)) { 4c11e: 7afc moveq #-4,%d5 <== NOT EXECUTED 4c120: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4c124: 4a83 tstl %d3 <== NOT EXECUTED 4c126: 6e00 ff22 bgtw 4c04a <== NOT EXECUTED 4c12a: 6000 ff30 braw 4c05c <== 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); 4c12e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4c130: d092 addl %a2@,%d0 <== NOT EXECUTED 4c132: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c134: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4c138: 4871 5800 pea %a1@(00000000,%d5:l) <== NOT EXECUTED 4c13c: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c13e: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c142: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED 4c146: 4e91 jsr %a1@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4c148: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c14c: 2001 movel %d1,%d0 <== NOT EXECUTED 4c14e: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c150: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4c154: 9088 subl %a0,%d0 <== NOT EXECUTED 4c156: da88 addl %a0,%d5 <== NOT EXECUTED 4c158: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c15a: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c15c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c160: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c164: 4e91 jsr %a1@ <== NOT EXECUTED 4c166: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c16a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4c16e: 6000 ff42 braw 4c0b2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c172: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c176: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c17a: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED 4c180: 4e94 jsr %a4@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c182: 4283 clrl %d3 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c184: 588f addql #4,%sp <== NOT EXECUTED 4c186: 6000 febe braw 4c046 <== NOT EXECUTED 0004c18a : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4c18a: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4c18e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4c192: 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, 4c196: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4c19c: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4c19e: 2454 moveal %a4@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4c1a0: 42a7 clrl %sp@- <== NOT EXECUTED 4c1a2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c1a6: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4c1a8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c1ac: 4a80 tstl %d0 <== NOT EXECUTED 4c1ae: 6600 00f2 bnew 4c2a2 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4c1b2: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c1b6: 7406 moveq #6,%d2 <== NOT EXECUTED 4c1b8: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4c1bc: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4c1c0: 6704 beqs 4c1c6 <== NOT EXECUTED pipe->Readers --; 4c1c2: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4c1c6: 44c2 movew %d2,%ccr <== NOT EXECUTED 4c1c8: 675a beqs 4c224 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4c1ca: 42a7 clrl %sp@- <== NOT EXECUTED 4c1cc: 42a7 clrl %sp@- <== NOT EXECUTED 4c1ce: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c1d4: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4c1d6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c1da: 4a80 tstl %d0 <== NOT EXECUTED 4c1dc: 6600 00c4 bnew 4c2a2 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4c1e0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c1e4: 47f9 0004 5e68 lea 45e68 ,%a3 <== NOT EXECUTED 4c1ea: 4e93 jsr %a3@ <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4c1ec: 588f addql #4,%sp <== NOT EXECUTED 4c1ee: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c1f2: 6736 beqs 4c22a <== 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) 4c1f4: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c1f8: 6616 bnes 4c210 <== NOT EXECUTED 4c1fa: 7002 moveq #2,%d0 <== NOT EXECUTED 4c1fc: b082 cmpl %d2,%d0 <== NOT EXECUTED 4c1fe: 6710 beqs 4c210 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4c200: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c204: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c208: 4eb9 0004 cc44 jsr 4cc44 <== NOT EXECUTED 4c20e: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4c210: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c216: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4c218: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c21e: 4280 clrl %d0 <== NOT EXECUTED 4c220: 4e5e unlk %fp <== NOT EXECUTED 4c222: 4e75 rts <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 4c224: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED 4c228: 60a0 bras 4c1ca <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4c22a: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c22e: 672a beqs 4c25a <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4c230: 7004 moveq #4,%d0 <== NOT EXECUTED 4c232: b082 cmpl %d2,%d0 <== NOT EXECUTED 4c234: 67da beqs 4c210 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4c236: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c23a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c23e: 4eb9 0004 cc44 jsr 4cc44 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4c244: 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); 4c246: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c24c: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4c24e: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c254: 4280 clrl %d0 <== NOT EXECUTED 4c256: 4e5e unlk %fp <== NOT EXECUTED 4c258: 4e75 rts <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4c25a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4c25e: 4bf9 0004 a51c lea 4a51c ,%a5 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4c264: 243c 0004 cbd4 movel #314324,%d2 <== NOT EXECUTED 4c26a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c26c: 4e90 jsr %a0@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4c26e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c272: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c274: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4c276: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c27a: 4eb9 0004 5c54 jsr 45c54 <== NOT EXECUTED free(pipe->Buffer); 4c280: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c282: 4e95 jsr %a5@ <== NOT EXECUTED free(pipe); 4c284: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c286: 4e95 jsr %a5@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4c288: 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; 4c28c: 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); 4c28e: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c294: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4c296: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c29c: 4280 clrl %d0 <== NOT EXECUTED 4c29e: 4e5e unlk %fp <== NOT EXECUTED 4c2a0: 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); 4c2a2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c2a4: 4eb9 0004 645c jsr 4645c <== NOT EXECUTED 0004bdb6 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4bdb6: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4bdba: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4bdbe: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4bdc2: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4bdc6: 660e bnes 4bdd6 <== NOT EXECUTED 4bdc8: 4282 clrl %d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4bdca: 2002 movel %d2,%d0 <== NOT EXECUTED 4bdcc: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4bdd2: 4e5e unlk %fp <== NOT EXECUTED 4bdd4: 4e75 rts <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4bdd6: 42a7 clrl %sp@- <== NOT EXECUTED 4bdd8: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4bdde: 42a7 clrl %sp@- <== NOT EXECUTED 4bde0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4bde4: 4e93 jsr %a3@ <== NOT EXECUTED 4bde6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bdea: 4a80 tstl %d0 <== NOT EXECUTED 4bdec: 6600 00b6 bnew 4bea4 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4bdf0: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4bdf4: 6700 0088 beqw 4be7e <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4bdf8: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4bdfc: b083 cmpl %d3,%d0 <== NOT EXECUTED 4bdfe: 6500 00be bcsw 4bebe <== NOT EXECUTED 4be02: 2a03 movel %d3,%d5 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4be04: 4286 clrl %d6 <== NOT EXECUTED 4be06: 4282 clrl %d2 <== NOT EXECUTED 4be08: 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)) 4be0e: 4bf9 0004 ccbc lea 4ccbc ,%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); 4be14: 2e3c 0004 e028 movel #319528,%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) { 4be1a: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4be1e: 2800 movel %d0,%d4 <== NOT EXECUTED 4be20: 9881 subl %d1,%d4 <== NOT EXECUTED 4be22: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4be24: 6300 00b4 blsw 4beda <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 4be28: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4be2c: 7001 moveq #1,%d0 <== NOT EXECUTED 4be2e: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4be32: 6600 0122 bnew 4bf56 <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4be36: 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 ++; 4be3a: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4be3e: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4be40: 42a7 clrl %sp@- <== NOT EXECUTED 4be42: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4be46: 4e95 jsr %a5@ <== NOT EXECUTED 4be48: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4be4c: 4a80 tstl %d0 <== NOT EXECUTED 4be4e: 672a beqs 4be7a <== NOT EXECUTED 4be50: 78fc moveq #-4,%d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4be52: 42a7 clrl %sp@- <== NOT EXECUTED 4be54: 42a7 clrl %sp@- <== NOT EXECUTED 4be56: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4be5a: 4e93 jsr %a3@ <== NOT EXECUTED 4be5c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4be60: 4a80 tstl %d0 <== NOT EXECUTED 4be62: 6600 00ec bnew 4bf50 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4be66: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 4be6a: 4a84 tstl %d4 <== NOT EXECUTED 4be6c: 661a bnes 4be88 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4be6e: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4be72: 673e beqs 4beb2 <== NOT EXECUTED 4be74: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4be78: 60a0 bras 4be1a <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4be7a: 4284 clrl %d4 <== NOT EXECUTED 4be7c: 60d4 bras 4be52 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4be7e: 78e0 moveq #-32,%d4 <== NOT EXECUTED 4be80: 4282 clrl %d2 <== NOT EXECUTED 4be82: 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); 4be88: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4be8c: 4e94 jsr %a4@ <== NOT EXECUTED 4be8e: 588f addql #4,%sp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4be90: 4a82 tstl %d2 <== NOT EXECUTED 4be92: 6e00 ff36 bgtw 4bdca <== NOT EXECUTED 4be96: 2404 movel %d4,%d2 <== NOT EXECUTED return written; return ret; } 4be98: 2002 movel %d2,%d0 <== NOT EXECUTED 4be9a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4bea0: 4e5e unlk %fp <== NOT EXECUTED 4bea2: 4e75 rts <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4bea4: 74fc moveq #-4,%d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4bea6: 2002 movel %d2,%d0 <== NOT EXECUTED 4bea8: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4beae: 4e5e unlk %fp <== NOT EXECUTED 4beb0: 4e75 rts <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4beb2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4beb6: 78e0 moveq #-32,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4beb8: 4e94 jsr %a4@ <== NOT EXECUTED 4beba: 588f addql #4,%sp <== NOT EXECUTED 4bebc: 60d2 bras 4be90 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4bebe: 7a01 moveq #1,%d5 <== NOT EXECUTED 4bec0: 4286 clrl %d6 <== NOT EXECUTED 4bec2: 4282 clrl %d2 <== NOT EXECUTED 4bec4: 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)) 4beca: 4bf9 0004 ccbc lea 4ccbc ,%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); 4bed0: 2e3c 0004 e028 movel #319528,%d7 <== NOT EXECUTED 4bed6: 6000 ff42 braw 4be1a <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4beda: 2043 moveal %d3,%a0 <== NOT EXECUTED 4bedc: 91c6 subal %d6,%a0 <== NOT EXECUTED 4bede: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 4bee0: 6402 bccs 4bee4 <== NOT EXECUTED 4bee2: 2808 movel %a0,%d4 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4bee4: 2a01 movel %d1,%d5 <== NOT EXECUTED 4bee6: daaa 0008 addl %a2@(8),%d5 <== NOT EXECUTED 4beea: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED 4beee: 2a00 movel %d0,%d5 <== NOT EXECUTED 4bef0: 9a81 subl %d1,%d5 <== NOT EXECUTED if (chunk > chunk1) { 4bef2: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4bef4: 6c6e bges 4bf64 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4bef6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4bef8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4befc: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4bf00: d292 addl %a2@,%d1 <== NOT EXECUTED 4bf02: 2047 moveal %d7,%a0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4bf04: 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); 4bf06: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4bf08: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4bf0a: 2004 movel %d4,%d0 <== NOT EXECUTED 4bf0c: 9085 subl %d5,%d0 <== NOT EXECUTED 4bf0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bf10: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4bf14: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4bf18: 2047 moveal %d7,%a0 <== NOT EXECUTED 4bf1a: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4bf1c: 4e90 jsr %a0@ <== NOT EXECUTED 4bf1e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4bf22: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4bf26: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4bf2a: 6612 bnes 4bf3e <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4bf2c: 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) { 4bf2e: 2c02 movel %d2,%d6 <== NOT EXECUTED 4bf30: b483 cmpl %d3,%d2 <== NOT EXECUTED 4bf32: 6452 bccs 4bf86 <== NOT EXECUTED 4bf34: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4bf38: 7a01 moveq #1,%d5 <== NOT EXECUTED 4bf3a: 6000 fede braw 4be1a <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4bf3e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4bf42: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4bf46: 4eb9 0004 cc44 jsr 4cc44 <== NOT EXECUTED 4bf4c: 508f addql #8,%sp <== NOT EXECUTED 4bf4e: 60dc bras 4bf2c <== 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)) { 4bf50: 78fc moveq #-4,%d4 <== NOT EXECUTED 4bf52: 6000 ff3c braw 4be90 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4bf56: 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)) { 4bf5a: 78f5 moveq #-11,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4bf5c: 4e94 jsr %a4@ <== NOT EXECUTED 4bf5e: 588f addql #4,%sp <== NOT EXECUTED 4bf60: 6000 ff2e braw 4be90 <== 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); 4bf64: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4bf66: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4bf6a: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4bf6e: d292 addl %a2@,%d1 <== NOT EXECUTED 4bf70: 2047 moveal %d7,%a0 <== NOT EXECUTED 4bf72: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4bf74: 4e90 jsr %a0@ <== NOT EXECUTED 4bf76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4bf7a: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4bf7e: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4bf82: 67a8 beqs 4bf2c <== NOT EXECUTED 4bf84: 60b8 bras 4bf3e <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4bf86: 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) { 4bf8a: 4284 clrl %d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4bf8c: 4e94 jsr %a4@ <== NOT EXECUTED 4bf8e: 588f addql #4,%sp <== NOT EXECUTED 4bf90: 6000 fefe braw 4be90 <== NOT EXECUTED 000474e0 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 474e0: 4e56 0000 linkw %fp,#0 474e4: 222e 000c movel %fp@(12),%d1 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 474e8: 2001 movel %d1,%d0 474ea: 5380 subql #1,%d0 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 474ec: 52b9 0006 3938 addql #1,63938 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 474f2: c081 andl %d1,%d0 474f4: 6608 bnes 474fe <== ALWAYS TAKEN 474f6: 103c 0003 moveb #3,%d0 474fa: b081 cmpl %d1,%d0 474fc: 6506 bcss 47504 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 474fe: 7016 moveq #22,%d0 47500: 4e5e unlk %fp 47502: 4e75 rts 47504: 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 ); 47506: 4ef9 0004 7658 jmp 47658 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 c83c moveal 5c83c ,%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 c83c moveal 5c83c ,%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 ... 0005a2d4 : ssize_t read( int fd, void *buffer, size_t count ) { 5a2d4: 4e56 fff4 linkw %fp,#-12 5a2d8: 202e 0008 movel %fp@(8),%d0 5a2dc: 222e 000c movel %fp@(12),%d1 5a2e0: 206e 0010 moveal %fp@(16),%a0 5a2e4: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5a2e8: b0b9 0005 c174 cmpl 5c174 ,%d0 5a2ee: 6468 bccs 5a358 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 5a2f0: 2479 0005 d7f8 moveal 5d7f8 ,%a2 5a2f6: ed88 lsll #6,%d0 5a2f8: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5a2fa: 202a 0014 movel %a2@(20),%d0 5a2fe: 0800 0008 btst #8,%d0 5a302: 6754 beqs 5a358 rtems_libio_check_buffer( buffer ); 5a304: 4a81 tstl %d1 5a306: 6768 beqs 5a370 <== ALWAYS TAKEN rtems_libio_check_count( count ); 5a308: 4a88 tstl %a0 5a30a: 6740 beqs 5a34c <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5a30c: 0800 0001 btst #1,%d0 5a310: 675e beqs 5a370 <== ALWAYS TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) 5a312: 226a 003c moveal %a2@(60),%a1 5a316: 2269 0008 moveal %a1@(8),%a1 5a31a: 4a89 tstl %a1 5a31c: 676a beqs 5a388 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 5a31e: 2f08 movel %a0,%sp@- 5a320: 2f01 movel %d1,%sp@- 5a322: 2f0a movel %a2,%sp@- 5a324: 4e91 jsr %a1@ if ( rc > 0 ) 5a326: 4fef 000c lea %sp@(12),%sp 5a32a: 4a80 tstl %d0 5a32c: 6f14 bles 5a342 iop->offset += rc; 5a32e: 2400 movel %d0,%d2 5a330: 5bc1 smi %d1 5a332: 49c1 extbl %d1 5a334: d5aa 0010 addl %d2,%a2@(16) 5a338: 262a 000c movel %a2@(12),%d3 5a33c: d781 addxl %d1,%d3 5a33e: 2543 000c movel %d3,%a2@(12) return rc; } 5a342: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a348: 4e5e unlk %fp 5a34a: 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 ); 5a34c: 4280 clrl %d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a34e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5a354: 4e5e unlk %fp <== NOT EXECUTED 5a356: 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 ); 5a358: 4eb9 0004 d808 jsr 4d808 <__errno> 5a35e: 7409 moveq #9,%d2 5a360: 2040 moveal %d0,%a0 5a362: 70ff moveq #-1,%d0 5a364: 2082 movel %d2,%a0@ if ( rc > 0 ) iop->offset += rc; return rc; } 5a366: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a36c: 4e5e unlk %fp 5a36e: 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 ); 5a370: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 5a376: 7216 moveq #22,%d1 <== NOT EXECUTED 5a378: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a37a: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a37c: 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 ); 5a382: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a384: 4e5e unlk %fp <== NOT EXECUTED 5a386: 4e75 rts <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a388: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 5a38e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a390: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a392: 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 ); 5a398: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a39e: 4e5e unlk %fp <== NOT EXECUTED 5a3a0: 4e75 rts 000688c8 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 688c8: 4e56 ffe0 linkw %fp,#-32 688cc: 48d7 001c moveml %d2-%d4,%sp@ 688d0: 262e 0008 movel %fp@(8),%d3 688d4: 282e 000c movel %fp@(12),%d4 rtems_filesystem_location_info_t loc; int result; if (!buf) 688d8: 6700 0092 beqw 6896c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 688dc: 2f03 movel %d3,%sp@- 688de: 240e movel %fp,%d2 688e0: 0682 ffff ffec addil #-20,%d2 688e6: 4eb9 0008 5a18 jsr 85a18 688ec: 4297 clrl %sp@ 688ee: 2f02 movel %d2,%sp@- 688f0: 42a7 clrl %sp@- 688f2: 2f00 movel %d0,%sp@- 688f4: 2f03 movel %d3,%sp@- 688f6: 4eb9 0004 7758 jsr 47758 0, &loc, false ); if ( result != 0 ) 688fc: 4fef 0014 lea %sp@(20),%sp 68900: 4a80 tstl %d0 68902: 665a bnes 6895e <== ALWAYS TAKEN return -1; if ( !loc.ops->node_type_h ){ 68904: 226e fff8 moveal %fp@(-8),%a1 68908: 2069 0010 moveal %a1@(16),%a0 6890c: 4a88 tstl %a0 6890e: 6700 00a6 beqw 689b6 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 68912: 2f02 movel %d2,%sp@- 68914: 4e90 jsr %a0@ 68916: 588f addql #4,%sp 68918: 7204 moveq #4,%d1 6891a: b280 cmpl %d0,%d1 6891c: 6668 bnes 68986 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 6891e: 226e fff8 moveal %fp@(-8),%a1 68922: 2069 003c moveal %a1@(60),%a0 68926: 4a88 tstl %a0 68928: 6700 008c beqw 689b6 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 6892c: 2f2e 0010 movel %fp@(16),%sp@- 68930: 2f04 movel %d4,%sp@- 68932: 2f02 movel %d2,%sp@- 68934: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 68936: 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 ); 6893a: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 6893c: 4fef 000c lea %sp@(12),%sp 68940: 4a88 tstl %a0 68942: 670e beqs 68952 <== ALWAYS TAKEN 68944: 2068 001c moveal %a0@(28),%a0 68948: 4a88 tstl %a0 6894a: 6706 beqs 68952 <== ALWAYS TAKEN 6894c: 2f02 movel %d2,%sp@- 6894e: 4e90 jsr %a0@ 68950: 588f addql #4,%sp return result; } 68952: 2003 movel %d3,%d0 68954: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 6895a: 4e5e unlk %fp 6895c: 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 ) 6895e: 76ff moveq #-1,%d3 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68960: 2003 movel %d3,%d0 <== NOT EXECUTED 68962: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68968: 4e5e unlk %fp <== NOT EXECUTED 6896a: 4e75 rts <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 6896c: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 68972: 76ff moveq #-1,%d3 <== NOT EXECUTED 68974: 720e moveq #14,%d1 <== NOT EXECUTED 68976: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68978: 2003 movel %d3,%d0 <== NOT EXECUTED 6897a: 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 ); 68980: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68982: 4e5e unlk %fp <== NOT EXECUTED 68984: 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 ); 68986: 206e fff8 moveal %fp@(-8),%a0 6898a: 4a88 tstl %a0 6898c: 670e beqs 6899c <== ALWAYS TAKEN 6898e: 2068 001c moveal %a0@(28),%a0 68992: 4a88 tstl %a0 68994: 6706 beqs 6899c <== ALWAYS TAKEN 68996: 2f02 movel %d2,%sp@- 68998: 4e90 jsr %a0@ 6899a: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 6899c: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 689a2: 76ff moveq #-1,%d3 689a4: 2040 moveal %d0,%a0 689a6: 7016 moveq #22,%d0 689a8: 2080 movel %d0,%a0@ result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 689aa: 2003 movel %d3,%d0 689ac: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 689b2: 4e5e unlk %fp 689b4: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 689b6: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 689ba: 4a88 tstl %a0 <== NOT EXECUTED 689bc: 6706 beqs 689c4 <== NOT EXECUTED 689be: 2f02 movel %d2,%sp@- <== NOT EXECUTED 689c0: 4e90 jsr %a0@ <== NOT EXECUTED 689c2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 689c4: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 689ca: 76ff moveq #-1,%d3 <== NOT EXECUTED 689cc: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 689ce: 2003 movel %d3,%d0 <== NOT EXECUTED 689d0: 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 ); 689d6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 689dc: 4e5e unlk %fp <== NOT EXECUTED 689de: 4e75 rts 00044950 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44950: 4e56 ffe0 linkw %fp,#-32 44954: 202e 0008 movel %fp@(8),%d0 44958: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4495c: 246e 000c moveal %fp@(12),%a2 44960: 242e 0010 movel %fp@(16),%d2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 44964: b0b9 0005 fdd4 cmpl 5fdd4 ,%d0 4496a: 6400 00c6 bccw 44a32 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 4496e: 2679 0006 1c2c moveal 61c2c ,%a3 44974: ed88 lsll #6,%d0 44976: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 44978: 202b 0014 movel %a3@(20),%d0 4497c: 0800 0008 btst #8,%d0 44980: 6700 00b0 beqw 44a32 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 44984: 0800 0001 btst #1,%d0 44988: 6700 008e beqw 44a18 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 4498c: 4a8a tstl %a2 4498e: 6700 0088 beqw 44a18 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 44992: 4a82 tstl %d2 44994: 6f00 0082 blew 44a18 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 44998: 0c82 0000 0400 cmpil #1024,%d2 4499e: 6e78 bgts 44a18 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 449a0: 206b 003c moveal %a3@(60),%a0 449a4: 2868 0008 moveal %a0@(8),%a4 449a8: 4a8c tstl %a4 449aa: 6700 00ae beqw 44a5a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 449ae: 204a moveal %a2,%a0 449b0: 4281 clrl %d1 449b2: 93c9 subal %a1,%a1 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 449b4: 4a90 tstl %a0@ 449b6: 6760 beqs 44a18 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 449b8: 2628 0004 movel %a0@(4),%d3 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 449bc: 2809 movel %a1,%d4 449be: d883 addl %d3,%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++ ) { 449c0: 5281 addql #1,%d1 449c2: 5088 addql #8,%a0 ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 449c4: 4a83 tstl %d3 449c6: 6750 beqs 44a18 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 449c8: b889 cmpl %a1,%d4 449ca: 6d4c blts 44a18 * 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++ ) { 449cc: 2244 moveal %d4,%a1 449ce: b282 cmpl %d2,%d1 449d0: 6de2 blts 449b4 449d2: 588a addql #4,%a2 449d4: 4283 clrl %d3 449d6: 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 ); 449d8: 2f12 movel %a2@,%sp@- } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 449da: 5283 addql #1,%d3 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 449dc: 2f2a fffc movel %a2@(-4),%sp@- 449e0: 2f0b movel %a3,%sp@- 449e2: 4e94 jsr %a4@ if ( bytes < 0 ) 449e4: 4fef 000c lea %sp@(12),%sp 449e8: 4a80 tstl %d0 449ea: 6d60 blts 44a4c <== ALWAYS TAKEN return -1; if ( bytes > 0 ) { 449ec: 6716 beqs 44a04 <== NEVER TAKEN iop->offset += bytes; total += bytes; 449ee: d880 addl %d0,%d4 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 449f0: 2c00 movel %d0,%d6 <== NOT EXECUTED 449f2: 5bc5 smi %d5 <== NOT EXECUTED 449f4: 49c5 extbl %d5 <== NOT EXECUTED 449f6: ddab 0010 addl %d6,%a3@(16) <== NOT EXECUTED 449fa: 222b 000c movel %a3@(12),%d1 <== NOT EXECUTED 449fe: d385 addxl %d5,%d1 <== NOT EXECUTED 44a00: 2741 000c movel %d1,%a3@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 44a04: b092 cmpl %a2@,%d0 44a06: 661e bnes 44a26 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a08: 508a addql #8,%a2 <== NOT EXECUTED 44a0a: b682 cmpl %d2,%d3 <== NOT EXECUTED 44a0c: 6c18 bges 44a26 <== NOT EXECUTED 44a0e: 206b 003c moveal %a3@(60),%a0 <== NOT EXECUTED 44a12: 2868 0008 moveal %a0@(8),%a4 <== NOT EXECUTED 44a16: 60c0 bras 449d8 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 44a18: 4eb9 0004 fd20 jsr 4fd20 <__errno> 44a1e: 78ff moveq #-1,%d4 44a20: 2040 moveal %d0,%a0 44a22: 7016 moveq #22,%d0 44a24: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 44a26: 2004 movel %d4,%d0 44a28: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a2e: 4e5e unlk %fp 44a30: 4e75 rts rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 44a32: 4eb9 0004 fd20 jsr 4fd20 <__errno> <== NOT EXECUTED 44a38: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a3a: 7209 moveq #9,%d1 <== NOT EXECUTED 44a3c: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a3e: 2004 movel %d4,%d0 <== NOT EXECUTED 44a40: 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 ); 44a46: 2081 movel %d1,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a48: 4e5e unlk %fp <== NOT EXECUTED 44a4a: 4e75 rts <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a4c: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a4e: 2004 movel %d4,%d0 <== NOT EXECUTED 44a50: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44a56: 4e5e unlk %fp <== NOT EXECUTED 44a58: 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 ); 44a5a: 4eb9 0004 fd20 jsr 4fd20 <__errno> <== NOT EXECUTED 44a60: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a62: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a64: 2004 movel %d4,%d0 <== NOT EXECUTED 44a66: 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 ); 44a6c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a72: 4e5e unlk %fp <== NOT EXECUTED 44a74: 4e75 rts <== NOT EXECUTED ... 0005a404 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5a404: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 5a406: 4e56 fff0 linkw %fp,#-16 5a40a: 52b9 0005 d814 addql #1,5d814 5a410: 48d7 001c moveml %d2-%d4,%sp@ 5a414: 242e 0008 movel %fp@(8),%d2 5a418: 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())) { 5a41c: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 5a422: 677a beqs 5a49e <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 5a424: 4a82 tstl %d2 5a426: 6700 00de beqw 5a506 return malloc( size ); if ( !size ) { 5a42a: 4a83 tstl %d3 5a42c: 673e beqs 5a46c <== ALWAYS TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 5a42e: 486e fffc pea %fp@(-4) 5a432: 2f02 movel %d2,%sp@- 5a434: 2f39 0005 c180 movel 5c180 ,%sp@- 5a43a: 4eb9 0005 a5ec jsr 5a5ec <_Protected_heap_Get_block_size> 5a440: 4fef 000c lea %sp@(12),%sp 5a444: 4a00 tstb %d0 5a446: 673c beqs 5a484 #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 ) ) { 5a448: 2f03 movel %d3,%sp@- 5a44a: 2f02 movel %d2,%sp@- 5a44c: 2f39 0005 c180 movel 5c180 ,%sp@- 5a452: 4eb9 0005 a628 jsr 5a628 <_Protected_heap_Resize_block> 5a458: 4fef 000c lea %sp@(12),%sp 5a45c: 4a00 tstb %d0 5a45e: 6754 beqs 5a4b4 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5a460: 2002 movel %d2,%d0 5a462: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a468: 4e5e unlk %fp 5a46a: 4e75 rts */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 5a46c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5a46e: 4282 clrl %d2 <== NOT EXECUTED 5a470: 4eb9 0004 a51c jsr 4a51c <== NOT EXECUTED return (void *) 0; 5a476: 588f addql #4,%sp <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5a478: 2002 movel %d2,%d0 <== NOT EXECUTED 5a47a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5a480: 4e5e unlk %fp <== NOT EXECUTED 5a482: 4e75 rts <== NOT EXECUTED free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 5a484: 4eb9 0004 d808 jsr 4d808 <__errno> 5a48a: 4282 clrl %d2 5a48c: 2040 moveal %d0,%a0 5a48e: 7016 moveq #22,%d0 5a490: 2080 movel %d0,%a0@ memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5a492: 2002 movel %d2,%d0 5a494: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a49a: 4e5e unlk %fp 5a49c: 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) 5a49e: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 5a4a4: 6752 beqs 5a4f8 <== NEVER TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5a4a6: 4282 clrl %d2 <== NOT EXECUTED } 5a4a8: 2002 movel %d2,%d0 <== NOT EXECUTED 5a4aa: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5a4b0: 4e5e unlk %fp <== NOT EXECUTED 5a4b2: 4e75 rts <== NOT EXECUTED * 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 ); 5a4b4: 2f03 movel %d3,%sp@- 5a4b6: 4eb9 0004 aa8c jsr 4aa8c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5a4bc: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 5a4be: 53b9 0005 d808 subql #1,5d808 * 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 ); 5a4c4: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5a4c6: 67de beqs 5a4a6 <== ALWAYS TAKEN return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 5a4c8: 202e fffc movel %fp@(-4),%d0 5a4cc: b083 cmpl %d3,%d0 5a4ce: 6402 bccs 5a4d2 <== ALWAYS TAKEN 5a4d0: 2600 movel %d0,%d3 5a4d2: 2f03 movel %d3,%sp@- 5a4d4: 2f02 movel %d2,%sp@- 5a4d6: 2f04 movel %d4,%sp@- 5a4d8: 4eb9 0004 e028 jsr 4e028 free( ptr ); 5a4de: 2f02 movel %d2,%sp@- 5a4e0: 2404 movel %d4,%d2 5a4e2: 4eb9 0004 a51c jsr 4a51c return new_area; 5a4e8: 4fef 0010 lea %sp@(16),%sp } 5a4ec: 2002 movel %d2,%d0 5a4ee: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a4f4: 4e5e unlk %fp 5a4f6: 4e75 rts if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 5a4f8: 2039 0005 d9ee movel 5d9ee <_ISR_Nest_level>,%d0 5a4fe: 6700 ff24 beqw 5a424 <== NEVER TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5a502: 4282 clrl %d2 <== NOT EXECUTED 5a504: 60a2 bras 5a4a8 <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 5a506: 2f03 movel %d3,%sp@- 5a508: 4eb9 0004 aa8c jsr 4aa8c 5a50e: 588f addql #4,%sp 5a510: 2400 movel %d0,%d2 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5a512: 2002 movel %d2,%d0 5a514: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a51a: 4e5e unlk %fp 5a51c: 4e75 rts ... 00048cbc : #include int rmdir( const char *pathname ) { 48cbc: 4e56 ffbc linkw %fp,#-68 48cc0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 48cc4: 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 ); 48cc8: 2f04 movel %d4,%sp@- 48cca: 4eb9 0004 75dc jsr 475dc if ( parentpathlen == 0 ) 48cd0: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 48cd2: 2400 movel %d0,%d2 if ( parentpathlen == 0 ) 48cd4: 6600 01ce bnew 48ea4 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 48cd8: 2044 moveal %d4,%a0 48cda: 762f moveq #47,%d3 48cdc: 1210 moveb %a0@,%d1 48cde: 1001 moveb %d1,%d0 48ce0: 49c0 extbl %d0 48ce2: b680 cmpl %d0,%d3 48ce4: 670e beqs 48cf4 <== NEVER TAKEN 48ce6: 163c 005c moveb #92,%d3 <== NOT EXECUTED 48cea: b680 cmpl %d0,%d3 <== NOT EXECUTED 48cec: 6706 beqs 48cf4 <== NOT EXECUTED 48cee: 4a01 tstb %d1 <== NOT EXECUTED 48cf0: 6600 00fc bnew 48dee <== NOT EXECUTED 48cf4: 2079 000a 07dc moveal a07dc ,%a0 48cfa: 45ee ffec lea %fp@(-20),%a2 48cfe: 49ee fff0 lea %fp@(-16),%a4 48d02: 200e movel %fp,%d0 48d04: 0680 ffff fff4 addil #-12,%d0 48d0a: 2640 moveal %d0,%a3 48d0c: 4bee fff8 lea %fp@(-8),%a5 48d10: 224e moveal %fp,%a1 48d12: 24a8 0018 movel %a0@(24),%a2@ 48d16: 28a8 001c movel %a0@(28),%a4@ 48d1a: 26a8 0020 movel %a0@(32),%a3@ 48d1e: 2aa8 0024 movel %a0@(36),%a5@ 48d22: 2328 0028 movel %a0@(40),%a1@- 48d26: 4203 clrb %d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 48d28: 2040 moveal %d0,%a0 name = pathname + parentpathlen; 48d2a: 2644 moveal %d4,%a3 48d2c: d7c2 addal %d2,%a3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 48d2e: 240e movel %fp,%d2 48d30: 0682 ffff ffd8 addil #-40,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 48d36: 2d50 ffe0 movel %a0@,%fp@(-32) 48d3a: 2d51 ffe8 movel %a1@,%fp@(-24) 48d3e: 2d54 ffdc movel %a4@,%fp@(-36) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 48d42: 49f9 0008 5a18 lea 85a18 ,%a4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 48d48: 2d55 ffe4 movel %a5@,%fp@(-28) 48d4c: 2d52 ffd8 movel %a2@,%fp@(-40) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 48d50: 2f0b movel %a3,%sp@- 48d52: 4e94 jsr %a4@ 48d54: 2e80 movel %d0,%sp@ 48d56: 2f0b movel %a3,%sp@- 48d58: 4eb9 0004 7594 jsr 47594 48d5e: d7c0 addal %d0,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 48d60: 2f0b movel %a3,%sp@- 48d62: 4e94 jsr %a4@ 48d64: 4297 clrl %sp@ 48d66: 2f02 movel %d2,%sp@- 48d68: 42a7 clrl %sp@- 48d6a: 2f00 movel %d0,%sp@- 48d6c: 2f0b movel %a3,%sp@- 48d6e: 4eb9 0004 764e jsr 4764e 0, &loc, false ); if ( result != 0 ) { 48d74: 4fef 001c lea %sp@(28),%sp 48d78: 4a80 tstl %d0 48d7a: 6600 00ee bnew 48e6a <== ALWAYS TAKEN /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 48d7e: 226e ffe4 moveal %fp@(-28),%a1 48d82: 2069 0010 moveal %a1@(16),%a0 48d86: 4a88 tstl %a0 48d88: 6700 01a0 beqw 48f2a <== ALWAYS TAKEN 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 ){ 48d8c: 2f02 movel %d2,%sp@- 48d8e: 4e90 jsr %a0@ 48d90: 588f addql #4,%sp 48d92: 7201 moveq #1,%d1 48d94: b280 cmpl %d0,%d1 48d96: 6600 0086 bnew 48e1e /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 48d9a: 206e ffe0 moveal %fp@(-32),%a0 48d9e: 2068 0034 moveal %a0@(52),%a0 48da2: 4a88 tstl %a0 48da4: 6700 0136 beqw 48edc <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 48da8: 2f02 movel %d2,%sp@- 48daa: 2f0a movel %a2,%sp@- 48dac: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 48dae: 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 ); 48db2: 2640 moveal %d0,%a3 rtems_filesystem_freenode( &loc ); 48db4: 508f addql #8,%sp 48db6: 4a88 tstl %a0 48db8: 670e beqs 48dc8 <== ALWAYS TAKEN 48dba: 2068 001c moveal %a0@(28),%a0 48dbe: 4a88 tstl %a0 48dc0: 6706 beqs 48dc8 <== ALWAYS TAKEN 48dc2: 2f02 movel %d2,%sp@- 48dc4: 4e90 jsr %a0@ 48dc6: 588f addql #4,%sp if ( free_parentloc ) 48dc8: 4a03 tstb %d3 48dca: 6716 beqs 48de2 rtems_filesystem_freenode( &parentloc ); 48dcc: 206e fff8 moveal %fp@(-8),%a0 48dd0: 4a88 tstl %a0 48dd2: 670e beqs 48de2 <== ALWAYS TAKEN 48dd4: 2068 001c moveal %a0@(28),%a0 48dd8: 4a88 tstl %a0 48dda: 6706 beqs 48de2 <== ALWAYS TAKEN 48ddc: 2f0a movel %a2,%sp@- 48dde: 4e90 jsr %a0@ 48de0: 588f addql #4,%sp return result; } 48de2: 200b movel %a3,%d0 48de4: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 48dea: 4e5e unlk %fp 48dec: 4e75 rts */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 48dee: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 48df4: 45ee ffec lea %fp@(-20),%a2 <== NOT EXECUTED 48df8: 5888 addql #4,%a0 <== NOT EXECUTED 48dfa: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED 48dfe: 200e movel %fp,%d0 <== NOT EXECUTED 48e00: 0680 ffff fff4 addil #-12,%d0 <== NOT EXECUTED 48e06: 2640 moveal %d0,%a3 <== NOT EXECUTED 48e08: 4bee fff8 lea %fp@(-8),%a5 <== NOT EXECUTED 48e0c: 224e moveal %fp,%a1 <== NOT EXECUTED 48e0e: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 48e10: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 48e12: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 48e14: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 48e16: 2310 movel %a0@,%a1@- <== NOT EXECUTED 48e18: 4203 clrb %d3 <== NOT EXECUTED 48e1a: 6000 ff0c braw 48d28 <== 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 ); 48e1e: 206e ffe4 moveal %fp@(-28),%a0 48e22: 4a88 tstl %a0 48e24: 670e beqs 48e34 <== ALWAYS TAKEN 48e26: 2068 001c moveal %a0@(28),%a0 48e2a: 4a88 tstl %a0 48e2c: 6706 beqs 48e34 <== ALWAYS TAKEN 48e2e: 2f02 movel %d2,%sp@- 48e30: 4e90 jsr %a0@ 48e32: 588f addql #4,%sp if ( free_parentloc ) 48e34: 4a03 tstb %d3 48e36: 6716 beqs 48e4e <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 48e38: 206e fff8 moveal %fp@(-8),%a0 48e3c: 4a88 tstl %a0 48e3e: 670e beqs 48e4e <== ALWAYS TAKEN 48e40: 2068 001c moveal %a0@(28),%a0 48e44: 4a88 tstl %a0 48e46: 6706 beqs 48e4e <== ALWAYS TAKEN 48e48: 2f0a movel %a2,%sp@- 48e4a: 4e90 jsr %a0@ 48e4c: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 48e4e: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 48e54: 367c ffff moveaw #-1,%a3 48e58: 2040 moveal %d0,%a0 48e5a: 7014 moveq #20,%d0 48e5c: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 48e5e: 200b movel %a3,%d0 48e60: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 48e66: 4e5e unlk %fp 48e68: 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 ) 48e6a: 4a03 tstb %d3 48e6c: 6610 bnes 48e7e <== ALWAYS TAKEN result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 48e6e: 367c ffff moveaw #-1,%a3 return result; } 48e72: 200b movel %a3,%d0 48e74: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 48e7a: 4e5e unlk %fp 48e7c: 4e75 rts result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 48e7e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 48e82: 4a88 tstl %a0 <== NOT EXECUTED 48e84: 67e8 beqs 48e6e <== NOT EXECUTED 48e86: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 48e8a: 67e2 beqs 48e6e <== NOT EXECUTED 48e8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48e8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 48e90: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 48e94: 4e90 jsr %a0@ <== NOT EXECUTED 48e96: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 48e98: 200b movel %a3,%d0 <== NOT EXECUTED 48e9a: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 48ea0: 4e5e unlk %fp <== NOT EXECUTED 48ea2: 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, 48ea4: 42a7 clrl %sp@- 48ea6: 45ee ffec lea %fp@(-20),%a2 48eaa: 2f0a movel %a2,%sp@- 48eac: 4878 0002 pea 2 48eb0: 2f00 movel %d0,%sp@- 48eb2: 2f04 movel %d4,%sp@- 48eb4: 4eb9 0004 7758 jsr 47758 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 48eba: 4fef 0014 lea %sp@(20),%sp 48ebe: 4a80 tstl %d0 48ec0: 66ac bnes 48e6e <== ALWAYS TAKEN 48ec2: 200e movel %fp,%d0 48ec4: 49ee fff0 lea %fp@(-16),%a4 48ec8: 0680 ffff fff4 addil #-12,%d0 48ece: 4bee fff8 lea %fp@(-8),%a5 48ed2: 43ee fffc lea %fp@(-4),%a1 48ed6: 7601 moveq #1,%d3 48ed8: 6000 fe4e braw 48d28 <== ALWAYS TAKEN /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 48edc: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 48ee0: 4a88 tstl %a0 <== NOT EXECUTED 48ee2: 670e beqs 48ef2 <== NOT EXECUTED 48ee4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 48ee8: 4a88 tstl %a0 <== NOT EXECUTED 48eea: 6706 beqs 48ef2 <== NOT EXECUTED 48eec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48eee: 4e90 jsr %a0@ <== NOT EXECUTED 48ef0: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 48ef2: 4a03 tstb %d3 <== NOT EXECUTED 48ef4: 6716 beqs 48f0c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 48ef6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 48efa: 4a88 tstl %a0 <== NOT EXECUTED 48efc: 670e beqs 48f0c <== NOT EXECUTED 48efe: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 48f02: 4a88 tstl %a0 <== NOT EXECUTED 48f04: 6706 beqs 48f0c <== NOT EXECUTED 48f06: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48f08: 4e90 jsr %a0@ <== NOT EXECUTED 48f0a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 48f0c: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 48f12: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 48f16: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 48f18: 200b movel %a3,%d0 <== NOT EXECUTED 48f1a: 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 ); 48f20: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 48f26: 4e5e unlk %fp <== NOT EXECUTED 48f28: 4e75 rts <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 48f2a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 48f2e: 4a88 tstl %a0 <== NOT EXECUTED 48f30: 67c0 beqs 48ef2 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 48f32: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48f34: 4e90 jsr %a0@ <== NOT EXECUTED 48f36: 588f addql #4,%sp <== NOT EXECUTED 48f38: 60b8 bras 48ef2 <== NOT EXECUTED ... 0004c9f0 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4c9f0: 4e56 ffe8 linkw %fp,#-24 4c9f4: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4c9f8: 2c2e 0008 movel %fp@(8),%d6 4c9fc: 4283 clrl %d3 4c9fe: 4285 clrl %d5 4ca00: 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); 4ca02: 45f9 0004 ca3c lea 4ca3c ,%a2 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4ca08: 282e 000c movel %fp@(12),%d4 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) 4ca0c: 2002 movel %d2,%d0 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4ca0e: 5283 addql #1,%d3 if (b & remote_value) 4ca10: c084 andl %d4,%d0 4ca12: 6614 bnes 4ca28 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4ca14: 7020 moveq #32,%d0 4ca16: d482 addl %d2,%d2 4ca18: b083 cmpl %d3,%d0 4ca1a: 66f0 bnes 4ca0c if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 4ca1c: 2005 movel %d5,%d0 4ca1e: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4ca24: 4e5e unlk %fp 4ca26: 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); 4ca28: 2f02 movel %d2,%sp@- ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4ca2a: d482 addl %d2,%d2 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4ca2c: 2f06 movel %d6,%sp@- 4ca2e: 4e92 jsr %a2@ 4ca30: 508f addql #8,%sp 4ca32: 8a80 orl %d0,%d5 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4ca34: 7020 moveq #32,%d0 4ca36: b083 cmpl %d3,%d0 4ca38: 66d2 bnes 4ca0c <== NEVER TAKEN 4ca3a: 60e0 bras 4ca1c <== NOT EXECUTED 0004ca60 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4ca60: 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; } 4ca64: 203c 0005 c2d0 movel #377552,%d0 <== NOT EXECUTED 4ca6a: 4e5e unlk %fp <== NOT EXECUTED 4ca6c: 4e75 rts <== NOT EXECUTED ... 0004a390 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4a390: 4e56 0000 linkw %fp,#0 4a394: 2f02 movel %d2,%sp@- 4a396: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4a39a: 2f02 movel %d2,%sp@- 4a39c: 2f2e 0008 movel %fp@(8),%sp@- 4a3a0: 4eb9 0004 a3c8 jsr 4a3c8 if (nap) 4a3a6: 508f addql #8,%sp 4a3a8: 4a80 tstl %d0 4a3aa: 670c beqs 4a3b8 <== ALWAYS TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } 4a3ac: 2040 moveal %d0,%a0 4a3ae: 242e fffc movel %fp@(-4),%d2 4a3b2: 4e5e unlk %fp 4a3b4: 2010 movel %a0@,%d0 4a3b6: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 4a3b8: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 4a3bc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a3c0: 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); 4a3c2: 4ef9 0004 ca60 jmp 4ca60 <== NOT EXECUTED 0004a3c8 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4a3c8: 4e56 0000 linkw %fp,#0 4a3cc: 2f0a movel %a2,%sp@- 4a3ce: 246e 0008 moveal %fp@(8),%a2 4a3d2: 2f02 movel %d2,%sp@- 4a3d4: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4a3d8: 2012 movel %a2@,%d0 4a3da: 6742 beqs 4a41e <== ALWAYS TAKEN 4a3dc: 4879 0005 b5d8 pea 5b5d8 4a3e2: 2f00 movel %d0,%sp@- 4a3e4: 4eb9 0004 e710 jsr 4e710 4a3ea: 508f addql #8,%sp 4a3ec: 4a80 tstl %d0 4a3ee: 662a bnes 4a41a <== NEVER TAKEN default_ap = ap++; 4a3f0: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4a3f4: 4a90 tstl %a0@ <== NOT EXECUTED 4a3f6: 6714 beqs 4a40c <== NOT EXECUTED 4a3f8: 200a movel %a2,%d0 <== NOT EXECUTED 4a3fa: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->local_value == local_value) 4a3fc: b4aa 0004 cmpl %a2@(4),%d2 4a400: 670a beqs 4a40c const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4a402: 45ea 000c lea %a2@(12),%a2 4a406: 4a92 tstl %a2@ 4a408: 66f2 bnes 4a3fc 4a40a: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 4a40c: 200a movel %a2,%d0 4a40e: 242e fff8 movel %fp@(-8),%d2 4a412: 246e fffc moveal %fp@(-4),%a2 4a416: 4e5e unlk %fp 4a418: 4e75 rts uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4a41a: 4280 clrl %d0 4a41c: 60de bras 4a3fc <== ALWAYS TAKEN 4a41e: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 4a420: 200a movel %a2,%d0 <== NOT EXECUTED 4a422: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4a426: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a42a: 4e5e unlk %fp <== NOT EXECUTED 4a42c: 4e75 rts <== NOT EXECUTED ... 0004ca70 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4ca70: 4e56 0000 linkw %fp,#0 4ca74: 2f0a movel %a2,%sp@- 4ca76: 246e 0008 moveal %fp@(8),%a2 4ca7a: 2f02 movel %d2,%sp@- 4ca7c: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4ca80: 2012 movel %a2@,%d0 4ca82: 6742 beqs 4cac6 <== ALWAYS TAKEN 4ca84: 4879 0005 b5d8 pea 5b5d8 4ca8a: 2f00 movel %d0,%sp@- 4ca8c: 4eb9 0004 e710 jsr 4e710 4ca92: 508f addql #8,%sp 4ca94: 4a80 tstl %d0 4ca96: 662a bnes 4cac2 <== NEVER TAKEN default_ap = ap++; 4ca98: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4ca9c: 4a90 tstl %a0@ <== NOT EXECUTED 4ca9e: 6714 beqs 4cab4 <== NOT EXECUTED 4caa0: 200a movel %a2,%d0 <== NOT EXECUTED 4caa2: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->remote_value == remote_value) 4caa4: b4aa 0008 cmpl %a2@(8),%d2 4caa8: 670a beqs 4cab4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4caaa: 45ea 000c lea %a2@(12),%a2 4caae: 4a92 tstl %a2@ 4cab0: 66f2 bnes 4caa4 4cab2: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4cab4: 200a movel %a2,%d0 4cab6: 242e fff8 movel %fp@(-8),%d2 4caba: 246e fffc moveal %fp@(-4),%a2 4cabe: 4e5e unlk %fp 4cac0: 4e75 rts uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4cac2: 4280 clrl %d0 4cac4: 60de bras 4caa4 <== ALWAYS TAKEN 4cac6: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 4cac8: 200a movel %a2,%d0 <== NOT EXECUTED 4caca: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4cace: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4cad2: 4e5e unlk %fp <== NOT EXECUTED 4cad4: 4e75 rts <== NOT EXECUTED ... 0004d500 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4d500: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4d504: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4d508: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d50c: 4eb9 0004 a3c8 jsr 4a3c8 <== NOT EXECUTED if (nap) 4d512: 508f addql #8,%sp <== NOT EXECUTED 4d514: 4a80 tstl %d0 <== NOT EXECUTED 4d516: 6706 beqs 4d51e <== NOT EXECUTED return nap->remote_value; 4d518: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d51a: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4d51e: 4e5e unlk %fp <== NOT EXECUTED 4d520: 4e75 rts <== NOT EXECUTED ... 0004cad8 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4cad8: 4e56 ffe8 linkw %fp,#-24 4cadc: 202e 0010 movel %fp@(16),%d0 4cae0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4cae4: 242e 0008 movel %fp@(8),%d2 4cae8: 262e 000c movel %fp@(12),%d3 4caec: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4caf0: 4a82 tstl %d2 4caf2: 677a beqs 4cb6e return RTEMS_INVALID_NAME; if ( !id ) 4caf4: 4a8a tstl %a2 4caf6: 6700 00ce beqw 4cbc6 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4cafa: 0803 0004 btst #4,%d3 4cafe: 677a beqs 4cb7a the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4cb00: 4a80 tstl %d0 4cb02: 6700 00b4 beqw 4cbb8 4cb06: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 4cb0c: 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; 4cb0e: 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; 4cb12: 2d40 fffc movel %d0,%fp@(-4) 4cb16: 23c1 0005 d954 movel %d1,5d954 <_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 ); 4cb1c: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cb22: 4eb9 0004 7040 jsr 47040 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4cb28: 588f addql #4,%sp 4cb2a: 2640 moveal %d0,%a3 4cb2c: 4a80 tstl %d0 4cb2e: 6776 beqs 4cba6 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4cb30: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4cb34: 486e fff8 pea %fp@(-8) 4cb38: 486b 0014 pea %a3@(20) 4cb3c: 4eb9 0004 d06c jsr 4d06c <_CORE_barrier_Initialize> 4cb42: 202b 0008 movel %a3@(8),%d0 4cb46: 4281 clrl %d1 4cb48: 2079 0005 db8e moveal 5db8e <_Barrier_Information+0x18>,%a0 4cb4e: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4cb50: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cb54: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4cb58: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4cb5a: 4eb9 0004 7d48 jsr 47d48 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4cb60: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4cb62: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cb64: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cb6a: 4e5e unlk %fp 4cb6c: 4e75 rts ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4cb6e: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cb70: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cb76: 4e5e unlk %fp 4cb78: 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; 4cb7a: 7201 moveq #1,%d1 4cb7c: 2d41 fff8 movel %d1,%fp@(-8) 4cb80: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 4cb86: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4cb88: 2d40 fffc movel %d0,%fp@(-4) 4cb8c: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> 4cb92: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cb98: 4eb9 0004 7040 jsr 47040 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4cb9e: 588f addql #4,%sp 4cba0: 2640 moveal %d0,%a3 4cba2: 4a80 tstl %d0 4cba4: 668a bnes 4cb30 _Thread_Enable_dispatch(); 4cba6: 4eb9 0004 7d48 jsr 47d48 <_Thread_Enable_dispatch> 4cbac: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbae: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbb4: 4e5e unlk %fp 4cbb6: 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 ) 4cbb8: 103c 000a moveb #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbbc: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbc2: 4e5e unlk %fp 4cbc4: 4e75 rts CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4cbc6: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbc8: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbce: 4e5e unlk %fp 4cbd0: 4e75 rts ... 0004cbd4 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4cbd4: 4e56 fffc linkw %fp,#-4 4cbd8: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4cbda: 486e fffc pea %fp@(-4) 4cbde: 2f2e 0008 movel %fp@(8),%sp@- 4cbe2: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cbe8: 4eb9 0004 74dc jsr 474dc <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4cbee: 4fef 000c lea %sp@(12),%sp 4cbf2: 2440 moveal %d0,%a2 4cbf4: 4aae fffc tstl %fp@(-4) 4cbf8: 6640 bnes 4cc3a <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 4cbfa: 4878 0002 pea 2 4cbfe: 42a7 clrl %sp@- 4cc00: 486a 0014 pea %a2@(20) 4cc04: 4eb9 0004 844c jsr 4844c <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 4cc0a: 2f0a movel %a2,%sp@- 4cc0c: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cc12: 4eb9 0004 70d0 jsr 470d0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4cc18: 2f0a movel %a2,%sp@- 4cc1a: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cc20: 4eb9 0004 7378 jsr 47378 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4cc26: 4eb9 0004 7d48 jsr 47d48 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cc2c: 246e fff8 moveal %fp@(-8),%a2 _Objects_Close( &_Barrier_Information, &the_barrier->Object ); _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4cc30: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_Barrier_Information, &the_barrier->Object ); _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4cc34: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cc36: 4e5e unlk %fp 4cc38: 4e75 rts 4cc3a: 246e fff8 moveal %fp@(-8),%a2 { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4cc3e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cc40: 4e5e unlk %fp 4cc42: 4e75 rts 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 <== ALWAYS TAKEN 4274a: 202e 0010 movel %fp@(16),%d0 4274e: 5380 subql #1,%d0 42750: 67cc beqs 4271e <== ALWAYS 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 <== ALWAYS TAKEN quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42762: 0804 0000 btst #0,%d4 42766: 6606 bnes 4276e <== ALWAYS TAKEN 42768: 7a20 moveq #32,%d5 4276a: ba83 cmpl %d3,%d5 4276c: 67b0 beqs 4271e <== ALWAYS TAKEN break; value[i++] = *p++; 4276e: 5281 addql #1,%d1 42770: 1582 8800 moveb %d2,%a2@(00000000,%a0:l) value[i] = '\0'; 42774: 4202 clrb %d2 for (i=0 ; *p && i 42782: b081 cmpl %d1,%d0 42784: 62d2 bhis 42758 <== NEVER TAKEN return NULL; copy_string( p, value, length ); return value; } 42786: 200a movel %a2,%d0 <== NOT EXECUTED 42788: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 4278e: 4e5e unlk %fp <== NOT EXECUTED 42790: 4e75 rts <== NOT EXECUTED const char *p = start; quotes=0; for (i=0 ; *p && i <== NOT EXECUTED ... 000427c0 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427c0: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 427c4: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427c8: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427cc: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427d0: 2f02 movel %d2,%sp@- <== NOT EXECUTED const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427d2: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427d6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 427d8: 4eb9 0004 2708 jsr 42708 <== NOT EXECUTED if ( !p ) 427de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED { const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427e2: 2600 movel %d0,%d3 <== NOT EXECUTED if ( !p ) 427e4: 660e bnes 427f4 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 427e6: 4282 clrl %d2 <== NOT EXECUTED } 427e8: 2002 movel %d2,%d0 <== NOT EXECUTED 427ea: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 427f0: 4e5e unlk %fp <== NOT EXECUTED 427f2: 4e75 rts <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 427f4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 427f6: 4eb9 0004 f1f0 jsr 4f1f0 <== NOT EXECUTED 427fc: 588f addql #4,%sp <== NOT EXECUTED 427fe: 2043 moveal %d3,%a0 <== NOT EXECUTED 42800: d1c0 addal %d0,%a0 <== NOT EXECUTED if ( *rhs != '=' ) 42802: 723d moveq #61,%d1 <== NOT EXECUTED 42804: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42806: 49c0 extbl %d0 <== NOT EXECUTED 42808: b280 cmpl %d0,%d1 <== NOT EXECUTED 4280a: 66da bnes 427e6 <== NOT EXECUTED return NULL; rhs++; 4280c: 5288 addql #1,%a0 <== NOT EXECUTED if ( *rhs == '\"' ) 4280e: 7622 moveq #34,%d3 <== NOT EXECUTED 42810: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42812: 1200 moveb %d0,%d1 <== NOT EXECUTED 42814: 49c1 extbl %d1 <== NOT EXECUTED 42816: b681 cmpl %d1,%d3 <== NOT EXECUTED 42818: 672a beqs 42844 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) 4281a: 4a00 tstb %d0 <== NOT EXECUTED 4281c: 672c beqs 4284a <== NOT EXECUTED 4281e: 2242 moveal %d2,%a1 <== NOT EXECUTED *d++ = *rhs++; 42820: 5288 addql #1,%a0 <== NOT EXECUTED 42822: 12c0 moveb %d0,%a1@+ <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42824: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42826: 66f8 bnes 42820 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 42828: 2049 moveal %a1,%a0 <== NOT EXECUTED 4282a: 7222 moveq #34,%d1 <== NOT EXECUTED 4282c: 1020 moveb %a0@-,%d0 <== NOT EXECUTED 4282e: 49c0 extbl %d0 <== NOT EXECUTED 42830: b280 cmpl %d0,%d1 <== NOT EXECUTED 42832: 6702 beqs 42836 <== NOT EXECUTED 42834: 2049 moveal %a1,%a0 <== NOT EXECUTED d--; *d = '\0'; return value; } 42836: 2002 movel %d2,%d0 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; 42838: 4210 clrb %a0@ <== NOT EXECUTED return value; } 4283a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 42840: 4e5e unlk %fp <== NOT EXECUTED 42842: 4e75 rts <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 42844: 5288 addql #1,%a0 <== NOT EXECUTED 42846: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42848: 60d0 bras 4281a <== NOT EXECUTED for ( d=value ; *rhs ; ) 4284a: 2242 moveal %d2,%a1 <== NOT EXECUTED 4284c: 60da bras 42828 <== NOT EXECUTED ... 0004b95c : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 4b95c: 4e56 ffec linkw %fp,#-20 4b960: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4b964: 246e 0008 moveal %fp@(8),%a2 if ( !time ) 4b968: 4a8a tstl %a2 4b96a: 6750 beqs 4b9bc <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 4b96c: 4a39 000a 527c tstb a527c <_TOD_Is_set> 4b972: 660c bnes 4b980 4b974: 700b moveq #11,%d0 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 4b976: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4b97c: 4e5e unlk %fp 4b97e: 4e75 rts { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4b980: 203c 0000 0700 movel #1792,%d0 4b986: 40c2 movew %sr,%d2 4b988: 8082 orl %d2,%d0 4b98a: 46c0 movew %d0,%sr _TOD_Get( &now ); 4b98c: 486e fff8 pea %fp@(-8) 4b990: 4eb9 0004 cf48 jsr 4cf48 <_TOD_Get> _ISR_Enable(level); 4b996: 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; 4b998: 263c 0000 03e8 movel #1000,%d3 if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 4b99e: 588f addql #4,%sp 4b9a0: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4b9a2: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4b9a6: 4c43 1801 remsl %d3,%d1,%d1 4b9aa: 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; 4b9ae: 24ae fff8 movel %fp@(-8),%a2@ } 4b9b2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4b9b8: 4e5e unlk %fp 4b9ba: 4e75 rts rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 4b9bc: 7009 moveq #9,%d0 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 4b9be: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4b9c4: 4e5e unlk %fp 4b9c6: 4e75 rts 00043144 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 43144: 4e56 ff9c linkw %fp,#-100 43148: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4314c: 262e 0008 movel %fp@(8),%d3 43150: 286e 000c moveal %fp@(12),%a4 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 43154: 4a8c tstl %a4 43156: 6700 0140 beqw 43298 <== ALWAYS TAKEN * 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 ); 4315a: 486e fff0 pea %fp@(-16) } } } #endif (*print)( 4315e: 41f9 0006 7e90 lea 67e90 <_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 ); 43164: 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 ); 43166: 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 ); 43168: 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 ); 4316e: 0685 ffff ffe0 addil #-32,%d5 } } } #endif (*print)( 43174: 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 ); 43178: 4eb9 0004 8438 jsr 48438 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 4317e: 486e ffe8 pea %fp@(-24) 43182: 486e fff0 pea %fp@(-16) 43186: 4879 0006 80de pea 680de 4318c: 4eb9 0004 a7b0 jsr 4a7b0 <_Timespec_Subtract> } } } #endif (*print)( 43192: 4879 0005 d23c pea 5d23c 43198: 2f03 movel %d3,%sp@- 4319a: 4e94 jsr %a4@ /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( 4319c: 4fef 0018 lea %sp@(24),%sp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 431a0: 226e ffc4 moveal %fp@(-60),%a1 431a4: 2051 moveal %a1@,%a0 431a6: 4a88 tstl %a0 431a8: 6700 00ba beqw 43264 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 431ac: 2668 0004 moveal %a0@(4),%a3 if ( information ) { 431b0: 4a8b tstl %a3 431b2: 6700 00b0 beqw 43264 <== ALWAYS TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 431b6: 4a6b 000e tstw %a3@(14) 431ba: 6700 00a8 beqw 43264 <== ALWAYS TAKEN 431be: 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 ); 431c0: 2c3c 0004 7078 movel #290936,%d6 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 431c6: 4bf9 0004 a6c8 lea 4a6c8 <_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 ]; 431cc: 206b 0018 moveal %a3@(24),%a0 431d0: 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++ ) { 431d4: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 431d6: 4a8a tstl %a2 431d8: 677e beqs 43258 <== ALWAYS TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 431da: 2f04 movel %d4,%sp@- 431dc: 4878 000d pea d 431e0: 2046 moveal %d6,%a0 431e2: 2f2a 0008 movel %a2@(8),%sp@- 431e6: 4e90 jsr %a0@ (*print)( 431e8: 2f04 movel %d4,%sp@- 431ea: 2f2a 0008 movel %a2@(8),%sp@- 431ee: 4879 0005 d3ae pea 5d3ae 431f4: 2f03 movel %d3,%sp@- 431f6: 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 ) { 431f8: 2079 0006 7f8e moveal 67f8e <_Thread_Executing>,%a0 431fe: 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; 43202: 202a 0082 movel %a2@(130),%d0 43206: 222a 0086 movel %a2@(134),%d1 4320a: 2d40 ffe0 movel %d0,%fp@(-32) 4320e: 2d41 ffe4 movel %d1,%fp@(-28) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 43212: 246a 0008 moveal %a2@(8),%a2 43216: b5e8 0008 cmpal %a0@(8),%a2 4321a: 6700 0086 beqw 432a2 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 4321e: 486e fff8 pea %fp@(-8) /* * Print the information */ (*print)( context, 43222: 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 ); 43228: 486e fffc pea %fp@(-4) 4322c: 486e ffe8 pea %fp@(-24) 43230: 2f05 movel %d5,%sp@- 43232: 4e95 jsr %a5@ /* * Print the information */ (*print)( context, 43234: 2f2e fff8 movel %fp@(-8),%sp@- 43238: 202e ffe4 movel %fp@(-28),%d0 4323c: 2f2e fffc movel %fp@(-4),%sp@- 43240: 4c47 0000 remul %d7,%d0,%d0 43244: 2f00 movel %d0,%sp@- 43246: 2f2e ffe0 movel %fp@(-32),%sp@- 4324a: 4879 0005 d3c1 pea 5d3c1 43250: 2f03 movel %d3,%sp@- 43252: 4e94 jsr %a4@ 43254: 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++ ) { 43258: 4280 clrl %d0 4325a: 302b 000e movew %a3@(14),%d0 4325e: b480 cmpl %d0,%d2 43260: 6300 ff6a blsw 431cc 43264: 58ae ffc4 addql #4,%fp@(-60) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 43268: 206e ffc4 moveal %fp@(-60),%a0 4326c: b1fc 0006 7ea0 cmpal #425632,%a0 43272: 6600 ff2c bnew 431a0 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 43276: 202e ffec movel %fp@(-20),%d0 4327a: 243c 0000 03e8 movel #1000,%d2 43280: 4c42 0000 remul %d2,%d0,%d0 43284: 2f00 movel %d0,%sp@- 43286: 2f2e ffe8 movel %fp@(-24),%sp@- 4328a: 4879 0005 d3d9 pea 5d3d9 43290: 2f03 movel %d3,%sp@- 43292: 4e94 jsr %a4@ 43294: 4fef 0010 lea %sp@(16),%sp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 43298: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 4329e: 4e5e unlk %fp 432a0: 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( 432a2: 486e ffd8 pea %fp@(-40) /* * Print the information */ (*print)( context, 432a6: 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( 432ac: 486e fff0 pea %fp@(-16) 432b0: 4879 0006 7f96 pea 67f96 <_Thread_Time_of_last_context_switch> 432b6: 4eb9 0004 a7b0 jsr 4a7b0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 432bc: 486e ffd8 pea %fp@(-40) 432c0: 2f05 movel %d5,%sp@- 432c2: 4eb9 0004 a680 jsr 4a680 <_Timespec_Add_to> 432c8: 4fef 0014 lea %sp@(20),%sp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 432cc: 486e fff8 pea %fp@(-8) 432d0: 486e fffc pea %fp@(-4) 432d4: 486e ffe8 pea %fp@(-24) 432d8: 2f05 movel %d5,%sp@- 432da: 4e95 jsr %a5@ /* * Print the information */ (*print)( context, 432dc: 2f2e fff8 movel %fp@(-8),%sp@- 432e0: 202e ffe4 movel %fp@(-28),%d0 432e4: 2f2e fffc movel %fp@(-4),%sp@- 432e8: 4c47 0000 remul %d7,%d0,%d0 432ec: 2f00 movel %d0,%sp@- 432ee: 2f2e ffe0 movel %fp@(-32),%sp@- 432f2: 4879 0005 d3c1 pea 5d3c1 432f8: 2f03 movel %d3,%sp@- 432fa: 4e94 jsr %a4@ 432fc: 4fef 0028 lea %sp@(40),%sp 43300: 6000 ff56 braw 43258 <== ALWAYS TAKEN 0004d4c4 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4d4c4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4d4c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4d4ca: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d4ce: 4879 0005 b7ec pea 5b7ec <== NOT EXECUTED 4d4d4: 4eb9 0004 d500 jsr 4d500 <== NOT EXECUTED 4d4da: 508f addql #8,%sp <== NOT EXECUTED 4d4dc: 2400 movel %d0,%d2 <== NOT EXECUTED 4d4de: 660a bnes 4d4ea <== NOT EXECUTED { errno = rc; return -1; } return -1; } 4d4e0: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4d4e4: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d4e6: 4e5e unlk %fp <== NOT EXECUTED 4d4e8: 4e75 rts <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4d4ea: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 4d4f0: 2040 moveal %d0,%a0 <== NOT EXECUTED return -1; } return -1; } 4d4f2: 70ff moveq #-1,%d0 <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4d4f4: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4d4f6: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4d4fa: 4e5e unlk %fp <== NOT EXECUTED 4d4fc: 4e75 rts <== 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 4255a: 4e75 rts 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 ebd4 jsr 4ebd4 425b8: 588f addql #4,%sp while ( len ) { 425ba: 4a80 tstl %d0 425bc: 6742 beqs 42600 <== ALWAYS 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 <== ALWAYS TAKEN 425d0: 183c 005c moveb #92,%d4 425d4: b882 cmpl %d2,%d4 425d6: 6732 beqs 4260a <== ALWAYS TAKEN 425d8: 4a03 tstb %d3 425da: 672e beqs 4260a <== ALWAYS 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 425fc: 4a02 tstb %d2 425fe: 66e2 bnes 425e2 <== NEVER 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 42614: 4e75 rts 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 <== ALWAYS TAKEN /* * 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 <== ALWAYS TAKEN 4275c: 4a02 tstb %d2 4275e: 6646 bnes 427a6 <== NEVER TAKEN 42760: 2279 0005 c284 moveal 5c284 ,%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 c284 moveal 5c284 ,%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 d808 jsr 4d808 <__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 d808 jsr 4d808 <__errno> 42802: 760e moveq #14,%d3 42804: 2040 moveal %d0,%a0 return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 42806: 70ff moveq #-1,%d0 /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42808: 2083 movel %d3,%a0@ return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 4280a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 42810: 4e5e unlk %fp 42812: 4e75 rts 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 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42638: 4a8a tstl %a2 4263a: 6700 00b0 beqw 426ec <== ALWAYS TAKEN 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 <== ALWAYS 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 <== ALWAYS 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 <== ALWAYS 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 d808 jsr 4d808 <__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 d808 jsr 4d808 <__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 d808 jsr 4d808 <__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 d808 jsr 4d808 <__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 4271e: 4e75 rts 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 c284 moveal 5c284 ,%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 aaa8 tstl 5aaa8 42208: 6700 00e8 beqw 422f2 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4220c: 2079 0005 c17c moveal 5c17c ,%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 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 42236: 2079 0005 c284 moveal 5c284 ,%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 ae12 pea 5ae12 42282: 4e94 jsr %a4@ rtems_filesystem_root = loc; 42284: 2079 0005 c284 moveal 5c284 ,%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 ae12 pea 5ae12 422b4: 4e94 jsr %a4@ rtems_filesystem_current = loc; 422b6: 2079 0005 c284 moveal 5c284 ,%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 ae14 pea 5ae14 422dc: 4eb9 0004 2988 jsr 42988 if ( status != 0 ) 422e2: 508f addql #8,%sp 422e4: 4a80 tstl %d0 422e6: 6616 bnes 422fe <== ALWAYS 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 645c jsr 4645c <== 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 645c jsr 4645c <== 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 645c jsr 4645c <== NOT EXECUTED ... 0004b12c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4b12c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4b130: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4b134: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4b138: 4e5e unlk %fp <== NOT EXECUTED ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4b13a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4b13c: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 4b13e: 57c0 seq %d0 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4b140: 4480 negl %d0 <== NOT EXECUTED 4b142: 4e75 rts 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 <== ALWAYS TAKEN 4256e: 4a89 tstl %a1 42570: 672a beqs 4259c <== ALWAYS 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 <== ALWAYS 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 <== ALWAYS TAKEN 42592: b089 cmpl %a1,%d0 42594: 66de bnes 42574 <== NEVER 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 425a2: 4e75 rts 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 ebd4 lea 4ebd4 ,%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 d808 jsr 4d808 <__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 421b4: 4e75 rts 000482e4 : 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 ) { 482e4: 4e56 fff4 linkw %fp,#-12 482e8: 226e 000c moveal %fp@(12),%a1 482ec: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482f0: 242e 0008 movel %fp@(8),%d2 482f4: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 482f8: 2039 0006 3de2 movel 63de2 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 482fe: 2239 0006 3c36 movel 63c36 <_ISR_Nest_level>,%d1 48304: 6600 009c bnew 483a2 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 48308: 4a8a tstl %a2 4830a: 6700 00ea beqw 483f6 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 4830e: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 48310: 4a89 tstl %a1 48312: 6700 00e2 beqw 483f6 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48316: 4a91 tstl %a1@ 48318: 6700 00d4 beqw 483ee return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4831c: b480 cmpl %d0,%d2 4831e: 6476 bccs 48396 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48320: 2039 0006 3b9c movel 63b9c <_Thread_Dispatch_disable_level>,%d0 48326: 5280 addql #1,%d0 48328: 23c0 0006 3b9c movel %d0,63b9c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 4832e: 4a82 tstl %d2 48330: 667c bnes 483ae static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 48332: 2039 0006 3de2 movel 63de2 <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48338: 6700 00fc beqw 48436 <== ALWAYS TAKEN 4833c: 2239 0006 3de6 movel 63de6 <_IO_Driver_address_table>,%d1 48342: 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; 48344: 4a90 tstl %a0@ 48346: 6700 008e beqw 483d6 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 ) { 4834a: 5282 addql #1,%d2 4834c: 41e8 0018 lea %a0@(24),%a0 48350: b480 cmpl %d0,%d2 48352: 65f0 bcss 48344 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48354: 2482 movel %d2,%a2@ if ( m != n ) 48356: b480 cmpl %d0,%d2 48358: 6700 00de beqw 48438 4835c: 2602 movel %d2,%d3 4835e: 2002 movel %d2,%d0 48360: 2041 moveal %d1,%a0 48362: e78b lsll #3,%d3 48364: eb88 lsll #5,%d0 48366: 9083 subl %d3,%d0 48368: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 4836a: 20d9 movel %a1@+,%a0@+ 4836c: 20d9 movel %a1@+,%a0@+ 4836e: 20d9 movel %a1@+,%a0@+ 48370: 20d9 movel %a1@+,%a0@+ 48372: 20d9 movel %a1@+,%a0@+ 48374: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 48376: 4eb9 0004 9e10 jsr 49e10 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 4837c: 2d42 0008 movel %d2,%fp@(8) } 48380: 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 ); 48386: 42ae 0010 clrl %fp@(16) 4838a: 42ae 000c clrl %fp@(12) } 4838e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48390: 4ef9 0005 099c jmp 5099c return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48396: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48398: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4839e: 4e5e unlk %fp 483a0: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 483a2: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483aa: 4e5e unlk %fp 483ac: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 483ae: 2202 movel %d2,%d1 483b0: 2002 movel %d2,%d0 483b2: e789 lsll #3,%d1 483b4: eb88 lsll #5,%d0 483b6: 2079 0006 3de6 moveal 63de6 <_IO_Driver_address_table>,%a0 483bc: 9081 subl %d1,%d0 483be: 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; 483c0: 4a90 tstl %a0@ 483c2: 673e beqs 48402 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(); 483c4: 4eb9 0004 9e10 jsr 49e10 <_Thread_Enable_dispatch> 483ca: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483cc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483d2: 4e5e unlk %fp 483d4: 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; 483d6: 4aa8 0004 tstl %a0@(4) 483da: 6700 ff78 beqw 48354 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 ) { 483de: 5282 addql #1,%d2 483e0: 41e8 0018 lea %a0@(24),%a0 483e4: b480 cmpl %d0,%d2 483e6: 6500 ff5c bcsw 48344 <== ALWAYS TAKEN 483ea: 6000 ff68 braw 48354 <== ALWAYS TAKEN static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483ee: 4aa9 0004 tstl %a1@(4) 483f2: 6600 ff28 bnew 4831c _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483f6: 7009 moveq #9,%d0 } 483f8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483fe: 4e5e unlk %fp 48400: 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; 48402: 4aa8 0004 tstl %a0@(4) 48406: 66bc bnes 483c4 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48408: 20d9 movel %a1@+,%a0@+ 4840a: 20d9 movel %a1@+,%a0@+ 4840c: 20d9 movel %a1@+,%a0@+ 4840e: 20d9 movel %a1@+,%a0@+ 48410: 20d9 movel %a1@+,%a0@+ 48412: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 48414: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 48416: 4eb9 0004 9e10 jsr 49e10 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 4841c: 2d42 0008 movel %d2,%fp@(8) } 48420: 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 ); 48426: 42ae 0010 clrl %fp@(16) 4842a: 42ae 000c clrl %fp@(12) } 4842e: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48430: 4ef9 0005 099c jmp 5099c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 48436: 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(); 48438: 4eb9 0004 9e10 jsr 49e10 <_Thread_Enable_dispatch> 4843e: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48440: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48446: 4e5e unlk %fp 48448: 4e75 rts ... 00048a40 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 48a40: 4e56 fff0 linkw %fp,#-16 48a44: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48a48: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 48a4c: 4a8b tstl %a3 48a4e: 6744 beqs 48a94 <== ALWAYS TAKEN 48a50: 49f9 0006 7e90 lea 67e90 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 48a56: 2054 moveal %a4@,%a0 48a58: 4a88 tstl %a0 48a5a: 672e beqs 48a8a continue; information = _Objects_Information_table[ api_index ][ 1 ]; 48a5c: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 48a60: 4a8a tstl %a2 48a62: 6726 beqs 48a8a continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48a64: 4a6a 000e tstw %a2@(14) 48a68: 6720 beqs 48a8a <== ALWAYS TAKEN 48a6a: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 48a6c: 206a 0018 moveal %a2@(24),%a0 48a70: 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++ ) { 48a74: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 48a76: 4a80 tstl %d0 48a78: 6706 beqs 48a80 <== ALWAYS TAKEN continue; (*routine)(the_thread); 48a7a: 2f00 movel %d0,%sp@- 48a7c: 4e93 jsr %a3@ 48a7e: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48a80: 4280 clrl %d0 48a82: 302a 000e movew %a2@(14),%d0 48a86: b480 cmpl %d0,%d2 48a88: 63e2 blss 48a6c 48a8a: 588c addql #4,%a4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 48a8c: b9fc 0006 7ea0 cmpal #425632,%a4 48a92: 66c2 bnes 48a56 (*routine)(the_thread); } } } 48a94: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48a9a: 4e5e unlk %fp 48a9c: 4e75 rts ... 0004a86a : */ void rtems_libio_free( rtems_libio_t *iop ) { 4a86a: 4e56 0000 linkw %fp,#0 4a86e: 2f0a movel %a2,%sp@- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4a870: 42a7 clrl %sp@- */ void rtems_libio_free( rtems_libio_t *iop ) { 4a872: 246e 0008 moveal %fp@(8),%a2 rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4a876: 42a7 clrl %sp@- 4a878: 2f39 0005 d800 movel 5d800 ,%sp@- 4a87e: 4eb9 0004 5d2c jsr 45d2c if (iop->sem) 4a884: 202a 002c movel %a2@(44),%d0 4a888: 4fef 000c lea %sp@(12),%sp 4a88c: 6630 bnes 4a8be <== NEVER TAKEN rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4a88e: 41f9 0005 d7fc lea 5d7fc ,%a0 <== NOT EXECUTED rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a894: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; 4a89a: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 4a89e: 41f9 0005 d800 lea 5d800 ,%a0 <== NOT EXECUTED 4a8a4: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a8a8: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4a8ac: 23ca 0005 d7fc movel %a2,5d7fc <== NOT EXECUTED rtems_semaphore_release(rtems_libio_semaphore); } 4a8b2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a8b6: 4e5e unlk %fp <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 4a8b8: 4ef9 0004 5e68 jmp 45e68 <== NOT EXECUTED ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); 4a8be: 2f00 movel %d0,%sp@- 4a8c0: 4eb9 0004 5c54 jsr 45c54 4a8c6: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4a8c8: 41f9 0005 d7fc lea 5d7fc ,%a0 rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a8ce: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 4a8d4: 2550 0034 movel %a0@,%a2@(52) rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 4a8d8: 41f9 0005 d800 lea 5d800 ,%a0 4a8de: 2d50 0008 movel %a0@,%fp@(8) rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a8e2: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4a8e6: 23ca 0005 d7fc movel %a2,5d7fc rtems_semaphore_release(rtems_libio_semaphore); } 4a8ec: 246e fffc moveal %fp@(-4),%a2 4a8f0: 4e5e unlk %fp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 4a8f2: 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 c174 movel 5c174 ,%d0 4281e: 674a beqs 4286a <== ALWAYS 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 a430 jsr 4a430 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 d7f8 movel %d0,5d7f8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42836: 6770 beqs 428a8 <== ALWAYS 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 c174 moveal 5c174 ,%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 d7fc movel %d0,5d7fc for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42846: b289 cmpl %a1,%d1 42848: 641c bccs 42866 <== ALWAYS 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 d800 pea 5d800 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 <== ALWAYS TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 4288e: 2279 0005 c170 moveal 5c170 ,%a1 42894: 4a89 tstl %a1 42896: 6704 beqs 4289c <== ALWAYS 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 645c jsr 4645c <== 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 645c jsr 4645c <== NOT EXECUTED ... 0004a76e : */ int rtems_libio_is_file_open( void *node_access ) { 4a76e: 4e56 0000 linkw %fp,#0 4a772: 2f02 movel %d2,%sp@- rtems_libio_t *iop; int result=0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4a774: 42a7 clrl %sp@- */ int rtems_libio_is_file_open( void *node_access ) { 4a776: 242e 0008 movel %fp@(8),%d2 rtems_libio_t *iop; int result=0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4a77a: 42a7 clrl %sp@- 4a77c: 2f39 0005 d800 movel 5d800 ,%sp@- 4a782: 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++){ 4a788: 2079 0005 d7f8 moveal 5d7f8 ,%a0 4a78e: 4fef 000c lea %sp@(12),%sp 4a792: 2279 0005 c174 moveal 5c174 ,%a1 4a798: 4a89 tstl %a1 4a79a: 6720 beqs 4a7bc <== ALWAYS TAKEN 4a79c: 41e8 0014 lea %a0@(20),%a0 4a7a0: 4280 clrl %d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a7a2: 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++){ 4a7a4: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a7a6: 0281 0000 0100 andil #256,%d1 4a7ac: 6706 beqs 4a7b4 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4a7ae: b4a8 0004 cmpl %a0@(4),%d2 4a7b2: 6720 beqs 4a7d4 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a7b4: 41e8 0040 lea %a0@(64),%a0 4a7b8: b3c0 cmpal %d0,%a1 4a7ba: 62e6 bhis 4a7a2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a7bc: 2f39 0005 d800 movel 5d800 ,%sp@- /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a7c2: 4282 clrl %d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a7c4: 4eb9 0004 5e68 jsr 45e68 return result; } 4a7ca: 2002 movel %d2,%d0 4a7cc: 242e fffc movel %fp@(-4),%d2 4a7d0: 4e5e unlk %fp 4a7d2: 4e75 rts break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a7d4: 2f39 0005 d800 movel 5d800 ,%sp@- /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4a7da: 7401 moveq #1,%d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a7dc: 4eb9 0004 5e68 jsr 45e68 return result; } 4a7e2: 2002 movel %d2,%d0 4a7e4: 242e fffc movel %fp@(-4),%d2 4a7e8: 4e5e unlk %fp 4a7ea: 4e75 rts 0004a7ec : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 4a7ec: 4e56 0000 linkw %fp,#0 4a7f0: 2f02 movel %d2,%sp@- rtems_libio_t *iop; int result = 0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4a7f2: 42a7 clrl %sp@- */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 4a7f4: 242e 0008 movel %fp@(8),%d2 rtems_libio_t *iop; int result = 0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4a7f8: 42a7 clrl %sp@- 4a7fa: 2f39 0005 d800 movel 5d800 ,%sp@- 4a800: 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++){ 4a806: 2079 0005 d7f8 moveal 5d7f8 ,%a0 4a80c: 4fef 000c lea %sp@(12),%sp 4a810: 2279 0005 c174 moveal 5c174 ,%a1 4a816: 4a89 tstl %a1 4a818: 6720 beqs 4a83a <== ALWAYS TAKEN 4a81a: 41e8 0014 lea %a0@(20),%a0 4a81e: 4280 clrl %d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a820: 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++){ 4a822: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a824: 0281 0000 0100 andil #256,%d1 4a82a: 6706 beqs 4a832 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 4a82c: b4a8 0014 cmpl %a0@(20),%d2 4a830: 6720 beqs 4a852 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a832: 41e8 0040 lea %a0@(64),%a0 4a836: b3c0 cmpal %d0,%a1 4a838: 62e6 bhis 4a820 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a83a: 2f39 0005 d800 movel 5d800 ,%sp@- /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a840: 4282 clrl %d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a842: 4eb9 0004 5e68 jsr 45e68 return result; } 4a848: 2002 movel %d2,%d0 4a84a: 242e fffc movel %fp@(-4),%d2 4a84e: 4e5e unlk %fp 4a850: 4e75 rts break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a852: 2f39 0005 d800 movel 5d800 ,%sp@- /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 4a858: 7401 moveq #1,%d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a85a: 4eb9 0004 5e68 jsr 45e68 return result; } 4a860: 2002 movel %d2,%d0 4a862: 242e fffc movel %fp@(-4),%d2 4a866: 4e5e unlk %fp 4a868: 4e75 rts 000686c4 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 686c4: 4e56 ffd4 linkw %fp,#-44 686c8: 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); 686cc: 486e fffc pea %fp@(-4) 686d0: 42a7 clrl %sp@- 686d2: 42a7 clrl %sp@- 686d4: 4eb9 0006 98a0 jsr 698a0 if (sc != RTEMS_SUCCESSFUL) return sc; 686da: 4fef 000c lea %sp@(12),%sp 686de: 4a80 tstl %d0 686e0: 6600 00cc bnew 687ae <== ALWAYS TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 686e4: 2479 000a 07dc moveal a07dc ,%a2 686ea: b5fc 000a 515c cmpal #676188,%a2 686f0: 6700 00ca beqw 687bc return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 686f4: 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); 686f8: 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*/ 686fc: 4879 000a 515c pea a515c * 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); 68702: 4bf9 0004 7758 lea 47758 ,%a5 rtems_filesystem_root = loc; 68708: 49ee fff8 lea %fp@(-8),%a4 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 6870c: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 6870e: 2f0a movel %a2,%sp@- 68710: 4eb9 0008 29ec jsr 829ec rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 68716: 2079 000a 5144 moveal a5144 ,%a0 6871c: 2568 001c 0018 movel %a0@(28),%a2@(24) 68722: 2568 0020 001c movel %a0@(32),%a2@(28) 68728: 2568 0024 0020 movel %a0@(36),%a2@(32) 6872e: 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*/ 68734: 24ae fffc movel %fp@(-4),%a2@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 68738: 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); 6873e: 42a7 clrl %sp@- 68740: 2f0b movel %a3,%sp@- 68742: 42a7 clrl %sp@- 68744: 4878 0001 pea 1 68748: 4879 000a 021a pea a021a 6874e: 4e95 jsr %a5@ rtems_filesystem_root = loc; 68750: 2079 000a 07dc moveal a07dc ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68756: 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; 6875a: 2153 0018 movel %a3@,%a0@(24) 6875e: 216e ffec 001c movel %fp@(-20),%a0@(28) 68764: 216e fff0 0020 movel %fp@(-16),%a0@(32) 6876a: 216e fff4 0024 movel %fp@(-12),%a0@(36) 68770: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68774: 42a7 clrl %sp@- 68776: 2f0b movel %a3,%sp@- 68778: 42a7 clrl %sp@- 6877a: 4878 0001 pea 1 6877e: 4879 000a 021a pea a021a 68784: 4e95 jsr %a5@ rtems_filesystem_current = loc; 68786: 2079 000a 07dc moveal a07dc ,%a0 6878c: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 6878e: 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; 68792: 20d3 movel %a3@,%a0@+ 68794: 20ee ffec movel %fp@(-20),%a0@+ 68798: 20ee fff0 movel %fp@(-16),%a0@+ 6879c: 20ee fff4 movel %fp@(-12),%a0@+ 687a0: 2094 movel %a4@,%a0@ return RTEMS_SUCCESSFUL; } 687a2: 2002 movel %d2,%d0 687a4: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 687aa: 4e5e unlk %fp 687ac: 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; 687ae: 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; } 687b0: 2002 movel %d2,%d0 <== NOT EXECUTED 687b2: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 687b8: 4e5e unlk %fp <== NOT EXECUTED 687ba: 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)); 687bc: 4878 0048 pea 48 687c0: 4eb9 0004 7e8c jsr 47e8c if (!tmp) 687c6: 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)); 687c8: 2440 moveal %d0,%a2 if (!tmp) 687ca: 4a80 tstl %d0 687cc: 6700 00d6 beqw 688a4 <== ALWAYS TAKEN #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); 687d0: 487a fdda pea %pc@(685ac ) 687d4: 4879 000a 07dc pea a07dc 687da: 42a7 clrl %sp@- 687dc: 4eb9 0006 9c80 jsr 69c80 if (sc != RTEMS_SUCCESSFUL) { 687e2: 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); 687e6: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 687e8: 6600 00c8 bnew 688b2 <== ALWAYS TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 687ec: 23ca 000a 07dc movel %a2,a07dc }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 687f2: 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); 687f6: 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*/ 687fa: 4879 000a 515c pea a515c * 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); 68800: 4bf9 0004 7758 lea 47758 ,%a5 rtems_filesystem_root = loc; 68806: 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*/ 6880a: 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; 6880c: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 6880e: 4eb9 0008 29ec jsr 829ec rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 68814: 2079 000a 5144 moveal a5144 ,%a0 6881a: 2568 001c 0018 movel %a0@(28),%a2@(24) 68820: 2568 0020 001c movel %a0@(32),%a2@(28) 68826: 2568 0024 0020 movel %a0@(36),%a2@(32) 6882c: 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*/ 68832: 24ae fffc movel %fp@(-4),%a2@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 68836: 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); 6883c: 42a7 clrl %sp@- 6883e: 2f0b movel %a3,%sp@- 68840: 42a7 clrl %sp@- 68842: 4878 0001 pea 1 68846: 4879 000a 021a pea a021a 6884c: 4e95 jsr %a5@ rtems_filesystem_root = loc; 6884e: 2079 000a 07dc moveal a07dc ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68854: 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; 68858: 2153 0018 movel %a3@,%a0@(24) 6885c: 216e ffec 001c movel %fp@(-20),%a0@(28) 68862: 216e fff0 0020 movel %fp@(-16),%a0@(32) 68868: 216e fff4 0024 movel %fp@(-12),%a0@(36) 6886e: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68872: 42a7 clrl %sp@- 68874: 2f0b movel %a3,%sp@- 68876: 42a7 clrl %sp@- 68878: 4878 0001 pea 1 6887c: 4879 000a 021a pea a021a 68882: 4e95 jsr %a5@ rtems_filesystem_current = loc; 68884: 2079 000a 07dc moveal a07dc ,%a0 6888a: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 6888c: 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; 68890: 20d3 movel %a3@,%a0@+ 68892: 20ee ffec movel %fp@(-20),%a0@+ 68896: 20ee fff0 movel %fp@(-16),%a0@+ 6889a: 20ee fff4 movel %fp@(-12),%a0@+ 6889e: 2094 movel %a4@,%a0@ 688a0: 6000 ff00 braw 687a2 <== ALWAYS TAKEN 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) 688a4: 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; } 688a6: 2002 movel %d2,%d0 <== NOT EXECUTED 688a8: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 688ae: 4e5e unlk %fp <== NOT EXECUTED 688b0: 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); 688b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 688b4: 4eb9 0004 784c jsr 4784c <== NOT EXECUTED return sc; 688ba: 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; } 688bc: 2002 movel %d2,%d0 <== NOT EXECUTED 688be: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 688c4: 4e5e unlk %fp <== NOT EXECUTED 688c6: 4e75 rts 00068606 : * 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) { 68606: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 6860a: 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); 6860c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 68610: 42a7 clrl %sp@- <== NOT EXECUTED 68612: 42a7 clrl %sp@- <== NOT EXECUTED 68614: 4eb9 0006 98a0 jsr 698a0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 6861a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 6861e: 4a80 tstl %d0 <== NOT EXECUTED 68620: 6636 bnes 68658 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 68622: 2479 000a 07dc moveal a07dc ,%a2 <== NOT EXECUTED 68628: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 6862c: b092 cmpl %a2@,%d0 <== NOT EXECUTED 6862e: 6730 beqs 68660 <== 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, 68630: 486e fffc pea %fp@(-4) <== NOT EXECUTED 68634: 4879 000a 07dc pea a07dc <== NOT EXECUTED 6863a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 6863e: 4eb9 0006 9db8 jsr 69db8 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 68644: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 68648: 4a80 tstl %d0 <== NOT EXECUTED 6864a: 674c beqs 68698 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 6864c: 223c 000a 515c movel #676188,%d1 <== NOT EXECUTED 68652: 23c1 000a 07dc movel %d1,a07dc <== NOT EXECUTED return sc; } 68658: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 6865c: 4e5e unlk %fp <== NOT EXECUTED 6865e: 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); 68660: 4879 000a 07dc pea a07dc <== NOT EXECUTED 68666: 42a7 clrl %sp@- <== NOT EXECUTED 68668: 4eb9 0006 9d24 jsr 69d24 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 6866e: 508f addql #8,%sp <== NOT EXECUTED 68670: 4a80 tstl %d0 <== NOT EXECUTED 68672: 66e4 bnes 68658 <== NOT EXECUTED free_user_env(tmp); 68674: 2f0a movel %a2,%sp@- <== NOT EXECUTED 68676: 4eba ff34 jsr %pc@(685ac ) <== NOT EXECUTED 6867a: 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, 6867c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 68680: 4879 000a 07dc pea a07dc <== NOT EXECUTED 68686: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 6868a: 4eb9 0006 9db8 jsr 69db8 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 68690: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 68694: 4a80 tstl %d0 <== NOT EXECUTED 68696: 66b4 bnes 6864c <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 68698: 487a ff12 pea %pc@(685ac ) <== NOT EXECUTED 6869c: 4879 000a 07dc pea a07dc <== NOT EXECUTED 686a2: 42a7 clrl %sp@- <== NOT EXECUTED 686a4: 4eb9 0006 9c80 jsr 69c80 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 686aa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 686ae: 4a80 tstl %d0 <== NOT EXECUTED 686b0: 669a bnes 6864c <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 686b2: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 686b6: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 686ba: 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; 686bc: 23d0 000a 07dc movel %a0@,a07dc <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 686c2: 4e75 rts 0004a720 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a720: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a722: 4e56 0000 linkw %fp,#0 4a726: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a72a: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a72c: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a72e: 7406 moveq #6,%d2 4a730: b480 cmpl %d0,%d2 4a732: 6736 beqs 4a76a <== ALWAYS TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4a734: 0801 0001 btst #1,%d1 4a738: 6726 beqs 4a760 <== ALWAYS TAKEN 4a73a: 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 ) { 4a73c: 0801 0000 btst #0,%d1 4a740: 6704 beqs 4a746 fcntl_flags |= O_NONBLOCK; 4a742: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4a746: 0801 0009 btst #9,%d1 4a74a: 6704 beqs 4a750 fcntl_flags |= O_APPEND; 4a74c: 7408 moveq #8,%d2 4a74e: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4a750: 0801 000a btst #10,%d1 4a754: 6704 beqs 4a75a fcntl_flags |= O_CREAT; 4a756: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 4a75a: 241f movel %sp@+,%d2 4a75c: 4e5e unlk %fp 4a75e: 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) { 4a760: 2001 movel %d1,%d0 <== NOT EXECUTED 4a762: e488 lsrl #2,%d0 <== NOT EXECUTED 4a764: 7401 moveq #1,%d2 <== NOT EXECUTED 4a766: c082 andl %d2,%d0 <== NOT EXECUTED 4a768: 60d2 bras 4a73c <== NOT EXECUTED uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a76a: 7002 moveq #2,%d0 <== NOT EXECUTED 4a76c: 60ce bras 4a73c <== NOT EXECUTED 00047f5c : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 47f5c: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 47f60: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47f62: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 47f64: 486e fffc pea %fp@(-4) <== NOT EXECUTED 47f68: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 47f6c: 2f39 000a 04e0 movel a04e0 ,%sp@- <== NOT EXECUTED 47f72: 4eb9 0004 dd70 jsr 4dd70 <_Protected_heap_Get_block_size> <== NOT EXECUTED 47f78: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 47f7c: 4a00 tstb %d0 <== NOT EXECUTED 47f7e: 671a beqs 47f9a <== NOT EXECUTED MSBUMP(lifetime_freed, size); 47f80: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 47f84: 4282 clrl %d2 <== NOT EXECUTED 47f86: d7b9 000a 5140 addl %d3,a5140 <== NOT EXECUTED 47f8c: 2039 000a 513c movel a513c ,%d0 <== NOT EXECUTED 47f92: d182 addxl %d2,%d0 <== NOT EXECUTED 47f94: 23c0 000a 513c movel %d0,a513c <== NOT EXECUTED } } 47f9a: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 47f9e: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 47fa2: 4e5e unlk %fp <== NOT EXECUTED 47fa4: 4e75 rts 00047fa6 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 47fa6: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 47faa: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 47fae: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47fb0: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 47fb2: 4a80 tstl %d0 <== NOT EXECUTED 47fb4: 674e beqs 48004 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 47fb6: 204e moveal %fp,%a0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 47fb8: 4282 clrl %d2 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 47fba: 42a0 clrl %a0@- <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 47fbc: 2f08 movel %a0,%sp@- <== NOT EXECUTED 47fbe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47fc0: 2f39 000a 04e0 movel a04e0 ,%sp@- <== NOT EXECUTED 47fc6: 4eb9 0004 dd70 jsr 4dd70 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 47fcc: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 47fd0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 47fd4: 2039 000a 5134 movel a5134 ,%d0 <== NOT EXECUTED 47fda: d6b9 000a 5138 addl a5138 ,%d3 <== NOT EXECUTED 47fe0: d580 addxl %d0,%d2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 47fe2: 2003 movel %d3,%d0 <== NOT EXECUTED 47fe4: 90b9 000a 5140 subl a5140 ,%d0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 47fea: 23c2 000a 5134 movel %d2,a5134 <== NOT EXECUTED 47ff0: 23c3 000a 5138 movel %d3,a5138 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 47ff6: b0b9 000a 5130 cmpl a5130 ,%d0 <== NOT EXECUTED 47ffc: 6306 blss 48004 <== NOT EXECUTED s->max_depth = current_depth; 47ffe: 23c0 000a 5130 movel %d0,a5130 <== NOT EXECUTED } 48004: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 48008: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 4800c: 4e5e unlk %fp <== NOT EXECUTED 4800e: 4e75 rts 00048010 : #include #include static void rtems_malloc_statistics_initialize( void ) { 48010: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); } 48014: 4e5e unlk %fp <== NOT EXECUTED static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 48016: 42b9 000a 5118 clrl a5118 <== NOT EXECUTED 4801c: 42b9 000a 511c clrl a511c <== NOT EXECUTED 48022: 42b9 000a 5120 clrl a5120 <== NOT EXECUTED 48028: 42b9 000a 5124 clrl a5124 <== NOT EXECUTED 4802e: 42b9 000a 5128 clrl a5128 <== NOT EXECUTED 48034: 42b9 000a 512c clrl a512c <== NOT EXECUTED 4803a: 42b9 000a 5130 clrl a5130 <== NOT EXECUTED 48040: 42b9 000a 5134 clrl a5134 <== NOT EXECUTED 48046: 42b9 000a 5138 clrl a5138 <== NOT EXECUTED 4804c: 42b9 000a 513c clrl a513c <== NOT EXECUTED 48052: 42b9 000a 5140 clrl a5140 <== NOT EXECUTED } 48058: 4e75 rts <== NOT EXECUTED ... 0005008c : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 5008c: 4e56 0000 linkw %fp,#0 50090: 2f0a movel %a2,%sp@- 50092: 246e 0008 moveal %fp@(8),%a2 50096: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 50098: 4a8a tstl %a2 5009a: 675e beqs 500fa return EINVAL; *pointer = NULL; 5009c: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 5009e: 7003 moveq #3,%d0 500a0: b0b9 0006 3d1e cmpl 63d1e <_System_state_Current>,%d0 500a6: 6748 beqs 500f0 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 500a8: 4eb9 0004 41de jsr 441de uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 500ae: 42a7 clrl %sp@- 500b0: 2f2e 000c movel %fp@(12),%sp@- 500b4: 2f2e 0010 movel %fp@(16),%sp@- 500b8: 2f39 0006 2300 movel 62300 ,%sp@- 500be: 4eb9 0004 9778 jsr 49778 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 500c4: 4fef 0010 lea %sp@(16),%sp 500c8: 2400 movel %d0,%d2 500ca: 673c beqs 50108 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 500cc: 2079 0006 2966 moveal 62966 ,%a0 500d2: 4a88 tstl %a0 500d4: 670a beqs 500e0 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 500d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 500d8: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 500dc: 4e90 jsr %a0@ <== NOT EXECUTED 500de: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 500e0: 2482 movel %d2,%a2@ return 0; } 500e2: 242e fff8 movel %fp@(-8),%d2 */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 500e6: 4280 clrl %d0 return 0; } 500e8: 246e fffc moveal %fp@(-4),%a2 500ec: 4e5e unlk %fp 500ee: 4e75 rts *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 500f0: 4eb9 0004 4184 jsr 44184 500f6: 4a00 tstb %d0 500f8: 66ae bnes 500a8 <== NEVER TAKEN (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 500fa: 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; 500fe: 7016 moveq #22,%d0 } 50100: 246e fffc moveal %fp@(-4),%a2 50104: 4e5e unlk %fp 50106: 4e75 rts 50108: 242e fff8 movel %fp@(-8),%d2 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 5010c: 700c moveq #12,%d0 (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 5010e: 246e fffc moveal %fp@(-4),%a2 50112: 4e5e unlk %fp 50114: 4e75 rts ... 000476e8 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 476e8: 4e56 0000 linkw %fp,#0 476ec: 2f0a movel %a2,%sp@- 476ee: 246e 0010 moveal %fp@(16),%a2 476f2: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 476f4: 4a8a tstl %a2 476f6: 6766 beqs 4775e return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 476f8: 2f2e 000c movel %fp@(12),%sp@- 476fc: 2f2e 0008 movel %fp@(8),%sp@- 47700: 4eb9 0004 92a4 jsr 492a4 <_Objects_Get_information> if ( !obj_info ) 47706: 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 ); 47708: 2040 moveal %d0,%a0 if ( !obj_info ) 4770a: 4a80 tstl %d0 4770c: 675e beqs 4776c return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 4770e: 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; 47712: 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; 47714: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 4771a: 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; 4771e: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 47724: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47728: 6750 beqs 4777a <== ALWAYS TAKEN 4772a: 2068 0018 moveal %a0@(24),%a0 4772e: 7201 moveq #1,%d1 47730: 7001 moveq #1,%d0 47732: 93c9 subal %a1,%a1 47734: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 47736: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 4773a: 6718 beqs 47754 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++ ) 4773c: 2200 movel %d0,%d1 4773e: b082 cmpl %d2,%d0 47740: 63f2 blss 47734 <== NEVER TAKEN if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 47742: 2549 000e movel %a1,%a2@(14) 47746: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 47748: 242e fff8 movel %fp@(-8),%d2 4774c: 246e fffc moveal %fp@(-4),%a2 47750: 4e5e unlk %fp 47752: 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++; 47754: 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++ ) 47756: 2200 movel %d0,%d1 47758: b082 cmpl %d2,%d0 4775a: 63d8 blss 47734 <== ALWAYS TAKEN 4775c: 60e4 bras 47742 <== ALWAYS TAKEN unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 4775e: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 47762: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 47764: 246e fffc moveal %fp@(-4),%a2 47768: 4e5e unlk %fp 4776a: 4e75 rts 4776c: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 47770: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 47772: 246e fffc moveal %fp@(-4),%a2 47776: 4e5e unlk %fp 47778: 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++ ) 4777a: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 4777c: 4280 clrl %d0 <== NOT EXECUTED 4777e: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 47782: 60c4 bras 47748 <== NOT EXECUTED 000477ec : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 477ec: 4e56 fff0 linkw %fp,#-16 477f0: 48d7 001c moveml %d2-%d4,%sp@ 477f4: 262e 0008 movel %fp@(8),%d3 477f8: 282e 000c movel %fp@(12),%d4 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 477fc: 6764 beqs 47862 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 477fe: 4a83 tstl %d3 47800: 6754 beqs 47856 information = _Objects_Get_information_id( tmpId ); 47802: 2f03 movel %d3,%sp@- 47804: 4eb9 0004 9278 jsr 49278 <_Objects_Get_information_id> if ( !information ) 4780a: 588f addql #4,%sp if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); 4780c: 2400 movel %d0,%d2 if ( !information ) 4780e: 673a beqs 4784a return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 47810: 486e fffc pea %fp@(-4) 47814: 2f03 movel %d3,%sp@- 47816: 2f00 movel %d0,%sp@- 47818: 4eb9 0004 9448 jsr 49448 <_Objects_Get> switch ( location ) { 4781e: 4fef 000c lea %sp@(12),%sp 47822: 4aae fffc tstl %fp@(-4) 47826: 6622 bnes 4784a case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 47828: 2f04 movel %d4,%sp@- 4782a: 2f00 movel %d0,%sp@- 4782c: 2f02 movel %d2,%sp@- 4782e: 4eb9 0004 9654 jsr 49654 <_Objects_Set_name> _Thread_Enable_dispatch(); 47834: 4eb9 0004 9d68 jsr 49d68 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4783a: 4fef 000c lea %sp@(12),%sp the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); 4783e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47840: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 47846: 4e5e unlk %fp 47848: 4e75 rts switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4784a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4784c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 47852: 4e5e unlk %fp 47854: 4e75 rts Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 47856: 2079 0006 09d6 moveal 609d6 <_Thread_Executing>,%a0 4785c: 2628 0008 movel %a0@(8),%d3 47860: 60a0 bras 47802 <== ALWAYS TAKEN Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 47862: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47864: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4786a: 4e5e unlk %fp 4786c: 4e75 rts ... 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 42542: 4e75 rts 000561c8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 561c8: 4e56 ffe8 linkw %fp,#-24 561cc: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 561d0: 242e 0008 movel %fp@(8),%d2 561d4: 2a2e 000c movel %fp@(12),%d5 561d8: 282e 0010 movel %fp@(16),%d4 561dc: 262e 0014 movel %fp@(20),%d3 561e0: 246e 001c moveal %fp@(28),%a2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 561e4: 4a82 tstl %d2 561e6: 673a beqs 56222 return RTEMS_INVALID_NAME; if ( !starting_address ) 561e8: 4a85 tstl %d5 561ea: 671e beqs 5620a return RTEMS_INVALID_ADDRESS; if ( !id ) 561ec: 4a8a tstl %a2 561ee: 671a beqs 5620a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 561f0: 4a84 tstl %d4 561f2: 6722 beqs 56216 561f4: 4a83 tstl %d3 561f6: 671e beqs 56216 561f8: b684 cmpl %d4,%d3 561fa: 621a bhis 56216 561fc: 7003 moveq #3,%d0 561fe: c083 andl %d3,%d0 56200: 6614 bnes 56216 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 56202: 103c 0003 moveb #3,%d0 56206: c085 andl %d5,%d0 56208: 6724 beqs 5622e 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 5620a: 7009 moveq #9,%d0 } 5620c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56212: 4e5e unlk %fp 56214: 4e75 rts 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56216: 7008 moveq #8,%d0 } 56218: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5621e: 4e5e unlk %fp 56220: 4e75 rts rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 56222: 7003 moveq #3,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56224: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5622a: 4e5e unlk %fp 5622c: 4e75 rts 5622e: 2039 0007 c8f0 movel 7c8f0 <_Thread_Dispatch_disable_level>,%d0 56234: 5280 addql #1,%d0 56236: 23c0 0007 c8f0 movel %d0,7c8f0 <_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 ); 5623c: 4879 0007 c784 pea 7c784 <_Partition_Information> 56242: 4eb9 0005 ac40 jsr 5ac40 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 56248: 588f addql #4,%sp 5624a: 2640 moveal %d0,%a3 5624c: 4a80 tstl %d0 5624e: 675a beqs 562aa _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 56250: 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, 56254: 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; 56256: 276e 0018 001c movel %fp@(24),%a3@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 5625c: 4c43 0000 remul %d3,%d0,%d0 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 56260: 2744 0014 movel %d4,%a3@(20) the_partition->buffer_size = buffer_size; 56264: 2743 0018 movel %d3,%a3@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 56268: 42ab 0020 clrl %a3@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 5626c: 2f03 movel %d3,%sp@- 5626e: 2f00 movel %d0,%sp@- 56270: 2f05 movel %d5,%sp@- 56272: 486b 0024 pea %a3@(36) 56276: 4eb9 0005 9790 jsr 59790 <_Chain_Initialize> 5627c: 202b 0008 movel %a3@(8),%d0 56280: 4281 clrl %d1 56282: 2079 0007 c79c moveal 7c79c <_Partition_Information+0x18>,%a0 56288: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 5628a: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5628e: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 56292: 2480 movel %d0,%a2@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 56294: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5629a: 4fef 0010 lea %sp@(16),%sp name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 5629e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 562a0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 562a6: 4e5e unlk %fp 562a8: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 562aa: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 562b0: 7005 moveq #5,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 562b2: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 562b8: 4e5e unlk %fp 562ba: 4e75 rts 000563dc : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 563dc: 4e56 fffc linkw %fp,#-4 563e0: 2f0a movel %a2,%sp@- 563e2: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 563e4: 486e fffc pea %fp@(-4) 563e8: 2f2e 0008 movel %fp@(8),%sp@- 563ec: 4879 0007 c784 pea 7c784 <_Partition_Information> 563f2: 242e 000c movel %fp@(12),%d2 563f6: 4eb9 0005 b118 jsr 5b118 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 563fc: 4fef 000c lea %sp@(12),%sp 56400: 2440 moveal %d0,%a2 56402: 4aae fffc tstl %fp@(-4) 56406: 670e beqs 56416 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56408: 242e fff4 movel %fp@(-12),%d2 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 5640c: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5640e: 246e fff8 moveal %fp@(-8),%a2 56412: 4e5e unlk %fp 56414: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 56416: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 5641a: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 5641e: b082 cmpl %d2,%d0 56420: 623c bhis 5645e 56422: d280 addl %d0,%d1 56424: b282 cmpl %d2,%d1 56426: 6536 bcss 5645e <== ALWAYS TAKEN return ( 56428: 2202 movel %d2,%d1 5642a: 9280 subl %d0,%d1 5642c: 2001 movel %d1,%d0 5642e: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 56434: 4a81 tstl %d1 56436: 6626 bnes 5645e RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 56438: 2f02 movel %d2,%sp@- 5643a: 486a 0024 pea %a2@(36) 5643e: 4eb9 0005 971c jsr 5971c <_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; 56444: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 56448: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5644e: 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; 56452: 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(); 56454: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56456: 246e fff8 moveal %fp@(-8),%a2 5645a: 4e5e unlk %fp 5645c: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 5645e: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56464: 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(); 56468: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5646a: 246e fff8 moveal %fp@(-8),%a2 5646e: 4e5e unlk %fp 56470: 4e75 rts ... 0004bd02 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4bd02: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 4bd06: 4a39 0005 c7c4 tstb 5c7c4 4bd0c: 6708 beqs 4bd16 <== NEVER TAKEN return; if (rtems_pipe_semaphore) 4bd0e: 4ab9 0005 d104 tstl 5d104 <== NOT EXECUTED 4bd14: 6704 beqs 4bd1a <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 4bd16: 4e5e unlk %fp 4bd18: 4e75 rts if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 4bd1a: 4879 0005 d104 pea 5d104 <== NOT EXECUTED 4bd20: 42a7 clrl %sp@- <== NOT EXECUTED 4bd22: 4878 0054 pea 54 <== NOT EXECUTED 4bd26: 4878 0001 pea 1 <== NOT EXECUTED 4bd2a: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4bd30: 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) 4bd36: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4bd3a: 4a80 tstl %d0 <== NOT EXECUTED 4bd3c: 6610 bnes 4bd4e <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4bd3e: 4eb9 0004 55fc jsr 455fc <== NOT EXECUTED rtems_pipe_no = now; } 4bd44: 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; 4bd46: 33c0 0005 d10c movew %d0,5d10c <== NOT EXECUTED } 4bd4c: 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); 4bd4e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bd50: 4eb9 0004 645c jsr 4645c <== NOT EXECUTED 000557d0 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 557d0: 4e56 fffc linkw %fp,#-4 557d4: 2f0a movel %a2,%sp@- 557d6: 246e 0010 moveal %fp@(16),%a2 557da: 2f02 movel %d2,%sp@- 557dc: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 557e0: 4a8a tstl %a2 557e2: 6762 beqs 55846 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 557e4: 486e fffc pea %fp@(-4) 557e8: 2f2e 0008 movel %fp@(8),%sp@- 557ec: 4879 0007 c74c pea 7c74c <_Dual_ported_memory_Information> 557f2: 4eb9 0005 b118 jsr 5b118 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 557f8: 4fef 000c lea %sp@(12),%sp 557fc: 4aae fffc tstl %fp@(-4) 55800: 6624 bnes 55826 case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 55802: 2202 movel %d2,%d1 55804: 2040 moveal %d0,%a0 55806: 92a8 0014 subl %a0@(20),%d1 if ( ending > the_port->length ) 5580a: b2a8 0018 cmpl %a0@(24),%d1 5580e: 6324 blss 55834 *internal = external; 55810: 2482 movel %d2,%a2@ else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 55812: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 55818: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5581a: 242e fff4 movel %fp@(-12),%d2 5581e: 246e fff8 moveal %fp@(-8),%a2 55822: 4e5e unlk %fp 55824: 4e75 rts 55826: 242e fff4 movel %fp@(-12),%d2 if ( !internal ) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 5582a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5582c: 246e fff8 moveal %fp@(-8),%a2 55830: 4e5e unlk %fp 55832: 4e75 rts case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 55834: 2040 moveal %d0,%a0 55836: d2a8 0010 addl %a0@(16),%d1 5583a: 2481 movel %d1,%a2@ ending ); _Thread_Enable_dispatch(); 5583c: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 55842: 4280 clrl %d0 55844: 60d4 bras 5581a <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 55846: 242e fff4 movel %fp@(-12),%d2 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 5584a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5584c: 246e fff8 moveal %fp@(-8),%a2 55850: 4e5e unlk %fp 55852: 4e75 rts 0005587c : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 5587c: 4e56 fffc linkw %fp,#-4 55880: 2f0a movel %a2,%sp@- 55882: 246e 0010 moveal %fp@(16),%a2 55886: 2f02 movel %d2,%sp@- 55888: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 5588c: 4a8a tstl %a2 5588e: 6762 beqs 558f2 55890: 486e fffc pea %fp@(-4) 55894: 2f2e 0008 movel %fp@(8),%sp@- 55898: 4879 0007 c74c pea 7c74c <_Dual_ported_memory_Information> 5589e: 4eb9 0005 b118 jsr 5b118 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 558a4: 4fef 000c lea %sp@(12),%sp 558a8: 4aae fffc tstl %fp@(-4) 558ac: 6624 bnes 558d2 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 558ae: 2202 movel %d2,%d1 558b0: 2040 moveal %d0,%a0 558b2: 92a8 0010 subl %a0@(16),%d1 if ( ending > the_port->length ) 558b6: b2a8 0018 cmpl %a0@(24),%d1 558ba: 6324 blss 558e0 *external = internal; 558bc: 2482 movel %d2,%a2@ else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 558be: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 558c4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 558c6: 242e fff4 movel %fp@(-12),%d2 558ca: 246e fff8 moveal %fp@(-8),%a2 558ce: 4e5e unlk %fp 558d0: 4e75 rts 558d2: 242e fff4 movel %fp@(-12),%d2 if ( !external ) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 558d6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 558d8: 246e fff8 moveal %fp@(-8),%a2 558dc: 4e5e unlk %fp 558de: 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, 558e0: 2040 moveal %d0,%a0 558e2: d2a8 0014 addl %a0@(20),%d1 558e6: 2481 movel %d1,%a2@ ending ); _Thread_Enable_dispatch(); 558e8: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 558ee: 4280 clrl %d0 558f0: 60d4 bras 558c6 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 558f2: 242e fff4 movel %fp@(-12),%d2 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 558f6: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 558f8: 246e fff8 moveal %fp@(-8),%a2 558fc: 4e5e unlk %fp 558fe: 4e75 rts 0007a22c : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 7a22c: 4e56 ffec linkw %fp,#-20 7a230: 2f0a movel %a2,%sp@- 7a232: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 7a236: 4a8a tstl %a2 7a238: 6700 00a0 beqw 7a2da 7a23c: 486e fffc pea %fp@(-4) 7a240: 2f2e 0008 movel %fp@(8),%sp@- 7a244: 4879 000a 5692 pea a5692 <_Rate_monotonic_Information> 7a24a: 4eb9 0004 daa4 jsr 4daa4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a250: 4fef 000c lea %sp@(12),%sp 7a254: 4aae fffc tstl %fp@(-4) 7a258: 6634 bnes 7a28e case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 7a25a: 2240 moveal %d0,%a1 7a25c: 2069 0040 moveal %a1@(64),%a0 status->state = the_period->state; 7a260: 2229 0038 movel %a1@(56),%d1 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 7a264: 24a8 0008 movel %a0@(8),%a2@ status->state = the_period->state; 7a268: 2541 0004 movel %d1,%a2@(4) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 7a26c: 662a bnes 7a298 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); _Timespec_Set_to_zero( &status->executed_since_last_period ); 7a26e: 42aa 0014 clrl %a2@(20) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 7a272: 42aa 0008 clrl %a2@(8) 7a276: 42aa 000c clrl %a2@(12) _Timespec_Set_to_zero( &status->executed_since_last_period ); 7a27a: 42aa 0010 clrl %a2@(16) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 7a27e: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> 7a284: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a286: 246e ffe8 moveal %fp@(-24),%a2 7a28a: 4e5e unlk %fp 7a28c: 4e75 rts 7a28e: 246e ffe8 moveal %fp@(-24),%a2 if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a292: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a294: 4e5e unlk %fp 7a296: 4e75 rts /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 7a298: 486e fff4 pea %fp@(-12) 7a29c: 486e ffec pea %fp@(-20) 7a2a0: 2f00 movel %d0,%sp@- 7a2a2: 4eb9 0007 a372 jsr 7a372 <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 7a2a8: 4fef 000c lea %sp@(12),%sp 7a2ac: 4a00 tstb %d0 7a2ae: 6734 beqs 7a2e4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 7a2b0: 202e fff4 movel %fp@(-12),%d0 7a2b4: 222e fff8 movel %fp@(-8),%d1 7a2b8: 2540 0010 movel %d0,%a2@(16) 7a2bc: 2541 0014 movel %d1,%a2@(20) _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 7a2c0: 202e ffec movel %fp@(-20),%d0 7a2c4: 222e fff0 movel %fp@(-16),%d1 7a2c8: 2540 0008 movel %d0,%a2@(8) 7a2cc: 2541 000c movel %d1,%a2@(12) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 7a2d0: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> 7a2d6: 4280 clrl %d0 7a2d8: 60ac bras 7a286 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a2da: 246e ffe8 moveal %fp@(-24),%a2 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 7a2de: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a2e0: 4e5e unlk %fp 7a2e2: 4e75 rts valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 7a2e4: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a2ea: 246e ffe8 moveal %fp@(-24),%a2 valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 7a2ee: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a2f0: 4e5e unlk %fp 7a2f2: 4e75 rts 0007a53c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 7a53c: 4e56 ffec linkw %fp,#-20 7a540: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7a544: 486e fffc pea %fp@(-4) 7a548: 242e 0008 movel %fp@(8),%d2 7a54c: 2f02 movel %d2,%sp@- 7a54e: 4879 000a 5692 pea a5692 <_Rate_monotonic_Information> 7a554: 4eb9 0004 daa4 jsr 4daa4 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a55a: 4fef 000c lea %sp@(12),%sp 7a55e: 2440 moveal %d0,%a2 7a560: 4aae fffc tstl %fp@(-4) 7a564: 661e bnes 7a584 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 7a566: 2039 000a 5322 movel a5322 <_Thread_Executing>,%d0 7a56c: b0aa 0040 cmpl %a2@(64),%d0 7a570: 671e beqs 7a590 _Thread_Enable_dispatch(); 7a572: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> 7a578: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a57a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a580: 4e5e unlk %fp 7a582: 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; 7a584: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a586: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a58c: 4e5e unlk %fp 7a58e: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 7a590: 4aae 000c tstl %fp@(12) 7a594: 6700 00ce beqw 7a664 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 7a598: 203c 0000 0700 movel #1792,%d0 7a59e: 40c3 movew %sr,%d3 7a5a0: 8083 orl %d3,%d0 7a5a2: 46c0 movew %d0,%sr switch ( the_period->state ) { 7a5a4: 202a 0038 movel %a2@(56),%d0 7a5a8: 7202 moveq #2,%d1 7a5aa: b280 cmpl %d0,%d1 7a5ac: 6700 00dc beqw 7a68a 7a5b0: 123c 0004 moveb #4,%d1 7a5b4: b280 cmpl %d0,%d1 7a5b6: 6762 beqs 7a61a 7a5b8: 4a80 tstl %d0 7a5ba: 66c8 bnes 7a584 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 7a5bc: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 7a5be: 2f0a movel %a2,%sp@- 7a5c0: 2d40 fff8 movel %d0,%fp@(-8) 7a5c4: 4eb9 0007 a2f4 jsr 7a2f4 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7a5ca: 223c 0007 a728 movel #501544,%d1 the_watchdog->id = id; 7a5d0: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a5d4: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7a5d8: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 7a5dc: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a5de: 2542 001c movel %d2,%a2@(28) 7a5e2: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 7a5e6: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 7a5ea: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 7a5ee: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a5f2: 486a 0010 pea %a2@(16) 7a5f6: 4879 000a 5340 pea a5340 <_Watchdog_Ticks_chain> 7a5fc: 4eb9 0004 f490 jsr 4f490 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a602: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 7a608: 202e fff8 movel %fp@(-8),%d0 7a60c: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a610: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a616: 4e5e unlk %fp 7a618: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 7a61a: 2f0a movel %a2,%sp@- 7a61c: 4eb9 0007 a422 jsr 7a422 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 7a622: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 7a624: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a626: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a628: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7a62c: 2541 0038 movel %d1,%a2@(56) 7a630: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 7a634: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a638: 486a 0010 pea %a2@(16) 7a63c: 4879 000a 5340 pea a5340 <_Watchdog_Ticks_chain> 7a642: 2d40 fff8 movel %d0,%fp@(-8) 7a646: 4eb9 0004 f490 jsr 4f490 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a64c: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 7a652: 202e fff8 movel %fp@(-8),%d0 7a656: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a65a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a660: 4e5e unlk %fp 7a662: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7a664: 202a 0038 movel %a2@(56),%d0 7a668: 7204 moveq #4,%d1 7a66a: b280 cmpl %d0,%d1 7a66c: 6400 009c bccw 7a70a <== NEVER TAKEN 7a670: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7a672: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7a676: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 7a67c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a680: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a686: 4e5e unlk %fp 7a688: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7a68a: 2f0a movel %a2,%sp@- 7a68c: 4eb9 0007 a422 jsr 7a422 <_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; 7a692: 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; 7a696: 7001 moveq #1,%d0 the_period->next_length = length; 7a698: 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; 7a69c: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7a6a0: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 7a6a2: 2079 000a 5322 moveal a5322 <_Thread_Executing>,%a0 7a6a8: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7a6ae: 4878 4000 pea 4000 7a6b2: 2f08 movel %a0,%sp@- 7a6b4: 4eb9 0004 ec8c jsr 4ec8c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 7a6ba: 203c 0000 0700 movel #1792,%d0 7a6c0: 40c1 movew %sr,%d1 7a6c2: 8081 orl %d1,%d0 7a6c4: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 7a6c6: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 7a6c8: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7a6cc: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 7a6d0: 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 ) 7a6d2: 7203 moveq #3,%d1 7a6d4: 4fef 000c lea %sp@(12),%sp 7a6d8: b280 cmpl %d0,%d1 7a6da: 6712 beqs 7a6ee _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 7a6dc: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> 7a6e2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a6e4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a6ea: 4e5e unlk %fp 7a6ec: 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 ); 7a6ee: 4878 4000 pea 4000 7a6f2: 2f39 000a 5322 movel a5322 <_Thread_Executing>,%sp@- 7a6f8: 4eb9 0004 dfec jsr 4dfec <_Thread_Clear_state> 7a6fe: 508f addql #8,%sp _Thread_Enable_dispatch(); 7a700: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> 7a706: 4280 clrl %d0 7a708: 60da bras 7a6e4 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7a70a: 41f9 0009 f320 lea 9f320 ,%a0 7a710: 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(); 7a714: 2d40 fff8 movel %d0,%fp@(-8) 7a718: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> return( return_value ); 7a71e: 202e fff8 movel %fp@(-8),%d0 7a722: 6000 ff5c braw 7a680 <== ALWAYS TAKEN ... 00069514 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 69514: 4e56 ff78 linkw %fp,#-136 69518: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 6951c: 262e 0008 movel %fp@(8),%d3 69520: 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 ) 69524: 4a8a tstl %a2 69526: 6700 0082 beqw 695aa <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 6952a: 4879 0009 c022 pea 9c022 <_TOD_Days_per_month+0x68> 69530: 2f03 movel %d3,%sp@- 69532: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 69534: 4879 0009 c040 pea 9c040 <_TOD_Days_per_month+0x86> 6953a: 2f03 movel %d3,%sp@- 6953c: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 6953e: 4879 0009 c062 pea 9c062 <_TOD_Days_per_month+0xa8> 69544: 2f03 movel %d3,%sp@- 69546: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 69548: 4879 0009 c085 pea 9c085 <_TOD_Days_per_month+0xcb> 6954e: 2f03 movel %d3,%sp@- 69550: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 69552: 4fef 001c lea %sp@(28),%sp 69556: 2ebc 0009 c0d0 movel #639184,%sp@ 6955c: 2f03 movel %d3,%sp@- 6955e: 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 ; 69560: 2439 000a 5698 movel a5698 <_Rate_monotonic_Information+0x6>,%d2 69566: 508f addql #8,%sp 69568: b4b9 000a 569c cmpl a569c <_Rate_monotonic_Information+0xa>,%d2 6956e: 623a bhis 695aa <== ALWAYS TAKEN 69570: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69572: 2a0e movel %fp,%d5 69574: 0684 ffff ffa2 addil #-94,%d4 6957a: 47f9 0007 a16c lea 7a16c ,%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 ); 69580: 4bf9 0007 a22c lea 7a22c ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69586: 5b85 subql #5,%d5 69588: 49f9 0004 be48 lea 4be48 ,%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 ); 6958e: 2e3c 0006 ad64 movel #437604,%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 ); 69594: 2f04 movel %d4,%sp@- 69596: 2f02 movel %d2,%sp@- 69598: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 6959a: 508f addql #8,%sp 6959c: 4a80 tstl %d0 6959e: 6714 beqs 695b4 <== ALWAYS TAKEN * 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++ ) { 695a0: 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 ; 695a2: b4b9 000a 569c cmpl a569c <_Rate_monotonic_Information+0xa>,%d2 695a8: 63ea blss 69594 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 695aa: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 695b0: 4e5e unlk %fp 695b2: 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 ); 695b4: 486e ffda pea %fp@(-38) 695b8: 2f02 movel %d2,%sp@- 695ba: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 695bc: 2f05 movel %d5,%sp@- 695be: 4878 0005 pea 5 695c2: 2f2e ffda movel %fp@(-38),%sp@- 695c6: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 695c8: 2f2e ffa6 movel %fp@(-90),%sp@- 695cc: 2f2e ffa2 movel %fp@(-94),%sp@- 695d0: 2f05 movel %d5,%sp@- 695d2: 2f02 movel %d2,%sp@- 695d4: 4879 0009 c11c pea 9c11c <_TOD_Days_per_month+0x162> 695da: 2f03 movel %d3,%sp@- 695dc: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 695de: 202e ffa2 movel %fp@(-94),%d0 695e2: 4fef 002c lea %sp@(44),%sp 695e6: 6618 bnes 69600 (*print)( context, "\n" ); 695e8: 4879 0009 d913 pea 9d913 <__FUNCTION__.5937+0x5d> * 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++ ) { 695ee: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 695f0: 2f03 movel %d3,%sp@- 695f2: 4e92 jsr %a2@ continue; 695f4: 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 ; 695f6: b4b9 000a 569c cmpl a569c <_Rate_monotonic_Information+0xa>,%d2 695fc: 6396 blss 69594 695fe: 60aa bras 695aa <== 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 ); 69600: 486e fff2 pea %fp@(-14) 69604: 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++ ) { 69606: 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 ); 69608: 2f00 movel %d0,%sp@- 6960a: 486e ffba pea %fp@(-70) 6960e: 4e90 jsr %a0@ (*print)( context, 69610: 202e fff6 movel %fp@(-10),%d0 69614: 223c 0000 03e8 movel #1000,%d1 6961a: 4c41 0800 remsl %d1,%d0,%d0 6961e: 2c2e ffb6 movel %fp@(-74),%d6 69622: 2f00 movel %d0,%sp@- 69624: 2001 movel %d1,%d0 69626: 2f2e fff2 movel %fp@(-14),%sp@- 6962a: 4c40 6806 remsl %d0,%d6,%d6 6962e: 202e ffae movel %fp@(-82),%d0 69632: 2246 moveal %d6,%a1 69634: 223c 0000 03e8 movel #1000,%d1 6963a: 2f09 movel %a1,%sp@- 6963c: 2f2e ffb2 movel %fp@(-78),%sp@- 69640: 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, 69644: 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, 6964a: 2f00 movel %d0,%sp@- 6964c: 2f2e ffaa movel %fp@(-86),%sp@- 69650: 4879 0009 c133 pea 9c133 <_TOD_Days_per_month+0x179> 69656: 2f03 movel %d3,%sp@- 69658: 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); 6965a: 4fef 002c lea %sp@(44),%sp 6965e: 2047 moveal %d7,%a0 69660: 486e fff2 pea %fp@(-14) 69664: 2f2e ffa2 movel %fp@(-94),%sp@- 69668: 486e ffd2 pea %fp@(-46) 6966c: 4e90 jsr %a0@ (*print)( context, 6966e: 202e fff6 movel %fp@(-10),%d0 69672: 4c46 0800 remsl %d6,%d0,%d0 69676: 222e ffce movel %fp@(-50),%d1 6967a: 2f00 movel %d0,%sp@- 6967c: 2f2e fff2 movel %fp@(-14),%sp@- 69680: 4c46 1801 remsl %d6,%d1,%d1 69684: 202e ffc6 movel %fp@(-58),%d0 69688: 2241 moveal %d1,%a1 6968a: 2f09 movel %a1,%sp@- 6968c: 2f2e ffca movel %fp@(-54),%sp@- 69690: 4c46 0800 remsl %d6,%d0,%d0 69694: 2f00 movel %d0,%sp@- 69696: 2f2e ffc2 movel %fp@(-62),%sp@- 6969a: 4879 0009 c152 pea 9c152 <_TOD_Days_per_month+0x198> 696a0: 2f03 movel %d3,%sp@- 696a2: 4e92 jsr %a2@ 696a4: 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 ; 696a8: b4b9 000a 569c cmpl a569c <_Rate_monotonic_Information+0xa>,%d2 696ae: 6300 fee4 blsw 69594 696b2: 6000 fef6 braw 695aa <== NOT EXECUTED 000696d0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 696d0: 4e56 0000 linkw %fp,#0 696d4: 2039 000a 5268 movel a5268 <_Thread_Dispatch_disable_level>,%d0 696da: 5280 addql #1,%d0 696dc: 2f0a movel %a2,%sp@- 696de: 23c0 000a 5268 movel %d0,a5268 <_Thread_Dispatch_disable_level> 696e4: 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 ; 696e6: 2439 000a 5698 movel a5698 <_Rate_monotonic_Information+0x6>,%d2 696ec: b4b9 000a 569c cmpl a569c <_Rate_monotonic_Information+0xa>,%d2 696f2: 6216 bhis 6970a <== ALWAYS TAKEN 696f4: 45f9 0006 971c lea 6971c ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 696fa: 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++ ) { 696fc: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 696fe: 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 ; 69700: 588f addql #4,%sp 69702: b4b9 000a 569c cmpl a569c <_Rate_monotonic_Information+0xa>,%d2 69708: 63f0 blss 696fa /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 6970a: 242e fff8 movel %fp@(-8),%d2 6970e: 246e fffc moveal %fp@(-4),%a2 69712: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 69714: 4ef9 0004 e3c0 jmp 4e3c0 <_Thread_Enable_dispatch> ... 00056d04 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 56d04: 4e56 ffec linkw %fp,#-20 56d08: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 56d0c: 262e 0008 movel %fp@(8),%d3 56d10: 242e 000c movel %fp@(12),%d2 56d14: 246e 001c moveal %fp@(28),%a2 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 56d18: 4a83 tstl %d3 56d1a: 6700 0096 beqw 56db2 return RTEMS_INVALID_NAME; if ( !starting_address ) 56d1e: 4a82 tstl %d2 56d20: 670a beqs 56d2c return RTEMS_INVALID_ADDRESS; if ( !id ) 56d22: 4a8a tstl %a2 56d24: 6706 beqs 56d2c return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 56d26: 7003 moveq #3,%d0 56d28: c082 andl %d2,%d0 56d2a: 670c beqs 56d38 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 56d2c: 7009 moveq #9,%d0 } 56d2e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 56d34: 4e5e unlk %fp 56d36: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 56d38: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 56d3e: 4eb9 0005 9688 jsr 59688 <_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 ); 56d44: 4879 0007 c7f4 pea 7c7f4 <_Region_Information> 56d4a: 4eb9 0005 ac40 jsr 5ac40 <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 56d50: 508f addql #8,%sp 56d52: 2640 moveal %d0,%a3 56d54: 4a80 tstl %d0 56d56: 6766 beqs 56dbe return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 56d58: 2f2e 0014 movel %fp@(20),%sp@- 56d5c: 2f2e 0010 movel %fp@(16),%sp@- 56d60: 2f02 movel %d2,%sp@- 56d62: 486b 0068 pea %a3@(104) 56d66: 4eb9 0005 a6c4 jsr 5a6c4 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 56d6c: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 56d70: 2740 005c movel %d0,%a3@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 56d74: 6662 bnes 56dd8 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 56d76: 2f0b movel %a3,%sp@- 56d78: 4879 0007 c7f4 pea 7c7f4 <_Region_Information> 56d7e: 103c 0008 moveb #8,%d0 56d82: 2d40 fffc movel %d0,%fp@(-4) 56d86: 4eb9 0005 af78 jsr 5af78 <_Objects_Free> 56d8c: 202e fffc movel %fp@(-4),%d0 56d90: 508f addql #8,%sp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 56d92: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 56d98: 2d40 fffc movel %d0,%fp@(-4) 56d9c: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 56da2: 202e fffc movel %fp@(-4),%d0 56da6: 588f addql #4,%sp } 56da8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 56dae: 4e5e unlk %fp 56db0: 4e75 rts ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 56db2: 7003 moveq #3,%d0 } } _RTEMS_Unlock_allocator(); return return_status; } 56db4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 56dba: 4e5e unlk %fp 56dbc: 4e75 rts *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 56dbe: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 56dc4: 7005 moveq #5,%d0 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 56dc6: 2d40 fffc movel %d0,%fp@(-4) 56dca: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 56dd0: 202e fffc movel %fp@(-4),%d0 56dd4: 588f addql #4,%sp 56dd6: 60d0 bras 56da8 <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 56dd8: 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( 56ddc: 222e 0018 movel %fp@(24),%d1 } else { the_region->starting_address = starting_address; the_region->length = length; 56de0: 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( 56de4: e489 lsrl #2,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 56de6: 242e 0014 movel %fp@(20),%d2 the_region->attribute_set = attribute_set; 56dea: 206e 0018 moveal %fp@(24),%a0 } else { the_region->starting_address = starting_address; the_region->length = length; 56dee: 2740 0054 movel %d0,%a3@(84) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 56df2: 4280 clrl %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 56df4: 2742 0058 movel %d2,%a3@(88) the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 56df8: 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; 56dfa: 2748 0060 movel %a0,%a3@(96) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 56dfe: 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; 56e00: 42ab 0064 clrl %a3@(100) _Thread_queue_Initialize( 56e04: 4878 0006 pea 6 56e08: 4878 0040 pea 40 56e0c: 2f02 movel %d2,%sp@- 56e0e: 486b 0010 pea %a3@(16) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 56e12: 4282 clrl %d2 56e14: 2d40 fffc movel %d0,%fp@(-4) 56e18: 4eb9 0005 c178 jsr 5c178 <_Thread_queue_Initialize> 56e1e: 222b 0008 movel %a3@(8),%d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 56e22: 4fef 0010 lea %sp@(16),%sp 56e26: 2079 0007 c80c moveal 7c80c <_Region_Information+0x18>,%a0 56e2c: 3401 movew %d1,%d2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 56e2e: 2743 000c movel %d3,%a3@(12) 56e32: 202e fffc movel %fp@(-4),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 56e36: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 56e3a: 2481 movel %d1,%a2@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 56e3c: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 56e42: 2d40 fffc movel %d0,%fp@(-4) 56e46: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 56e4c: 202e fffc movel %fp@(-4),%d0 56e50: 588f addql #4,%sp 56e52: 6000 ff54 braw 56da8 <== ALWAYS TAKEN ... 00056f08 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 56f08: 4e56 fff8 linkw %fp,#-8 56f0c: 2f0a movel %a2,%sp@- 56f0e: 2f02 movel %d2,%sp@- 56f10: 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 ) 56f14: 677e beqs 56f94 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 56f16: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 56f1c: 4eb9 0005 9688 jsr 59688 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 56f22: 486e fff8 pea %fp@(-8) 56f26: 2f2e 0008 movel %fp@(8),%sp@- 56f2a: 4879 0007 c7f4 pea 7c7f4 <_Region_Information> 56f30: 4eb9 0005 b0dc jsr 5b0dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 56f36: 4fef 0010 lea %sp@(16),%sp 56f3a: 2440 moveal %d0,%a2 56f3c: 4aae fff8 tstl %fp@(-8) 56f40: 6640 bnes 56f82 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 56f42: 486e fffc pea %fp@(-4) 56f46: 2f2e 0010 movel %fp@(16),%sp@- 56f4a: 2f02 movel %d2,%sp@- 56f4c: 486a 0068 pea %a2@(104) 56f50: 4eb9 0005 a3b8 jsr 5a3b8 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 56f56: 4fef 0010 lea %sp@(16),%sp 56f5a: 4a80 tstl %d0 56f5c: 6748 beqs 56fa6 the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 56f5e: 7201 moveq #1,%d1 56f60: b280 cmpl %d0,%d1 56f62: 6760 beqs 56fc4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56f64: 2f39 0007 c9a2 movel 7c9a2 <_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 ) { 56f6a: 7418 moveq #24,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56f6c: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 56f72: 588f addql #4,%sp } 56f74: 2002 movel %d2,%d0 56f76: 242e fff0 movel %fp@(-16),%d2 56f7a: 246e fff4 moveal %fp@(-12),%a2 56f7e: 4e5e unlk %fp 56f80: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56f82: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 56f88: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56f8a: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 56f90: 588f addql #4,%sp 56f92: 60e0 bras 56f74 <== ALWAYS TAKEN Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 56f94: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 56f98: 2002 movel %d2,%d0 56f9a: 242e fff0 movel %fp@(-16),%d2 56f9e: 246e fff4 moveal %fp@(-12),%a2 56fa2: 4e5e unlk %fp 56fa4: 4e75 rts length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 56fa6: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 56faa: d1aa 005c addl %d0,%a2@(92) 56fae: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 56fb0: d1aa 0054 addl %d0,%a2@(84) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56fb4: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 56fba: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 56fc0: 588f addql #4,%sp 56fc2: 60b0 bras 56f74 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56fc4: 2f39 0007 c9a2 movel 7c9a2 <_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 ) { 56fca: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56fcc: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 56fd2: 588f addql #4,%sp 56fd4: 609e bras 56f74 <== ALWAYS TAKEN ... 00056fd8 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 56fd8: 4e56 fffc linkw %fp,#-4 56fdc: 2f0a movel %a2,%sp@- 56fde: 246e 000c moveal %fp@(12),%a2 56fe2: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 56fe4: 4a8a tstl %a2 56fe6: 6776 beqs 5705e <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 56fe8: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 56fee: 4eb9 0005 9688 jsr 59688 <_API_Mutex_Lock> 56ff4: 486e fffc pea %fp@(-4) 56ff8: 2f2e 0008 movel %fp@(8),%sp@- 56ffc: 4879 0007 c7f4 pea 7c7f4 <_Region_Information> 57002: 4eb9 0005 b0dc jsr 5b0dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57008: 4fef 0010 lea %sp@(16),%sp 5700c: 4aae fffc tstl %fp@(-4) 57010: 663a bnes 5704c the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 57012: 2f0a movel %a2,%sp@- 57014: 2040 moveal %d0,%a0 57016: 4868 0068 pea %a0@(104) 5701a: 4282 clrl %d2 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 5701c: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 57020: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 57024: 42aa 0010 clrl %a2@(16) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 57028: 4eb9 0005 a5e8 jsr 5a5e8 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 5702e: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57030: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 57036: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 5703c: 588f addql #4,%sp } 5703e: 2002 movel %d2,%d0 57040: 242e fff4 movel %fp@(-12),%d2 57044: 246e fff8 moveal %fp@(-8),%a2 57048: 4e5e unlk %fp 5704a: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5704c: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57052: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57054: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 5705a: 588f addql #4,%sp 5705c: 60e0 bras 5703e <== ALWAYS TAKEN { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 5705e: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 57060: 2002 movel %d2,%d0 57062: 242e fff4 movel %fp@(-12),%d2 57066: 246e fff8 moveal %fp@(-8),%a2 5706a: 4e5e unlk %fp 5706c: 4e75 rts ... 00057070 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 57070: 4e56 fffc linkw %fp,#-4 57074: 2f02 movel %d2,%sp@- 57076: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 5707a: 6766 beqs 570e2 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 5707c: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 57082: 4eb9 0005 9688 jsr 59688 <_API_Mutex_Lock> 57088: 486e fffc pea %fp@(-4) 5708c: 2f2e 0008 movel %fp@(8),%sp@- 57090: 4879 0007 c7f4 pea 7c7f4 <_Region_Information> 57096: 4eb9 0005 b0dc jsr 5b0dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5709c: 4fef 0010 lea %sp@(16),%sp 570a0: 4aae fffc tstl %fp@(-4) 570a4: 662a bnes 570d0 case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 570a6: 2f02 movel %d2,%sp@- 570a8: 2040 moveal %d0,%a0 570aa: 4868 0068 pea %a0@(104) 570ae: 4282 clrl %d2 570b0: 4eb9 0005 a63c jsr 5a63c <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 570b6: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 570b8: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 570be: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 570c4: 588f addql #4,%sp } 570c6: 2002 movel %d2,%d0 570c8: 242e fff8 movel %fp@(-8),%d2 570cc: 4e5e unlk %fp 570ce: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 570d0: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 570d6: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 570d8: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 570de: 588f addql #4,%sp 570e0: 60e4 bras 570c6 <== ALWAYS TAKEN { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 570e2: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 570e6: 2002 movel %d2,%d0 570e8: 242e fff8 movel %fp@(-8),%d2 570ec: 4e5e unlk %fp 570ee: 4e75 rts 000570f0 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 570f0: 4e56 ffe4 linkw %fp,#-28 570f4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 570f8: 262e 0008 movel %fp@(8),%d3 570fc: 242e 000c movel %fp@(12),%d2 57100: 246e 0018 moveal %fp@(24),%a2 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 57104: 4a8a tstl %a2 57106: 6700 00be beqw 571c6 return RTEMS_INVALID_ADDRESS; *segment = NULL; 5710a: 4292 clrl %a2@ if ( size == 0 ) 5710c: 4a82 tstl %d2 5710e: 660c bnes 5711c 57110: 7008 moveq #8,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 57112: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57118: 4e5e unlk %fp 5711a: 4e75 rts *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 5711c: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 57122: 4eb9 0005 9688 jsr 59688 <_API_Mutex_Lock> 57128: 486e fffc pea %fp@(-4) 5712c: 2f03 movel %d3,%sp@- 5712e: 4879 0007 c7f4 pea 7c7f4 <_Region_Information> executing = _Thread_Executing; 57134: 2879 0007 c9aa moveal 7c9aa <_Thread_Executing>,%a4 5713a: 4eb9 0005 b0dc jsr 5b0dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57140: 4fef 0010 lea %sp@(16),%sp 57144: 2640 moveal %d0,%a3 57146: 4aae fffc tstl %fp@(-4) 5714a: 6628 bnes 57174 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 5714c: b4ab 005c cmpl %a3@(92),%d2 57150: 633c blss 5718e default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57152: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 57158: 7008 moveq #8,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5715a: 2d40 fff8 movel %d0,%fp@(-8) 5715e: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 57164: 202e fff8 movel %fp@(-8),%d0 57168: 588f addql #4,%sp } 5716a: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57170: 4e5e unlk %fp 57172: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57174: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 5717a: 7004 moveq #4,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5717c: 2d40 fff8 movel %d0,%fp@(-8) 57180: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 57186: 202e fff8 movel %fp@(-8),%d0 5718a: 588f addql #4,%sp 5718c: 60dc bras 5716a <== ALWAYS TAKEN * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 5718e: 42a7 clrl %sp@- 57190: 42a7 clrl %sp@- 57192: 2f02 movel %d2,%sp@- 57194: 486b 0068 pea %a3@(104) 57198: 4eb9 0005 a224 jsr 5a224 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 5719e: 4fef 0010 lea %sp@(16),%sp 571a2: 2200 movel %d0,%d1 571a4: 672c beqs 571d2 the_region->number_of_used_blocks += 1; 571a6: 52ab 0064 addql #1,%a3@(100) *segment = the_segment; 571aa: 4280 clrl %d0 571ac: 2481 movel %d1,%a2@ default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 571ae: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 571b4: 2d40 fff8 movel %d0,%fp@(-8) 571b8: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 571be: 202e fff8 movel %fp@(-8),%d0 571c2: 588f addql #4,%sp 571c4: 60a4 bras 5716a <== ALWAYS TAKEN Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 571c6: 7009 moveq #9,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 571c8: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 571ce: 4e5e unlk %fp 571d0: 4e75 rts if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 571d2: 202e 0010 movel %fp@(16),%d0 571d6: 0800 0000 btst #0,%d0 571da: 671c beqs 571f8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 571dc: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 571e2: 700d moveq #13,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 571e4: 2d40 fff8 movel %d0,%fp@(-8) 571e8: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 571ee: 202e fff8 movel %fp@(-8),%d0 571f2: 588f addql #4,%sp 571f4: 6000 ff74 braw 5716a <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 571f8: 2039 0007 c8f0 movel 7c8f0 <_Thread_Dispatch_disable_level>,%d0 571fe: 5280 addql #1,%d0 57200: 23c0 0007 c8f0 movel %d0,7c8f0 <_Thread_Dispatch_disable_level> * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 57206: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 5720c: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 57212: 200b movel %a3,%d0 57214: 0680 0000 0010 addil #16,%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; 5721a: 7201 moveq #1,%d1 5721c: 2940 0044 movel %d0,%a4@(68) 57220: 2741 0040 movel %d1,%a3@(64) executing->Wait.id = id; 57224: 2943 0020 movel %d3,%a4@(32) executing->Wait.count = size; 57228: 2942 0024 movel %d2,%a4@(36) executing->Wait.return_argument = segment; 5722c: 294a 0028 movel %a2,%a4@(40) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 57230: 4879 0005 c25c pea 5c25c <_Thread_queue_Timeout> 57236: 2f2e 0014 movel %fp@(20),%sp@- 5723a: 2f00 movel %d0,%sp@- 5723c: 4eb9 0005 befc jsr 5befc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 57242: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 57248: 202c 0034 movel %a4@(52),%d0 5724c: 4fef 0010 lea %sp@(16),%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 57250: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57256: 4e5e unlk %fp 57258: 4e75 rts ... 0005725c : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 5725c: 4e56 fffc linkw %fp,#-4 57260: 2f03 movel %d3,%sp@- 57262: 262e 0010 movel %fp@(16),%d3 57266: 2f02 movel %d2,%sp@- 57268: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 5726c: 6700 0092 beqw 57300 return RTEMS_INVALID_ADDRESS; if ( !size ) 57270: 4a83 tstl %d3 57272: 6700 008c beqw 57300 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 57276: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 5727c: 4eb9 0005 9688 jsr 59688 <_API_Mutex_Lock> 57282: 486e fffc pea %fp@(-4) 57286: 2f2e 0008 movel %fp@(8),%sp@- 5728a: 4879 0007 c7f4 pea 7c7f4 <_Region_Information> 57290: 4eb9 0005 b0dc jsr 5b0dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57296: 222e fffc movel %fp@(-4),%d1 5729a: 4fef 0010 lea %sp@(16),%sp 5729e: 6636 bnes 572d6 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572a0: 2f03 movel %d3,%sp@- 572a2: 2040 moveal %d0,%a0 572a4: 2f02 movel %d2,%sp@- 572a6: 4868 0068 pea %a0@(104) 572aa: 4eb9 0005 ab18 jsr 5ab18 <_Heap_Size_of_alloc_area> 572b0: 4fef 000c lea %sp@(12),%sp 572b4: 4a00 tstb %d0 572b6: 6624 bnes 572dc <== NEVER TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572b8: 2f39 0007 c9a2 movel 7c9a2 <_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 ) ) 572be: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572c0: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 572c6: 588f addql #4,%sp <== NOT EXECUTED } 572c8: 2002 movel %d2,%d0 572ca: 242e fff4 movel %fp@(-12),%d2 572ce: 262e fff8 movel %fp@(-8),%d3 572d2: 4e5e unlk %fp 572d4: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 572d6: 7001 moveq #1,%d0 572d8: b081 cmpl %d1,%d0 572da: 6712 beqs 572ee <== NEVER TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572dc: 2f39 0007 c9a2 movel 7c9a2 <_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 ) ) 572e2: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572e4: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 572ea: 588f addql #4,%sp 572ec: 60da bras 572c8 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572ee: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 572f4: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572f6: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 572fc: 588f addql #4,%sp 572fe: 60c8 bras 572c8 <== ALWAYS TAKEN 57300: 7409 moveq #9,%d2 } 57302: 2002 movel %d2,%d0 57304: 242e fff4 movel %fp@(-12),%d2 57308: 262e fff8 movel %fp@(-8),%d3 5730c: 4e5e unlk %fp 5730e: 4e75 rts 0005740c : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 5740c: 4e56 fffc linkw %fp,#-4 57410: 2f0a movel %a2,%sp@- 57412: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 57414: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- 5741a: 4eb9 0005 9688 jsr 59688 <_API_Mutex_Lock> 57420: 486e fffc pea %fp@(-4) 57424: 2f2e 0008 movel %fp@(8),%sp@- 57428: 4879 0007 c7f4 pea 7c7f4 <_Region_Information> 5742e: 4eb9 0005 b0dc jsr 5b0dc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57434: 4fef 0010 lea %sp@(16),%sp 57438: 2440 moveal %d0,%a2 5743a: 4aae fffc tstl %fp@(-4) 5743e: 671e beqs 5745e default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57440: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57446: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57448: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 5744e: 588f addql #4,%sp } 57450: 2002 movel %d2,%d0 57452: 242e fff4 movel %fp@(-12),%d2 57456: 246e fff8 moveal %fp@(-8),%a2 5745a: 4e5e unlk %fp 5745c: 4e75 rts RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 5745e: 2f2e 000c movel %fp@(12),%sp@- 57462: 486a 0068 pea %a2@(104) 57466: 4eb9 0005 a468 jsr 5a468 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 5746c: 508f addql #8,%sp 5746e: 4a00 tstb %d0 57470: 6612 bnes 57484 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57472: 2f39 0007 c9a2 movel 7c9a2 <_RTEMS_Allocator_Mutex>,%sp@- else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 57478: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5747a: 4eb9 0005 96e8 jsr 596e8 <_API_Mutex_Unlock> return return_status; 57480: 588f addql #4,%sp 57482: 60cc bras 57450 <== ALWAYS TAKEN _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 57484: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ 57488: 4282 clrl %d2 5748a: 2f0a movel %a2,%sp@- 5748c: 4eb9 0005 ecac jsr 5ecac <_Region_Process_queue> break; } _RTEMS_Unlock_allocator(); return return_status; } 57492: 246e fff8 moveal %fp@(-8),%a2 57496: 2002 movel %d2,%d0 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 57498: 588f addql #4,%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 5749a: 242e fff4 movel %fp@(-12),%d2 5749e: 4e5e unlk %fp 574a0: 4e75 rts ... 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 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 d954 movel %d0,5d954 <_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 d890 pea 5d890 <_Semaphore_Information> 45b12: 4eb9 0004 7040 jsr 47040 <_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 678c jsr 4678c <_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 d890 pea 5d890 <_Semaphore_Information> 45b78: 4eb9 0004 7378 jsr 47378 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b7e: 4eb9 0004 7d48 jsr 47d48 <_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 6ad4 jsr 46ad4 <_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 d8a8 moveal 5d8a8 <_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 7d48 jsr 47d48 <_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 7d48 jsr 47d48 <_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 <== ALWAYS TAKEN } 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 <== ALWAYS TAKEN ... 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 d890 pea 5d890 <_Semaphore_Information> 45c68: 4eb9 0004 74dc jsr 474dc <_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 7d48 jsr 47d48 <_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 6780 jsr 46780 <_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 d890 pea 5d890 <_Semaphore_Information> 45cc4: 4eb9 0004 70d0 jsr 470d0 <_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 d890 pea 5d890 <_Semaphore_Information> 45cd2: 4eb9 0004 7378 jsr 47378 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45cd8: 4eb9 0004 7d48 jsr 47d48 <_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 6ac8 jsr 46ac8 <_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 d890 pea 5d890 <_Semaphore_Information> 45d08: 4eb9 0004 70d0 jsr 470d0 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45d16: 4eb9 0004 7378 jsr 47378 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d1c: 4eb9 0004 7d48 jsr 47d48 <_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 <== ALWAYS TAKEN ... 000504d0 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 504d0: 4e56 fffc linkw %fp,#-4 504d4: 486e fffc pea %fp@(-4) 504d8: 2f2e 0008 movel %fp@(8),%sp@- 504dc: 4879 0006 3ad8 pea 63ad8 <_Semaphore_Information> 504e2: 4eb9 0004 9524 jsr 49524 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 504e8: 4fef 000c lea %sp@(12),%sp 504ec: 4aae fffc tstl %fp@(-4) 504f0: 6706 beqs 504f8 504f2: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 504f4: 4e5e unlk %fp 504f6: 4e75 rts the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 504f8: 7230 moveq #48,%d1 504fa: 2040 moveal %d0,%a0 504fc: c2a8 0010 andl %a0@(16),%d1 50500: 6720 beqs 50522 _CORE_mutex_Flush( 50502: 4878 0001 pea 1 50506: 42a7 clrl %sp@- 50508: 4868 0014 pea %a0@(20) 5050c: 4eb9 0004 872c jsr 4872c <_CORE_mutex_Flush> 50512: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50516: 4eb9 0004 9e10 jsr 49e10 <_Thread_Enable_dispatch> 5051c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5051e: 4e5e unlk %fp 50520: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 50522: 4878 0001 pea 1 50526: 2040 moveal %d0,%a0 50528: 42a7 clrl %sp@- 5052a: 4868 0014 pea %a0@(20) 5052e: 4eb9 0004 8a74 jsr 48a74 <_CORE_semaphore_Flush> 50534: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50538: 4eb9 0004 9e10 jsr 49e10 <_Thread_Enable_dispatch> 5053e: 4280 clrl %d0 50540: 60dc bras 5051e <== ALWAYS TAKEN ... 00045d2c : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 45d2c: 4e56 ffec linkw %fp,#-20 45d30: 48d7 001c moveml %d2-%d4,%sp@ Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 45d34: 486e fff8 pea %fp@(-8) 45d38: 486e fffc pea %fp@(-4) 45d3c: 242e 0008 movel %fp@(8),%d2 45d40: 2f02 movel %d2,%sp@- 45d42: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45d48: 262e 000c movel %fp@(12),%d3 45d4c: 282e 0010 movel %fp@(16),%d4 45d50: 4eb9 0004 747c jsr 4747c <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 45d56: 4fef 0010 lea %sp@(16),%sp 45d5a: 4aae fffc tstl %fp@(-4) 45d5e: 670c beqs 45d6c 45d60: 7004 moveq #4,%d0 break; } return RTEMS_INVALID_ID; } 45d62: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 45d68: 4e5e unlk %fp 45d6a: 4e75 rts the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 45d6c: 7230 moveq #48,%d1 45d6e: 2040 moveal %d0,%a0 45d70: c2a8 0010 andl %a0@(16),%d1 45d74: 6738 beqs 45dae _CORE_mutex_Seize( 45d76: 2f2e fff8 movel %fp@(-8),%sp@- 45d7a: 7201 moveq #1,%d1 45d7c: c681 andl %d1,%d3 45d7e: 2f04 movel %d4,%sp@- 45d80: b781 eorl %d3,%d1 45d82: 2f01 movel %d1,%sp@- 45d84: 2f02 movel %d2,%sp@- 45d86: 4868 0014 pea %a0@(20) 45d8a: 4eb9 0004 6908 jsr 46908 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 45d90: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 45d96: 2f28 0034 movel %a0@(52),%sp@- 45d9a: 4eb9 0004 5ef8 jsr 45ef8 <_Semaphore_Translate_core_mutex_return_code> 45da0: 4fef 0018 lea %sp@(24),%sp break; } return RTEMS_INVALID_ID; } 45da4: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 45daa: 4e5e unlk %fp 45dac: 4e75 rts { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 45dae: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { 45db4: 2240 moveal %d0,%a1 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 45db6: 42a8 0034 clrl %a0@(52) if ( the_semaphore->count != 0 ) { 45dba: 2229 005c movel %a1@(92),%d1 45dbe: 662e bnes 45dee the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 45dc0: 0803 0000 btst #0,%d3 45dc4: 6748 beqs 45e0e _ISR_Enable( *level_p ); 45dc6: 202e fff8 movel %fp@(-8),%d0 45dca: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 45dcc: 7001 moveq #1,%d0 45dce: 2140 0034 movel %d0,%a0@(52) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 45dd2: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 45dd8: 2f28 0034 movel %a0@(52),%sp@- 45ddc: 4eb9 0004 5f0e jsr 45f0e <_Semaphore_Translate_core_semaphore_return_code> 45de2: 588f addql #4,%sp break; } return RTEMS_INVALID_ID; } 45de4: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 45dea: 4e5e unlk %fp 45dec: 4e75 rts /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 45dee: 5381 subql #1,%d1 45df0: 2341 005c movel %d1,%a1@(92) _ISR_Enable( *level_p ); 45df4: 202e fff8 movel %fp@(-8),%d0 45df8: 46c0 movew %d0,%sr id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 45dfa: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 45e00: 2f28 0034 movel %a0@(52),%sp@- 45e04: 4eb9 0004 5f0e jsr 45f0e <_Semaphore_Translate_core_semaphore_return_code> 45e0a: 588f addql #4,%sp 45e0c: 60d6 bras 45de4 <== ALWAYS TAKEN 45e0e: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 45e14: 5281 addql #1,%d1 45e16: 23c1 0005 d954 movel %d1,5d954 <_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; 45e1c: 7201 moveq #1,%d1 45e1e: 2240 moveal %d0,%a1 return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 45e20: 0680 0000 0014 addil #20,%d0 45e26: 2341 0044 movel %d1,%a1@(68) executing->Wait.id = id; 45e2a: 2142 0020 movel %d2,%a0@(32) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 45e2e: 2140 0044 movel %d0,%a0@(68) executing->Wait.id = id; _ISR_Enable( *level_p ); 45e32: 222e fff8 movel %fp@(-8),%d1 45e36: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 45e38: 4879 0004 856c pea 4856c <_Thread_queue_Timeout> 45e3e: 2f04 movel %d4,%sp@- 45e40: 2f00 movel %d0,%sp@- 45e42: 4eb9 0004 820c jsr 4820c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 45e48: 4eb9 0004 7d48 jsr 47d48 <_Thread_Enable_dispatch> 45e4e: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 45e54: 4fef 000c lea %sp@(12),%sp 45e58: 2f28 0034 movel %a0@(52),%sp@- 45e5c: 4eb9 0004 5f0e jsr 45f0e <_Semaphore_Translate_core_semaphore_return_code> 45e62: 588f addql #4,%sp 45e64: 6000 ff7e braw 45de4 <== ALWAYS TAKEN 000463f4 : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 463f4: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 463f6: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 463fa: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 46400: 6726 beqs 46428 * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 46402: 2039 0005 d950 movel 5d950 <_Thread_BSP_context+0x30>,%d0 46408: 2239 0005 d920 movel 5d920 <_Thread_BSP_context>,%d1 4640e: 46c1 movew %d1,%sr 46410: 2e40 moveal %d0,%sp 46412: 4e75 rts 46414: 23c0 0005 d950 movel %d0,5d950 <_Thread_BSP_context+0x30> <== NOT EXECUTED 4641a: 7004 moveq #4,%d0 <== NOT EXECUTED 4641c: 23c1 0005 d920 movel %d1,5d920 <_Thread_BSP_context> <== NOT EXECUTED 46422: 23c0 0005 dad6 movel %d0,5dad6 <_System_state_Current> <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 46428: 4e5e unlk %fp 4642a: 4e75 rts 00057a1c : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 57a1c: 4e56 fffc linkw %fp,#-4 57a20: 2f03 movel %d3,%sp@- 57a22: 2f02 movel %d2,%sp@- 57a24: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 57a28: 660e bnes 57a38 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57a2a: 242e fff4 movel %fp@(-12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 57a2e: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57a30: 262e fff8 movel %fp@(-8),%d3 57a34: 4e5e unlk %fp 57a36: 4e75 rts ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 57a38: 486e fffc pea %fp@(-4) 57a3c: 2f2e 0008 movel %fp@(8),%sp@- 57a40: 4eb9 0005 ba60 jsr 5ba60 <_Thread_Get> switch ( location ) { 57a46: 508f addql #8,%sp 57a48: 4aae fffc tstl %fp@(-4) 57a4c: 670e beqs 57a5c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57a4e: 242e fff4 movel %fp@(-12),%d2 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 57a52: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57a54: 262e fff8 movel %fp@(-8),%d3 57a58: 4e5e unlk %fp 57a5a: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 57a5c: 2240 moveal %d0,%a1 57a5e: 2069 0108 moveal %a1@(264),%a0 asr = &api->Signal; 57a62: 4aa8 000a tstl %a0@(10) 57a66: 6770 beqs 57ad8 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 57a68: 4a28 0008 tstb %a0@(8) 57a6c: 673e beqs 57aac rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 57a6e: 223c 0000 0700 movel #1792,%d1 57a74: 40c3 movew %sr,%d3 57a76: 8283 orl %d3,%d1 57a78: 46c1 movew %d1,%sr *signal_set |= signals; 57a7a: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 57a7e: 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 ) ) 57a80: 2239 0007 c98a movel 7c98a <_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; 57a86: 7401 moveq #1,%d2 57a88: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 57a8c: 4a81 tstl %d1 57a8e: 6708 beqs 57a98 57a90: b0b9 0007 c9aa cmpl 7c9aa <_Thread_Executing>,%d0 57a96: 6730 beqs 57ac8 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 57a98: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 57a9e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57aa0: 242e fff4 movel %fp@(-12),%d2 57aa4: 262e fff8 movel %fp@(-8),%d3 57aa8: 4e5e unlk %fp 57aaa: 4e75 rts rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 57aac: 203c 0000 0700 movel #1792,%d0 57ab2: 40c1 movew %sr,%d1 57ab4: 8081 orl %d1,%d0 57ab6: 46c0 movew %d0,%sr *signal_set |= signals; 57ab8: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 57abc: 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(); 57abe: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 57ac4: 4280 clrl %d0 57ac6: 60d8 bras 57aa0 <== ALWAYS TAKEN _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; 57ac8: 13c2 0007 ca34 moveb %d2,7ca34 <_ISR_Signals_to_thread_executing> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 57ace: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 57ad4: 4280 clrl %d0 57ad6: 60c8 bras 57aa0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 57ad8: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57ade: 242e fff4 movel %fp@(-12),%d2 _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 57ae2: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57ae4: 262e fff8 movel %fp@(-8),%d3 57ae8: 4e5e unlk %fp 57aea: 4e75 rts 00045858 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 45858: 4e56 0000 linkw %fp,#0 4585c: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 45860: 4aa8 0008 tstl %a0@(8) 45864: 672c beqs 45892 <== ALWAYS TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 45866: 2068 00c0 moveal %a0@(192),%a0 4586a: 43f9 000a 50e4 lea a50e4 ,%a1 45870: 2151 0008 movel %a1@,%a0@(8) 45874: 43f9 000a 50e8 lea a50e8 ,%a1 4587a: 2151 000c movel %a1@,%a0@(12) 4587e: 43f9 000a 50ec lea a50ec ,%a1 45884: 2151 0010 movel %a1@,%a0@(16) 45888: 43f9 000a 50f0 lea a50f0 ,%a1 4588e: 2151 0014 movel %a1@,%a0@(20) } 45892: 4e5e unlk %fp 45894: 4e75 rts 00045cf6 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 45cf6: 4e56 0000 linkw %fp,#0 45cfa: 2f0a movel %a2,%sp@- 45cfc: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 45d00: 4eb9 0004 5c90 jsr 45c90 if (the_thread) 45d06: 4a8a tstl %a2 45d08: 6716 beqs 45d20 <== ALWAYS TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 45d0a: 2f2a 00bc movel %a2@(188),%sp@- 45d0e: 4878 00a5 pea a5 45d12: 2f2a 00c0 movel %a2@(192),%sp@- 45d16: 4eb9 0008 2b58 jsr 82b58 45d1c: 4fef 000c lea %sp@(12),%sp return true; } 45d20: 246e fffc moveal %fp@(-4),%a2 45d24: 4e5e unlk %fp 45d26: 7001 moveq #1,%d0 45d28: 4e75 rts ... 00045b7c : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 45b7c: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 45b80: 2279 000a 5322 moveal a5322 <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 45b86: 2069 00c0 moveal %a1@(192),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 45b8a: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 45b8c: b1ce cmpal %fp,%a0 45b8e: 6354 blss 45be4 45b90: 4202 clrb %d2 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 45b92: 4ab9 000a 21a4 tstl a21a4 45b98: 662a bnes 45bc4 <== NEVER TAKEN 45b9a: 7001 moveq #1,%d0 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 45b9c: 4a02 tstb %d2 45b9e: 6704 beqs 45ba4 <== ALWAYS TAKEN 45ba0: 4a00 tstb %d0 45ba2: 664e bnes 45bf2 return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 45ba4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 45baa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45bac: 2f39 000a 5322 movel a5322 <_Thread_Executing>,%sp@- <== NOT EXECUTED 45bb2: 4eb9 0004 5acc jsr 45acc <== NOT EXECUTED return true; } 45bb8: 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; 45bbc: 508f addql #8,%sp <== NOT EXECUTED } 45bbe: 4e5e unlk %fp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 45bc0: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 45bc2: 4e75 rts <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 45bc4: 4878 0010 pea 10 45bc8: 4879 000a 50e4 pea a50e4 45bce: 4868 0008 pea %a0@(8) 45bd2: 4eb9 0008 2974 jsr 82974 45bd8: 4fef 000c lea %sp@(12),%sp 45bdc: 4a80 tstl %d0 45bde: 57c0 seq %d0 45be0: 4480 negl %d0 45be2: 60b8 bras 45b9c } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 45be4: 2008 movel %a0,%d0 45be6: d0a9 00bc addl %a1@(188),%d0 45bea: b08e cmpl %fp,%d0 45bec: 54c2 scc %d2 45bee: 4482 negl %d2 45bf0: 60a0 bras 45b92 /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 45bf2: 242e fffc movel %fp@(-4),%d2 45bf6: 4e5e unlk %fp } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 45bf8: 4200 clrb %d0 /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 45bfa: 4e75 rts 00045ab4 : void rtems_stack_checker_report_usage( void ) { 45ab4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 45ab8: 4879 0004 8a98 pea 48a98 <== NOT EXECUTED 45abe: 42a7 clrl %sp@- <== NOT EXECUTED 45ac0: 4eb9 0004 5a52 jsr 45a52 <== NOT EXECUTED 45ac6: 508f addql #8,%sp <== NOT EXECUTED } 45ac8: 4e5e unlk %fp <== NOT EXECUTED 45aca: 4e75 rts 00045a52 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 45a52: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 45a56: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45a58: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 45a5c: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 45a5e: 4879 0009 7f29 pea 97f29 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 45a64: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 45a68: 23ca 000a 21ac movel %a2,a21ac <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 45a6e: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 45a70: 23c2 000a 21a8 movel %d2,a21a8 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 45a76: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 45a78: 4879 0009 7f40 pea 97f40 <== NOT EXECUTED 45a7e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45a80: 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 ); 45a82: 4879 0004 58ca pea 458ca <== NOT EXECUTED 45a88: 4eb9 0004 d4b8 jsr 4d4b8 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 45a8e: 4878 ffff pea ffffffff <== NOT EXECUTED 45a92: 4eb9 0004 58ca jsr 458ca <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 45a98: 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; 45a9c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 45aa0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 45aa4: 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; 45aa6: 42b9 000a 21a8 clrl a21a8 <== NOT EXECUTED print_handler = NULL; 45aac: 42b9 000a 21ac clrl a21ac <== NOT EXECUTED } 45ab2: 4e75 rts 00045bfc : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 45bfc: 4e56 0000 linkw %fp,#0 45c00: 2f0a movel %a2,%sp@- 45c02: 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; 45c06: 222a 00c0 movel %a2@(192),%d1 45c0a: 5081 addql #8,%d1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 45c0c: 202a 00c0 movel %a2@(192),%d0 45c10: b08e cmpl %fp,%d0 45c12: 6208 bhis 45c1c <== ALWAYS 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; 45c14: d0aa 00bc addl %a2@(188),%d0 45c18: b08e cmpl %fp,%d0 45c1a: 6436 bccs 45c52 <== NEVER 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, 45c1c: 4878 0010 pea 10 <== NOT EXECUTED 45c20: 4879 000a 50e4 pea a50e4 <== NOT EXECUTED 45c26: 2f01 movel %d1,%sp@- <== NOT EXECUTED 45c28: 4eb9 0008 2974 jsr 82974 <== NOT EXECUTED 45c2e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45c32: 4a80 tstl %d0 <== NOT EXECUTED 45c34: 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 ); 45c36: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 45c3a: 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, 45c3e: 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 ); 45c40: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 45c46: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 45c4a: 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 ); 45c4c: 4ef9 0004 5acc jmp 45acc <== 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, 45c52: 4878 0010 pea 10 45c56: 4879 000a 50e4 pea a50e4 45c5c: 2f01 movel %d1,%sp@- 45c5e: 4eb9 0008 2974 jsr 82974 45c64: 4fef 000c lea %sp@(12),%sp (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 45c68: 4a80 tstl %d0 45c6a: 671c beqs 45c88 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); 45c6c: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 45c70: 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 ) { 45c74: 4200 clrb %d0 <== NOT EXECUTED Stack_check_report_blown_task( running, pattern_ok ); 45c76: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 45c7c: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 45c80: 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 ); 45c82: 4ef9 0004 5acc jmp 45acc <== NOT EXECUTED } } 45c88: 246e fffc moveal %fp@(-4),%a2 45c8c: 4e5e unlk %fp 45c8e: 4e75 rts 0004d3e8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d3e8: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d3ec: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d3f0: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d3f4: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d3f8: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d3fc: 4a8a tstl %a2 <== NOT EXECUTED 4d3fe: 677a beqs 4d47a <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4d400: 49f9 0004 f614 lea 4f614 <__errno>,%a4 <== NOT EXECUTED 4d406: 4e94 jsr %a4@ <== NOT EXECUTED *n = 0; 4d408: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d40a: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4d40c: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d40e: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d410: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d414: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d416: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d41a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d41c: 4eb9 0005 2068 jsr 52068 <== 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 ) 4d422: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d424: 2600 movel %d0,%d3 <== NOT EXECUTED 4d426: 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 ) 4d428: 4a8b tstl %a3 <== NOT EXECUTED 4d42a: 6704 beqs 4d430 <== NOT EXECUTED *endptr = end; 4d42c: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4d430: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4d434: 6750 beqs 4d486 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d436: 4878 ffff pea ffffffff <== NOT EXECUTED 4d43a: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d440: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d442: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d444: 4eb9 0005 cea8 jsr 5cea8 <__gtdf2> <== NOT EXECUTED 4d44a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d44e: 4a80 tstl %d0 <== NOT EXECUTED 4d450: 6e12 bgts 4d464 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d452: 2483 movel %d3,%a2@ <== NOT EXECUTED 4d454: 4280 clrl %d0 <== NOT EXECUTED 4d456: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4d45a: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d460: 4e5e unlk %fp <== NOT EXECUTED 4d462: 4e75 rts <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d464: 4e94 jsr %a4@ <== NOT EXECUTED 4d466: 7222 moveq #34,%d1 <== NOT EXECUTED 4d468: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d46a: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d46c: 66e4 bnes 4d452 <== NOT EXECUTED 4d46e: 700a moveq #10,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d470: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d476: 4e5e unlk %fp <== NOT EXECUTED 4d478: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d47a: 7009 moveq #9,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d47c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d482: 4e5e unlk %fp <== NOT EXECUTED 4d484: 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 ) 4d486: 700b moveq #11,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d488: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d48e: 4e5e unlk %fp <== NOT EXECUTED 4d490: 4e75 rts <== NOT EXECUTED ... 0004d494 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d494: 4e56 ffe8 linkw %fp,#-24 4d498: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d49c: 242e 0008 movel %fp@(8),%d2 4d4a0: 246e 000c moveal %fp@(12),%a2 4d4a4: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d4a8: 4a8a tstl %a2 4d4aa: 6768 beqs 4d514 return RTEMS_INVALID_ADDRESS; errno = 0; 4d4ac: 49f9 0004 f614 lea 4f614 <__errno>,%a4 4d4b2: 4e94 jsr %a4@ 4d4b4: 2040 moveal %d0,%a0 4d4b6: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d4b8: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d4bc: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d4c2: 2f02 movel %d2,%sp@- 4d4c4: 4eb9 0005 200a jsr 5200a #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 ) 4d4ca: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d4cc: 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 ) 4d4ce: 4a8b tstl %a3 4d4d0: 6704 beqs 4d4d6 *endptr = end; 4d4d2: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d4d6: b4ae fffc cmpl %fp@(-4),%d2 4d4da: 6744 beqs 4d520 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d4dc: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d4e2: 2f03 movel %d3,%sp@- 4d4e4: 4eb9 0005 cf38 jsr 5cf38 <__gtsf2> 4d4ea: 508f addql #8,%sp 4d4ec: 4a80 tstl %d0 4d4ee: 6e0e bgts 4d4fe <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d4f0: 2483 movel %d3,%a2@ 4d4f2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d4f4: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d4fa: 4e5e unlk %fp 4d4fc: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d4fe: 4e94 jsr %a4@ <== NOT EXECUTED 4d500: 7222 moveq #34,%d1 <== NOT EXECUTED 4d502: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d504: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d506: 66e8 bnes 4d4f0 <== NOT EXECUTED 4d508: 700a moveq #10,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d50a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d510: 4e5e unlk %fp <== NOT EXECUTED 4d512: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d514: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d516: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d51c: 4e5e unlk %fp 4d51e: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d520: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d522: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d528: 4e5e unlk %fp 4d52a: 4e75 rts 0005e0bc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5e0bc: 4e56 ffe8 linkw %fp,#-24 5e0c0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5e0c4: 242e 0008 movel %fp@(8),%d2 5e0c8: 246e 000c moveal %fp@(12),%a2 5e0cc: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e0d0: 4a8a tstl %a2 5e0d2: 675e beqs 5e132 return RTEMS_INVALID_ADDRESS; errno = 0; 5e0d4: 49f9 0007 f9b4 lea 7f9b4 <__errno>,%a4 5e0da: 4e94 jsr %a4@ 5e0dc: 2040 moveal %d0,%a0 5e0de: 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 ); 5e0e0: 2f2e 0014 movel %fp@(20),%sp@- 5e0e4: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5e0e8: 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 ); 5e0ea: 2f02 movel %d2,%sp@- 5e0ec: 4eb9 0008 6702 jsr 86702 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e0f2: 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 ); 5e0f6: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e0f8: 4a8b tstl %a3 5e0fa: 6704 beqs 5e100 *endptr = end; 5e0fc: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5e100: b4ae fffc cmpl %fp@(-4),%d2 5e104: 6738 beqs 5e13e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e106: 0c83 7fff ffff cmpil #2147483647,%d3 5e10c: 670e beqs 5e11c /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 5e10e: 2483 movel %d3,%a2@ 5e110: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 5e112: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e118: 4e5e unlk %fp 5e11a: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e11c: 4e94 jsr %a4@ 5e11e: 7222 moveq #34,%d1 5e120: 2040 moveal %d0,%a0 5e122: b290 cmpl %a0@,%d1 5e124: 66e8 bnes 5e10e <== ALWAYS TAKEN 5e126: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e128: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e12e: 4e5e unlk %fp 5e130: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e132: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e134: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e13a: 4e5e unlk %fp 5e13c: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5e13e: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e140: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e146: 4e5e unlk %fp 5e148: 4e75 rts ... 0004d670 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d670: 4e56 ffe8 linkw %fp,#-24 4d674: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d678: 262e 0008 movel %fp@(8),%d3 4d67c: 246e 000c moveal %fp@(12),%a2 4d680: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d684: 4a8a tstl %a2 4d686: 6766 beqs 4d6ee return RTEMS_INVALID_ADDRESS; errno = 0; 4d688: 49f9 0004 f614 lea 4f614 <__errno>,%a4 4d68e: 4e94 jsr %a4@ 4d690: 2040 moveal %d0,%a0 4d692: 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 ); 4d694: 2f2e 0014 movel %fp@(20),%sp@- 4d698: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d69c: 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 ); 4d69e: 2f03 movel %d3,%sp@- 4d6a0: 4eb9 0005 21ea jsr 521ea #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d6a6: 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 ); 4d6aa: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d6ac: 4a8b tstl %a3 4d6ae: 6704 beqs 4d6b4 *endptr = end; 4d6b0: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d6b4: b6ae fffc cmpl %fp@(-4),%d3 4d6b8: 6740 beqs 4d6fa return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d6ba: 0c82 7fff ffff cmpil #2147483647,%d2 4d6c0: 6716 beqs 4d6d8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d6c2: 0c82 8000 0000 cmpil #-2147483648,%d2 4d6c8: 670e beqs 4d6d8 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d6ca: 2482 movel %d2,%a2@ 4d6cc: 4280 clrl %d0 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_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (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 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4d6e2: 700a moveq #10,%d0 } 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 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 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 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d6fc: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d702: 4e5e unlk %fp 4d704: 4e75 rts ... 0004d5bc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d5bc: 4e56 ffe4 linkw %fp,#-28 4d5c0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d5c4: 242e 0008 movel %fp@(8),%d2 4d5c8: 246e 000c moveal %fp@(12),%a2 4d5cc: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d5d0: 4a8a tstl %a2 4d5d2: 6700 0082 beqw 4d656 return RTEMS_INVALID_ADDRESS; errno = 0; 4d5d6: 49f9 0004 f614 lea 4f614 <__errno>,%a4 4d5dc: 4e94 jsr %a4@ 4d5de: 2040 moveal %d0,%a0 *n = 0; 4d5e0: 4280 clrl %d0 4d5e2: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d5e4: 4290 clrl %a0@ *n = 0; 4d5e6: 2480 movel %d0,%a2@ 4d5e8: 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 ); 4d5ec: 2f2e 0014 movel %fp@(20),%sp@- 4d5f0: 486e fffc pea %fp@(-4) 4d5f4: 2f02 movel %d2,%sp@- 4d5f6: 4eb9 0005 220c jsr 5220c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d5fc: 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 ); 4d600: 2600 movel %d0,%d3 4d602: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d604: 4a8b tstl %a3 4d606: 6704 beqs 4d60c *endptr = end; 4d608: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d60c: b4ae fffc cmpl %fp@(-4),%d2 4d610: 6750 beqs 4d662 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d612: 203c 7fff ffff movel #2147483647,%d0 4d618: 72ff moveq #-1,%d1 4d61a: 9284 subl %d4,%d1 4d61c: 9183 subxl %d3,%d0 4d61e: 6720 beqs 4d640 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d620: 203c 8000 0000 movel #-2147483648,%d0 4d626: 4281 clrl %d1 4d628: 9284 subl %d4,%d1 4d62a: 9183 subxl %d3,%d0 4d62c: 6712 beqs 4d640 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d62e: 4280 clrl %d0 4d630: 2483 movel %d3,%a2@ 4d632: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4d636: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d63c: 4e5e unlk %fp 4d63e: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d640: 4e94 jsr %a4@ 4d642: 7222 moveq #34,%d1 4d644: 2040 moveal %d0,%a0 4d646: b290 cmpl %a0@,%d1 4d648: 66e4 bnes 4d62e <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4d64a: 700a moveq #10,%d0 } 4d64c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d652: 4e5e unlk %fp 4d654: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d656: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d658: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d65e: 4e5e unlk %fp 4d660: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d662: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d664: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d66a: 4e5e unlk %fp 4d66c: 4e75 rts ... 0005e14c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5e14c: 4e56 ffe8 linkw %fp,#-24 5e150: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5e154: 242e 0008 movel %fp@(8),%d2 5e158: 246e 000c moveal %fp@(12),%a2 5e15c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e160: 4a8a tstl %a2 5e162: 675c beqs 5e1c0 return RTEMS_INVALID_ADDRESS; errno = 0; 5e164: 49f9 0007 f9b4 lea 7f9b4 <__errno>,%a4 5e16a: 4e94 jsr %a4@ 5e16c: 2040 moveal %d0,%a0 5e16e: 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 ); 5e170: 4878 0010 pea 10 5e174: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5e178: 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 ); 5e17a: 2f02 movel %d2,%sp@- 5e17c: 4eb9 0008 6b34 jsr 86b34 #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 ) 5e182: 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 ); 5e186: 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 ) 5e188: 4a8b tstl %a3 5e18a: 6704 beqs 5e190 *endptr = end; 5e18c: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5e190: b4ae fffc cmpl %fp@(-4),%d2 5e194: 6736 beqs 5e1cc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e196: 70ff moveq #-1,%d0 5e198: b083 cmpl %d3,%d0 5e19a: 670e beqs 5e1aa <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 5e19c: 2483 movel %d3,%a2@ 5e19e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 5e1a0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e1a6: 4e5e unlk %fp 5e1a8: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e1aa: 4e94 jsr %a4@ <== NOT EXECUTED 5e1ac: 7222 moveq #34,%d1 <== NOT EXECUTED 5e1ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 5e1b0: b290 cmpl %a0@,%d1 <== NOT EXECUTED 5e1b2: 66e8 bnes 5e19c <== NOT EXECUTED 5e1b4: 700a moveq #10,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e1b6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 5e1bc: 4e5e unlk %fp <== NOT EXECUTED 5e1be: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e1c0: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e1c2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e1c8: 4e5e unlk %fp 5e1ca: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5e1cc: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e1ce: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e1d4: 4e5e unlk %fp 5e1d6: 4e75 rts 0004d804 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d804: 4e56 ffe8 linkw %fp,#-24 4d808: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d80c: 242e 0008 movel %fp@(8),%d2 4d810: 246e 000c moveal %fp@(12),%a2 4d814: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d818: 4a8a tstl %a2 4d81a: 675c beqs 4d878 return RTEMS_INVALID_ADDRESS; errno = 0; 4d81c: 49f9 0004 f614 lea 4f614 <__errno>,%a4 4d822: 4e94 jsr %a4@ 4d824: 2040 moveal %d0,%a0 4d826: 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 ); 4d828: 2f2e 0014 movel %fp@(20),%sp@- 4d82c: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d830: 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 ); 4d832: 2f02 movel %d2,%sp@- 4d834: 4eb9 0005 261c jsr 5261c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d83a: 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 ); 4d83e: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d840: 4a8b tstl %a3 4d842: 6704 beqs 4d848 *endptr = end; 4d844: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d848: b4ae fffc cmpl %fp@(-4),%d2 4d84c: 6736 beqs 4d884 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d84e: 70ff moveq #-1,%d0 4d850: b083 cmpl %d3,%d0 4d852: 670e beqs 4d862 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d854: 2483 movel %d3,%a2@ 4d856: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d858: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d85e: 4e5e unlk %fp 4d860: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d862: 4e94 jsr %a4@ 4d864: 7222 moveq #34,%d1 4d866: 2040 moveal %d0,%a0 4d868: b290 cmpl %a0@,%d1 4d86a: 66e8 bnes 4d854 <== ALWAYS TAKEN 4d86c: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d86e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d874: 4e5e unlk %fp 4d876: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d878: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d87a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d880: 4e5e unlk %fp 4d882: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d884: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d886: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d88c: 4e5e unlk %fp 4d88e: 4e75 rts 0005e248 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5e248: 4e56 ffe8 linkw %fp,#-24 5e24c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5e250: 242e 0008 movel %fp@(8),%d2 5e254: 246e 000c moveal %fp@(12),%a2 5e258: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e25c: 4a8a tstl %a2 5e25e: 675c beqs 5e2bc return RTEMS_INVALID_ADDRESS; errno = 0; 5e260: 49f9 0007 f9b4 lea 7f9b4 <__errno>,%a4 5e266: 4e94 jsr %a4@ 5e268: 2040 moveal %d0,%a0 5e26a: 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 ); 5e26c: 2f2e 0014 movel %fp@(20),%sp@- 5e270: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5e274: 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 ); 5e276: 2f02 movel %d2,%sp@- 5e278: 4eb9 0008 6b34 jsr 86b34 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e27e: 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 ); 5e282: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e284: 4a8b tstl %a3 5e286: 6704 beqs 5e28c *endptr = end; 5e288: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5e28c: b4ae fffc cmpl %fp@(-4),%d2 5e290: 6736 beqs 5e2c8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e292: 70ff moveq #-1,%d0 5e294: b083 cmpl %d3,%d0 5e296: 670e beqs 5e2a6 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 5e298: 2483 movel %d3,%a2@ 5e29a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 5e29c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e2a2: 4e5e unlk %fp 5e2a4: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e2a6: 4e94 jsr %a4@ 5e2a8: 7222 moveq #34,%d1 5e2aa: 2040 moveal %d0,%a0 5e2ac: b290 cmpl %a0@,%d1 5e2ae: 66e8 bnes 5e298 <== ALWAYS TAKEN 5e2b0: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e2b2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e2b8: 4e5e unlk %fp 5e2ba: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e2bc: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e2be: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e2c4: 4e5e unlk %fp 5e2c6: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5e2c8: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e2ca: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e2d0: 4e5e unlk %fp 5e2d2: 4e75 rts 0004d890 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d890: 4e56 ffe4 linkw %fp,#-28 4d894: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d898: 242e 0008 movel %fp@(8),%d2 4d89c: 246e 000c moveal %fp@(12),%a2 4d8a0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d8a4: 4a8a tstl %a2 4d8a6: 676e beqs 4d916 return RTEMS_INVALID_ADDRESS; errno = 0; 4d8a8: 49f9 0004 f614 lea 4f614 <__errno>,%a4 4d8ae: 4e94 jsr %a4@ 4d8b0: 2040 moveal %d0,%a0 *n = 0; 4d8b2: 4280 clrl %d0 4d8b4: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d8b6: 4290 clrl %a0@ *n = 0; 4d8b8: 2480 movel %d0,%a2@ 4d8ba: 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 ); 4d8be: 2f2e 0014 movel %fp@(20),%sp@- 4d8c2: 486e fffc pea %fp@(-4) 4d8c6: 2f02 movel %d2,%sp@- 4d8c8: 4eb9 0005 263c jsr 5263c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d8ce: 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 ); 4d8d2: 2600 movel %d0,%d3 4d8d4: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d8d6: 4a8b tstl %a3 4d8d8: 6704 beqs 4d8de *endptr = end; 4d8da: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d8de: b4ae fffc cmpl %fp@(-4),%d2 4d8e2: 673e beqs 4d922 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d8e4: 70ff moveq #-1,%d0 4d8e6: 72ff moveq #-1,%d1 4d8e8: 9284 subl %d4,%d1 4d8ea: 9183 subxl %d3,%d0 4d8ec: 6712 beqs 4d900 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d8ee: 4280 clrl %d0 4d8f0: 2483 movel %d3,%a2@ 4d8f2: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4d8f6: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d8fc: 4e5e unlk %fp 4d8fe: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d900: 4e94 jsr %a4@ 4d902: 7222 moveq #34,%d1 4d904: 2040 moveal %d0,%a0 4d906: b290 cmpl %a0@,%d1 4d908: 66e4 bnes 4d8ee <== ALWAYS TAKEN 4d90a: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d90c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d912: 4e5e unlk %fp 4d914: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d916: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d918: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d91e: 4e5e unlk %fp 4d920: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d922: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d924: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d92a: 4e5e unlk %fp 4d92c: 4e75 rts ... 00045f24 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 45f24: 4e56 ffe8 linkw %fp,#-24 45f28: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 45f2c: 242e 0008 movel %fp@(8),%d2 45f30: 282e 000c movel %fp@(12),%d4 45f34: 262e 0014 movel %fp@(20),%d3 45f38: 2a2e 0018 movel %fp@(24),%d5 45f3c: 246e 001c moveal %fp@(28),%a2 Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 45f40: 4a8a tstl %a2 45f42: 6700 011c beqw 46060 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 45f46: 4a82 tstl %d2 45f48: 6700 00b4 beqw 45ffe /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 45f4c: 4a45 tstw %d5 45f4e: 6d14 blts 45f64 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 45f50: 4a84 tstl %d4 45f52: 6700 00b6 beqw 4600a 45f56: 4280 clrl %d0 45f58: 1039 0005 c222 moveb 5c222 ,%d0 45f5e: b084 cmpl %d4,%d0 45f60: 6500 00a8 bcsw 4600a */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 45f64: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 45f6a: 4eb9 0004 66b4 jsr 466b4 <_API_Mutex_Lock> * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 45f70: 4879 0005 d8c8 pea 5d8c8 <_RTEMS_tasks_Information> 45f76: 4eb9 0004 7040 jsr 47040 <_Objects_Allocate> * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 45f7c: 508f addql #8,%sp 45f7e: 2640 moveal %d0,%a3 45f80: 4a80 tstl %d0 45f82: 6700 00c2 beqw 46046 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 45f86: 2f02 movel %d2,%sp@- 45f88: 7407 moveq #7,%d2 45f8a: 7009 moveq #9,%d0 45f8c: 2203 movel %d3,%d1 45f8e: e0a9 lsrl %d0,%d1 45f90: 2003 movel %d3,%d0 45f92: e088 lsrl #8,%d0 45f94: c483 andl %d3,%d2 45f96: 2f02 movel %d2,%sp@- 45f98: 7401 moveq #1,%d2 45f9a: 42a7 clrl %sp@- 45f9c: c481 andl %d1,%d2 45f9e: 7201 moveq #1,%d1 45fa0: 2f02 movel %d2,%sp@- 45fa2: 7401 moveq #1,%d2 45fa4: b380 eorl %d1,%d0 45fa6: c480 andl %d0,%d2 45fa8: 7001 moveq #1,%d0 45faa: 2f02 movel %d2,%sp@- 45fac: c085 andl %d5,%d0 45fae: 2f04 movel %d4,%sp@- 45fb0: 2f00 movel %d0,%sp@- 45fb2: 2f2e 0010 movel %fp@(16),%sp@- 45fb6: 42a7 clrl %sp@- 45fb8: 2f0b movel %a3,%sp@- 45fba: 4879 0005 d8c8 pea 5d8c8 <_RTEMS_tasks_Information> 45fc0: 4eb9 0004 7e0c jsr 47e0c <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 45fc6: 4fef 002c lea %sp@(44),%sp 45fca: 4a00 tstb %d0 45fcc: 6748 beqs 46016 } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 45fce: 720a moveq #10,%d1 45fd0: 7401 moveq #1,%d2 45fd2: e2ab lsrl %d1,%d3 45fd4: b583 eorl %d2,%d3 45fd6: 206b 0108 moveal %a3@(264),%a0 45fda: c682 andl %d2,%d3 *id = the_thread->Object.id; 45fdc: 24ab 0008 movel %a3@(8),%a2@ } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 45fe0: 1143 0008 moveb %d3,%a0@(8) ); } #endif _RTEMS_Unlock_allocator(); 45fe4: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 45fea: 4eb9 0004 6714 jsr 46714 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 45ff0: 588f addql #4,%sp ); } #endif _RTEMS_Unlock_allocator(); 45ff2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45ff4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 45ffa: 4e5e unlk %fp 45ffc: 4e75 rts if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 45ffe: 7003 moveq #3,%d0 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 46000: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 46006: 4e5e unlk %fp 46008: 4e75 rts } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 4600a: 7013 moveq #19,%d0 } 4600c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 46012: 4e5e unlk %fp 46014: 4e75 rts */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 46016: 2f2b 0008 movel %a3@(8),%sp@- 4601a: 4eb9 0004 73fc jsr 473fc <_Objects_Get_information_id> 46020: 2f0b movel %a3,%sp@- 46022: 2f00 movel %d0,%sp@- 46024: 4eb9 0004 7378 jsr 47378 <_Objects_Free> #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 4602a: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 46030: 4eb9 0004 6714 jsr 46714 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 46036: 4fef 0010 lea %sp@(16),%sp #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 4603a: 700d moveq #13,%d0 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 4603c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 46042: 4e5e unlk %fp 46044: 4e75 rts */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 46046: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4604c: 4eb9 0004 6714 jsr 46714 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 46052: 588f addql #4,%sp */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 46054: 7005 moveq #5,%d0 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 46056: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4605c: 4e5e unlk %fp 4605e: 4e75 rts Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 46060: 7009 moveq #9,%d0 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 46062: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 46068: 4e5e unlk %fp 4606a: 4e75 rts 0004cd28 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4cd28: 4e56 ffe4 linkw %fp,#-28 4cd2c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4cd30: 2a2e 0008 movel %fp@(8),%d5 4cd34: 242e 000c movel %fp@(12),%d2 4cd38: 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 ) 4cd3c: 4a8c tstl %a4 4cd3e: 6700 0154 beqw 4ce94 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4cd42: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4cd48: 4a2a 0075 tstb %a2@(117) 4cd4c: 57c0 seq %d0 4cd4e: 263c 0000 0100 movel #256,%d3 4cd54: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4cd56: 266a 0108 moveal %a2@(264),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4cd5a: c680 andl %d0,%d3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4cd5c: 4aaa 007a tstl %a2@(122) 4cd60: 6600 00d4 bnew 4ce36 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4cd64: 4a2b 0008 tstb %a3@(8) 4cd68: 57c0 seq %d0 4cd6a: 283c 0000 0400 movel #1024,%d4 4cd70: 49c0 extbl %d0 4cd72: 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(); 4cd74: 4eb9 0004 9210 jsr 49210 <_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; 4cd7a: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4cd7c: 8083 orl %d3,%d0 4cd7e: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4cd80: 0802 0008 btst #8,%d2 4cd84: 670e beqs 4cd94 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4cd86: 2005 movel %d5,%d0 4cd88: 7201 moveq #1,%d1 4cd8a: e088 lsrl #8,%d0 4cd8c: b380 eorl %d1,%d0 4cd8e: c081 andl %d1,%d0 4cd90: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4cd94: 0802 0009 btst #9,%d2 4cd98: 6718 beqs 4cdb2 if ( _Modes_Is_timeslice(mode_set) ) { 4cd9a: 0805 0009 btst #9,%d5 4cd9e: 6700 00c2 beqw 4ce62 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4cda2: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4cda4: 41f9 0005 d904 lea 5d904 <_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; 4cdaa: 2540 007a movel %d0,%a2@(122) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4cdae: 2550 0076 movel %a0@,%a2@(118) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4cdb2: 7007 moveq #7,%d0 4cdb4: c082 andl %d2,%d0 4cdb6: 6712 beqs 4cdca */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4cdb8: 40c0 movew %sr,%d0 4cdba: 7207 moveq #7,%d1 4cdbc: c285 andl %d5,%d1 4cdbe: 0280 0000 f8ff andil #63743,%d0 4cdc4: e189 lsll #8,%d1 4cdc6: 8081 orl %d1,%d0 4cdc8: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4cdca: 0802 000a btst #10,%d2 4cdce: 6758 beqs 4ce28 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4cdd0: 700a moveq #10,%d0 4cdd2: e0ad lsrl %d0,%d5 4cdd4: 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; 4cdd6: 4280 clrl %d0 4cdd8: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4cddc: b385 eorl %d1,%d5 4cdde: 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; 4cde0: ba80 cmpl %d0,%d5 4cde2: 6744 beqs 4ce28 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4cde4: 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; 4cdea: 1745 0008 moveb %d5,%a3@(8) 4cdee: 40c1 movew %sr,%d1 4cdf0: 8081 orl %d1,%d0 4cdf2: 46c0 movew %d0,%sr _signals = information->signals_pending; 4cdf4: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4cdf8: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4cdfe: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4ce02: 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; 4ce04: 4aab 0012 tstl %a3@(18) 4ce08: 671e beqs 4ce28 executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ce0a: 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; 4ce0c: 7001 moveq #1,%d0 4ce0e: 7401 moveq #1,%d2 4ce10: 1540 0074 moveb %d0,%a2@(116) } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ce14: b2b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d1 4ce1a: 6758 beqs 4ce74 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 4ce1c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4ce1e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ce24: 4e5e unlk %fp 4ce26: 4e75 rts executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ce28: 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; 4ce2a: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4ce2c: b2b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d1 4ce32: 66e8 bnes 4ce1c <== ALWAYS TAKEN 4ce34: 603e bras 4ce74 <== ALWAYS TAKEN if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4ce36: 4a2b 0008 tstb %a3@(8) 4ce3a: 57c0 seq %d0 4ce3c: 283c 0000 0400 movel #1024,%d4 4ce42: 49c0 extbl %d0 4ce44: 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(); 4ce46: 4eb9 0004 9210 jsr 49210 <_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; 4ce4c: 08c3 0009 bset #9,%d3 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4ce50: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4ce52: 8083 orl %d3,%d0 4ce54: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4ce56: 0802 0008 btst #8,%d2 4ce5a: 6700 ff38 beqw 4cd94 4ce5e: 6000 ff26 braw 4cd86 <== ALWAYS TAKEN /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4ce62: 7007 moveq #7,%d0 4ce64: 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; 4ce66: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4ce6a: 4a80 tstl %d0 4ce6c: 6700 ff5c beqw 4cdca 4ce70: 6000 ff46 braw 4cdb8 <== ALWAYS TAKEN } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4ce74: 4eb9 0004 d178 jsr 4d178 <_Thread_Evaluate_mode> 4ce7a: 4a00 tstb %d0 4ce7c: 6604 bnes 4ce82 4ce7e: 4a02 tstb %d2 4ce80: 679a beqs 4ce1c _Thread_Dispatch(); 4ce82: 4eb9 0004 7bf0 jsr 47bf0 <_Thread_Dispatch> 4ce88: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4ce8a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ce90: 4e5e unlk %fp 4ce92: 4e75 rts ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4ce94: 7009 moveq #9,%d0 if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 4ce96: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ce9c: 4e5e unlk %fp 4ce9e: 4e75 rts 0004afc0 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4afc0: 4e56 fffc linkw %fp,#-4 4afc4: 2f0a movel %a2,%sp@- 4afc6: 246e 0010 moveal %fp@(16),%a2 4afca: 2f02 movel %d2,%sp@- 4afcc: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4afd0: 670c beqs 4afde */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4afd2: 4280 clrl %d0 4afd4: 1039 0006 2692 moveb 62692 ,%d0 4afda: b082 cmpl %d2,%d0 4afdc: 6566 bcss 4b044 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4afde: 4a8a tstl %a2 4afe0: 6770 beqs 4b052 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4afe2: 486e fffc pea %fp@(-4) 4afe6: 2f2e 0008 movel %fp@(8),%sp@- 4afea: 4eb9 0004 cf40 jsr 4cf40 <_Thread_Get> switch ( location ) { 4aff0: 508f addql #8,%sp 4aff2: 4aae fffc tstl %fp@(-4) 4aff6: 663e bnes 4b036 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4aff8: 2040 moveal %d0,%a0 4affa: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4affe: 4a82 tstl %d2 4b000: 6720 beqs 4b022 the_thread->real_priority = new_priority; 4b002: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4b006: 4aa8 001c tstl %a0@(28) 4b00a: 6706 beqs 4b012 the_thread->current_priority > new_priority ) 4b00c: b4a8 0014 cmpl %a0@(20),%d2 4b010: 6410 bccs 4b022 <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 4b012: 42a7 clrl %sp@- 4b014: 2f02 movel %d2,%sp@- 4b016: 2f00 movel %d0,%sp@- 4b018: 4eb9 0004 c9c8 jsr 4c9c8 <_Thread_Change_priority> 4b01e: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4b022: 4eb9 0004 cee8 jsr 4cee8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b028: 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(); 4b02c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b02e: 246e fff8 moveal %fp@(-8),%a2 4b032: 4e5e unlk %fp 4b034: 4e75 rts 4b036: 242e fff4 movel %fp@(-12),%d2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4b03a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b03c: 246e fff8 moveal %fp@(-8),%a2 4b040: 4e5e unlk %fp 4b042: 4e75 rts 4b044: 242e fff4 movel %fp@(-12),%d2 4b048: 7013 moveq #19,%d0 4b04a: 246e fff8 moveal %fp@(-8),%a2 4b04e: 4e5e unlk %fp 4b050: 4e75 rts 4b052: 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 ) 4b056: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b058: 246e fff8 moveal %fp@(-8),%a2 4b05c: 4e5e unlk %fp 4b05e: 4e75 rts 00069d24 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 69d24: 4e56 fffc linkw %fp,#-4 69d28: 2f02 movel %d2,%sp@- 69d2a: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 69d2e: 6762 beqs 69d92 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 69d30: 486e fffc pea %fp@(-4) 69d34: 2f2e 0008 movel %fp@(8),%sp@- 69d38: 4eb9 0004 e3e8 jsr 4e3e8 <_Thread_Get> switch (location) { 69d3e: 508f addql #8,%sp 69d40: 4aae fffc tstl %fp@(-4) 69d44: 663c bnes 69d82 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 69d46: 2240 moveal %d0,%a1 69d48: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 69d4c: 4a88 tstl %a0 69d4e: 673c beqs 69d8c if (tvp->ptr == ptr) { 69d50: b4a8 0004 cmpl %a0@(4),%d2 69d54: 6746 beqs 69d9c 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; 69d56: 2248 moveal %a0,%a1 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 69d58: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 69d5a: 4a88 tstl %a0 69d5c: 672e beqs 69d8c <== ALWAYS TAKEN if (tvp->ptr == ptr) { 69d5e: b4a8 0004 cmpl %a0@(4),%d2 69d62: 66f2 bnes 69d56 if (prev) prev->next = tvp->next; 69d64: 2290 movel %a0@,%a1@ else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 69d66: 2f08 movel %a0,%sp@- 69d68: 2f00 movel %d0,%sp@- 69d6a: 4eb9 0006 9e44 jsr 69e44 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 69d70: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 69d76: 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(); 69d78: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d7a: 242e fff8 movel %fp@(-8),%d2 69d7e: 4e5e unlk %fp 69d80: 4e75 rts 69d82: 242e fff8 movel %fp@(-8),%d2 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 69d86: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d88: 4e5e unlk %fp 69d8a: 4e75 rts return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 69d8c: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d92: 242e fff8 movel %fp@(-8),%d2 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 69d96: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d98: 4e5e unlk %fp 69d9a: 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; 69d9c: 2240 moveal %d0,%a1 69d9e: 2350 0118 movel %a0@,%a1@(280) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 69da2: 2f08 movel %a0,%sp@- 69da4: 2f00 movel %d0,%sp@- 69da6: 4eb9 0006 9e44 jsr 69e44 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 69dac: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 69db2: 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(); 69db4: 4280 clrl %d0 69db6: 60c2 bras 69d7a <== ALWAYS TAKEN 00069db8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 69db8: 4e56 fffc linkw %fp,#-4 69dbc: 2f0a movel %a2,%sp@- 69dbe: 246e 0010 moveal %fp@(16),%a2 69dc2: 2f02 movel %d2,%sp@- 69dc4: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 69dc8: 6752 beqs 69e1c return RTEMS_INVALID_ADDRESS; if ( !result ) 69dca: 4a8a tstl %a2 69dcc: 674e beqs 69e1c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 69dce: 486e fffc pea %fp@(-4) 69dd2: 2f2e 0008 movel %fp@(8),%sp@- 69dd6: 4eb9 0004 e3e8 jsr 4e3e8 <_Thread_Get> switch (location) { 69ddc: 508f addql #8,%sp 69dde: 4aae fffc tstl %fp@(-4) 69de2: 662a bnes 69e0e case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 69de4: 2240 moveal %d0,%a1 69de6: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 69dea: 4a88 tstl %a0 69dec: 670c beqs 69dfa if (tvp->ptr == ptr) { 69dee: b4a8 0004 cmpl %a0@(4),%d2 69df2: 6736 beqs 69e2a */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 69df4: 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) { 69df6: 4a88 tstl %a0 69df8: 66f4 bnes 69dee <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 69dfa: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69e00: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 69e04: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69e06: 246e fff8 moveal %fp@(-8),%a2 69e0a: 4e5e unlk %fp 69e0c: 4e75 rts 69e0e: 242e fff4 movel %fp@(-12),%d2 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 69e12: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69e14: 246e fff8 moveal %fp@(-8),%a2 69e18: 4e5e unlk %fp 69e1a: 4e75 rts 69e1c: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 69e20: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69e22: 246e fff8 moveal %fp@(-8),%a2 69e26: 4e5e unlk %fp 69e28: 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; 69e2a: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 69e2e: 4eb9 0004 e3c0 jsr 4e3c0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69e34: 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(); 69e38: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69e3a: 246e fff8 moveal %fp@(-8),%a2 69e3e: 4e5e unlk %fp 69e40: 4e75 rts ... 000471e4 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 471e4: 4e56 fffc linkw %fp,#-4 471e8: 2f0a movel %a2,%sp@- 471ea: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval seconds; if ( !_TOD_Is_set ) 471ee: 4a39 0005 f2b0 tstb 5f2b0 <_TOD_Is_set> 471f4: 6700 00aa beqw 472a0 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 471f8: 4a8a tstl %a2 471fa: 6700 00ae beqw 472aa <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 471fe: 42aa 0018 clrl %a2@(24) if ( !_TOD_Validate( time_buffer ) ) 47202: 2f0a movel %a2,%sp@- 47204: 4eb9 0004 64f0 jsr 464f0 <_TOD_Validate> 4720a: 588f addql #4,%sp 4720c: 4a00 tstb %d0 4720e: 660a bnes 4721a &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 47210: 246e fff8 moveal %fp@(-8),%a2 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47214: 7014 moveq #20,%d0 } 47216: 4e5e unlk %fp 47218: 4e75 rts time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 4721a: 2f0a movel %a2,%sp@- 4721c: 4eb9 0004 63e0 jsr 463e0 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 47222: 588f addql #4,%sp 47224: b0b9 0005 f32e cmpl 5f32e <_TOD_Now>,%d0 4722a: 63e4 blss 47210 4722c: 2239 0005 f29c movel 5f29c <_Thread_Dispatch_disable_level>,%d1 47232: 5281 addql #1,%d1 47234: 23c1 0005 f29c movel %d1,5f29c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 4723a: 4878 0010 pea 10 4723e: 2f39 0005 f356 movel 5f356 <_Thread_Executing>,%sp@- 47244: 2d40 fffc movel %d0,%fp@(-4) 47248: 4eb9 0004 965c jsr 4965c <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 4724e: 2079 0005 f356 moveal 5f356 <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47254: 223c 0004 8bfc movel #297980,%d1 4725a: 2141 0064 movel %d1,%a0@(100) if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 4725e: 2228 0008 movel %a0@(8),%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47262: 202e fffc movel %fp@(-4),%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 47266: 2141 0068 movel %d1,%a0@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4726a: 90b9 0005 f32e subl 5f32e <_TOD_Now>,%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47270: 42a8 0050 clrl %a0@(80) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47274: 2140 0054 movel %d0,%a0@(84) ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 47278: 42a8 006c clrl %a0@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4727c: 4868 0048 pea %a0@(72) 47280: 4879 0005 f368 pea 5f368 <_Watchdog_Seconds_chain> 47286: 4eb9 0004 9ef4 jsr 49ef4 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 4728c: 4eb9 0004 8d90 jsr 48d90 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 47292: 246e fff8 moveal %fp@(-8),%a2 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47296: 4fef 0010 lea %sp@(16),%sp ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 4729a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4729c: 4e5e unlk %fp 4729e: 4e75 rts 472a0: 246e fff8 moveal %fp@(-8),%a2 rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 472a4: 700b moveq #11,%d0 &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 472a6: 4e5e unlk %fp 472a8: 4e75 rts 472aa: 246e fff8 moveal %fp@(-8),%a2 Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 472ae: 7009 moveq #9,%d0 &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 472b0: 4e5e unlk %fp 472b2: 4e75 rts 0004462c : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4462c: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 4462e: 4e56 0000 linkw %fp,#0 44632: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 44636: b280 cmpl %d0,%d1 44638: 6700 010a beqw 44744 <== ALWAYS TAKEN 4463c: 6c32 bges 44670 <== NEVER TAKEN 4463e: 720e moveq #14,%d1 <== NOT EXECUTED 44640: b280 cmpl %d0,%d1 <== NOT EXECUTED 44642: 6700 00d6 beqw 4471a <== NOT EXECUTED 44646: 6c56 bges 4469e <== NOT EXECUTED 44648: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 4464e: 6700 00e2 beqw 44732 <== NOT EXECUTED 44652: 6f00 0098 blew 446ec <== NOT EXECUTED 44656: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 4465c: 6700 00b6 beqw 44714 <== NOT EXECUTED 44660: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 44666: 6700 009a beqw 44702 <== 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; 4466a: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 4466c: 4e5e unlk %fp 4466e: 4e75 rts rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44670: 123c 0004 moveb #4,%d1 44674: b280 cmpl %d0,%d1 44676: 6700 00d2 beqw 4474a <== ALWAYS TAKEN 4467a: 6d46 blts 446c2 <== ALWAYS TAKEN 4467c: 123c 0001 moveb #1,%d1 44680: b280 cmpl %d0,%d1 44682: 6700 00a2 beqw 44726 <== ALWAYS TAKEN 44686: 6c00 00c8 bgew 44750 <== NEVER TAKEN 4468a: 7202 moveq #2,%d1 <== NOT EXECUTED 4468c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4468e: 677e beqs 4470e <== NOT EXECUTED 44690: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 44694: b280 cmpl %d0,%d1 <== NOT EXECUTED 44696: 66d2 bnes 4466a <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 44698: 7003 moveq #3,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4469a: 4e5e unlk %fp <== NOT EXECUTED 4469c: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4469e: 123c 000b moveb #11,%d1 <== NOT EXECUTED 446a2: b280 cmpl %d0,%d1 <== NOT EXECUTED 446a4: 6700 0086 beqw 4472c <== NOT EXECUTED 446a8: 6e3c bgts 446e6 <== NOT EXECUTED 446aa: 123c 000c moveb #12,%d1 <== NOT EXECUTED 446ae: b280 cmpl %d0,%d1 <== NOT EXECUTED 446b0: 6700 008c beqw 4473e <== NOT EXECUTED 446b4: 123c 000d moveb #13,%d1 <== NOT EXECUTED 446b8: b280 cmpl %d0,%d1 <== NOT EXECUTED 446ba: 66ae bnes 4466a <== 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; 446bc: 700d moveq #13,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446be: 4e5e unlk %fp <== NOT EXECUTED 446c0: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 446c2: 7206 moveq #6,%d1 <== NOT EXECUTED 446c4: b280 cmpl %d0,%d1 <== NOT EXECUTED 446c6: 6758 beqs 44720 <== NOT EXECUTED 446c8: 6e16 bgts 446e0 <== NOT EXECUTED 446ca: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 446ce: b280 cmpl %d0,%d1 <== NOT EXECUTED 446d0: 6766 beqs 44738 <== NOT EXECUTED 446d2: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 446d6: b280 cmpl %d0,%d1 <== NOT EXECUTED 446d8: 6690 bnes 4466a <== 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; 446da: 7008 moveq #8,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446dc: 4e5e unlk %fp <== NOT EXECUTED 446de: 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; 446e0: 7005 moveq #5,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446e2: 4e5e unlk %fp <== NOT EXECUTED 446e4: 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; 446e6: 700a moveq #10,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446e8: 4e5e unlk %fp <== NOT EXECUTED 446ea: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 446ec: 720f moveq #15,%d1 <== NOT EXECUTED 446ee: b280 cmpl %d0,%d1 <== NOT EXECUTED 446f0: 6716 beqs 44708 <== NOT EXECUTED 446f2: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 446f8: 6600 ff70 bnew 4466a <== 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; 446fc: 7010 moveq #16,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446fe: 4e5e unlk %fp <== NOT EXECUTED 44700: 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; 44702: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44704: 4e5e unlk %fp <== NOT EXECUTED 44706: 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; 44708: 700f moveq #15,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4470a: 4e5e unlk %fp <== NOT EXECUTED 4470c: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4470e: 7002 moveq #2,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44710: 4e5e unlk %fp <== NOT EXECUTED 44712: 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; 44714: 7012 moveq #18,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44716: 4e5e unlk %fp <== NOT EXECUTED 44718: 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; 4471a: 700e moveq #14,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4471c: 4e5e unlk %fp <== NOT EXECUTED 4471e: 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; 44720: 7006 moveq #6,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44722: 4e5e unlk %fp <== NOT EXECUTED 44724: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44726: 7001 moveq #1,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44728: 4e5e unlk %fp <== NOT EXECUTED 4472a: 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; 4472c: 700b moveq #11,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4472e: 4e5e unlk %fp <== NOT EXECUTED 44730: 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; 44732: 7011 moveq #17,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44734: 4e5e unlk %fp <== NOT EXECUTED 44736: 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; 44738: 7007 moveq #7,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4473a: 4e5e unlk %fp <== NOT EXECUTED 4473c: 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; 4473e: 700c moveq #12,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44740: 4e5e unlk %fp <== NOT EXECUTED 44742: 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; 44744: 7009 moveq #9,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44746: 4e5e unlk %fp <== NOT EXECUTED 44748: 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; 4474a: 7004 moveq #4,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4474c: 4e5e unlk %fp <== NOT EXECUTED 4474e: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44750: 4a80 tstl %d0 44752: 6600 ff16 bnew 4466a <== NEVER TAKEN 44756: 4280 clrl %d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44758: 4e5e unlk %fp <== NOT EXECUTED 4475a: 4e75 rts 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 <== ALWAYS TAKEN 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 <== NEVER 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 <== ALWAYS TAKEN 4342e: 103c 0001 moveb #1,%d0 43432: b081 cmpl %d1,%d0 43434: 6700 00a6 beqw 434dc <== ALWAYS TAKEN 43438: 6c00 00b2 bgew 434ec <== ALWAYS TAKEN 4343c: 7402 moveq #2,%d2 4343e: b481 cmpl %d1,%d2 43440: 6700 00a2 beqw 434e4 <== ALWAYS TAKEN 43444: 7003 moveq #3,%d0 43446: b081 cmpl %d1,%d0 43448: 66ce bnes 43418 <== ALWAYS 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 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 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 <== ALWAYS 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 <== ALWAYS 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 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 434f8: 4e75 rts ... 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 c274 movel %a0@,5c274 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 43548: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 4354c: 23d0 0005 c278 movel %a0@,5c278 <== 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 c27c movel %a0@,5c27c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4355e: 4e75 rts 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 d83c movel 5d83c ,%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 <== ALWAYS TAKEN 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 cff8 lea 5cff8 ,%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 <== NEVER TAKEN /* * 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 <== NEVER TAKEN 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 <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 44bf2: 2f2a 0058 movel %a2@(88),%sp@- 44bf6: 47f9 0004 a51c lea 4a51c ,%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 d83c movel 5d83c ,%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 a51c lea 4a51c ,%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 <== ALWAYS TAKEN 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 645c jsr 4645c <== 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 d840 movel %a0,5d840 if ( rtems_termios_ttyTail != NULL ) { 44c8e: 6748 beqs 44cd8 <== NEVER 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 d844 movel %a0,5d844 if ( rtems_termios_ttyHead != NULL ) { 44ca4: 6700 ff22 beqw 44bc8 <== ALWAYS TAKEN rtems_termios_ttyHead->back = NULL; 44ca8: 42a8 0004 clrl %a0@(4) 44cac: 6000 ff1a braw 44bc8 <== ALWAYS TAKEN } 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 <== ALWAYS 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 <== NEVER TAKEN 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 d844 clrl 5d844 44cde: 6000 fee8 braw 44bc8 <== ALWAYS TAKEN 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 <== ALWAYS 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 <== ALWAYS 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 d0ac moveal 5d0ac ,%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 645c jsr 4645c <== 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 cff8 lea 5cff8 ,%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 d83c tstl 5d83c 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 d83c pea 5d83c 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 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 43530: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43532: 4eb9 0004 645c jsr 4645c <== 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 <== ALWAYS 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 <== ALWAYS TAKEN 44780: 6530 bcss 447b2 <== ALWAYS 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 d010 addil #380944,%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 <== NEVER 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 <== NEVER 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 <== NEVER 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 <== ALWAYS TAKEN 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 <== NEVER 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 <== ALWAYS 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN (*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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 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 cff8 lea 5cff8 ,%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 000448d0 : #include int rtems_termios_number_to_baud( int32_t baud ) { 448d0: 4e56 0000 linkw %fp,#0 448d4: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 448d8: 0c81 0000 04b0 cmpil #1200,%d1 448de: 6700 011c beqw 449fc 448e2: 6f3c bles 44920 448e4: 0c81 0000 4b00 cmpil #19200,%d1 448ea: 6700 011c beqw 44a08 448ee: 6f60 bles 44950 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; 448f0: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 448f6: 0c81 0001 c200 cmpil #115200,%d1 448fc: 671e beqs 4491c 448fe: 6f00 00a8 blew 449a8 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; 44902: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44908: 0c81 0003 8400 cmpil #230400,%d1 4490e: 670c beqs 4491c 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; 44910: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44912: 0c81 0007 0800 cmpil #460800,%d1 44918: 6702 beqs 4491c <== NEVER 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; 4491a: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 4491c: 4e5e unlk %fp 4491e: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44920: 0c81 0000 0086 cmpil #134,%d1 44926: 6700 00da beqw 44a02 4492a: 6f46 bles 44972 4492c: 0c81 0000 00c8 cmpil #200,%d1 44932: 6700 00b6 beqw 449ea 44936: 6f56 bles 4498e 44938: 0c81 0000 012c cmpil #300,%d1 4493e: 6700 00a4 beqw 449e4 44942: 0c81 0000 0258 cmpil #600,%d1 44948: 66d0 bnes 4491a <== ALWAYS 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; 4494a: 7008 moveq #8,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4494c: 4e5e unlk %fp 4494e: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44950: 0c81 0000 0960 cmpil #2400,%d1 44956: 6700 009e beqw 449f6 4495a: 6f66 bles 449c2 4495c: 0c81 0000 12c0 cmpil #4800,%d1 44962: 676e beqs 449d2 44964: 0c81 0000 2580 cmpil #9600,%d1 4496a: 66ae bnes 4491a 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; 4496c: 700d moveq #13,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4496e: 4e5e unlk %fp 44970: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44972: 7032 moveq #50,%d0 44974: b081 cmpl %d1,%d0 44976: 6778 beqs 449f0 44978: 6c22 bges 4499c 4497a: 704b moveq #75,%d0 4497c: b081 cmpl %d1,%d0 4497e: 6758 beqs 449d8 44980: 103c 006e moveb #110,%d0 44984: b081 cmpl %d1,%d0 44986: 6692 bnes 4491a <== ALWAYS TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 44988: 7003 moveq #3,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4498a: 4e5e unlk %fp 4498c: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 4498e: 0c81 0000 0096 cmpil #150,%d1 44994: 6684 bnes 4491a <== ALWAYS 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; 44996: 7005 moveq #5,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44998: 4e5e unlk %fp 4499a: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 4499c: 4a81 tstl %d1 4499e: 6600 ff7a bnew 4491a 449a2: 4280 clrl %d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449a4: 4e5e unlk %fp 449a6: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449a8: 0c81 0000 9600 cmpil #38400,%d1 449ae: 672e beqs 449de 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; 449b0: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 449b2: 0c81 0000 e100 cmpil #57600,%d1 449b8: 6700 ff62 beqw 4491c <== NEVER 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; 449bc: 70ff moveq #-1,%d0 <== NOT EXECUTED 449be: 6000 ff5c braw 4491c <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 449c2: 0c81 0000 0708 cmpil #1800,%d1 449c8: 6600 ff50 bnew 4491a <== ALWAYS TAKEN 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; 449cc: 700a moveq #10,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449ce: 4e5e unlk %fp 449d0: 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; 449d2: 700c moveq #12,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449d4: 4e5e unlk %fp 449d6: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449d8: 7002 moveq #2,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449da: 4e5e unlk %fp 449dc: 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; 449de: 700f moveq #15,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449e0: 4e5e unlk %fp 449e2: 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; 449e4: 7007 moveq #7,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449e6: 4e5e unlk %fp 449e8: 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; 449ea: 7006 moveq #6,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449ec: 4e5e unlk %fp 449ee: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449f0: 7001 moveq #1,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449f2: 4e5e unlk %fp 449f4: 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; 449f6: 700b moveq #11,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449f8: 4e5e unlk %fp 449fa: 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; 449fc: 7009 moveq #9,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449fe: 4e5e unlk %fp 44a00: 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; 44a02: 7004 moveq #4,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a04: 4e5e unlk %fp 44a06: 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; 44a08: 700e moveq #14,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a0a: 4e5e unlk %fp 44a0c: 4e75 rts ... 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 d83c movel 5d83c ,%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 <== ALWAYS TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44d10: 2479 0005 d844 moveal 5d844 ,%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 <== ALWAYS 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 a430 jsr 4a430 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 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44d42: 41f9 0005 c278 lea 5c278 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d48: 4bf9 0004 aa8c lea 4aa8c ,%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 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 44d64: 41f9 0005 c27c lea 5c27c ,%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 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44d80: 2f39 0005 c274 movel 5c274 ,%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 <== ALWAYS TAKEN tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 44d92: 2079 0005 d844 moveal 5d844 ,%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 d844 movel %a4,5d844 if (rtems_termios_ttyTail == NULL) 44dc0: 4ab9 0005 d840 tstl 5d840 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 c280 moveb 5c280 ,%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 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44e02: 486c 0018 pea %a4@(24) 44e06: 1039 0005 c280 moveb 5c280 ,%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 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44e2c: 486c 008c pea %a4@(140) 44e30: 1039 0005 c280 moveb 5c280 ,%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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN &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 <== ALWAYS TAKEN 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 c280 moveb 5c280 ,%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 c280 moveb %d5,5c280 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 <== NEVER TAKEN c = 'a'; 44f40: 7a61 moveq #97,%d5 <== NOT EXECUTED 44f42: 13c5 0005 c280 moveb %d5,5c280 <== 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 <== ALWAYS TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 44f7a: 2f39 0005 d83c movel 5d83c ,%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 <== NEVER 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 d83c movel 5d83c ,%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 c280 moveb 5c280 ,%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 <== NEVER TAKEN 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 645c jsr 4645c <== 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 c280 moveb 5c280 ,%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 c280 moveb 5c280 ,%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 d840 movel %a4,5d840 45084: 6000 fd44 braw 44dca <== ALWAYS TAKEN /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 45088: 2f39 0005 d83c movel 5d83c ,%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 a51c jsr 4a51c <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450ae: 2f39 0005 d83c movel 5d83c ,%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 a51c lea 4a51c ,%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 d83c movel 5d83c ,%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 a51c lea 4a51c ,%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 d83c movel 5d83c ,%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 45128: 4e75 rts 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 <== ALWAYS TAKEN (*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 <== ALWAYS TAKEN * 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 <== ALWAYS TAKEN 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 <== ALWAYS 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 <== NEVER 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 <== ALWAYS TAKEN 43b98: 60a6 bras 43b40 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN } 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 645c jsr 4645c <== 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 cff8 lea 5cff8 ,%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 c274 movel 5c274 ,%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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN } 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 <== NEVER 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 <== NEVER TAKEN (*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 <== ALWAYS 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN /* 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 <== ALWAYS TAKEN 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 4357a: 4e75 rts 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 d00c addil #380940,%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 <== ALWAYS 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 d004 addil #380932,%d0 44304: 2240 moveal %d0,%a1 44306: 2051 moveal %a1@,%a0 44308: 4a88 tstl %a0 4430a: 6722 beqs 4432e <== NEVER 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 <== ALWAYS 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 <== ALWAYS 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 0005840c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 5840c: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58410: 486e fffc pea %fp@(-4) 58414: 2f2e 0008 movel %fp@(8),%sp@- 58418: 4879 0007 cb12 pea 7cb12 <_Timer_Information> 5841e: 4eb9 0005 b118 jsr 5b118 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58424: 4fef 000c lea %sp@(12),%sp 58428: 4aae fffc tstl %fp@(-4) 5842c: 6706 beqs 58434 5842e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58430: 4e5e unlk %fp 58432: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 58434: 7204 moveq #4,%d1 58436: 2040 moveal %d0,%a0 58438: b2a8 0038 cmpl %a0@(56),%d1 5843c: 670c beqs 5844a <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 5843e: 4868 0010 pea %a0@(16) 58442: 4eb9 0005 cf6c jsr 5cf6c <_Watchdog_Remove> 58448: 588f addql #4,%sp _Thread_Enable_dispatch(); 5844a: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 58450: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58452: 4e5e unlk %fp 58454: 4e75 rts ... 00058570 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 58570: 4e56 ffe8 linkw %fp,#-24 58574: 48d7 043c moveml %d2-%d5/%a2,%sp@ 58578: 282e 0008 movel %fp@(8),%d4 5857c: 242e 000c movel %fp@(12),%d2 58580: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 58584: 4a82 tstl %d2 58586: 6700 0094 beqw 5861c return RTEMS_INVALID_NUMBER; if ( !routine ) 5858a: 4a83 tstl %d3 5858c: 6700 00ae beqw 5863c RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58590: 486e fffc pea %fp@(-4) 58594: 2f04 movel %d4,%sp@- 58596: 4879 0007 cb12 pea 7cb12 <_Timer_Information> 5859c: 4eb9 0005 b118 jsr 5b118 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 585a2: 4fef 000c lea %sp@(12),%sp 585a6: 2440 moveal %d0,%a2 585a8: 4aae fffc tstl %fp@(-4) 585ac: 6662 bnes 58610 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 585ae: 2a00 movel %d0,%d5 585b0: 0685 0000 0010 addil #16,%d5 585b6: 2f05 movel %d5,%sp@- 585b8: 4eb9 0005 cf6c jsr 5cf6c <_Watchdog_Remove> _ISR_Disable( level ); 585be: 203c 0000 0700 movel #1792,%d0 585c4: 40c1 movew %sr,%d1 585c6: 8081 orl %d1,%d0 585c8: 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 ) { 585ca: 588f addql #4,%sp 585cc: 4aaa 0018 tstl %a2@(24) 585d0: 6656 bnes 58628 <== ALWAYS TAKEN Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 585d2: 2543 002c movel %d3,%a2@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 585d6: 256e 0014 0034 movel %fp@(20),%a2@(52) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 585dc: 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; 585e0: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 585e4: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 585e8: 46c1 movew %d1,%sr Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 585ea: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 585ee: 2f05 movel %d5,%sp@- 585f0: 4879 0007 c9c8 pea 7c9c8 <_Watchdog_Ticks_chain> 585f6: 4eb9 0005 ce24 jsr 5ce24 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 585fc: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58602: 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(); 58604: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58606: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 5860c: 4e5e unlk %fp 5860e: 4e75 rts if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58610: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58612: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58618: 4e5e unlk %fp 5861a: 4e75 rts { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 5861c: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5861e: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58624: 4e5e unlk %fp 58626: 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 ); 58628: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 5862a: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 58630: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58632: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58638: 4e5e unlk %fp 5863a: 4e75 rts ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 5863c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5863e: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 58644: 4e5e unlk %fp 58646: 4e75 rts 00058a58 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 58a58: 4e56 fffc linkw %fp,#-4 58a5c: 202e 0008 movel %fp@(8),%d0 58a60: 2f03 movel %d3,%sp@- 58a62: 2f02 movel %d2,%sp@- 58a64: 4a80 tstl %d0 58a66: 6748 beqs 58ab0 58a68: 4281 clrl %d1 58a6a: 1239 0007 6e12 moveb 76e12 ,%d1 58a70: b280 cmpl %d0,%d1 58a72: 644a bccs 58abe * 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 ) 58a74: 72ff moveq #-1,%d1 58a76: b280 cmpl %d0,%d1 58a78: 6636 bnes 58ab0 58a7a: 2239 0007 c8f0 movel 7c8f0 <_Thread_Dispatch_disable_level>,%d1 58a80: 5281 addql #1,%d1 58a82: 4283 clrl %d3 58a84: 23c1 0007 c8f0 movel %d1,7c8f0 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 58a8a: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 58a8c: 1439 0007 7d48 moveb 77d48 ,%d2 initialized = true; 58a92: 13c0 0007 7d48 moveb %d0,77d48 _Thread_Enable_dispatch(); 58a98: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> if ( tmpInitialized ) 58a9e: 4a02 tstb %d2 58aa0: 6744 beqs 58ae6 initialized = false; } #endif return status; } 58aa2: 242e fff4 movel %fp@(-12),%d2 _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) 58aa6: 700e moveq #14,%d0 initialized = false; } #endif return status; } 58aa8: 262e fff8 movel %fp@(-8),%d3 58aac: 4e5e unlk %fp 58aae: 4e75 rts 58ab0: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 58ab4: 7013 moveq #19,%d0 } 58ab6: 262e fff8 movel %fp@(-8),%d3 58aba: 4e5e unlk %fp 58abc: 4e75 rts 58abe: 2239 0007 c8f0 movel 7c8f0 <_Thread_Dispatch_disable_level>,%d1 58ac4: 5281 addql #1,%d1 58ac6: 2600 movel %d0,%d3 58ac8: 23c1 0007 c8f0 movel %d1,7c8f0 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 58ace: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 58ad0: 1439 0007 7d48 moveb 77d48 ,%d2 initialized = true; 58ad6: 13c0 0007 7d48 moveb %d0,77d48 _Thread_Enable_dispatch(); 58adc: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> if ( tmpInitialized ) 58ae2: 4a02 tstb %d2 58ae4: 66bc bnes 58aa2 <== ALWAYS 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( 58ae6: 486e fffc pea %fp@(-4) 58aea: 222e 0010 movel %fp@(16),%d1 58aee: 08c1 000f bset #15,%d1 58af2: 2f01 movel %d1,%sp@- 58af4: 4878 0100 pea 100 58af8: 2f2e 000c movel %fp@(12),%sp@- 58afc: 2f03 movel %d3,%sp@- 58afe: 2f3c 5449 4d45 movel #1414090053,%sp@- 58b04: 4eb9 0005 7aec jsr 57aec /* 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) { 58b0a: 4fef 0018 lea %sp@(24),%sp 58b0e: 4a80 tstl %d0 58b10: 6714 beqs 58b26 initialized = false; } #endif return status; } 58b12: 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; 58b16: 4201 clrb %d1 initialized = false; } #endif return status; } 58b18: 262e fff8 movel %fp@(-8),%d3 58b1c: 4e5e unlk %fp /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 58b1e: 13c1 0007 7d48 moveb %d1,77d48 initialized = false; } #endif return status; } 58b24: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58b26: 41f9 0007 7d7e lea 77d7e <_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( 58b2c: 4282 clrl %d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 58b2e: 223c 0007 7d7a movel #490874,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58b34: 23c8 0007 7d7a movel %a0,77d7a <_Timer_server_Default+0x30> &_RTEMS_tasks_Information, _Objects_Get_index(id) 58b3a: 202e fffc movel %fp@(-4),%d0 58b3e: 41f9 0007 7db6 lea 77db6 <_Timer_server_Default+0x6c>,%a0 58b44: 23c8 0007 7db2 movel %a0,77db2 <_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( 58b4a: 2079 0007 c87c moveal 7c87c <_RTEMS_tasks_Information+0x18>,%a0 58b50: 3400 movew %d0,%d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 58b52: 23c1 0007 7d82 movel %d1,77d82 <_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; 58b58: 2239 0007 ca30 movel 7ca30 <_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( 58b5e: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 58b62: 23d0 0007 7d4a movel %a0@,77d4a <_Timer_server_Default> 58b68: 41f9 0007 7db2 lea 77db2 <_Timer_server_Default+0x68>,%a0 58b6e: 23c8 0007 7dba movel %a0,77dba <_Timer_server_Default+0x70> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 58b74: 4879 0007 7d4a pea 77d4a <_Timer_server_Default> the_watchdog->routine = routine; 58b7a: 41f9 0005 b874 lea 5b874 <_Thread_Delay_ended>,%a0 58b80: 23c8 0007 7d6e movel %a0,77d6e <_Timer_server_Default+0x24> 58b86: 487a 0160 pea %pc@(58ce8 <_Timer_server_Body>) 58b8a: 23c8 0007 7da6 movel %a0,77da6 <_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(); 58b90: 41f9 0007 c982 lea 7c982 <_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; 58b96: 23c1 0007 7d86 movel %d1,77d86 <_Timer_server_Default+0x3c> ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58b9c: 23d0 0007 7dbe movel %a0@,77dbe <_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; 58ba2: 223c 0005 8f24 movel #364324,%d1 ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 58ba8: 41f9 0007 7d4a lea 77d4a <_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; 58bae: 23c1 0007 7d4e movel %d1,77d4e <_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; 58bb4: 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; 58bb6: 42b9 0007 7dc2 clrl 77dc2 <_Timer_server_Default+0x78> ts->active = false; 58bbc: 13c1 0007 7dc6 moveb %d1,77dc6 <_Timer_server_Default+0x7c> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 58bc2: 2f00 movel %d0,%sp@- ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 58bc4: 23c8 0007 cb4a movel %a0,7cb4a <_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; 58bca: 42b9 0007 7d7e clrl 77d7e <_Timer_server_Default+0x34> 58bd0: 42b9 0007 7db6 clrl 77db6 <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58bd6: 42b9 0007 7d5a clrl 77d5a <_Timer_server_Default+0x10> the_watchdog->routine = routine; the_watchdog->id = id; 58bdc: 23c0 0007 7d72 movel %d0,77d72 <_Timer_server_Default+0x28> the_watchdog->user_data = user_data; 58be2: 42b9 0007 7d76 clrl 77d76 <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58be8: 42b9 0007 7d92 clrl 77d92 <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 58bee: 23c0 0007 7daa movel %d0,77daa <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 58bf4: 42b9 0007 7dae clrl 77dae <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 58bfa: 4eb9 0005 81f4 jsr 581f4 initialized = false; } #endif return status; } 58c00: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 58c04: 4fef 000c lea %sp@(12),%sp } 58c08: 262e fff8 movel %fp@(-8),%d3 58c0c: 4e5e unlk %fp 58c0e: 4e75 rts 000587cc : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 587cc: 4e56 fff0 linkw %fp,#-16 587d0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 587d4: 486e fffc pea %fp@(-4) 587d8: 2f2e 0008 movel %fp@(8),%sp@- 587dc: 4879 0007 cb12 pea 7cb12 <_Timer_Information> 587e2: 4eb9 0005 b118 jsr 5b118 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 587e8: 4fef 000c lea %sp@(12),%sp 587ec: 2440 moveal %d0,%a2 587ee: 4aae fffc tstl %fp@(-4) 587f2: 670e beqs 58802 587f4: 7404 moveq #4,%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 587f6: 2002 movel %d2,%d0 587f8: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 587fe: 4e5e unlk %fp 58800: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 58802: 202a 0038 movel %a2@(56),%d0 58806: 671a beqs 58822 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58808: 7201 moveq #1,%d1 5880a: b280 cmpl %d0,%d1 5880c: 673c beqs 5884a 5880e: 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(); 58810: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58816: 2002 movel %d2,%d0 58818: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5881e: 4e5e unlk %fp 58820: 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 ); 58822: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58826: 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 ); 58828: 2f0a movel %a2,%sp@- 5882a: 4eb9 0005 cf6c jsr 5cf6c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58830: 2f0a movel %a2,%sp@- 58832: 4879 0007 c9c8 pea 7c9c8 <_Watchdog_Ticks_chain> 58838: 4eb9 0005 ce24 jsr 5ce24 <_Watchdog_Insert> 5883e: 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(); 58842: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 58848: 60cc bras 58816 <== ALWAYS TAKEN if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 5884a: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 5884e: 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; 58850: 2679 0007 cb4a moveal 7cb4a <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58856: 4eb9 0005 cf6c jsr 5cf6c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 5885c: 2f0a movel %a2,%sp@- 5885e: 2f0b movel %a3,%sp@- 58860: 206b 0004 moveal %a3@(4),%a0 58864: 4e90 jsr %a0@ 58866: 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(); 5886a: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> 58870: 60a4 bras 58816 <== ALWAYS TAKEN ... 0005895c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 5895c: 4e56 ffec linkw %fp,#-20 58960: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 58964: 242e 000c movel %fp@(12),%d2 58968: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 5896c: 2479 0007 cb4a moveal 7cb4a <_Timer_server>,%a2 if ( !timer_server ) 58972: 4a8a tstl %a2 58974: 6700 00c8 beqw 58a3e return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 58978: 4a39 0007 c904 tstb 7c904 <_TOD_Is_set> 5897e: 6700 00a6 beqw 58a26 <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 58982: 4a83 tstl %d3 58984: 6700 00ac beqw 58a32 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 58988: 2f02 movel %d2,%sp@- 5898a: 4eb9 0005 5630 jsr 55630 <_TOD_Validate> 58990: 588f addql #4,%sp 58992: 4a00 tstb %d0 58994: 660c bnes 589a2 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 58996: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58998: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5899e: 4e5e unlk %fp 589a0: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 589a2: 2f02 movel %d2,%sp@- 589a4: 4eb9 0005 5520 jsr 55520 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 589aa: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 589ac: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 589ae: b0b9 0007 c982 cmpl 7c982 <_TOD_Now>,%d0 589b4: 63e0 blss 58996 589b6: 486e fffc pea %fp@(-4) 589ba: 2f2e 0008 movel %fp@(8),%sp@- 589be: 4879 0007 cb12 pea 7cb12 <_Timer_Information> 589c4: 4eb9 0005 b118 jsr 5b118 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 589ca: 4fef 000c lea %sp@(12),%sp 589ce: 2640 moveal %d0,%a3 589d0: 4aae fffc tstl %fp@(-4) 589d4: 6674 bnes 58a4a case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 589d6: 486b 0010 pea %a3@(16) 589da: 4eb9 0005 cf6c jsr 5cf6c <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 589e0: 202e 0008 movel %fp@(8),%d0 589e4: 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(); 589e8: 94b9 0007 c982 subl 7c982 <_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; 589ee: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 589f0: 276e 0014 0034 movel %fp@(20),%a3@(52) 589f6: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 589fa: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 589fe: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58a02: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 58a06: 2f0b movel %a3,%sp@- 58a08: 2f0a movel %a2,%sp@- 58a0a: 206a 0004 moveal %a2@(4),%a0 58a0e: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 58a10: 4eb9 0005 ba08 jsr 5ba08 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58a16: 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(); 58a1a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a1c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a22: 4e5e unlk %fp 58a24: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 58a26: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a28: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 58a2e: 4e5e unlk %fp <== NOT EXECUTED 58a30: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 58a32: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a34: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a3a: 4e5e unlk %fp 58a3c: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 58a3e: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a40: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a46: 4e5e unlk %fp 58a48: 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 ) { 58a4a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a4c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a52: 4e5e unlk %fp 58a54: 4e75 rts ... 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 d7f4 movel 5d7f4 ,%d1 <== NOT EXECUTED 4234c: 2001 movel %d1,%d0 <== NOT EXECUTED 4234e: 5280 addql #1,%d0 <== NOT EXECUTED 42350: 23c0 0005 d7f4 movel %d0,5d7f4 <== 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 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 <== NOT EXECUTED 42360: 5280 addql #1,%d0 <== NOT EXECUTED 42362: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 42368: 2039 0005 d7f4 movel 5d7f4 ,%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 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 4237c: 45f9 0004 db64 lea 4db64 ,%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 def0 lea 4def0 ,%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 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 423b0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423b4: 4eb9 0005 4090 jsr 54090 <== 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 e7a4 lea 4e7a4 ,%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 ae34 pea 5ae34 <== NOT EXECUTED 423ea: 2079 0005 c30c moveal 5c30c <_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 b618 pea 5b618 <== NOT EXECUTED 42402: 2079 0005 c30c moveal 5c30c <_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 c30c moveal 5c30c <_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 ae48 pea 5ae48 <== 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 ae19 pea 5ae19 <== NOT EXECUTED 4246e: 2079 0005 c30c moveal 5c30c <_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 ae5d pea 5ae5d <== NOT EXECUTED 42490: 42a7 clrl %sp@- <== NOT EXECUTED 42492: 4eb9 0004 2544 jsr 42544 <== NOT EXECUTED abort(); 42498: 4eb9 0004 d7d8 jsr 4d7d8 <== 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 d808 jsr 4d808 <__errno> <== NOT EXECUTED 424a4: 47f9 0004 def0 lea 4def0 ,%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 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 424bc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424c0: 4eb9 0005 4090 jsr 54090 <== 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 ae27 pea 5ae27 <== NOT EXECUTED 424e6: 2079 0005 c30c moveal 5c30c <_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 b618 pea 5b618 <== NOT EXECUTED 424fe: 2079 0005 c30c moveal 5c30c <_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 c30c moveal 5c30c <_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 0006767c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 6767c: 4e56 ffe4 linkw %fp,#-28 67680: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 67684: 246e 0008 moveal %fp@(8),%a2 67688: 4284 clrl %d4 6768a: 263c 7fff ffff movel #2147483647,%d3 67690: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 67692: 47f9 0008 4870 lea 84870 <__srget_r>,%a3 67698: 202a 0004 movel %a2@(4),%d0 6769c: 5380 subql #1,%d0 6769e: 2540 0004 movel %d0,%a2@(4) 676a2: 6d62 blts 67706 <== ALWAYS TAKEN 676a4: 2052 moveal %a2@,%a0 676a6: 4280 clrl %d0 676a8: 1010 moveb %a0@,%d0 676aa: 5288 addql #1,%a0 if (c == ':') 676ac: 723a moveq #58,%d1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 676ae: 2488 movel %a0,%a2@ if (c == ':') 676b0: b280 cmpl %d0,%d1 676b2: 6764 beqs 67718 break; if (sign == 0) { 676b4: 4a84 tstl %d4 676b6: 660a bnes 676c2 <== ALWAYS TAKEN if (c == '-') { 676b8: 7c2d moveq #45,%d6 676ba: bc80 cmpl %d0,%d6 676bc: 6700 0084 beqw 67742 <== ALWAYS TAKEN sign = -1; limit++; continue; 676c0: 7801 moveq #1,%d4 } sign = 1; } if (!isdigit(c)) 676c2: 2079 000a 0f94 moveal a0f94 <__ctype_ptr__>,%a0 676c8: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 676cc: 49c1 extbl %d1 676ce: 44c1 movew %d1,%ccr 676d0: 6664 bnes 67736 <== ALWAYS TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 676d2: 2203 movel %d3,%d1 676d4: 7c0a moveq #10,%d6 676d6: 4c46 1005 remul %d6,%d5,%d1 676da: 4c46 1001 remul %d6,%d1,%d1 676de: b282 cmpl %d2,%d1 676e0: 6554 bcss 67736 <== ALWAYS TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 676e2: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 676e8: b282 cmpl %d2,%d1 676ea: 6746 beqs 67732 <== ALWAYS TAKEN || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 676ec: 2202 movel %d2,%d1 676ee: e789 lsll #3,%d1 676f0: 2241 moveal %d1,%a1 676f2: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 676f6: 2400 movel %d0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 676f8: 202a 0004 movel %a2@(4),%d0 676fc: 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; 676fe: d488 addl %a0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 67700: 2540 0004 movel %d0,%a2@(4) 67704: 6c9e bges 676a4 <== NEVER TAKEN 67706: 2f0a movel %a2,%sp@- <== NOT EXECUTED 67708: 2f39 000a 0fa0 movel a0fa0 <_impure_ptr>,%sp@- <== NOT EXECUTED 6770e: 4e93 jsr %a3@ <== NOT EXECUTED 67710: 508f addql #8,%sp <== NOT EXECUTED if (c == ':') 67712: 723a moveq #58,%d1 <== NOT EXECUTED 67714: b280 cmpl %d0,%d1 <== NOT EXECUTED 67716: 669c bnes 676b4 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 67718: 4a84 tstl %d4 6771a: 671a beqs 67736 <== ALWAYS TAKEN return 0; *val = i * sign; 6771c: 4c02 4800 mulsl %d2,%d4 67720: 7001 moveq #1,%d0 67722: 206e 000c moveal %fp@(12),%a0 67726: 2084 movel %d4,%a0@ return 1; } 67728: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 6772e: 4e5e unlk %fp 67730: 4e75 rts sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 67732: ba80 cmpl %d0,%d5 <== NOT EXECUTED 67734: 64b6 bccs 676ec <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 67736: 4280 clrl %d0 <== NOT EXECUTED } 67738: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 6773e: 4e5e unlk %fp <== NOT EXECUTED 67740: 4e75 rts <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 67742: 5283 addql #1,%d3 <== NOT EXECUTED 67744: 78ff moveq #-1,%d4 <== NOT EXECUTED continue; 67746: 6000 ff50 braw 67698 <== NOT EXECUTED 0006774a : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 6774a: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 6774e: 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) { 67752: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 67756: 246e 0008 moveal %fp@(8),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 6775a: 4bf9 0008 4870 lea 84870 <__srget_r>,%a5 67760: 202a 0004 movel %a2@(4),%d0 67764: 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) { 67766: 266e 0010 moveal %fp@(16),%a3 6776a: 242e 0018 movel %fp@(24),%d2 6776e: 286e 0014 moveal %fp@(20),%a4 int c; *name = *bufp; 67772: 2093 movel %a3@,%a0@ for (;;) { c = getc(fp); 67774: 2540 0004 movel %d0,%a2@(4) 67778: 6d36 blts 677b0 6777a: 2052 moveal %a2@,%a0 6777c: 4280 clrl %d0 6777e: 1010 moveb %a0@,%d0 67780: 5288 addql #1,%a0 if (c == ':') { 67782: 723a moveq #58,%d1 { int c; *name = *bufp; for (;;) { c = getc(fp); 67784: 2488 movel %a0,%a2@ if (c == ':') { 67786: b280 cmpl %d0,%d1 67788: 6738 beqs 677c2 if (nlFlag) return 0; break; } if (c == '\n') { 6778a: 720a moveq #10,%d1 6778c: b280 cmpl %d0,%d1 6778e: 674a beqs 677da if (!nlFlag) return 0; break; } if (c == EOF) 67790: 72ff moveq #-1,%d1 67792: b280 cmpl %d0,%d1 67794: 6748 beqs 677de <== ALWAYS TAKEN return 0; if (*nleft < 2) 67796: 7201 moveq #1,%d1 67798: b294 cmpl %a4@,%d1 6779a: 6442 bccs 677de <== ALWAYS TAKEN return 0; **bufp = c; 6779c: 2053 moveal %a3@,%a0 6779e: 1080 moveb %d0,%a0@ { int c; *name = *bufp; for (;;) { c = getc(fp); 677a0: 202a 0004 movel %a2@(4),%d0 677a4: 5380 subql #1,%d0 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 677a6: 5293 addql #1,%a3@ --(*nleft); 677a8: 5394 subql #1,%a4@ { int c; *name = *bufp; for (;;) { c = getc(fp); 677aa: 2540 0004 movel %d0,%a2@(4) 677ae: 6cca bges 6777a <== NEVER TAKEN 677b0: 2f0a movel %a2,%sp@- 677b2: 2f39 000a 0fa0 movel a0fa0 <_impure_ptr>,%sp@- 677b8: 4e95 jsr %a5@ 677ba: 508f addql #8,%sp if (c == ':') { 677bc: 723a moveq #58,%d1 677be: b280 cmpl %d0,%d1 677c0: 66c8 bnes 6778a <== NEVER TAKEN if (nlFlag) 677c2: 4a82 tstl %d2 677c4: 6618 bnes 677de <== ALWAYS TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 677c6: 2053 moveal %a3@,%a0 ++(*bufp); --(*nleft); 677c8: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 677ca: 4210 clrb %a0@ ++(*bufp); 677cc: 5293 addql #1,%a3@ --(*nleft); 677ce: 5394 subql #1,%a4@ return 1; } 677d0: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 677d6: 4e5e unlk %fp 677d8: 4e75 rts if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 677da: 4a82 tstl %d2 677dc: 66e8 bnes 677c6 <== NEVER TAKEN --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 677de: 4280 clrl %d0 <== NOT EXECUTED } 677e0: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 677e6: 4e5e unlk %fp <== NOT EXECUTED 677e8: 4e75 rts 000677ea : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 677ea: 4e56 ffe4 linkw %fp,#-28 677ee: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 677f2: 42a7 clrl %sp@- 677f4: 280e movel %fp,%d4 677f6: 0684 0000 0014 addil #20,%d4 677fc: 260e movel %fp,%d3 677fe: 0683 0000 0010 addil #16,%d3 67804: 47fa ff44 lea %pc@(6774a ),%a3 67808: 2f04 movel %d4,%sp@- 6780a: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 6780c: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67810: 2f0a movel %a2,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 67812: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67816: 2f02 movel %d2,%sp@- 67818: 4e93 jsr %a3@ 6781a: 4fef 0014 lea %sp@(20),%sp 6781e: 4a80 tstl %d0 67820: 660c bnes 6782e <== NEVER TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 67822: 4280 clrl %d0 <== NOT EXECUTED } 67824: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 <== NOT EXECUTED 6782a: 4e5e unlk %fp <== NOT EXECUTED 6782c: 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) 6782e: 42a7 clrl %sp@- 67830: 2f04 movel %d4,%sp@- 67832: 2f03 movel %d3,%sp@- 67834: 486a 0004 pea %a2@(4) 67838: 2f02 movel %d2,%sp@- 6783a: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 6783c: 4fef 0014 lea %sp@(20),%sp 67840: 4a80 tstl %d0 67842: 67de beqs 67822 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 67844: 486e fffc pea %fp@(-4) 67848: 2f02 movel %d2,%sp@- 6784a: 4eba fe30 jsr %pc@(6767c ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 6784e: 508f addql #8,%sp 67850: 4a80 tstl %d0 67852: 67ce beqs 67822 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 67854: 4878 0001 pea 1 67858: 2f04 movel %d4,%sp@- 6785a: 2f03 movel %d3,%sp@- 6785c: 486e fff8 pea %fp@(-8) 67860: 2f02 movel %d2,%sp@- 67862: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67864: 4fef 0014 lea %sp@(20),%sp 67868: 4a80 tstl %d0 6786a: 67b6 beqs 67822 <== ALWAYS TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 6786c: 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; 67870: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67876: 1011 moveb %a1@,%d0 67878: 677a beqs 678f4 <== ALWAYS TAKEN 6787a: 2049 moveal %a1,%a0 6787c: 7201 moveq #1,%d1 6787e: 5288 addql #1,%a0 if(*cp == ',') 67880: 49c0 extbl %d0 67882: 742c moveq #44,%d2 67884: b480 cmpl %d0,%d2 67886: 6756 beqs 678de <== ALWAYS TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67888: 1010 moveb %a0@,%d0 6788a: 66f2 bnes 6787e 6788c: e589 lsll #2,%d1 6788e: 0681 0000 0013 addil #19,%d1 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 67894: b2ae 0014 cmpl %fp@(20),%d1 67898: 6288 bhis 67822 <== ALWAYS TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 6789a: 202e 0010 movel %fp@(16),%d0 6789e: 72f0 moveq #-16,%d1 678a0: 0680 0000 000f addil #15,%d0 678a6: c081 andl %d1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 678a8: 2040 moveal %d0,%a0 678aa: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 678ac: 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); 678b0: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 678b4: 1010 moveb %a0@,%d0 678b6: 6740 beqs 678f8 <== ALWAYS TAKEN 678b8: 5288 addql #1,%a0 678ba: 7201 moveq #1,%d1 if(*cp == ',') { 678bc: 49c0 extbl %d0 678be: 742c moveq #44,%d2 678c0: b480 cmpl %d0,%d2 678c2: 671e beqs 678e2 <== ALWAYS TAKEN /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 678c4: 1018 moveb %a0@+,%d0 678c6: 66f4 bnes 678bc if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 678c8: 206a 000a moveal %a2@(10),%a0 678cc: 7001 moveq #1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 678ce: e589 lsll #2,%d1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 678d0: 42b0 1800 clrl %a0@(00000000,%d1:l) return 1; } 678d4: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 678da: 4e5e unlk %fp 678dc: 4e75 rts /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') memcount++; 678de: 5281 addql #1,%d1 <== NOT EXECUTED 678e0: 60a6 bras 67888 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 678e2: 4200 clrb %d0 <== NOT EXECUTED 678e4: 1140 ffff moveb %d0,%a0@(-1) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 678e8: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 678ec: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 678f0: 5281 addql #1,%d1 <== NOT EXECUTED 678f2: 60d0 bras 678c4 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 678f4: 7217 moveq #23,%d1 <== NOT EXECUTED 678f6: 609c bras 67894 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 678f8: 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++) { 678fc: 7204 moveq #4,%d1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 678fe: 7001 moveq #1,%d0 <== NOT EXECUTED 67900: 42b0 1800 clrl %a0@(00000000,%d1:l) <== NOT EXECUTED 67904: 60ce bras 678d4 <== NOT EXECUTED 00067944 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 67944: 4e56 ffe0 linkw %fp,#-32 67948: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 6794c: 42a7 clrl %sp@- 6794e: 280e movel %fp,%d4 67950: 0684 0000 0014 addil #20,%d4 67956: 260e movel %fp,%d3 67958: 0683 0000 0010 addil #16,%d3 6795e: 47fa fdea lea %pc@(6774a ),%a3 67962: 2f04 movel %d4,%sp@- 67964: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 67966: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 6796a: 2f0a movel %a2,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 6796c: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67970: 2f02 movel %d2,%sp@- 67972: 4e93 jsr %a3@ 67974: 4fef 0014 lea %sp@(20),%sp 67978: 4a80 tstl %d0 6797a: 660c bnes 67988 <== NEVER 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; 6797c: 4280 clrl %d0 <== NOT EXECUTED } 6797e: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 67984: 4e5e unlk %fp <== NOT EXECUTED 67986: 4e75 rts <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 67988: 42a7 clrl %sp@- 6798a: 2f04 movel %d4,%sp@- 6798c: 2f03 movel %d3,%sp@- 6798e: 486a 0004 pea %a2@(4) 67992: 2f02 movel %d2,%sp@- 67994: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67996: 4fef 0014 lea %sp@(20),%sp 6799a: 4a80 tstl %d0 6799c: 67de beqs 6797c <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 6799e: 486e fffc pea %fp@(-4) 679a2: 49fa fcd8 lea %pc@(6767c ),%a4 679a6: 2f02 movel %d2,%sp@- 679a8: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 679aa: 508f addql #8,%sp 679ac: 4a80 tstl %d0 679ae: 67cc beqs 6797c <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 679b0: 486e fff8 pea %fp@(-8) 679b4: 2f02 movel %d2,%sp@- 679b6: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 679b8: 508f addql #8,%sp 679ba: 4a80 tstl %d0 679bc: 67be beqs 6797c <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 679be: 42a7 clrl %sp@- 679c0: 2f04 movel %d4,%sp@- 679c2: 2f03 movel %d3,%sp@- 679c4: 486a 000c pea %a2@(12) 679c8: 2f02 movel %d2,%sp@- 679ca: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 679cc: 4fef 0014 lea %sp@(20),%sp 679d0: 4a80 tstl %d0 679d2: 67a8 beqs 6797c <== ALWAYS 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) 679d4: 42a7 clrl %sp@- 679d6: 2f04 movel %d4,%sp@- 679d8: 2f03 movel %d3,%sp@- 679da: 486a 0010 pea %a2@(16) 679de: 2f02 movel %d2,%sp@- 679e0: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 679e2: 4fef 0014 lea %sp@(20),%sp 679e6: 4a80 tstl %d0 679e8: 6792 beqs 6797c <== ALWAYS 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) 679ea: 42a7 clrl %sp@- 679ec: 2f04 movel %d4,%sp@- 679ee: 2f03 movel %d3,%sp@- 679f0: 486a 0014 pea %a2@(20) 679f4: 2f02 movel %d2,%sp@- 679f6: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 679f8: 4fef 0014 lea %sp@(20),%sp 679fc: 4a80 tstl %d0 679fe: 6700 ff7c beqw 6797c <== ALWAYS TAKEN || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 67a02: 4878 0001 pea 1 67a06: 2f04 movel %d4,%sp@- 67a08: 2f03 movel %d3,%sp@- 67a0a: 486a 0018 pea %a2@(24) 67a0e: 2f02 movel %d2,%sp@- 67a10: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67a12: 4fef 0014 lea %sp@(20),%sp 67a16: 4a80 tstl %d0 67a18: 6700 ff62 beqw 6797c <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 67a1c: 7001 moveq #1,%d0 67a1e: 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; 67a24: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; } 67a2a: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 67a30: 4e5e unlk %fp 67a32: 4e75 rts 00067632 : gid_t gid ) { _POSIX_types_Gid = gid; return 0; } 67632: 4280 clrl %d0 <== NOT EXECUTED */ int setgid( gid_t gid ) { 67634: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Gid = gid; 67638: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 6763e: 316e 000a 0034 movew %fp@(10),%a0@(52) <== NOT EXECUTED return 0; } 67644: 4e5e unlk %fp <== NOT EXECUTED 67646: 4e75 rts 00067b7c : return NULL; return &grent; } void setgrent(void) { 67b7c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 67b80: 4eb9 0006 7a72 jsr 67a72 <== NOT EXECUTED if (group_fp != NULL) 67b86: 2039 000a 4892 movel a4892 ,%d0 <== NOT EXECUTED 67b8c: 670a beqs 67b98 <== NOT EXECUTED fclose(group_fp); 67b8e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67b90: 4eb9 0007 faf2 jsr 7faf2 <== NOT EXECUTED 67b96: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 67b98: 4879 0009 90a7 pea 990a7 <== NOT EXECUTED 67b9e: 4879 0009 77e5 pea 977e5 <_rodata_start+0x845> <== NOT EXECUTED 67ba4: 4eb9 0008 0358 jsr 80358 <== NOT EXECUTED 67baa: 508f addql #8,%sp <== NOT EXECUTED } 67bac: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 67bae: 23c0 000a 4892 movel %d0,a4892 <== NOT EXECUTED } 67bb4: 4e75 rts 00067d46 : return NULL; return &pwent; } void setpwent(void) { 67d46: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 67d4a: 4eb9 0006 7a72 jsr 67a72 <== NOT EXECUTED if (passwd_fp != NULL) 67d50: 2039 000a 47aa movel a47aa ,%d0 <== NOT EXECUTED 67d56: 670a beqs 67d62 <== NOT EXECUTED fclose(passwd_fp); 67d58: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67d5a: 4eb9 0007 faf2 jsr 7faf2 <== NOT EXECUTED 67d60: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 67d62: 4879 0009 90a7 pea 990a7 <== NOT EXECUTED 67d68: 4879 0009 77a0 pea 977a0 <_rodata_start+0x800> <== NOT EXECUTED 67d6e: 4eb9 0008 0358 jsr 80358 <== NOT EXECUTED 67d74: 508f addql #8,%sp <== NOT EXECUTED } 67d76: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 67d78: 23c0 000a 47aa movel %d0,a47aa <== NOT EXECUTED } 67d7e: 4e75 rts 0004797a : uid_t uid ) { _POSIX_types_Uid = uid; return 0; } 4797a: 4280 clrl %d0 <== NOT EXECUTED */ int setuid( uid_t uid ) { 4797c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Uid = uid; 47980: 2079 000a 07dc moveal a07dc ,%a0 <== NOT EXECUTED 47986: 316e 000a 0032 movew %fp@(10),%a0@(50) <== NOT EXECUTED return 0; } 4798c: 4e5e unlk %fp <== NOT EXECUTED 4798e: 4e75 rts 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 442ce: 4e75 rts 00048f3c : int _STAT_NAME( const char *path, struct stat *buf ) { 48f3c: 4e56 ffe0 linkw %fp,#-32 48f40: 48d7 001c moveml %d2-%d4,%sp@ 48f44: 262e 0008 movel %fp@(8),%d3 48f48: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 48f4c: 6700 0088 beqw 48fd6 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 48f50: 2f03 movel %d3,%sp@- 48f52: 280e movel %fp,%d4 48f54: 0684 ffff ffec addil #-20,%d4 48f5a: 4eb9 0008 5a18 jsr 85a18 48f60: 7201 moveq #1,%d1 48f62: 2e81 movel %d1,%sp@ 48f64: 2f04 movel %d4,%sp@- 48f66: 42a7 clrl %sp@- 48f68: 2f00 movel %d0,%sp@- 48f6a: 2f03 movel %d3,%sp@- 48f6c: 4eb9 0004 7758 jsr 47758 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 48f72: 4fef 0014 lea %sp@(20),%sp 48f76: 4a80 tstl %d0 48f78: 664e bnes 48fc8 return -1; if ( !loc.handlers->fstat_h ){ 48f7a: 206e fff4 moveal %fp@(-12),%a0 48f7e: 4aa8 0018 tstl %a0@(24) 48f82: 676c beqs 48ff0 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 48f84: 4878 0046 pea 46 48f88: 42a7 clrl %sp@- 48f8a: 2f02 movel %d2,%sp@- 48f8c: 4eb9 0008 2b58 jsr 82b58 status = (*loc.handlers->fstat_h)( &loc, buf ); 48f92: 2f02 movel %d2,%sp@- 48f94: 2f04 movel %d4,%sp@- 48f96: 206e fff4 moveal %fp@(-12),%a0 48f9a: 2068 0018 moveal %a0@(24),%a0 48f9e: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 48fa0: 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 ); 48fa4: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 48fa6: 4fef 0014 lea %sp@(20),%sp 48faa: 4a88 tstl %a0 48fac: 670e beqs 48fbc <== ALWAYS TAKEN 48fae: 2068 001c moveal %a0@(28),%a0 48fb2: 4a88 tstl %a0 48fb4: 6706 beqs 48fbc <== ALWAYS TAKEN 48fb6: 2f04 movel %d4,%sp@- 48fb8: 4e90 jsr %a0@ 48fba: 588f addql #4,%sp return status; } 48fbc: 2002 movel %d2,%d0 48fbe: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 48fc4: 4e5e unlk %fp 48fc6: 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 ) 48fc8: 74ff moveq #-1,%d2 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 48fca: 2002 movel %d2,%d0 48fcc: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 48fd2: 4e5e unlk %fp 48fd4: 4e75 rts /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 48fd6: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 48fdc: 74ff moveq #-1,%d2 48fde: 760e moveq #14,%d3 48fe0: 2040 moveal %d0,%a0 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 48fe2: 2002 movel %d2,%d0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 48fe4: 2083 movel %d3,%a0@ status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 48fe6: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 48fec: 4e5e unlk %fp 48fee: 4e75 rts 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 48ff0: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 48ff4: 4a88 tstl %a0 <== NOT EXECUTED 48ff6: 670e beqs 49006 <== NOT EXECUTED 48ff8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 48ffc: 4a88 tstl %a0 <== NOT EXECUTED 48ffe: 6706 beqs 49006 <== NOT EXECUTED 49000: 2f04 movel %d4,%sp@- <== NOT EXECUTED 49002: 4e90 jsr %a0@ <== NOT EXECUTED 49004: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 49006: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 4900c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4900e: 2040 moveal %d0,%a0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 49010: 2002 movel %d2,%d0 <== NOT EXECUTED 49012: 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 ); 49018: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 4901e: 4e5e unlk %fp <== NOT EXECUTED 49020: 4e75 rts 00068a6c : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 68a6c: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 68a70: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 68a74: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED * 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 ) ) 68a78: 260e movel %fp,%d3 <== NOT EXECUTED 68a7a: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 68a80: 2f02 movel %d2,%sp@- <== NOT EXECUTED */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 68a82: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED * 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 ) ) 68a86: 4eb9 0008 5a18 jsr 85a18 <== NOT EXECUTED 68a8c: 7201 moveq #1,%d1 <== NOT EXECUTED 68a8e: 2e81 movel %d1,%sp@ <== NOT EXECUTED 68a90: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68a92: 42a7 clrl %sp@- <== NOT EXECUTED 68a94: 2f00 movel %d0,%sp@- <== NOT EXECUTED 68a96: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68a98: 4eb9 0004 7758 jsr 47758 <== NOT EXECUTED 68a9e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 68aa2: 4a80 tstl %d0 <== NOT EXECUTED 68aa4: 6662 bnes 68b08 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 68aa6: 226e fffc moveal %fp@(-4),%a1 <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 68aaa: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 68aae: 4aa8 0044 tstl %a0@(68) <== NOT EXECUTED 68ab2: 6762 beqs 68b16 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 68ab4: 2044 moveal %d4,%a0 <== NOT EXECUTED 68ab6: 4298 clrl %a0@+ <== NOT EXECUTED 68ab8: 4298 clrl %a0@+ <== NOT EXECUTED 68aba: 4298 clrl %a0@+ <== NOT EXECUTED 68abc: 4298 clrl %a0@+ <== NOT EXECUTED 68abe: 4298 clrl %a0@+ <== NOT EXECUTED 68ac0: 4298 clrl %a0@+ <== NOT EXECUTED 68ac2: 4298 clrl %a0@+ <== NOT EXECUTED 68ac4: 4298 clrl %a0@+ <== NOT EXECUTED 68ac6: 4298 clrl %a0@+ <== NOT EXECUTED 68ac8: 4298 clrl %a0@+ <== NOT EXECUTED 68aca: 4298 clrl %a0@+ <== NOT EXECUTED 68acc: 4298 clrl %a0@+ <== NOT EXECUTED 68ace: 4298 clrl %a0@+ <== NOT EXECUTED 68ad0: 4290 clrl %a0@ <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 68ad2: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 68ad6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68ad8: 4869 001c pea %a1@(28) <== NOT EXECUTED 68adc: 2068 0044 moveal %a0@(68),%a0 <== NOT EXECUTED 68ae0: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 68ae2: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 68ae6: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 68ae8: 508f addql #8,%sp <== NOT EXECUTED 68aea: 4a88 tstl %a0 <== NOT EXECUTED 68aec: 670e beqs 68afc <== NOT EXECUTED 68aee: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68af2: 4a88 tstl %a0 <== NOT EXECUTED 68af4: 6706 beqs 68afc <== NOT EXECUTED 68af6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68af8: 4e90 jsr %a0@ <== NOT EXECUTED 68afa: 588f addql #4,%sp <== NOT EXECUTED return result; } 68afc: 2002 movel %d2,%d0 <== NOT EXECUTED 68afe: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68b04: 4e5e unlk %fp <== NOT EXECUTED 68b06: 4e75 rts <== NOT EXECUTED * 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 ) ) 68b08: 74ff moveq #-1,%d2 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 68b0a: 2002 movel %d2,%d0 <== NOT EXECUTED 68b0c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68b12: 4e5e unlk %fp <== NOT EXECUTED 68b14: 4e75 rts <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68b16: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 68b1c: 74ff moveq #-1,%d2 <== NOT EXECUTED 68b1e: 2040 moveal %d0,%a0 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 68b20: 2002 movel %d2,%d0 <== NOT EXECUTED 68b22: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68b28: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 68b2e: 4e5e unlk %fp <== NOT EXECUTED 68b30: 4e75 rts <== NOT EXECUTED ... 00068b34 : int symlink( const char *actualpath, const char *sympath ) { 68b34: 4e56 ffe8 linkw %fp,#-24 68b38: 226e 000c moveal %fp@(12),%a1 68b3c: 2f0a movel %a2,%sp@- 68b3e: 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 ); 68b40: 742f moveq #47,%d2 68b42: 1211 moveb %a1@,%d1 68b44: 1001 moveb %d1,%d0 68b46: 49c0 extbl %d0 68b48: b480 cmpl %d0,%d2 68b4a: 670e beqs 68b5a 68b4c: 143c 005c moveb #92,%d2 68b50: b480 cmpl %d0,%d2 68b52: 6706 beqs 68b5a <== ALWAYS TAKEN 68b54: 4a01 tstb %d1 68b56: 6600 0092 bnew 68bea 68b5a: 2079 000a 07dc moveal a07dc ,%a0 68b60: 45ee ffe8 lea %fp@(-24),%a2 68b64: 7001 moveq #1,%d0 68b66: 24a8 0018 movel %a0@(24),%a2@ 68b6a: 2d68 001c ffec movel %a0@(28),%fp@(-20) 68b70: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 68b76: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 68b7c: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) if ( !loc.ops->evalformake_h ) { 68b82: 206e fff4 moveal %fp@(-12),%a0 68b86: 2068 0004 moveal %a0@(4),%a0 68b8a: 4a88 tstl %a0 68b8c: 6700 008a beqw 68c18 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 68b90: 486e fffc pea %fp@(-4) 68b94: 2f0a movel %a2,%sp@- 68b96: 4871 0800 pea %a1@(00000000,%d0:l) 68b9a: 4e90 jsr %a0@ if ( result != 0 ) 68b9c: 4fef 000c lea %sp@(12),%sp 68ba0: 4a80 tstl %d0 68ba2: 6600 0092 bnew 68c36 return -1; if ( !loc.ops->symlink_h ) { 68ba6: 226e fff4 moveal %fp@(-12),%a1 68baa: 2069 0038 moveal %a1@(56),%a0 68bae: 4a88 tstl %a0 68bb0: 6700 0094 beqw 68c46 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 68bb4: 2f2e fffc movel %fp@(-4),%sp@- 68bb8: 2f2e 0008 movel %fp@(8),%sp@- 68bbc: 2f0a movel %a2,%sp@- 68bbe: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 68bc0: 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); 68bc4: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 68bc6: 4fef 000c lea %sp@(12),%sp 68bca: 4a88 tstl %a0 68bcc: 670e beqs 68bdc <== ALWAYS TAKEN 68bce: 2068 001c moveal %a0@(28),%a0 68bd2: 4a88 tstl %a0 68bd4: 6706 beqs 68bdc <== ALWAYS TAKEN 68bd6: 2f0a movel %a2,%sp@- 68bd8: 4e90 jsr %a0@ 68bda: 588f addql #4,%sp return result; } 68bdc: 2002 movel %d2,%d0 68bde: 242e ffe0 movel %fp@(-32),%d2 68be2: 246e ffe4 moveal %fp@(-28),%a2 68be6: 4e5e unlk %fp 68be8: 4e75 rts rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 68bea: 2079 000a 07dc moveal a07dc ,%a0 68bf0: 45ee ffe8 lea %fp@(-24),%a2 68bf4: 5888 addql #4,%a0 68bf6: 4280 clrl %d0 68bf8: 2498 movel %a0@+,%a2@ 68bfa: 2d58 ffec movel %a0@+,%fp@(-20) 68bfe: 2d58 fff0 movel %a0@+,%fp@(-16) 68c02: 2d58 fff4 movel %a0@+,%fp@(-12) 68c06: 2d50 fff8 movel %a0@,%fp@(-8) if ( !loc.ops->evalformake_h ) { 68c0a: 206e fff4 moveal %fp@(-12),%a0 68c0e: 2068 0004 moveal %a0@(4),%a0 68c12: 4a88 tstl %a0 68c14: 6600 ff7a bnew 68b90 if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 68c18: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 68c1e: 74ff moveq #-1,%d2 <== NOT EXECUTED 68c20: 2040 moveal %d0,%a0 <== NOT EXECUTED 68c22: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 68c28: 2002 movel %d2,%d0 <== NOT EXECUTED 68c2a: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED 68c2e: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED 68c32: 4e5e unlk %fp <== NOT EXECUTED 68c34: 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 ) 68c36: 74ff moveq #-1,%d2 result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 68c38: 2002 movel %d2,%d0 68c3a: 242e ffe0 movel %fp@(-32),%d2 68c3e: 246e ffe4 moveal %fp@(-28),%a2 68c42: 4e5e unlk %fp 68c44: 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 ); 68c46: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68c4a: 4a88 tstl %a0 <== NOT EXECUTED 68c4c: 67ca beqs 68c18 <== NOT EXECUTED 68c4e: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68c50: 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 ); 68c52: 4e90 jsr %a0@ <== NOT EXECUTED 68c54: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68c56: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 68c5c: 2040 moveal %d0,%a0 <== NOT EXECUTED 68c5e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 68c64: 60c2 bras 68c28 <== NOT EXECUTED ... 0004524c : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 4524c: 4e56 0000 linkw %fp,#0 45250: 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; 45254: 2028 0104 movel %a0@(260),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 45258: 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 ) { 4525a: 4a80 tstl %d0 4525c: 6728 beqs 45286 <== ALWAYS TAKEN current_reent = _Thread_Executing->libc_reent; 4525e: 2279 0006 192e moveal 6192e <_Thread_Executing>,%a1 45264: 2429 0104 movel %a1@(260),%d2 _Thread_Executing->libc_reent = this_reent; 45268: 2340 0104 movel %d0,%a1@(260) _fwalk (t->libc_reent, sync_wrapper); 4526c: 487a 0046 pea %pc@(452b4 ) 45270: 2f28 0104 movel %a0@(260),%sp@- 45274: 4eb9 0005 116e jsr 5116e <_fwalk> _Thread_Executing->libc_reent = current_reent; 4527a: 2079 0006 192e moveal 6192e <_Thread_Executing>,%a0 45280: 508f addql #8,%sp 45282: 2142 0104 movel %d2,%a0@(260) } } 45286: 242e fffc movel %fp@(-4),%d2 4528a: 4e5e unlk %fp 4528c: 4e75 rts 00052bf4 : int tcsetattr( int fd, int opt, struct termios *tp ) { 52bf4: 4e56 0000 linkw %fp,#0 52bf8: 202e 000c movel %fp@(12),%d0 52bfc: 2f03 movel %d3,%sp@- 52bfe: 262e 0010 movel %fp@(16),%d3 52c02: 2f02 movel %d2,%sp@- 52c04: 242e 0008 movel %fp@(8),%d2 switch (opt) { 52c08: 4a80 tstl %d0 52c0a: 6738 beqs 52c44 <== NEVER TAKEN 52c0c: 7201 moveq #1,%d1 <== NOT EXECUTED 52c0e: b280 cmpl %d0,%d1 <== NOT EXECUTED 52c10: 671c beqs 52c2e <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 52c12: 4eb9 0005 6c3c jsr 56c3c <__errno> <== NOT EXECUTED 52c18: 2040 moveal %d0,%a0 <== NOT EXECUTED 52c1a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 52c20: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 52c24: 70ff moveq #-1,%d0 <== NOT EXECUTED 52c26: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 52c2a: 4e5e unlk %fp <== NOT EXECUTED 52c2c: 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) 52c2e: 42a7 clrl %sp@- <== NOT EXECUTED 52c30: 4878 0003 pea 3 <== NOT EXECUTED 52c34: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52c36: 4eb9 0005 5e04 jsr 55e04 <== NOT EXECUTED 52c3c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52c40: 4a80 tstl %d0 <== NOT EXECUTED 52c42: 6ddc blts 52c20 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52c44: 2d43 0010 movel %d3,%fp@(16) 52c48: 7002 moveq #2,%d0 52c4a: 2d42 0008 movel %d2,%fp@(8) } } 52c4e: 242e fff8 movel %fp@(-8),%d2 52c52: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52c56: 2d40 000c movel %d0,%fp@(12) } } 52c5a: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52c5c: 4ef9 0005 5e04 jmp 55e04 ... 0004d544 : #include int unlink( const char *path ) { 4d544: 4e56 ffbc linkw %fp,#-68 4d548: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4d54c: 282e 0008 movel %fp@(8),%d4 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4d550: 2f04 movel %d4,%sp@- 4d552: 4eb9 0004 25a4 jsr 425a4 if ( parentpathlen == 0 ) 4d558: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4d55a: 2400 movel %d0,%d2 if ( parentpathlen == 0 ) 4d55c: 6600 01c8 bnew 4d726 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4d560: 2044 moveal %d4,%a0 4d562: 762f moveq #47,%d3 4d564: 1210 moveb %a0@,%d1 4d566: 1001 moveb %d1,%d0 4d568: 49c0 extbl %d0 4d56a: b680 cmpl %d0,%d3 4d56c: 670e beqs 4d57c <== NEVER TAKEN 4d56e: 163c 005c moveb #92,%d3 <== NOT EXECUTED 4d572: b680 cmpl %d0,%d3 <== NOT EXECUTED 4d574: 6706 beqs 4d57c <== NOT EXECUTED 4d576: 4a01 tstb %d1 <== NOT EXECUTED 4d578: 6600 00fc bnew 4d676 <== NOT EXECUTED 4d57c: 2079 0005 c284 moveal 5c284 ,%a0 4d582: 45ee ffec lea %fp@(-20),%a2 4d586: 49ee fff0 lea %fp@(-16),%a4 4d58a: 200e movel %fp,%d0 4d58c: 0680 ffff fff4 addil #-12,%d0 4d592: 2640 moveal %d0,%a3 4d594: 4bee fff8 lea %fp@(-8),%a5 4d598: 224e moveal %fp,%a1 4d59a: 24a8 0018 movel %a0@(24),%a2@ 4d59e: 28a8 001c movel %a0@(28),%a4@ 4d5a2: 26a8 0020 movel %a0@(32),%a3@ 4d5a6: 2aa8 0024 movel %a0@(36),%a5@ 4d5aa: 2328 0028 movel %a0@(40),%a1@- 4d5ae: 4203 clrb %d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4d5b0: 2040 moveal %d0,%a0 name = path + parentpathlen; 4d5b2: 2644 moveal %d4,%a3 4d5b4: d7c2 addal %d2,%a3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4d5b6: 240e movel %fp,%d2 4d5b8: 0682 ffff ffd8 addil #-40,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4d5be: 2d50 ffe0 movel %a0@,%fp@(-32) 4d5c2: 2d51 ffe8 movel %a1@,%fp@(-24) 4d5c6: 2d54 ffdc movel %a4@,%fp@(-36) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4d5ca: 49f9 0004 ebd4 lea 4ebd4 ,%a4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4d5d0: 2d55 ffe4 movel %a5@,%fp@(-28) 4d5d4: 2d52 ffd8 movel %a2@,%fp@(-40) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4d5d8: 2f0b movel %a3,%sp@- 4d5da: 4e94 jsr %a4@ 4d5dc: 2e80 movel %d0,%sp@ 4d5de: 2f0b movel %a3,%sp@- 4d5e0: 4eb9 0004 255c jsr 4255c 4d5e6: d7c0 addal %d0,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4d5e8: 2f0b movel %a3,%sp@- 4d5ea: 4e94 jsr %a4@ 4d5ec: 4297 clrl %sp@ 4d5ee: 2f02 movel %d2,%sp@- 4d5f0: 42a7 clrl %sp@- 4d5f2: 2f00 movel %d0,%sp@- 4d5f4: 2f0b movel %a3,%sp@- 4d5f6: 4eb9 0004 2616 jsr 42616 0, &loc, false ); if ( result != 0 ) { 4d5fc: 4fef 001c lea %sp@(28),%sp 4d600: 4a80 tstl %d0 4d602: 6600 00a2 bnew 4d6a6 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4d606: 226e ffe4 moveal %fp@(-28),%a1 4d60a: 2069 0010 moveal %a1@(16),%a0 4d60e: 4a88 tstl %a0 4d610: 6700 00ce beqw 4d6e0 <== ALWAYS TAKEN 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 ) { 4d614: 2f02 movel %d2,%sp@- 4d616: 4e90 jsr %a0@ 4d618: 588f addql #4,%sp 4d61a: 7201 moveq #1,%d1 4d61c: b280 cmpl %d0,%d1 4d61e: 6700 0140 beqw 4d760 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 4d622: 226e ffe4 moveal %fp@(-28),%a1 4d626: 2069 000c moveal %a1@(12),%a0 4d62a: 4a88 tstl %a0 4d62c: 6700 00b2 beqw 4d6e0 <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4d630: 2f02 movel %d2,%sp@- 4d632: 2f0a movel %a2,%sp@- 4d634: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4d636: 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 ); 4d63a: 2640 moveal %d0,%a3 rtems_filesystem_freenode( &loc ); 4d63c: 508f addql #8,%sp 4d63e: 4a88 tstl %a0 4d640: 670e beqs 4d650 <== ALWAYS TAKEN 4d642: 2068 001c moveal %a0@(28),%a0 4d646: 4a88 tstl %a0 4d648: 6706 beqs 4d650 <== ALWAYS TAKEN 4d64a: 2f02 movel %d2,%sp@- 4d64c: 4e90 jsr %a0@ 4d64e: 588f addql #4,%sp if ( free_parentloc ) 4d650: 4a03 tstb %d3 4d652: 6716 beqs 4d66a <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4d654: 206e fff8 moveal %fp@(-8),%a0 4d658: 4a88 tstl %a0 4d65a: 670e beqs 4d66a <== ALWAYS TAKEN 4d65c: 2068 001c moveal %a0@(28),%a0 4d660: 4a88 tstl %a0 4d662: 6706 beqs 4d66a <== ALWAYS TAKEN 4d664: 2f0a movel %a2,%sp@- 4d666: 4e90 jsr %a0@ 4d668: 588f addql #4,%sp return result; } 4d66a: 200b movel %a3,%d0 4d66c: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4d672: 4e5e unlk %fp 4d674: 4e75 rts */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4d676: 2079 0005 c284 moveal 5c284 ,%a0 <== NOT EXECUTED 4d67c: 45ee ffec lea %fp@(-20),%a2 <== NOT EXECUTED 4d680: 5888 addql #4,%a0 <== NOT EXECUTED 4d682: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED 4d686: 200e movel %fp,%d0 <== NOT EXECUTED 4d688: 0680 ffff fff4 addil #-12,%d0 <== NOT EXECUTED 4d68e: 2640 moveal %d0,%a3 <== NOT EXECUTED 4d690: 4bee fff8 lea %fp@(-8),%a5 <== NOT EXECUTED 4d694: 224e moveal %fp,%a1 <== NOT EXECUTED 4d696: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 4d698: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 4d69a: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 4d69c: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 4d69e: 2310 movel %a0@,%a1@- <== NOT EXECUTED 4d6a0: 4203 clrb %d3 <== NOT EXECUTED 4d6a2: 6000 ff0c braw 4d5b0 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 4d6a6: 4a03 tstb %d3 4d6a8: 6610 bnes 4d6ba <== NEVER TAKEN result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4d6aa: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED return result; } 4d6ae: 200b movel %a3,%d0 <== NOT EXECUTED 4d6b0: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4d6b6: 4e5e unlk %fp <== NOT EXECUTED 4d6b8: 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 ); 4d6ba: 206e fff8 moveal %fp@(-8),%a0 4d6be: 4a88 tstl %a0 4d6c0: 67e8 beqs 4d6aa <== ALWAYS TAKEN 4d6c2: 2028 001c movel %a0@(28),%d0 4d6c6: 67e2 beqs 4d6aa <== ALWAYS TAKEN 4d6c8: 2f0a movel %a2,%sp@- 4d6ca: 2040 moveal %d0,%a0 4d6cc: 367c ffff moveaw #-1,%a3 4d6d0: 4e90 jsr %a0@ 4d6d2: 588f addql #4,%sp rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4d6d4: 200b movel %a3,%d0 4d6d6: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4d6dc: 4e5e unlk %fp 4d6de: 4e75 rts rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 4d6e0: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4d6e4: 4a88 tstl %a0 <== NOT EXECUTED 4d6e6: 6706 beqs 4d6ee <== NOT EXECUTED 4d6e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d6ea: 4e90 jsr %a0@ <== NOT EXECUTED 4d6ec: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4d6ee: 4a03 tstb %d3 <== NOT EXECUTED 4d6f0: 6716 beqs 4d708 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4d6f2: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4d6f6: 4a88 tstl %a0 <== NOT EXECUTED 4d6f8: 670e beqs 4d708 <== NOT EXECUTED 4d6fa: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d6fe: 4a88 tstl %a0 <== NOT EXECUTED 4d700: 6706 beqs 4d708 <== NOT EXECUTED 4d702: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d704: 4e90 jsr %a0@ <== NOT EXECUTED 4d706: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4d708: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 4d70e: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 4d712: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4d714: 200b movel %a3,%d0 <== NOT EXECUTED 4d716: 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 ); 4d71c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4d722: 4e5e unlk %fp <== NOT EXECUTED 4d724: 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, 4d726: 42a7 clrl %sp@- 4d728: 45ee ffec lea %fp@(-20),%a2 4d72c: 2f0a movel %a2,%sp@- 4d72e: 4878 0002 pea 2 4d732: 2f00 movel %d0,%sp@- 4d734: 2f04 movel %d4,%sp@- 4d736: 4eb9 0004 2720 jsr 42720 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4d73c: 4fef 0014 lea %sp@(20),%sp 4d740: 4a80 tstl %d0 4d742: 6600 ff66 bnew 4d6aa <== ALWAYS TAKEN 4d746: 200e movel %fp,%d0 4d748: 49ee fff0 lea %fp@(-16),%a4 4d74c: 0680 ffff fff4 addil #-12,%d0 4d752: 4bee fff8 lea %fp@(-8),%a5 4d756: 43ee fffc lea %fp@(-4),%a1 4d75a: 7601 moveq #1,%d3 4d75c: 6000 fe52 braw 4d5b0 <== ALWAYS TAKEN 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 ); 4d760: 206e ffe4 moveal %fp@(-28),%a0 4d764: 4a88 tstl %a0 4d766: 670e beqs 4d776 <== ALWAYS TAKEN 4d768: 2068 001c moveal %a0@(28),%a0 4d76c: 4a88 tstl %a0 4d76e: 6706 beqs 4d776 <== ALWAYS TAKEN 4d770: 2f02 movel %d2,%sp@- 4d772: 4e90 jsr %a0@ 4d774: 588f addql #4,%sp if ( free_parentloc ) 4d776: 4a03 tstb %d3 4d778: 6716 beqs 4d790 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 4d77a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4d77e: 4a88 tstl %a0 <== NOT EXECUTED 4d780: 670e beqs 4d790 <== NOT EXECUTED 4d782: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d786: 4a88 tstl %a0 <== NOT EXECUTED 4d788: 6706 beqs 4d790 <== NOT EXECUTED 4d78a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d78c: 4e90 jsr %a0@ <== NOT EXECUTED 4d78e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4d790: 4eb9 0004 d808 jsr 4d808 <__errno> 4d796: 367c ffff moveaw #-1,%a3 4d79a: 2040 moveal %d0,%a0 4d79c: 7015 moveq #21,%d0 4d79e: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4d7a0: 200b movel %a3,%d0 4d7a2: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4d7a8: 4e5e unlk %fp 4d7aa: 4e75 rts 0004b180 : */ int unmount( const char *path ) { 4b180: 4e56 ffec linkw %fp,#-20 4b184: 2f0a movel %a2,%sp@- 4b186: 246e 0008 moveal %fp@(8),%a2 4b18a: 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 ) ) 4b18c: 240e movel %fp,%d2 4b18e: 0682 ffff ffec addil #-20,%d2 4b194: 2f0a movel %a2,%sp@- 4b196: 4eb9 0008 5a18 jsr 85a18 4b19c: 7201 moveq #1,%d1 4b19e: 2e81 movel %d1,%sp@ 4b1a0: 2f02 movel %d2,%sp@- 4b1a2: 42a7 clrl %sp@- 4b1a4: 2f00 movel %d0,%sp@- 4b1a6: 2f0a movel %a2,%sp@- 4b1a8: 4eb9 0004 7758 jsr 47758 4b1ae: 4fef 0014 lea %sp@(20),%sp 4b1b2: 4a80 tstl %d0 4b1b4: 6600 00b0 bnew 4b266 return -1; mt_entry = loc.mt_entry; 4b1b8: 246e fffc moveal %fp@(-4),%a2 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 4b1bc: 202e ffec movel %fp@(-20),%d0 4b1c0: b0aa 001c cmpl %a2@(28),%d0 4b1c4: 6600 00fa bnew 4b2c0 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4b1c8: 206e fff8 moveal %fp@(-8),%a0 4b1cc: 4a88 tstl %a0 4b1ce: 670e beqs 4b1de <== ALWAYS TAKEN 4b1d0: 2068 001c moveal %a0@(28),%a0 4b1d4: 4a88 tstl %a0 4b1d6: 6706 beqs 4b1de <== ALWAYS TAKEN 4b1d8: 2f02 movel %d2,%sp@- 4b1da: 4e90 jsr %a0@ 4b1dc: 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; 4b1de: 206a 0014 moveal %a2@(20),%a0 4b1e2: 4aa8 0028 tstl %a0@(40) 4b1e6: 6700 0126 beqw 4b30e <== ALWAYS TAKEN fs_root_loc = &mt_entry->mt_fs_root; 4b1ea: 206a 0028 moveal %a2@(40),%a0 4b1ee: 4aa8 002c tstl %a0@(44) 4b1f2: 6700 011a beqw 4b30e <== ALWAYS TAKEN * 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 ) 4b1f6: 2079 000a 07dc moveal a07dc ,%a0 4b1fc: b5e8 0014 cmpal %a0@(20),%a2 4b200: 6728 beqs 4b22a /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4b202: 2079 000a 5144 moveal a5144 ,%a0 4b208: b1fc 000a 5148 cmpal #676168,%a0 4b20e: 6734 beqs 4b244 <== ALWAYS 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 ) { 4b210: 202a 002c movel %a2@(44),%d0 4b214: b0a8 0018 cmpl %a0@(24),%d0 4b218: 6710 beqs 4b22a <== ALWAYS 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 ) { 4b21a: 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; 4b21c: b1fc 000a 5148 cmpal #676168,%a0 4b222: 6720 beqs 4b244 !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 ) { 4b224: b0a8 0018 cmpl %a0@(24),%d0 4b228: 66f0 bnes 4b21a * 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 ); 4b22a: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b230: 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 ); 4b234: 2040 moveal %d0,%a0 4b236: 7210 moveq #16,%d1 4b238: 70ff moveq #-1,%d0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b23a: 246e ffe8 moveal %fp@(-24),%a2 4b23e: 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 ); 4b240: 2081 movel %d1,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b242: 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 ) 4b244: 2f0a movel %a2,%sp@- 4b246: 4eb9 0004 7afc jsr 47afc 4b24c: 588f addql #4,%sp 4b24e: 7201 moveq #1,%d1 4b250: b280 cmpl %d0,%d1 4b252: 67d6 beqs 4b22a * 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 ) 4b254: 206a 0014 moveal %a2@(20),%a0 4b258: 2f0a movel %a2,%sp@- 4b25a: 2068 0028 moveal %a0@(40),%a0 4b25e: 4e90 jsr %a0@ 4b260: 588f addql #4,%sp 4b262: 4a80 tstl %d0 4b264: 670e beqs 4b274 <== NEVER TAKEN rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b266: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 4b26a: 70ff moveq #-1,%d0 } 4b26c: 246e ffe8 moveal %fp@(-24),%a2 4b270: 4e5e unlk %fp 4b272: 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){ 4b274: 206a 0028 moveal %a2@(40),%a0 4b278: 2f0a movel %a2,%sp@- 4b27a: 2068 002c moveal %a0@(44),%a0 4b27e: 4e90 jsr %a0@ 4b280: 588f addql #4,%sp 4b282: 4a80 tstl %d0 4b284: 666a bnes 4b2f0 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4b286: 2f0a movel %a2,%sp@- 4b288: 4eb9 0004 caf8 jsr 4caf8 <_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 ); 4b28e: 206a 0014 moveal %a2@(20),%a0 4b292: 588f addql #4,%sp 4b294: 4a88 tstl %a0 4b296: 6710 beqs 4b2a8 <== ALWAYS TAKEN 4b298: 2068 001c moveal %a0@(28),%a0 4b29c: 4a88 tstl %a0 4b29e: 6708 beqs 4b2a8 <== ALWAYS TAKEN 4b2a0: 486a 0008 pea %a2@(8) 4b2a4: 4e90 jsr %a0@ 4b2a6: 588f addql #4,%sp free( mt_entry ); 4b2a8: 2f0a movel %a2,%sp@- 4b2aa: 4eb9 0004 784c jsr 4784c return 0; } 4b2b0: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 4b2b4: 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 ); 4b2b6: 4280 clrl %d0 return 0; } 4b2b8: 246e ffe8 moveal %fp@(-24),%a2 4b2bc: 4e5e unlk %fp 4b2be: 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 ); 4b2c0: 206e fff8 moveal %fp@(-8),%a0 4b2c4: 4a88 tstl %a0 4b2c6: 670e beqs 4b2d6 <== ALWAYS TAKEN 4b2c8: 2068 001c moveal %a0@(28),%a0 4b2cc: 4a88 tstl %a0 4b2ce: 6706 beqs 4b2d6 <== ALWAYS TAKEN 4b2d0: 2f02 movel %d2,%sp@- 4b2d2: 4e90 jsr %a0@ 4b2d4: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 4b2d6: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> 4b2dc: 740d moveq #13,%d2 4b2de: 2040 moveal %d0,%a0 4b2e0: 70ff moveq #-1,%d0 4b2e2: 2082 movel %d2,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b2e4: 242e ffe4 movel %fp@(-28),%d2 4b2e8: 246e ffe8 moveal %fp@(-24),%a2 4b2ec: 4e5e unlk %fp 4b2ee: 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 ) 4b2f0: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 4b2f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b2f6: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED 4b2fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b2fc: 4e90 jsr %a0@ <== NOT EXECUTED 4b2fe: 588f addql #4,%sp <== NOT EXECUTED 4b300: 4a80 tstl %d0 <== NOT EXECUTED 4b302: 6700 ff62 beqw 4b266 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4b306: 42a7 clrl %sp@- <== NOT EXECUTED 4b308: 4eb9 0004 c7d4 jsr 4c7d4 <== 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 ); 4b30e: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b314: 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 ); 4b318: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b31a: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b31c: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 4b320: 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 ); 4b322: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b328: 4e75 rts <== NOT EXECUTED ... 00068d24 : int utime( const char *path, const struct utimbuf *times ) { 68d24: 4e56 ffe0 linkw %fp,#-32 68d28: 48d7 040c moveml %d2-%d3/%a2,%sp@ 68d2c: 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 ) ) 68d30: 240e movel %fp,%d2 68d32: 0682 ffff ffec addil #-20,%d2 68d38: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 68d3a: 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 ) ) 68d3e: 4eb9 0008 5a18 jsr 85a18 68d44: 7201 moveq #1,%d1 68d46: 2e81 movel %d1,%sp@ 68d48: 2f02 movel %d2,%sp@- 68d4a: 42a7 clrl %sp@- 68d4c: 2f00 movel %d0,%sp@- 68d4e: 2f03 movel %d3,%sp@- 68d50: 4eb9 0004 7758 jsr 47758 68d56: 4fef 0014 lea %sp@(20),%sp 68d5a: 4a80 tstl %d0 68d5c: 663e bnes 68d9c return -1; if ( !temp_loc.ops->utime_h ){ 68d5e: 226e fff8 moveal %fp@(-8),%a1 68d62: 2069 0030 moveal %a1@(48),%a0 68d66: 4a88 tstl %a0 68d68: 6740 beqs 68daa <== ALWAYS 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 ); 68d6a: 2f2a 0004 movel %a2@(4),%sp@- 68d6e: 2f12 movel %a2@,%sp@- 68d70: 2f02 movel %d2,%sp@- 68d72: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 68d74: 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 ); 68d78: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 68d7a: 4fef 000c lea %sp@(12),%sp 68d7e: 4a88 tstl %a0 68d80: 670e beqs 68d90 <== ALWAYS TAKEN 68d82: 2068 001c moveal %a0@(28),%a0 68d86: 4a88 tstl %a0 68d88: 6706 beqs 68d90 <== ALWAYS TAKEN 68d8a: 2f02 movel %d2,%sp@- 68d8c: 4e90 jsr %a0@ 68d8e: 588f addql #4,%sp return result; } 68d90: 2003 movel %d3,%d0 68d92: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 68d98: 4e5e unlk %fp 68d9a: 4e75 rts ) { rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 68d9c: 76ff moveq #-1,%d3 result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 68d9e: 2003 movel %d3,%d0 68da0: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 68da6: 4e5e unlk %fp 68da8: 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 ); 68daa: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68dae: 4a88 tstl %a0 <== NOT EXECUTED 68db0: 6706 beqs 68db8 <== NOT EXECUTED 68db2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68db4: 4e90 jsr %a0@ <== NOT EXECUTED 68db6: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68db8: 4eb9 0007 f9b4 jsr 7f9b4 <__errno> <== NOT EXECUTED 68dbe: 76ff moveq #-1,%d3 <== NOT EXECUTED 68dc0: 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; } 68dc2: 2003 movel %d3,%d0 <== NOT EXECUTED 68dc4: 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 ); 68dca: 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; } 68dd0: 4e5e unlk %fp <== NOT EXECUTED 68dd2: 4e75 rts 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 <== ALWAYS TAKEN 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 b29f lea 5b29f ,%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 c26c moveal 5c26c ,%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 <== ALWAYS TAKEN /* 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 <== ALWAYS TAKEN 45308: 7a4f moveq #79,%d5 4530a: ba81 cmpl %d1,%d5 4530c: 6700 0172 beqw 45480 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 4531a: 1a3c 0049 moveb #73,%d5 4531e: ba81 cmpl %d1,%d5 45320: 6700 0090 beqw 453b2 <== ALWAYS TAKEN 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 <== ALWAYS 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 <== ALWAYS TAKEN 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 <== ALWAYS TAKEN 45354: 1a3c 0058 moveb #88,%d5 45358: ba81 cmpl %d1,%d5 4535a: 6700 0270 beqw 455cc <== ALWAYS TAKEN base = 16; sign = false; } else if ( c == 'p' ) { 4535e: 7070 moveq #112,%d0 45360: b081 cmpl %d1,%d0 45362: 6700 0274 beqw 455d8 <== ALWAYS TAKEN base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 45366: 2f01 movel %d1,%sp@- 45368: 2079 0005 c26c moveal 5c26c ,%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 <== NEVER TAKEN 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 <== NEVER TAKEN /* 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 <== NOT EXECUTED 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 <== NOT EXECUTED BSP_output_char(chr); 4539a: 2010 movel %a0@,%d0 <== NOT EXECUTED 4539c: 49c0 extbl %d0 <== NOT EXECUTED 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) <== NOT EXECUTED BSP_output_char(chr); 453a2: 2079 0005 c26c moveal 5c26c ,%a0 <== NOT EXECUTED 453a8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 453aa: 4e90 jsr %a0@ <== NOT EXECUTED continue; 453ac: 588f addql #4,%sp <== NOT EXECUTED 453ae: 6000 fec2 braw 45272 <== NOT EXECUTED } 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 <== ALWAYS TAKEN } 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 c26c moveal 5c26c ,%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 <== ALWAYS TAKEN 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 c26c moveal 5c26c ,%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 c26c moveal 5c26c ,%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 <== ALWAYS TAKEN } 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 <== NEVER TAKEN 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 <== NEVER TAKEN 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 <== ALWAYS TAKEN } 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 <== NEVER 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 <== ALWAYS 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 c26c moveal 5c26c ,%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 <== ALWAYS TAKEN BSP_output_char(' '); 4554c: 4878 0020 pea 20 for ( i=0 ; i,%a0 45558: 4e90 jsr %a0@ for ( i=0 ; i <== ALWAYS TAKEN 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 c26c moveal 5c26c ,%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 <== ALWAYS TAKEN 455aa: 6000 fe86 braw 45432 <== ALWAYS TAKEN } 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 <== ALWAYS TAKEN unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 455ba: 47f9 0005 b29e lea 5b29e ,%a3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 455c0: 4a13 tstb %a3@ 455c2: 6600 ff1c bnew 454e0 <== ALWAYS TAKEN 455c6: 4283 clrl %d3 455c8: 6000 ff20 braw 454ea <== ALWAYS TAKEN } 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 <== ALWAYS TAKEN } printNum( 455d8: 49c7 extbl %d7 455da: 2647 moveal %d7,%a3 455dc: 7a10 moveq #16,%d5 455de: 4201 clrb %d1 455e0: 6000 fdd8 braw 453ba <== ALWAYS TAKEN 0005a520 : ssize_t write( int fd, const void *buffer, size_t count ) { 5a520: 4e56 fff4 linkw %fp,#-12 5a524: 202e 0008 movel %fp@(8),%d0 5a528: 222e 000c movel %fp@(12),%d1 5a52c: 206e 0010 moveal %fp@(16),%a0 5a530: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5a534: b0b9 0005 c174 cmpl 5c174 ,%d0 5a53a: 6466 bccs 5a5a2 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 5a53c: 2479 0005 d7f8 moveal 5d7f8 ,%a2 5a542: ed88 lsll #6,%d0 5a544: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5a546: 202a 0014 movel %a2@(20),%d0 5a54a: 0800 0008 btst #8,%d0 5a54e: 6752 beqs 5a5a2 <== ALWAYS TAKEN rtems_libio_check_buffer( buffer ); 5a550: 4a81 tstl %d1 5a552: 6766 beqs 5a5ba <== ALWAYS TAKEN rtems_libio_check_count( count ); 5a554: 4a88 tstl %a0 5a556: 673e beqs 5a596 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5a558: 44c0 movew %d0,%ccr 5a55a: 665e bnes 5a5ba <== ALWAYS TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 5a55c: 226a 003c moveal %a2@(60),%a1 5a560: 2269 000c moveal %a1@(12),%a1 5a564: 4a89 tstl %a1 5a566: 676a beqs 5a5d2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 5a568: 2f08 movel %a0,%sp@- 5a56a: 2f01 movel %d1,%sp@- 5a56c: 2f0a movel %a2,%sp@- 5a56e: 4e91 jsr %a1@ if ( rc > 0 ) 5a570: 4fef 000c lea %sp@(12),%sp 5a574: 4a80 tstl %d0 5a576: 6f14 bles 5a58c <== ALWAYS TAKEN iop->offset += rc; 5a578: 2400 movel %d0,%d2 5a57a: 5bc1 smi %d1 5a57c: 49c1 extbl %d1 5a57e: d5aa 0010 addl %d2,%a2@(16) 5a582: 262a 000c movel %a2@(12),%d3 5a586: d781 addxl %d1,%d3 5a588: 2543 000c movel %d3,%a2@(12) return rc; } 5a58c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a592: 4e5e unlk %fp 5a594: 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 ); 5a596: 4280 clrl %d0 if ( rc > 0 ) iop->offset += rc; return rc; } 5a598: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a59e: 4e5e unlk %fp 5a5a0: 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 ); 5a5a2: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 5a5a8: 7409 moveq #9,%d2 <== NOT EXECUTED 5a5aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a5ac: 70ff moveq #-1,%d0 <== NOT EXECUTED 5a5ae: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5b0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5a5b6: 4e5e unlk %fp <== NOT EXECUTED 5a5b8: 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 ); 5a5ba: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 5a5c0: 7216 moveq #22,%d1 <== NOT EXECUTED 5a5c2: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a5c4: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5c6: 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 ); 5a5cc: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5ce: 4e5e unlk %fp <== NOT EXECUTED 5a5d0: 4e75 rts <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a5d2: 4eb9 0004 d808 jsr 4d808 <__errno> <== NOT EXECUTED 5a5d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a5da: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5dc: 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 ); 5a5e2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5e8: 4e5e unlk %fp <== NOT EXECUTED 5a5ea: 4e75 rts 00046f14 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 46f14: 4e56 ffe4 linkw %fp,#-28 46f18: 202e 0008 movel %fp@(8),%d0 46f1c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 46f20: 246e 000c moveal %fp@(12),%a2 46f24: 242e 0010 movel %fp@(16),%d2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 46f28: b0b9 0005 fdd4 cmpl 5fdd4 ,%d0 46f2e: 6400 00f0 bccw 47020 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 46f32: 2679 0006 1c2c moveal 61c2c ,%a3 46f38: ed88 lsll #6,%d0 46f3a: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 46f3c: 202b 0014 movel %a3@(20),%d0 46f40: 0800 0008 btst #8,%d0 46f44: 6700 00da beqw 47020 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 46f48: 44c0 movew %d0,%ccr 46f4a: 666e bnes 46fba <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 46f4c: 4a8a tstl %a2 46f4e: 676a beqs 46fba rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 46f50: 4a82 tstl %d2 46f52: 6f66 bles 46fba rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 46f54: 0c82 0000 0400 cmpil #1024,%d2 46f5a: 6e5e bgts 46fba <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 46f5c: 206b 003c moveal %a3@(60),%a0 46f60: 4aa8 000c tstl %a0@(12) 46f64: 6700 00d4 beqw 4703a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 46f68: 204a moveal %a2,%a0 46f6a: 93c9 subal %a1,%a1 46f6c: 4281 clrl %d1 46f6e: 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 ) 46f70: 4a90 tstl %a0@ 46f72: 6746 beqs 46fba 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 ) 46f74: 2028 0004 movel %a0@(4),%d0 46f78: 57c4 seq %d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 46f7a: 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++ ) { 46f7c: 5289 addql #1,%a1 46f7e: 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 ) 46f80: c883 andl %d3,%d4 46f82: 1604 moveb %d4,%d3 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46f84: b081 cmpl %d1,%d0 46f86: 6d32 blts 46fba * 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++ ) { 46f88: 2200 movel %d0,%d1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46f8a: 0c80 0000 7fff cmpil #32767,%d0 46f90: 6e28 bgts 46fba * 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++ ) { 46f92: b3c2 cmpal %d2,%a1 46f94: 6dda blts 46f70 <== NEVER TAKEN } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46f96: 4a04 tstb %d4 <== NOT EXECUTED 46f98: 663a bnes 46fd4 <== NOT EXECUTED 46f9a: 588a addql #4,%a2 <== NOT EXECUTED 46f9c: 4283 clrl %d3 <== NOT EXECUTED 46f9e: 4284 clrl %d4 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46fa0: 2012 movel %a2@,%d0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46fa2: 5283 addql #1,%d3 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46fa4: 4a80 tstl %d0 <== NOT EXECUTED 46fa6: 663a bnes 46fe2 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46fa8: 508a addql #8,%a2 <== NOT EXECUTED 46faa: b682 cmpl %d2,%d3 <== NOT EXECUTED 46fac: 6df2 blts 46fa0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 46fae: 2004 movel %d4,%d0 <== NOT EXECUTED 46fb0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 46fb6: 4e5e unlk %fp <== NOT EXECUTED 46fb8: 4e75 rts <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 46fba: 4eb9 0004 fd20 jsr 4fd20 <__errno> 46fc0: 78ff moveq #-1,%d4 46fc2: 2040 moveal %d0,%a0 46fc4: 7016 moveq #22,%d0 46fc6: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 46fc8: 2004 movel %d4,%d0 46fca: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46fd0: 4e5e unlk %fp 46fd2: 4e75 rts } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46fd4: 4284 clrl %d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 46fd6: 2004 movel %d4,%d0 <== NOT EXECUTED 46fd8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 46fde: 4e5e unlk %fp <== NOT EXECUTED 46fe0: 4e75 rts <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 46fe2: 206b 003c moveal %a3@(60),%a0 <== NOT EXECUTED 46fe6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46fe8: 2f2a fffc movel %a2@(-4),%sp@- <== NOT EXECUTED 46fec: 2f0b movel %a3,%sp@- <== NOT EXECUTED 46fee: 2068 000c moveal %a0@(12),%a0 <== NOT EXECUTED 46ff2: 4e90 jsr %a0@ <== NOT EXECUTED if ( bytes < 0 ) 46ff4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 46ff8: 4a80 tstl %d0 <== NOT EXECUTED 46ffa: 6d5a blts 47056 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 46ffc: 6716 beqs 47014 <== NOT EXECUTED iop->offset += bytes; total += bytes; 46ffe: d880 addl %d0,%d4 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 47000: 2c00 movel %d0,%d6 <== NOT EXECUTED 47002: 5bc5 smi %d5 <== NOT EXECUTED 47004: 49c5 extbl %d5 <== NOT EXECUTED 47006: ddab 0010 addl %d6,%a3@(16) <== NOT EXECUTED 4700a: 222b 000c movel %a3@(12),%d1 <== NOT EXECUTED 4700e: d385 addxl %d5,%d1 <== NOT EXECUTED 47010: 2741 000c movel %d1,%a3@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 47014: b092 cmpl %a2@,%d0 <== NOT EXECUTED 47016: 6696 bnes 46fae <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 47018: 508a addql #8,%a2 <== NOT EXECUTED 4701a: b682 cmpl %d2,%d3 <== NOT EXECUTED 4701c: 6d82 blts 46fa0 <== NOT EXECUTED 4701e: 608e bras 46fae <== NOT EXECUTED ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 47020: 4eb9 0004 fd20 jsr 4fd20 <__errno> 47026: 78ff moveq #-1,%d4 47028: 7209 moveq #9,%d1 4702a: 2040 moveal %d0,%a0 if (bytes != iov[ v ].iov_len) break; } return total; } 4702c: 2004 movel %d4,%d0 4702e: 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 ); 47034: 2081 movel %d1,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 47036: 4e5e unlk %fp 47038: 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 ); 4703a: 4eb9 0004 fd20 jsr 4fd20 <__errno> <== NOT EXECUTED 47040: 78ff moveq #-1,%d4 <== NOT EXECUTED 47042: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47044: 2004 movel %d4,%d0 <== NOT EXECUTED 47046: 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 ); 4704c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47052: 4e5e unlk %fp <== NOT EXECUTED 47054: 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 ) 47056: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47058: 2004 movel %d4,%d0 <== NOT EXECUTED 4705a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 47060: 4e5e unlk %fp <== NOT EXECUTED 47062: 4e75 rts