00047ff0 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 47ff0: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 47ff2: 4e56 0000 linkw %fp,#0 47ff6: 206e 0008 moveal %fp@(8),%a0 47ffa: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 47ffc: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 47ffe: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 48002: 202a 0048 movel %a2@(72),%d0 48006: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 48008: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 4800c: b280 cmpl %d0,%d1 4800e: 6546 bcss 48056 <== ALWAYS TAKEN 48010: 303b 0a08 movew %pc@(4801a ,%d0:l:2),%d0 48014: 48c0 extl %d0 48016: 4efb 0802 jmp %pc@(4801a ,%d0:l) 4801a: 000e 016 <== NOT EXECUTED 4801c: 0016 026 <== NOT EXECUTED 4801e: 001e 036 <== NOT EXECUTED 48020: 001e 036 <== NOT EXECUTED 48022: 002a 052 <== NOT EXECUTED 48024: 002a 052 <== NOT EXECUTED 48026: 0032 062 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 48028: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 4802e: 6026 bras 48056 <== ALWAYS TAKEN case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 48030: 203c 0005 95fa movel #366074,%d0 48036: 601a bras 48052 <== ALWAYS TAKEN break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 48038: 223c 0005 9632 movel #366130,%d1 4803e: 2141 0008 movel %d1,%a0@(8) break; 48042: 6012 bras 48056 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 48044: 2169 0004 0008 movel %a1@(4),%a0@(8) break; 4804a: 600a bras 48056 <== ALWAYS TAKEN case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 4804c: 203c 0005 9556 movel #365910,%d0 48052: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 48056: 245f moveal %sp@+,%a2 48058: 4280 clrl %d0 4805a: 4e5e unlk %fp 4805c: 4e75 rts 0004abe8 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4abe8: 4e56 fff8 linkw %fp,#-8 4abec: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4abee: 4878 0060 pea 60 4abf2: 4878 0001 pea 1 4abf6: 4eb9 0004 8da0 jsr 48da0 if ( !node ) 4abfc: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4abfe: 2440 moveal %d0,%a2 if ( !node ) 4ac00: 4a80 tstl %d0 4ac02: 674e beqs 4ac52 <== ALWAYS TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4ac04: 4878 0020 pea 20 4ac08: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4ac0c: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 4ac12: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4ac16: 7001 moveq #1,%d0 4ac18: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4ac1c: 4eb9 0004 cdc4 jsr 4cdc4 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 4ac22: 256e 0010 002e movel %fp@(16),%a2@(46) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4ac28: 42a7 clrl %sp@- 4ac2a: 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; 4ac2e: 4240 clrw %d0 4ac30: 3540 0038 movew %d0,%a2@(56) node->st_gid = 0; 4ac34: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4ac38: 4eb9 0004 8fe0 jsr 48fe0 node->stat_atime = (time_t) tv.tv_sec; 4ac3e: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 4ac42: 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; 4ac46: 2540 0044 movel %d0,%a2@(68) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4ac4a: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 4ac4e: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; return node; } 4ac52: 200a movel %a2,%d0 4ac54: 246e fff4 moveal %fp@(-12),%a2 4ac58: 4e5e unlk %fp 4ac5a: 4e75 rts 0004ac96 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4ac96: 4e56 fff0 linkw %fp,#-16 4ac9a: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4ac9e: 266e 0008 moveal %fp@(8),%a3 4aca2: 242e 000c movel %fp@(12),%d2 4aca6: 246e 0018 moveal %fp@(24),%a2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4acaa: 4a8b tstl %a3 4acac: 6606 bnes 4acb4 <== NEVER TAKEN 4acae: 99cc subal %a4,%a4 <== NOT EXECUTED 4acb0: 6000 00e6 braw 4ad98 <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4acb4: 2079 0005 a364 moveal 5a364 ,%a0 4acba: 2028 002c movel %a0@(44),%d0 4acbe: 4680 notl %d0 4acc0: c0ae 0014 andl %fp@(20),%d0 4acc4: 2f00 movel %d0,%sp@- 4acc6: 2f2e 0010 movel %fp@(16),%sp@- 4acca: 2f02 movel %d2,%sp@- 4accc: 4eb9 0004 abe8 jsr 4abe8 if ( !node ) 4acd2: 4fef 000c lea %sp@(12),%sp return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4acd6: 2840 moveal %d0,%a4 if ( !node ) 4acd8: 4a80 tstl %d0 4acda: 6700 00bc beqw 4ad98 <== ALWAYS TAKEN return NULL; /* * Set the type specific information */ switch (type) { 4acde: 5382 subql #1,%d2 4ace0: 7006 moveq #6,%d0 4ace2: b082 cmpl %d2,%d0 4ace4: 6570 bcss 4ad56 <== ALWAYS TAKEN 4ace6: 303b 2a08 movew %pc@(4acf0 ,%d2:l:2),%d0 4acea: 48c0 extl %d0 4acec: 4efb 0802 jmp %pc@(4acf0 ,%d0:l) 4acf0: 000e 016 <== NOT EXECUTED 4acf2: 002a 052 <== NOT EXECUTED 4acf4: 0024 044 <== NOT EXECUTED 4acf6: 0024 044 <== NOT EXECUTED 4acf8: 0046 0106 <== NOT EXECUTED 4acfa: 0036 066 <== NOT EXECUTED 4acfc: 0060 0140 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4acfe: 41ec 0050 lea %a4@(80),%a0 4ad02: 2948 004c movel %a0,%a4@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4ad06: 41ec 004c lea %a4@(76),%a0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4ad0a: 42ac 0050 clrl %a4@(80) the_chain->last = _Chain_Head(the_chain); 4ad0e: 2948 0054 movel %a0,%a4@(84) 4ad12: 605e bras 4ad72 <== ALWAYS TAKEN 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; 4ad14: 2952 004c movel %a2@,%a4@(76) break; 4ad18: 6058 bras 4ad72 <== ALWAYS TAKEN case IMFS_DEVICE: node->info.device.major = info->device.major; 4ad1a: 2952 004c movel %a2@,%a4@(76) node->info.device.minor = info->device.minor; 4ad1e: 296a 0004 0050 movel %a2@(4),%a4@(80) break; 4ad24: 604c bras 4ad72 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4ad26: 42ac 0054 clrl %a4@(84) <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4ad2a: 4280 clrl %d0 <== NOT EXECUTED 4ad2c: 4281 clrl %d1 <== NOT EXECUTED 4ad2e: 2940 004c movel %d0,%a4@(76) <== NOT EXECUTED 4ad32: 2941 0050 movel %d1,%a4@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 4ad36: 42ac 0054 clrl %a4@(84) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4ad3a: 4280 clrl %d0 4ad3c: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4ad3e: 42ac 0058 clrl %a4@(88) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4ad42: 2940 004c movel %d0,%a4@(76) 4ad46: 2941 0050 movel %d1,%a4@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4ad4a: 42ac 005c clrl %a4@(92) break; 4ad4e: 6022 bras 4ad72 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; 4ad50: 42ac 004c clrl %a4@(76) break; 4ad54: 601c bras 4ad72 <== ALWAYS TAKEN default: assert(0); 4ad56: 4879 0005 97e8 pea 597e8 <== NOT EXECUTED 4ad5c: 4879 0005 9833 pea 59833 <__FUNCTION__.5815> <== NOT EXECUTED 4ad62: 4878 005c pea 5c <== NOT EXECUTED 4ad66: 4879 0005 97ea pea 597ea <== NOT EXECUTED 4ad6c: 4eb9 0004 8cdc jsr 48cdc <__assert_func> <== NOT EXECUTED /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4ad72: 206b 0010 moveal %a3@(16),%a0 4ad76: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4ad7a: 2010 movel %a0@,%d0 4ad7c: 5280 addql #1,%d0 4ad7e: 2080 movel %d0,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4ad80: 2053 moveal %a3@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4ad82: 2940 0034 movel %d0,%a4@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4ad86: 2948 0008 movel %a0,%a4@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4ad8a: 2f0c movel %a4,%sp@- 4ad8c: 4868 004c pea %a0@(76) 4ad90: 4eb9 0004 5880 jsr 45880 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4ad96: 508f addql #8,%sp } 4ad98: 200c movel %a4,%d0 4ad9a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4ada0: 4e5e unlk %fp 4ada2: 4e75 rts 0004ac5c : IMFS_jnode_t *IMFS_create_root_node(void) { 4ac5c: 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) ); 4ac60: 4878 41ed pea 41ed 4ac64: 4879 0005 935e pea 5935e 4ac6a: 4878 0001 pea 1 4ac6e: 4eb9 0004 abe8 jsr 4abe8 if ( !node ) 4ac74: 4fef 000c lea %sp@(12),%sp 4ac78: 4a80 tstl %d0 4ac7a: 6716 beqs 4ac92 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4ac7c: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4ac7e: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4ac80: 43e9 0050 lea %a1@(80),%a1 4ac84: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4ac88: 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; 4ac8a: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4ac8e: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4ac92: 4e5e unlk %fp 4ac94: 4e75 rts 0004358e : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 4358e: 4e56 ffe0 linkw %fp,#-32 43592: 206e 0008 moveal %fp@(8),%a0 43596: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4359a: 242e 000c movel %fp@(12),%d2 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 4359e: 4a88 tstl %a0 435a0: 6612 bnes 435b4 <== NEVER TAKEN 435a2: 4879 0005 e996 pea 5e996 <== NOT EXECUTED 435a8: 4879 0005 ea64 pea 5ea64 <__FUNCTION__.6566> <== NOT EXECUTED 435ae: 4878 0084 pea 84 <== NOT EXECUTED 435b2: 6014 bras 435c8 <== NOT EXECUTED assert( level >= 0 ); 435b4: 4a82 tstl %d2 435b6: 6c1c bges 435d4 <== NEVER TAKEN 435b8: 4879 0005 e9a4 pea 5e9a4 <== NOT EXECUTED 435be: 4879 0005 ea64 pea 5ea64 <__FUNCTION__.6566> <== NOT EXECUTED 435c4: 4878 0086 pea 86 <== NOT EXECUTED 435c8: 4879 0005 e8ea pea 5e8ea <== NOT EXECUTED 435ce: 4eb9 0004 3cd8 jsr 43cd8 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 435d4: 7001 moveq #1,%d0 435d6: b0a8 0048 cmpl %a0@(72),%d0 435da: 6712 beqs 435ee <== NEVER TAKEN 435dc: 4879 0005 e9af pea 5e9af <== NOT EXECUTED 435e2: 4879 0005 ea64 pea 5ea64 <__FUNCTION__.6566> <== NOT EXECUTED 435e8: 4878 0088 pea 88 <== NOT EXECUTED 435ec: 60da bras 435c8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 435ee: 2a08 movel %a0,%d5 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 435f0: 2802 movel %d2,%d4 435f2: 0685 0000 0050 addil #80,%d5 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 435f8: 4bf9 0004 fb08 lea 4fb08 ,%a5 IMFS_print_jnode( the_jnode ); 435fe: 49f9 0004 3412 lea 43412 ,%a4 if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43604: 5284 addql #1,%d4 43606: 47f9 0004 358e lea 4358e ,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 4360c: 2468 004c moveal %a0@(76),%a2 43610: 6034 bras 43646 <== ALWAYS TAKEN !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 43612: 4283 clrl %d3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43614: 2079 0006 02fc moveal 602fc <_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++ ) 4361a: 5283 addql #1,%d3 fprintf(stdout, "...." ); 4361c: 2f28 0008 movel %a0@(8),%sp@- 43620: 4879 0005 e9d5 pea 5e9d5 43626: 4e95 jsr %a5@ !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 43628: 508f addql #8,%sp 4362a: b483 cmpl %d3,%d2 4362c: 6ce6 bges 43614 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 4362e: 2f0a movel %a2,%sp@- 43630: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 43632: 588f addql #4,%sp 43634: 7001 moveq #1,%d0 43636: b0aa 0048 cmpl %a2@(72),%d0 4363a: 6608 bnes 43644 IMFS_dump_directory( the_jnode, level + 1 ); 4363c: 2f04 movel %d4,%sp@- 4363e: 2f0a movel %a2,%sp@- 43640: 4e93 jsr %a3@ 43642: 508f addql #8,%sp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 43644: 2452 moveal %a2@,%a2 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43646: ba8a cmpl %a2,%d5 43648: 66c8 bnes 43612 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 4364a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43650: 4e5e unlk %fp 43652: 4e75 rts 000481a4 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 481a4: 4e56 ff9c linkw %fp,#-100 481a8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 481ac: 246e 0014 moveal %fp@(20),%a2 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 481b0: 2a0e movel %fp,%d5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 481b2: 4282 clrl %d2 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 481b4: 0685 ffff ffc7 addil #-57,%d5 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 481ba: 2e3c 0004 80da movel #295130,%d7 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 481c0: 2a6e 0008 moveal %fp@(8),%a5 481c4: 286e 000c moveal %fp@(12),%a4 481c8: 262e 0010 movel %fp@(16),%d3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 481cc: 2652 moveal %a2@,%a3 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 481ce: 486e fffc pea %fp@(-4) 481d2: 2f05 movel %d5,%sp@- 481d4: 2f0c movel %a4,%sp@- 481d6: 4875 2800 pea %a5@(00000000,%d2:l) 481da: 4eb9 0004 8948 jsr 48948 pathnamelen -= len; 481e0: 282e fffc movel %fp@(-4),%d4 i += len; if ( !pathloc->node_access ) 481e4: 4fef 0010 lea %sp@(16),%sp 481e8: 2052 moveal %a2@,%a0 481ea: 4a88 tstl %a0 481ec: 6700 0100 beqw 482ee <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 481f0: 4a80 tstl %d0 481f2: 6718 beqs 4820c if ( node->type == IMFS_DIRECTORY ) 481f4: 7201 moveq #1,%d1 481f6: b2ab 0048 cmpl %a3@(72),%d1 481fa: 6610 bnes 4820c /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 481fc: 123c 0040 moveb #64,%d1 48200: 7c40 moveq #64,%d6 48202: c2a8 002e andl %a0@(46),%d1 48206: bc81 cmpl %d1,%d6 48208: 6600 019a bnew 483a4 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4820c: 99c4 subal %d4,%a4 i += len; 4820e: d484 addl %d4,%d2 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 48210: 2648 moveal %a0,%a3 switch( type ) { 48212: 7203 moveq #3,%d1 48214: b280 cmpl %d0,%d1 48216: 676a beqs 48282 48218: 7c04 moveq #4,%d6 4821a: bc80 cmpl %d0,%d6 4821c: 6700 00e8 beqw 48306 48220: 123c 0002 moveb #2,%d1 48224: b280 cmpl %d0,%d1 48226: 6600 00f0 bnew 48318 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4822a: 2279 0005 a364 moveal 5a364 ,%a1 48230: b1e9 0018 cmpal %a1@(24),%a0 48234: 6798 beqs 481ce /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 48236: 226a 0010 moveal %a2@(16),%a1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4823a: b1e9 001c cmpal %a1@(28),%a0 4823e: 663c bnes 4827c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 48240: 4878 0014 pea 14 48244: 2a0e movel %fp,%d5 48246: 4869 0008 pea %a1@(8) 4824a: 0685 ffff ffe8 addil #-24,%d5 48250: 47f9 0004 c200 lea 4c200 ,%a3 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 48256: 9484 subl %d4,%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; 48258: 2f05 movel %d5,%sp@- 4825a: 4e93 jsr %a3@ *pathloc = newloc; 4825c: 4878 0014 pea 14 48260: 2f05 movel %d5,%sp@- 48262: 2f0a movel %a2,%sp@- 48264: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 48266: 2f0a movel %a2,%sp@- 48268: 206a 000c moveal %a2@(12),%a0 4826c: 2f03 movel %d3,%sp@- 4826e: 4874 4800 pea %a4@(00000000,%d4:l) 48272: 4875 2800 pea %a5@(00000000,%d2:l) 48276: 2050 moveal %a0@,%a0 48278: 6000 00f6 braw 48370 <== ALWAYS TAKEN pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4827c: 2668 0008 moveal %a0@(8),%a3 48280: 6068 bras 482ea <== ALWAYS TAKEN case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 48282: 2028 0048 movel %a0@(72),%d0 48286: 7203 moveq #3,%d1 48288: b280 cmpl %d0,%d1 4828a: 6614 bnes 482a0 IMFS_evaluate_hard_link( pathloc, 0 ); 4828c: 42a7 clrl %sp@- 4828e: 2f0a movel %a2,%sp@- 48290: 4eb9 0004 8080 jsr 48080 node = pathloc->node_access; 48296: 2652 moveal %a2@,%a3 if ( !node ) 48298: 508f addql #8,%sp 4829a: 4a8b tstl %a3 4829c: 661c bnes 482ba <== NEVER TAKEN 4829e: 6022 bras 482c2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 482a0: 7204 moveq #4,%d1 482a2: b280 cmpl %d0,%d1 482a4: 6614 bnes 482ba result = IMFS_evaluate_sym_link( pathloc, 0 ); 482a6: 42a7 clrl %sp@- 482a8: 2047 moveal %d7,%a0 482aa: 2f0a movel %a2,%sp@- 482ac: 4e90 jsr %a0@ node = pathloc->node_access; 482ae: 2652 moveal %a2@,%a3 if ( result == -1 ) 482b0: 508f addql #8,%sp 482b2: 72ff moveq #-1,%d1 482b4: b280 cmpl %d0,%d1 482b6: 6700 00de beqw 48396 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 482ba: 7c01 moveq #1,%d6 482bc: bcab 0048 cmpl %a3@(72),%d6 482c0: 6712 beqs 482d4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 482c2: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 482c8: 7c14 moveq #20,%d6 482ca: 72ff moveq #-1,%d1 482cc: 2040 moveal %d0,%a0 482ce: 2086 movel %d6,%a0@ 482d0: 6000 00c6 braw 48398 <== 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 ) { 482d4: 206b 0058 moveal %a3@(88),%a0 482d8: 4a88 tstl %a0 482da: 6658 bnes 48334 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 482dc: 2f05 movel %d5,%sp@- 482de: 2f0b movel %a3,%sp@- 482e0: 4eb9 0004 88b8 jsr 488b8 if ( !node ) 482e6: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 482e8: 2640 moveal %d0,%a3 if ( !node ) 482ea: 4a8b tstl %a3 482ec: 6612 bnes 48300 rtems_set_errno_and_return_minus_one( ENOENT ); 482ee: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 482f4: 7a02 moveq #2,%d5 482f6: 72ff moveq #-1,%d1 482f8: 2040 moveal %d0,%a0 482fa: 2085 movel %d5,%a0@ 482fc: 6000 009a braw 48398 <== ALWAYS TAKEN /* * Set the node access to the point we have found. */ pathloc->node_access = node; 48300: 248b movel %a3,%a2@ break; 48302: 6000 feca braw 481ce <== ALWAYS TAKEN case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 48306: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 4830c: 785b moveq #91,%d4 4830e: 72ff moveq #-1,%d1 48310: 2040 moveal %d0,%a0 48312: 2084 movel %d4,%a0@ 48314: 6000 0082 braw 48398 <== ALWAYS TAKEN /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 48318: 4a80 tstl %d0 4831a: 6708 beqs 48324 4831c: 7204 moveq #4,%d1 4831e: b280 cmpl %d0,%d1 48320: 6600 feac bnew 481ce <== NEVER TAKEN * 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 ) { 48324: 7c01 moveq #1,%d6 48326: bca8 0048 cmpl %a0@(72),%d6 4832a: 664e bnes 4837a if ( node->info.directory.mt_fs != NULL ) { 4832c: 2068 0058 moveal %a0@(88),%a0 48330: 4a88 tstl %a0 48332: 6746 beqs 4837a newloc = node->info.directory.mt_fs->mt_fs_root; 48334: 4878 0014 pea 14 48338: 280e movel %fp,%d4 4833a: 4868 001c pea %a0@(28) 4833e: 0684 ffff ffe8 addil #-24,%d4 48344: 47f9 0004 c200 lea 4c200 ,%a3 4834a: 2f04 movel %d4,%sp@- 4834c: 4e93 jsr %a3@ *pathloc = newloc; 4834e: 4878 0014 pea 14 48352: 2f04 movel %d4,%sp@- 48354: 2f0a movel %a2,%sp@- 48356: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)( &pathname[i-len], 48358: 206e fffc moveal %fp@(-4),%a0 4835c: 9488 subl %a0,%d2 4835e: 2f0a movel %a2,%sp@- 48360: 226a 000c moveal %a2@(12),%a1 48364: 2f03 movel %d3,%sp@- 48366: 4874 8800 pea %a4@(00000000,%a0:l) 4836a: 4875 2800 pea %a5@(00000000,%d2:l) 4836e: 2051 moveal %a1@,%a0 48370: 4e90 jsr %a0@ 48372: 4fef 0028 lea %sp@(40),%sp 48376: 2200 movel %d0,%d1 48378: 601e bras 48398 <== ALWAYS TAKEN flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4837a: 2f0a movel %a2,%sp@- /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4837c: ed8b lsll #6,%d3 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4837e: 4eb9 0004 7ff0 jsr 47ff0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 48384: 2052 moveal %a2@,%a0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 48386: 2200 movel %d0,%d1 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 48388: 2003 movel %d3,%d0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4838a: 588f addql #4,%sp if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 4838c: c0a8 002e andl %a0@(46),%d0 48390: b680 cmpl %d0,%d3 48392: 6610 bnes 483a4 48394: 6002 bras 48398 <== ALWAYS TAKEN 48396: 2200 movel %d0,%d1 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 48398: 2001 movel %d1,%d0 4839a: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 483a0: 4e5e unlk %fp 483a2: 4e75 rts /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 483a4: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 483aa: 760d moveq #13,%d3 483ac: 72ff moveq #-1,%d1 483ae: 2040 moveal %d0,%a0 483b0: 2083 movel %d3,%a0@ 483b2: 60e4 bras 48398 <== ALWAYS TAKEN 0004844a : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4844a: 4e56 ff9c linkw %fp,#-100 4844e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48452: 286e 0008 moveal %fp@(8),%a4 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 48456: 2c0e movel %fp,%d6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 48458: 4282 clrl %d2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4845a: 0686 ffff ffc7 addil #-57,%d6 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 48460: 2e3c 0004 88b8 movel #297144,%d7 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 48466: 2a3c 0004 83b4 movel #295860,%d5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4846c: 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 */ ) { 4846e: 246e 000c moveal %fp@(12),%a2 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 48472: 4eb9 0004 cdac jsr 4cdac int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 48478: 2a6e 0010 moveal %fp@(16),%a5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4847c: 588f addql #4,%sp 4847e: 2800 movel %d0,%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 48480: 2652 moveal %a2@,%a3 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 48482: 486e fffc pea %fp@(-4) 48486: 2f06 movel %d6,%sp@- 48488: 2f04 movel %d4,%sp@- 4848a: 4874 2800 pea %a4@(00000000,%d2:l) 4848e: 4eb9 0004 8948 jsr 48948 pathlen -= len; 48494: 262e fffc movel %fp@(-4),%d3 i += len; if ( !pathloc->node_access ) 48498: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 4849c: 9883 subl %d3,%d4 i += len; if ( !pathloc->node_access ) 4849e: 2052 moveal %a2@,%a0 484a0: 4a88 tstl %a0 484a2: 6700 016e beqw 48612 <== ALWAYS TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 484a6: 4a80 tstl %d0 484a8: 671a beqs 484c4 if ( node->type == IMFS_DIRECTORY ) 484aa: 7201 moveq #1,%d1 484ac: b2ab 0048 cmpl %a3@(72),%d1 484b0: 6612 bnes 484c4 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 484b2: 123c 0040 moveb #64,%d1 484b6: c2a8 002e andl %a0@(46),%d1 484ba: 2241 moveal %d1,%a1 484bc: 7240 moveq #64,%d1 484be: b289 cmpl %a1,%d1 484c0: 6600 01b0 bnew 48672 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 484c4: d483 addl %d3,%d2 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 484c6: 2648 moveal %a0,%a3 switch( type ) { 484c8: 7202 moveq #2,%d1 484ca: b280 cmpl %d0,%d1 484cc: 671c beqs 484ea 484ce: 6508 bcss 484d8 484d0: 4a80 tstl %d0 484d2: 6700 0100 beqw 485d4 <== ALWAYS TAKEN 484d6: 60aa bras 48482 <== ALWAYS TAKEN 484d8: 7203 moveq #3,%d1 484da: b280 cmpl %d0,%d1 484dc: 675e beqs 4853c 484de: 123c 0004 moveb #4,%d1 484e2: b280 cmpl %d0,%d1 484e4: 669c bnes 48482 <== ALWAYS TAKEN 484e6: 6000 00fe braw 485e6 <== 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 ) 484ea: 2279 0005 a364 moveal 5a364 ,%a1 484f0: b1e9 0018 cmpal %a1@(24),%a0 484f4: 678c beqs 48482 <== ALWAYS TAKEN /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 484f6: 226a 0010 moveal %a2@(16),%a1 484fa: b1e9 001c cmpal %a1@(28),%a0 484fe: 662e bnes 4852e if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 48500: 4878 0014 pea 14 48504: 280e movel %fp,%d4 48506: 4869 0008 pea %a1@(8) 4850a: 0684 ffff ffe8 addil #-24,%d4 48510: 47f9 0004 c200 lea 4c200 ,%a3 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 48516: 9483 subl %d3,%d2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 48518: 2f04 movel %d4,%sp@- 4851a: 4e93 jsr %a3@ *pathloc = newloc; 4851c: 4878 0014 pea 14 48520: 2f04 movel %d4,%sp@- 48522: 2f0a movel %a2,%sp@- 48524: 4e93 jsr %a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 48526: 2f0d movel %a5,%sp@- 48528: 206a 000c moveal %a2@(12),%a0 4852c: 607a bras 485a8 <== ALWAYS TAKEN } } else { if ( !node->Parent ) 4852e: 2668 0008 moveal %a0@(8),%a3 48532: 4a8b tstl %a3 48534: 6600 0098 bnew 485ce 48538: 6000 00d8 braw 48612 <== ALWAYS TAKEN pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4853c: 2028 0048 movel %a0@(72),%d0 48540: 7203 moveq #3,%d1 48542: b280 cmpl %d0,%d1 48544: 6706 beqs 4854c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 48546: 7204 moveq #4,%d1 48548: b280 cmpl %d0,%d1 4854a: 6614 bnes 48560 result = IMFS_evaluate_link( pathloc, 0 ); 4854c: 42a7 clrl %sp@- 4854e: 2045 moveal %d5,%a0 48550: 2f0a movel %a2,%sp@- 48552: 4e90 jsr %a0@ if ( result == -1 ) 48554: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 48556: 2200 movel %d0,%d1 if ( result == -1 ) 48558: 70ff moveq #-1,%d0 4855a: b081 cmpl %d1,%d0 4855c: 6700 0108 beqw 48666 <== ALWAYS TAKEN return -1; } node = pathloc->node_access; 48560: 2052 moveal %a2@,%a0 if ( !node ) 48562: 4a88 tstl %a0 48564: 6700 00de beqw 48644 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 48568: 7001 moveq #1,%d0 4856a: b0a8 0048 cmpl %a0@(72),%d0 4856e: 6600 00d4 bnew 48644 /* * 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 ) { 48572: 2268 0058 moveal %a0@(88),%a1 48576: 4a89 tstl %a1 48578: 6744 beqs 485be newloc = node->info.directory.mt_fs->mt_fs_root; 4857a: 4878 0014 pea 14 4857e: 260e movel %fp,%d3 48580: 4869 001c pea %a1@(28) 48584: 0683 ffff ffe8 addil #-24,%d3 4858a: 47f9 0004 c200 lea 4c200 ,%a3 48590: 2f03 movel %d3,%sp@- 48592: 4e93 jsr %a3@ *pathloc = newloc; 48594: 4878 0014 pea 14 48598: 2f03 movel %d3,%sp@- 4859a: 2f0a movel %a2,%sp@- 4859c: 4e93 jsr %a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4859e: 206a 000c moveal %a2@(12),%a0 485a2: 94ae fffc subl %fp@(-4),%d2 485a6: 2f0d movel %a5,%sp@- 485a8: 2f0a movel %a2,%sp@- 485aa: 4874 2800 pea %a4@(00000000,%d2:l) 485ae: 2068 0004 moveal %a0@(4),%a0 485b2: 4e90 jsr %a0@ 485b4: 4fef 0024 lea %sp@(36),%sp 485b8: 2200 movel %d0,%d1 485ba: 6000 00aa braw 48666 <== ALWAYS TAKEN /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 485be: 2f06 movel %d6,%sp@- 485c0: 2f08 movel %a0,%sp@- 485c2: 2047 moveal %d7,%a0 485c4: 4e90 jsr %a0@ /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 485c6: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 485c8: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 485ca: 4a80 tstl %d0 485cc: 6728 beqs 485f6 done = true; else pathloc->node_access = node; 485ce: 248b movel %a3,%a2@ 485d0: 6000 feb0 braw 48482 <== ALWAYS TAKEN break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 485d4: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 485da: 7c11 moveq #17,%d6 485dc: 72ff moveq #-1,%d1 485de: 2040 moveal %d0,%a0 485e0: 2086 movel %d6,%a0@ 485e2: 6000 0082 braw 48666 <== ALWAYS TAKEN break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 485e6: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 485ec: 7a5b moveq #91,%d5 485ee: 72ff moveq #-1,%d1 485f0: 2040 moveal %d0,%a0 485f2: 2085 movel %d5,%a0@ 485f4: 6070 bras 48666 <== ALWAYS TAKEN case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 485f6: 2002 movel %d2,%d0 485f8: 90ae fffc subl %fp@(-4),%d0 485fc: d08c addl %a4,%d0 485fe: d9c2 addal %d2,%a4 48600: 2a80 movel %d0,%a5@ /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 48602: 601e bras 48622 <== ALWAYS TAKEN if ( !IMFS_is_separator( path[ i ] ) ) 48604: 702f moveq #47,%d0 48606: b081 cmpl %d1,%d0 48608: 6718 beqs 48622 4860a: 103c 005c moveb #92,%d0 4860e: b081 cmpl %d1,%d0 48610: 6710 beqs 48622 rtems_set_errno_and_return_minus_one( ENOENT ); 48612: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 48618: 7802 moveq #2,%d4 4861a: 72ff moveq #-1,%d1 4861c: 2040 moveal %d0,%a0 4861e: 2084 movel %d4,%a0@ 48620: 6044 bras 48666 <== ALWAYS TAKEN /* * 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++) { 48622: 1014 moveb %a4@,%d0 if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 48624: 528c addql #1,%a4 * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) 48626: 1200 moveb %d0,%d1 48628: 49c1 extbl %d1 /* * 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++) { 4862a: 4a00 tstb %d0 4862c: 66d6 bnes 48604 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4862e: 2f0a movel %a2,%sp@- 48630: 4eb9 0004 7ff0 jsr 47ff0 /* * The returned node must be a directory */ node = pathloc->node_access; 48636: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 48638: 2200 movel %d0,%d1 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4863a: 588f addql #4,%sp 4863c: 7001 moveq #1,%d0 4863e: b0a8 0048 cmpl %a0@(72),%d0 48642: 6710 beqs 48654 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 48644: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 4864a: 7614 moveq #20,%d3 4864c: 72ff moveq #-1,%d1 4864e: 2040 moveal %d0,%a0 48650: 2083 movel %d3,%a0@ 48652: 6012 bras 48666 <== 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 ) 48654: 2028 002e movel %a0@(46),%d0 48658: 0280 0000 00c0 andil #192,%d0 4865e: 0c80 0000 00c0 cmpil #192,%d0 48664: 660c bnes 48672 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 48666: 2001 movel %d1,%d0 48668: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 4866e: 4e5e unlk %fp 48670: 4e75 rts /* * 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 ); 48672: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 48678: 740d moveq #13,%d2 4867a: 72ff moveq #-1,%d1 4867c: 2040 moveal %d0,%a0 4867e: 2082 movel %d2,%a0@ 48680: 60e4 bras 48666 <== ALWAYS TAKEN ... 00048080 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 48080: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 48082: 4e56 0000 linkw %fp,#0 48086: 2f0a movel %a2,%sp@- 48088: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 4808c: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4808e: b0a8 0048 cmpl %a0@(72),%d0 48092: 670c beqs 480a0 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); 48094: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4809a: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 480a0: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 480a4: 2f0a movel %a2,%sp@- 480a6: 4eb9 0004 7ff0 jsr 47ff0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 480ac: 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; 480b0: 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 ) 480b2: 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; 480b4: 2052 moveal %a2@,%a0 480b6: 2200 movel %d0,%d1 480b8: c2a8 002e andl %a0@(46),%d1 480bc: b081 cmpl %d1,%d0 480be: 660a bnes 480ca <== ALWAYS TAKEN 480c0: 4280 clrl %d0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 480c2: 246e fffc moveal %fp@(-4),%a2 480c6: 4e5e unlk %fp 480c8: 4e75 rts /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 480ca: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 480d0: 720d moveq #13,%d1 <== NOT EXECUTED 480d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 480d4: 70ff moveq #-1,%d0 <== NOT EXECUTED 480d6: 2081 movel %d1,%a0@ <== NOT EXECUTED 480d8: 60e8 bras 480c2 <== NOT EXECUTED 000483b4 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 483b4: 4e56 ffec linkw %fp,#-20 483b8: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 483bc: 246e 0008 moveal %fp@(8),%a2 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 ); 483c0: 4bf9 0004 80da lea 480da ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 483c6: 49f9 0004 8080 lea 48080 ,%a4 int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 483cc: 242e 000c movel %fp@(12),%d2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 483d0: 2079 0005 a364 moveal 5a364 ,%a0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 483d6: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 483d8: 3028 0030 movew %a0@(48),%d0 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 483dc: 2652 moveal %a2@,%a3 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 483de: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 483e0: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 483e2: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 483e6: 7005 moveq #5,%d0 483e8: b081 cmpl %d1,%d0 483ea: 6416 bccs 48402 rtems_filesystem_link_counts = 0; 483ec: 4241 clrw %d1 483ee: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 483f2: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 483f8: 725c moveq #92,%d1 483fa: 2040 moveal %d0,%a0 483fc: 70ff moveq #-1,%d0 483fe: 2081 movel %d1,%a0@ 48400: 603e bras 48440 <== ALWAYS TAKEN /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 48402: 202b 0048 movel %a3@(72),%d0 48406: 7203 moveq #3,%d1 48408: b280 cmpl %d0,%d1 4840a: 6608 bnes 48414 result = IMFS_evaluate_hard_link( node, flags ); 4840c: 2f02 movel %d2,%sp@- 4840e: 2f0a movel %a2,%sp@- 48410: 4e94 jsr %a4@ 48412: 600c bras 48420 <== ALWAYS TAKEN else if (jnode->type == IMFS_SYM_LINK ) 48414: 7204 moveq #4,%d1 48416: b280 cmpl %d0,%d1 48418: 660c bnes 48426 result = IMFS_evaluate_sym_link( node, flags ); 4841a: 2f02 movel %d2,%sp@- 4841c: 2f0a movel %a2,%sp@- 4841e: 4e95 jsr %a5@ 48420: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 48422: 4a80 tstl %d0 48424: 660e bnes 48434 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 48426: 202b 0048 movel %a3@(72),%d0 4842a: 7201 moveq #1,%d1 4842c: 5780 subql #3,%d0 4842e: b280 cmpl %d0,%d1 48430: 649e bccs 483d0 48432: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 48434: 2079 0005 a364 moveal 5a364 ,%a0 4843a: 4241 clrw %d1 4843c: 3141 0030 movew %d1,%a0@(48) return result; } 48440: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48446: 4e5e unlk %fp 48448: 4e75 rts 0004805e : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4805e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 48062: 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 ) 48066: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED return 1; return 0; } 4806a: 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 ) 4806c: ed88 lsll #6,%d0 <== NOT EXECUTED 4806e: 2050 moveal %a0@,%a0 <== NOT EXECUTED 48070: 2200 movel %d0,%d1 <== NOT EXECUTED 48072: c2a8 002e andl %a0@(46),%d1 <== NOT EXECUTED 48076: b081 cmpl %d1,%d0 <== NOT EXECUTED 48078: 57c0 seq %d0 <== NOT EXECUTED 4807a: 49c0 extbl %d0 <== NOT EXECUTED return 1; return 0; } 4807c: 4480 negl %d0 <== NOT EXECUTED 4807e: 4e75 rts 000480da : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 480da: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 480dc: 4e56 fff0 linkw %fp,#-16 480e0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 480e4: 246e 0008 moveal %fp@(8),%a2 480e8: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 480ec: 2652 moveal %a2@,%a3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 480ee: b0ab 0048 cmpl %a3@(72),%d0 480f2: 6708 beqs 480fc <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); 480f4: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 480fa: 600c bras 48108 <== NOT EXECUTED if ( !jnode->Parent ) 480fc: 202b 0008 movel %a3@(8),%d0 48100: 660c bnes 4810e <== NEVER TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 48102: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 48108: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 4810e: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 48110: 206b 004c moveal %a3@(76),%a0 48114: 762f moveq #47,%d3 48116: 1010 moveb %a0@,%d0 48118: 1200 moveb %d0,%d1 4811a: 49c1 extbl %d1 4811c: b681 cmpl %d1,%d3 4811e: 6710 beqs 48130 48120: 163c 005c moveb #92,%d3 48124: b681 cmpl %d1,%d3 48126: 6708 beqs 48130 <== ALWAYS TAKEN 48128: 4a00 tstb %d0 4812a: 6704 beqs 48130 <== ALWAYS TAKEN 4812c: 4280 clrl %d0 4812e: 601e bras 4814e <== ALWAYS TAKEN 48130: 4878 0014 pea 14 48134: 2079 0005 a364 moveal 5a364 ,%a0 4813a: 41e8 0018 lea %a0@(24),%a0 4813e: 2f08 movel %a0,%sp@- 48140: 2f0a movel %a2,%sp@- 48142: 4eb9 0004 c200 jsr 4c200 48148: 4fef 000c lea %sp@(12),%sp 4814c: 7001 moveq #1,%d0 * 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] ), 4814e: 266b 004c moveal %a3@(76),%a3 48152: d7c0 addal %d0,%a3 48154: 2f0b movel %a3,%sp@- 48156: 4eb9 0004 cdac jsr 4cdac /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4815c: 2e8a movel %a2,%sp@ 4815e: 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 ) 48160: ed8a lsll #6,%d2 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 48162: 2f00 movel %d0,%sp@- 48164: 2f0b movel %a3,%sp@- 48166: 4eb9 0004 81a4 jsr 481a4 4816c: 2640 moveal %d0,%a3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 4816e: 2f0a movel %a2,%sp@- 48170: 4eb9 0004 7ff0 jsr 47ff0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 48176: 2052 moveal %a2@,%a0 48178: 2002 movel %d2,%d0 4817a: 4fef 0014 lea %sp@(20),%sp 4817e: c0a8 002e andl %a0@(46),%d0 48182: b480 cmpl %d0,%d2 48184: 660c bnes 48192 <== ALWAYS TAKEN if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 48186: 200b movel %a3,%d0 48188: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4818e: 4e5e unlk %fp 48190: 4e75 rts /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 48192: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48198: 740d moveq #13,%d2 <== NOT EXECUTED 4819a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4819c: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 481a0: 2082 movel %d2,%a0@ <== NOT EXECUTED 481a2: 60e2 bras 48186 <== NOT EXECUTED 00048812 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 48812: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 48816: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4881a: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4881e: 246b 0038 moveal %a3@(56),%a2 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 48822: 2f0b movel %a3,%sp@- <== NOT EXECUTED 48824: 486a 004c pea %a2@(76) <== NOT EXECUTED 48828: 4eb9 0004 a7ea jsr 4a7ea <== NOT EXECUTED if (! err) { 4882e: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 48830: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 48832: 662a bnes 4885e <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 48834: 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) 4883a: 2f0a movel %a2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 4883c: c1ab 0014 andl %d0,%a3@(20) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 48840: 4eb9 0004 90b2 jsr 490b2 <== NOT EXECUTED 48846: 588f addql #4,%sp <== NOT EXECUTED 48848: 4a80 tstl %d0 <== NOT EXECUTED 4884a: 6624 bnes 48870 <== NOT EXECUTED 4884c: 4a6a 0032 tstw %a2@(50) <== NOT EXECUTED 48850: 661e bnes 48870 <== NOT EXECUTED free(jnode); 48852: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48854: 4eb9 0004 8e80 jsr 48e80 <== NOT EXECUTED 4885a: 588f addql #4,%sp <== NOT EXECUTED 4885c: 6012 bras 48870 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4885e: 4a80 tstl %d0 <== NOT EXECUTED 48860: 6c0e bges 48870 <== NOT EXECUTED 48862: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48868: 4482 negl %d2 <== NOT EXECUTED 4886a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4886c: 2082 movel %d2,%a0@ <== NOT EXECUTED 4886e: 74ff moveq #-1,%d2 <== NOT EXECUTED } 48870: 2002 movel %d2,%d0 <== NOT EXECUTED 48872: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 48878: 4e5e unlk %fp <== NOT EXECUTED 4887a: 4e75 rts 000486da : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 486da: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 486de: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 486e2: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 486e6: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 486ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 486ec: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 486f2: 6620 bnes 48714 <== NOT EXECUTED if (buffer == NULL) 486f4: 4a89 tstl %a1 <== NOT EXECUTED 486f6: 6604 bnes 486fc <== NOT EXECUTED 486f8: 74f2 moveq #-14,%d2 <== NOT EXECUTED 486fa: 6034 bras 48730 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 486fc: 4a91 tstl %a1@ <== NOT EXECUTED 486fe: 670a beqs 4870a <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 48700: 7001 moveq #1,%d0 <== NOT EXECUTED 48702: 4282 clrl %d2 <== NOT EXECUTED 48704: 81a8 0014 orl %d0,%a0@(20) <== NOT EXECUTED 48708: 6034 bras 4873e <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4870a: 70fe moveq #-2,%d0 <== NOT EXECUTED 4870c: 4282 clrl %d2 <== NOT EXECUTED 4870e: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED 48712: 602a bras 4873e <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 48714: 2f08 movel %a0,%sp@- <== NOT EXECUTED 48716: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 4871a: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4871c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4871e: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 48722: 4eb9 0004 a466 jsr 4a466 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 48728: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 4872c: 2400 movel %d0,%d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4872e: 6c0e bges 4873e <== NOT EXECUTED 48730: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48736: 4482 negl %d2 <== NOT EXECUTED 48738: 2040 moveal %d0,%a0 <== NOT EXECUTED 4873a: 2082 movel %d2,%a0@ <== NOT EXECUTED 4873c: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4873e: 2002 movel %d2,%d0 <== NOT EXECUTED 48740: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48744: 4e5e unlk %fp <== NOT EXECUTED 48746: 4e75 rts 00048684 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 48684: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 48688: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4868c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 48690: 2f08 movel %a0,%sp@- <== NOT EXECUTED 48692: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 48696: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 4869a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4869e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 486a2: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 486a6: 4eb9 0004 a40c jsr 4a40c <== NOT EXECUTED IMFS_FIFO_RETURN(err); 486ac: 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); 486b0: 2800 movel %d0,%d4 <== NOT EXECUTED 486b2: 2600 movel %d0,%d3 <== NOT EXECUTED 486b4: 5bc2 smi %d2 <== NOT EXECUTED 486b6: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 486b8: 4a82 tstl %d2 <== NOT EXECUTED 486ba: 6a10 bpls 486cc <== NOT EXECUTED 486bc: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 486c2: 4484 negl %d4 <== NOT EXECUTED 486c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 486c6: 74ff moveq #-1,%d2 <== NOT EXECUTED 486c8: 76ff moveq #-1,%d3 <== NOT EXECUTED 486ca: 2084 movel %d4,%a0@ <== NOT EXECUTED } 486cc: 2203 movel %d3,%d1 <== NOT EXECUTED 486ce: 2002 movel %d2,%d0 <== NOT EXECUTED 486d0: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 486d6: 4e5e unlk %fp <== NOT EXECUTED 486d8: 4e75 rts 0004887c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4887c: 4e56 0000 linkw %fp,#0 48880: 206e 0008 moveal %fp@(8),%a0 48884: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 48886: 2f08 movel %a0,%sp@- 48888: 2068 0038 moveal %a0@(56),%a0 4888c: 41e8 004c lea %a0@(76),%a0 48890: 2f08 movel %a0,%sp@- 48892: 4eb9 0004 a8b2 jsr 4a8b2 IMFS_FIFO_RETURN(err); 48898: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4889a: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 4889c: 6c0e bges 488ac <== ALWAYS TAKEN 4889e: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 488a4: 4482 negl %d2 488a6: 2040 moveal %d0,%a0 488a8: 2082 movel %d2,%a0@ 488aa: 74ff moveq #-1,%d2 } 488ac: 2002 movel %d2,%d0 488ae: 242e fffc movel %fp@(-4),%d2 488b2: 4e5e unlk %fp 488b4: 4e75 rts ... 000487b0 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 487b0: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 487b4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 487b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 487ba: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 487bc: 2f08 movel %a0,%sp@- <== NOT EXECUTED 487be: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 487c2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 487c6: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 487ca: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 487ce: 4eb9 0004 a63a jsr 4a63a <== NOT EXECUTED if (err > 0) 487d4: 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); 487d8: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 487da: 6f16 bles 487f2 <== NOT EXECUTED IMFS_update_atime(jnode); 487dc: 42a7 clrl %sp@- <== NOT EXECUTED 487de: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 487e2: 4eb9 0004 8fe0 jsr 48fe0 <== NOT EXECUTED 487e8: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 487ee: 508f addql #8,%sp <== NOT EXECUTED 487f0: 6012 bras 48804 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 487f2: 4a80 tstl %d0 <== NOT EXECUTED 487f4: 670e beqs 48804 <== NOT EXECUTED 487f6: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 487fc: 4482 negl %d2 <== NOT EXECUTED 487fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 48800: 2082 movel %d2,%a0@ <== NOT EXECUTED 48802: 74ff moveq #-1,%d2 <== NOT EXECUTED } 48804: 2002 movel %d2,%d0 <== NOT EXECUTED 48806: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4880a: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4880e: 4e5e unlk %fp <== NOT EXECUTED 48810: 4e75 rts 00048748 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 48748: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 4874c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 48750: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48752: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 48754: 2f08 movel %a0,%sp@- <== NOT EXECUTED 48756: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4875a: 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; 4875e: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 48762: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 48766: 4eb9 0004 a4c6 jsr 4a4c6 <== NOT EXECUTED if (err > 0) { 4876c: 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); 48770: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 48772: 6f1c bles 48790 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 48774: 42a7 clrl %sp@- <== NOT EXECUTED 48776: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4877a: 4eb9 0004 8fe0 jsr 48fe0 <== NOT EXECUTED 48780: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 48784: 508f addql #8,%sp <== NOT EXECUTED 48786: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 4878a: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED 4878e: 6012 bras 487a2 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 48790: 4a80 tstl %d0 <== NOT EXECUTED 48792: 670e beqs 487a2 <== NOT EXECUTED 48794: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 4879a: 4482 negl %d2 <== NOT EXECUTED 4879c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4879e: 2082 movel %d2,%a0@ <== NOT EXECUTED 487a0: 74ff moveq #-1,%d2 <== NOT EXECUTED } 487a2: 2002 movel %d2,%d0 <== NOT EXECUTED 487a4: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 487a8: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 487ac: 4e5e unlk %fp <== NOT EXECUTED 487ae: 4e75 rts 000488b8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 488b8: 4e56 fff0 linkw %fp,#-16 488bc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 488c0: 246e 0008 moveal %fp@(8),%a2 488c4: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 488c8: 4a8a tstl %a2 488ca: 661c bnes 488e8 <== NEVER TAKEN 488cc: 4879 0005 9bfd pea 59bfd <_global_impure_ptr+0x1b1> <== NOT EXECUTED 488d2: 4879 0005 95df pea 595df <__FUNCTION__.5360> <== NOT EXECUTED 488d8: 4878 002a pea 2a <== NOT EXECUTED 488dc: 4879 0005 958e pea 5958e <== NOT EXECUTED 488e2: 4eb9 0004 8cdc jsr 48cdc <__assert_func> <== NOT EXECUTED if ( !name ) 488e8: 4a82 tstl %d2 488ea: 674e beqs 4893a <== ALWAYS TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 488ec: 4879 0005 95da pea 595da 488f2: 49f9 0004 c8e8 lea 4c8e8 ,%a4 488f8: 2f02 movel %d2,%sp@- 488fa: 4e94 jsr %a4@ 488fc: 508f addql #8,%sp 488fe: 4a80 tstl %d0 48900: 673a beqs 4893c <== ALWAYS TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 48902: 4879 0005 95dc pea 595dc 48908: 2f02 movel %d2,%sp@- 4890a: 4e94 jsr %a4@ 4890c: 508f addql #8,%sp 4890e: 4a80 tstl %d0 48910: 6606 bnes 48918 <== NEVER TAKEN return directory->Parent; 48912: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 48916: 6024 bras 4893c <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 48918: 266a 004c moveal %a2@(76),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4891c: 45ea 0050 lea %a2@(80),%a2 48920: 6014 bras 48936 <== ALWAYS TAKEN !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 ) ) 48922: 486b 000c pea %a3@(12) 48926: 2f02 movel %d2,%sp@- 48928: 4e94 jsr %a4@ 4892a: 508f addql #8,%sp 4892c: 4a80 tstl %d0 4892e: 6604 bnes 48934 48930: 244b moveal %a3,%a2 48932: 6008 bras 4893c <== ALWAYS TAKEN 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 ) { 48934: 2653 moveal %a3@,%a3 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 48936: b5cb cmpal %a3,%a2 48938: 66e8 bnes 48922 4893a: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4893c: 200a movel %a2,%d0 4893e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48944: 4e5e unlk %fp 48946: 4e75 rts 0004d1a4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d1a4: 4e56 ffd8 linkw %fp,#-40 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4d1a8: 200e movel %fp,%d0 4d1aa: 0680 ffff ffec addil #-20,%d0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d1b0: 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; 4d1b4: 4878 0014 pea 14 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4d1b8: 2400 movel %d0,%d2 4d1ba: 4bf9 0004 c8d0 lea 4c8d0 ,%a5 if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4d1c0: 49f9 0004 2d64 lea 42d64 ,%a4 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d1c6: 266e 0008 moveal %fp@(8),%a3 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4d1ca: 486b 001c pea %a3@(28) /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 4d1ce: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 4d1d2: 2f00 movel %d0,%sp@- 4d1d4: 4eb9 0005 0c80 jsr 50c80 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4d1da: 4fef 000c lea %sp@(12),%sp 4d1de: 42ab 001c clrl %a3@(28) do { next = jnode->Parent; 4d1e2: 266a 0008 moveal %a2@(8),%a3 loc.node_access = (void *)jnode; 4d1e6: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4d1ea: 2f02 movel %d2,%sp@- 4d1ec: 4e95 jsr %a5@ if ( jnode->type != IMFS_DIRECTORY ) { 4d1ee: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d1f0: 200a movel %a2,%d0 4d1f2: 0680 0000 0050 addil #80,%d0 4d1f8: 7201 moveq #1,%d1 4d1fa: b2aa 0048 cmpl %a2@(72),%d1 4d1fe: 6606 bnes 4d206 4d200: b0aa 004c cmpl %a2@(76),%d0 4d204: 660e bnes 4d214 <== ALWAYS TAKEN result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4d206: 2f02 movel %d2,%sp@- 4d208: 42a7 clrl %sp@- 4d20a: 4e94 jsr %a4@ if (result != 0) 4d20c: 508f addql #8,%sp 4d20e: 4a80 tstl %d0 4d210: 6626 bnes 4d238 <== ALWAYS TAKEN 4d212: 244b moveal %a3,%a2 return -1; jnode = next; } if ( jnode != NULL ) { 4d214: 4a8a tstl %a2 4d216: 6724 beqs 4d23c if ( jnode->type == IMFS_DIRECTORY ) { 4d218: 7001 moveq #1,%d0 4d21a: b0aa 0048 cmpl %a2@(72),%d0 4d21e: 66c2 bnes 4d1e2 <== ALWAYS TAKEN 4d220: 200a movel %a2,%d0 4d222: 0680 0000 0050 addil #80,%d0 4d228: b0aa 004c cmpl %a2@(76),%d0 4d22c: 67b4 beqs 4d1e2 <== ALWAYS TAKEN if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4d22e: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4d232: 4a8a tstl %a2 4d234: 66ac bnes 4d1e2 4d236: 6004 bras 4d23c <== NOT EXECUTED 4d238: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d23a: 6002 bras 4d23e <== NOT EXECUTED 4d23c: 4280 clrl %d0 return 0; } 4d23e: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4d244: 4e5e unlk %fp 4d246: 4e75 rts 00048948 : register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 48948: 4280 clrl %d0 const char *path, int pathlen, char *token, int *token_len ) { 4894a: 4e56 fff0 linkw %fp,#-16 4894e: 226e 0008 moveal %fp@(8),%a1 48952: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 48956: 206e 000c moveal %fp@(12),%a0 4895a: 246e 0010 moveal %fp@(16),%a2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4895e: 1211 moveb %a1@,%d1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 48960: 6016 bras 48978 <== ALWAYS TAKEN token[i] = c; 48962: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) if ( i == IMFS_NAME_MAX ) 48966: 7220 moveq #32,%d1 48968: b280 cmpl %d0,%d1 4896a: 6606 bnes 48972 4896c: 7404 moveq #4,%d2 4896e: 6000 0084 braw 489f4 <== ALWAYS TAKEN return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 48972: 5280 addql #1,%d0 48974: 1231 0800 moveb %a1@(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) ) { 48978: 762f moveq #47,%d3 4897a: 1401 moveb %d1,%d2 4897c: 49c2 extbl %d2 4897e: b682 cmpl %d2,%d3 48980: 6710 beqs 48992 48982: 163c 005c moveb #92,%d3 48986: b682 cmpl %d2,%d3 48988: 6708 beqs 48992 4898a: 4a01 tstb %d1 4898c: 6704 beqs 48992 4898e: b1c0 cmpal %d0,%a0 48990: 6ed0 bgts 48962 /* * Copy a seperator into token. */ if ( i == 0 ) { 48992: 4a80 tstl %d0 48994: 6610 bnes 489a6 token[i] = c; 48996: 1481 moveb %d1,%a2@ if ( (token[i] != '\0') && pathlen ) { 48998: 6720 beqs 489ba 4899a: 4a88 tstl %a0 4899c: 671c beqs 489ba 4899e: 7401 moveq #1,%d2 489a0: 103c 0001 moveb #1,%d0 489a4: 6016 bras 489bc <== ALWAYS TAKEN i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 489a6: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 489aa: 6604 bnes 489b0 <== NEVER TAKEN 489ac: 7403 moveq #3,%d2 <== NOT EXECUTED 489ae: 600c bras 489bc <== NOT EXECUTED token[i] = '\0'; 489b0: 7403 moveq #3,%d2 489b2: 4201 clrb %d1 489b4: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) 489b8: 6002 bras 489bc <== ALWAYS TAKEN 489ba: 4282 clrl %d2 /* * Set token_len to the number of characters copied. */ *token_len = i; 489bc: 206e 0014 moveal %fp@(20),%a0 /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 489c0: 7603 moveq #3,%d3 /* * Set token_len to the number of characters copied. */ *token_len = i; 489c2: 2080 movel %d0,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 489c4: b682 cmpl %d2,%d3 489c6: 662c bnes 489f4 if ( strcmp( token, "..") == 0 ) 489c8: 4879 0005 95f6 pea 595f6 <__FUNCTION__.5360+0x17> 489ce: 47f9 0004 c8e8 lea 4c8e8 ,%a3 489d4: 2f0a movel %a2,%sp@- 489d6: 4e93 jsr %a3@ 489d8: 508f addql #8,%sp 489da: 4a80 tstl %d0 489dc: 6604 bnes 489e2 489de: 7402 moveq #2,%d2 489e0: 6012 bras 489f4 <== ALWAYS TAKEN type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 489e2: 4879 0005 95f7 pea 595f7 <__FUNCTION__.5360+0x18> 489e8: 2f0a movel %a2,%sp@- 489ea: 4e93 jsr %a3@ 489ec: 508f addql #8,%sp 489ee: 4a80 tstl %d0 489f0: 6602 bnes 489f4 489f2: 7401 moveq #1,%d2 type = IMFS_CURRENT_DIR; } return type; } 489f4: 2002 movel %d2,%d0 489f6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 489fc: 4e5e unlk %fp 489fe: 4e75 rts 00048a00 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 48a00: 4281 clrl %d1 48a02: 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 ) { 48a04: 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, 48a08: 2079 0005 a258 moveal 5a258 ,%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 ) { 48a0e: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48a12: 246e 0008 moveal %fp@(8),%a2 48a16: 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) { 48a1a: 5281 addql #1,%d1 48a1c: b1c0 cmpal %d0,%a0 48a1e: 670e beqs 48a2e 48a20: 7606 moveq #6,%d3 48a22: d080 addl %d0,%d0 48a24: b681 cmpl %d1,%d3 48a26: 66f2 bnes 48a1a <== NEVER TAKEN 48a28: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 48a2e: 23c0 0005 b1e0 movel %d0,5b1e0 /* * 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(); 48a34: 4eb9 0004 ac5c jsr 4ac5c 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; 48a3a: 4878 0030 pea 30 48a3e: 4879 0005 97b8 pea 597b8 48a44: 486a 0038 pea %a2@(56) * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 48a48: 256e 000c 0028 movel %fp@(12),%a2@(40) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 48a4e: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 48a52: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 48a56: 4eb9 0004 c200 jsr 4c200 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 48a5c: 4878 000c pea c 48a60: 4878 0001 pea 1 48a64: 4eb9 0004 8da0 jsr 48da0 if ( !fs_info ) { 48a6a: 4fef 0014 lea %sp@(20),%sp temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 48a6e: 2040 moveal %d0,%a0 if ( !fs_info ) { 48a70: 4a80 tstl %d0 48a72: 661c bnes 48a90 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); 48a74: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 48a78: 4eb9 0004 8e80 jsr 48e80 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 48a7e: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48a84: 588f addql #4,%sp <== NOT EXECUTED 48a86: 720c moveq #12,%d1 <== NOT EXECUTED 48a88: 2040 moveal %d0,%a0 <== NOT EXECUTED 48a8a: 70ff moveq #-1,%d0 <== NOT EXECUTED 48a8c: 2081 movel %d1,%a0@ <== NOT EXECUTED 48a8e: 6024 bras 48ab4 <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 48a90: 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; 48a92: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 48a96: 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; 48a98: 7001 moveq #1,%d0 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 48a9a: 216e 0010 0004 movel %fp@(16),%a0@(4) fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 48aa0: 2340 0034 movel %d0,%a1@(52) * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 48aa4: 2142 0008 movel %d2,%a0@(8) 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; 48aa8: 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(); 48aac: 4eb9 0004 a416 jsr 4a416 48ab2: 4280 clrl %d0 return 0; } 48ab4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48aba: 4e5e unlk %fp 48abc: 4e75 rts ... 00042a44 : /* * 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 ) 42a44: 4280 clrl %d0 42a46: 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 */ ) { 42a48: 4e56 ffbc linkw %fp,#-68 42a4c: 206e 0008 moveal %fp@(8),%a0 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42a50: 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 */ ) { 42a52: 2f03 movel %d3,%sp@- 42a54: 262e 0010 movel %fp@(16),%d3 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42a58: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 42a5c: 3028 0032 movew %a0@(50),%d0 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 42a60: 2f02 movel %d2,%sp@- /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 42a62: b280 cmpl %d0,%d1 42a64: 6410 bccs 42a76 rtems_set_errno_and_return_minus_one( EMLINK ); 42a66: 4eb9 0005 0460 jsr 50460 <__errno> 42a6c: 741f moveq #31,%d2 42a6e: 72ff moveq #-1,%d1 42a70: 2040 moveal %d0,%a0 42a72: 2082 movel %d2,%a0@ 42a74: 607c bras 42af2 <== ALWAYS TAKEN /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 42a76: 2f03 movel %d3,%sp@- 42a78: 240e movel %fp,%d2 42a7a: 0682 ffff ffbf addil #-65,%d2 42a80: 4eb9 0005 17dc jsr 517dc 42a86: 588f addql #4,%sp 42a88: 486e fffc pea %fp@(-4) 42a8c: 2f02 movel %d2,%sp@- 42a8e: 2f00 movel %d0,%sp@- 42a90: 2f03 movel %d3,%sp@- 42a92: 4eb9 0004 d2d8 jsr 4d2d8 * 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( 42a98: 486e ffe0 pea %fp@(-32) 42a9c: 2f3c 0000 a1ff movel #41471,%sp@- 42aa2: 2f02 movel %d2,%sp@- 42aa4: 4878 0003 pea 3 42aa8: 2f2e 000c movel %fp@(12),%sp@- 42aac: 4eb9 0004 c7c2 jsr 4c7c2 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 42ab2: 4fef 0024 lea %sp@(36),%sp 42ab6: 4a80 tstl %d0 42ab8: 6610 bnes 42aca <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 42aba: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 42ac0: 72ff moveq #-1,%d1 <== NOT EXECUTED 42ac2: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ac4: 700c moveq #12,%d0 <== NOT EXECUTED 42ac6: 2080 movel %d0,%a0@ <== NOT EXECUTED 42ac8: 6028 bras 42af2 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 42aca: 206e ffe0 moveal %fp@(-32),%a0 42ace: 3028 0032 movew %a0@(50),%d0 42ad2: 5280 addql #1,%d0 42ad4: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 42ad8: 42a7 clrl %sp@- 42ada: 486e fff4 pea %fp@(-12) 42ade: 4eb9 0004 3554 jsr 43554 42ae4: 206e ffe0 moveal %fp@(-32),%a0 return 0; 42ae8: 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 ); 42aea: 4281 clrl %d1 42aec: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 42af2: 242e ffb4 movel %fp@(-76),%d2 42af6: 2001 movel %d1,%d0 42af8: 262e ffb8 movel %fp@(-72),%d3 42afc: 4e5e unlk %fp 42afe: 4e75 rts 0004f1a0 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4f1a0: 4e56 0000 linkw %fp,#0 4f1a4: 206e 0008 moveal %fp@(8),%a0 4f1a8: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4f1aa: 4a88 tstl %a0 4f1ac: 6612 bnes 4f1c0 <== NEVER TAKEN 4f1ae: 4879 0005 e9c2 pea 5e9c2 <== NOT EXECUTED 4f1b4: 4879 0005 eb54 pea 5eb54 <__FUNCTION__.5986> <== NOT EXECUTED 4f1ba: 4878 0169 pea 169 <== NOT EXECUTED 4f1be: 6018 bras 4f1d8 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f1c0: 7005 moveq #5,%d0 4f1c2: b0a8 0048 cmpl %a0@(72),%d0 4f1c6: 671c beqs 4f1e4 <== NEVER TAKEN 4f1c8: 4879 0005 ea12 pea 5ea12 <== NOT EXECUTED 4f1ce: 4879 0005 eb54 pea 5eb54 <__FUNCTION__.5986> <== NOT EXECUTED 4f1d4: 4878 016d pea 16d <== NOT EXECUTED 4f1d8: 4879 0005 e9cc pea 5e9cc <== NOT EXECUTED 4f1de: 4eb9 0004 d4c8 jsr 4d4c8 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4f1e4: 4878 0001 pea 1 4f1e8: 2f2e 000c movel %fp@(12),%sp@- 4f1ec: 2f08 movel %a0,%sp@- 4f1ee: 4eb9 0004 ed64 jsr 4ed64 if ( *block_entry_ptr ) 4f1f4: 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 ); 4f1f8: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4f1fa: 4a92 tstl %a2@ 4f1fc: 6612 bnes 4f210 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4f1fe: 4eb9 0004 ed40 jsr 4ed40 if ( !memory ) 4f204: 4a80 tstl %d0 4f206: 6606 bnes 4f20e <== NEVER TAKEN 4f208: 103c 0001 moveb #1,%d0 <== NOT EXECUTED 4f20c: 6004 bras 4f212 <== NOT EXECUTED return 1; *block_entry_ptr = memory; 4f20e: 2480 movel %d0,%a2@ 4f210: 4280 clrl %d0 return 0; } 4f212: 246e fffc moveal %fp@(-4),%a2 4f216: 4e5e unlk %fp 4f218: 4e75 rts 0004f21a : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4f21a: 4e56 ffd8 linkw %fp,#-40 4f21e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4f222: 246e 0008 moveal %fp@(8),%a2 4f226: 242e 000c movel %fp@(12),%d2 4f22a: 262e 0010 movel %fp@(16),%d3 /* * Perform internal consistency checks */ assert( the_jnode ); 4f22e: 4a8a tstl %a2 4f230: 6612 bnes 4f244 <== NEVER TAKEN 4f232: 4879 0005 e9c2 pea 5e9c2 <== NOT EXECUTED 4f238: 4879 0005 eb6a pea 5eb6a <__FUNCTION__.5937> <== NOT EXECUTED 4f23e: 4878 0131 pea 131 <== NOT EXECUTED 4f242: 6018 bras 4f25c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f244: 7005 moveq #5,%d0 4f246: b0aa 0048 cmpl %a2@(72),%d0 4f24a: 671c beqs 4f268 <== NEVER TAKEN 4f24c: 4879 0005 ea12 pea 5ea12 <== NOT EXECUTED 4f252: 4879 0005 eb6a pea 5eb6a <__FUNCTION__.5937> <== NOT EXECUTED 4f258: 4878 0135 pea 135 <== NOT EXECUTED 4f25c: 4879 0005 e9cc pea 5e9cc <== NOT EXECUTED 4f262: 4eb9 0004 d4c8 jsr 4d4c8 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4f268: 2c39 0006 0438 movel 60438 ,%d6 4f26e: 2206 movel %d6,%d1 4f270: e489 lsrl #2,%d1 4f272: 2001 movel %d1,%d0 4f274: 5280 addql #1,%d0 4f276: 4c01 0800 mulsl %d1,%d0 4f27a: 4284 clrl %d4 4f27c: 5280 addql #1,%d0 4f27e: 4c01 0800 mulsl %d1,%d0 4f282: 5380 subql #1,%d0 4f284: 4c06 0800 mulsl %d6,%d0 4f288: 2a00 movel %d0,%d5 4f28a: 2002 movel %d2,%d0 4f28c: 2203 movel %d3,%d1 4f28e: 9285 subl %d5,%d1 4f290: 9184 subxl %d4,%d0 4f292: 6d12 blts 4f2a6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4f294: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 4f29a: 7416 moveq #22,%d2 <== NOT EXECUTED 4f29c: 72ff moveq #-1,%d1 <== NOT EXECUTED 4f29e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f2a0: 2082 movel %d2,%a0@ <== NOT EXECUTED 4f2a2: 6000 0092 braw 4f336 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 4f2a6: 282a 004c movel %a2@(76),%d4 4f2aa: 2a2a 0050 movel %a2@(80),%d5 4f2ae: 2002 movel %d2,%d0 4f2b0: 2203 movel %d3,%d1 4f2b2: 9285 subl %d5,%d1 4f2b4: 9184 subxl %d4,%d0 4f2b6: 6e04 bgts 4f2bc 4f2b8: 4281 clrl %d1 4f2ba: 607a bras 4f336 <== ALWAYS TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4f2bc: 47f9 0005 c02c lea 5c02c <__divdi3>,%a3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4f2c2: 4bf9 0004 f1a0 lea 4f1a0 ,%a5 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4f2c8: 2e06 movel %d6,%d7 4f2ca: 5bc6 smi %d6 4f2cc: 49c6 extbl %d6 4f2ce: 2f07 movel %d7,%sp@- 4f2d0: 2f06 movel %d6,%sp@- 4f2d2: 2f03 movel %d3,%sp@- 4f2d4: 2f02 movel %d2,%sp@- 4f2d6: 4e93 jsr %a3@ 4f2d8: 4fef 0010 lea %sp@(16),%sp 4f2dc: 2841 moveal %d1,%a4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4f2de: 2f07 movel %d7,%sp@- 4f2e0: 2f06 movel %d6,%sp@- 4f2e2: 2f05 movel %d5,%sp@- 4f2e4: 2f04 movel %d4,%sp@- 4f2e6: 4e93 jsr %a3@ 4f2e8: 4fef 0010 lea %sp@(16),%sp 4f2ec: 2c01 movel %d1,%d6 4f2ee: 2801 movel %d1,%d4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4f2f0: 6036 bras 4f328 <== ALWAYS TAKEN if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4f2f2: 2f04 movel %d4,%sp@- 4f2f4: 2f0a movel %a2,%sp@- 4f2f6: 4e95 jsr %a5@ 4f2f8: 508f addql #8,%sp 4f2fa: 4a80 tstl %d0 4f2fc: 6728 beqs 4f326 <== NEVER TAKEN 4f2fe: 600c bras 4f30c <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 4f300: 2f04 movel %d4,%sp@- <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4f302: 5384 subql #1,%d4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4f304: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f306: 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-- ) { 4f308: 508f addql #8,%sp <== NOT EXECUTED 4f30a: 6006 bras 4f312 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4f30c: 47f9 0004 ef64 lea 4ef64 ,%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-- ) { 4f312: bc84 cmpl %d4,%d6 <== NOT EXECUTED 4f314: 63ea blss 4f300 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4f316: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 4f31c: 72ff moveq #-1,%d1 <== NOT EXECUTED 4f31e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f320: 701c moveq #28,%d0 <== NOT EXECUTED 4f322: 2080 movel %d0,%a0@ <== NOT EXECUTED 4f324: 6010 bras 4f336 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4f326: 5284 addql #1,%d4 4f328: b9c4 cmpal %d4,%a4 4f32a: 64c6 bccs 4f2f2 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4f32c: 4281 clrl %d1 4f32e: 2542 004c movel %d2,%a2@(76) 4f332: 2543 0050 movel %d3,%a2@(80) return 0; } 4f336: 2001 movel %d1,%d0 4f338: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4f33e: 4e5e unlk %fp 4f340: 4e75 rts 0004ed64 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4ed64: 4e56 fff0 linkw %fp,#-16 4ed68: 206e 0010 moveal %fp@(16),%a0 4ed6c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4ed70: 246e 0008 moveal %fp@(8),%a2 4ed74: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4ed78: 4a8a tstl %a2 4ed7a: 6612 bnes 4ed8e <== NEVER TAKEN 4ed7c: 4879 0005 e9c2 pea 5e9c2 <== NOT EXECUTED 4ed82: 4879 0005 eac5 pea 5eac5 <__FUNCTION__.6296> <== NOT EXECUTED 4ed88: 4878 0388 pea 388 <== NOT EXECUTED 4ed8c: 6018 bras 4eda6 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4ed8e: 7005 moveq #5,%d0 4ed90: b0aa 0048 cmpl %a2@(72),%d0 4ed94: 671c beqs 4edb2 <== NEVER TAKEN 4ed96: 4879 0005 ea12 pea 5ea12 <== NOT EXECUTED 4ed9c: 4879 0005 eac5 pea 5eac5 <__FUNCTION__.6296> <== NOT EXECUTED 4eda2: 4878 038c pea 38c <== NOT EXECUTED 4eda6: 4879 0005 e9cc pea 5e9cc <== NOT EXECUTED 4edac: 4eb9 0004 d4c8 jsr 4d4c8 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4edb2: 2239 0006 0438 movel 60438 ,%d1 4edb8: e489 lsrl #2,%d1 4edba: 2001 movel %d1,%d0 4edbc: 5380 subql #1,%d0 4edbe: b082 cmpl %d2,%d0 4edc0: 6536 bcss 4edf8 <== ALWAYS TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 4edc2: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4edc6: 4a88 tstl %a0 4edc8: 6720 beqs 4edea if ( !p ) { 4edca: 4a89 tstl %a1 4edcc: 6610 bnes 4edde p = memfile_alloc_block(); 4edce: 4eb9 0004 ed40 jsr 4ed40 if ( !p ) 4edd4: 4a80 tstl %d0 4edd6: 6700 0118 beqw 4eef0 <== ALWAYS TAKEN return 0; info->indirect = p; 4edda: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4edde: 206a 0054 moveal %a2@(84),%a0 4ede2: e58a lsll #2,%d2 4ede4: d1c2 addal %d2,%a0 4ede6: 6000 010a braw 4eef2 <== ALWAYS TAKEN } if ( !p ) 4edea: 4a89 tstl %a1 4edec: 6700 0102 beqw 4eef0 <== ALWAYS TAKEN return 0; return &info->indirect[ my_block ]; 4edf0: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4edf4: 6000 00fc braw 4eef2 <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4edf8: 2001 movel %d1,%d0 <== NOT EXECUTED 4edfa: 5280 addql #1,%d0 <== NOT EXECUTED 4edfc: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 4ee00: 2240 moveal %d0,%a1 <== NOT EXECUTED 4ee02: 5389 subql #1,%a1 <== NOT EXECUTED 4ee04: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 4ee06: 6562 bcss 4ee6a <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4ee08: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4ee0a: 202a 0058 movel %a2@(88),%d0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4ee0e: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4ee12: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4ee16: 4a88 tstl %a0 <== NOT EXECUTED 4ee18: 6736 beqs 4ee50 <== NOT EXECUTED if ( !p ) { 4ee1a: 4a80 tstl %d0 <== NOT EXECUTED 4ee1c: 6610 bnes 4ee2e <== NOT EXECUTED p = memfile_alloc_block(); 4ee1e: 4eb9 0004 ed40 jsr 4ed40 <== NOT EXECUTED if ( !p ) 4ee24: 4a80 tstl %d0 <== NOT EXECUTED 4ee26: 6700 00c8 beqw 4eef0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 4ee2a: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 4ee2e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ee30: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4ee34: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4ee36: 660e bnes 4ee46 <== NOT EXECUTED p1 = memfile_alloc_block(); 4ee38: 4eb9 0004 ed40 jsr 4ed40 <== NOT EXECUTED if ( !p1 ) 4ee3e: 4a80 tstl %d0 <== NOT EXECUTED 4ee40: 6700 00ae beqw 4eef0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 4ee44: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 4ee46: 2240 moveal %d0,%a1 <== NOT EXECUTED 4ee48: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4ee4c: 6000 00a4 braw 4eef2 <== NOT EXECUTED } if ( !p ) 4ee50: 4a80 tstl %d0 <== NOT EXECUTED 4ee52: 6700 009c beqw 4eef0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4ee56: 2240 moveal %d0,%a1 <== NOT EXECUTED 4ee58: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 4ee5c: 4a88 tstl %a0 <== NOT EXECUTED 4ee5e: 6700 0090 beqw 4eef0 <== 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 ]; 4ee62: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4ee66: 6000 008a braw 4eef2 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4ee6a: 2600 movel %d0,%d3 <== NOT EXECUTED 4ee6c: 5283 addql #1,%d3 <== NOT EXECUTED 4ee6e: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 4ee72: 5383 subql #1,%d3 <== NOT EXECUTED 4ee74: b682 cmpl %d2,%d3 <== NOT EXECUTED 4ee76: 6578 bcss 4eef0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 4ee78: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4ee7a: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 4ee7e: 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; 4ee82: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4ee86: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4ee8a: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4ee8e: 4a88 tstl %a0 <== NOT EXECUTED 4ee90: 6746 beqs 4eed8 <== NOT EXECUTED if ( !p ) { 4ee92: 4a80 tstl %d0 <== NOT EXECUTED 4ee94: 660e bnes 4eea4 <== NOT EXECUTED p = memfile_alloc_block(); 4ee96: 4eb9 0004 ed40 jsr 4ed40 <== NOT EXECUTED if ( !p ) 4ee9c: 4a80 tstl %d0 <== NOT EXECUTED 4ee9e: 6750 beqs 4eef0 <== NOT EXECUTED return 0; info->triply_indirect = p; 4eea0: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 4eea4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4eea6: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4eeaa: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4eeac: 660c bnes 4eeba <== NOT EXECUTED p1 = memfile_alloc_block(); 4eeae: 4eb9 0004 ed40 jsr 4ed40 <== NOT EXECUTED if ( !p1 ) 4eeb4: 4a80 tstl %d0 <== NOT EXECUTED 4eeb6: 6738 beqs 4eef0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 4eeb8: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 4eeba: 2240 moveal %d0,%a1 <== NOT EXECUTED 4eebc: 45f1 3c00 lea %a1@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 4eec0: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p2 ) { 4eec2: 660c bnes 4eed0 <== NOT EXECUTED p2 = memfile_alloc_block(); 4eec4: 4eb9 0004 ed40 jsr 4ed40 <== NOT EXECUTED if ( !p2 ) 4eeca: 4a80 tstl %d0 <== NOT EXECUTED 4eecc: 6722 beqs 4eef0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4eece: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 4eed0: 2240 moveal %d0,%a1 <== NOT EXECUTED 4eed2: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 4eed6: 601a bras 4eef2 <== NOT EXECUTED } if ( !p ) 4eed8: 4a80 tstl %d0 <== NOT EXECUTED 4eeda: 6714 beqs 4eef0 <== 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 ]; 4eedc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4eede: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1 <== NOT EXECUTED if ( !p1 ) 4eee2: 4a89 tstl %a1 <== NOT EXECUTED 4eee4: 670a beqs 4eef0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 4eee6: 2071 3c00 moveal %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4eeea: e58c lsll #2,%d4 <== NOT EXECUTED 4eeec: d1c4 addal %d4,%a0 <== NOT EXECUTED 4eeee: 6002 bras 4eef2 <== NOT EXECUTED 4eef0: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4eef2: 2008 movel %a0,%d0 4eef4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4eefa: 4e5e unlk %fp 4eefc: 4e75 rts 0004f726 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4f726: 4e56 ffc0 linkw %fp,#-64 4f72a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4f72e: 246e 0008 moveal %fp@(8),%a2 4f732: 2a2e 0014 movel %fp@(20),%d5 4f736: 2a6e 0018 moveal %fp@(24),%a5 4f73a: 262e 000c movel %fp@(12),%d3 4f73e: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 4f742: 4a8a tstl %a2 4f744: 6612 bnes 4f758 <== NEVER TAKEN 4f746: 4879 0005 e9c2 pea 5e9c2 <== NOT EXECUTED 4f74c: 4879 0005 eaf7 pea 5eaf7 <__FUNCTION__.6123> <== NOT EXECUTED 4f752: 4878 024c pea 24c <== NOT EXECUTED 4f756: 601e bras 4f776 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4f758: 202a 0048 movel %a2@(72),%d0 4f75c: 2200 movel %d0,%d1 4f75e: 5b81 subql #5,%d1 4f760: 7401 moveq #1,%d2 4f762: b481 cmpl %d1,%d2 4f764: 641c bccs 4f782 <== NEVER TAKEN 4f766: 4879 0005 ea75 pea 5ea75 <== NOT EXECUTED 4f76c: 4879 0005 eaf7 pea 5eaf7 <__FUNCTION__.6123> <== NOT EXECUTED 4f772: 4878 0251 pea 251 <== NOT EXECUTED 4f776: 4879 0005 e9cc pea 5e9cc <== NOT EXECUTED 4f77c: 4eb9 0004 d4c8 jsr 4d4c8 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4f782: 4a85 tstl %d5 4f784: 6612 bnes 4f798 <== NEVER TAKEN 4f786: 4879 0005 eac0 pea 5eac0 <== NOT EXECUTED 4f78c: 4879 0005 eaf7 pea 5eaf7 <__FUNCTION__.6123> <== NOT EXECUTED 4f792: 4878 025a pea 25a <== NOT EXECUTED 4f796: 60de bras 4f776 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4f798: 4a8d tstl %a5 4f79a: 6612 bnes 4f7ae <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4f79c: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 4f7a2: 7e16 moveq #22,%d7 <== NOT EXECUTED 4f7a4: 7cff moveq #-1,%d6 <== NOT EXECUTED 4f7a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f7a8: 2087 movel %d7,%a0@ <== NOT EXECUTED 4f7aa: 6000 01be braw 4f96a <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 4f7ae: 7206 moveq #6,%d1 4f7b0: b280 cmpl %d0,%d1 4f7b2: 6658 bnes 4f80c <== NEVER TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4f7b4: 284d moveal %a5,%a4 <== NOT EXECUTED 4f7b6: 97cb subal %a3,%a3 <== NOT EXECUTED 4f7b8: 2c2a 004c movel %a2@(76),%d6 <== NOT EXECUTED 4f7bc: 2e2a 0050 movel %a2@(80),%d7 <== NOT EXECUTED 4f7c0: 200b movel %a3,%d0 <== NOT EXECUTED 4f7c2: 220c movel %a4,%d1 <== NOT EXECUTED 4f7c4: 2d46 ffe8 movel %d6,%fp@(-24) <== NOT EXECUTED 4f7c8: 2d47 ffec movel %d7,%fp@(-20) <== NOT EXECUTED 4f7cc: 9e84 subl %d4,%d7 <== NOT EXECUTED 4f7ce: 9d83 subxl %d3,%d6 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4f7d0: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 4f7d4: 9287 subl %d7,%d1 <== NOT EXECUTED 4f7d6: 9186 subxl %d6,%d0 <== NOT EXECUTED 4f7d8: 6e04 bgts 4f7de <== NOT EXECUTED 4f7da: 2c0d movel %a5,%d6 <== NOT EXECUTED 4f7dc: 6006 bras 4f7e4 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 4f7de: 2c2e ffec movel %fp@(-20),%d6 <== NOT EXECUTED 4f7e2: 9c84 subl %d4,%d6 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 4f7e4: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f7e6: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 4f7ea: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4f7ec: 4eb9 0005 0c80 jsr 50c80 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4f7f2: 42a7 clrl %sp@- <== NOT EXECUTED 4f7f4: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4f7f8: 4eb9 0004 3554 jsr 43554 <== NOT EXECUTED 4f7fe: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 4f804: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4f808: 6000 0160 braw 4f96a <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 4f80c: 200d movel %a5,%d0 4f80e: d084 addl %d4,%d0 4f810: 2240 moveal %d0,%a1 4f812: 91c8 subal %a0,%a0 4f814: 202a 004c movel %a2@(76),%d0 4f818: 222a 0050 movel %a2@(80),%d1 4f81c: 2c08 movel %a0,%d6 4f81e: 2e09 movel %a1,%d7 4f820: 9e81 subl %d1,%d7 4f822: 9d80 subxl %d0,%d6 4f824: 6e04 bgts 4f82a <== NEVER TAKEN 4f826: 240d movel %a5,%d2 <== NOT EXECUTED 4f828: 6006 bras 4f830 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 4f82a: 2e01 movel %d1,%d7 4f82c: 9e84 subl %d4,%d7 4f82e: 2407 movel %d7,%d2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4f830: 2e39 0006 0438 movel 60438 ,%d7 4f836: 2207 movel %d7,%d1 4f838: 5bc0 smi %d0 4f83a: 49c0 extbl %d0 4f83c: 2640 moveal %d0,%a3 4f83e: 2841 moveal %d1,%a4 4f840: 2f0c movel %a4,%sp@- 4f842: 2f00 movel %d0,%sp@- 4f844: 2f04 movel %d4,%sp@- 4f846: 2f03 movel %d3,%sp@- 4f848: 4eb9 0005 c3e4 jsr 5c3e4 <__moddi3> 4f84e: 4fef 0010 lea %sp@(16),%sp 4f852: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4f854: 2f0c movel %a4,%sp@- 4f856: 2f0b movel %a3,%sp@- 4f858: 2f04 movel %d4,%sp@- 4f85a: 2f03 movel %d3,%sp@- 4f85c: 4eb9 0005 c02c jsr 5c02c <__divdi3> 4f862: 4fef 0010 lea %sp@(16),%sp 4f866: 2601 movel %d1,%d3 if ( start_offset ) { 4f868: 4a86 tstl %d6 4f86a: 6604 bnes 4f870 4f86c: 2e05 movel %d5,%d7 4f86e: 6050 bras 4f8c0 <== ALWAYS TAKEN 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 ); 4f870: 42a7 clrl %sp@- 4f872: 2f01 movel %d1,%sp@- 4f874: 2f0a movel %a2,%sp@- 4f876: 4eb9 0004 ed64 jsr 4ed64 assert( block_ptr ); 4f87c: 4fef 000c lea %sp@(12),%sp 4f880: 4a80 tstl %d0 4f882: 6614 bnes 4f898 <== NEVER TAKEN 4f884: 4879 0005 ea42 pea 5ea42 <== NOT EXECUTED 4f88a: 4879 0005 eaf7 pea 5eaf7 <__FUNCTION__.6123> <== NOT EXECUTED 4f890: 4878 0296 pea 296 <== NOT EXECUTED 4f894: 6000 fee0 braw 4f776 <== 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; 4f898: 9e86 subl %d6,%d7 4f89a: 2202 movel %d2,%d1 4f89c: be82 cmpl %d2,%d7 4f89e: 6402 bccs 4f8a2 4f8a0: 2207 movel %d7,%d1 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4f8a2: 2f01 movel %d1,%sp@- 4f8a4: 2040 moveal %d0,%a0 4f8a6: dc90 addl %a0@,%d6 dest += to_copy; 4f8a8: 2e05 movel %d5,%d7 4f8aa: de81 addl %d1,%d7 block++; my_length -= to_copy; 4f8ac: 9481 subl %d1,%d2 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; block++; 4f8ae: 5283 addql #1,%d3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4f8b0: 2f06 movel %d6,%sp@- dest += to_copy; block++; my_length -= to_copy; 4f8b2: 2c01 movel %d1,%d6 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4f8b4: 2f05 movel %d5,%sp@- 4f8b6: 4eb9 0005 0c80 jsr 50c80 dest += to_copy; block++; my_length -= to_copy; 4f8bc: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4f8c0: 2a39 0006 0438 movel 60438 ,%d5 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4f8c6: 49f9 0004 ed64 lea 4ed64 ,%a4 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4f8cc: 47f9 0005 0c80 lea 50c80 ,%a3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4f8d2: 603a bras 4f90e <== ALWAYS TAKEN block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4f8d4: 42a7 clrl %sp@- 4f8d6: 2f03 movel %d3,%sp@- 4f8d8: 2f0a movel %a2,%sp@- 4f8da: 4e94 jsr %a4@ assert( block_ptr ); 4f8dc: 4fef 000c lea %sp@(12),%sp 4f8e0: 4a80 tstl %d0 4f8e2: 6614 bnes 4f8f8 <== NEVER TAKEN 4f8e4: 4879 0005 ea42 pea 5ea42 <== NOT EXECUTED 4f8ea: 4879 0005 eaf7 pea 5eaf7 <__FUNCTION__.6123> <== NOT EXECUTED 4f8f0: 4878 02a7 pea 2a7 <== NOT EXECUTED 4f8f4: 6000 fe80 braw 4f776 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4f8f8: 2040 moveal %d0,%a0 dest += to_copy; block++; 4f8fa: 5283 addql #1,%d3 my_length -= to_copy; 4f8fc: 9485 subl %d5,%d2 copied += to_copy; 4f8fe: dc85 addl %d5,%d6 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4f900: 2f05 movel %d5,%sp@- 4f902: 2f10 movel %a0@,%sp@- 4f904: 2f07 movel %d7,%sp@- dest += to_copy; 4f906: de85 addl %d5,%d7 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4f908: 4e93 jsr %a3@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4f90a: 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 ) { 4f90e: b4b9 0006 0438 cmpl 60438 ,%d2 4f914: 64be bccs 4f8d4 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4f916: 4a82 tstl %d2 4f918: 673c beqs 4f956 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4f91a: 42a7 clrl %sp@- 4f91c: 2f03 movel %d3,%sp@- 4f91e: 2f0a movel %a2,%sp@- 4f920: 4eb9 0004 ed64 jsr 4ed64 assert( block_ptr ); 4f926: 4fef 000c lea %sp@(12),%sp 4f92a: 4a80 tstl %d0 4f92c: 6614 bnes 4f942 <== NEVER TAKEN 4f92e: 4879 0005 ea42 pea 5ea42 <== NOT EXECUTED 4f934: 4879 0005 eaf7 pea 5eaf7 <__FUNCTION__.6123> <== NOT EXECUTED 4f93a: 4878 02b9 pea 2b9 <== NOT EXECUTED 4f93e: 6000 fe36 braw 4f776 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4f942: 2040 moveal %d0,%a0 copied += my_length; 4f944: dc82 addl %d2,%d6 if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4f946: 2f02 movel %d2,%sp@- 4f948: 2f10 movel %a0@,%sp@- 4f94a: 2f07 movel %d7,%sp@- 4f94c: 4eb9 0005 0c80 jsr 50c80 copied += my_length; 4f952: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4f956: 42a7 clrl %sp@- 4f958: 486e fff8 pea %fp@(-8) 4f95c: 4eb9 0004 3554 jsr 43554 4f962: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4f968: 508f addql #8,%sp } 4f96a: 2006 movel %d6,%d0 4f96c: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 4f972: 4e5e unlk %fp 4f974: 4e75 rts 0004efb0 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4efb0: 4e56 ffe4 linkw %fp,#-28 4efb4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4efb8: 246e 0008 moveal %fp@(8),%a2 /* * Perform internal consistency checks */ assert( the_jnode ); 4efbc: 4a8a tstl %a2 4efbe: 6612 bnes 4efd2 <== NEVER TAKEN 4efc0: 4879 0005 e9c2 pea 5e9c2 <== NOT EXECUTED 4efc6: 4879 0005 eb09 pea 5eb09 <__FUNCTION__.6048> <== NOT EXECUTED 4efcc: 4878 01ee pea 1ee <== NOT EXECUTED 4efd0: 6018 bras 4efea <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4efd2: 7005 moveq #5,%d0 4efd4: b0aa 0048 cmpl %a2@(72),%d0 4efd8: 671c beqs 4eff6 <== NEVER TAKEN 4efda: 4879 0005 ea12 pea 5ea12 <== NOT EXECUTED 4efe0: 4879 0005 eb09 pea 5eb09 <__FUNCTION__.6048> <== NOT EXECUTED 4efe6: 4878 01f2 pea 1f2 <== NOT EXECUTED 4efea: 4879 0005 e9cc pea 5e9cc <== NOT EXECUTED 4eff0: 4eb9 0004 d4c8 jsr 4d4c8 <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 4eff6: 2439 0006 0438 movel 60438 ,%d2 4effc: e48a lsrl #2,%d2 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4effe: 4aaa 0054 tstl %a2@(84) 4f002: 670e beqs 4f012 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 4f004: 2f02 movel %d2,%sp@- 4f006: 486a 0054 pea %a2@(84) 4f00a: 4eb9 0004 eefe jsr 4eefe 4f010: 508f addql #8,%sp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f012: 4aaa 0058 tstl %a2@(88) 4f016: 673e beqs 4f056 <== NEVER TAKEN 4f018: 4283 clrl %d3 <== NOT EXECUTED if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4f01a: 47f9 0004 eefe lea 4eefe ,%a3 <== NOT EXECUTED 4f020: 601a bras 4f03c <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4f022: 2003 movel %d3,%d0 <== NOT EXECUTED 4f024: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4f028: e588 lsll #2,%d0 <== NOT EXECUTED 4f02a: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4f02e: 670a beqs 4f03a <== NOT EXECUTED memfile_free_blocks_in_table( 4f030: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f032: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4f036: 4e93 jsr %a3@ <== NOT EXECUTED 4f038: 508f addql #8,%sp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i,%d0 <== NOT EXECUTED 4f042: e488 lsrl #2,%d0 <== NOT EXECUTED 4f044: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f046: 62da bhis 4f022 <== 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 ); 4f048: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f04a: 486a 0058 pea %a2@(88) <== NOT EXECUTED 4f04e: 4eb9 0004 eefe jsr 4eefe <== NOT EXECUTED 4f054: 508f addql #8,%sp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f056: 4aaa 005c tstl %a2@(92) 4f05a: 6762 beqs 4f0be <== NEVER TAKEN 4f05c: 4283 clrl %d3 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j,%a4 <== NOT EXECUTED 4f064: 603e bras 4f0a4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f066: 2a03 movel %d3,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4f068: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f06c: e58d lsll #2,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4f06e: 2670 5800 moveal %a0@(00000000,%d5:l),%a3 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4f072: 4a8b tstl %a3 <== NOT EXECUTED 4f074: 673a beqs 4f0b0 <== NOT EXECUTED 4f076: 4284 clrl %d4 <== NOT EXECUTED 4f078: 6010 bras 4f08a <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4f07e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f080: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f082: 4e94 jsr %a4@ <== NOT EXECUTED 4f084: 508f addql #8,%sp <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j,%d0 <== NOT EXECUTED 4f090: e488 lsrl #2,%d0 <== NOT EXECUTED 4f092: b084 cmpl %d4,%d0 <== NOT EXECUTED 4f094: 62e4 bhis 4f07a <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4f096: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f098: daaa 005c addl %a2@(92),%d5 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i,%d0 <== NOT EXECUTED 4f0aa: e488 lsrl #2,%d0 <== NOT EXECUTED 4f0ac: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f0ae: 62b6 bhis 4f066 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4f0b0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f0b2: 486a 005c pea %a2@(92) <== NOT EXECUTED 4f0b6: 4eb9 0004 eefe jsr 4eefe <== NOT EXECUTED 4f0bc: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4f0be: 4280 clrl %d0 4f0c0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4f0c6: 4e5e unlk %fp 4f0c8: 4e75 rts 0004ef64 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4ef64: 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 ); 4ef68: 42a7 clrl %sp@- <== NOT EXECUTED 4ef6a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4ef6e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4ef72: 4eb9 0004 ed64 jsr 4ed64 <== NOT EXECUTED assert( block_ptr ); 4ef78: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ef7c: 4a80 tstl %d0 <== NOT EXECUTED 4ef7e: 661c bnes 4ef9c <== NOT EXECUTED 4ef80: 4879 0005 ea42 pea 5ea42 <== NOT EXECUTED 4ef86: 4879 0005 eb3a pea 5eb3a <__FUNCTION__.6012> <== NOT EXECUTED 4ef8c: 4878 0196 pea 196 <== NOT EXECUTED 4ef90: 4879 0005 e9cc pea 5e9cc <== NOT EXECUTED 4ef96: 4eb9 0004 d4c8 jsr 4d4c8 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 4ef9c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ef9e: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4efa0: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4efa2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4efa4: 4eb9 0004 ed26 jsr 4ed26 <== NOT EXECUTED } return 1; } 4efaa: 7001 moveq #1,%d0 <== NOT EXECUTED 4efac: 4e5e unlk %fp <== NOT EXECUTED 4efae: 4e75 rts 0004f436 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4f436: 4e56 ffd0 linkw %fp,#-48 4f43a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4f43e: 246e 0008 moveal %fp@(8),%a2 4f442: 262e 0014 movel %fp@(20),%d3 4f446: 242e 0018 movel %fp@(24),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4f44a: 4a8a tstl %a2 4f44c: 6612 bnes 4f460 <== NEVER TAKEN 4f44e: 4879 0005 e9c2 pea 5e9c2 <== NOT EXECUTED 4f454: 4879 0005 eae4 pea 5eae4 <__FUNCTION__.6215> <== NOT EXECUTED 4f45a: 4878 02e3 pea 2e3 <== NOT EXECUTED 4f45e: 6018 bras 4f478 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f460: 7805 moveq #5,%d4 4f462: b8aa 0048 cmpl %a2@(72),%d4 4f466: 671c beqs 4f484 <== NEVER TAKEN 4f468: 4879 0005 ea12 pea 5ea12 <== NOT EXECUTED 4f46e: 4879 0005 eae4 pea 5eae4 <__FUNCTION__.6215> <== NOT EXECUTED 4f474: 4878 02e7 pea 2e7 <== NOT EXECUTED 4f478: 4879 0005 e9cc pea 5e9cc <== NOT EXECUTED 4f47e: 4eb9 0004 d4c8 jsr 4d4c8 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4f484: 4a83 tstl %d3 4f486: 6612 bnes 4f49a <== NEVER TAKEN 4f488: 4879 0005 e2d3 pea 5e2d3 <== NOT EXECUTED 4f48e: 4879 0005 eae4 pea 5eae4 <__FUNCTION__.6215> <== NOT EXECUTED 4f494: 4878 02ef pea 2ef <== NOT EXECUTED 4f498: 60de bras 4f478 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4f49a: 4a82 tstl %d2 4f49c: 6612 bnes 4f4b0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4f49e: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 4f4a4: 7a16 moveq #22,%d5 <== NOT EXECUTED 4f4a6: 7eff moveq #-1,%d7 <== NOT EXECUTED 4f4a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f4aa: 2085 movel %d5,%a0@ <== NOT EXECUTED 4f4ac: 6000 0186 braw 4f634 <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 4f4b0: 206e 0010 moveal %fp@(16),%a0 4f4b4: d1c2 addal %d2,%a0 4f4b6: 2208 movel %a0,%d1 4f4b8: 4280 clrl %d0 4f4ba: 282a 004c movel %a2@(76),%d4 4f4be: 2a2a 0050 movel %a2@(80),%d5 4f4c2: 9a81 subl %d1,%d5 4f4c4: 9980 subxl %d0,%d4 4f4c6: 6c26 bges 4f4ee <== ALWAYS TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 4f4c8: 2f08 movel %a0,%sp@- 4f4ca: 2f00 movel %d0,%sp@- 4f4cc: 2f0a movel %a2,%sp@- 4f4ce: 4eb9 0004 f21a jsr 4f21a if ( status ) 4f4d4: 4fef 000c lea %sp@(12),%sp 4f4d8: 4a80 tstl %d0 4f4da: 6712 beqs 4f4ee <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4f4dc: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 4f4e2: 781c moveq #28,%d4 <== NOT EXECUTED 4f4e4: 7eff moveq #-1,%d7 <== NOT EXECUTED 4f4e6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f4e8: 2084 movel %d4,%a0@ <== NOT EXECUTED 4f4ea: 6000 0148 braw 4f634 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4f4ee: 2e39 0006 0438 movel 60438 ,%d7 4f4f4: 2207 movel %d7,%d1 4f4f6: 5bc0 smi %d0 4f4f8: 49c0 extbl %d0 4f4fa: 2640 moveal %d0,%a3 4f4fc: 2841 moveal %d1,%a4 4f4fe: 2f0c movel %a4,%sp@- 4f500: 2f00 movel %d0,%sp@- 4f502: 2f2e 0010 movel %fp@(16),%sp@- 4f506: 2f2e 000c movel %fp@(12),%sp@- 4f50a: 4eb9 0005 c3e4 jsr 5c3e4 <__moddi3> 4f510: 4fef 0010 lea %sp@(16),%sp 4f514: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4f516: 2f0c movel %a4,%sp@- 4f518: 2f0b movel %a3,%sp@- 4f51a: 2f2e 0010 movel %fp@(16),%sp@- 4f51e: 2f2e 000c movel %fp@(12),%sp@- 4f522: 4eb9 0005 c02c jsr 5c02c <__divdi3> 4f528: 4fef 0010 lea %sp@(16),%sp 4f52c: 2a01 movel %d1,%d5 if ( start_offset ) { 4f52e: 4a84 tstl %d4 4f530: 6606 bnes 4f538 4f532: 2643 moveal %d3,%a3 4f534: 4287 clrl %d7 4f536: 604c bras 4f584 <== ALWAYS TAKEN 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 ); 4f538: 42a7 clrl %sp@- 4f53a: 2f01 movel %d1,%sp@- 4f53c: 2f0a movel %a2,%sp@- 4f53e: 4eb9 0004 ed64 jsr 4ed64 assert( block_ptr ); 4f544: 4fef 000c lea %sp@(12),%sp 4f548: 4a80 tstl %d0 4f54a: 6614 bnes 4f560 <== NEVER TAKEN 4f54c: 4879 0005 ea42 pea 5ea42 <== NOT EXECUTED 4f552: 4879 0005 eae4 pea 5eae4 <__FUNCTION__.6215> <== NOT EXECUTED 4f558: 4878 031c pea 31c <== NOT EXECUTED 4f55c: 6000 ff1a braw 4f478 <== 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; 4f560: 9e84 subl %d4,%d7 4f562: b487 cmpl %d7,%d2 4f564: 6402 bccs 4f568 <== ALWAYS TAKEN 4f566: 2e02 movel %d2,%d7 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4f568: 2f07 movel %d7,%sp@- 4f56a: 2040 moveal %d0,%a0 src += to_copy; 4f56c: 2643 moveal %d3,%a3 4f56e: d7c7 addal %d7,%a3 block++; 4f570: 5285 addql #1,%d5 my_length -= to_copy; 4f572: 9487 subl %d7,%d2 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4f574: 2f03 movel %d3,%sp@- 4f576: d890 addl %a0@,%d4 4f578: 2f04 movel %d4,%sp@- 4f57a: 4eb9 0005 0c80 jsr 50c80 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4f580: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4f584: 2639 0006 0438 movel 60438 ,%d3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4f58a: 4bf9 0004 ed64 lea 4ed64 ,%a5 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4f590: 49f9 0005 0c80 lea 50c80 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4f596: 603a bras 4f5d2 <== ALWAYS TAKEN block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4f598: 42a7 clrl %sp@- 4f59a: 2f05 movel %d5,%sp@- 4f59c: 2f0a movel %a2,%sp@- 4f59e: 4e95 jsr %a5@ assert( block_ptr ); 4f5a0: 4fef 000c lea %sp@(12),%sp 4f5a4: 4a80 tstl %d0 4f5a6: 6614 bnes 4f5bc <== NEVER TAKEN 4f5a8: 4879 0005 ea42 pea 5ea42 <== NOT EXECUTED 4f5ae: 4879 0005 eae4 pea 5eae4 <__FUNCTION__.6215> <== NOT EXECUTED 4f5b4: 4878 0330 pea 330 <== NOT EXECUTED 4f5b8: 6000 febe braw 4f478 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4f5bc: 2f03 movel %d3,%sp@- 4f5be: 2240 moveal %d0,%a1 src += to_copy; block++; 4f5c0: 5285 addql #1,%d5 my_length -= to_copy; 4f5c2: 9483 subl %d3,%d2 * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 4f5c4: de83 addl %d3,%d7 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4f5c6: 2f0b movel %a3,%sp@- 4f5c8: 2f11 movel %a1@,%sp@- src += to_copy; 4f5ca: d7c3 addal %d3,%a3 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4f5cc: 4e94 jsr %a4@ * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 4f5ce: 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 ) { 4f5d2: b4b9 0006 0438 cmpl 60438 ,%d2 4f5d8: 64be bccs 4f598 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4f5da: 4a82 tstl %d2 4f5dc: 673c beqs 4f61a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4f5de: 42a7 clrl %sp@- 4f5e0: 2f05 movel %d5,%sp@- 4f5e2: 2f0a movel %a2,%sp@- 4f5e4: 4eb9 0004 ed64 jsr 4ed64 assert( block_ptr ); 4f5ea: 4fef 000c lea %sp@(12),%sp 4f5ee: 4a80 tstl %d0 4f5f0: 6614 bnes 4f606 <== NEVER TAKEN 4f5f2: 4879 0005 ea42 pea 5ea42 <== NOT EXECUTED 4f5f8: 4879 0005 eae4 pea 5eae4 <__FUNCTION__.6215> <== NOT EXECUTED 4f5fe: 4878 0346 pea 346 <== NOT EXECUTED 4f602: 6000 fe74 braw 4f478 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 4f606: 2f02 movel %d2,%sp@- 4f608: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4f60a: de82 addl %d2,%d7 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 4f60c: 2f0b movel %a3,%sp@- 4f60e: 2f10 movel %a0@,%sp@- 4f610: 4eb9 0005 0c80 jsr 50c80 my_length = 0; copied += to_copy; 4f616: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4f61a: 42a7 clrl %sp@- 4f61c: 486e fff8 pea %fp@(-8) 4f620: 4eb9 0004 3554 jsr 43554 4f626: 202e fff8 movel %fp@(-8),%d0 return copied; 4f62a: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4f62c: 2540 0044 movel %d0,%a2@(68) 4f630: 2540 0040 movel %d0,%a2@(64) return copied; } 4f634: 2007 movel %d7,%d0 4f636: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4f63c: 4e5e unlk %fp 4f63e: 4e75 rts 00048ac0 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48ac0: 4e56 ffb4 linkw %fp,#-76 48ac4: 48d7 003c moveml %d2-%d5,%sp@ 48ac8: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 48acc: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48ace: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 48ad2: 4eb9 0004 cdac jsr 4cdac 48ad8: 588f addql #4,%sp 48ada: 486e fffc pea %fp@(-4) 48ade: 486e ffc7 pea %fp@(-57) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48ae2: 2a2e 0010 movel %fp@(16),%d5 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 48ae6: 2f00 movel %d0,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48ae8: 282e 0014 movel %fp@(20),%d4 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 48aec: 2f03 movel %d3,%sp@- 48aee: 4eb9 0004 8948 jsr 48948 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 48af4: 4fef 0010 lea %sp@(16),%sp 48af8: 2002 movel %d2,%d0 48afa: 0280 0000 f000 andil #61440,%d0 48b00: 0c80 0000 4000 cmpil #16384,%d0 48b06: 6748 beqs 48b50 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 48b08: 0c80 0000 8000 cmpil #32768,%d0 48b0e: 6606 bnes 48b16 48b10: 303c 0005 movew #5,%d0 48b14: 603c bras 48b52 <== ALWAYS TAKEN type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 48b16: 0c80 0000 6000 cmpil #24576,%d0 48b1c: 6708 beqs 48b26 48b1e: 0c80 0000 2000 cmpil #8192,%d0 48b24: 660c bnes 48b32 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 48b26: 2d45 ffe8 movel %d5,%fp@(-24) 48b2a: 7002 moveq #2,%d0 48b2c: 2d44 ffec movel %d4,%fp@(-20) */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 48b30: 6020 bras 48b52 <== ALWAYS TAKEN type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 48b32: 0c80 0000 1000 cmpil #4096,%d0 48b38: 6606 bnes 48b40 <== ALWAYS TAKEN 48b3a: 303c 0007 movew #7,%d0 48b3e: 6012 bras 48b52 <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 48b40: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48b46: 7416 moveq #22,%d2 <== NOT EXECUTED 48b48: 72ff moveq #-1,%d1 <== NOT EXECUTED 48b4a: 2040 moveal %d0,%a0 <== NOT EXECUTED 48b4c: 2082 movel %d2,%a0@ <== NOT EXECUTED 48b4e: 6032 bras 48b82 <== NOT EXECUTED 48b50: 7001 moveq #1,%d0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 48b52: 486e ffe8 pea %fp@(-24) 48b56: 2f02 movel %d2,%sp@- 48b58: 486e ffc7 pea %fp@(-57) 48b5c: 2f00 movel %d0,%sp@- 48b5e: 2f2e 0018 movel %fp@(24),%sp@- 48b62: 4eb9 0004 ac96 jsr 4ac96 new_name, mode, &info ); if ( !new_node ) 48b68: 4fef 0014 lea %sp@(20),%sp 48b6c: 4a80 tstl %d0 48b6e: 6704 beqs 48b74 <== ALWAYS TAKEN 48b70: 4281 clrl %d1 48b72: 600e bras 48b82 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 48b74: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48b7a: 72ff moveq #-1,%d1 <== NOT EXECUTED 48b7c: 2040 moveal %d0,%a0 <== NOT EXECUTED 48b7e: 700c moveq #12,%d0 <== NOT EXECUTED 48b80: 2080 movel %d0,%a0@ <== NOT EXECUTED return 0; } 48b82: 2001 movel %d1,%d0 48b84: 4cee 003c ffb4 moveml %fp@(-76),%d2-%d5 48b8a: 4e5e unlk %fp 48b8c: 4e75 rts ... 00042bd0 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42bd0: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42bd2: 4e56 0000 linkw %fp,#0 42bd6: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42bda: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42bde: b0a8 0048 cmpl %a0@(72),%d0 42be2: 6710 beqs 42bf4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42be4: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 42bea: 7214 moveq #20,%d1 <== NOT EXECUTED 42bec: 2040 moveal %d0,%a0 <== NOT EXECUTED 42bee: 70ff moveq #-1,%d0 <== NOT EXECUTED 42bf0: 2081 movel %d1,%a0@ <== NOT EXECUTED 42bf2: 6006 bras 42bfa <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 42bf4: 2149 0058 movel %a1,%a0@(88) 42bf8: 4280 clrl %d0 return 0; } 42bfa: 4e5e unlk %fp 42bfc: 4e75 rts ... 00043412 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43412: 4e56 0000 linkw %fp,#0 43416: 2f0a movel %a2,%sp@- 43418: 246e 0008 moveal %fp@(8),%a2 4341c: 2f02 movel %d2,%sp@- assert( the_jnode ); 4341e: 4a8a tstl %a2 43420: 6614 bnes 43436 <== NEVER TAKEN 43422: 4879 0005 e8e0 pea 5e8e0 <== NOT EXECUTED 43428: 4879 0005 ea78 pea 5ea78 <__FUNCTION__.6535> <== NOT EXECUTED 4342e: 4878 0038 pea 38 <== NOT EXECUTED 43432: 6000 00c6 braw 434fa <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 43436: 2079 0006 02fc moveal 602fc <_impure_ptr>,%a0 switch( the_jnode->type ) { 4343c: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4343e: 2f28 0008 movel %a0@(8),%sp@- 43442: 486a 000c pea %a2@(12) 43446: 4eb9 0004 fb08 jsr 4fb08 switch( the_jnode->type ) { 4344c: 202a 0048 movel %a2@(72),%d0 43450: 2200 movel %d0,%d1 43452: 508f addql #8,%sp 43454: 5381 subql #1,%d1 43456: b481 cmpl %d1,%d2 43458: 6500 00f0 bcsw 4354a <== ALWAYS TAKEN 4345c: 2079 0006 02fc moveal 602fc <_impure_ptr>,%a0 43462: 303b 1a08 movew %pc@(4346c ,%d1:l:2),%d0 43466: 48c0 extl %d0 43468: 4efb 0802 jmp %pc@(4346c ,%d0:l) 4346c: 000e 016 <== NOT EXECUTED 4346e: 0022 042 <== NOT EXECUTED 43470: 006e 0156 <== NOT EXECUTED 43472: 009a 0052 0032 oril #5374002,%d2 <== NOT EXECUTED 43478: 00bc 2f28 0008 oril #791150600,%d4 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 4347e: 4878 002f pea 2f 43482: 4eb9 0004 f9dc jsr 4f9dc break; 43488: 508f addql #8,%sp 4348a: 6000 00e8 braw 43574 <== ALWAYS TAKEN case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4348e: 2f2a 0050 movel %a2@(80),%sp@- 43492: 2f2a 004c movel %a2@(76),%sp@- 43496: 4879 0005 e933 pea 5e933 4349c: 600e bras 434ac <== ALWAYS TAKEN the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4349e: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 434a2: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 434a6: 4879 0005 e946 pea 5e946 <== NOT EXECUTED 434ac: 2f28 0008 movel %a0@(8),%sp@- 434b0: 4eb9 0004 f99c jsr 4f99c (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 434b6: 4fef 0010 lea %sp@(16),%sp 434ba: 6000 00b8 braw 43574 <== ALWAYS TAKEN the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 434be: 2f2a 0050 movel %a2@(80),%sp@- 434c2: 4879 0005 e955 pea 5e955 434c8: 2f28 0008 movel %a0@(8),%sp@- 434cc: 4eb9 0004 f99c jsr 4f99c (uint32_t)the_jnode->info.file.size ); #endif break; 434d2: 4fef 000c lea %sp@(12),%sp 434d6: 6000 009c braw 43574 <== ALWAYS TAKEN case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 434da: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 434de: 4879 0005 e961 pea 5e961 <== NOT EXECUTED 434e4: 4eb9 0004 fb08 jsr 4fb08 <== NOT EXECUTED assert(0); 434ea: 4879 0005 e049 pea 5e049 <== NOT EXECUTED 434f0: 4879 0005 ea78 pea 5ea78 <__FUNCTION__.6535> <== NOT EXECUTED 434f6: 4878 005d pea 5d <== NOT EXECUTED 434fa: 4879 0005 e8ea pea 5e8ea <== NOT EXECUTED 43500: 4eb9 0004 3cd8 jsr 43cd8 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 43506: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4350a: 4879 0005 e961 pea 5e961 <== NOT EXECUTED 43510: 4eb9 0004 fb08 jsr 4fb08 <== NOT EXECUTED assert(0); 43516: 4879 0005 e049 pea 5e049 <== NOT EXECUTED 4351c: 4879 0005 ea78 pea 5ea78 <__FUNCTION__.6535> <== NOT EXECUTED 43522: 4878 0062 pea 62 <== NOT EXECUTED 43526: 60d2 bras 434fa <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 43528: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4352c: 4879 0005 e975 pea 5e975 <== NOT EXECUTED 43532: 4eb9 0004 fb08 jsr 4fb08 <== NOT EXECUTED assert(0); 43538: 4879 0005 e049 pea 5e049 <== NOT EXECUTED 4353e: 4879 0005 ea78 pea 5ea78 <__FUNCTION__.6535> <== NOT EXECUTED 43544: 4878 0067 pea 67 <== NOT EXECUTED 43548: 60b0 bras 434fa <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 4354a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4354c: 4879 0005 e988 pea 5e988 <== NOT EXECUTED 43552: 2079 0006 02fc moveal 602fc <_impure_ptr>,%a0 <== NOT EXECUTED 43558: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4355c: 4eb9 0004 f99c jsr 4f99c <== NOT EXECUTED assert(0); 43562: 4879 0005 e049 pea 5e049 <== NOT EXECUTED 43568: 4879 0005 ea78 pea 5ea78 <__FUNCTION__.6535> <== NOT EXECUTED 4356e: 4878 006c pea 6c <== NOT EXECUTED 43572: 6086 bras 434fa <== NOT EXECUTED break; } puts(""); } 43574: 242e fff8 movel %fp@(-8),%d2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43578: 203c 0005 f052 movel #389202,%d0 } 4357e: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43582: 2d40 0008 movel %d0,%fp@(8) } 43586: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43588: 4ef9 0005 1344 jmp 51344 00042c14 : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42c14: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42c16: 4e56 0000 linkw %fp,#0 42c1a: 206e 0008 moveal %fp@(8),%a0 42c1e: 2f0a movel %a2,%sp@- IMFS_jnode_t *node; int i; node = loc->node_access; 42c20: 2050 moveal %a0@,%a0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42c22: 2f02 movel %d2,%sp@- 42c24: 226e 000c moveal %fp@(12),%a1 42c28: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42c2c: b0a8 0048 cmpl %a0@(72),%d0 42c30: 6604 bnes 42c36 <== ALWAYS TAKEN 42c32: 4200 clrb %d0 42c34: 6016 bras 42c4c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42c36: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 42c3c: 7216 moveq #22,%d1 <== NOT EXECUTED 42c3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c40: 70ff moveq #-1,%d0 <== NOT EXECUTED 42c42: 2081 movel %d1,%a0@ <== NOT EXECUTED 42c44: 6014 bras 42c5a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 42c46: 1381 0800 moveb %d1,%a1@(00000000,%d0:l) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42c4a: 5280 addql #1,%d0 42c4c: b480 cmpl %d0,%d2 42c4e: 630a blss 42c5a 42c50: 2468 004c moveal %a0@(76),%a2 42c54: 1232 0800 moveb %a2@(00000000,%d0:l),%d1 42c58: 66ec bnes 42c46 buf[i] = node->info.sym_link.name[i]; return i; } 42c5a: 242e fff8 movel %fp@(-8),%d2 42c5e: 246e fffc moveal %fp@(-4),%a2 42c62: 4e5e unlk %fp 42c64: 4e75 rts ... 00042c68 : 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 */ ) { 42c68: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42c6c: 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 */ ) { 42c70: 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 ); 42c72: 4878 0020 pea 20 <== NOT EXECUTED 42c76: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42c7a: 2450 moveal %a0@,%a2 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42c7c: 486a 000c pea %a2@(12) <== NOT EXECUTED 42c80: 4eb9 0005 17f4 jsr 517f4 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 42c86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42c8a: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 42c8e: 670a beqs 42c9a <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42c90: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42c92: 4eb9 0004 70e0 jsr 470e0 <_Chain_Extract> <== NOT EXECUTED 42c98: 588f addql #4,%sp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 42c9a: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 42c9e: 2050 moveal %a0@,%a0 <== NOT EXECUTED the_jnode->Parent = new_parent; 42ca0: 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 ); 42ca4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42ca6: 4868 004c pea %a0@(76) <== NOT EXECUTED 42caa: 4eb9 0004 70a8 jsr 470a8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 42cb0: 42a7 clrl %sp@- <== NOT EXECUTED 42cb2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 42cb6: 4eb9 0004 3554 jsr 43554 <== NOT EXECUTED 42cbc: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED return 0; } 42cc2: 4280 clrl %d0 <== NOT EXECUTED 42cc4: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 42cc8: 4e5e unlk %fp <== NOT EXECUTED 42cca: 4e75 rts 00048ba4 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 48ba4: 4e56 fff8 linkw %fp,#-8 48ba8: 2f0b movel %a3,%sp@- 48baa: 266e 000c moveal %fp@(12),%a3 48bae: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 48bb0: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 48bb2: 4aaa 0008 tstl %a2@(8) 48bb6: 670e beqs 48bc6 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 48bb8: 2f0a movel %a2,%sp@- 48bba: 4eb9 0004 9878 jsr 49878 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 48bc0: 588f addql #4,%sp 48bc2: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 48bc6: 302a 0032 movew %a2@(50),%d0 48bca: 5380 subql #1,%d0 48bcc: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 48bd0: 42a7 clrl %sp@- 48bd2: 486e fff8 pea %fp@(-8) 48bd6: 4eb9 0004 8fe0 jsr 48fe0 48bdc: 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) ) { 48be2: 2f0a movel %a2,%sp@- 48be4: 4eb9 0004 90b2 jsr 490b2 48bea: 4fef 000c lea %sp@(12),%sp 48bee: 4a80 tstl %d0 48bf0: 663a bnes 48c2c <== ALWAYS TAKEN 48bf2: 4a6a 0032 tstw %a2@(50) 48bf6: 6634 bnes 48c2c <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 48bf8: 2079 0005 a364 moveal 5a364 ,%a0 48bfe: 2653 moveal %a3@,%a3 48c00: b7e8 0004 cmpal %a0@(4),%a3 48c04: 6604 bnes 48c0a <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 48c06: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 48c0a: 7004 moveq #4,%d0 48c0c: b0aa 0048 cmpl %a2@(72),%d0 48c10: 6610 bnes 48c22 if ( the_jnode->info.sym_link.name ) 48c12: 202a 004c movel %a2@(76),%d0 48c16: 670a beqs 48c22 <== ALWAYS TAKEN free( (void*) the_jnode->info.sym_link.name ); 48c18: 2f00 movel %d0,%sp@- 48c1a: 4eb9 0004 8e80 jsr 48e80 48c20: 588f addql #4,%sp } free( the_jnode ); 48c22: 2f0a movel %a2,%sp@- 48c24: 4eb9 0004 8e80 jsr 48e80 48c2a: 588f addql #4,%sp } return 0; } 48c2c: 246e fff0 moveal %fp@(-16),%a2 48c30: 4280 clrl %d0 48c32: 266e fff4 moveal %fp@(-12),%a3 48c36: 4e5e unlk %fp 48c38: 4e75 rts ... 00048c3c : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 48c3c: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 48c3e: 4e56 0000 linkw %fp,#0 48c42: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 48c46: 2250 moveal %a0@,%a1 switch ( the_jnode->type ) { 48c48: 2029 0048 movel %a1@(72),%d0 48c4c: 5580 subql #2,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 48c4e: 206e 000c moveal %fp@(12),%a0 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 48c52: b280 cmpl %d0,%d1 48c54: 653e bcss 48c94 <== ALWAYS TAKEN 48c56: 303b 0a08 movew %pc@(48c60 ,%d0:l:2),%d0 48c5a: 48c0 extl %d0 48c5c: 4efb 0802 jmp %pc@(48c60 ,%d0:l) 48c60: 000c 014 <== NOT EXECUTED 48c62: 0034 064 <== NOT EXECUTED 48c64: 0026 046 <== NOT EXECUTED 48c66: 001c 034 <== NOT EXECUTED 48c68: 001c 034 <== NOT EXECUTED 48c6a: 0026 046 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 48c6c: 2029 0050 movel %a1@(80),%d0 48c70: 2169 004c 0016 movel %a1@(76),%a0@(22) 48c76: 2140 001a movel %d0,%a0@(26) break; 48c7a: 602a bras 48ca6 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 48c7c: 2029 004c movel %a1@(76),%d0 48c80: 2229 0050 movel %a1@(80),%d1 48c84: 6004 bras 48c8a <== ALWAYS TAKEN case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 48c86: 4280 clrl %d0 <== NOT EXECUTED 48c88: 4281 clrl %d1 <== NOT EXECUTED 48c8a: 2140 001e movel %d0,%a0@(30) 48c8e: 2141 0022 movel %d1,%a0@(34) break; 48c92: 6012 bras 48ca6 <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 48c94: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48c9a: 2040 moveal %d0,%a0 <== NOT EXECUTED 48c9c: 70ff moveq #-1,%d0 <== NOT EXECUTED 48c9e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 48ca4: 6032 bras 48cd8 <== 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; 48ca6: 4280 clrl %d0 break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 48ca8: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 48cae: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 48cb4: 2169 0040 002e movel %a1@(64),%a0@(46) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 48cba: 2169 002e 000c movel %a1@(46),%a0@(12) 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; 48cc0: 2169 0044 0036 movel %a1@(68),%a0@(54) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 48cc6: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 48ccc: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 48cd2: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 48cd8: 4e5e unlk %fp 48cda: 4e75 rts 00042ccc : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 42ccc: 4e56 ffc4 linkw %fp,#-60 42cd0: 2f03 movel %d3,%sp@- 42cd2: 262e 0010 movel %fp@(16),%d3 42cd6: 2f02 movel %d2,%sp@- int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 42cd8: 240e movel %fp,%d2 42cda: 0682 ffff ffc7 addil #-57,%d2 42ce0: 2f03 movel %d3,%sp@- 42ce2: 4eb9 0005 17dc jsr 517dc 42ce8: 588f addql #4,%sp 42cea: 486e fffc pea %fp@(-4) 42cee: 2f02 movel %d2,%sp@- 42cf0: 2f00 movel %d0,%sp@- 42cf2: 2f03 movel %d3,%sp@- 42cf4: 4eb9 0004 d2d8 jsr 4d2d8 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 42cfa: 2f2e 000c movel %fp@(12),%sp@- 42cfe: 4eb9 0005 134c jsr 5134c if (info.sym_link.name == NULL) { 42d04: 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); 42d08: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 42d0c: 6608 bnes 42d16 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 42d0e: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 42d14: 6038 bras 42d4e <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 42d16: 486e ffe8 pea %fp@(-24) 42d1a: 2f3c 0000 a1ff movel #41471,%sp@- 42d20: 2f02 movel %d2,%sp@- 42d22: 4878 0004 pea 4 42d26: 2f2e 0008 movel %fp@(8),%sp@- 42d2a: 4eb9 0004 c7c2 jsr 4c7c2 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 42d30: 4fef 0014 lea %sp@(20),%sp 42d34: 4a80 tstl %d0 42d36: 6704 beqs 42d3c <== ALWAYS TAKEN 42d38: 4281 clrl %d1 42d3a: 601a bras 42d56 <== ALWAYS TAKEN free(info.sym_link.name); 42d3c: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 42d40: 4eb9 0004 34cc jsr 434cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 42d46: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 42d4c: 588f addql #4,%sp <== NOT EXECUTED 42d4e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d50: 700c moveq #12,%d0 <== NOT EXECUTED 42d52: 72ff moveq #-1,%d1 <== NOT EXECUTED 42d54: 2080 movel %d0,%a0@ <== NOT EXECUTED } return 0; } 42d56: 242e ffbc movel %fp@(-68),%d2 42d5a: 2001 movel %d1,%d0 42d5c: 262e ffc0 movel %fp@(-64),%d3 42d60: 4e5e unlk %fp 42d62: 4e75 rts 00042d64 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42d64: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42d66: 4e56 ffd0 linkw %fp,#-48 42d6a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42d6e: 246e 000c moveal %fp@(12),%a2 42d72: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42d76: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42d78: b0ab 0048 cmpl %a3@(72),%d0 42d7c: 6600 0086 bnew 42e04 if ( !node->info.hard_link.link_node ) 42d80: 282b 004c movel %a3@(76),%d4 42d84: 6610 bnes 42d96 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42d86: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 42d8c: 7216 moveq #22,%d1 <== NOT EXECUTED 42d8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d90: 70ff moveq #-1,%d0 <== NOT EXECUTED 42d92: 2081 movel %d1,%a0@ <== NOT EXECUTED 42d94: 607e bras 42e14 <== NOT EXECUTED the_link = *loc; 42d96: 4878 0014 pea 14 42d9a: 240e movel %fp,%d2 42d9c: 0682 ffff ffe4 addil #-28,%d2 42da2: 2f0a movel %a2,%sp@- 42da4: 2f02 movel %d2,%sp@- 42da6: 4eb9 0005 0c80 jsr 50c80 the_link.node_access = node->info.hard_link.link_node; 42dac: 2d44 ffe4 movel %d4,%fp@(-28) /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 42db0: 7801 moveq #1,%d4 if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 42db2: 2f02 movel %d2,%sp@- 42db4: 4eb9 0004 c8d0 jsr 4c8d0 /* * 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) 42dba: 206b 004c moveal %a3@(76),%a0 42dbe: 4281 clrl %d1 42dc0: 4fef 0010 lea %sp@(16),%sp 42dc4: 3028 0032 movew %a0@(50),%d0 42dc8: 3200 movew %d0,%d1 42dca: b881 cmpl %d1,%d4 42dcc: 6618 bnes 42de6 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 42dce: 2f02 movel %d2,%sp@- 42dd0: 206e ffec moveal %fp@(-20),%a0 42dd4: 2f03 movel %d3,%sp@- 42dd6: 2068 0034 moveal %a0@(52),%a0 42dda: 4e90 jsr %a0@ if ( result != 0 ) 42ddc: 508f addql #8,%sp 42dde: 4a80 tstl %d0 42de0: 6722 beqs 42e04 42de2: 70ff moveq #-1,%d0 42de4: 602e bras 42e14 <== ALWAYS TAKEN return -1; } else { node->info.hard_link.link_node->st_nlink --; 42de6: 5380 subql #1,%d0 42de8: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 42dec: 42a7 clrl %sp@- 42dee: 486e fff8 pea %fp@(-8) 42df2: 4eb9 0004 3554 jsr 43554 42df8: 206b 004c moveal %a3@(76),%a0 42dfc: 508f addql #8,%sp 42dfe: 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 ); 42e04: 2f0a movel %a2,%sp@- 42e06: 206a 0008 moveal %a2@(8),%a0 42e0a: 2f03 movel %d3,%sp@- 42e0c: 2068 0034 moveal %a0@(52),%a0 42e10: 4e90 jsr %a0@ return result; 42e12: 508f addql #8,%sp } 42e14: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 42e1a: 4e5e unlk %fp 42e1c: 4e75 rts ... 00042e20 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42e20: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42e22: 4e56 0000 linkw %fp,#0 42e26: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42e2a: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42e2e: b0a8 0048 cmpl %a0@(72),%d0 42e32: 6710 beqs 42e44 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42e34: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 42e3a: 72ff moveq #-1,%d1 <== NOT EXECUTED 42e3c: 2040 moveal %d0,%a0 <== NOT EXECUTED 42e3e: 7014 moveq #20,%d0 <== NOT EXECUTED 42e40: 2080 movel %d0,%a0@ <== NOT EXECUTED 42e42: 601c bras 42e60 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 42e44: 4aa8 0058 tstl %a0@(88) 42e48: 6610 bnes 42e5a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42e4a: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 42e50: 72ff moveq #-1,%d1 <== NOT EXECUTED 42e52: 2040 moveal %d0,%a0 <== NOT EXECUTED 42e54: 7016 moveq #22,%d0 <== NOT EXECUTED 42e56: 2080 movel %d0,%a0@ <== NOT EXECUTED 42e58: 6006 bras 42e60 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 42e5a: 42a8 0058 clrl %a0@(88) 42e5e: 4281 clrl %d1 return 0; } 42e60: 2001 movel %d1,%d0 42e62: 4e5e unlk %fp 42e64: 4e75 rts ... 00042394 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 42394: 4e56 0000 linkw %fp,#0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 42398: 2079 0005 a8a6 moveal 5a8a6 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 4239e: 2f03 movel %d3,%sp@- 423a0: 262e 0008 movel %fp@(8),%d3 423a4: 2f02 movel %d2,%sp@- 423a6: 242e 000c movel %fp@(12),%d2 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 423aa: 4a88 tstl %a0 423ac: 6704 beqs 423b2 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 423ae: 2050 moveal %a0@,%a0 <== NOT EXECUTED 423b0: 4e90 jsr %a0@ <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 423b2: 4eb9 0004 92ea jsr 492ea /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 423b8: 2079 0005 a8aa moveal 5a8aa ,%a0 423be: 4a88 tstl %a0 423c0: 6712 beqs 423d4 <== NEVER TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 423c2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 423c6: 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)( 423c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423ca: 2050 moveal %a0@,%a0 <== NOT EXECUTED 423cc: 4e90 jsr %a0@ <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 423ce: 508f addql #8,%sp <== NOT EXECUTED 423d0: 9480 subl %d0,%d2 <== NOT EXECUTED 423d2: 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 ( 423d4: 4a39 0005 a8a5 tstb 5a8a5 423da: 6618 bnes 423f4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 423dc: 4a39 0005 a32c tstb 5a32c 423e2: 6710 beqs 423f4 ) { memset( heap_begin, 0, heap_size ); 423e4: 2f02 movel %d2,%sp@- 423e6: 42a7 clrl %sp@- 423e8: 2f03 movel %d3,%sp@- 423ea: 4eb9 0004 c270 jsr 4c270 423f0: 4fef 000c lea %sp@(12),%sp * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 423f4: 4a39 0005 a8a5 tstb 5a8a5 423fa: 6626 bnes 42422 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 423fc: 4878 0004 pea 4 42400: 2f02 movel %d2,%sp@- 42402: 2f03 movel %d3,%sp@- 42404: 2f39 0005 a260 movel 5a260 ,%sp@- 4240a: 4eb9 0004 5cb0 jsr 45cb0 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42410: 4fef 0010 lea %sp@(16),%sp 42414: 4a80 tstl %d0 42416: 660a bnes 42422 <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 42418: 4878 001a pea 1a <== NOT EXECUTED 4241c: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42422: 2f39 0005 a260 movel 5a260 ,%sp@- 42428: 2439 0005 b8e4 movel 5b8e4 ,%d2 4242e: 4eb9 0004 6714 jsr 46714 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42434: 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) ); 42438: d082 addl %d2,%d0 4243a: 588f addql #4,%sp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 4243c: 242e fff8 movel %fp@(-8),%d2 42440: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42442: 23c0 0005 b8e4 movel %d0,5b8e4 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42448: 4e75 rts ... 00044ba6 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 44ba6: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 44baa: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 44bae: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 44bb2: 4a8a tstl %a2 <== NOT EXECUTED 44bb4: 6700 0100 beqw 44cb6 <== NOT EXECUTED return; if ( !print_handler ) 44bb8: 2879 0009 770c moveal 9770c ,%a4 <== NOT EXECUTED 44bbe: 4a8c tstl %a4 <== NOT EXECUTED 44bc0: 6700 00f4 beqw 44cb6 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 44bc4: 70ff moveq #-1,%d0 <== NOT EXECUTED 44bc6: b08a cmpl %a2,%d0 <== NOT EXECUTED 44bc8: 6616 bnes 44be0 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 44bca: 4ab9 0009 a658 tstl 9a658 <== NOT EXECUTED 44bd0: 6700 00e4 beqw 44cb6 <== NOT EXECUTED 44bd4: 47f9 0009 a654 lea 9a654 ,%a3 <== NOT EXECUTED 44bda: 4284 clrl %d4 <== NOT EXECUTED 44bdc: 95ca subal %a2,%a2 <== NOT EXECUTED 44bde: 6008 bras 44be8 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 44be0: 282a 00fc movel %a2@(252),%d4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 44be4: 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); 44be8: 2613 movel %a3@,%d3 <== NOT EXECUTED 44bea: 0683 ffff fff0 addil #-16,%d3 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 44bf0: 242b 0004 movel %a3@(4),%d2 <== NOT EXECUTED 44bf4: 0682 0000 0010 addil #16,%d2 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 44bfa: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44bfc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44bfe: 4eb9 0004 4b76 jsr 44b76 <== NOT EXECUTED if ( high_water_mark ) 44c04: 508f addql #8,%sp <== NOT EXECUTED 44c06: 4a80 tstl %d0 <== NOT EXECUTED 44c08: 6604 bnes 44c0e <== NOT EXECUTED 44c0a: 4282 clrl %d2 <== NOT EXECUTED 44c0c: 6004 bras 44c12 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 44c0e: d483 addl %d3,%d2 <== NOT EXECUTED 44c10: 9480 subl %d0,%d2 <== NOT EXECUTED else used = 0; if ( the_thread ) { 44c12: 4a8a tstl %a2 <== NOT EXECUTED 44c14: 672c beqs 44c42 <== NOT EXECUTED (*print_handler)( 44c16: 486e fffb pea %fp@(-5) <== NOT EXECUTED 44c1a: 4878 0005 pea 5 <== NOT EXECUTED 44c1e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 44c22: 4eb9 0004 a0bc jsr 4a0bc <== NOT EXECUTED 44c28: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44c2a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 44c2e: 4879 0008 d36f pea 8d36f <== NOT EXECUTED 44c34: 2f39 0009 7708 movel 97708 ,%sp@- <== NOT EXECUTED 44c3a: 4e94 jsr %a4@ <== NOT EXECUTED 44c3c: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 44c40: 6016 bras 44c58 <== 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 ); 44c42: 4878 ffff pea ffffffff <== NOT EXECUTED 44c46: 4879 0008 d37c pea 8d37c <== NOT EXECUTED 44c4c: 2f39 0009 7708 movel 97708 ,%sp@- <== NOT EXECUTED 44c52: 4e94 jsr %a4@ <== NOT EXECUTED 44c54: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 44c58: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED 44c5c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44c5e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 44c60: 2013 movel %a3@,%d0 <== NOT EXECUTED 44c62: 5380 subql #1,%d0 <== NOT EXECUTED 44c64: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 44c68: 2f08 movel %a0,%sp@- <== NOT EXECUTED 44c6a: 4879 0008 d38a pea 8d38a <== NOT EXECUTED 44c70: 2f39 0009 7708 movel 97708 ,%sp@- <== NOT EXECUTED 44c76: 2079 0009 770c moveal 9770c ,%a0 <== NOT EXECUTED 44c7c: 4e90 jsr %a0@ <== NOT EXECUTED 44c7e: 2079 0009 770c moveal 9770c ,%a0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 44c84: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44c88: 4ab9 0009 7704 tstl 97704 <== NOT EXECUTED 44c8e: 6612 bnes 44ca2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 44c90: 4879 0008 d3a8 pea 8d3a8 <== NOT EXECUTED 44c96: 2f39 0009 7708 movel 97708 ,%sp@- <== NOT EXECUTED 44c9c: 4e90 jsr %a0@ <== NOT EXECUTED 44c9e: 508f addql #8,%sp <== NOT EXECUTED 44ca0: 6014 bras 44cb6 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 44ca2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44ca4: 4879 0008 d3b5 pea 8d3b5 <== NOT EXECUTED 44caa: 2f39 0009 7708 movel 97708 ,%sp@- <== NOT EXECUTED 44cb0: 4e90 jsr %a0@ <== NOT EXECUTED 44cb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 44cb6: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 44cbc: 4e5e unlk %fp <== NOT EXECUTED 44cbe: 4e75 rts 00044ece : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 44ece: 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) 44ed2: 4ab9 0009 7704 tstl 97704 44ed8: 6656 bnes 44f30 44eda: 41f9 0009 a644 lea 9a644 ,%a0 44ee0: 4280 clrl %d0 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 44ee2: 43f9 0008 d4ec lea 8d4ec ,%a1 44ee8: 7203 moveq #3,%d1 44eea: c280 andl %d0,%d1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 44eec: 5280 addql #1,%d0 p[i] = pattern[ i%4 ]; 44eee: 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++ ) { 44ef2: 7204 moveq #4,%d1 44ef4: b280 cmpl %d0,%d1 44ef6: 66f0 bnes 44ee8 /* * 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) { 44ef8: 2039 0009 a7d8 movel 9a7d8 <_CPU_Interrupt_stack_low>,%d0 44efe: 6728 beqs 44f28 <== ALWAYS TAKEN 44f00: 2239 0009 a77c movel 9a77c <_CPU_Interrupt_stack_high>,%d1 44f06: 6720 beqs 44f28 <== ALWAYS TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 44f08: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 44f0a: 2f01 movel %d1,%sp@- 44f0c: 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; 44f10: 23c0 0009 a658 movel %d0,9a658 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 44f16: 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 - 44f18: 23c1 0009 a654 movel %d1,9a654 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 44f1e: 4eb9 0007 8028 jsr 78028 44f24: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 44f28: 7001 moveq #1,%d0 44f2a: 23c0 0009 7704 movel %d0,97704 } 44f30: 4e5e unlk %fp 44f32: 4e75 rts 00044b76 : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 44b76: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 44b78: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 44b7c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 44b80: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 44b84: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 44b88: d088 addl %a0,%d0 <== NOT EXECUTED 44b8a: 6010 bras 44b9c <== NOT EXECUTED if (*base != U32_PATTERN) 44b8c: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 44b92: b290 cmpl %a0@,%d1 <== NOT EXECUTED 44b94: 6704 beqs 44b9a <== NOT EXECUTED return (void *) base; 44b96: 2008 movel %a0,%d0 <== NOT EXECUTED 44b98: 6008 bras 44ba2 <== 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++) 44b9a: 5888 addql #4,%a0 <== NOT EXECUTED 44b9c: b088 cmpl %a0,%d0 <== NOT EXECUTED 44b9e: 62ec bhis 44b8c <== NOT EXECUTED 44ba0: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 44ba2: 4e5e unlk %fp <== NOT EXECUTED 44ba4: 4e75 rts 00044d3a : * * 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) { 44d3a: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 44d3e: 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"); 44d42: 4879 0008 d41c pea 8d41c <== NOT EXECUTED 44d48: 45f9 0004 7628 lea 47628 ,%a2 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 44d4e: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 44d52: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 44d56: 286b 00c0 moveal %a3@(192),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 44d5a: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 44d5c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44d5e: 4879 0008 d42c pea 8d42c <== NOT EXECUTED 44d64: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 44d66: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 44d6a: 4879 0008 d449 pea 8d449 <== NOT EXECUTED 44d70: 4e92 jsr %a2@ <== NOT EXECUTED printk( 44d72: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 44d76: 4879 0008 d45b pea 8d45b <== NOT EXECUTED 44d7c: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 44d7e: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 44d82: 4878 0020 pea 20 <== NOT EXECUTED 44d86: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 44d8a: 4eb9 0004 a0bc jsr 4a0bc <== NOT EXECUTED 44d90: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 44d94: 2e80 movel %d0,%sp@ <== NOT EXECUTED 44d96: 4879 0008 d46f pea 8d46f <== NOT EXECUTED 44d9c: 4e92 jsr %a2@ <== 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) 44d9e: 202b 00bc movel %a3@(188),%d0 <== NOT EXECUTED 44da2: 206b 00c0 moveal %a3@(192),%a0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 44da6: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 44daa: 2f08 movel %a0,%sp@- <== NOT EXECUTED 44dac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44dae: 4879 0008 d485 pea 8d485 <== NOT EXECUTED 44db4: 4e92 jsr %a2@ <== 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) { 44db6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44dba: 4a02 tstb %d2 <== NOT EXECUTED 44dbc: 6618 bnes 44dd6 <== NOT EXECUTED printk( 44dbe: 486c 0018 pea %a4@(24) <== NOT EXECUTED 44dc2: 486c 0008 pea %a4@(8) <== NOT EXECUTED 44dc6: 4878 0010 pea 10 <== NOT EXECUTED 44dca: 4879 0008 d4b6 pea 8d4b6 <== NOT EXECUTED 44dd0: 4e92 jsr %a2@ <== NOT EXECUTED 44dd2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 44dd6: 4878 0081 pea 81 <== NOT EXECUTED 44dda: 4eb9 0004 a944 jsr 4a944 <== NOT EXECUTED 00045710 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 45710: 4e56 0000 linkw %fp,#0 45714: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 45716: 2479 0005 bbce moveal 5bbce <_API_extensions_List>,%a2 4571c: 6008 bras 45726 <_API_extensions_Run_postdriver+0x16> <== 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)(); 4571e: 206a 0008 moveal %a2@(8),%a0 45722: 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 ) { 45724: 2452 moveal %a2@,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 45726: b5fc 0005 bbd2 cmpal #375762,%a2 4572c: 66f0 bnes 4571e <_API_extensions_Run_postdriver+0xe> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 4572e: 246e fffc moveal %fp@(-4),%a2 45732: 4e5e unlk %fp 45734: 4e75 rts 00045736 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 45736: 4e56 0000 linkw %fp,#0 4573a: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4573c: 2479 0005 bbce moveal 5bbce <_API_extensions_List>,%a2 45742: 6010 bras 45754 <_API_extensions_Run_postswitch+0x1e> <== ALWAYS TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 45744: 2f39 0005 baee movel 5baee <_Thread_Executing>,%sp@- 4574a: 206a 000c moveal %a2@(12),%a0 4574e: 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 ) { 45750: 2452 moveal %a2@,%a2 45752: 588f addql #4,%sp 45754: b5fc 0005 bbd2 cmpal #375762,%a2 4575a: 66e8 bnes 45744 <_API_extensions_Run_postswitch+0xe> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 4575c: 246e fffc moveal %fp@(-4),%a2 45760: 4e5e unlk %fp 45762: 4e75 rts 0004b3bc <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 4b3bc: 4e56 fff4 linkw %fp,#-12 4b3c0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4b3c4: 246e 0008 moveal %fp@(8),%a2 Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4b3c8: 4282 clrl %d2 4b3ca: 47f9 0004 6f90 lea 46f90 <_Thread_queue_Dequeue>,%a3 4b3d0: 6002 bras 4b3d4 <_CORE_barrier_Release+0x18> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 4b3d2: 5282 addql #1,%d2 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4b3d4: 2f0a movel %a2,%sp@- 4b3d6: 4e93 jsr %a3@ 4b3d8: 588f addql #4,%sp 4b3da: 4a80 tstl %d0 4b3dc: 66f4 bnes 4b3d2 <_CORE_barrier_Release+0x16> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } 4b3de: 2002 movel %d2,%d0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; 4b3e0: 42aa 0048 clrl %a2@(72) return count; } 4b3e4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4b3ea: 4e5e unlk %fp 4b3ec: 4e75 rts ... 000518d0 <_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 ) { 518d0: 4e56 ffe0 linkw %fp,#-32 518d4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 518d8: 246e 0008 moveal %fp@(8),%a2 518dc: 2a2e 000c movel %fp@(12),%d5 518e0: 262e 0010 movel %fp@(16),%d3 518e4: 286e 001c moveal %fp@(28),%a4 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 518e8: b6aa 004c cmpl %a2@(76),%d3 518ec: 6304 blss 518f2 <_CORE_message_queue_Broadcast+0x22> <== NEVER TAKEN 518ee: 7001 moveq #1,%d0 <== NOT EXECUTED 518f0: 6042 bras 51934 <_CORE_message_queue_Broadcast+0x64> <== NOT EXECUTED * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 518f2: 4aaa 0048 tstl %a2@(72) 518f6: 6610 bnes 51908 <_CORE_message_queue_Broadcast+0x38> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 518f8: 4282 clrl %d2 518fa: 283c 0005 3abc movel #342716,%d4 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 51900: 4bf9 0005 8aac lea 58aac ,%a5 51906: 601a bras 51922 <_CORE_message_queue_Broadcast+0x52> <== ALWAYS TAKEN * 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; 51908: 4294 clrl %a4@ 5190a: 6026 bras 51932 <_CORE_message_queue_Broadcast+0x62> <== ALWAYS TAKEN 5190c: 2f03 movel %d3,%sp@- */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5190e: 5282 addql #1,%d2 51910: 2f05 movel %d5,%sp@- 51912: 2f2b 002c movel %a3@(44),%sp@- 51916: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 51918: 206b 0028 moveal %a3@(40),%a0 5191c: 4fef 000c lea %sp@(12),%sp 51920: 2083 movel %d3,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 51922: 2f0a movel %a2,%sp@- 51924: 2044 moveal %d4,%a0 51926: 4e90 jsr %a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 51928: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5192a: 2640 moveal %d0,%a3 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5192c: 4a80 tstl %d0 5192e: 66dc bnes 5190c <_CORE_message_queue_Broadcast+0x3c> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 51930: 2882 movel %d2,%a4@ 51932: 4280 clrl %d0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 51934: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5193a: 4e5e unlk %fp 5193c: 4e75 rts ... 0004dc8c <_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)) { 4dc8c: 7003 moveq #3,%d0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4dc8e: 4e56 fff4 linkw %fp,#-12 4dc92: 222e 0014 movel %fp@(20),%d1 4dc96: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4dc9a: 246e 0008 moveal %fp@(8),%a2 4dc9e: 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)) { 4dca2: c081 andl %d1,%d0 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4dca4: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4dca8: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4dcac: 2541 004c movel %d1,%a2@(76) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4dcb0: 4a80 tstl %d0 4dcb2: 6604 bnes 4dcb8 <_CORE_message_queue_Initialize+0x2c> 4dcb4: 2001 movel %d1,%d0 4dcb6: 600c bras 4dcc4 <_CORE_message_queue_Initialize+0x38> <== ALWAYS TAKEN allocated_message_size += sizeof(uint32_t); 4dcb8: 2001 movel %d1,%d0 4dcba: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4dcbc: 76fc moveq #-4,%d3 4dcbe: c083 andl %d3,%d0 } if (allocated_message_size < maximum_message_size) 4dcc0: b280 cmpl %d0,%d1 4dcc2: 626e bhis 4dd32 <_CORE_message_queue_Initialize+0xa6> <== ALWAYS TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4dcc4: 2600 movel %d0,%d3 4dcc6: 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 * 4dccc: 2203 movel %d3,%d1 4dcce: 4c02 1800 mulsl %d2,%d1 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4dcd2: b081 cmpl %d1,%d0 4dcd4: 625c bhis 4dd32 <_CORE_message_queue_Initialize+0xa6> <== ALWAYS TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dcd6: 2f01 movel %d1,%sp@- 4dcd8: 4eb9 0005 0500 jsr 50500 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dcde: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dce0: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dce4: 674c beqs 4dd32 <_CORE_message_queue_Initialize+0xa6> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4dce6: 2f03 movel %d3,%sp@- 4dce8: 2f02 movel %d2,%sp@- 4dcea: 2f00 movel %d0,%sp@- 4dcec: 486a 0060 pea %a2@(96) 4dcf0: 4eb9 0005 1db4 jsr 51db4 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dcf6: 4878 0006 pea 6 4dcfa: 7001 moveq #1,%d0 4dcfc: 206e 000c moveal %fp@(12),%a0 4dd00: b090 cmpl %a0@,%d0 4dd02: 57c0 seq %d0 4dd04: 4878 0080 pea 80 4dd08: 49c0 extbl %d0 4dd0a: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4dd0c: 41ea 0054 lea %a2@(84),%a0 4dd10: 2f00 movel %d0,%sp@- 4dd12: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4dd16: 41ea 0050 lea %a2@(80),%a0 4dd1a: 2548 0058 movel %a0,%a2@(88) 4dd1e: 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; 4dd20: 42aa 0054 clrl %a2@(84) 4dd24: 4eb9 0004 fa40 jsr 4fa40 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dd2a: 4fef 0020 lea %sp@(32),%sp allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dd2e: 7001 moveq #1,%d0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dd30: 6002 bras 4dd34 <_CORE_message_queue_Initialize+0xa8> <== ALWAYS TAKEN 4dd32: 4200 clrb %d0 } 4dd34: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4dd3a: 4e5e unlk %fp 4dd3c: 4e75 rts ... 00051df4 <_CORE_message_queue_Insert_message>: #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 51df4: 203c 0000 0700 movel #1792,%d0 void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 51dfa: 4e56 0000 linkw %fp,#0 51dfe: 226e 0008 moveal %fp@(8),%a1 51e02: 206e 000c moveal %fp@(12),%a0 51e06: 2f0a movel %a2,%sp@- #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 51e08: 40c1 movew %sr,%d1 51e0a: 8081 orl %d1,%d0 51e0c: 46c0 movew %d0,%sr SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 51e0e: 52a9 0048 addql #1,%a1@(72) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 51e12: 203c 7fff ffff movel #2147483647,%d0 51e18: b0ae 0010 cmpl %fp@(16),%d0 51e1c: 6616 bnes 51e34 <_CORE_message_queue_Insert_message+0x40> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 51e1e: 45e9 0054 lea %a1@(84),%a2 51e22: 208a movel %a2,%a0@ old_last_node = the_chain->last; 51e24: 2469 0058 moveal %a1@(88),%a2 the_chain->last = the_node; 51e28: 2348 0058 movel %a0,%a1@(88) old_last_node->next = the_node; the_node->previous = old_last_node; 51e2c: 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; 51e30: 2488 movel %a0,%a2@ 51e32: 6012 bras 51e46 <_CORE_message_queue_Insert_message+0x52> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 51e34: 43e9 0050 lea %a1@(80),%a1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 51e38: 2451 moveal %a1@,%a2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 51e3a: 2149 0004 movel %a1,%a0@(4) before_node = after_node->next; after_node->next = the_node; 51e3e: 2288 movel %a0,%a1@ the_node->next = before_node; before_node->previous = the_node; 51e40: 2548 0004 movel %a0,%a2@(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; 51e44: 208a movel %a2,%a0@ _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 51e46: 46c1 movew %d1,%sr * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 51e48: 245f moveal %sp@+,%a2 51e4a: 4e5e unlk %fp 51e4c: 4e75 rts ... 0004dd40 <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4dd40: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dd46: 4e56 ffe0 linkw %fp,#-32 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4dd4a: 2079 0006 5022 moveal 65022 <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dd50: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4dd54: 282e 000c movel %fp@(12),%d4 4dd58: 262e 001c movel %fp@(28),%d3 4dd5c: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4dd60: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4dd64: 242e 0010 movel %fp@(16),%d2 4dd68: 226e 0014 moveal %fp@(20),%a1 4dd6c: 1a2e 001b moveb %fp@(27),%d5 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4dd70: 40c0 movew %sr,%d0 4dd72: 8280 orl %d0,%d1 4dd74: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dd76: 220a movel %a2,%d1 4dd78: 0681 0000 0054 addil #84,%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4dd7e: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dd82: b28b cmpl %a3,%d1 4dd84: 6752 beqs 4ddd8 <_CORE_message_queue_Seize+0x98> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4dd86: 2853 moveal %a3@,%a4 the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4dd88: 4bea 0050 lea %a2@(80),%a5 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4dd8c: 254c 0050 movel %a4,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4dd90: 294d 0004 movel %a5,%a4@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4dd94: 4a8b tstl %a3 4dd96: 6740 beqs 4ddd8 <_CORE_message_queue_Seize+0x98> <== ALWAYS TAKEN the_message_queue->number_of_pending_messages -= 1; 4dd98: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 4dd9c: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; 4dd9e: 22ab 0008 movel %a3@(8),%a1@ _Thread_Executing->Wait.count = 4dda2: 2079 0006 5022 moveal 65022 <_Thread_Executing>,%a0 4dda8: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ddac: 2f11 movel %a1@,%sp@- 4ddae: 486b 000c pea %a3@(12) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4ddb2: 45ea 0060 lea %a2@(96),%a2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ddb6: 2f02 movel %d2,%sp@- 4ddb8: 4eb9 0005 447c jsr 5447c RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4ddbe: 4fef 000c lea %sp@(12),%sp 4ddc2: 2d4a 0008 movel %a2,%fp@(8) 4ddc6: 2d4b 000c movel %a3,%fp@(12) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4ddca: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4ddd0: 4e5e unlk %fp 4ddd2: 4ef9 0004 dbc8 jmp 4dbc8 <_Chain_Append> return; } #endif } if ( !wait ) { 4ddd8: 4a05 tstb %d5 4ddda: 6612 bnes 4ddee <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 4dddc: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ddde: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4dde0: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4dde6: 2140 0034 movel %d0,%a0@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4ddea: 4e5e unlk %fp 4ddec: 4e75 rts RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4ddee: 7201 moveq #1,%d1 4ddf0: 2541 0030 movel %d1,%a2@(48) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4ddf4: 2149 0028 movel %a1,%a0@(40) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 4ddf8: 2142 002c movel %d2,%a0@(44) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4ddfc: 2144 0020 movel %d4,%a0@(32) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4de00: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 4de04: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4de06: 4bf9 0004 fafc lea 4fafc <_Thread_queue_Timeout>,%a5 4de0c: 2d43 000c movel %d3,%fp@(12) 4de10: 2d4d 0010 movel %a5,%fp@(16) 4de14: 2d4a 0008 movel %a2,%fp@(8) } 4de18: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4de1e: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4de20: 4ef9 0004 f810 jmp 4f810 <_Thread_queue_Enqueue_with_handler> ... 0004de28 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 4de28: 4e56 ffec linkw %fp,#-20 4de2c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4de30: 246e 0008 moveal %fp@(8),%a2 4de34: 282e 000c movel %fp@(12),%d4 4de38: 242e 0010 movel %fp@(16),%d2 4de3c: 262e 001c movel %fp@(28),%d3 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 4de40: b4aa 004c cmpl %a2@(76),%d2 4de44: 6304 blss 4de4a <_CORE_message_queue_Submit+0x22> 4de46: 7001 moveq #1,%d0 4de48: 6074 bras 4debe <_CORE_message_queue_Submit+0x96> <== ALWAYS TAKEN } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 4de4a: 4aaa 0048 tstl %a2@(72) 4de4e: 6630 bnes 4de80 <_CORE_message_queue_Submit+0x58> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4de50: 2f0a movel %a2,%sp@- 4de52: 4eb9 0004 f6d0 jsr 4f6d0 <_Thread_queue_Dequeue> if ( the_thread ) { 4de58: 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 ); 4de5a: 2640 moveal %d0,%a3 if ( the_thread ) { 4de5c: 4a80 tstl %d0 4de5e: 6720 beqs 4de80 <_CORE_message_queue_Submit+0x58> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4de60: 2f02 movel %d2,%sp@- 4de62: 2f04 movel %d4,%sp@- 4de64: 2f2b 002c movel %a3@(44),%sp@- 4de68: 4eb9 0005 447c jsr 5447c _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 4de6e: 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; 4de72: 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; 4de76: 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; 4de78: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 4de7a: 2743 0024 movel %d3,%a3@(36) #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; 4de7e: 603e bras 4debe <_CORE_message_queue_Submit+0x96> <== ALWAYS TAKEN /* * 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 ) { 4de80: 202a 0044 movel %a2@(68),%d0 4de84: b0aa 0048 cmpl %a2@(72),%d0 4de88: 6204 bhis 4de8e <_CORE_message_queue_Submit+0x66> 4de8a: 7002 moveq #2,%d0 4de8c: 6030 bras 4debe <_CORE_message_queue_Submit+0x96> <== ALWAYS TAKEN 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 *) 4de8e: 486a 0060 pea %a2@(96) 4de92: 4eb9 0004 dc28 jsr 4dc28 <_Chain_Get> 4de98: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4de9a: 2f02 movel %d2,%sp@- 4de9c: 2f04 movel %d4,%sp@- 4de9e: 486b 000c pea %a3@(12) 4dea2: 4eb9 0005 447c jsr 5447c _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 4dea8: 2742 0008 movel %d2,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 4deac: 2f03 movel %d3,%sp@- 4deae: 2f0b movel %a3,%sp@- 4deb0: 2f0a movel %a2,%sp@- 4deb2: 4eb9 0005 1df4 jsr 51df4 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4deb8: 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( 4debc: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 4debe: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4dec4: 4e5e unlk %fp 4dec6: 4e75 rts 000458c4 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 458c4: 4e56 fff4 linkw %fp,#-12 458c8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ /* 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; 458cc: 4878 000e pea e CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 458d0: 266e 000c moveal %fp@(12),%a3 458d4: 246e 0008 moveal %fp@(8),%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; 458d8: 2f0b movel %a3,%sp@- 458da: 486a 0040 pea %a2@(64) CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 458de: 242e 0010 movel %fp@(16),%d2 /* 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; 458e2: 4eb9 0004 c200 jsr 4c200 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 458e8: 4fef 000c lea %sp@(12),%sp rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; 458ec: 2542 004e movel %d2,%a2@(78) the_mutex->blocked_count = 0; 458f0: 42aa 0056 clrl %a2@(86) if ( initial_lock == CORE_MUTEX_LOCKED ) { 458f4: 4a82 tstl %d2 458f6: 663c bnes 45934 <_CORE_mutex_Initialize+0x70> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 458f8: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 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; 458fe: 7001 moveq #1,%d0 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45900: 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; 45902: 2540 0052 movel %d0,%a2@(82) the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 45906: 2568 0008 005e movel %a0@(8),%a2@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4590c: 202a 0046 movel %a2@(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; 45910: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45914: b280 cmpl %d0,%d1 45916: 6708 beqs 45920 <_CORE_mutex_Initialize+0x5c> 45918: 123c 0003 moveb #3,%d1 4591c: b280 cmpl %d0,%d1 4591e: 6620 bnes 45940 <_CORE_mutex_Initialize+0x7c> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 45920: 202a 004a movel %a2@(74),%d0 45924: b0a8 0014 cmpl %a0@(20),%d0 45928: 6304 blss 4592e <_CORE_mutex_Initialize+0x6a> 4592a: 7006 moveq #6,%d0 4592c: 6034 bras 45962 <_CORE_mutex_Initialize+0x9e> <== ALWAYS TAKEN _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++; 4592e: 52a8 001c addql #1,%a0@(28) 45932: 600c bras 45940 <_CORE_mutex_Initialize+0x7c> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 45934: 42aa 0052 clrl %a2@(82) the_mutex->holder = NULL; 45938: 42aa 005a clrl %a2@(90) the_mutex->holder_id = 0; 4593c: 42aa 005e clrl %a2@(94) } _Thread_queue_Initialize( 45940: 4aab 0006 tstl %a3@(6) 45944: 56c0 sne %d0 45946: 4878 0005 pea 5 4594a: 49c0 extbl %d0 4594c: 4878 0400 pea 400 45950: 4480 negl %d0 45952: 2f00 movel %d0,%sp@- 45954: 2f0a movel %a2,%sp@- 45956: 4eb9 0004 7300 jsr 47300 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 4595c: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 45960: 4280 clrl %d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 45962: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 45968: 4e5e unlk %fp 4596a: 4e75 rts 000459d0 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 459d0: 4e56 0000 linkw %fp,#0 459d4: 202e 0010 movel %fp@(16),%d0 459d8: 2f0a movel %a2,%sp@- 459da: 246e 0008 moveal %fp@(8),%a2 459de: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 459e0: 2239 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 459e6: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 459e8: 4a81 tstl %d1 459ea: 671c beqs 45a08 <_CORE_mutex_Seize+0x38> 459ec: 4a00 tstb %d0 459ee: 6718 beqs 45a08 <_CORE_mutex_Seize+0x38> <== ALWAYS TAKEN 459f0: 7001 moveq #1,%d0 459f2: b0b9 0005 bbb6 cmpl 5bbb6 <_System_state_Current>,%d0 459f8: 640e bccs 45a08 <_CORE_mutex_Seize+0x38> 459fa: 4878 0013 pea 13 459fe: 42a7 clrl %sp@- 45a00: 42a7 clrl %sp@- 45a02: 4eb9 0004 5f88 jsr 45f88 <_Internal_error_Occurred> 45a08: 486e 0018 pea %fp@(24) 45a0c: 2f0a movel %a2,%sp@- 45a0e: 4eb9 0004 9914 jsr 49914 <_CORE_mutex_Seize_interrupt_trylock> 45a14: 508f addql #8,%sp 45a16: 4a80 tstl %d0 45a18: 6750 beqs 45a6a <_CORE_mutex_Seize+0x9a> 45a1a: 4a02 tstb %d2 45a1c: 6614 bnes 45a32 <_CORE_mutex_Seize+0x62> 45a1e: 202e 0018 movel %fp@(24),%d0 45a22: 46c0 movew %d0,%sr 45a24: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 45a2a: 7001 moveq #1,%d0 45a2c: 2140 0034 movel %d0,%a0@(52) 45a30: 6038 bras 45a6a <_CORE_mutex_Seize+0x9a> <== ALWAYS TAKEN 45a32: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 45a38: 5280 addql #1,%d0 45a3a: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 45a40: 216e 000c 0020 movel %fp@(12),%a0@(32) 45a46: 23c0 0005 ba34 movel %d0,5ba34 <_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; 45a4c: 7001 moveq #1,%d0 45a4e: 214a 0044 movel %a2,%a0@(68) 45a52: 2540 0030 movel %d0,%a2@(48) 45a56: 202e 0018 movel %fp@(24),%d0 45a5a: 46c0 movew %d0,%sr 45a5c: 2f2e 0014 movel %fp@(20),%sp@- 45a60: 2f0a movel %a2,%sp@- 45a62: 4eb9 0004 596c jsr 4596c <_CORE_mutex_Seize_interrupt_blocking> 45a68: 508f addql #8,%sp } 45a6a: 242e fff8 movel %fp@(-8),%d2 45a6e: 246e fffc moveal %fp@(-4),%a2 45a72: 4e5e unlk %fp 45a74: 4e75 rts ... 00049914 <_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 ) { 49914: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 49918: 2279 0005 baee moveal 5baee <_Thread_Executing>,%a1 4991e: 2f0b movel %a3,%sp@- 49920: 206e 0008 moveal %fp@(8),%a0 49924: 2f0a movel %a2,%sp@- 49926: 246e 000c moveal %fp@(12),%a2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4992a: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4992e: 4aa8 004e tstl %a0@(78) 49932: 6700 0098 beqw 499cc <_CORE_mutex_Seize_interrupt_trylock+0xb8> the_mutex->lock = CORE_MUTEX_LOCKED; 49936: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4993a: 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; 4993c: 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; 49942: 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; 49946: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4994a: 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; 4994e: 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 ) || 49952: b280 cmpl %d0,%d1 49954: 6708 beqs 4995e <_CORE_mutex_Seize_interrupt_trylock+0x4a> 49956: 123c 0003 moveb #3,%d1 4995a: b280 cmpl %d0,%d1 4995c: 660a bnes 49968 <_CORE_mutex_Seize_interrupt_trylock+0x54> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4995e: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 49962: 7203 moveq #3,%d1 49964: b280 cmpl %d0,%d1 49966: 6706 beqs 4996e <_CORE_mutex_Seize_interrupt_trylock+0x5a> _ISR_Enable( *level_p ); 49968: 2012 movel %a2@,%d0 4996a: 46c0 movew %d0,%sr 4996c: 607c bras 499ea <_CORE_mutex_Seize_interrupt_trylock+0xd6> <== ALWAYS TAKEN */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4996e: 2028 004a movel %a0@(74),%d0 current = executing->current_priority; 49972: 2229 0014 movel %a1@(20),%d1 if ( current == ceiling ) { 49976: b081 cmpl %d1,%d0 49978: 6606 bnes 49980 <_CORE_mutex_Seize_interrupt_trylock+0x6c> _ISR_Enable( *level_p ); 4997a: 2012 movel %a2@,%d0 4997c: 46c0 movew %d0,%sr 4997e: 606a bras 499ea <_CORE_mutex_Seize_interrupt_trylock+0xd6> return 0; } if ( current > ceiling ) { 49980: b081 cmpl %d1,%d0 49982: 642e bccs 499b2 <_CORE_mutex_Seize_interrupt_trylock+0x9e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 49984: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 4998a: 5280 addql #1,%d0 4998c: 23c0 0005 ba34 movel %d0,5ba34 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 49992: 2012 movel %a2@,%d0 49994: 46c0 movew %d0,%sr _Thread_Change_priority( 49996: 42a7 clrl %sp@- 49998: 2f28 004a movel %a0@(74),%sp@- 4999c: 2f28 005a movel %a0@(90),%sp@- 499a0: 4eb9 0004 6774 jsr 46774 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 499a6: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> 499ac: 4fef 000c lea %sp@(12),%sp 499b0: 6038 bras 499ea <_CORE_mutex_Seize_interrupt_trylock+0xd6> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 499b2: 7006 moveq #6,%d0 the_mutex->lock = CORE_MUTEX_UNLOCKED; 499b4: 7201 moveq #1,%d1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 499b6: 2340 0034 movel %d0,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 499ba: 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; 499be: 2141 004e movel %d1,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 499c2: 53a9 001c subql #1,%a1@(28) _ISR_Enable( *level_p ); 499c6: 2012 movel %a2@,%d0 499c8: 46c0 movew %d0,%sr 499ca: 601e bras 499ea <_CORE_mutex_Seize_interrupt_trylock+0xd6> <== 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 ) ) { 499cc: 2668 005a moveal %a0@(90),%a3 499d0: b3cb cmpal %a3,%a1 499d2: 6626 bnes 499fa <_CORE_mutex_Seize_interrupt_trylock+0xe6> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 499d4: 2028 0040 movel %a0@(64),%d0 499d8: 6708 beqs 499e2 <_CORE_mutex_Seize_interrupt_trylock+0xce> 499da: 7201 moveq #1,%d1 499dc: b280 cmpl %d0,%d1 499de: 661a bnes 499fa <_CORE_mutex_Seize_interrupt_trylock+0xe6> <== NEVER TAKEN 499e0: 600c bras 499ee <_CORE_mutex_Seize_interrupt_trylock+0xda> <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 499e2: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 499e6: 2012 movel %a2@,%d0 499e8: 46c0 movew %d0,%sr 499ea: 4280 clrl %d0 499ec: 600e bras 499fc <_CORE_mutex_Seize_interrupt_trylock+0xe8> <== ALWAYS TAKEN return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 499ee: 7002 moveq #2,%d0 <== NOT EXECUTED 499f0: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 499f4: 2012 movel %a2@,%d0 <== NOT EXECUTED 499f6: 46c0 movew %d0,%sr <== NOT EXECUTED 499f8: 60f0 bras 499ea <_CORE_mutex_Seize_interrupt_trylock+0xd6> <== NOT EXECUTED 499fa: 7001 moveq #1,%d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 499fc: 246e fff8 moveal %fp@(-8),%a2 49a00: 266e fffc moveal %fp@(-4),%a3 49a04: 4e5e unlk %fp 49a06: 4e75 rts 00045a78 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 45a78: 4e56 0000 linkw %fp,#0 45a7c: 2f0a movel %a2,%sp@- 45a7e: 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; 45a82: 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 ) { 45a86: 4a2a 0044 tstb %a2@(68) 45a8a: 670e beqs 45a9a <_CORE_mutex_Surrender+0x22> if ( !_Thread_Is_executing( holder ) ) 45a8c: b1f9 0005 baee cmpal 5baee <_Thread_Executing>,%a0 45a92: 6706 beqs 45a9a <_CORE_mutex_Surrender+0x22> 45a94: 7003 moveq #3,%d0 45a96: 6000 00ce braw 45b66 <_CORE_mutex_Surrender+0xee> <== ALWAYS TAKEN return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 45a9a: 202a 0052 movel %a2@(82),%d0 45a9e: 6700 00c4 beqw 45b64 <_CORE_mutex_Surrender+0xec> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 45aa2: 5380 subql #1,%d0 45aa4: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 45aa8: 6600 00ba bnew 45b64 <_CORE_mutex_Surrender+0xec> 45aac: 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 ) || 45ab0: 7202 moveq #2,%d1 45ab2: b280 cmpl %d0,%d1 45ab4: 6708 beqs 45abe <_CORE_mutex_Surrender+0x46> 45ab6: 123c 0003 moveb #3,%d1 45aba: b280 cmpl %d0,%d1 45abc: 6604 bnes 45ac2 <_CORE_mutex_Surrender+0x4a> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 45abe: 53a8 001c subql #1,%a0@(28) 45ac2: 202a 0046 movel %a2@(70),%d0 /* * 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 ) || 45ac6: 7202 moveq #2,%d1 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 45ac8: 42aa 005a clrl %a2@(90) the_mutex->holder_id = 0; 45acc: 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 ) || 45ad0: b280 cmpl %d0,%d1 45ad2: 6708 beqs 45adc <_CORE_mutex_Surrender+0x64> 45ad4: 123c 0003 moveb #3,%d1 45ad8: b280 cmpl %d0,%d1 45ada: 6622 bnes 45afe <_CORE_mutex_Surrender+0x86> _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 && 45adc: 4aa8 001c tstl %a0@(28) 45ae0: 661c bnes 45afe <_CORE_mutex_Surrender+0x86> holder->real_priority != holder->current_priority ) { 45ae2: 2028 0018 movel %a0@(24),%d0 45ae6: b0a8 0014 cmpl %a0@(20),%d0 45aea: 6712 beqs 45afe <_CORE_mutex_Surrender+0x86> _Thread_Change_priority( holder, holder->real_priority, true ); 45aec: 4878 0001 pea 1 45af0: 2f00 movel %d0,%sp@- 45af2: 2f08 movel %a0,%sp@- 45af4: 4eb9 0004 6774 jsr 46774 <_Thread_Change_priority> 45afa: 4fef 000c lea %sp@(12),%sp /* * 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 ) ) ) { 45afe: 2f0a movel %a2,%sp@- 45b00: 4eb9 0004 6f90 jsr 46f90 <_Thread_queue_Dequeue> 45b06: 588f addql #4,%sp 45b08: 2040 moveal %d0,%a0 45b0a: 4a80 tstl %d0 45b0c: 674c beqs 45b5a <_CORE_mutex_Surrender+0xe2> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 45b0e: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 45b10: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 45b16: 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; 45b1a: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 45b1e: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 45b22: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 45b26: b280 cmpl %d0,%d1 45b28: 670a beqs 45b34 <_CORE_mutex_Surrender+0xbc> 45b2a: 123c 0003 moveb #3,%d1 45b2e: b280 cmpl %d0,%d1 45b30: 6632 bnes 45b64 <_CORE_mutex_Surrender+0xec> 45b32: 6006 bras 45b3a <_CORE_mutex_Surrender+0xc2> <== ALWAYS TAKEN 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++; 45b34: 52a8 001c addql #1,%a0@(28) 45b38: 602a bras 45b64 <_CORE_mutex_Surrender+0xec> <== 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++; 45b3a: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 45b3e: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 45b42: b0a8 0014 cmpl %a0@(20),%d0 45b46: 641c bccs 45b64 <_CORE_mutex_Surrender+0xec> _Thread_Change_priority( 45b48: 42a7 clrl %sp@- 45b4a: 2f00 movel %d0,%sp@- 45b4c: 2f08 movel %a0,%sp@- 45b4e: 4eb9 0004 6774 jsr 46774 <_Thread_Change_priority> 45b54: 4fef 000c lea %sp@(12),%sp 45b58: 600a bras 45b64 <_CORE_mutex_Surrender+0xec> <== ALWAYS TAKEN } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 45b5a: 7001 moveq #1,%d0 45b5c: 2540 004e movel %d0,%a2@(78) 45b60: 4200 clrb %d0 45b62: 6002 bras 45b66 <_CORE_mutex_Surrender+0xee> <== ALWAYS TAKEN 45b64: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 45b66: 246e fffc moveal %fp@(-4),%a2 45b6a: 4e5e unlk %fp 45b6c: 4e75 rts ... 00045bc4 <_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 ) { 45bc4: 4e56 0000 linkw %fp,#0 45bc8: 2f0a movel %a2,%sp@- 45bca: 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)) ) { 45bce: 2f0a movel %a2,%sp@- 45bd0: 4eb9 0004 6f90 jsr 46f90 <_Thread_queue_Dequeue> 45bd6: 588f addql #4,%sp 45bd8: 4a80 tstl %d0 45bda: 6704 beqs 45be0 <_CORE_semaphore_Surrender+0x1c> 45bdc: 4280 clrl %d0 45bde: 6024 bras 45c04 <_CORE_semaphore_Surrender+0x40> <== ALWAYS TAKEN if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 45be0: 203c 0000 0700 movel #1792,%d0 45be6: 40c1 movew %sr,%d1 45be8: 8081 orl %d1,%d0 45bea: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 45bec: 202a 0048 movel %a2@(72),%d0 45bf0: b0aa 0040 cmpl %a2@(64),%d0 45bf4: 6504 bcss 45bfa <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN 45bf6: 7004 moveq #4,%d0 <== NOT EXECUTED 45bf8: 6008 bras 45c02 <_CORE_semaphore_Surrender+0x3e> <== NOT EXECUTED the_semaphore->count += 1; 45bfa: 5280 addql #1,%d0 45bfc: 2540 0048 movel %d0,%a2@(72) 45c00: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 45c02: 46c1 movew %d1,%sr } return status; } 45c04: 246e fffc moveal %fp@(-4),%a2 45c08: 4e5e unlk %fp 45c0a: 4e75 rts 000498a0 <_Chain_Get>: { ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 498a0: 203c 0000 0700 movel #1792,%d0 */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 498a6: 4e56 0000 linkw %fp,#0 498aa: 206e 0008 moveal %fp@(8),%a0 498ae: 2f0a movel %a2,%sp@- ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 498b0: 40c1 movew %sr,%d1 498b2: 8081 orl %d1,%d0 498b4: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 498b6: 2248 moveal %a0,%a1 498b8: 2019 movel %a1@+,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 498ba: b3c0 cmpal %d0,%a1 498bc: 6604 bnes 498c2 <_Chain_Get+0x22> 498be: 4280 clrl %d0 498c0: 600a bras 498cc <_Chain_Get+0x2c> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 498c2: 2440 moveal %d0,%a2 498c4: 2252 moveal %a2@,%a1 the_chain->first = new_first; 498c6: 2089 movel %a1,%a0@ new_first->previous = _Chain_Head(the_chain); 498c8: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 498cc: 46c1 movew %d1,%sr return return_node; } 498ce: 245f moveal %sp@+,%a2 498d0: 4e5e unlk %fp 498d2: 4e75 rts 000498d4 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 498d4: 4e56 0000 linkw %fp,#0 498d8: 202e 0010 movel %fp@(16),%d0 498dc: 2f0a movel %a2,%sp@- 498de: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 498e2: 204a moveal %a2,%a0 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 498e4: 42aa 0004 clrl %a2@(4) Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 498e8: 222e 0014 movel %fp@(20),%d1 Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 498ec: 226e 000c moveal %fp@(12),%a1 while ( count-- ) { 498f0: 600c bras 498fe <_Chain_Initialize+0x2a> <== ALWAYS TAKEN current->next = next; next->previous = current; 498f2: 2348 0004 movel %a0,%a1@(4) current = next; next = (Chain_Node *) 498f6: 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; 498f8: 2089 movel %a1,%a0@ next->previous = current; current = next; next = (Chain_Node *) 498fa: 2049 moveal %a1,%a0 498fc: d3c1 addal %d1,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 498fe: 4a80 tstl %d0 49900: 66f0 bnes 498f2 <_Chain_Initialize+0x1e> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 49902: 200a movel %a2,%d0 49904: 5880 addql #4,%d0 49906: 2080 movel %d0,%a0@ the_chain->last = current; 49908: 2548 0008 movel %a0,%a2@(8) } 4990c: 245f moveal %sp@+,%a2 4990e: 4e5e unlk %fp 49910: 4e75 rts ... 000449d8 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 449d8: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449de: 4e56 ffec linkw %fp,#-20 449e2: 226e 0010 moveal %fp@(16),%a1 449e6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 449ea: 2479 0005 baee moveal 5baee <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449f0: 242e 0008 movel %fp@(8),%d2 449f4: 262e 000c movel %fp@(12),%d3 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 449f8: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449fc: 206e 0014 moveal %fp@(20),%a0 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 44a00: 266a 0108 moveal %a2@(264),%a3 _ISR_Disable( level ); 44a04: 40c1 movew %sr,%d1 44a06: 8081 orl %d1,%d0 44a08: 46c0 movew %d0,%sr pending_events = api->pending_events; 44a0a: 2813 movel %a3@,%d4 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 44a0c: 2002 movel %d2,%d0 44a0e: c084 andl %d4,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 44a10: 6716 beqs 44a28 <_Event_Seize+0x50> 44a12: b480 cmpl %d0,%d2 44a14: 6706 beqs 44a1c <_Event_Seize+0x44> 44a16: 0803 0001 btst #1,%d3 44a1a: 670c beqs 44a28 <_Event_Seize+0x50> <== ALWAYS TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 44a1c: 2400 movel %d0,%d2 44a1e: 4682 notl %d2 44a20: c484 andl %d4,%d2 44a22: 2682 movel %d2,%a3@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 44a24: 46c1 movew %d1,%sr 44a26: 600e bras 44a36 <_Event_Seize+0x5e> <== ALWAYS TAKEN *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 44a28: 0803 0000 btst #0,%d3 44a2c: 670e beqs 44a3c <_Event_Seize+0x64> _ISR_Enable( level ); 44a2e: 46c1 movew %d1,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 44a30: 720d moveq #13,%d1 44a32: 2541 0034 movel %d1,%a2@(52) *event_out = seized_events; 44a36: 2080 movel %d0,%a0@ return; 44a38: 6000 0096 braw 44ad0 <_Event_Seize+0xf8> <== ALWAYS TAKEN * * 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; 44a3c: 2542 0024 movel %d2,%a2@(36) executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 44a40: 7401 moveq #1,%d2 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 44a42: 2543 0030 movel %d3,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; 44a46: 2548 0028 movel %a0,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 44a4a: 23c2 0005 bc12 movel %d2,5bc12 <_Event_Sync_state> _ISR_Enable( level ); 44a50: 46c1 movew %d1,%sr if ( ticks ) { 44a52: 4a89 tstl %a1 44a54: 6730 beqs 44a86 <_Event_Seize+0xae> _Watchdog_Initialize( 44a56: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44a5a: 223c 0004 4c38 movel #281656,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 44a60: 2549 0054 movel %a1,%a2@(84) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44a64: 2541 0064 movel %d1,%a2@(100) the_watchdog->id = id; 44a68: 2540 0068 movel %d0,%a2@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44a6c: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 44a70: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44a74: 486a 0048 pea %a2@(72) 44a78: 4879 0005 bb0c pea 5bb0c <_Watchdog_Ticks_chain> 44a7e: 4eb9 0004 7b78 jsr 47b78 <_Watchdog_Insert> 44a84: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 44a86: 4878 0100 pea 100 44a8a: 2f0a movel %a2,%sp@- 44a8c: 4eb9 0004 7464 jsr 47464 <_Thread_Set_state> _ISR_Disable( level ); 44a92: 203c 0000 0700 movel #1792,%d0 44a98: 40c1 movew %sr,%d1 44a9a: 8081 orl %d1,%d0 44a9c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 44a9e: 7401 moveq #1,%d2 44aa0: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 44aa2: 2039 0005 bc12 movel 5bc12 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 44aa8: 42b9 0005 bc12 clrl 5bc12 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 44aae: b480 cmpl %d0,%d2 44ab0: 6604 bnes 44ab6 <_Event_Seize+0xde> _ISR_Enable( level ); 44ab2: 46c1 movew %d1,%sr 44ab4: 601a bras 44ad0 <_Event_Seize+0xf8> <== ALWAYS TAKEN * 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 ); 44ab6: 2d4a 000c movel %a2,%fp@(12) 44aba: 2d41 0010 movel %d1,%fp@(16) } 44abe: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 44ac4: 2d40 0008 movel %d0,%fp@(8) } 44ac8: 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 ); 44aca: 4ef9 0004 6724 jmp 46724 <_Thread_blocking_operation_Cancel> } 44ad0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 44ad6: 4e5e unlk %fp 44ad8: 4e75 rts ... 00044b30 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 44b30: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 44b36: 4e56 ffe8 linkw %fp,#-24 44b3a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 44b3e: 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 ]; 44b42: 206a 0108 moveal %a2@(264),%a0 option_set = (rtems_option) the_thread->Wait.option; 44b46: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 44b4a: 40c1 movew %sr,%d1 44b4c: 8081 orl %d1,%d0 44b4e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 44b50: 262a 0024 movel %a2@(36),%d3 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 44b54: 2003 movel %d3,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 44b56: 2410 movel %a0@,%d2 44b58: 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 ) ) { 44b5a: 6606 bnes 44b62 <_Event_Surrender+0x32> _ISR_Enable( level ); 44b5c: 46c1 movew %d1,%sr return; 44b5e: 6000 00cc braw 44c2c <_Event_Surrender+0xfc> <== ALWAYS TAKEN /* * 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() && 44b62: 2279 0005 bace moveal 5bace <_ISR_Nest_level>,%a1 44b68: 4a89 tstl %a1 44b6a: 674a beqs 44bb6 <_Event_Surrender+0x86> 44b6c: b5f9 0005 baee cmpal 5baee <_Thread_Executing>,%a2 44b72: 6642 bnes 44bb6 <_Event_Surrender+0x86> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 44b74: 2279 0005 bc12 moveal 5bc12 <_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() && 44b7a: 7a02 moveq #2,%d5 44b7c: ba89 cmpl %a1,%d5 44b7e: 670e beqs 44b8e <_Event_Surrender+0x5e> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 44b80: 2279 0005 bc12 moveal 5bc12 <_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() && 44b86: 1a3c 0001 moveb #1,%d5 44b8a: ba89 cmpl %a1,%d5 44b8c: 6628 bnes 44bb6 <_Event_Surrender+0x86> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 44b8e: b680 cmpl %d0,%d3 44b90: 6706 beqs 44b98 <_Event_Surrender+0x68> 44b92: 0804 0001 btst #1,%d4 44b96: 671a beqs 44bb2 <_Event_Surrender+0x82> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 44b98: 2600 movel %d0,%d3 44b9a: 4683 notl %d3 44b9c: c682 andl %d2,%d3 44b9e: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44ba0: 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; 44ba4: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44ba8: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 44baa: 7003 moveq #3,%d0 44bac: 23c0 0005 bc12 movel %d0,5bc12 <_Event_Sync_state> } _ISR_Enable( level ); 44bb2: 46c1 movew %d1,%sr return; 44bb4: 6076 bras 44c2c <_Event_Surrender+0xfc> <== ALWAYS TAKEN } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 44bb6: 2a2a 0010 movel %a2@(16),%d5 44bba: 0285 0000 0100 andil #256,%d5 44bc0: 6768 beqs 44c2a <_Event_Surrender+0xfa> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 44bc2: b680 cmpl %d0,%d3 44bc4: 6706 beqs 44bcc <_Event_Surrender+0x9c> 44bc6: 0804 0001 btst #1,%d4 44bca: 675e beqs 44c2a <_Event_Surrender+0xfa> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 44bcc: 2600 movel %d0,%d3 44bce: 4683 notl %d3 44bd0: c682 andl %d2,%d3 44bd2: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44bd4: 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; 44bd8: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44bdc: 2080 movel %d0,%a0@ _ISR_Flash( level ); 44bde: 203c 0000 0700 movel #1792,%d0 44be4: 46c1 movew %d1,%sr 44be6: 8081 orl %d1,%d0 44be8: 46c0 movew %d0,%sr 44bea: 47f9 0004 68b4 lea 468b4 <_Thread_Clear_state>,%a3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 44bf0: 7a02 moveq #2,%d5 44bf2: baaa 0050 cmpl %a2@(80),%d5 44bf6: 6710 beqs 44c08 <_Event_Surrender+0xd8> _ISR_Enable( level ); 44bf8: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 44bfa: 2f3c 1003 fff8 movel #268697592,%sp@- 44c00: 2f0a movel %a2,%sp@- 44c02: 4e93 jsr %a3@ 44c04: 508f addql #8,%sp 44c06: 6024 bras 44c2c <_Event_Surrender+0xfc> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 44c08: 7003 moveq #3,%d0 44c0a: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 44c0e: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 44c10: 486a 0048 pea %a2@(72) 44c14: 4eb9 0004 7c94 jsr 47c94 <_Watchdog_Remove> 44c1a: 2f3c 1003 fff8 movel #268697592,%sp@- 44c20: 2f0a movel %a2,%sp@- 44c22: 4e93 jsr %a3@ 44c24: 4fef 000c lea %sp@(12),%sp 44c28: 6002 bras 44c2c <_Event_Surrender+0xfc> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 44c2a: 46c1 movew %d1,%sr } 44c2c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 44c32: 4e5e unlk %fp 44c34: 4e75 rts ... 00044c38 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 44c38: 4e56 fffc linkw %fp,#-4 44c3c: 2f03 movel %d3,%sp@- 44c3e: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 44c40: 486e fffc pea %fp@(-4) 44c44: 2f2e 0008 movel %fp@(8),%sp@- 44c48: 4eb9 0004 6c94 jsr 46c94 <_Thread_Get> switch ( location ) { 44c4e: 508f addql #8,%sp 44c50: 4aae fffc tstl %fp@(-4) 44c54: 6656 bnes 44cac <_Event_Timeout+0x74> <== 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 ); 44c56: 223c 0000 0700 movel #1792,%d1 44c5c: 40c2 movew %sr,%d2 44c5e: 8282 orl %d2,%d1 44c60: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 44c62: 2040 moveal %d0,%a0 44c64: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 44c68: b0b9 0005 baee cmpl 5baee <_Thread_Executing>,%d0 44c6e: 6614 bnes 44c84 <_Event_Timeout+0x4c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 44c70: 2239 0005 bc12 movel 5bc12 <_Event_Sync_state>,%d1 44c76: 7601 moveq #1,%d3 44c78: b681 cmpl %d1,%d3 44c7a: 6608 bnes 44c84 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 44c7c: 7202 moveq #2,%d1 44c7e: 23c1 0005 bc12 movel %d1,5bc12 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; 44c84: 7606 moveq #6,%d3 44c86: 2040 moveal %d0,%a0 44c88: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 44c8c: 46c2 movew %d2,%sr 44c8e: 2f3c 1003 fff8 movel #268697592,%sp@- 44c94: 2f00 movel %d0,%sp@- 44c96: 4eb9 0004 68b4 jsr 468b4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 44c9c: 508f addql #8,%sp 44c9e: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 44ca4: 5380 subql #1,%d0 44ca6: 23c0 0005 ba34 movel %d0,5ba34 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 44cac: 242e fff4 movel %fp@(-12),%d2 44cb0: 262e fff8 movel %fp@(-8),%d3 44cb4: 4e5e unlk %fp 44cb6: 4e75 rts 00049ae0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 49ae0: 4e56 ffc8 linkw %fp,#-56 49ae4: 202e 000c movel %fp@(12),%d0 49ae8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49aec: 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; 49af0: 2840 moveal %d0,%a4 49af2: 588c addql #4,%a4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 49af4: 222e 0010 movel %fp@(16),%d1 49af8: 2a2e 0014 movel %fp@(20),%d5 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 49afc: 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; 49b00: 2e2a 0010 movel %a2@(16),%d7 uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 49b04: b08c cmpl %a4,%d0 49b06: 6200 0120 bhiw 49c28 <_Heap_Allocate_aligned_with_boundary+0x148> <== ALWAYS TAKEN /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 49b0a: 4a85 tstl %d5 49b0c: 670c beqs 49b1a <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 49b0e: b085 cmpl %d5,%d0 49b10: 6200 0116 bhiw 49c28 <_Heap_Allocate_aligned_with_boundary+0x148> <== ALWAYS TAKEN return NULL; } if ( alignment == 0 ) { 49b14: 4a81 tstl %d1 49b16: 6602 bnes 49b1a <_Heap_Allocate_aligned_with_boundary+0x3a> 49b18: 2207 movel %d7,%d1 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 49b1a: 2407 movel %d7,%d2 49b1c: 5e82 addql #7,%d2 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 49b1e: 4283 clrl %d3 49b20: 2a43 moveal %d3,%a5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 49b22: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 49b26: 7404 moveq #4,%d2 49b28: 9480 subl %d0,%d2 49b2a: 2d42 fff4 movel %d2,%fp@(-12) 49b2e: 6000 00c6 braw 49bf6 <_Heap_Allocate_aligned_with_boundary+0x116> <== ALWAYS TAKEN /* * 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 ) { 49b32: 2628 0004 movel %a0@(4),%d3 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 49b36: 528d addql #1,%a5 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 49b38: b9c3 cmpal %d3,%a4 49b3a: 6400 00b6 bccw 49bf2 <_Heap_Allocate_aligned_with_boundary+0x112> 49b3e: 43e8 0008 lea %a0@(8),%a1 if ( alignment == 0 ) { 49b42: 4a81 tstl %d1 49b44: 6606 bnes 49b4c <_Heap_Allocate_aligned_with_boundary+0x6c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 49b46: 2409 movel %a1,%d2 49b48: 6000 00a4 braw 49bee <_Heap_Allocate_aligned_with_boundary+0x10e> <== ALWAYS TAKEN 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; 49b4c: 74fe moveq #-2,%d2 49b4e: c682 andl %d2,%d3 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 49b50: 266a 0014 moveal %a2@(20),%a3 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 49b54: d688 addl %a0,%d3 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 49b56: 282e fff8 movel %fp@(-8),%d4 49b5a: 988b subl %a3,%d4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 49b5c: 242e fff4 movel %fp@(-12),%d2 49b60: d483 addl %d3,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 49b62: 2c02 movel %d2,%d6 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 49b64: d684 addl %d4,%d3 49b66: 4c41 6004 remul %d1,%d4,%d6 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 49b6a: 2d4b fff0 movel %a3,%fp@(-16) 49b6e: 9484 subl %d4,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 49b70: b682 cmpl %d2,%d3 49b72: 640a bccs 49b7e <_Heap_Allocate_aligned_with_boundary+0x9e> 49b74: 2803 movel %d3,%d4 49b76: 4c41 4002 remul %d1,%d2,%d4 49b7a: 9682 subl %d2,%d3 49b7c: 2403 movel %d3,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 49b7e: 4a85 tstl %d5 49b80: 674e beqs 49bd0 <_Heap_Allocate_aligned_with_boundary+0xf0> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 49b82: 2802 movel %d2,%d4 49b84: d880 addl %d0,%d4 49b86: 2604 movel %d4,%d3 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 49b88: 47f1 0800 lea %a1@(00000000,%d0:l),%a3 49b8c: 4c45 3006 remul %d5,%d6,%d3 49b90: 2d4b fffc movel %a3,%fp@(-4) 49b94: 2604 movel %d4,%d3 49b96: 9686 subl %d6,%d3 49b98: 2c03 movel %d3,%d6 49b9a: 266e fff0 moveal %fp@(-16),%a3 49b9e: 6020 bras 49bc0 <_Heap_Allocate_aligned_with_boundary+0xe0> <== ALWAYS TAKEN uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 49ba0: bcae fffc cmpl %fp@(-4),%d6 49ba4: 654c bcss 49bf2 <_Heap_Allocate_aligned_with_boundary+0x112> <== ALWAYS TAKEN 49ba6: 2803 movel %d3,%d4 49ba8: 4c41 4002 remul %d1,%d2,%d4 49bac: 9682 subl %d2,%d3 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 49bae: 2803 movel %d3,%d4 49bb0: d880 addl %d0,%d4 49bb2: 2403 movel %d3,%d2 49bb4: 2604 movel %d4,%d3 49bb6: 4c45 3006 remul %d5,%d6,%d3 49bba: 2604 movel %d4,%d3 49bbc: 9686 subl %d6,%d3 49bbe: 2c03 movel %d3,%d6 while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; 49bc0: 2606 movel %d6,%d3 49bc2: 9680 subl %d0,%d3 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 49bc4: bc82 cmpl %d2,%d6 49bc6: 6304 blss 49bcc <_Heap_Allocate_aligned_with_boundary+0xec> 49bc8: b886 cmpl %d6,%d4 49bca: 62d4 bhis 49ba0 <_Heap_Allocate_aligned_with_boundary+0xc0> 49bcc: 2d4b fff0 movel %a3,%fp@(-16) boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 49bd0: b3c2 cmpal %d2,%a1 49bd2: 621e bhis 49bf2 <_Heap_Allocate_aligned_with_boundary+0x112> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 49bd4: 2802 movel %d2,%d4 49bd6: 327c fff8 moveaw #-8,%a1 49bda: 93c8 subal %a0,%a1 49bdc: d3c2 addal %d2,%a1 49bde: 4c47 4003 remul %d7,%d3,%d4 49be2: 93c3 subal %d3,%a1 if ( free_size >= min_block_size || free_size == 0 ) { 49be4: b3ee fff0 cmpal %fp@(-16),%a1 49be8: 6404 bccs 49bee <_Heap_Allocate_aligned_with_boundary+0x10e> 49bea: 4a89 tstl %a1 49bec: 6604 bnes 49bf2 <_Heap_Allocate_aligned_with_boundary+0x112> boundary ); } } if ( alloc_begin != 0 ) { 49bee: 4a82 tstl %d2 49bf0: 6610 bnes 49c02 <_Heap_Allocate_aligned_with_boundary+0x122> <== NEVER TAKEN break; } block = block->next; 49bf2: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 49bf6: b5c8 cmpal %a0,%a2 49bf8: 6600 ff38 bnew 49b32 <_Heap_Allocate_aligned_with_boundary+0x52> 49bfc: 260d movel %a5,%d3 49bfe: 4282 clrl %d2 49c00: 6018 bras 49c1a <_Heap_Allocate_aligned_with_boundary+0x13a> <== ALWAYS TAKEN if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 49c02: 2f00 movel %d0,%sp@- 49c04: 260d movel %a5,%d3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 49c06: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 49c0a: 2f02 movel %d2,%sp@- 49c0c: 2f08 movel %a0,%sp@- 49c0e: 2f0a movel %a2,%sp@- 49c10: 4eb9 0004 5e92 jsr 45e92 <_Heap_Block_allocate> 49c16: 4fef 0010 lea %sp@(16),%sp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 49c1a: b6aa 0044 cmpl %a2@(68),%d3 49c1e: 6304 blss 49c24 <_Heap_Allocate_aligned_with_boundary+0x144> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 49c20: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; 49c24: 2002 movel %d2,%d0 49c26: 6002 bras 49c2a <_Heap_Allocate_aligned_with_boundary+0x14a> <== ALWAYS TAKEN 49c28: 4280 clrl %d0 } 49c2a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 49c30: 4e5e unlk %fp 49c32: 4e75 rts 00045e92 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45e92: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45e94: 4e56 ffe0 linkw %fp,#-32 45e98: 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; 45e9c: 2241 moveal %d1,%a1 45e9e: 5189 subql #8,%a1 45ea0: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 45ea4: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45ea8: 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; 45eaa: 2a49 moveal %a1,%a5 45eac: 240a movel %a2,%d2 45eae: 9bca subal %a2,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45eb0: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45eb4: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45eb8: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45ebc: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45ec0: 4a03 tstb %d3 45ec2: 6626 bnes 45eea <_Heap_Block_allocate+0x58> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 45ec4: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 45ec8: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 45eca: 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; 45ece: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 45ed2: 2840 moveal %d0,%a4 stats->free_size -= _Heap_Block_size( block ); 45ed4: c6aa 0004 andl %a2@(4),%d3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 45ed8: 206a 000c moveal %a2@(12),%a0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 45edc: 97ab 0030 subl %d3,%a3@(48) 45ee0: 2948 000c movel %a0,%a4@(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; 45ee4: 2140 0008 movel %d0,%a0@(8) 45ee8: 6002 bras 45eec <_Heap_Block_allocate+0x5a> <== ALWAYS TAKEN } else { free_list_anchor = _Heap_Free_list_head( heap ); 45eea: 204b moveal %a3,%a0 } if ( alloc_area_offset < heap->page_size ) { 45eec: 202b 0010 movel %a3@(16),%d0 45ef0: b08d cmpl %a5,%d0 45ef2: 630a blss 45efe <_Heap_Block_allocate+0x6c> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 45ef4: 4875 5800 pea %a5@(00000000,%d5:l) 45ef8: 2f08 movel %a0,%sp@- 45efa: 2f0a movel %a2,%sp@- 45efc: 6062 bras 45f60 <_Heap_Block_allocate+0xce> <== 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; 45efe: 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 ) 45f02: 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 ) ) { 45f06: 7201 moveq #1,%d1 45f08: 93c4 subal %d4,%a1 _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; 45f0a: 2009 movel %a1,%d0 45f0c: 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; 45f0e: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 45f12: c2aa 0004 andl %a2@(4),%d1 45f16: 671c beqs 45f34 <_Heap_Block_allocate+0xa2> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 45f18: 2a68 0008 moveal %a0@(8),%a5 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 45f1c: 52ab 0038 addql #1,%a3@(56) 45f20: 220a movel %a2,%d1 new_block->next = next; 45f22: 254d 0008 movel %a5,%a2@(8) new_block->prev = block_before; 45f26: 2548 000c movel %a0,%a2@(12) block_before->next = new_block; 45f2a: 214a 0008 movel %a2,%a0@(8) next->prev = new_block; 45f2e: 2b4a 000c movel %a2,%a5@(12) 45f32: 600c bras 45f40 <_Heap_Block_allocate+0xae> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 45f34: 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; 45f36: 78fe moveq #-2,%d4 45f38: 2208 movel %a0,%d1 45f3a: c8aa 0004 andl %a2@(4),%d4 45f3e: 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; 45f40: 78fe moveq #-2,%d4 45f42: 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; 45f44: 7801 moveq #1,%d4 45f46: 8880 orl %d0,%d4 new_block->prev_size = block_size; 45f48: 2280 movel %d0,%a1@ new_block->size_and_flag = new_block_size; 45f4a: 2002 movel %d2,%d0 45f4c: d083 addl %d3,%d0 45f4e: 9089 subl %a1,%d0 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 45f50: 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 ); 45f54: 2449 moveal %a1,%a2 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 45f56: 2340 0004 movel %d0,%a1@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45f5a: 2f05 movel %d5,%sp@- 45f5c: 2f01 movel %d1,%sp@- 45f5e: 2f09 movel %a1,%sp@- 45f60: 2f0b movel %a3,%sp@- 45f62: 4eb9 0004 5dc4 jsr 45dc4 <_Heap_Block_split> alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 45f68: 202b 0030 movel %a3@(48),%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; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45f6c: 4fef 0010 lea %sp@(16),%sp Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 45f70: b0ab 0034 cmpl %a3@(52),%d0 45f74: 6404 bccs 45f7a <_Heap_Block_allocate+0xe8> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 45f76: 2740 0034 movel %d0,%a3@(52) } return block; } 45f7a: 200a movel %a2,%d0 45f7c: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 45f82: 4e5e unlk %fp 45f84: 4e75 rts ... 00045dc4 <_Heap_Block_split>: - 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; 45dc4: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 45dc6: 4e56 ffe0 linkw %fp,#-32 45dca: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 45dce: 246e 0008 moveal %fp@(8),%a2 45dd2: 266e 000c moveal %fp@(12),%a3 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 45dd6: 282a 0014 movel %a2@(20),%d4 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; 45dda: 2044 moveal %d4,%a0 45ddc: 5188 subql #8,%a0 45dde: 262b 0004 movel %a3@(4),%d3 Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 45de2: 286e 0010 moveal %fp@(16),%a4 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 45de6: 222a 0010 movel %a2@(16),%d1 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; 45dea: 242e 0014 movel %fp@(20),%d2 45dee: c083 andl %d3,%d0 45df0: b1c2 cmpal %d2,%a0 45df2: 6302 blss 45df6 <_Heap_Block_split+0x32> 45df4: 2408 movel %a0,%d2 45df6: 5082 addql #8,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 45df8: 2c02 movel %d2,%d6 45dfa: 4c41 6005 remul %d1,%d5,%d6 if ( remainder != 0 ) { 45dfe: 4a85 tstl %d5 45e00: 6604 bnes 45e06 <_Heap_Block_split+0x42> 45e02: 2202 movel %d2,%d1 45e04: 6004 bras 45e0a <_Heap_Block_split+0x46> <== ALWAYS TAKEN return value - remainder + alignment; 45e06: d282 addl %d2,%d1 45e08: 9285 subl %d5,%d1 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 ) { 45e0a: 2240 moveal %d0,%a1 45e0c: 5889 addql #4,%a1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 45e0e: 41f3 0800 lea %a3@(00000000,%d0:l),%a0 45e12: 93c2 subal %d2,%a1 45e14: 5884 addql #4,%d4 45e16: b889 cmpl %a1,%d4 45e18: 626a bhis 45e84 <_Heap_Block_split+0xc0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 45e1a: 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); 45e1c: 43f3 1800 lea %a3@(00000000,%d1:l),%a1 Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 45e20: 9081 subl %d1,%d0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 45e22: c682 andl %d2,%d3 45e24: 8283 orl %d3,%d1 45e26: 2741 0004 movel %d1,%a3@(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; 45e2a: d1aa 0030 addl %d0,%a2@(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; 45e2e: 72fe moveq #-2,%d1 45e30: c2a8 0004 andl %a0@(4),%d1 if ( _Heap_Is_used( next_block ) ) { 45e34: c4b0 1804 andl %a0@(00000004,%d1:l),%d2 45e38: 671a beqs 45e54 <_Heap_Block_split+0x90> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 45e3a: 266c 0008 moveal %a4@(8),%a3 _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 45e3e: 52aa 0038 addql #1,%a2@(56) new_block->next = next; 45e42: 234b 0008 movel %a3,%a1@(8) new_block->prev = block_before; 45e46: 234c 000c movel %a4,%a1@(12) block_before->next = new_block; 45e4a: 2949 0008 movel %a1,%a4@(8) next->prev = new_block; 45e4e: 2749 000c movel %a1,%a3@(12) 45e52: 601e bras 45e72 <_Heap_Block_split+0xae> <== ALWAYS TAKEN Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 45e54: 2668 000c moveal %a0@(12),%a3 } 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; 45e58: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 45e5a: 2468 0008 moveal %a0@(8),%a2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 45e5e: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 45e62: 234a 0008 movel %a2,%a1@(8) new_block->prev = prev; 45e66: 234b 000c movel %a3,%a1@(12) next->prev = new_block; prev->next = new_block; 45e6a: 2749 0008 movel %a1,%a3@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 45e6e: 2549 000c movel %a1,%a2@(12) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 45e72: 7201 moveq #1,%d1 next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 45e74: 74fe moveq #-2,%d2 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; 45e76: 8280 orl %d0,%d1 next_block->prev_size = free_block_size; 45e78: 2080 movel %d0,%a0@ 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; 45e7a: 2341 0004 movel %d1,%a1@(4) next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 45e7e: c5a8 0004 andl %d2,%a0@(4) 45e82: 6006 bras 45e8a <_Heap_Block_split+0xc6> <== ALWAYS TAKEN } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 45e84: 7001 moveq #1,%d0 45e86: 81a8 0004 orl %d0,%a0@(4) } } 45e8a: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 45e8e: 4e5e unlk %fp 45e90: 4e75 rts 0004dc84 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 4dc84: 4e56 fff4 linkw %fp,#-12 4dc88: 206e 0008 moveal %fp@(8),%a0 4dc8c: 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; 4dc90: 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; 4dc94: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 4dc98: 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; 4dc9c: b0a8 0018 cmpl %a0@(24),%d0 4dca0: 6508 bcss 4dcaa <_Heap_Extend+0x26> * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 4dca2: b280 cmpl %d0,%d1 4dca4: 6304 blss 4dcaa <_Heap_Extend+0x26> 4dca6: 7001 moveq #1,%d0 4dca8: 606c bras 4dd16 <_Heap_Extend+0x92> <== ALWAYS TAKEN return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 4dcaa: b280 cmpl %d0,%d1 4dcac: 6704 beqs 4dcb2 <_Heap_Extend+0x2e> 4dcae: 7002 moveq #2,%d0 4dcb0: 6064 bras 4dd16 <_Heap_Extend+0x92> <== ALWAYS TAKEN { 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; 4dcb2: 2200 movel %d0,%d1 4dcb4: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 4dcb8: 70f8 moveq #-8,%d0 4dcba: 9089 subl %a1,%d0 4dcbc: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4dcbe: 2600 movel %d0,%d3 4dcc0: 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; 4dcc6: 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; 4dcca: 246e 0014 moveal %fp@(20),%a2 4dcce: 9082 subl %d2,%d0 4dcd0: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 4dcd2: b0a8 0014 cmpl %a0@(20),%d0 4dcd6: 653c bcss 4dd14 <_Heap_Extend+0x90> <== ALWAYS TAKEN uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 4dcd8: 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); 4dcda: 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; 4dcde: c4a9 0004 andl %a1@(4),%d2 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 4dce2: 2228 0020 movel %a0@(32),%d1 4dce6: 928a subl %a2,%d1 4dce8: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 4dcea: 214a 0024 movel %a2,%a0@(36) 4dcee: 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 = 4dcf2: 7401 moveq #1,%d2 4dcf4: 8481 orl %d1,%d2 4dcf6: 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 )); 4dcfa: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 4dcfe: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 4dd02: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 4dd06: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 4dd0a: 2f08 movel %a0,%sp@- 4dd0c: 4eb9 0004 984c jsr 4984c <_Heap_Free> 4dd12: 508f addql #8,%sp 4dd14: 4280 clrl %d0 } return HEAP_EXTEND_SUCCESSFUL; } 4dd16: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4dd1c: 4e5e unlk %fp 4dd1e: 4e75 rts 00049c34 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 49c34: 4e56 ffe8 linkw %fp,#-24 49c38: 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 ) 49c3c: 2240 moveal %d0,%a1 49c3e: 5189 subql #8,%a1 49c40: 206e 0008 moveal %fp@(8),%a0 49c44: 4c68 0001 0010 remul %a0@(16),%d1,%d0 49c4a: 48d7 0c3c moveml %d2-%d5/%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; 49c4e: 2828 0020 movel %a0@(32),%d4 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 ) 49c52: 93c1 subal %d1,%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 49c54: b889 cmpl %a1,%d4 49c56: 6200 0140 bhiw 49d98 <_Heap_Free+0x164> <== ALWAYS TAKEN 49c5a: b3e8 0024 cmpal %a0@(36),%a1 49c5e: 53c0 sls %d0 49c60: 49c0 extbl %d0 49c62: 4480 negl %d0 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 49c64: 4a00 tstb %d0 49c66: 6700 0130 beqw 49d98 <_Heap_Free+0x164> - 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; 49c6a: 2629 0004 movel %a1@(4),%d3 49c6e: 70fe moveq #-2,%d0 49c70: c083 andl %d3,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 49c72: 45f1 0800 lea %a1@(00000000,%d0: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 49c76: b88a cmpl %a2,%d4 49c78: 6200 011e bhiw 49d98 <_Heap_Free+0x164> <== ALWAYS TAKEN 49c7c: b5e8 0024 cmpal %a0@(36),%a2 49c80: 53c1 sls %d1 49c82: 49c1 extbl %d1 49c84: 4481 negl %d1 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 49c86: 4a01 tstb %d1 49c88: 6700 010e beqw 49d98 <_Heap_Free+0x164> <== 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; 49c8c: 222a 0004 movel %a2@(4),%d1 _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 49c90: 7401 moveq #1,%d2 49c92: c481 andl %d1,%d2 49c94: 4a02 tstb %d2 49c96: 6700 0100 beqw 49d98 <_Heap_Free+0x164> <== 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; 49c9a: 74fe moveq #-2,%d2 return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 49c9c: 2668 0024 moveal %a0@(36),%a3 49ca0: c282 andl %d2,%d1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 49ca2: b7ca cmpal %a2,%a3 49ca4: 6604 bnes 49caa <_Heap_Free+0x76> 49ca6: 4282 clrl %d2 49ca8: 6010 bras 49cba <_Heap_Free+0x86> <== ALWAYS TAKEN 49caa: 7401 moveq #1,%d2 49cac: 7a01 moveq #1,%d5 49cae: c4b2 1804 andl %a2@(00000004,%d1:l),%d2 49cb2: bb82 eorl %d5,%d2 49cb4: 0282 0000 00ff andil #255,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 49cba: 7a01 moveq #1,%d5 49cbc: c685 andl %d5,%d3 49cbe: 4a03 tstb %d3 49cc0: 6662 bnes 49d24 <_Heap_Free+0xf0> uintptr_t const prev_size = block->prev_size; 49cc2: 2611 movel %a1@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 49cc4: 93c3 subal %d3,%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 49cc6: b889 cmpl %a1,%d4 49cc8: 6200 00ce bhiw 49d98 <_Heap_Free+0x164> <== ALWAYS TAKEN 49ccc: b3cb cmpal %a3,%a1 49cce: 53c4 sls %d4 49cd0: 49c4 extbl %d4 49cd2: 4484 negl %d4 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 49cd4: 4a04 tstb %d4 49cd6: 6700 00c0 beqw 49d98 <_Heap_Free+0x164> <== 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) ) { 49cda: 7801 moveq #1,%d4 49cdc: c8a9 0004 andl %a1@(4),%d4 49ce0: 4a04 tstb %d4 49ce2: 6700 00b4 beqw 49d98 <_Heap_Free+0x164> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 49ce6: 4a02 tstb %d2 49ce8: 6726 beqs 49d10 <_Heap_Free+0xdc> uintptr_t const size = block_size + prev_size + next_block_size; 49cea: d280 addl %d0,%d1 49cec: d681 addl %d1,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 49cee: 53a8 0038 subql #1,%a0@(56) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49cf2: 7201 moveq #1,%d1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 49cf4: 266a 000c moveal %a2@(12),%a3 49cf8: 8283 orl %d3,%d1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 49cfa: 246a 0008 moveal %a2@(8),%a2 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 49cfe: 2383 3800 movel %d3,%a1@(00000000,%d3:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49d02: 2341 0004 movel %d1,%a1@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 49d06: 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; 49d0a: 274a 0008 movel %a2,%a3@(8) 49d0e: 6078 bras 49d88 <_Heap_Free+0x154> <== ALWAYS TAKEN 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; 49d10: d680 addl %d0,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49d12: 7401 moveq #1,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 49d14: 7afe moveq #-2,%d5 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; 49d16: 8483 orl %d3,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 49d18: 2483 movel %d3,%a2@ next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49d1a: 2342 0004 movel %d2,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 49d1e: cbaa 0004 andl %d5,%a2@(4) 49d22: 6064 bras 49d88 <_Heap_Free+0x154> <== ALWAYS TAKEN next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 49d24: 4a02 tstb %d2 49d26: 6728 beqs 49d50 <_Heap_Free+0x11c> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 49d28: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 49d2c: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 49d2e: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 49d30: 246a 0008 moveal %a2@(8),%a2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 49d34: 234b 000c movel %a3,%a1@(12) 49d38: 8481 orl %d1,%d2 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 49d3a: 234a 0008 movel %a2,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 49d3e: 2381 1800 movel %d1,%a1@(00000000,%d1:l) 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; 49d42: 2342 0004 movel %d2,%a1@(4) new_block->prev = prev; next->prev = new_block; 49d46: 2549 000c movel %a1,%a2@(12) prev->next = new_block; 49d4a: 2749 0008 movel %a1,%a3@(8) 49d4e: 6038 bras 49d88 <_Heap_Free+0x154> <== 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; 49d50: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 49d52: 72fe moveq #-2,%d1 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; 49d54: 8a80 orl %d0,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 49d56: 2668 0008 moveal %a0@(8),%a3 49d5a: 2345 0004 movel %d5,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 49d5e: c3aa 0004 andl %d1,%a2@(4) next_block->prev_size = block_size; 49d62: 2480 movel %d0,%a2@ /* Statistics */ ++stats->free_blocks; 49d64: 2228 0038 movel %a0@(56),%d1 49d68: 5281 addql #1,%d1 new_block->next = next; 49d6a: 234b 0008 movel %a3,%a1@(8) new_block->prev = block_before; 49d6e: 2348 000c movel %a0,%a1@(12) block_before->next = new_block; 49d72: 2149 0008 movel %a1,%a0@(8) next->prev = new_block; 49d76: 2749 000c movel %a1,%a3@(12) 49d7a: 2141 0038 movel %d1,%a0@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 49d7e: b2a8 003c cmpl %a0@(60),%d1 49d82: 6304 blss 49d88 <_Heap_Free+0x154> 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; 49d84: 2141 003c movel %d1,%a0@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 49d88: d1a8 0030 addl %d0,%a0@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 49d8c: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 49d90: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 49d94: 7001 moveq #1,%d0 return( true ); 49d96: 6002 bras 49d9a <_Heap_Free+0x166> <== ALWAYS TAKEN 49d98: 4200 clrb %d0 } 49d9a: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 49d9e: 4e5e unlk %fp 49da0: 4e75 rts ... 00063444 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 63444: 4e56 0000 linkw %fp,#0 63448: 206e 000c moveal %fp@(12),%a0 6344c: 2f0a movel %a2,%sp@- 6344e: 246e 0008 moveal %fp@(8),%a2 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 63452: 4290 clrl %a0@ return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 63454: 226a 0008 moveal %a2@(8),%a1 info->largest = 0; 63458: 42a8 0004 clrl %a0@(4) info->total = 0; 6345c: 42a8 0008 clrl %a0@(8) for(the_block = _Heap_Free_list_first(the_heap); 63460: 601a bras 6347c <_Heap_Get_free_information+0x38> <== 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; 63462: 70fe moveq #-2,%d0 63464: c0a9 0004 andl %a1@(4),%d0 uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 63468: 5290 addql #1,%a0@ info->total += the_size; 6346a: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 6346e: b0a8 0004 cmpl %a0@(4),%d0 63472: 6304 blss 63478 <_Heap_Get_free_information+0x34> info->largest = the_size; 63474: 2140 0004 movel %d0,%a0@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 63478: 2269 0008 moveal %a1@(8),%a1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 6347c: b5c9 cmpal %a1,%a2 6347e: 66e2 bnes 63462 <_Heap_Get_free_information+0x1e> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 63480: 245f moveal %sp@+,%a2 63482: 4e5e unlk %fp 63484: 4e75 rts ... 00070e94 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 70e94: 4e56 fff4 linkw %fp,#-12 70e98: 206e 000c moveal %fp@(12),%a0 70e9c: 226e 0008 moveal %fp@(8),%a1 70ea0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 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; 70ea4: 2408 movel %a0,%d2 70ea6: 0682 0000 000c addil #12,%d2 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; 70eac: 4290 clrl %a0@ Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 70eae: 2229 0024 movel %a1@(36),%d1 _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; the_info->Free.total = 0; 70eb2: 42a8 0008 clrl %a0@(8) void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 70eb6: 2469 0020 moveal %a1@(32),%a2 _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; 70eba: 42a8 0004 clrl %a0@(4) the_info->Used.number = 0; 70ebe: 42a8 000c clrl %a0@(12) the_info->Used.total = 0; 70ec2: 42a8 0014 clrl %a0@(20) the_info->Used.largest = 0; 70ec6: 42a8 0010 clrl %a0@(16) while ( the_block != end ) { 70eca: 6022 bras 70eee <_Heap_Get_information+0x5a> <== 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; 70ecc: 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) ) 70ece: 7601 moveq #1,%d3 70ed0: c0aa 0004 andl %a2@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 70ed4: d5c0 addal %d0,%a2 70ed6: c6aa 0004 andl %a2@(4),%d3 70eda: 6602 bnes 70ede <_Heap_Get_information+0x4a> 70edc: 2248 moveal %a0,%a1 info = &the_info->Used; else info = &the_info->Free; info->number++; 70ede: 5291 addql #1,%a1@ info->total += the_size; 70ee0: d1a9 0008 addl %d0,%a1@(8) if ( info->largest < the_size ) 70ee4: b0a9 0004 cmpl %a1@(4),%d0 70ee8: 6304 blss 70eee <_Heap_Get_information+0x5a> info->largest = the_size; 70eea: 2340 0004 movel %d0,%a1@(4) while ( the_block != end ) { 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) ) 70eee: 2242 moveal %d2,%a1 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 70ef0: b28a cmpl %a2,%d1 70ef2: 66d8 bnes 70ecc <_Heap_Get_information+0x38> /* * 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; 70ef4: 50a8 0014 addql #8,%a0@(20) } 70ef8: 4cd7 040c moveml %sp@,%d2-%d3/%a2 70efc: 4e5e unlk %fp 70efe: 4e75 rts 00045cb0 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 45cb0: 4e56 ffe8 linkw %fp,#-24 45cb4: 206e 0008 moveal %fp@(8),%a0 45cb8: 48d7 047c moveml %d2-%d6/%a2,%sp@ 45cbc: 262e 000c movel %fp@(12),%d3 45cc0: 242e 0010 movel %fp@(16),%d2 45cc4: 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 ) { 45cc8: 6606 bnes 45cd0 <_Heap_Initialize+0x20> 45cca: 123c 0004 moveb #4,%d1 45cce: 6012 bras 45ce2 <_Heap_Initialize+0x32> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 45cd0: 7003 moveq #3,%d0 45cd2: c081 andl %d1,%d0 if ( remainder != 0 ) { 45cd4: 6704 beqs 45cda <_Heap_Initialize+0x2a> return value - remainder + alignment; 45cd6: 5881 addql #4,%d1 45cd8: 9280 subl %d0,%d1 page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 45cda: 7003 moveq #3,%d0 45cdc: b081 cmpl %d1,%d0 45cde: 6400 00da bccw 45dba <_Heap_Initialize+0x10a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 45ce2: 7810 moveq #16,%d4 45ce4: 4c41 4000 remul %d1,%d0,%d4 if ( remainder != 0 ) { 45ce8: 4a80 tstl %d0 45cea: 6604 bnes 45cf0 <_Heap_Initialize+0x40> 45cec: 7810 moveq #16,%d4 45cee: 600a bras 45cfa <_Heap_Initialize+0x4a> <== ALWAYS TAKEN return value - remainder + alignment; 45cf0: 2801 movel %d1,%d4 45cf2: 0684 0000 0010 addil #16,%d4 45cf8: 9880 subl %d0,%d4 ) { 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; 45cfa: 2003 movel %d3,%d0 45cfc: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 45cfe: 2c00 movel %d0,%d6 45d00: 4c41 6005 remul %d1,%d5,%d6 if ( remainder != 0 ) { 45d04: 4a85 tstl %d5 45d06: 6704 beqs 45d0c <_Heap_Initialize+0x5c> return value - remainder + alignment; 45d08: d081 addl %d1,%d0 45d0a: 9085 subl %d5,%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; 45d0c: 2c03 movel %d3,%d6 45d0e: dc82 addl %d2,%d6 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 ( 45d10: b686 cmpl %d6,%d3 45d12: 6200 00a6 bhiw 45dba <_Heap_Initialize+0x10a> } 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); 45d16: 2a00 movel %d0,%d5 45d18: 2240 moveal %d0,%a1 45d1a: 9a83 subl %d3,%d5 45d1c: 5189 subql #8,%a1 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 ( 45d1e: ba82 cmpl %d2,%d5 45d20: 6400 0098 bccw 45dba <_Heap_Initialize+0x10a> 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; 45d24: 9485 subl %d5,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 45d26: 2a02 movel %d2,%d5 45d28: 4c41 5000 remul %d1,%d0,%d5 45d2c: 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 ( 45d2e: b882 cmpl %d2,%d4 45d30: 6200 0088 bhiw 45dba <_Heap_Initialize+0x10a> } /* 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; 45d34: 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); 45d36: 45f1 2800 lea %a1@(00000000,%d2:l),%a2 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; 45d3a: 2002 movel %d2,%d0 45d3c: 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; 45d3e: 8a82 orl %d2,%d5 return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 45d40: 2281 movel %d1,%a1@ first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 45d42: 2345 0004 movel %d5,%a1@(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; 45d46: 2a09 movel %a1,%d5 45d48: 9a8a subl %a2,%d5 45d4a: 2545 0004 movel %d5,%a2@(4) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 45d4e: 2a39 0005 b1d8 movel 5b1d8 ,%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; 45d54: 2482 movel %d2,%a2@ last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; 45d56: 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; 45d5a: 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 ); 45d5c: 2348 0008 movel %a0,%a1@(8) first_block->prev = _Heap_Free_list_head( heap ); 45d60: 2348 000c movel %a0,%a1@(12) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 45d64: 2145 0028 movel %d5,%a0@(40) 45d68: 5285 addql #1,%d5 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; 45d6a: 2144 0014 movel %d4,%a0@(20) heap->area_begin = heap_area_begin; 45d6e: 2143 0018 movel %d3,%a0@(24) heap->area_end = heap_area_end; 45d72: 2146 001c movel %d6,%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; 45d76: 2142 0034 movel %d2,%a0@(52) 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; 45d7a: 2142 002c movel %d2,%a0@(44) stats->free_size = first_block_size; 45d7e: 2142 0030 movel %d2,%a0@(48) stats->min_free_size = first_block_size; stats->free_blocks = 1; 45d82: 2141 0038 movel %d1,%a0@(56) stats->max_free_blocks = 1; 45d86: 2141 003c movel %d1,%a0@(60) stats->used_blocks = 0; 45d8a: 42a8 0040 clrl %a0@(64) stats->max_search = 0; 45d8e: 42a8 0044 clrl %a0@(68) stats->allocs = 0; 45d92: 42a8 0048 clrl %a0@(72) stats->searches = 0; 45d96: 42a8 004c clrl %a0@(76) stats->frees = 0; 45d9a: 42a8 0050 clrl %a0@(80) stats->resizes = 0; 45d9e: 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; 45da2: 214a 0024 movel %a2,%a0@(36) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 45da6: 23c5 0005 b1d8 movel %d5,5b1d8 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; 45dac: 2149 000c movel %a1,%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; 45db0: 2149 0020 movel %a1,%a0@(32) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 45db4: 2149 0008 movel %a1,%a0@(8) ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 45db8: 6002 bras 45dbc <_Heap_Initialize+0x10c> <== ALWAYS TAKEN 45dba: 4280 clrl %d0 } 45dbc: 4cd7 047c moveml %sp@,%d2-%d6/%a2 45dc0: 4e5e unlk %fp 45dc2: 4e75 rts 00058730 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 58730: 4e56 ffe0 linkw %fp,#-32 58734: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 58738: 242e 000c movel %fp@(12),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 5873c: 2202 movel %d2,%d1 5873e: 2042 moveal %d2,%a0 58740: 5188 subql #8,%a0 58742: 246e 0008 moveal %fp@(8),%a2 58746: 286e 0014 moveal %fp@(20),%a4 5874a: 4c6a 1000 0010 remul %a2@(16),%d0,%d1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 58750: 4294 clrl %a4@ void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 58752: 266e 0018 moveal %fp@(24),%a3 58756: 91c0 subal %d0,%a0 58758: 2a2e 0010 movel %fp@(16),%d5 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; *new_size = 0; 5875c: 4293 clrl %a3@ 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 5875e: b1ea 0020 cmpal %a2@(32),%a0 58762: 6500 0096 bcsw 587fa <_Heap_Resize_block+0xca> 58766: b1ea 0024 cmpal %a2@(36),%a0 5876a: 6200 008e bhiw 587fa <_Heap_Resize_block+0xca> - 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; 5876e: 70fe moveq #-2,%d0 58770: 72fe moveq #-2,%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 58772: 7801 moveq #1,%d4 58774: 7c01 moveq #1,%d6 uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 58776: 7604 moveq #4,%d3 58778: 9682 subl %d2,%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; 5877a: c0a8 0004 andl %a0@(4),%d0 { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 5877e: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 58782: d689 addl %a1,%d3 58784: c2a9 0004 andl %a1@(4),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 58788: c8b1 1804 andl %a1@(00000004,%d1:l),%d4 bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 5878c: 2883 movel %d3,%a4@ 5878e: bd84 eorl %d6,%d4 58790: 1c04 moveb %d4,%d6 if ( next_block_is_free ) { 58792: 6704 beqs 58798 <_Heap_Resize_block+0x68> block_size += next_block_size; 58794: d081 addl %d1,%d0 alloc_size += next_block_size; 58796: d681 addl %d1,%d3 } if ( new_alloc_size > alloc_size ) { 58798: b685 cmpl %d5,%d3 5879a: 6404 bccs 587a0 <_Heap_Resize_block+0x70> 5879c: 7001 moveq #1,%d0 5879e: 605c bras 587fc <_Heap_Resize_block+0xcc> <== ALWAYS TAKEN return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 587a0: 4a06 tstb %d6 587a2: 672a beqs 587ce <_Heap_Resize_block+0x9e> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 587a4: 7601 moveq #1,%d3 587a6: c6a8 0004 andl %a0@(4),%d3 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 587aa: 2869 000c moveal %a1@(12),%a4 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 587ae: 8680 orl %d0,%d3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 587b0: 2269 0008 moveal %a1@(8),%a1 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 587b4: 2143 0004 movel %d3,%a0@(4) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 587b8: 7601 moveq #1,%d3 587ba: 87b0 0804 orl %d3,%a0@(00000004,%d0:l) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 587be: 234c 000c movel %a4,%a1@(12) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; 587c2: 93aa 0030 subl %d1,%a2@(48) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; 587c6: 53aa 0038 subql #1,%a2@(56) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 587ca: 2949 0008 movel %a1,%a4@(8) stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 587ce: 2f05 movel %d5,%sp@- 587d0: 2f02 movel %d2,%sp@- 587d2: 2f08 movel %a0,%sp@- 587d4: 2f0a movel %a2,%sp@- 587d6: 4eb9 0004 5e92 jsr 45e92 <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 587dc: 4fef 0010 lea %sp@(16),%sp block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 587e0: 72fe moveq #-2,%d1 /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 587e2: 2040 moveal %d0,%a0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 587e4: 2240 moveal %d0,%a1 587e6: 93c2 subal %d2,%a1 /* Statistics */ ++stats->resizes; 587e8: 4280 clrl %d0 block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 587ea: c2a8 0004 andl %a0@(4),%d1 587ee: 43f1 1804 lea %a1@(00000004,%d1:l),%a1 587f2: 2689 movel %a1,%a3@ /* Statistics */ ++stats->resizes; 587f4: 52aa 0054 addql #1,%a2@(84) 587f8: 6002 bras 587fc <_Heap_Resize_block+0xcc> <== ALWAYS TAKEN 587fa: 7002 moveq #2,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 587fc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 58802: 4e5e unlk %fp 58804: 4e75 rts ... 00058808 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 58808: 4e56 0000 linkw %fp,#0 5880c: 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 ) 58810: 2040 moveal %d0,%a0 58812: 5188 subql #8,%a0 58814: 226e 0008 moveal %fp@(8),%a1 58818: 2f02 movel %d2,%sp@- 5881a: 2400 movel %d0,%d2 5881c: 4c69 2001 0010 remul %a1@(16),%d1,%d2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 58822: 2429 0020 movel %a1@(32),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 58826: 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 58828: b488 cmpl %a0,%d2 5882a: 6244 bhis 58870 <_Heap_Size_of_alloc_area+0x68> 5882c: b1e9 0024 cmpal %a1@(36),%a0 58830: 53c1 sls %d1 58832: 49c1 extbl %d1 58834: 4481 negl %d1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 58836: 4a01 tstb %d1 58838: 6736 beqs 58870 <_Heap_Size_of_alloc_area+0x68> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5883a: 72fe moveq #-2,%d1 5883c: c2a8 0004 andl %a0@(4),%d1 58840: d1c1 addal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 58842: b488 cmpl %a0,%d2 58844: 622a bhis 58870 <_Heap_Size_of_alloc_area+0x68> <== ALWAYS TAKEN 58846: b1e9 0024 cmpal %a1@(36),%a0 5884a: 53c1 sls %d1 5884c: 49c1 extbl %d1 5884e: 4481 negl %d1 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 58850: 4a01 tstb %d1 58852: 671c beqs 58870 <_Heap_Size_of_alloc_area+0x68> <== ALWAYS TAKEN 58854: 7201 moveq #1,%d1 58856: c2a8 0004 andl %a0@(4),%d1 5885a: 4a01 tstb %d1 5885c: 6712 beqs 58870 <_Heap_Size_of_alloc_area+0x68> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5885e: 7204 moveq #4,%d1 58860: 9280 subl %d0,%d1 58862: 2001 movel %d1,%d0 58864: d088 addl %a0,%d0 58866: 226e 0010 moveal %fp@(16),%a1 5886a: 2280 movel %d0,%a1@ 5886c: 7001 moveq #1,%d0 return true; 5886e: 6002 bras 58872 <_Heap_Size_of_alloc_area+0x6a> <== ALWAYS TAKEN 58870: 4200 clrb %d0 } 58872: 241f movel %sp@+,%d2 58874: 4e5e unlk %fp 58876: 4e75 rts 0004694c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4694c: 4e56 ffd0 linkw %fp,#-48 46950: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 46954: 286e 0008 moveal %fp@(8),%a4 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 46958: 47fa 031a lea %pc@(46c74 <_Heap_Walk_print>),%a3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4695c: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 46960: 2c2c 0010 movel %a4@(16),%d6 uintptr_t const min_block_size = heap->min_block_size; 46964: 262c 0014 movel %a4@(20),%d3 Heap_Block *const last_block = heap->last_block; 46968: 2a2c 0024 movel %a4@(36),%d5 Heap_Block *block = heap->first_block; 4696c: 246c 0020 moveal %a4@(32),%a2 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 46970: 4a2e 0013 tstb %fp@(19) 46974: 6604 bnes 4697a <_Heap_Walk+0x2e> 46976: 47fa ffcc lea %pc@(46944 <_Heap_Walk_print_nothing>),%a3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 4697a: 7003 moveq #3,%d0 4697c: b0b9 0005 df3e cmpl 5df3e <_System_state_Current>,%d0 46982: 6600 02da bnew 46c5e <_Heap_Walk+0x312> <== ALWAYS TAKEN 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)( 46986: 2f2c 000c movel %a4@(12),%sp@- 4698a: 2f2c 0008 movel %a4@(8),%sp@- 4698e: 2f05 movel %d5,%sp@- 46990: 2f0a movel %a2,%sp@- 46992: 2f2c 001c movel %a4@(28),%sp@- 46996: 2f2c 0018 movel %a4@(24),%sp@- 4699a: 2f03 movel %d3,%sp@- 4699c: 2f06 movel %d6,%sp@- 4699e: 4879 0005 a302 pea 5a302 469a4: 42a7 clrl %sp@- 469a6: 2f02 movel %d2,%sp@- 469a8: 4e93 jsr %a3@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 469aa: 4fef 002c lea %sp@(44),%sp 469ae: 4a86 tstl %d6 469b0: 6608 bnes 469ba <_Heap_Walk+0x6e> (*printer)( source, true, "page size is zero\n" ); 469b2: 4879 0005 a393 pea 5a393 469b8: 607e bras 46a38 <_Heap_Walk+0xec> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 469ba: 7003 moveq #3,%d0 469bc: c086 andl %d6,%d0 469be: 670c beqs 469cc <_Heap_Walk+0x80> (*printer)( 469c0: 2f06 movel %d6,%sp@- 469c2: 4879 0005 a3a6 pea 5a3a6 469c8: 6000 0268 braw 46c32 <_Heap_Walk+0x2e6> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 469cc: 2203 movel %d3,%d1 469ce: 4c46 1000 remul %d6,%d0,%d1 469d2: 4a80 tstl %d0 469d4: 670c beqs 469e2 <_Heap_Walk+0x96> (*printer)( 469d6: 2f03 movel %d3,%sp@- 469d8: 4879 0005 a3c4 pea 5a3c4 469de: 6000 0252 braw 46c32 <_Heap_Walk+0x2e6> ); return false; } if ( 469e2: 200a movel %a2,%d0 469e4: 5080 addql #8,%d0 469e6: 4c46 0001 remul %d6,%d1,%d0 469ea: 4a81 tstl %d1 469ec: 670c beqs 469fa <_Heap_Walk+0xae> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 469ee: 2f0a movel %a2,%sp@- 469f0: 4879 0005 a3e8 pea 5a3e8 469f6: 6000 023a braw 46c32 <_Heap_Walk+0x2e6> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 469fa: 7001 moveq #1,%d0 469fc: c0aa 0004 andl %a2@(4),%d0 46a00: 4a00 tstb %d0 46a02: 6608 bnes 46a0c <_Heap_Walk+0xc0> (*printer)( 46a04: 4879 0005 a419 pea 5a419 46a0a: 602c bras 46a38 <_Heap_Walk+0xec> <== ALWAYS TAKEN ); return false; } if ( first_block->prev_size != page_size ) { 46a0c: 2812 movel %a2@,%d4 46a0e: bc84 cmpl %d4,%d6 46a10: 670e beqs 46a20 <_Heap_Walk+0xd4> (*printer)( 46a12: 2f06 movel %d6,%sp@- 46a14: 2f04 movel %d4,%sp@- 46a16: 4879 0005 a447 pea 5a447 46a1c: 6000 0150 braw 46b6e <_Heap_Walk+0x222> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_free( last_block ) ) { 46a20: 2045 moveal %d5,%a0 46a22: 70fe moveq #-2,%d0 46a24: 7201 moveq #1,%d1 46a26: c0a8 0004 andl %a0@(4),%d0 46a2a: c2b0 0804 andl %a0@(00000004,%d0:l),%d1 46a2e: 4a01 tstb %d1 46a30: 6616 bnes 46a48 <_Heap_Walk+0xfc> (*printer)( 46a32: 4879 0005 a472 pea 5a472 46a38: 4878 0001 pea 1 46a3c: 2f02 movel %d2,%sp@- 46a3e: 4e93 jsr %a3@ 46a40: 4fef 000c lea %sp@(12),%sp 46a44: 6000 01f8 braw 46c3e <_Heap_Walk+0x2f2> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 46a48: 2c2c 0010 movel %a4@(16),%d6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46a4c: 220c movel %a4,%d1 46a4e: 206c 0008 moveal %a4@(8),%a0 46a52: 606a bras 46abe <_Heap_Walk+0x172> <== ALWAYS TAKEN 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 46a54: b1ec 0020 cmpal %a4@(32),%a0 46a58: 650e bcss 46a68 <_Heap_Walk+0x11c> 46a5a: b1ec 0024 cmpal %a4@(36),%a0 46a5e: 53c0 sls %d0 46a60: 49c0 extbl %d0 46a62: 4480 negl %d0 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 46a64: 4a00 tstb %d0 46a66: 660c bnes 46a74 <_Heap_Walk+0x128> <== NEVER TAKEN (*printer)( 46a68: 2f08 movel %a0,%sp@- 46a6a: 4879 0005 a487 pea 5a487 46a70: 6000 01c0 braw 46c32 <_Heap_Walk+0x2e6> ); return false; } if ( 46a74: 4c46 7000 remul %d6,%d0,%d7 46a78: 4a80 tstl %d0 46a7a: 670c beqs 46a88 <_Heap_Walk+0x13c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 46a7c: 2f08 movel %a0,%sp@- 46a7e: 4879 0005 a4a7 pea 5a4a7 46a84: 6000 01ac braw 46c32 <_Heap_Walk+0x2e6> ); return false; } if ( _Heap_Is_used( free_block ) ) { 46a88: 70fe moveq #-2,%d0 46a8a: 7e01 moveq #1,%d7 46a8c: c0a8 0004 andl %a0@(4),%d0 46a90: ceb0 0804 andl %a0@(00000004,%d0:l),%d7 46a94: 670c beqs 46aa2 <_Heap_Walk+0x156> (*printer)( 46a96: 2f08 movel %a0,%sp@- 46a98: 4879 0005 a4d7 pea 5a4d7 46a9e: 6000 0192 braw 46c32 <_Heap_Walk+0x2e6> ); return false; } if ( free_block->prev != prev_block ) { 46aa2: 2028 000c movel %a0@(12),%d0 46aa6: b280 cmpl %d0,%d1 46aa8: 670e beqs 46ab8 <_Heap_Walk+0x16c> (*printer)( 46aaa: 2f00 movel %d0,%sp@- 46aac: 2f08 movel %a0,%sp@- 46aae: 4879 0005 a4f3 pea 5a4f3 46ab4: 6000 00b8 braw 46b6e <_Heap_Walk+0x222> <== ALWAYS TAKEN return false; } prev_block = free_block; free_block = free_block->next; 46ab8: 2208 movel %a0,%d1 46aba: 2068 0008 moveal %a0@(8),%a0 ); return false; } if ( 46abe: 2e08 movel %a0,%d7 46ac0: 5087 addql #8,%d7 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 46ac2: b9c8 cmpal %a0,%a4 46ac4: 668e bnes 46a54 <_Heap_Walk+0x108> 46ac6: 6000 0190 braw 46c58 <_Heap_Walk+0x30c> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 46aca: 202a 0004 movel %a2@(4),%d0 46ace: 7cfe moveq #-2,%d6 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 46ad0: 7201 moveq #1,%d1 46ad2: cc80 andl %d0,%d6 46ad4: 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); 46ad6: 4bf2 6800 lea %a2@(00000000,%d6:l),%a5 46ada: 4a00 tstb %d0 46adc: 6716 beqs 46af4 <_Heap_Walk+0x1a8> (*printer)( 46ade: 2f06 movel %d6,%sp@- 46ae0: 2f0a movel %a2,%sp@- 46ae2: 4879 0005 a525 pea 5a525 46ae8: 42a7 clrl %sp@- 46aea: 2f02 movel %d2,%sp@- 46aec: 4e93 jsr %a3@ 46aee: 4fef 0014 lea %sp@(20),%sp 46af2: 6016 bras 46b0a <_Heap_Walk+0x1be> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 46af4: 2f12 movel %a2@,%sp@- 46af6: 2f06 movel %d6,%sp@- 46af8: 2f0a movel %a2,%sp@- 46afa: 4879 0005 a53c pea 5a53c 46b00: 42a7 clrl %sp@- 46b02: 2f02 movel %d2,%sp@- 46b04: 4e93 jsr %a3@ 46b06: 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 46b0a: bbec 0020 cmpal %a4@(32),%a5 46b0e: 650e bcss 46b1e <_Heap_Walk+0x1d2> <== ALWAYS TAKEN 46b10: bbec 0024 cmpal %a4@(36),%a5 46b14: 53c0 sls %d0 46b16: 49c0 extbl %d0 46b18: 4480 negl %d0 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 46b1a: 4a00 tstb %d0 46b1c: 660c bnes 46b2a <_Heap_Walk+0x1de> (*printer)( 46b1e: 2f0d movel %a5,%sp@- 46b20: 2f0a movel %a2,%sp@- 46b22: 4879 0005 a561 pea 5a561 46b28: 6044 bras 46b6e <_Heap_Walk+0x222> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 46b2a: 2206 movel %d6,%d1 46b2c: 4c44 1000 remul %d4,%d0,%d1 46b30: 4a80 tstl %d0 46b32: 670c beqs 46b40 <_Heap_Walk+0x1f4> (*printer)( 46b34: 2f06 movel %d6,%sp@- 46b36: 2f0a movel %a2,%sp@- 46b38: 4879 0005 a58e pea 5a58e 46b3e: 602e bras 46b6e <_Heap_Walk+0x222> <== ALWAYS TAKEN ); return false; } if ( block_size < min_block_size ) { 46b40: b686 cmpl %d6,%d3 46b42: 631c blss 46b60 <_Heap_Walk+0x214> (*printer)( 46b44: 2f03 movel %d3,%sp@- 46b46: 2f06 movel %d6,%sp@- 46b48: 2f0a movel %a2,%sp@- 46b4a: 4879 0005 a5bc pea 5a5bc 46b50: 4878 0001 pea 1 46b54: 2f02 movel %d2,%sp@- 46b56: 4e93 jsr %a3@ block, block_size, min_block_size ); return false; 46b58: 4fef 0018 lea %sp@(24),%sp 46b5c: 6000 00e0 braw 46c3e <_Heap_Walk+0x2f2> } if ( next_block_begin <= block_begin ) { 46b60: b5cd cmpal %a5,%a2 46b62: 651a bcss 46b7e <_Heap_Walk+0x232> (*printer)( 46b64: 2f0d movel %a5,%sp@- 46b66: 2f0a movel %a2,%sp@- 46b68: 4879 0005 a5e7 pea 5a5e7 46b6e: 4878 0001 pea 1 46b72: 2f02 movel %d2,%sp@- 46b74: 4e93 jsr %a3@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 46b76: 4fef 0014 lea %sp@(20),%sp 46b7a: 6000 00c2 braw 46c3e <_Heap_Walk+0x2f2> } if ( !_Heap_Is_prev_used( next_block ) ) { 46b7e: 7001 moveq #1,%d0 46b80: c0ad 0004 andl %a5@(4),%d0 46b84: 4a00 tstb %d0 46b86: 6600 00ce bnew 46c56 <_Heap_Walk+0x30a> <== 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; 46b8a: 2e2a 0004 movel %a2@(4),%d7 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 46b8e: 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; 46b90: 43f9 0005 a61b lea 5a61b ,%a1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46b96: 206c 0008 moveal %a4@(8),%a0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 46b9a: cc87 andl %d7,%d6 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 46b9c: 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); 46ba0: 2e0a movel %a2,%d7 46ba2: de86 addl %d6,%d7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46ba4: 2d48 fff8 movel %a0,%fp@(-8) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 46ba8: 206a 0008 moveal %a2@(8),%a0 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 46bac: b1ec 000c cmpal %a4@(12),%a0 46bb0: 6710 beqs 46bc2 <_Heap_Walk+0x276> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 46bb2: 43f9 0005 a625 lea 5a625 ,%a1 46bb8: b9c8 cmpal %a0,%a4 46bba: 6706 beqs 46bc2 <_Heap_Walk+0x276> 46bbc: 43f9 0005 a252 lea 5a252 ,%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)( 46bc2: 202a 000c movel %a2@(12),%d0 46bc6: 223c 0005 a62f movel #370223,%d1 46bcc: b0ae fff8 cmpl %fp@(-8),%d0 46bd0: 6710 beqs 46be2 <_Heap_Walk+0x296> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 46bd2: 223c 0005 a63a movel #370234,%d1 46bd8: b9c0 cmpal %d0,%a4 46bda: 6706 beqs 46be2 <_Heap_Walk+0x296> 46bdc: 223c 0005 a252 movel #369234,%d1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 46be2: 2f09 movel %a1,%sp@- 46be4: 2f08 movel %a0,%sp@- 46be6: 2f01 movel %d1,%sp@- 46be8: 2f00 movel %d0,%sp@- 46bea: 2f0a movel %a2,%sp@- 46bec: 4879 0005 a644 pea 5a644 46bf2: 42a7 clrl %sp@- 46bf4: 2f02 movel %d2,%sp@- 46bf6: 4e93 jsr %a3@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 46bf8: 4fef 0020 lea %sp@(32),%sp 46bfc: 2047 moveal %d7,%a0 46bfe: 2010 movel %a0@,%d0 46c00: b086 cmpl %d6,%d0 46c02: 671c beqs 46c20 <_Heap_Walk+0x2d4> (*printer)( 46c04: 2f07 movel %d7,%sp@- 46c06: 2f00 movel %d0,%sp@- 46c08: 2f06 movel %d6,%sp@- 46c0a: 2f0a movel %a2,%sp@- 46c0c: 4879 0005 a670 pea 5a670 46c12: 4878 0001 pea 1 46c16: 2f02 movel %d2,%sp@- 46c18: 4e93 jsr %a3@ 46c1a: 4fef 001c lea %sp@(28),%sp 46c1e: 601e bras 46c3e <_Heap_Walk+0x2f2> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 46c20: 7001 moveq #1,%d0 46c22: c0ae fffc andl %fp@(-4),%d0 46c26: 4a00 tstb %d0 46c28: 6618 bnes 46c42 <_Heap_Walk+0x2f6> (*printer)( 46c2a: 2f0a movel %a2,%sp@- 46c2c: 4879 0005 a6a9 pea 5a6a9 46c32: 4878 0001 pea 1 46c36: 2f02 movel %d2,%sp@- 46c38: 4e93 jsr %a3@ 46c3a: 4fef 0010 lea %sp@(16),%sp 46c3e: 4200 clrb %d0 46c40: 601e bras 46c60 <_Heap_Walk+0x314> <== ALWAYS TAKEN return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46c42: 206c 0008 moveal %a4@(8),%a0 46c46: 6008 bras 46c50 <_Heap_Walk+0x304> <== ALWAYS TAKEN { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 46c48: b5c8 cmpal %a0,%a2 46c4a: 670a beqs 46c56 <_Heap_Walk+0x30a> return true; } free_block = free_block->next; 46c4c: 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 ) { 46c50: b9c8 cmpal %a0,%a4 46c52: 66f4 bnes 46c48 <_Heap_Walk+0x2fc> 46c54: 6014 bras 46c6a <_Heap_Walk+0x31e> <== ALWAYS TAKEN 46c56: 244d moveal %a5,%a2 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 46c58: ba8a cmpl %a2,%d5 46c5a: 6600 fe6e bnew 46aca <_Heap_Walk+0x17e> <== ALWAYS TAKEN 46c5e: 7001 moveq #1,%d0 block = next_block; } return true; } 46c60: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 46c66: 4e5e unlk %fp 46c68: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 46c6a: 2f0a movel %a2,%sp@- 46c6c: 4879 0005 a6d8 pea 5a6d8 46c72: 60be bras 46c32 <_Heap_Walk+0x2e6> <== ALWAYS TAKEN 00046c74 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 46c74: 41f9 0004 3474 lea 43474 ,%a0 46c7a: 4e56 0000 linkw %fp,#0 46c7e: 202e 0008 movel %fp@(8),%d0 va_list ap; if ( error ) { 46c82: 4a2e 000f tstb %fp@(15) 46c86: 670a beqs 46c92 <_Heap_Walk_print+0x1e> printk( "FAIL[%d]: ", source ); 46c88: 2f00 movel %d0,%sp@- 46c8a: 4879 0005 a703 pea 5a703 46c90: 6008 bras 46c9a <_Heap_Walk_print+0x26> <== ALWAYS TAKEN } else { printk( "PASS[%d]: ", source ); 46c92: 2f00 movel %d0,%sp@- 46c94: 4879 0005 a70e pea 5a70e 46c9a: 4e90 jsr %a0@ 46c9c: 508f addql #8,%sp } va_start( ap, fmt ); vprintk( fmt, ap ); 46c9e: 486e 0014 pea %fp@(20) 46ca2: 2f2e 0010 movel %fp@(16),%sp@- 46ca6: 4eb9 0004 4df8 jsr 44df8 46cac: 508f addql #8,%sp va_end( ap ); } 46cae: 4e5e unlk %fp 46cb0: 4e75 rts ... 000455d4 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 455d4: 4e56 0000 linkw %fp,#0 455d8: 2f0a movel %a2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) (void) rtems_io_initialize( major, 0, NULL ); 455da: 45f9 0004 9820 lea 49820 ,%a2 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 455e0: 2f02 movel %d2,%sp@- 455e2: 4282 clrl %d2 rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 455e4: 600e bras 455f4 <_IO_Initialize_all_drivers+0x20> <== ALWAYS TAKEN (void) rtems_io_initialize( major, 0, NULL ); 455e6: 42a7 clrl %sp@- 455e8: 42a7 clrl %sp@- 455ea: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 455ec: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 455ee: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 455f0: 4fef 000c lea %sp@(12),%sp 455f4: b4b9 0005 bc4e cmpl 5bc4e <_IO_Number_of_drivers>,%d2 455fa: 65ea bcss 455e6 <_IO_Initialize_all_drivers+0x12> (void) rtems_io_initialize( major, 0, NULL ); } 455fc: 242e fff8 movel %fp@(-8),%d2 45600: 246e fffc moveal %fp@(-4),%a2 45604: 4e5e unlk %fp 45606: 4e75 rts 00045608 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 45608: 4e56 ffe0 linkw %fp,#-32 4560c: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%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; 45610: 2479 0005 a336 moveal 5a336 ,%a2 drivers_in_table = Configuration.number_of_device_drivers; 45616: 2a39 0005 a332 movel 5a332 ,%d5 number_of_drivers = Configuration.maximum_drivers; 4561c: 2439 0005 a32e movel 5a32e ,%d2 /* * 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 ) 45622: ba82 cmpl %d2,%d5 45624: 6440 bccs 45666 <_IO_Manager_initialization+0x5e> /* * 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 *) 45626: 2002 movel %d2,%d0 45628: 2602 movel %d2,%d3 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 4562a: 4284 clrl %d4 4562c: 4286 clrl %d6 4562e: 49f9 0004 c200 lea 4c200 ,%a4 /* * 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 *) 45634: e788 lsll #3,%d0 45636: eb8b lsll #5,%d3 45638: 9680 subl %d0,%d3 4563a: 2f03 movel %d3,%sp@- 4563c: 4eb9 0004 7d8c jsr 47d8c <_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( 45642: 2f03 movel %d3,%sp@- 45644: 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; 45646: 23c2 0005 bc4e movel %d2,5bc4e <_IO_Number_of_drivers> memset( 4564c: 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 *) 4564e: 23c0 0005 bc52 movel %d0,5bc52 <_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( 45654: 4eb9 0004 c270 jsr 4c270 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 4565a: 2679 0005 bc52 moveal 5bc52 <_IO_Driver_address_table>,%a3 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 45660: 4fef 0010 lea %sp@(16),%sp 45664: 6028 bras 4568e <_IO_Manager_initialization+0x86> <== ALWAYS TAKEN * 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; 45666: 23ca 0005 bc52 movel %a2,5bc52 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 4566c: 23c5 0005 bc4e movel %d5,5bc4e <_IO_Number_of_drivers> return; 45672: 601e bras 45692 <_IO_Manager_initialization+0x8a> <== ALWAYS TAKEN _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 45674: 4878 0018 pea 18 45678: 4872 4800 pea %a2@(00000000,%d4:l) 4567c: 4873 4800 pea %a3@(00000000,%d4:l) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 45680: 5286 addql #1,%d6 45682: 0684 0000 0018 addil #24,%d4 _IO_Driver_address_table[index] = driver_table[index]; 45688: 4e94 jsr %a4@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4568a: 4fef 000c lea %sp@(12),%sp 4568e: ba86 cmpl %d6,%d5 45690: 62e2 bhis 45674 <_IO_Manager_initialization+0x6c> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 45692: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 45698: 4e5e unlk %fp 4569a: 4e75 rts 00045f88 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45f88: 4e56 0000 linkw %fp,#0 45f8c: 222e 000c movel %fp@(12),%d1 45f90: 2f03 movel %d3,%sp@- _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45f92: 4283 clrl %d3 45f94: 1601 moveb %d1,%d3 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45f96: 2f02 movel %d2,%sp@- 45f98: 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 ); 45f9c: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45f9e: 202e 0008 movel %fp@(8),%d0 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45fa2: 2f03 movel %d3,%sp@- _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 45fa4: 263c 0000 0700 movel #1792,%d3 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 45faa: 2f00 movel %d0,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 45fac: 13c1 0005 bade moveb %d1,5bade <_Internal_errors_What_happened+0x4> bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 45fb2: 23c0 0005 bada movel %d0,5bada <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 45fb8: 23c2 0005 bae0 movel %d2,5bae0 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 45fbe: 4eb9 0004 7a32 jsr 47a32 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 45fc4: 40c0 movew %sr,%d0 45fc6: 8083 orl %d3,%d0 45fc8: 46c0 movew %d0,%sr 45fca: 2002 movel %d2,%d0 <== NOT EXECUTED 45fcc: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 45fd2: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 45fd4: 7005 moveq #5,%d0 45fd6: 4fef 000c lea %sp@(12),%sp 45fda: 23c0 0005 bbb6 movel %d0,5bbb6 <_System_state_Current> 45fe0: 60fe bras 45fe0 <_Internal_error_Occurred+0x58> <== ALWAYS TAKEN ... 00049da4 <_Objects_API_maximum_class>: case OBJECTS_NO_API: default: break; } return 0; } 49da4: 7203 moveq #3,%d1 #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 49da6: 4e56 0000 linkw %fp,#0 case OBJECTS_NO_API: default: break; } return 0; } 49daa: 202e 0008 movel %fp@(8),%d0 49dae: 5380 subql #1,%d0 49db0: b280 cmpl %d0,%d1 49db2: 6404 bccs 49db8 <_Objects_API_maximum_class+0x14> 49db4: 4280 clrl %d0 49db6: 600a bras 49dc2 <_Objects_API_maximum_class+0x1e> <== ALWAYS TAKEN 49db8: 41f9 0005 97a8 lea 597a8 ,%a0 49dbe: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 49dc2: 4e5e unlk %fp 49dc4: 4e75 rts ... 0004604c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 4604c: 4e56 fff0 linkw %fp,#-16 46050: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46054: 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 ) 46058: 4aaa 0014 tstl %a2@(20) 4605c: 6604 bnes 46062 <_Objects_Allocate+0x16> <== NEVER TAKEN 4605e: 4280 clrl %d0 <== NOT EXECUTED 46060: 605e bras 460c0 <_Objects_Allocate+0x74> <== NOT EXECUTED /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 46062: 240a movel %a2,%d2 46064: 0682 0000 001c addil #28,%d2 4606a: 47f9 0004 98a0 lea 498a0 <_Chain_Get>,%a3 46070: 2f02 movel %d2,%sp@- 46072: 4e93 jsr %a3@ if ( information->auto_extend ) { 46074: 588f addql #4,%sp 46076: 4a2a 0010 tstb %a2@(16) 4607a: 6744 beqs 460c0 <_Objects_Allocate+0x74> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 4607c: 4a80 tstl %d0 4607e: 6612 bnes 46092 <_Objects_Allocate+0x46> _Objects_Extend_information( information ); 46080: 2f0a movel %a2,%sp@- 46082: 4eb9 0004 60f8 jsr 460f8 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 46088: 2f02 movel %d2,%sp@- 4608a: 4e93 jsr %a3@ } if ( the_object ) { 4608c: 508f addql #8,%sp 4608e: 4a80 tstl %d0 46090: 672e beqs 460c0 <_Objects_Allocate+0x74> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46092: 2040 moveal %d0,%a0 46094: 4281 clrl %d1 46096: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46098: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 4609a: 362a 0008 movew %a2@(8),%d3 4609e: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460a2: 342a 0012 movew %a2@(18),%d2 information->inactive--; 460a6: 306a 0028 moveaw %a2@(40),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460aa: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460ac: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 460b0: 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 ]--; 460b2: e589 lsll #2,%d1 information->inactive--; 460b4: 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 ]--; 460b8: 206a 002a moveal %a2@(42),%a0 460bc: d1c1 addal %d1,%a0 460be: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 460c0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 460c6: 4e5e unlk %fp 460c8: 4e75 rts ... 000460f8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 460f8: 4e56 ffc8 linkw %fp,#-56 460fc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 46100: 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 ); 46104: 4283 clrl %d3 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 46106: 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 ); 4610a: 362a 0008 movew %a2@(8),%d3 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4610e: 4a88 tstl %a0 46110: 6608 bnes 4611a <_Objects_Extend_information+0x22> 46112: 2403 movel %d3,%d2 46114: 4284 clrl %d4 46116: 4285 clrl %d5 46118: 602a bras 46144 <_Objects_Extend_information+0x4c> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; 4611a: 4280 clrl %d0 4611c: 2403 movel %d3,%d2 4611e: 4284 clrl %d4 46120: 302a 0012 movew %a2@(18),%d0 46124: 3a2a 000e movew %a2@(14),%d5 46128: 0285 0000 ffff andil #65535,%d5 4612e: 8ac0 divuw %d0,%d5 46130: 0285 0000 ffff andil #65535,%d5 for ( ; block < block_count; block++ ) { 46136: 6008 bras 46140 <_Objects_Extend_information+0x48> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 46138: 4a98 tstl %a0@+ 4613a: 6708 beqs 46144 <_Objects_Extend_information+0x4c> 4613c: d480 addl %d0,%d2 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4613e: 5284 addql #1,%d4 46140: ba84 cmpl %d4,%d5 46142: 62f4 bhis 46138 <_Objects_Extend_information+0x40> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 46144: 4280 clrl %d0 46146: 4287 clrl %d7 46148: 302a 0012 movew %a2@(18),%d0 4614c: 3e2a 000e movew %a2@(14),%d7 46150: de80 addl %d0,%d7 /* * 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 ) { 46152: 0c87 0000 ffff cmpil #65535,%d7 46158: 6200 01da bhiw 46334 <_Objects_Extend_information+0x23c> <== 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; 4615c: 41ea 0014 lea %a2@(20),%a0 46160: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 46164: 4a2a 0010 tstb %a2@(16) 46168: 6712 beqs 4617c <_Objects_Extend_information+0x84> new_object_block = _Workspace_Allocate( block_size ); 4616a: 2f00 movel %d0,%sp@- 4616c: 4eb9 0004 7dc0 jsr 47dc0 <_Workspace_Allocate> if ( !new_object_block ) 46172: 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 ); 46174: 2c00 movel %d0,%d6 if ( !new_object_block ) 46176: 6610 bnes 46188 <_Objects_Extend_information+0x90> 46178: 6000 01ba braw 46334 <_Objects_Extend_information+0x23c> <== ALWAYS TAKEN return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 4617c: 2f00 movel %d0,%sp@- 4617e: 4eb9 0004 7d8c jsr 47d8c <_Workspace_Allocate_or_fatal_error> 46184: 588f addql #4,%sp 46186: 2c00 movel %d0,%d6 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 46188: 4280 clrl %d0 4618a: 302a 000e movew %a2@(14),%d0 4618e: b082 cmpl %d2,%d0 46190: 6200 0112 bhiw 462a4 <_Objects_Extend_information+0x1ac> */ /* * Up the block count and maximum */ block_count++; 46194: 2845 moveal %d5,%a4 46196: 528c addql #1,%a4 * 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 ); 46198: 2007 movel %d7,%d0 4619a: d083 addl %d3,%d0 4619c: 41f4 ca00 lea %a4@(00000000,%a4:l:2),%a0 461a0: d088 addl %a0,%d0 461a2: e588 lsll #2,%d0 461a4: 2f00 movel %d0,%sp@- 461a6: 4eb9 0004 7dc0 jsr 47dc0 <_Workspace_Allocate> if ( !object_blocks ) { 461ac: 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 ); 461ae: 2640 moveal %d0,%a3 if ( !object_blocks ) { 461b0: 4a80 tstl %d0 461b2: 660e bnes 461c2 <_Objects_Extend_information+0xca> _Workspace_Free( new_object_block ); 461b4: 2f06 movel %d6,%sp@- 461b6: 4eb9 0004 7ddc jsr 47ddc <_Workspace_Free> return; 461bc: 588f addql #4,%sp 461be: 6000 0174 braw 46334 <_Objects_Extend_information+0x23c> <== ALWAYS TAKEN } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 461c2: 200c movel %a4,%d0 461c4: e588 lsll #2,%d0 461c6: 2840 moveal %d0,%a4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 461c8: 4280 clrl %d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 461ca: 4bf3 c800 lea %a3@(00000000,%a4:l),%a5 461ce: 49f5 c800 lea %a5@(00000000,%a4:l),%a4 461d2: 302a 000e movew %a2@(14),%d0 461d6: b680 cmpl %d0,%d3 461d8: 6506 bcss 461e0 <_Objects_Extend_information+0xe8> 461da: 204c moveal %a4,%a0 461dc: 4280 clrl %d0 461de: 604a bras 4622a <_Objects_Extend_information+0x132> <== 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, 461e0: 2205 movel %d5,%d1 461e2: e589 lsll #2,%d1 461e4: 2f01 movel %d1,%sp@- 461e6: 2f2a 002e movel %a2@(46),%sp@- 461ea: 2d41 fff0 movel %d1,%fp@(-16) 461ee: 2f0b movel %a3,%sp@- 461f0: 4eb9 0004 c200 jsr 4c200 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 461f6: 222e fff0 movel %fp@(-16),%d1 461fa: 2f01 movel %d1,%sp@- 461fc: 2f2a 002a movel %a2@(42),%sp@- 46200: 2f0d movel %a5,%sp@- 46202: 4eb9 0004 c200 jsr 4c200 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 46208: 4280 clrl %d0 4620a: 302a 000e movew %a2@(14),%d0 4620e: d680 addl %d0,%d3 46210: e58b lsll #2,%d3 46212: 2f03 movel %d3,%sp@- 46214: 2f2a 0018 movel %a2@(24),%sp@- 46218: 2f0c movel %a4,%sp@- 4621a: 4eb9 0004 c200 jsr 4c200 46220: 4fef 0024 lea %sp@(36),%sp 46224: 6008 bras 4622e <_Objects_Extend_information+0x136> <== ALWAYS TAKEN /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 46226: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 46228: 5280 addql #1,%d0 4622a: b680 cmpl %d0,%d3 4622c: 62f8 bhis 46226 <_Objects_Extend_information+0x12e> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4622e: 4281 clrl %d1 46230: 2002 movel %d2,%d0 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 46232: e58d lsll #2,%d5 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 46234: 322a 0012 movew %a2@(18),%d1 46238: 41f4 2c00 lea %a4@(00000000,%d2:l:4),%a0 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 4623c: 42b5 5800 clrl %a5@(00000000,%d5:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 46240: d282 addl %d2,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 46242: 42b3 5800 clrl %a3@(00000000,%d5:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 46246: 6004 bras 4624c <_Objects_Extend_information+0x154> <== ALWAYS TAKEN index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 46248: 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++ ) { 4624a: 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 ; 4624c: b280 cmpl %d0,%d1 4624e: 62f8 bhis 46248 <_Objects_Extend_information+0x150> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 46250: 203c 0000 0700 movel #1792,%d0 46256: 40c3 movew %sr,%d3 46258: 8083 orl %d3,%d0 4625a: 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( 4625c: 2012 movel %a2@,%d0 4625e: 7218 moveq #24,%d1 46260: 4285 clrl %d5 46262: e3a8 lsll %d1,%d0 46264: 3a07 movew %d7,%d5 46266: 4281 clrl %d1 46268: 2245 moveal %d5,%a1 4626a: 7a1b moveq #27,%d5 4626c: 322a 0004 movew %a2@(4),%d1 46270: 08c0 0010 bset #16,%d0 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; 46274: 3547 000e movew %d7,%a2@(14) information->maximum_id = _Objects_Build_id( 46278: eba9 lsll %d5,%d1 4627a: 2e09 movel %a1,%d7 4627c: 8081 orl %d1,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 4627e: 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( 46282: 8e80 orl %d0,%d7 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 46284: 254b 002e movel %a3,%a2@(46) information->inactive_per_block = inactive_per_block; 46288: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4628c: 2547 000a movel %d7,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 46290: 254c 0018 movel %a4,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 46294: 46c3 movew %d3,%sr if ( old_tables ) 46296: 4a88 tstl %a0 46298: 670a beqs 462a4 <_Objects_Extend_information+0x1ac> _Workspace_Free( old_tables ); 4629a: 2f08 movel %a0,%sp@- 4629c: 4eb9 0004 7ddc jsr 47ddc <_Workspace_Free> 462a2: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 462a4: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 462a8: 4281 clrl %d1 462aa: 200e movel %fp,%d0 462ac: 0680 ffff fff4 addil #-12,%d0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 462b2: 2a00 movel %d0,%d5 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 462b4: 260a movel %a2,%d3 462b6: 0683 0000 001c addil #28,%d3 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 462bc: 49f9 0004 98a0 lea 498a0 <_Chain_Get>,%a4 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 462c2: 47f9 0004 5880 lea 45880 <_Chain_Append>,%a3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 462c8: e58c lsll #2,%d4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 462ca: 322a 0012 movew %a2@(18),%d1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 462ce: 2186 4800 movel %d6,%a0@(00000000,%d4:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 462d2: 2f2a 0014 movel %a2@(20),%sp@- 462d6: 2f01 movel %d1,%sp@- 462d8: 2f06 movel %d6,%sp@- 462da: 2f00 movel %d0,%sp@- 462dc: 4eb9 0004 98d4 jsr 498d4 <_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 ) { 462e2: 4fef 0010 lea %sp@(16),%sp 462e6: 6028 bras 46310 <_Objects_Extend_information+0x218> <== ALWAYS TAKEN the_object->id = _Objects_Build_id( 462e8: 2212 movel %a2@,%d1 462ea: 7c18 moveq #24,%d6 462ec: 7e1b moveq #27,%d7 462ee: 2040 moveal %d0,%a0 462f0: eda9 lsll %d6,%d1 462f2: 4286 clrl %d6 462f4: 3c2a 0004 movew %a2@(4),%d6 462f8: 08c1 0010 bset #16,%d1 462fc: efae lsll %d7,%d6 462fe: 8286 orl %d6,%d1 46300: 8282 orl %d2,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 46302: 5282 addql #1,%d2 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 46304: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 46308: 2f00 movel %d0,%sp@- 4630a: 2f03 movel %d3,%sp@- 4630c: 4e93 jsr %a3@ index++; 4630e: 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 ) { 46310: 2f05 movel %d5,%sp@- 46312: 4e94 jsr %a4@ 46314: 588f addql #4,%sp 46316: 4a80 tstl %d0 46318: 66ce bnes 462e8 <_Objects_Extend_information+0x1f0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4631a: 4280 clrl %d0 information->inactive = 4631c: 322a 0028 movew %a2@(40),%d1 46320: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46324: 206a 002a moveal %a2@(42),%a0 information->inactive = 46328: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4632a: 3009 movew %a1,%d0 information->inactive = 4632c: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46330: 2180 4800 movel %d0,%a0@(00000000,%d4:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 46334: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4633a: 4e5e unlk %fp 4633c: 4e75 rts ... 00046498 <_Objects_Get>: * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 46498: 7001 moveq #1,%d0 /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 4649a: 4281 clrl %d1 Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 4649c: 4e56 0000 linkw %fp,#0 464a0: 206e 0008 moveal %fp@(8),%a0 * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 464a4: 90a8 0006 subl %a0@(6),%d0 464a8: d0ae 000c addl %fp@(12),%d0 Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 464ac: 2f0a movel %a2,%sp@- 464ae: 246e 0010 moveal %fp@(16),%a2 /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 464b2: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 464b6: 2f02 movel %d2,%sp@- /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 464b8: b280 cmpl %d0,%d1 464ba: 6528 bcss 464e4 <_Objects_Get+0x4c> 464bc: 2239 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d1 464c2: 5281 addql #1,%d1 464c4: 23c1 0005 ba34 movel %d1,5ba34 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 464ca: 2068 0018 moveal %a0@(24),%a0 464ce: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2 464d2: 6704 beqs 464d8 <_Objects_Get+0x40> *location = OBJECTS_LOCAL; 464d4: 4292 clrl %a2@ return the_object; 464d6: 6012 bras 464ea <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 464d8: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 464de: 7201 moveq #1,%d1 464e0: 2481 movel %d1,%a2@ return NULL; 464e2: 6006 bras 464ea <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 464e4: 7001 moveq #1,%d0 464e6: 4282 clrl %d2 464e8: 2480 movel %d0,%a2@ _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 464ea: 2002 movel %d2,%d0 464ec: 242e fff8 movel %fp@(-8),%d2 464f0: 246e fffc moveal %fp@(-4),%a2 464f4: 4e5e unlk %fp 464f6: 4e75 rts 000463f0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 463f0: 4e56 0000 linkw %fp,#0 463f4: 2f03 movel %d3,%sp@- 463f6: 262e 0008 movel %fp@(8),%d3 463fa: 2f02 movel %d2,%sp@- 463fc: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 46400: 672e beqs 46430 <_Objects_Get_information+0x40> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 46402: 2f03 movel %d3,%sp@- 46404: 4eb9 0004 9da4 jsr 49da4 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 4640a: 588f addql #4,%sp 4640c: 4a80 tstl %d0 4640e: 6720 beqs 46430 <_Objects_Get_information+0x40> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 46410: b082 cmpl %d2,%d0 46412: 651c bcss 46430 <_Objects_Get_information+0x40> return NULL; if ( !_Objects_Information_table[ the_api ] ) 46414: 41f9 0005 b9ec lea 5b9ec <_Objects_Information_table>,%a0 4641a: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 4641e: 4a88 tstl %a0 46420: 670e beqs 46430 <_Objects_Get_information+0x40> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 46422: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 46426: 670a beqs 46432 <_Objects_Get_information+0x42> <== 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 ) 46428: 2040 moveal %d0,%a0 4642a: 4a68 000e tstw %a0@(14) 4642e: 6602 bnes 46432 <_Objects_Get_information+0x42> 46430: 4280 clrl %d0 return NULL; #endif return info; } 46432: 242e fff8 movel %fp@(-8),%d2 46436: 262e fffc movel %fp@(-4),%d3 4643a: 4e5e unlk %fp 4643c: 4e75 rts ... 00046440 <_Objects_Get_isr_disable>: { Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 46440: 7001 moveq #1,%d0 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 46442: 4e56 0000 linkw %fp,#0 46446: 226e 0008 moveal %fp@(8),%a1 Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 4644a: 90a9 0006 subl %a1@(6),%d0 4644e: d0ae 000c addl %fp@(12),%d0 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 46452: 2f02 movel %d2,%sp@- 46454: 206e 0010 moveal %fp@(16),%a0 uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; _ISR_Disable( level ); 46458: 243c 0000 0700 movel #1792,%d2 4645e: 40c1 movew %sr,%d1 46460: 8481 orl %d1,%d2 46462: 46c2 movew %d2,%sr if ( information->maximum >= index ) { 46464: 4282 clrl %d2 46466: 3429 000e movew %a1@(14),%d2 4646a: b082 cmpl %d2,%d0 4646c: 621c bhis 4648a <_Objects_Get_isr_disable+0x4a> if ( (the_object = information->local_table[ index ]) != NULL ) { 4646e: 2269 0018 moveal %a1@(24),%a1 46472: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0 46476: 670a beqs 46482 <_Objects_Get_isr_disable+0x42> *location = OBJECTS_LOCAL; *level_p = level; 46478: 226e 0014 moveal %fp@(20),%a1 index = id - information->minimum_id + 1; _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; 4647c: 4290 clrl %a0@ *level_p = level; 4647e: 2281 movel %d1,%a1@ return the_object; 46480: 6010 bras 46492 <_Objects_Get_isr_disable+0x52> <== ALWAYS TAKEN } _ISR_Enable( level ); 46482: 46c1 movew %d1,%sr *location = OBJECTS_ERROR; 46484: 7201 moveq #1,%d1 46486: 2081 movel %d1,%a0@ return NULL; 46488: 6008 bras 46492 <_Objects_Get_isr_disable+0x52> <== ALWAYS TAKEN } _ISR_Enable( level ); 4648a: 46c1 movew %d1,%sr *location = OBJECTS_ERROR; 4648c: 7001 moveq #1,%d0 4648e: 2080 movel %d0,%a0@ 46490: 4280 clrl %d0 _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 46492: 241f movel %sp@+,%d2 46494: 4e5e unlk %fp 46496: 4e75 rts 0004ff6c <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 4ff6c: 4e56 ffdc linkw %fp,#-36 4ff70: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4ff74: 262e 0008 movel %fp@(8),%d3 4ff78: 282e 000c movel %fp@(12),%d4 4ff7c: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 4ff80: 4a84 tstl %d4 4ff82: 6700 00a8 beqw 5002c <_Objects_Get_name_as_string+0xc0> return NULL; if ( name == NULL ) 4ff86: 4a82 tstl %d2 4ff88: 6700 00a4 beqw 5002e <_Objects_Get_name_as_string+0xc2> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4ff8c: 4a83 tstl %d3 4ff8e: 660a bnes 4ff9a <_Objects_Get_name_as_string+0x2e> 4ff90: 2079 0006 7186 moveal 67186 <_Thread_Executing>,%a0 4ff96: 2628 0008 movel %a0@(8),%d3 information = _Objects_Get_information_id( tmpId ); 4ff9a: 2f03 movel %d3,%sp@- 4ff9c: 4eb9 0004 9d24 jsr 49d24 <_Objects_Get_information_id> if ( !information ) 4ffa2: 588f addql #4,%sp 4ffa4: 4a80 tstl %d0 4ffa6: 6700 0084 beqw 5002c <_Objects_Get_name_as_string+0xc0> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 4ffaa: 486e fffc pea %fp@(-4) 4ffae: 2f03 movel %d3,%sp@- 4ffb0: 2f00 movel %d0,%sp@- 4ffb2: 4eb9 0004 9df8 jsr 49df8 <_Objects_Get> switch ( location ) { 4ffb8: 4fef 000c lea %sp@(12),%sp 4ffbc: 4aae fffc tstl %fp@(-4) 4ffc0: 666a bnes 5002c <_Objects_Get_name_as_string+0xc0> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 4ffc2: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 4ffc4: 7218 moveq #24,%d1 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4ffc6: 5384 subql #1,%d4 4ffc8: 43ee fff7 lea %fp@(-9),%a1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 4ffcc: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 4ffd0: 2c00 movel %d0,%d6 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4ffd2: 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; 4ffd4: 2600 movel %d0,%d3 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 4ffd6: e2ae lsrl %d1,%d6 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4ffd8: e08d lsrl #8,%d5 lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4ffda: 2042 moveal %d2,%a0 4ffdc: 4201 clrb %d1 uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 4ffde: 1d40 fffa moveb %d0,%fp@(-6) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 4ffe2: 4243 clrw %d3 4ffe4: 4843 swap %d3 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4ffe6: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 4ffe8: 1d46 fff7 moveb %d6,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4ffec: 1d45 fff9 moveb %d5,%fp@(-7) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 4fff0: 1d43 fff8 moveb %d3,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4fff4: 1d40 fffb moveb %d0,%fp@(-5) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 4fff8: 6018 bras 50012 <_Objects_Get_name_as_string+0xa6> <== ALWAYS TAKEN *d = (isprint((unsigned char)*s)) ? *s : '*'; 4fffa: 2479 0006 5370 moveal 65370 <__ctype_ptr__>,%a2 50000: 1632 3801 moveb %a2@(00000001,%d3:l),%d3 50004: 49c3 extbl %d3 50006: 0283 0000 0097 andil #151,%d3 5000c: 6602 bnes 50010 <_Objects_Get_name_as_string+0xa4> 5000e: 702a moveq #42,%d0 50010: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 50012: b881 cmpl %d1,%d4 50014: 630c blss 50022 <_Objects_Get_name_as_string+0xb6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 50016: 4283 clrl %d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 50018: 1031 1800 moveb %a1@(00000000,%d1:l),%d0 5001c: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 5001e: 1600 moveb %d0,%d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 50020: 66d8 bnes 4fffa <_Objects_Get_name_as_string+0x8e> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 50022: 4210 clrb %a0@ _Thread_Enable_dispatch(); 50024: 4eb9 0004 a6ca jsr 4a6ca <_Thread_Enable_dispatch> return name; 5002a: 6002 bras 5002e <_Objects_Get_name_as_string+0xc2> <== ALWAYS TAKEN 5002c: 4282 clrl %d2 } return NULL; /* unreachable path */ } 5002e: 2002 movel %d2,%d0 50030: 4cee 047c ffdc moveml %fp@(-36),%d2-%d6/%a2 50036: 4e5e unlk %fp 50038: 4e75 rts ... 00052390 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 52390: 4e56 ffec linkw %fp,#-20 52394: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 52398: 266e 0008 moveal %fp@(8),%a3 5239c: 242e 000c movel %fp@(12),%d2 523a0: 246e 0010 moveal %fp@(16),%a2 523a4: 286e 0014 moveal %fp@(20),%a4 Objects_Control *object; Objects_Id next_id; if ( !information ) 523a8: 4a8b tstl %a3 523aa: 6746 beqs 523f2 <_Objects_Get_next+0x62> return NULL; if ( !location_p ) 523ac: 4a8a tstl %a2 523ae: 6742 beqs 523f2 <_Objects_Get_next+0x62> return NULL; if ( !next_id_p ) 523b0: 4a8c tstl %a4 523b2: 673e beqs 523f2 <_Objects_Get_next+0x62> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 523b4: 4a42 tstw %d2 523b6: 6604 bnes 523bc <_Objects_Get_next+0x2c> next_id = information->minimum_id; 523b8: 242b 0006 movel %a3@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 523bc: 4bf9 0004 9df8 lea 49df8 <_Objects_Get>,%a5 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 523c2: 4281 clrl %d1 523c4: 4280 clrl %d0 523c6: 322b 000e movew %a3@(14),%d1 523ca: 3002 movew %d2,%d0 523cc: b081 cmpl %d1,%d0 523ce: 630c blss 523dc <_Objects_Get_next+0x4c> { *location_p = OBJECTS_ERROR; 523d0: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 523d2: 72ff moveq #-1,%d1 523d4: 4280 clrl %d0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 523d6: 2482 movel %d2,%a2@ *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 523d8: 2881 movel %d1,%a4@ return 0; 523da: 6018 bras 523f4 <_Objects_Get_next+0x64> <== ALWAYS TAKEN *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 523dc: 2f0a movel %a2,%sp@- 523de: 2f02 movel %d2,%sp@- next_id++; 523e0: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 523e2: 2f0b movel %a3,%sp@- 523e4: 4e95 jsr %a5@ next_id++; } while (*location_p != OBJECTS_LOCAL); 523e6: 4fef 000c lea %sp@(12),%sp 523ea: 4a92 tstl %a2@ 523ec: 66d4 bnes 523c2 <_Objects_Get_next+0x32> *next_id_p = next_id; 523ee: 2882 movel %d2,%a4@ return object; 523f0: 6002 bras 523f4 <_Objects_Get_next+0x64> <== ALWAYS TAKEN final: *next_id_p = OBJECTS_ID_FINAL; return 0; 523f2: 4280 clrl %d0 } 523f4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 523fa: 4e5e unlk %fp 523fc: 4e75 rts ... 00052ed8 <_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; 52ed8: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 52eda: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 52edc: 4e56 0000 linkw %fp,#0 52ee0: 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; 52ee4: 90a8 0006 subl %a0@(6),%d0 52ee8: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 52eec: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 52ef0: 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 ) { 52ef4: b081 cmpl %d1,%d0 52ef6: 620e bhis 52f06 <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 52ef8: 2068 0018 moveal %a0@(24),%a0 52efc: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 52f00: 6704 beqs 52f06 <_Objects_Get_no_protection+0x2e> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 52f02: 4291 clrl %a1@ return the_object; 52f04: 6006 bras 52f0c <_Objects_Get_no_protection+0x34> <== ALWAYS TAKEN /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 52f06: 7001 moveq #1,%d0 52f08: 2280 movel %d0,%a1@ 52f0a: 4280 clrl %d0 return NULL; } 52f0c: 4e5e unlk %fp 52f0e: 4e75 rts 00049e58 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 49e58: 4e56 fffc linkw %fp,#-4 49e5c: 222e 0008 movel %fp@(8),%d1 49e60: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49e62: 4a81 tstl %d1 49e64: 660a bnes 49e70 <_Objects_Id_to_name+0x18> 49e66: 2079 0006 7186 moveal 67186 <_Thread_Executing>,%a0 49e6c: 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); 49e70: 7418 moveq #24,%d2 49e72: 2001 movel %d1,%d0 49e74: e4a8 lsrl %d2,%d0 49e76: 143c 0007 moveb #7,%d2 49e7a: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 49e7c: 143c 0003 moveb #3,%d2 49e80: 2040 moveal %d0,%a0 49e82: 5388 subql #1,%a0 49e84: b488 cmpl %a0,%d2 49e86: 6538 bcss 49ec0 <_Objects_Id_to_name+0x68> 49e88: 6040 bras 49eca <_Objects_Id_to_name+0x72> <== ALWAYS TAKEN if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 49e8a: 2001 movel %d1,%d0 49e8c: 741b moveq #27,%d2 49e8e: e4a8 lsrl %d2,%d0 49e90: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 49e94: 672a beqs 49ec0 <_Objects_Id_to_name+0x68> <== 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 ); 49e96: 486e fffc pea %fp@(-4) 49e9a: 2f01 movel %d1,%sp@- 49e9c: 2f00 movel %d0,%sp@- 49e9e: 4eb9 0004 9df8 jsr 49df8 <_Objects_Get> if ( !the_object ) 49ea4: 4fef 000c lea %sp@(12),%sp 49ea8: 4a80 tstl %d0 49eaa: 6714 beqs 49ec0 <_Objects_Id_to_name+0x68> return OBJECTS_INVALID_ID; *name = the_object->name; 49eac: 206e 000c moveal %fp@(12),%a0 49eb0: 2240 moveal %d0,%a1 49eb2: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 49eb6: 4eb9 0004 a6ca jsr 4a6ca <_Thread_Enable_dispatch> 49ebc: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 49ebe: 6002 bras 49ec2 <_Objects_Id_to_name+0x6a> <== ALWAYS TAKEN 49ec0: 7003 moveq #3,%d0 } 49ec2: 242e fff8 movel %fp@(-8),%d2 49ec6: 4e5e unlk %fp 49ec8: 4e75 rts the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 49eca: 41f9 0006 7084 lea 67084 <_Objects_Information_table>,%a0 49ed0: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 49ed4: 4a88 tstl %a0 49ed6: 66b2 bnes 49e8a <_Objects_Id_to_name+0x32> 49ed8: 60e6 bras 49ec0 <_Objects_Id_to_name+0x68> <== ALWAYS TAKEN ... 000464f8 <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 464f8: 41f9 0005 b9ec lea 5b9ec <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 464fe: 4e56 fff0 linkw %fp,#-16 46502: 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; 46506: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4650a: 48d7 003c moveml %d2-%d5,%sp@ 4650e: 222e 0014 movel %fp@(20),%d1 46512: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46514: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46516: 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; 4651a: 4242 clrw %d2 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4651c: 3a2e 001a movew %fp@(26),%d5 46520: 282e 0010 movel %fp@(16),%d4 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46524: d683 addl %d3,%d3 46526: 9783 subxl %d3,%d3 46528: 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; 4652a: 3142 0028 movew %d2,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 4652e: 3142 000e movew %d2,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46532: 242e 0020 movel %fp@(32),%d2 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 46536: 3144 0004 movew %d4,%a0@(4) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 4653a: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 4653e: 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; 46542: 2388 4c00 movel %a0,%a1@(00000000,%d4:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 46546: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 4654a: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 4654c: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 46550: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 46554: 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) { 46558: 4a03 tstb %d3 4655a: 6714 beqs 46570 <_Objects_Initialize_information+0x78> 4655c: 4a81 tstl %d1 4655e: 6610 bnes 46570 <_Objects_Initialize_information+0x78> _Internal_error_Occurred( 46560: 4878 0014 pea 14 46564: 4878 0001 pea 1 46568: 42a7 clrl %sp@- 4656a: 4eb9 0004 5f88 jsr 45f88 <_Internal_error_Occurred> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46570: 7a18 moveq #24,%d5 46572: 4a81 tstl %d1 46574: 56c3 sne %d3 46576: eba8 lsll %d5,%d0 46578: 1a3c 001b moveb #27,%d5 4657c: 49c3 extbl %d3 4657e: 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; 46580: 43f9 0005 b1dc lea 5b1dc ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46586: ebac lsll %d5,%d4 46588: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 4658c: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46590: 8084 orl %d4,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46592: ca82 andl %d2,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 46594: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 46598: 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; 4659a: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 4659e: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 465a2: 4a85 tstl %d5 465a4: 6604 bnes 465aa <_Objects_Initialize_information+0xb2> <== ALWAYS TAKEN 465a6: 2002 movel %d2,%d0 465a8: 6008 bras 465b2 <_Objects_Initialize_information+0xba> <== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 465aa: 2002 movel %d2,%d0 <== NOT EXECUTED 465ac: 5880 addql #4,%d0 <== NOT EXECUTED 465ae: 74fc moveq #-4,%d2 <== NOT EXECUTED 465b0: c082 andl %d2,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 465b2: 43e8 0020 lea %a0@(32),%a1 465b6: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 465ba: 43e8 001c lea %a0@(28),%a1 ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 465be: 3140 0032 movew %d0,%a0@(50) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 465c2: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 465c6: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 465ca: 4a81 tstl %d1 465cc: 6712 beqs 465e0 <_Objects_Initialize_information+0xe8> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 465ce: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 465d2: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 465d8: 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 ); 465da: 4ef9 0004 60f8 jmp 460f8 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 465e0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 465e6: 4e5e unlk %fp 465e8: 4e75 rts ... 000465fc <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 465fc: 4e56 fff4 linkw %fp,#-12 46600: 226e 0008 moveal %fp@(8),%a1 46604: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46608: 242e 000c movel %fp@(12),%d2 4660c: 202e 0010 movel %fp@(16),%d0 46610: 246e 0014 moveal %fp@(20),%a2 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 46614: 4a8a tstl %a2 46616: 6604 bnes 4661c <_Objects_Name_to_id_u32+0x20> 46618: 7002 moveq #2,%d0 4661a: 6048 bras 46664 <_Objects_Name_to_id_u32+0x68> <== ALWAYS TAKEN return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 4661c: 4a82 tstl %d2 4661e: 6742 beqs 46662 <_Objects_Name_to_id_u32+0x66> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 46620: 3229 000e movew %a1@(14),%d1 46624: 673c beqs 46662 <_Objects_Name_to_id_u32+0x66> 46626: 4a80 tstl %d0 46628: 672c beqs 46656 <_Objects_Name_to_id_u32+0x5a> 4662a: 0c80 7fff ffff cmpil #2147483647,%d0 46630: 6724 beqs 46656 <_Objects_Name_to_id_u32+0x5a> 46632: 7601 moveq #1,%d3 46634: b680 cmpl %d0,%d3 46636: 662a bnes 46662 <_Objects_Name_to_id_u32+0x66> 46638: 601c bras 46656 <_Objects_Name_to_id_u32+0x5a> <== ALWAYS TAKEN if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 4663a: 2069 0018 moveal %a1@(24),%a0 4663e: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 46642: 5280 addql #1,%d0 the_object = information->local_table[ index ]; if ( !the_object ) 46644: 4a88 tstl %a0 46646: 6716 beqs 4665e <_Objects_Name_to_id_u32+0x62> continue; if ( name == the_object->name.name_u32 ) { 46648: b4a8 000c cmpl %a0@(12),%d2 4664c: 6610 bnes 4665e <_Objects_Name_to_id_u32+0x62> *id = the_object->id; 4664e: 24a8 0008 movel %a0@(8),%a2@ 46652: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 46654: 600e bras 46664 <_Objects_Name_to_id_u32+0x68> <== ALWAYS TAKEN search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 46656: 7001 moveq #1,%d0 46658: 0281 0000 ffff andil #65535,%d1 4665e: b280 cmpl %d0,%d1 46660: 64d8 bccs 4663a <_Objects_Name_to_id_u32+0x3e> 46662: 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 } 46664: 4cd7 040c moveml %sp@,%d2-%d3/%a2 46668: 4e5e unlk %fp 4666a: 4e75 rts 0004811c <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4811c: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 4811e: 4e56 fff0 linkw %fp,#-16 48122: 206e 0008 moveal %fp@(8),%a0 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48126: 3028 0032 movew %a0@(50),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 4812a: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4812e: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48132: 2f00 movel %d0,%sp@- 48134: 2f0a movel %a2,%sp@- 48136: 4eb9 0004 e8ac jsr 4e8ac d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 4813c: 508f addql #8,%sp 4813e: 7201 moveq #1,%d1 48140: 1812 moveb %a2@,%d4 48142: b280 cmpl %d0,%d1 48144: 644a bccs 48190 <_Objects_Set_name+0x74> 48146: 7602 moveq #2,%d3 48148: 142a 0001 moveb %a2@(1),%d2 4814c: 49c2 extbl %d2 4814e: 4842 swap %d2 48150: 4242 clrw %d2 48152: b680 cmpl %d0,%d3 48154: 643e bccs 48194 <_Objects_Set_name+0x78> 48156: 163c 0003 moveb #3,%d3 4815a: 122a 0002 moveb %a2@(2),%d1 4815e: 49c1 extbl %d1 48160: e189 lsll #8,%d1 48162: b680 cmpl %d0,%d3 48164: 6506 bcss 4816c <_Objects_Set_name+0x50> 48166: 163c 0020 moveb #32,%d3 4816a: 6006 bras 48172 <_Objects_Set_name+0x56> <== ALWAYS TAKEN 4816c: 162a 0003 moveb %a2@(3),%d3 48170: 49c3 extbl %d3 48172: 7018 moveq #24,%d0 48174: e1ac lsll %d0,%d4 48176: 206e 000c moveal %fp@(12),%a0 4817a: 8484 orl %d4,%d2 ); } return true; } 4817c: 7001 moveq #1,%d0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 4817e: 8481 orl %d1,%d2 48180: 8483 orl %d3,%d2 48182: 2142 000c movel %d2,%a0@(12) ); } return true; } 48186: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4818c: 4e5e unlk %fp 4818e: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48190: 7420 moveq #32,%d2 48192: 4842 swap %d2 48194: 223c 0000 2000 movel #8192,%d1 4819a: 7620 moveq #32,%d3 4819c: 60d4 bras 48172 <_Objects_Set_name+0x56> <== ALWAYS TAKEN ... 0004666c <_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) / 4666c: 4280 clrl %d0 4666e: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 46670: 4e56 ffec linkw %fp,#-20 46674: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 46678: 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 ); 4667c: 4283 clrl %d3 block_count = (information->maximum - index_base) / 4667e: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 46680: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 46684: 302a 000e movew %a2@(14),%d0 46688: 322a 0012 movew %a2@(18),%d1 4668c: 9083 subl %d3,%d0 4668e: 4c41 0000 remul %d1,%d0,%d0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 46692: 6070 bras 46704 <_Objects_Shrink_information+0x98> <== ALWAYS TAKEN 46694: 2404 movel %d4,%d2 46696: 5284 addql #1,%d4 46698: e58a lsll #2,%d2 if ( information->inactive_per_block[ block ] == 4669a: 206a 002a moveal %a2@(42),%a0 4669e: b2b0 2800 cmpl %a0@(00000000,%d2:l),%d1 466a2: 665e bnes 46702 <_Objects_Shrink_information+0x96> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 466a4: 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 ); 466a8: 47f9 0004 9878 lea 49878 <_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 ); 466ae: 4280 clrl %d0 466b0: 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; 466b4: 2810 movel %a0@,%d4 if ((index >= index_base) && 466b6: b680 cmpl %d0,%d3 466b8: 6212 bhis 466cc <_Objects_Shrink_information+0x60> (index < (index_base + information->allocation_size))) { 466ba: 4281 clrl %d1 466bc: 322a 0012 movew %a2@(18),%d1 466c0: d283 addl %d3,%d1 466c2: b280 cmpl %d0,%d1 466c4: 6306 blss 466cc <_Objects_Shrink_information+0x60> _Chain_Extract( &extract_me->Node ); 466c6: 2f08 movel %a0,%sp@- 466c8: 4e93 jsr %a3@ 466ca: 588f addql #4,%sp } } while ( the_object ); 466cc: 2044 moveal %d4,%a0 466ce: 4a84 tstl %d4 466d0: 66dc bnes 466ae <_Objects_Shrink_information+0x42> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 466d2: 206a 002e moveal %a2@(46),%a0 466d6: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 466da: 4eb9 0004 7ddc jsr 47ddc <_Workspace_Free> information->object_blocks[ block ] = NULL; 466e0: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 466e4: 588f addql #4,%sp * 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; 466e6: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 466ea: 302a 0028 movew %a2@(40),%d0 466ee: 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; 466f2: 42b1 2800 clrl %a1@(00000000,%d2:l) information->inactive -= information->allocation_size; 466f6: 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; 466f8: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 466fc: 3540 0028 movew %d0,%a2@(40) return; 46700: 6006 bras 46708 <_Objects_Shrink_information+0x9c> <== ALWAYS TAKEN } index_base += information->allocation_size; 46702: d681 addl %d1,%d3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 46704: b084 cmpl %d4,%d0 46706: 628c bhis 46694 <_Objects_Shrink_information+0x28> return; } index_base += information->allocation_size; } } 46708: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4670e: 4e5e unlk %fp 46710: 4e75 rts ... 00063664 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 63664: 4e56 0000 linkw %fp,#0 63668: 2f03 movel %d3,%sp@- 6366a: 262e 000c movel %fp@(12),%d3 6366e: 2f02 movel %d2,%sp@- 63670: 242e 0008 movel %fp@(8),%d2 if ( !the_heap ) 63674: 672e beqs 636a4 <_Protected_heap_Get_information+0x40> return false; if ( !the_info ) 63676: 4a83 tstl %d3 63678: 672a beqs 636a4 <_Protected_heap_Get_information+0x40> return false; _RTEMS_Lock_allocator(); 6367a: 2f39 0009 a87a movel 9a87a <_RTEMS_Allocator_Mutex>,%sp@- 63680: 4eb9 0004 ab70 jsr 4ab70 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 63686: 2f03 movel %d3,%sp@- 63688: 2f02 movel %d2,%sp@- 6368a: 4eb9 0007 0e94 jsr 70e94 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 63690: 2f39 0009 a87a movel 9a87a <_RTEMS_Allocator_Mutex>,%sp@- 63696: 4eb9 0004 abd0 jsr 4abd0 <_API_Mutex_Unlock> return true; 6369c: 4fef 0010 lea %sp@(16),%sp if ( !the_info ) return false; _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); 636a0: 7001 moveq #1,%d0 return true; 636a2: 6002 bras 636a6 <_Protected_heap_Get_information+0x42> <== ALWAYS TAKEN 636a4: 4200 clrb %d0 } 636a6: 242e fff8 movel %fp@(-8),%d2 636aa: 262e fffc movel %fp@(-4),%d3 636ae: 4e5e unlk %fp 636b0: 4e75 rts ... 00049790 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 49790: 4e56 0000 linkw %fp,#0 void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { 49794: 2039 0005 baee movel 5baee <_Thread_Executing>,%d0 void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 4979a: 2f0a movel %a2,%sp@- 4979c: 246e 000c moveal %fp@(12),%a2 void (*dtor)(void *); void *value; dtor = tvp->dtor; 497a0: 206a 0010 moveal %a2@(16),%a0 if (_Thread_Is_executing(the_thread)) { 497a4: b0ae 0008 cmpl %fp@(8),%d0 497a8: 660c bnes 497b6 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x26> value = *tvp->ptr; 497aa: 226a 0004 moveal %a2@(4),%a1 497ae: 2011 movel %a1@,%d0 *tvp->ptr = tvp->gval; 497b0: 22aa 0008 movel %a2@(8),%a1@ 497b4: 6004 bras 497ba <_RTEMS_Tasks_Invoke_task_variable_dtor+0x2a> <== ALWAYS TAKEN } else { value = tvp->tval; 497b6: 202a 000c movel %a2@(12),%d0 } if ( dtor ) 497ba: 4a88 tstl %a0 497bc: 6706 beqs 497c4 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x34> (*dtor)(value); 497be: 2f00 movel %d0,%sp@- 497c0: 4e90 jsr %a0@ 497c2: 588f addql #4,%sp _Workspace_Free(tvp); 497c4: 2d4a 0008 movel %a2,%fp@(8) } 497c8: 246e fffc moveal %fp@(-4),%a2 497cc: 4e5e unlk %fp } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 497ce: 4ef9 0004 7ddc jmp 47ddc <_Workspace_Free> 0004971a <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4971a: 4e56 0000 linkw %fp,#0 4971e: 2f0a movel %a2,%sp@- 49720: 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() ) 49724: 4a39 0005 a2d4 tstb 5a2d4 4972a: 6604 bnes 49730 <_RTEMS_tasks_Create_extension+0x16> 4972c: 701e moveq #30,%d0 4972e: 6002 bras 49732 <_RTEMS_tasks_Create_extension+0x18> <== ALWAYS TAKEN 49730: 705e moveq #94,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 49732: 2f00 movel %d0,%sp@- 49734: 4eb9 0004 7dc0 jsr 47dc0 <_Workspace_Allocate> if ( !api ) 4973a: 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 ); 4973c: 2040 moveal %d0,%a0 if ( !api ) 4973e: 4a80 tstl %d0 49740: 6604 bnes 49746 <_RTEMS_tasks_Create_extension+0x2c> 49742: 4200 clrb %d0 49744: 6042 bras 49788 <_RTEMS_tasks_Create_extension+0x6e> <== 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; 49746: 42aa 0118 clrl %a2@(280) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4974a: 4200 clrb %d0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4974c: 2548 0108 movel %a0,%a2@(264) 49750: 1140 0008 moveb %d0,%a0@(8) api->pending_events = EVENT_SETS_NONE_PENDING; 49754: 4290 clrl %a0@ api->event_condition = 0; 49756: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4975a: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4975e: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 49762: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 49766: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4976a: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 4976e: 4a39 0005 a2d4 tstb 5a2d4 49774: 6710 beqs 49786 <_RTEMS_tasks_Create_extension+0x6c> 49776: 41e8 001e lea %a0@(30),%a0 4977a: 4280 clrl %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4977c: 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++) 4977e: 5280 addql #1,%d0 49780: 7210 moveq #16,%d1 49782: b280 cmpl %d0,%d1 49784: 66f6 bnes 4977c <_RTEMS_tasks_Create_extension+0x62> 49786: 7001 moveq #1,%d0 api->Notepads[i] = 0; } return true; } 49788: 246e fffc moveal %fp@(-4),%a2 4978c: 4e5e unlk %fp 4978e: 4e75 rts 000496d4 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 496d4: 4e56 fff4 linkw %fp,#-12 496d8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 496dc: 246e 000c moveal %fp@(12),%a2 tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 496e0: 47f9 0004 9790 lea 49790 <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3 /* * Free per task variable memory */ tvp = deleted->task_variables; 496e6: 206a 0118 moveal %a2@(280),%a0 deleted->task_variables = NULL; 496ea: 42aa 0118 clrl %a2@(280) while (tvp) { 496ee: 600c bras 496fc <_RTEMS_tasks_Delete_extension+0x28> <== ALWAYS TAKEN next = (rtems_task_variable_t *)tvp->next; 496f0: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 496f2: 2f08 movel %a0,%sp@- 496f4: 2f0a movel %a2,%sp@- 496f6: 4e93 jsr %a3@ 496f8: 508f addql #8,%sp 496fa: 2042 moveal %d2,%a0 * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 496fc: 4a88 tstl %a0 496fe: 66f0 bnes 496f0 <_RTEMS_tasks_Delete_extension+0x1c> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 49700: 2f2a 0108 movel %a2@(264),%sp@- 49704: 4eb9 0004 7ddc jsr 47ddc <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4970a: 588f addql #4,%sp 4970c: 42aa 0108 clrl %a2@(264) } 49710: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 49716: 4e5e unlk %fp 49718: 4e75 rts 000452dc <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 452dc: 4e56 ffe4 linkw %fp,#-28 452e0: 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; 452e4: 2479 0005 a2fa moveal 5a2fa ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 452ea: 2839 0005 a2f6 movel 5a2f6 ,%d4 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 452f0: 4a8a tstl %a2 452f2: 6762 beqs 45356 <_RTEMS_tasks_Initialize_user_tasks_body+0x7a> /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 452f4: 260e movel %fp,%d3 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 452f6: 4282 clrl %d2 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 452f8: 5983 subql #4,%d3 452fa: 49f9 0004 50e4 lea 450e4 ,%a4 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 45300: 47f9 0004 5360 lea 45360 ,%a3 45306: 604a bras 45352 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> <== ALWAYS TAKEN /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 45308: 2f03 movel %d3,%sp@- 4530a: 2f2a 000c movel %a2@(12),%sp@- 4530e: 2f2a 0014 movel %a2@(20),%sp@- 45312: 2f2a 0004 movel %a2@(4),%sp@- 45316: 2f2a 0008 movel %a2@(8),%sp@- 4531a: 2f12 movel %a2@,%sp@- 4531c: 4e94 jsr %a4@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4531e: 4fef 0018 lea %sp@(24),%sp 45322: 4a80 tstl %d0 45324: 661a bnes 45340 <_RTEMS_tasks_Initialize_user_tasks_body+0x64> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 45326: 2f2a 0018 movel %a2@(24),%sp@- 4532a: 2f2a 0010 movel %a2@(16),%sp@- 4532e: 45ea 001c lea %a2@(28),%a2 45332: 2f2e fffc movel %fp@(-4),%sp@- 45336: 4e93 jsr %a3@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 45338: 4fef 000c lea %sp@(12),%sp 4533c: 4a80 tstl %d0 4533e: 6710 beqs 45350 <_RTEMS_tasks_Initialize_user_tasks_body+0x74> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 45340: 2f00 movel %d0,%sp@- 45342: 4878 0001 pea 1 45346: 4878 0001 pea 1 4534a: 4eb9 0004 5f88 jsr 45f88 <_Internal_error_Occurred> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 45350: 5282 addql #1,%d2 45352: b882 cmpl %d2,%d4 45354: 62b2 bhis 45308 <_RTEMS_tasks_Initialize_user_tasks_body+0x2c> user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 45356: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4535c: 4e5e unlk %fp 4535e: 4e75 rts 00049662 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 49662: 4e56 ffec linkw %fp,#-20 49666: 206e 0008 moveal %fp@(8),%a0 4966a: 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 ]; 4966e: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 49672: 4a8a tstl %a2 49674: 6754 beqs 496ca <_RTEMS_tasks_Post_switch_extension+0x68> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 49676: 203c 0000 0700 movel #1792,%d0 4967c: 40c1 movew %sr,%d1 4967e: 8081 orl %d1,%d0 49680: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 49682: 262a 0012 movel %a2@(18),%d3 asr->signals_posted = 0; 49686: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4968a: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4968c: 4a83 tstl %d3 4968e: 673a beqs 496ca <_RTEMS_tasks_Post_switch_extension+0x68> <== ALWAYS TAKEN return; asr->nest_level += 1; 49690: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 49694: 240e movel %fp,%d2 49696: 5982 subql #4,%d2 49698: 47f9 0004 b0a4 lea 4b0a4 ,%a3 4969e: 2f02 movel %d2,%sp@- 496a0: 2f3c 0000 ffff movel #65535,%sp@- 496a6: 2f2a 000e movel %a2@(14),%sp@- 496aa: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 496ac: 2f03 movel %d3,%sp@- 496ae: 206a 000a moveal %a2@(10),%a0 496b2: 4e90 jsr %a0@ asr->nest_level -= 1; 496b4: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 496b8: 2f02 movel %d2,%sp@- 496ba: 2f3c 0000 ffff movel #65535,%sp@- 496c0: 2f2e fffc movel %fp@(-4),%sp@- 496c4: 4e93 jsr %a3@ 496c6: 4fef 001c lea %sp@(28),%sp } 496ca: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 496d0: 4e5e unlk %fp 496d2: 4e75 rts 000495c2 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 495c2: 4e56 0000 linkw %fp,#0 495c6: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 495ca: 2068 0118 moveal %a0@(280),%a0 while (tvp) { 495ce: 600e bras 495de <_RTEMS_tasks_Switch_extension+0x1c> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; 495d0: 2268 0004 moveal %a0@(4),%a1 495d4: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 495d8: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 495dc: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 495de: 4a88 tstl %a0 495e0: 66ee bnes 495d0 <_RTEMS_tasks_Switch_extension+0xe> tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 495e2: 206e 000c moveal %fp@(12),%a0 495e6: 2068 0118 moveal %a0@(280),%a0 while (tvp) { 495ea: 600e bras 495fa <_RTEMS_tasks_Switch_extension+0x38> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; 495ec: 2268 0004 moveal %a0@(4),%a1 495f0: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 495f4: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 495f8: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 495fa: 4a88 tstl %a0 495fc: 66ee bnes 495ec <_RTEMS_tasks_Switch_extension+0x2a> tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 495fe: 4e5e unlk %fp 49600: 4e75 rts 000706cc <_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 ) { 706cc: 4e56 ffcc linkw %fp,#-52 706d0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 706d4: 280e movel %fp,%d4 706d6: 5184 subql #8,%d4 _Timestamp_Subtract( 706d8: 45f9 0004 cf00 lea 4cf00 <_Timespec_Subtract>,%a2 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 ) { 706de: 266e 0008 moveal %fp@(8),%a3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 706e2: 2f04 movel %d4,%sp@- ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 706e4: 286b 0040 moveal %a3@(64),%a4 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 706e8: 4eb9 0006 3084 jsr 63084 <_TOD_Get_uptime> _Timestamp_Subtract( 706ee: 2f2e 000c movel %fp@(12),%sp@- 706f2: 2f04 movel %d4,%sp@- 706f4: 486b 004c pea %a3@(76) 706f8: 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) { 706fa: 4fef 0010 lea %sp@(16),%sp #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 706fe: 202c 0082 movel %a4@(130),%d0 70702: 222c 0086 movel %a4@(134),%d1 70706: 2d40 fff0 movel %d0,%fp@(-16) 7070a: 2d41 fff4 movel %d1,%fp@(-12) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 7070e: b9f9 0009 a882 cmpal 9a882 <_Thread_Executing>,%a4 70714: 6652 bnes 70768 <_Rate_monotonic_Get_status+0x9c> Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 70716: 2a0e movel %fp,%d5 70718: 0685 ffff ffe8 addil #-24,%d5 &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 7071e: 240e movel %fp,%d2 70720: 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)) 70726: 260b movel %a3,%d3 70728: 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( 7072e: 2f05 movel %d5,%sp@- 70730: 2f04 movel %d4,%sp@- 70732: 4879 0009 a88a pea 9a88a <_Thread_Time_of_last_context_switch> 70738: 4e92 jsr %a2@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 7073a: 2f05 movel %d5,%sp@- 7073c: 2f02 movel %d2,%sp@- 7073e: 4eb9 0004 cec0 jsr 4cec0 <_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)) 70744: 2f03 movel %d3,%sp@- 70746: 2f02 movel %d2,%sp@- 70748: 4eb9 0007 1044 jsr 71044 <_Timespec_Less_than> 7074e: 4fef 001c lea %sp@(28),%sp 70752: 4a00 tstb %d0 70754: 6704 beqs 7075a <_Rate_monotonic_Get_status+0x8e> 70756: 4200 clrb %d0 70758: 6010 bras 7076a <_Rate_monotonic_Get_status+0x9e> <== ALWAYS TAKEN return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 7075a: 2f2e 0010 movel %fp@(16),%sp@- 7075e: 2f02 movel %d2,%sp@- 70760: 2f03 movel %d3,%sp@- 70762: 4e92 jsr %a2@ 70764: 4fef 000c lea %sp@(12),%sp 70768: 7001 moveq #1,%d0 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 7076a: 4cee 1c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a4 70770: 4e5e unlk %fp 70772: 4e75 rts 000709dc <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 709dc: 4e56 fffc linkw %fp,#-4 709e0: 2f0a movel %a2,%sp@- 709e2: 486e fffc pea %fp@(-4) 709e6: 2f2e 0008 movel %fp@(8),%sp@- 709ea: 4879 0009 abf2 pea 9abf2 <_Rate_monotonic_Information> 709f0: 4eb9 0004 ba10 jsr 4ba10 <_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 ) { 709f6: 4fef 000c lea %sp@(12),%sp 709fa: 2440 moveal %d0,%a2 709fc: 4aae fffc tstl %fp@(-4) 70a00: 6600 0096 bnew 70a98 <_Rate_monotonic_Timeout+0xbc> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 70a04: 206a 0040 moveal %a2@(64),%a0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 70a08: 2028 0010 movel %a0@(16),%d0 70a0c: 0280 0000 4000 andil #16384,%d0 70a12: 673c beqs 70a50 <_Rate_monotonic_Timeout+0x74> the_thread->Wait.id == the_period->Object.id ) { 70a14: 202a 0008 movel %a2@(8),%d0 70a18: b0a8 0020 cmpl %a0@(32),%d0 70a1c: 6632 bnes 70a50 <_Rate_monotonic_Timeout+0x74> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 70a1e: 2f3c 1003 fff8 movel #268697592,%sp@- 70a24: 2f08 movel %a0,%sp@- 70a26: 4eb9 0004 beec jsr 4beec <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 70a2c: 2f0a movel %a2,%sp@- 70a2e: 4eb9 0007 0654 jsr 70654 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 70a34: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 70a3a: 486a 0010 pea %a2@(16) 70a3e: 4879 0009 a8a0 pea 9a8a0 <_Watchdog_Ticks_chain> 70a44: 4eb9 0004 d1b0 jsr 4d1b0 <_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 ) && 70a4a: 4fef 0014 lea %sp@(20),%sp 70a4e: 603a bras 70a8a <_Rate_monotonic_Timeout+0xae> <== ALWAYS TAKEN _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 ) { 70a50: 7001 moveq #1,%d0 70a52: b0aa 0038 cmpl %a2@(56),%d0 70a56: 662c bnes 70a84 <_Rate_monotonic_Timeout+0xa8> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 70a58: 103c 0003 moveb #3,%d0 70a5c: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 70a60: 2f0a movel %a2,%sp@- 70a62: 4eb9 0007 0654 jsr 70654 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 70a68: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 70a6e: 486a 0010 pea %a2@(16) 70a72: 4879 0009 a8a0 pea 9a8a0 <_Watchdog_Ticks_chain> 70a78: 4eb9 0004 d1b0 jsr 4d1b0 <_Watchdog_Insert> 70a7e: 4fef 000c lea %sp@(12),%sp 70a82: 6006 bras 70a8a <_Rate_monotonic_Timeout+0xae> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 70a84: 7004 moveq #4,%d0 70a86: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 70a8a: 2039 0009 a7c8 movel 9a7c8 <_Thread_Dispatch_disable_level>,%d0 70a90: 5380 subql #1,%d0 70a92: 23c0 0009 a7c8 movel %d0,9a7c8 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 70a98: 246e fff8 moveal %fp@(-8),%a2 70a9c: 4e5e unlk %fp 70a9e: 4e75 rts 00056368 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 56368: 4e56 ffe4 linkw %fp,#-28 5636c: 2039 0007 38e0 movel 738e0 <_Thread_Dispatch_disable_level>,%d0 56372: 5280 addql #1,%d0 56374: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 56378: 266e 0008 moveal %fp@(8),%a3 5637c: 23c0 0007 38e0 movel %d0,738e0 <_Thread_Dispatch_disable_level> * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 56382: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 56388: 240b movel %a3,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 5638a: 280b movel %a3,%d4 5638c: 0682 0000 0010 addil #16,%d2 56392: 0684 0000 0068 addil #104,%d4 56398: 4bf9 0005 2198 lea 52198 <_Heap_Allocate_aligned_with_boundary>,%a5 if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 5639e: 49f9 0005 69fc lea 569fc <_Thread_queue_Extract>,%a4 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 563a4: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> 563aa: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 563ac: 263c 0005 6b00 movel #355072,%d3 563b2: 2f02 movel %d2,%sp@- 563b4: 2043 moveal %d3,%a0 563b6: 4e90 jsr %a0@ if ( the_thread == NULL ) 563b8: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 563ba: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 563bc: 4a80 tstl %d0 563be: 672c beqs 563ec <_Region_Process_queue+0x84> 563c0: 42a7 clrl %sp@- 563c2: 42a7 clrl %sp@- 563c4: 2f2a 0024 movel %a2@(36),%sp@- 563c8: 2f04 movel %d4,%sp@- 563ca: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 563cc: 4fef 0010 lea %sp@(16),%sp 563d0: 4a80 tstl %d0 563d2: 6718 beqs 563ec <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 563d4: 206a 0028 moveal %a2@(40),%a0 the_region->number_of_used_blocks += 1; 563d8: 52ab 0064 addql #1,%a3@(100) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 563dc: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 563de: 2f0a movel %a2,%sp@- 563e0: 2f02 movel %d2,%sp@- 563e2: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 563e4: 508f addql #8,%sp break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 563e6: 42aa 0034 clrl %a2@(52) } 563ea: 60c6 bras 563b2 <_Region_Process_queue+0x4a> <== ALWAYS TAKEN _Thread_Enable_dispatch(); } 563ec: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 563f2: 4e5e unlk %fp *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 563f4: 4ef9 0005 376a jmp 5376a <_Thread_Enable_dispatch> ... 00049a08 <_TOD_Get>: /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 49a08: 203c 0000 0700 movel #1792,%d0 */ void _TOD_Get( struct timespec *time ) { 49a0e: 4e56 fff0 linkw %fp,#-16 49a12: 2f02 movel %d2,%sp@- /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 49a14: 40c2 movew %sr,%d2 49a16: 8082 orl %d2,%d0 49a18: 46c0 movew %d0,%sr now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 49a1a: 2079 0005 bbba moveal 5bbba <_Watchdog_Nanoseconds_since_tick_handler>,%a0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 49a20: 2039 0005 bac6 movel 5bac6 <_TOD_Now>,%d0 49a26: 2239 0005 baca movel 5baca <_TOD_Now+0x4>,%d1 49a2c: 2d40 fff0 movel %d0,%fp@(-16) 49a30: 2d41 fff4 movel %d1,%fp@(-12) if ( _Watchdog_Nanoseconds_since_tick_handler ) 49a34: 4a88 tstl %a0 49a36: 6604 bnes 49a3c <_TOD_Get+0x34> 49a38: 4280 clrl %d0 49a3a: 6002 bras 49a3e <_TOD_Get+0x36> <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 49a3c: 4e90 jsr %a0@ _ISR_Enable( level ); 49a3e: 46c2 movew %d2,%sr _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); 49a40: 486e fff8 pea %fp@(-8) 49a44: 486e fff0 pea %fp@(-16) now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 49a48: 2d40 fffc movel %d0,%fp@(-4) 49a4c: 42ae fff8 clrl %fp@(-8) _Timestamp_Add_to( &now, &offset ); 49a50: 4eb9 0004 7888 jsr 47888 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 49a56: 206e 0008 moveal %fp@(8),%a0 49a5a: 508f addql #8,%sp 49a5c: 202e fff0 movel %fp@(-16),%d0 49a60: 222e fff4 movel %fp@(-12),%d1 } 49a64: 242e ffec movel %fp@(-20),%d2 49a68: 4e5e unlk %fp nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); 49a6a: 2080 movel %d0,%a0@ 49a6c: 2141 0004 movel %d1,%a0@(4) } 49a70: 4e75 rts ... 00049a74 <_TOD_Get_uptime>: /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 49a74: 203c 0000 0700 movel #1792,%d0 */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 49a7a: 4e56 fff0 linkw %fp,#-16 49a7e: 2f02 movel %d2,%sp@- /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 49a80: 40c2 movew %sr,%d2 49a82: 8082 orl %d2,%d0 49a84: 46c0 movew %d0,%sr up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 49a86: 2079 0005 bbba moveal 5bbba <_Watchdog_Nanoseconds_since_tick_handler>,%a0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 49a8c: 2039 0005 bab2 movel 5bab2 <_TOD_Uptime>,%d0 49a92: 2239 0005 bab6 movel 5bab6 <_TOD_Uptime+0x4>,%d1 49a98: 2d40 fff0 movel %d0,%fp@(-16) 49a9c: 2d41 fff4 movel %d1,%fp@(-12) if ( _Watchdog_Nanoseconds_since_tick_handler ) 49aa0: 4a88 tstl %a0 49aa2: 6604 bnes 49aa8 <_TOD_Get_uptime+0x34> 49aa4: 4280 clrl %d0 49aa6: 6002 bras 49aaa <_TOD_Get_uptime+0x36> <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 49aa8: 4e90 jsr %a0@ _ISR_Enable( level ); 49aaa: 46c2 movew %d2,%sr _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); 49aac: 486e fff8 pea %fp@(-8) 49ab0: 486e fff0 pea %fp@(-16) up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 49ab4: 2d40 fffc movel %d0,%fp@(-4) 49ab8: 42ae fff8 clrl %fp@(-8) _Timestamp_Add_to( &up, &offset ); 49abc: 4eb9 0004 7888 jsr 47888 <_Timespec_Add_to> *uptime = up; 49ac2: 206e 0008 moveal %fp@(8),%a0 49ac6: 508f addql #8,%sp 49ac8: 202e fff0 movel %fp@(-16),%d0 49acc: 222e fff4 movel %fp@(-12),%d1 } 49ad0: 242e ffec movel %fp@(-20),%d2 49ad4: 4e5e unlk %fp nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; 49ad6: 2080 movel %d0,%a0@ 49ad8: 2141 0004 movel %d1,%a0@(4) } 49adc: 4e75 rts ... 00046e50 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 46e50: 4e56 0000 linkw %fp,#0 46e54: 2039 0006 58a4 movel 658a4 <_Thread_Dispatch_disable_level>,%d0 46e5a: 5280 addql #1,%d0 46e5c: 2f0a movel %a2,%sp@- 46e5e: 246e 0008 moveal %fp@(8),%a2 46e62: 23c0 0006 58a4 movel %d0,658a4 <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 46e68: 2039 0006 5936 movel 65936 <_TOD_Now>,%d0 46e6e: 41f9 0004 90a4 lea 490a4 <_Watchdog_Adjust>,%a0 if ( time->tv_sec < seconds ) 46e74: 2212 movel %a2@,%d1 46e76: b081 cmpl %d1,%d0 46e78: 6f0a bles 46e84 <_TOD_Set+0x34> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 46e7a: 9081 subl %d1,%d0 46e7c: 2f00 movel %d0,%sp@- 46e7e: 4878 0001 pea 1 46e82: 6006 bras 46e8a <_TOD_Set+0x3a> <== ALWAYS TAKEN 46e84: 9280 subl %d0,%d1 46e86: 2f01 movel %d1,%sp@- 46e88: 42a7 clrl %sp@- 46e8a: 4879 0006 5970 pea 65970 <_Watchdog_Seconds_chain> 46e90: 4e90 jsr %a0@ _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 46e92: 23d2 0006 5936 movel %a2@,65936 <_TOD_Now> 46e98: 588a addql #4,%a2 46e9a: 4fef 000c lea %sp@(12),%sp 46e9e: 23d2 0006 593a movel %a2@,6593a <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 46ea4: 246e fffc moveal %fp@(-4),%a2 46ea8: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 46eaa: 7001 moveq #1,%d0 46eac: 13c0 0006 58b8 moveb %d0,658b8 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 46eb2: 4ef9 0004 7fa6 jmp 47fa6 <_Thread_Enable_dispatch> 00045c3c <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 45c3c: 4e56 ffe8 linkw %fp,#-24 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 45c40: 2239 0005 a310 movel 5a310 ,%d1 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 45c46: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 45c4a: 240e movel %fp,%d2 45c4c: 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() ); 45c4e: 263c 0000 03e8 movel #1000,%d3 45c54: 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 ); 45c58: 45f9 0004 7888 lea 47888 <_Timespec_Add_to>,%a2 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 45c5e: 47f9 0004 7d10 lea 47d10 <_Watchdog_Tickle>,%a3 /* 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; 45c64: 2039 0005 bb74 movel 5bb74 <_Watchdog_Ticks_since_boot>,%d0 45c6a: 5280 addql #1,%d0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 45c6c: 2f02 movel %d2,%sp@- 45c6e: 4879 0005 bab2 pea 5bab2 <_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() ); 45c74: 2d41 fffc movel %d1,%fp@(-4) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 45c78: 23c0 0005 bb74 movel %d0,5bb74 <_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() ); 45c7e: 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 ); 45c82: 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 ); 45c84: 2f02 movel %d2,%sp@- 45c86: 4879 0005 bac6 pea 5bac6 <_TOD_Now> 45c8c: 4e92 jsr %a2@ while ( seconds ) { 45c8e: 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 ); 45c92: 2400 movel %d0,%d2 while ( seconds ) { 45c94: 600c bras 45ca2 <_TOD_Tickle_ticks+0x66> <== ALWAYS TAKEN 45c96: 4879 0005 bb00 pea 5bb00 <_Watchdog_Seconds_chain> _Watchdog_Tickle_seconds(); seconds--; 45c9c: 5382 subql #1,%d2 45c9e: 4e93 jsr %a3@ 45ca0: 588f addql #4,%sp _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 ) { 45ca2: 4a82 tstl %d2 45ca4: 66f0 bnes 45c96 <_TOD_Tickle_ticks+0x5a> _Watchdog_Tickle_seconds(); seconds--; } } 45ca6: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 45cac: 4e5e unlk %fp 45cae: 4e75 rts 000457c8 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 457c8: 43f9 0005 b312 lea 5b312 <_TOD_Days_to_date>,%a1 457ce: 4e56 fff0 linkw %fp,#-16 457d2: 206e 0008 moveal %fp@(8),%a0 457d6: 48d7 041c moveml %d2-%d4/%a2,%sp@ uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; 457da: 2210 movel %a0@,%d1 457dc: 7603 moveq #3,%d3 ) { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 457de: 2028 0008 movel %a0@(8),%d0 457e2: 5380 subql #1,%d0 year_mod_4 = the_tod->year & 3; 457e4: c681 andl %d1,%d3 if ( year_mod_4 == 0 ) 457e6: 660c bnes 457f4 <_TOD_To_seconds+0x2c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 457e8: 2428 0004 movel %a0@(4),%d2 457ec: 0682 0000 000d addil #13,%d2 457f2: 6004 bras 457f8 <_TOD_To_seconds+0x30> <== ALWAYS TAKEN else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 457f4: 2428 0004 movel %a0@(4),%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 457f8: 45f9 0005 b346 lea 5b346 <_TOD_Days_since_last_leap_year>,%a2 457fe: 283c 0000 05b5 movel #1461,%d4 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45804: 3431 2a00 movew %a1@(00000000,%d2:l:2),%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45808: 3632 3a00 movew %a2@(00000000,%d3:l:2),%d3 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 4580c: 0282 0000 ffff andil #65535,%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45812: 0283 0000 ffff andil #65535,%d3 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45818: 2242 moveal %d2,%a1 4581a: d3c0 addal %d0,%a1 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 4581c: 2001 movel %d1,%d0 4581e: 0680 ffff f83c addil #-1988,%d0 45824: e488 lsrl #2,%d0 45826: 4c04 0800 mulsl %d4,%d0 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 4582a: 2428 000c movel %a0@(12),%d2 4582e: 2202 movel %d2,%d1 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45830: d083 addl %d3,%d0 ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; 45832: 263c 0001 5180 movel #86400,%d3 time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 45838: d089 addl %a1,%d0 time *= TOD_SECONDS_PER_DAY; 4583a: 4c03 0800 mulsl %d3,%d0 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 4583e: e58a lsll #2,%d2 45840: ed89 lsll #6,%d1 45842: 9282 subl %d2,%d1 45844: d2a8 0010 addl %a0@(16),%d1 45848: 2401 movel %d1,%d2 4584a: e589 lsll #2,%d1 4584c: ed8a lsll #6,%d2 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 4584e: 2068 0014 moveal %a0@(20),%a0 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 45852: 9481 subl %d1,%d2 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 45854: d1fc 21da e500 addal #567993600,%a0 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 4585a: d488 addl %a0,%d2 time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 4585c: d082 addl %d2,%d0 4585e: 4cd7 041c moveml %sp@,%d2-%d4/%a2 45862: 4e5e unlk %fp 45864: 4e75 rts ... 00045868 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 45868: 4e56 0000 linkw %fp,#0 4586c: 206e 0008 moveal %fp@(8),%a0 45870: 2f03 movel %d3,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 45872: 2039 0005 c3c0 movel 5c3c0 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 45878: 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) || 4587a: 4a88 tstl %a0 4587c: 6762 beqs 458e0 <_TOD_Validate+0x78> <== ALWAYS TAKEN (the_tod->ticks >= ticks_per_second) || 4587e: 243c 000f 4240 movel #1000000,%d2 45884: 4c40 2002 remul %d0,%d2,%d2 45888: b4a8 0018 cmpl %a0@(24),%d2 4588c: 6352 blss 458e0 <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 4588e: 763b moveq #59,%d3 45890: b6a8 0014 cmpl %a0@(20),%d3 45894: 654a bcss 458e0 <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 45896: b6a8 0010 cmpl %a0@(16),%d3 4589a: 6544 bcss 458e0 <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || 4589c: 7017 moveq #23,%d0 4589e: b0a8 000c cmpl %a0@(12),%d0 458a2: 653c bcss 458e0 <_TOD_Validate+0x78> (the_tod->month == 0) || 458a4: 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) || 458a8: 6736 beqs 458e0 <_TOD_Validate+0x78> <== ALWAYS TAKEN 458aa: 720c moveq #12,%d1 458ac: b280 cmpl %d0,%d1 458ae: 6530 bcss 458e0 <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 458b0: 2410 movel %a0@,%d2 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 458b2: 0c82 0000 07c3 cmpil #1987,%d2 458b8: 6326 blss 458e0 <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 458ba: 2228 0008 movel %a0@(8),%d1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 458be: 6720 beqs 458e0 <_TOD_Validate+0x78> <== 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 ) 458c0: 163c 0003 moveb #3,%d3 458c4: 41f9 0005 b34e lea 5b34e <_TOD_Days_per_month>,%a0 458ca: c483 andl %d3,%d2 458cc: 6606 bnes 458d4 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 458ce: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 458d2: 6004 bras 458d8 <_TOD_Validate+0x70> <== ALWAYS TAKEN else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 458d4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 458d8: b081 cmpl %d1,%d0 458da: 54c0 scc %d0 458dc: 4480 negl %d0 458de: 6002 bras 458e2 <_TOD_Validate+0x7a> <== ALWAYS TAKEN 458e0: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 458e2: 241f movel %sp@+,%d2 458e4: 261f movel %sp@+,%d3 458e6: 4e5e unlk %fp 458e8: 4e75 rts ... 00046774 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 46774: 4e56 fff0 linkw %fp,#-16 46778: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4677c: 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 ); 46780: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 46782: 262e 000c movel %fp@(12),%d3 */ /* * Save original state */ original_state = the_thread->current_state; 46786: 242a 0010 movel %a2@(16),%d2 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4678a: 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 ); 4678e: 4eb9 0004 754c jsr 4754c <_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 ) 46794: 588f addql #4,%sp 46796: b6aa 0014 cmpl %a2@(20),%d3 4679a: 670c beqs 467a8 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 4679c: 2f03 movel %d3,%sp@- 4679e: 2f0a movel %a2,%sp@- 467a0: 4eb9 0004 73f4 jsr 473f4 <_Thread_Set_priority> 467a6: 508f addql #8,%sp _ISR_Disable( level ); 467a8: 223c 0000 0700 movel #1792,%d1 467ae: 40c0 movew %sr,%d0 467b0: 8280 orl %d0,%d1 467b2: 46c1 movew %d1,%sr 467b4: 7604 moveq #4,%d3 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 467b6: 222a 0010 movel %a2@(16),%d1 467ba: c483 andl %d3,%d2 if ( state != STATES_TRANSIENT ) { 467bc: b681 cmpl %d1,%d3 467be: 6730 beqs 467f0 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 467c0: 4a82 tstl %d2 467c2: 6608 bnes 467cc <_Thread_Change_priority+0x58> <== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 467c4: 74fb moveq #-5,%d2 467c6: c481 andl %d1,%d2 467c8: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 467cc: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 467ce: 0281 0003 bee0 andil #245472,%d1 467d4: 6700 00d2 beqw 468a8 <_Thread_Change_priority+0x134> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 467d8: 2d4a 000c movel %a2,%fp@(12) 467dc: 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 ); } 467e2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 467e8: 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 ); 467ea: 4ef9 0004 7358 jmp 47358 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 467f0: 4a82 tstl %d2 467f2: 6650 bnes 46844 <_Thread_Change_priority+0xd0> <== 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; 467f4: 226a 008e moveal %a2@(142),%a1 467f8: 322a 0094 movew %a2@(148),%d1 467fc: 3411 movew %a1@,%d2 467fe: 206a 008a moveal %a2@(138),%a0 46802: 8282 orl %d2,%d1 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 46804: 42aa 0010 clrl %a2@(16) 46808: 3281 movew %d1,%a1@ _Priority_Major_bit_map |= the_priority_map->ready_major; 4680a: 3239 0005 bae4 movew 5bae4 <_Priority_Major_bit_map>,%d1 46810: 342a 0092 movew %a2@(146),%d2 46814: 8282 orl %d2,%d1 46816: 33c1 0005 bae4 movew %d1,5bae4 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 4681c: 4a04 tstb %d4 4681e: 6710 beqs 46830 <_Thread_Change_priority+0xbc> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 46820: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 46822: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 46826: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 46828: 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; 4682c: 2489 movel %a1,%a2@ 4682e: 6014 bras 46844 <_Thread_Change_priority+0xd0> <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 46830: 2608 movel %a0,%d3 46832: 5883 addql #4,%d3 46834: 2483 movel %d3,%a2@ old_last_node = the_chain->last; 46836: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 4683a: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4683e: 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; 46842: 228a movel %a2,%a1@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 46844: 223c 0000 0700 movel #1792,%d1 4684a: 46c0 movew %d0,%sr 4684c: 8280 orl %d0,%d1 4684e: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 46850: 3239 0005 bae4 movew 5bae4 <_Priority_Major_bit_map>,%d1 46856: 4841 swap %d1 46858: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4685a: 4282 clrl %d2 4685c: 41f9 0005 bb50 lea 5bb50 <_Priority_Bit_map>,%a0 46862: 3401 movew %d1,%d2 46864: 3230 2a00 movew %a0@(00000000,%d2:l:2),%d1 46868: 4841 swap %d1 4686a: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4686c: 4283 clrl %d3 4686e: e98a lsll #4,%d2 46870: 3601 movew %d1,%d3 46872: 2279 0005 b9e0 moveal 5b9e0 <_Thread_Ready_chain>,%a1 46878: 2202 movel %d2,%d1 4687a: d283 addl %d3,%d1 4687c: 2401 movel %d1,%d2 4687e: e58a lsll #2,%d2 46880: e989 lsll #4,%d1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 46882: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 46888: 93c2 subal %d2,%a1 4688a: 2231 1800 movel %a1@(00000000,%d1:l),%d1 4688e: 23c1 0005 bac2 movel %d1,5bac2 <_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() && 46894: b288 cmpl %a0,%d1 46896: 670e beqs 468a6 <_Thread_Change_priority+0x132> _Thread_Executing->is_preemptible ) 46898: 4a28 0075 tstb %a0@(117) 4689c: 6708 beqs 468a6 <_Thread_Change_priority+0x132> _Context_Switch_necessary = true; 4689e: 7201 moveq #1,%d1 468a0: 13c1 0005 bafe moveb %d1,5bafe <_Context_Switch_necessary> _ISR_Enable( level ); 468a6: 46c0 movew %d0,%sr } 468a8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 468ae: 4e5e unlk %fp 468b0: 4e75 rts ... 000468b4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 468b4: 4e56 ffec linkw %fp,#-20 468b8: 206e 0008 moveal %fp@(8),%a0 468bc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 468c0: 263c 0000 0700 movel #1792,%d3 468c6: 2203 movel %d3,%d1 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 468c8: 202e 000c movel %fp@(12),%d0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 468cc: 40c2 movew %sr,%d2 468ce: 8282 orl %d2,%d1 468d0: 46c1 movew %d1,%sr current_state = the_thread->current_state; 468d2: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 468d6: 2800 movel %d0,%d4 468d8: c881 andl %d1,%d4 468da: 6778 beqs 46954 <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 468dc: 4680 notl %d0 468de: c081 andl %d1,%d0 current_state = 468e0: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 468e4: 666e bnes 46954 <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 468e6: 2668 008e moveal %a0@(142),%a3 468ea: 3028 0094 movew %a0@(148),%d0 468ee: 3213 movew %a3@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 468f0: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 468f4: 2809 movel %a1,%d4 468f6: 5884 addql #4,%d4 468f8: 8081 orl %d1,%d0 468fa: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 468fc: 2469 0008 moveal %a1@(8),%a2 46900: 3680 movew %d0,%a3@ the_chain->last = the_node; 46902: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 46906: 3039 0005 bae4 movew 5bae4 <_Priority_Major_bit_map>,%d0 4690c: 3228 0092 movew %a0@(146),%d1 old_last_node->next = the_node; the_node->previous = old_last_node; 46910: 214a 0004 movel %a2,%a0@(4) 46914: 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; 46916: 2488 movel %a0,%a2@ 46918: 33c0 0005 bae4 movew %d0,5bae4 <_Priority_Major_bit_map> _ISR_Flash( level ); 4691e: 2003 movel %d3,%d0 46920: 46c2 movew %d2,%sr 46922: 8082 orl %d2,%d0 46924: 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 ) { 46926: 2028 0014 movel %a0@(20),%d0 4692a: 2279 0005 bac2 moveal 5bac2 <_Thread_Heir>,%a1 46930: b0a9 0014 cmpl %a1@(20),%d0 46934: 641e bccs 46954 <_Thread_Clear_state+0xa0> _Thread_Heir = the_thread; 46936: 23c8 0005 bac2 movel %a0,5bac2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4693c: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 46942: 4a28 0075 tstb %a0@(117) 46946: 6604 bnes 4694c <_Thread_Clear_state+0x98> 46948: 4a80 tstl %d0 4694a: 6608 bnes 46954 <_Thread_Clear_state+0xa0> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4694c: 7001 moveq #1,%d0 4694e: 13c0 0005 bafe moveb %d0,5bafe <_Context_Switch_necessary> } } } _ISR_Enable( level ); 46954: 46c2 movew %d2,%sr } 46956: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4695a: 4e5e unlk %fp 4695c: 4e75 rts ... 00046ae0 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 46ae0: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 46ae4: 486e fffc pea %fp@(-4) 46ae8: 2f2e 0008 movel %fp@(8),%sp@- 46aec: 4eb9 0004 6c94 jsr 46c94 <_Thread_Get> switch ( location ) { 46af2: 508f addql #8,%sp 46af4: 4aae fffc tstl %fp@(-4) 46af8: 661e bnes 46b18 <_Thread_Delay_ended+0x38> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 46afa: 2f3c 1000 0018 movel #268435480,%sp@- 46b00: 2f00 movel %d0,%sp@- 46b02: 4eb9 0004 68b4 jsr 468b4 <_Thread_Clear_state> 46b08: 508f addql #8,%sp 46b0a: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 46b10: 5380 subql #1,%d0 46b12: 23c0 0005 ba34 movel %d0,5ba34 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 46b18: 4e5e unlk %fp 46b1a: 4e75 rts 00046b1c <_Thread_Dispatch>: Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 46b1c: 307c 0700 moveaw #1792,%a0 46b20: 2208 movel %a0,%d1 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 46b22: 4e56 ffc8 linkw %fp,#-56 46b26: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 46b2a: 2479 0005 baee moveal 5baee <_Thread_Executing>,%a2 _ISR_Disable( level ); 46b30: 40c0 movew %sr,%d0 46b32: 8280 orl %d0,%d1 46b34: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46b36: 260e movel %fp,%d3 _Timestamp_Subtract( 46b38: 240e movel %fp,%d2 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46b3a: 5183 subql #8,%d3 _Timestamp_Subtract( 46b3c: 0682 ffff fff0 addil #-16,%d2 46b42: 2e3c 0004 78c8 movel #293064,%d7 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 46b48: 2c3c 0004 7888 movel #293000,%d6 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 46b4e: 2a3c 0004 7b40 movel #293696,%d5 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); 46b54: 4bf9 0004 7fa8 lea 47fa8 <_CPU_Context_restore_fp>,%a5 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 46b5a: 49f9 0004 7f86 lea 47f86 <_CPU_Context_save_fp>,%a4 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 46b60: 283c 0004 7e58 movel #294488,%d4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 46b66: 6000 00d0 braw 46c38 <_Thread_Dispatch+0x11c> <== ALWAYS TAKEN heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 46b6a: 7201 moveq #1,%d1 46b6c: 23c1 0005 ba34 movel %d1,5ba34 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 46b72: 2679 0005 bac2 moveal 5bac2 <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 46b78: 4201 clrb %d1 _Thread_Executing = heir; 46b7a: 23cb 0005 baee movel %a3,5baee <_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; 46b80: 13c1 0005 bafe moveb %d1,5bafe <_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 ) 46b86: 7201 moveq #1,%d1 46b88: b2ab 007a cmpl %a3@(122),%d1 46b8c: 660a bnes 46b98 <_Thread_Dispatch+0x7c> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 46b8e: 41f9 0005 b9e4 lea 5b9e4 <_Thread_Ticks_per_timeslice>,%a0 46b94: 2750 0076 movel %a0@,%a3@(118) _ISR_Enable( level ); 46b98: 46c0 movew %d0,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46b9a: 2f03 movel %d3,%sp@- 46b9c: 4eb9 0004 9a74 jsr 49a74 <_TOD_Get_uptime> _Timestamp_Subtract( 46ba2: 2047 moveal %d7,%a0 46ba4: 2f02 movel %d2,%sp@- 46ba6: 2f03 movel %d3,%sp@- 46ba8: 4879 0005 baf6 pea 5baf6 <_Thread_Time_of_last_context_switch> 46bae: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 46bb0: 2046 moveal %d6,%a0 46bb2: 2f02 movel %d2,%sp@- 46bb4: 486a 0082 pea %a2@(130) 46bb8: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 46bba: 2079 0005 babe moveal 5babe <_Thread_libc_reent>,%a0 46bc0: 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; 46bc4: 202e fff8 movel %fp@(-8),%d0 46bc8: 222e fffc movel %fp@(-4),%d1 46bcc: 23c0 0005 baf6 movel %d0,5baf6 <_Thread_Time_of_last_context_switch> 46bd2: 23c1 0005 bafa movel %d1,5bafa <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 46bd8: 4a88 tstl %a0 46bda: 6708 beqs 46be4 <_Thread_Dispatch+0xc8> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 46bdc: 2550 0104 movel %a0@,%a2@(260) *_Thread_libc_reent = heir->libc_reent; 46be0: 20ab 0104 movel %a3@(260),%a0@ } _User_extensions_Thread_switch( executing, heir ); 46be4: 2f0b movel %a3,%sp@- 46be6: 2045 moveal %d5,%a0 46be8: 2f0a movel %a2,%sp@- 46bea: 4e90 jsr %a0@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 46bec: 486b 00cc pea %a3@(204) 46bf0: 2044 moveal %d4,%a0 46bf2: 486a 00cc pea %a2@(204) 46bf6: 4e90 jsr %a0@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 46bf8: 4fef 0010 lea %sp@(16),%sp 46bfc: 4aaa 0100 tstl %a2@(256) 46c00: 6724 beqs 46c26 <_Thread_Dispatch+0x10a> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 46c02: 2079 0005 baba moveal 5baba <_Thread_Allocated_fp>,%a0 46c08: b1ca cmpal %a2,%a0 46c0a: 671a beqs 46c26 <_Thread_Dispatch+0x10a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 46c0c: 4a88 tstl %a0 46c0e: 6708 beqs 46c18 <_Thread_Dispatch+0xfc> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 46c10: 4868 0100 pea %a0@(256) 46c14: 4e94 jsr %a4@ 46c16: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 46c18: 486a 0100 pea %a2@(256) 46c1c: 4e95 jsr %a5@ _Thread_Allocated_fp = executing; 46c1e: 588f addql #4,%sp 46c20: 23ca 0005 baba movel %a2,5baba <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 46c26: 2479 0005 baee moveal 5baee <_Thread_Executing>,%a2 _ISR_Disable( level ); 46c2c: 223c 0000 0700 movel #1792,%d1 46c32: 40c0 movew %sr,%d0 46c34: 8280 orl %d0,%d1 46c36: 46c1 movew %d1,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 46c38: 1239 0005 bafe moveb 5bafe <_Context_Switch_necessary>,%d1 46c3e: 6600 ff2a bnew 46b6a <_Thread_Dispatch+0x4e> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 46c42: 42b9 0005 ba34 clrl 5ba34 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 46c48: 46c0 movew %d0,%sr if ( _Thread_Do_post_task_switch_extension || 46c4a: 4ab9 0005 bad6 tstl 5bad6 <_Thread_Do_post_task_switch_extension> 46c50: 6606 bnes 46c58 <_Thread_Dispatch+0x13c> <== ALWAYS TAKEN executing->do_post_task_switch_extension ) { 46c52: 4a2a 0074 tstb %a2@(116) 46c56: 670c beqs 46c64 <_Thread_Dispatch+0x148> executing->do_post_task_switch_extension = false; 46c58: 4200 clrb %d0 46c5a: 1540 0074 moveb %d0,%a2@(116) _API_extensions_Run_postswitch(); 46c5e: 4eb9 0004 5736 jsr 45736 <_API_extensions_Run_postswitch> } } 46c64: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 46c6a: 4e5e unlk %fp 46c6c: 4e75 rts 0004b484 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4b484: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4b488: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4b48e: 4aa8 0010 tstl %a0@(16) 4b492: 660e bnes 4b4a2 <_Thread_Evaluate_mode+0x1e> <== ALWAYS TAKEN 4b494: b1f9 0005 bac2 cmpal 5bac2 <_Thread_Heir>,%a0 4b49a: 6710 beqs 4b4ac <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4b49c: 4a28 0075 tstb %a0@(117) 4b4a0: 670a beqs 4b4ac <_Thread_Evaluate_mode+0x28> <== ALWAYS TAKEN _Context_Switch_necessary = true; 4b4a2: 7001 moveq #1,%d0 4b4a4: 13c0 0005 bafe moveb %d0,5bafe <_Context_Switch_necessary> return true; 4b4aa: 6002 bras 4b4ae <_Thread_Evaluate_mode+0x2a> <== ALWAYS TAKEN 4b4ac: 4200 clrb %d0 } return false; } 4b4ae: 4e5e unlk %fp 4b4b0: 4e75 rts ... 00046c94 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 46c94: 4e56 0000 linkw %fp,#0 46c98: 202e 0008 movel %fp@(8),%d0 46c9c: 2f03 movel %d3,%sp@- 46c9e: 206e 000c moveal %fp@(12),%a0 46ca2: 2f02 movel %d2,%sp@- uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 46ca4: 4a80 tstl %d0 46ca6: 6618 bnes 46cc0 <_Thread_Get+0x2c> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46ca8: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 46cae: 5280 addql #1,%d0 46cb0: 23c0 0005 ba34 movel %d0,5ba34 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 46cb6: 4290 clrl %a0@ tp = _Thread_Executing; 46cb8: 2039 0005 baee movel 5baee <_Thread_Executing>,%d0 goto done; 46cbe: 6044 bras 46d04 <_Thread_Get+0x70> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 46cc0: 7418 moveq #24,%d2 46cc2: 2200 movel %d0,%d1 46cc4: e4a9 lsrl %d2,%d1 46cc6: 7607 moveq #7,%d3 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 46cc8: 143c 0003 moveb #3,%d2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 46ccc: c283 andl %d3,%d1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 46cce: 2241 moveal %d1,%a1 46cd0: 5389 subql #1,%a1 46cd2: b489 cmpl %a1,%d2 46cd4: 643a bccs 46d10 <_Thread_Get+0x7c> 46cd6: 6014 bras 46cec <_Thread_Get+0x58> <== ALWAYS TAKEN if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 46cd8: 43f9 0005 b9ec lea 5b9ec <_Objects_Information_table>,%a1 46cde: 2271 1c00 moveal %a1@(00000000,%d1:l:4),%a1 if ( !api_information ) { 46ce2: 4a89 tstl %a1 46ce4: 6706 beqs 46cec <_Thread_Get+0x58> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 46ce6: 2229 0004 movel %a1@(4),%d1 if ( !information ) { 46cea: 6608 bnes 46cf4 <_Thread_Get+0x60> *location = OBJECTS_ERROR; 46cec: 7001 moveq #1,%d0 46cee: 2080 movel %d0,%a0@ 46cf0: 4280 clrl %d0 goto done; 46cf2: 6010 bras 46d04 <_Thread_Get+0x70> <== ALWAYS TAKEN } tp = (Thread_Control *) _Objects_Get( information, id, location ); 46cf4: 2f08 movel %a0,%sp@- 46cf6: 2f00 movel %d0,%sp@- 46cf8: 2f01 movel %d1,%sp@- 46cfa: 4eb9 0004 6498 jsr 46498 <_Objects_Get> 46d00: 4fef 000c lea %sp@(12),%sp done: return tp; } 46d04: 242e fff8 movel %fp@(-8),%d2 46d08: 262e fffc movel %fp@(-4),%d3 46d0c: 4e5e unlk %fp 46d0e: 4e75 rts *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 46d10: 761b moveq #27,%d3 46d12: 2400 movel %d0,%d2 46d14: e6aa lsrl %d3,%d2 46d16: 163c 0001 moveb #1,%d3 46d1a: b682 cmpl %d2,%d3 46d1c: 67ba beqs 46cd8 <_Thread_Get+0x44> 46d1e: 60cc bras 46cec <_Thread_Get+0x58> <== ALWAYS TAKEN 0004b4b4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4b4b4: 4e56 0000 linkw %fp,#0 4b4b8: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4b4ba: 2479 0005 baee moveal 5baee <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4b4c0: 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; 4b4c2: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4b4c6: 40c0 movew %sr,%d0 4b4c8: e189 lsll #8,%d1 4b4ca: 0280 0000 f8ff andil #63743,%d0 4b4d0: 8081 orl %d1,%d0 4b4d2: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4b4d4: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4b4d6: 1439 0005 b1e8 moveb 5b1e8 ,%d2 doneConstructors = 1; 4b4dc: 13c0 0005 b1e8 moveb %d0,5b1e8 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4b4e2: 4aaa 0100 tstl %a2@(256) 4b4e6: 6720 beqs 4b508 <_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 ); 4b4e8: 2079 0005 baba moveal 5baba <_Thread_Allocated_fp>,%a0 4b4ee: b1ca cmpal %a2,%a0 4b4f0: 6716 beqs 4b508 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4b4f2: 4a88 tstl %a0 4b4f4: 670c beqs 4b502 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4b4f6: 4868 0100 pea %a0@(256) 4b4fa: 4eb9 0004 7f86 jsr 47f86 <_CPU_Context_save_fp> 4b500: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4b502: 23ca 0005 baba movel %a2,5baba <_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 ); 4b508: 2f0a movel %a2,%sp@- 4b50a: 4eb9 0004 79c0 jsr 479c0 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4b510: 4eb9 0004 6c6e jsr 46c6e <_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) */ { 4b516: 588f addql #4,%sp 4b518: 4a02 tstb %d2 4b51a: 6606 bnes 4b522 <_Thread_Handler+0x6e> INIT_NAME (); 4b51c: 4eb9 0005 8910 jsr 58910 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4b522: 4aaa 009e tstl %a2@(158) 4b526: 6610 bnes 4b538 <_Thread_Handler+0x84> <== ALWAYS TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4b528: 2f2a 00a6 movel %a2@(166),%sp@- 4b52c: 206a 009a moveal %a2@(154),%a0 4b530: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4b532: 588f addql #4,%sp 4b534: 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 ); 4b538: 2f0a movel %a2,%sp@- 4b53a: 4eb9 0004 79f8 jsr 479f8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4b540: 4878 0006 pea 6 4b544: 4878 0001 pea 1 4b548: 42a7 clrl %sp@- 4b54a: 4eb9 0004 5f88 jsr 45f88 <_Internal_error_Occurred> 00046d20 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46d20: 4e56 ffe4 linkw %fp,#-28 46d24: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 46d28: 242e 0014 movel %fp@(20),%d2 46d2c: 246e 000c moveal %fp@(12),%a2 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 46d30: 2f02 movel %d2,%sp@- Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46d32: 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; 46d36: 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 ) { 46d3a: 282e 001c movel %fp@(28),%d4 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 46d3e: 42aa 010c clrl %a2@(268) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46d42: 1a2e 0023 moveb %fp@(35),%d5 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 46d46: 42aa 0110 clrl %a2@(272) extensions_area = NULL; the_thread->libc_reent = NULL; 46d4a: 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 ); 46d4e: 2f0a movel %a2,%sp@- 46d50: 4eb9 0004 75c8 jsr 475c8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 46d56: 508f addql #8,%sp 46d58: 4a80 tstl %d0 46d5a: 6700 014c beqw 46ea8 <_Thread_Initialize+0x188> 46d5e: b480 cmpl %d0,%d2 46d60: 6200 0146 bhiw 46ea8 <_Thread_Initialize+0x188> <== ALWAYS TAKEN void *starting_address, size_t size ) { the_stack->area = starting_address; the_stack->size = size; 46d64: 2540 00bc movel %d0,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 46d68: 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 ) { 46d6e: 4a03 tstb %d3 46d70: 6604 bnes 46d76 <_Thread_Initialize+0x56> 46d72: 4283 clrl %d3 46d74: 6016 bras 46d8c <_Thread_Initialize+0x6c> <== ALWAYS TAKEN fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 46d76: 4878 001c pea 1c 46d7a: 4eb9 0004 7dc0 jsr 47dc0 <_Workspace_Allocate> if ( !fp_area ) 46d80: 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 ); 46d82: 2600 movel %d0,%d3 if ( !fp_area ) 46d84: 6606 bnes 46d8c <_Thread_Initialize+0x6c> 46d86: 4282 clrl %d2 46d88: 6000 00c6 braw 46e50 <_Thread_Initialize+0x130> <== ALWAYS TAKEN #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 46d8c: 2039 0005 bad2 movel 5bad2 <_Thread_Maximum_extensions>,%d0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 46d92: 2543 0100 movel %d3,%a2@(256) the_thread->Start.fp_context = fp_area; 46d96: 2543 00c4 movel %d3,%a2@(196) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46d9a: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 46d9e: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 46da2: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 46da6: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 46daa: 4a80 tstl %d0 46dac: 6604 bnes 46db2 <_Thread_Initialize+0x92> 46dae: 4282 clrl %d2 46db0: 6016 bras 46dc8 <_Thread_Initialize+0xa8> <== ALWAYS TAKEN extensions_area = _Workspace_Allocate( 46db2: e588 lsll #2,%d0 46db4: 2040 moveal %d0,%a0 46db6: 4868 0004 pea %a0@(4) 46dba: 4eb9 0004 7dc0 jsr 47dc0 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 46dc0: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 46dc2: 2400 movel %d0,%d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 46dc4: 6700 008a beqw 46e50 <_Thread_Initialize+0x130> goto failed; } the_thread->extensions = (void **) extensions_area; 46dc8: 2542 0114 movel %d2,%a2@(276) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 46dcc: 6718 beqs 46de6 <_Thread_Initialize+0xc6> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 46dce: 2239 0005 bad2 movel 5bad2 <_Thread_Maximum_extensions>,%d1 46dd4: 4280 clrl %d0 46dd6: 600a bras 46de2 <_Thread_Initialize+0xc2> <== ALWAYS TAKEN the_thread->extensions[i] = NULL; 46dd8: 206a 0114 moveal %a2@(276),%a0 46ddc: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 46de0: 5280 addql #1,%d0 46de2: b280 cmpl %d0,%d1 46de4: 64f2 bccs 46dd8 <_Thread_Initialize+0xb8> #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 46de6: 2f04 movel %d4,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 46de8: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 46dee: 7001 moveq #1,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 46df0: 256e 0024 00ac movel %fp@(36),%a2@(172) the_thread->Start.budget_callout = budget_callout; 46df6: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 46dfc: 1545 00aa moveb %d5,%a2@(170) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 46e00: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 46e02: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 46e06: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 46e0a: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 46e0e: 2544 0018 movel %d4,%a2@(24) the_thread->Start.initial_priority = priority; 46e12: 2544 00b8 movel %d4,%a2@(184) _Thread_Set_priority( the_thread, priority ); 46e16: 4eb9 0004 73f4 jsr 473f4 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46e1c: 206e 0008 moveal %fp@(8),%a0 46e20: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46e22: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46e28: 2068 0018 moveal %a0@(24),%a0 46e2c: 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 ); 46e30: 42aa 0082 clrl %a2@(130) 46e34: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 46e38: 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 ); 46e3c: 2f0a movel %a2,%sp@- 46e3e: 4eb9 0004 7a7c jsr 47a7c <_User_extensions_Thread_create> if ( extension_status ) 46e44: 4fef 000c lea %sp@(12),%sp 46e48: 4a00 tstb %d0 46e4a: 6704 beqs 46e50 <_Thread_Initialize+0x130> 46e4c: 7001 moveq #1,%d0 46e4e: 605a bras 46eaa <_Thread_Initialize+0x18a> <== ALWAYS TAKEN return true; failed: if ( the_thread->libc_reent ) 46e50: 202a 0104 movel %a2@(260),%d0 46e54: 670a beqs 46e60 <_Thread_Initialize+0x140> _Workspace_Free( the_thread->libc_reent ); 46e56: 2f00 movel %d0,%sp@- 46e58: 4eb9 0004 7ddc jsr 47ddc <_Workspace_Free> 46e5e: 588f addql #4,%sp 46e60: 47ea 0108 lea %a2@(264),%a3 46e64: 4284 clrl %d4 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); 46e66: 49f9 0004 7ddc lea 47ddc <_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] ) 46e6c: 2013 movel %a3@,%d0 failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 46e6e: 5284 addql #1,%d4 46e70: 588b addql #4,%a3 if ( the_thread->API_Extensions[i] ) 46e72: 4a80 tstl %d0 46e74: 6706 beqs 46e7c <_Thread_Initialize+0x15c> _Workspace_Free( the_thread->API_Extensions[i] ); 46e76: 2f00 movel %d0,%sp@- 46e78: 4e94 jsr %a4@ 46e7a: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 46e7c: 7003 moveq #3,%d0 46e7e: b084 cmpl %d4,%d0 46e80: 66ea bnes 46e6c <_Thread_Initialize+0x14c> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 46e82: 4a82 tstl %d2 46e84: 670a beqs 46e90 <_Thread_Initialize+0x170> (void) _Workspace_Free( extensions_area ); 46e86: 2f02 movel %d2,%sp@- 46e88: 4eb9 0004 7ddc jsr 47ddc <_Workspace_Free> 46e8e: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 46e90: 4a83 tstl %d3 46e92: 670a beqs 46e9e <_Thread_Initialize+0x17e> (void) _Workspace_Free( fp_area ); 46e94: 2f03 movel %d3,%sp@- 46e96: 4eb9 0004 7ddc jsr 47ddc <_Workspace_Free> 46e9c: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 46e9e: 2f0a movel %a2,%sp@- 46ea0: 4eb9 0004 7614 jsr 47614 <_Thread_Stack_Free> return false; 46ea6: 588f addql #4,%sp 46ea8: 4200 clrb %d0 } 46eaa: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 46eb0: 4e5e unlk %fp 46eb2: 4e75 rts 0004a1a4 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4a1a4: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4a1a8: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4a1ae: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4a1b2: 243c 0000 0700 movel #1792,%d2 4a1b8: 2202 movel %d2,%d1 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4a1ba: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4a1be: 40c0 movew %sr,%d0 4a1c0: 8280 orl %d0,%d1 4a1c2: 46c1 movew %d1,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4a1c4: 2229 0008 movel %a1@(8),%d1 4a1c8: b291 cmpl %a1@,%d1 4a1ca: 6604 bnes 4a1d0 <_Thread_Reset_timeslice+0x2c> _ISR_Enable( level ); 4a1cc: 46c0 movew %d0,%sr return; 4a1ce: 6040 bras 4a210 <_Thread_Reset_timeslice+0x6c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4a1d0: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4a1d2: 2209 movel %a1,%d1 4a1d4: 5881 addql #4,%d1 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4a1d6: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4a1da: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4a1dc: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4a1e0: 2081 movel %d1,%a0@ old_last_node = the_chain->last; 4a1e2: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4a1e6: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4a1ea: 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; 4a1ee: 2488 movel %a0,%a2@ } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4a1f0: 2202 movel %d2,%d1 4a1f2: 46c0 movew %d0,%sr 4a1f4: 8280 orl %d0,%d1 4a1f6: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4a1f8: b1f9 0005 bac2 cmpal 5bac2 <_Thread_Heir>,%a0 4a1fe: 6606 bnes 4a206 <_Thread_Reset_timeslice+0x62> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 4a200: 23d1 0005 bac2 movel %a1@,5bac2 <_Thread_Heir> _Context_Switch_necessary = true; 4a206: 7201 moveq #1,%d1 4a208: 13c1 0005 bafe moveb %d1,5bafe <_Context_Switch_necessary> _ISR_Enable( level ); 4a20e: 46c0 movew %d0,%sr } 4a210: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4a214: 4e5e unlk %fp 4a216: 4e75 rts 00047b00 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 47b00: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 47b02: 4e56 0000 linkw %fp,#0 47b06: 2f0a movel %a2,%sp@- 47b08: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 47b0c: c0aa 0010 andl %a2@(16),%d0 47b10: 4a00 tstb %d0 47b12: 6704 beqs 47b18 <_Thread_Restart+0x18> 47b14: 4200 clrb %d0 47b16: 6070 bras 47b88 <_Thread_Restart+0x88> <== ALWAYS TAKEN _Thread_Set_transient( the_thread ); 47b18: 2f0a movel %a2,%sp@- 47b1a: 4eb9 0004 7ce8 jsr 47ce8 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 47b20: 2f2e 0010 movel %fp@(16),%sp@- 47b24: 2f2e 000c movel %fp@(12),%sp@- 47b28: 2f0a movel %a2,%sp@- 47b2a: 4eb9 0004 a980 jsr 4a980 <_Thread_Reset> _Thread_Load_environment( the_thread ); 47b30: 2f0a movel %a2,%sp@- 47b32: 4eb9 0004 a61c jsr 4a61c <_Thread_Load_environment> _Thread_Ready( the_thread ); 47b38: 2f0a movel %a2,%sp@- 47b3a: 4eb9 0004 a8c0 jsr 4a8c0 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 47b40: 2f0a movel %a2,%sp@- 47b42: 4eb9 0004 829c jsr 4829c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 47b48: 4fef 001c lea %sp@(28),%sp 47b4c: b5f9 0005 c576 cmpal 5c576 <_Thread_Executing>,%a2 47b52: 6704 beqs 47b58 <_Thread_Restart+0x58> 47b54: 7001 moveq #1,%d0 47b56: 6030 bras 47b88 <_Thread_Restart+0x88> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 47b58: 4aaa 0100 tstl %a2@(256) 47b5c: 670c beqs 47b6a <_Thread_Restart+0x6a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 47b5e: 486a 0100 pea %a2@(256) 47b62: 4eb9 0004 8784 jsr 48784 <_CPU_Context_restore_fp> 47b68: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 47b6a: 2079 0005 c576 moveal 5c576 <_Thread_Executing>,%a0 47b70: 2028 00fc movel %a0@(252),%d0 47b74: 2228 00cc movel %a0@(204),%d1 47b78: 46c1 movew %d1,%sr 47b7a: 2e40 moveal %d0,%sp 47b7c: 4e75 rts 47b7e: 2140 00fc movel %d0,%a0@(252) <== NOT EXECUTED 47b82: 7001 moveq #1,%d0 <== NOT EXECUTED 47b84: 2141 00cc movel %d1,%a0@(204) <== NOT EXECUTED return true; } return false; } 47b88: 246e fffc moveal %fp@(-4),%a2 47b8c: 4e5e unlk %fp 47b8e: 4e75 rts 0004ab38 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4ab38: 4e56 ffec linkw %fp,#-20 4ab3c: 206e 0008 moveal %fp@(8),%a0 4ab40: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4ab44: 243c 0000 0700 movel #1792,%d2 4ab4a: 2002 movel %d2,%d0 4ab4c: 40c1 movew %sr,%d1 4ab4e: 8081 orl %d1,%d0 4ab50: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4ab52: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4ab56: 0800 0001 btst #1,%d0 4ab5a: 6778 beqs 4abd4 <_Thread_Resume+0x9c> <== ALWAYS TAKEN 4ab5c: 76fd moveq #-3,%d3 4ab5e: c083 andl %d3,%d0 current_state = 4ab60: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4ab64: 666e bnes 4abd4 <_Thread_Resume+0x9c> <== 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; 4ab66: 2668 008e moveal %a0@(142),%a3 4ab6a: 3028 0094 movew %a0@(148),%d0 4ab6e: 3613 movew %a3@,%d3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4ab70: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ab74: 2809 movel %a1,%d4 4ab76: 5884 addql #4,%d4 4ab78: 8083 orl %d3,%d0 4ab7a: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4ab7c: 2469 0008 moveal %a1@(8),%a2 4ab80: 3680 movew %d0,%a3@ the_chain->last = the_node; 4ab82: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4ab86: 3039 0006 0c7c movew 60c7c <_Priority_Major_bit_map>,%d0 4ab8c: 3628 0092 movew %a0@(146),%d3 old_last_node->next = the_node; the_node->previous = old_last_node; 4ab90: 214a 0004 movel %a2,%a0@(4) 4ab94: 8083 orl %d3,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4ab96: 2488 movel %a0,%a2@ 4ab98: 33c0 0006 0c7c movew %d0,60c7c <_Priority_Major_bit_map> _ISR_Flash( level ); 4ab9e: 2002 movel %d2,%d0 4aba0: 46c1 movew %d1,%sr 4aba2: 8081 orl %d1,%d0 4aba4: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4aba6: 2028 0014 movel %a0@(20),%d0 4abaa: 2279 0006 0c5a moveal 60c5a <_Thread_Heir>,%a1 4abb0: b0a9 0014 cmpl %a1@(20),%d0 4abb4: 641e bccs 4abd4 <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 4abb6: 23c8 0006 0c5a movel %a0,60c5a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4abbc: 2079 0006 0c86 moveal 60c86 <_Thread_Executing>,%a0 4abc2: 4a28 0075 tstb %a0@(117) 4abc6: 6604 bnes 4abcc <_Thread_Resume+0x94> 4abc8: 4a80 tstl %d0 4abca: 6608 bnes 4abd4 <_Thread_Resume+0x9c> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4abcc: 7001 moveq #1,%d0 4abce: 13c0 0006 0c96 moveb %d0,60c96 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4abd4: 46c1 movew %d1,%sr } 4abd6: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4abda: 4e5e unlk %fp 4abdc: 4e75 rts ... 00047464 <_Thread_Set_state>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 47464: 223c 0000 0700 movel #1792,%d1 void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 4746a: 4e56 fff4 linkw %fp,#-12 4746e: 206e 0008 moveal %fp@(8),%a0 47472: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47476: 242e 000c movel %fp@(12),%d2 ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 4747a: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4747e: 40c0 movew %sr,%d0 47480: 8280 orl %d0,%d1 47482: 46c1 movew %d1,%sr if ( !_States_Is_ready( the_thread->current_state ) ) { 47484: 2228 0010 movel %a0@(16),%d1 47488: 670c beqs 47496 <_Thread_Set_state+0x32> the_thread->current_state = 4748a: 8481 orl %d1,%d2 4748c: 2142 0010 movel %d2,%a0@(16) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 47490: 46c0 movew %d0,%sr return; 47492: 6000 00ae braw 47542 <_Thread_Set_state+0xde> <== ALWAYS TAKEN } the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { 47496: 2229 0008 movel %a1@(8),%d1 _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 4749a: 2142 0010 movel %d2,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 4749e: b291 cmpl %a1@,%d1 474a0: 6632 bnes 474d4 <_Thread_Set_state+0x70> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 474a2: 2209 movel %a1,%d1 474a4: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 474a6: 2468 008e moveal %a0@(142),%a2 474aa: 2281 movel %d1,%a1@ 474ac: 3412 movew %a2@,%d2 474ae: 3228 0098 movew %a0@(152),%d1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 474b2: 2349 0008 movel %a1,%a1@(8) 474b6: c282 andl %d2,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 474b8: 42a9 0004 clrl %a1@(4) 474bc: 3481 movew %d1,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 474be: 6620 bnes 474e0 <_Thread_Set_state+0x7c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 474c0: 3239 0005 bae4 movew 5bae4 <_Priority_Major_bit_map>,%d1 474c6: 3428 0096 movew %a0@(150),%d2 474ca: c282 andl %d2,%d1 474cc: 33c1 0005 bae4 movew %d1,5bae4 <_Priority_Major_bit_map> 474d2: 600c bras 474e0 <_Thread_Set_state+0x7c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 474d4: 2250 moveal %a0@,%a1 previous = the_node->previous; 474d6: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 474da: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 474dc: 234a 0004 movel %a2,%a1@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 474e0: 223c 0000 0700 movel #1792,%d1 474e6: 46c0 movew %d0,%sr 474e8: 8280 orl %d0,%d1 474ea: 46c1 movew %d1,%sr if ( _Thread_Is_heir( the_thread ) ) 474ec: b1f9 0005 bac2 cmpal 5bac2 <_Thread_Heir>,%a0 474f2: 663c bnes 47530 <_Thread_Set_state+0xcc> 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 ); 474f4: 3239 0005 bae4 movew 5bae4 <_Priority_Major_bit_map>,%d1 474fa: 4841 swap %d1 474fc: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 474fe: 4282 clrl %d2 47500: 43f9 0005 bb50 lea 5bb50 <_Priority_Bit_map>,%a1 47506: 3401 movew %d1,%d2 47508: 3231 2a00 movew %a1@(00000000,%d2:l:2),%d1 4750c: 4841 swap %d1 4750e: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47510: 4283 clrl %d3 47512: e98a lsll #4,%d2 47514: 3601 movew %d1,%d3 47516: 2279 0005 b9e0 moveal 5b9e0 <_Thread_Ready_chain>,%a1 4751c: 2202 movel %d2,%d1 4751e: d283 addl %d3,%d1 47520: 2401 movel %d1,%d2 47522: e58a lsll #2,%d2 47524: e989 lsll #4,%d1 47526: 93c2 subal %d2,%a1 47528: d3c1 addal %d1,%a1 4752a: 23d1 0005 bac2 movel %a1@,5bac2 <_Thread_Heir> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 47530: b1f9 0005 baee cmpal 5baee <_Thread_Executing>,%a0 47536: 6608 bnes 47540 <_Thread_Set_state+0xdc> _Context_Switch_necessary = true; 47538: 7201 moveq #1,%d1 4753a: 13c1 0005 bafe moveb %d1,5bafe <_Context_Switch_necessary> _ISR_Enable( level ); 47540: 46c0 movew %d0,%sr } 47542: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47546: 4e5e unlk %fp 47548: 4e75 rts ... 0004754c <_Thread_Set_transient>: ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 4754c: 203c 0000 0700 movel #1792,%d0 */ void _Thread_Set_transient( Thread_Control *the_thread ) { 47552: 4e56 0000 linkw %fp,#0 47556: 206e 0008 moveal %fp@(8),%a0 4755a: 2f0a movel %a2,%sp@- ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 4755c: 2268 008a moveal %a0@(138),%a1 */ void _Thread_Set_transient( Thread_Control *the_thread ) { 47560: 2f02 movel %d2,%sp@- ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 47562: 40c1 movew %sr,%d1 47564: 8081 orl %d1,%d0 47566: 46c0 movew %d0,%sr old_state = the_thread->current_state; 47568: 2028 0010 movel %a0@(16),%d0 the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 4756c: 7404 moveq #4,%d2 4756e: 8480 orl %d0,%d2 47570: 2142 0010 movel %d2,%a0@(16) if ( _States_Is_ready( old_state ) ) { 47574: 4a80 tstl %d0 47576: 6646 bnes 475be <_Thread_Set_transient+0x72> if ( _Chain_Has_only_one_node( ready ) ) { 47578: 2029 0008 movel %a1@(8),%d0 4757c: b091 cmpl %a1@,%d0 4757e: 6632 bnes 475b2 <_Thread_Set_transient+0x66> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47580: 2409 movel %a1,%d2 47582: 5882 addql #4,%d2 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 47584: 2468 008e moveal %a0@(142),%a2 47588: 2282 movel %d2,%a1@ 4758a: 3412 movew %a2@,%d2 4758c: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47590: 2349 0008 movel %a1,%a1@(8) 47594: 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; 47596: 42a9 0004 clrl %a1@(4) 4759a: 3480 movew %d0,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 4759c: 6620 bnes 475be <_Thread_Set_transient+0x72> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 4759e: 3428 0096 movew %a0@(150),%d2 475a2: 3039 0005 bae4 movew 5bae4 <_Priority_Major_bit_map>,%d0 475a8: c082 andl %d2,%d0 475aa: 33c0 0005 bae4 movew %d0,5bae4 <_Priority_Major_bit_map> 475b0: 600c bras 475be <_Thread_Set_transient+0x72> <== ALWAYS TAKEN { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 475b2: 2268 0004 moveal %a0@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 475b6: 2050 moveal %a0@,%a0 previous = the_node->previous; next->previous = previous; previous->next = next; 475b8: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 475ba: 2149 0004 movel %a1,%a0@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 475be: 46c1 movew %d1,%sr } 475c0: 241f movel %sp@+,%d2 475c2: 245f moveal %sp@+,%a2 475c4: 4e5e unlk %fp 475c6: 4e75 rts 000475c8 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 475c8: 4e56 0000 linkw %fp,#0 475cc: 2039 0005 a2fe movel 5a2fe ,%d0 475d2: 2f02 movel %d2,%sp@- 475d4: 242e 000c movel %fp@(12),%d2 475d8: b082 cmpl %d2,%d0 475da: 6302 blss 475de <_Thread_Stack_Allocate+0x16> 475dc: 2400 movel %d0,%d2 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 475de: 2079 0005 a324 moveal 5a324 ,%a0 475e4: 4a88 tstl %a0 475e6: 6706 beqs 475ee <_Thread_Stack_Allocate+0x26> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 475e8: 2f02 movel %d2,%sp@- 475ea: 4e90 jsr %a0@ 475ec: 6008 bras 475f6 <_Thread_Stack_Allocate+0x2e> <== ALWAYS TAKEN * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 475ee: 2f02 movel %d2,%sp@- 475f0: 4eb9 0004 7dc0 jsr 47dc0 <_Workspace_Allocate> } if ( !stack_addr ) 475f6: 4a80 tstl %d0 475f8: 56c1 sne %d1 the_stack_size = 0; the_thread->Start.stack = stack_addr; 475fa: 206e 0008 moveal %fp@(8),%a0 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 475fe: 588f addql #4,%sp } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 47600: 2140 00c8 movel %d0,%a0@(200) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 47604: 1001 moveb %d1,%d0 47606: 49c0 extbl %d0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 47608: c082 andl %d2,%d0 4760a: 242e fffc movel %fp@(-4),%d2 4760e: 4e5e unlk %fp 47610: 4e75 rts ... 000476e0 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 476e0: 223c 0000 0700 movel #1792,%d1 */ void _Thread_Suspend( Thread_Control *the_thread ) { 476e6: 4e56 fff4 linkw %fp,#-12 476ea: 206e 0008 moveal %fp@(8),%a0 476ee: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 476f2: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 476f6: 40c0 movew %sr,%d0 476f8: 8280 orl %d0,%d1 476fa: 46c1 movew %d1,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 476fc: 2228 0010 movel %a0@(16),%d1 47700: 670e beqs 47710 <_Thread_Suspend+0x30> the_thread->current_state = 47702: 7402 moveq #2,%d2 47704: 8481 orl %d1,%d2 47706: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 4770a: 46c0 movew %d0,%sr return; 4770c: 6000 00b0 braw 477be <_Thread_Suspend+0xde> <== ALWAYS TAKEN } the_thread->current_state = STATES_SUSPENDED; 47710: 7202 moveq #2,%d1 if ( _Chain_Has_only_one_node( ready ) ) { 47712: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 47716: 2141 0010 movel %d1,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 4771a: b491 cmpl %a1@,%d2 4771c: 6632 bnes 47750 <_Thread_Suspend+0x70> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4771e: 2209 movel %a1,%d1 47720: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 47722: 2468 008e moveal %a0@(142),%a2 47726: 2281 movel %d1,%a1@ 47728: 3412 movew %a2@,%d2 4772a: 3228 0098 movew %a0@(152),%d1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4772e: 2349 0008 movel %a1,%a1@(8) 47732: c282 andl %d2,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47734: 42a9 0004 clrl %a1@(4) 47738: 3481 movew %d1,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 4773a: 6620 bnes 4775c <_Thread_Suspend+0x7c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 4773c: 3239 0005 bae4 movew 5bae4 <_Priority_Major_bit_map>,%d1 47742: 3428 0096 movew %a0@(150),%d2 47746: c282 andl %d2,%d1 47748: 33c1 0005 bae4 movew %d1,5bae4 <_Priority_Major_bit_map> 4774e: 600c bras 4775c <_Thread_Suspend+0x7c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47750: 2250 moveal %a0@,%a1 previous = the_node->previous; 47752: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 47756: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47758: 234a 0004 movel %a2,%a1@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 4775c: 223c 0000 0700 movel #1792,%d1 47762: 46c0 movew %d0,%sr 47764: 8280 orl %d0,%d1 47766: 46c1 movew %d1,%sr if ( _Thread_Is_heir( the_thread ) ) 47768: b1f9 0005 bac2 cmpal 5bac2 <_Thread_Heir>,%a0 4776e: 663c bnes 477ac <_Thread_Suspend+0xcc> 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 ); 47770: 3239 0005 bae4 movew 5bae4 <_Priority_Major_bit_map>,%d1 47776: 4841 swap %d1 47778: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4777a: 4282 clrl %d2 4777c: 43f9 0005 bb50 lea 5bb50 <_Priority_Bit_map>,%a1 47782: 3401 movew %d1,%d2 47784: 3231 2a00 movew %a1@(00000000,%d2:l:2),%d1 47788: 4841 swap %d1 4778a: 04c1 ff1 %d1 4778c: 4283 clrl %d3 4778e: e98a lsll #4,%d2 47790: 3601 movew %d1,%d3 47792: 2279 0005 b9e0 moveal 5b9e0 <_Thread_Ready_chain>,%a1 47798: 2202 movel %d2,%d1 4779a: d283 addl %d3,%d1 4779c: 2401 movel %d1,%d2 4779e: e58a lsll #2,%d2 477a0: e989 lsll #4,%d1 477a2: 93c2 subal %d2,%a1 477a4: d3c1 addal %d1,%a1 477a6: 23d1 0005 bac2 movel %a1@,5bac2 <_Thread_Heir> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 477ac: b1f9 0005 baee cmpal 5baee <_Thread_Executing>,%a0 477b2: 6608 bnes 477bc <_Thread_Suspend+0xdc> _Context_Switch_necessary = true; 477b4: 7401 moveq #1,%d2 477b6: 13c2 0005 bafe moveb %d2,5bafe <_Context_Switch_necessary> _ISR_Enable( level ); 477bc: 46c0 movew %d0,%sr } 477be: 4cd7 040c moveml %sp@,%d2-%d3/%a2 477c2: 4e5e unlk %fp 477c4: 4e75 rts ... 0004780c <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 4780c: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 47810: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 47816: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4781a: 243c 0000 0700 movel #1792,%d2 47820: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 47822: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 47826: 40c1 movew %sr,%d1 47828: 8081 orl %d1,%d0 4782a: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 4782c: 2029 0008 movel %a1@(8),%d0 47830: b091 cmpl %a1@,%d0 47832: 6738 beqs 4786c <_Thread_Yield_processor+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47834: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47836: 2009 movel %a1,%d0 47838: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4783a: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4783e: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47840: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47844: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 47846: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4784a: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4784e: 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; 47852: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 47854: 2002 movel %d2,%d0 47856: 46c1 movew %d1,%sr 47858: 8081 orl %d1,%d0 4785a: 46c0 movew %d0,%sr if ( _Thread_Is_heir( executing ) ) 4785c: b1f9 0005 bac2 cmpal 5bac2 <_Thread_Heir>,%a0 47862: 6610 bnes 47874 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 47864: 23d1 0005 bac2 movel %a1@,5bac2 <_Thread_Heir> 4786a: 6008 bras 47874 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 4786c: b1f9 0005 bac2 cmpal 5bac2 <_Thread_Heir>,%a0 47872: 6708 beqs 4787c <_Thread_Yield_processor+0x70> <== NEVER TAKEN _Context_Switch_necessary = true; 47874: 7001 moveq #1,%d0 47876: 13c0 0005 bafe moveb %d0,5bafe <_Context_Switch_necessary> _ISR_Enable( level ); 4787c: 46c1 movew %d1,%sr } 4787e: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 47882: 4e5e unlk %fp 47884: 4e75 rts ... 00046724 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 46724: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 46726: 4e56 0000 linkw %fp,#0 4672a: 202e 0010 movel %fp@(16),%d0 4672e: 2f0a movel %a2,%sp@- 46730: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 46734: 42aa 0044 clrl %a2@(68) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 46738: b2aa 0050 cmpl %a2@(80),%d1 4673c: 6618 bnes 46756 <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4673e: 123c 0003 moveb #3,%d1 46742: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 46746: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 46748: 486a 0048 pea %a2@(72) 4674c: 4eb9 0004 7c94 jsr 47c94 <_Watchdog_Remove> 46752: 588f addql #4,%sp 46754: 6002 bras 46758 <_Thread_blocking_operation_Cancel+0x34> <== ALWAYS TAKEN } else _ISR_Enable( level ); 46756: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 46758: 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 } 4675c: 246e fffc moveal %fp@(-4),%a2 46760: 203c 1003 fff8 movel #268697592,%d0 46766: 2d40 000c movel %d0,%fp@(12) 4676a: 4e5e unlk %fp 4676c: 4ef9 0004 68b4 jmp 468b4 <_Thread_Clear_state> ... 00049ec4 <_Thread_queue_Dequeue_fifo>: ) { ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 49ec4: 223c 0000 0700 movel #1792,%d1 */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 49eca: 4e56 fff4 linkw %fp,#-12 49ece: 206e 0008 moveal %fp@(8),%a0 49ed2: 48d7 1c00 moveml %a2-%a4,%sp@ ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 49ed6: 40c0 movew %sr,%d0 49ed8: 8280 orl %d0,%d1 49eda: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 49edc: 2248 moveal %a0,%a1 49ede: 2459 moveal %a1@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49ee0: b3ca cmpal %a2,%a1 49ee2: 674e beqs 49f32 <_Thread_queue_Dequeue_fifo+0x6e> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 49ee4: 2252 moveal %a2@,%a1 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) 49ee6: 264a moveal %a2,%a3 49ee8: 49f9 0004 68b4 lea 468b4 <_Thread_Clear_state>,%a4 _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 49eee: 7202 moveq #2,%d1 the_chain->first = new_first; 49ef0: 2089 movel %a1,%a0@ new_first->previous = _Chain_Head(the_chain); 49ef2: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; 49ef6: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 49efa: b2aa 0050 cmpl %a2@(80),%d1 49efe: 6710 beqs 49f10 <_Thread_queue_Dequeue_fifo+0x4c> _ISR_Enable( level ); 49f00: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 49f02: 2f3c 1003 fff8 movel #268697592,%sp@- 49f08: 2f0a movel %a2,%sp@- 49f0a: 4e94 jsr %a4@ 49f0c: 508f addql #8,%sp 49f0e: 6026 bras 49f36 <_Thread_queue_Dequeue_fifo+0x72> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 49f10: 7203 moveq #3,%d1 49f12: 2541 0050 movel %d1,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 49f16: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 49f18: 486a 0048 pea %a2@(72) 49f1c: 4eb9 0004 7c94 jsr 47c94 <_Watchdog_Remove> 49f22: 2f3c 1003 fff8 movel #268697592,%sp@- 49f28: 2f0a movel %a2,%sp@- 49f2a: 4e94 jsr %a4@ 49f2c: 4fef 000c lea %sp@(12),%sp 49f30: 6004 bras 49f36 <_Thread_queue_Dequeue_fifo+0x72> <== ALWAYS TAKEN #endif return the_thread; } _ISR_Enable( level ); 49f32: 46c0 movew %d0,%sr 49f34: 97cb subal %a3,%a3 return NULL; } 49f36: 200b movel %a3,%d0 49f38: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 49f3e: 4e5e unlk %fp 49f40: 4e75 rts ... 00046fec <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 46fec: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 46ff2: 4e56 ffec linkw %fp,#-20 46ff6: 226e 0008 moveal %fp@(8),%a1 46ffa: 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 ); 46ffe: 40c1 movew %sr,%d1 47000: 8081 orl %d1,%d0 47002: 46c0 movew %d0,%sr 47004: 4280 clrl %d0 47006: 2049 moveal %a1,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 47008: 2408 movel %a0,%d2 4700a: 5882 addql #4,%d2 4700c: b490 cmpl %a0@,%d2 4700e: 6728 beqs 47038 <_Thread_queue_Dequeue_priority+0x4c> 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 *) 47010: 2400 movel %d0,%d2 47012: e588 lsll #2,%d0 47014: e98a lsll #4,%d2 47016: 9480 subl %d0,%d2 47018: 2471 2800 moveal %a1@(00000000,%d2:l),%a2 4701c: 200a movel %a2,%d0 4701e: 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; 47024: 206a 0038 moveal %a2@(56),%a0 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 47028: 2652 moveal %a2@,%a3 previous_node = the_thread->Object.Node.previous; 4702a: 226a 0004 moveal %a2@(4),%a1 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 4702e: 42aa 0044 clrl %a2@(68) 47032: b088 cmpl %a0,%d0 47034: 6614 bnes 4704a <_Thread_queue_Dequeue_priority+0x5e> 47036: 6046 bras 4707e <_Thread_queue_Dequeue_priority+0x92> <== ALWAYS TAKEN Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 47038: 5280 addql #1,%d0 4703a: 41e8 000c lea %a0@(12),%a0 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 4703e: 7404 moveq #4,%d2 47040: b480 cmpl %d0,%d2 47042: 66c4 bnes 47008 <_Thread_queue_Dequeue_priority+0x1c> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 47044: 46c1 movew %d1,%sr 47046: 95ca subal %a2,%a2 return NULL; 47048: 6078 bras 470c2 <_Thread_queue_Dequeue_priority+0xd6> <== ALWAYS TAKEN 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; 4704a: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4704e: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 47050: 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; 47054: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 47056: 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; 4705a: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4705c: 226a 0040 moveal %a2@(64),%a1 47060: b3ea 0038 cmpal %a2@(56),%a1 47064: 671e beqs 47084 <_Thread_queue_Dequeue_priority+0x98> /* > two threads on 2-n */ new_second_node->previous = 47066: 43e8 0038 lea %a0@(56),%a1 4706a: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4706e: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 47072: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 47076: 41e8 003c lea %a0@(60),%a0 4707a: 2888 movel %a0,%a4@ 4707c: 6006 bras 47084 <_Thread_queue_Dequeue_priority+0x98> <== ALWAYS TAKEN } } else { previous_node->next = next_node; next_node->previous = previous_node; 4707e: 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; 47082: 228b movel %a3,%a1@ 47084: 47f9 0004 68b4 lea 468b4 <_Thread_Clear_state>,%a3 next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4708a: 7002 moveq #2,%d0 4708c: b0aa 0050 cmpl %a2@(80),%d0 47090: 6710 beqs 470a2 <_Thread_queue_Dequeue_priority+0xb6> _ISR_Enable( level ); 47092: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47094: 2f3c 1003 fff8 movel #268697592,%sp@- 4709a: 2f0a movel %a2,%sp@- 4709c: 4e93 jsr %a3@ 4709e: 508f addql #8,%sp 470a0: 6020 bras 470c2 <_Thread_queue_Dequeue_priority+0xd6> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 470a2: 7403 moveq #3,%d2 470a4: 2542 0050 movel %d2,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 470a8: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 470aa: 486a 0048 pea %a2@(72) 470ae: 4eb9 0004 7c94 jsr 47c94 <_Watchdog_Remove> 470b4: 2f3c 1003 fff8 movel #268697592,%sp@- 470ba: 2f0a movel %a2,%sp@- 470bc: 4e93 jsr %a3@ 470be: 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 ); } 470c2: 200a movel %a2,%d0 470c4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 470ca: 4e5e unlk %fp 470cc: 4e75 rts ... 00049f44 <_Thread_queue_Enqueue_fifo>: ) { Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 49f44: 203c 0000 0700 movel #1792,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 49f4a: 4e56 0000 linkw %fp,#0 49f4e: 206e 0008 moveal %fp@(8),%a0 49f52: 2f0a movel %a2,%sp@- 49f54: 226e 000c moveal %fp@(12),%a1 49f58: 2f02 movel %d2,%sp@- Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 49f5a: 40c1 movew %sr,%d1 49f5c: 8081 orl %d1,%d0 49f5e: 46c0 movew %d0,%sr sync_state = the_thread_queue->sync_state; 49f60: 2028 0030 movel %a0@(48),%d0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 49f64: 7401 moveq #1,%d2 ISR_Level level; _ISR_Disable( level ); sync_state = the_thread_queue->sync_state; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 49f66: 42a8 0030 clrl %a0@(48) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 49f6a: b480 cmpl %d0,%d2 49f6c: 661c bnes 49f8a <_Thread_queue_Enqueue_fifo+0x46> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 49f6e: 2408 movel %a0,%d2 49f70: 5882 addql #4,%d2 49f72: 2282 movel %d2,%a1@ old_last_node = the_chain->last; 49f74: 2468 0008 moveal %a0@(8),%a2 the_chain->last = the_node; 49f78: 2149 0008 movel %a1,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 49f7c: 234a 0004 movel %a2,%a1@(4) _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 49f80: 2348 0044 movel %a0,%a1@(68) 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; 49f84: 2489 movel %a1,%a2@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 49f86: 46c1 movew %d1,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 49f88: 6006 bras 49f90 <_Thread_queue_Enqueue_fifo+0x4c> <== ALWAYS 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; 49f8a: 206e 0010 moveal %fp@(16),%a0 49f8e: 2081 movel %d1,%a0@ return sync_state; } 49f90: 241f movel %sp@+,%d2 49f92: 245f moveal %sp@+,%a2 49f94: 4e5e unlk %fp 49f96: 4e75 rts 00047168 <_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 ) { 47168: 4e56 ffe4 linkw %fp,#-28 4716c: 206e 000c moveal %fp@(12),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47170: 43e8 003c lea %a0@(60),%a1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 47174: 2028 0014 movel %a0@(20),%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47178: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 4717c: 2400 movel %d0,%d2 4717e: ec8a lsrl #6,%d2 47180: 2202 movel %d2,%d1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 47182: 283c 0000 0700 movel #1792,%d4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47188: e989 lsll #4,%d1 4718a: e58a lsll #2,%d2 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4718c: 246e 0008 moveal %fp@(8),%a2 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 47190: 9282 subl %d2,%d1 47192: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 47196: 2149 0038 movel %a1,%a0@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4719a: 43e8 0038 lea %a0@(56),%a1 block_state = the_thread_queue->state; 4719e: 2a2a 0038 movel %a2@(56),%d5 471a2: 2149 0040 movel %a1,%a0@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 471a6: 42a8 003c clrl %a0@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 471aa: 0800 0005 btst #5,%d0 471ae: 6660 bnes 47210 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 471b0: 2c0b movel %a3,%d6 471b2: 5886 addql #4,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 471b4: 2404 movel %d4,%d2 471b6: 40c1 movew %sr,%d1 471b8: 8481 orl %d1,%d2 471ba: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->first; 471bc: 2253 moveal %a3@,%a1 471be: 76ff moveq #-1,%d3 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 471c0: 601e bras 471e0 <_Thread_queue_Enqueue_priority+0x78> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 471c2: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 471c6: b680 cmpl %d0,%d3 471c8: 641a bccs 471e4 <_Thread_queue_Enqueue_priority+0x7c> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 471ca: 2404 movel %d4,%d2 471cc: 46c1 movew %d1,%sr 471ce: 8481 orl %d1,%d2 471d0: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 471d2: 2405 movel %d5,%d2 471d4: c4a9 0010 andl %a1@(16),%d2 471d8: 6604 bnes 471de <_Thread_queue_Enqueue_priority+0x76> <== NEVER TAKEN _ISR_Enable( level ); 471da: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 471dc: 60d6 bras 471b4 <_Thread_queue_Enqueue_priority+0x4c> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 471de: 2251 moveal %a1@,%a1 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 471e0: bc89 cmpl %a1,%d6 471e2: 66de bnes 471c2 <_Thread_queue_Enqueue_priority+0x5a> 471e4: 2401 movel %d1,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 471e6: 7801 moveq #1,%d4 471e8: b8aa 0030 cmpl %a2@(48),%d4 471ec: 6600 00a4 bnew 47292 <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 471f0: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 471f4: b680 cmpl %d0,%d3 471f6: 677e beqs 47276 <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 471f8: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 471fc: 2089 movel %a1,%a0@ the_node->previous = previous_node; 471fe: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47202: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 47206: 2688 movel %a0,%a3@ search_node->previous = the_node; 47208: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4720c: 46c1 movew %d1,%sr 4720e: 6062 bras 47272 <_Thread_queue_Enqueue_priority+0x10a> <== ALWAYS TAKEN return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 47210: 4283 clrl %d3 47212: 1639 0005 a302 moveb 5a302 ,%d3 _ISR_Disable( level ); 47218: 2404 movel %d4,%d2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4721a: 5283 addql #1,%d3 _ISR_Disable( level ); 4721c: 40c1 movew %sr,%d1 4721e: 8481 orl %d1,%d2 47220: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->last; 47222: 226b 0008 moveal %a3@(8),%a1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 47226: 6020 bras 47248 <_Thread_queue_Enqueue_priority+0xe0> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 47228: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 4722c: b680 cmpl %d0,%d3 4722e: 631c blss 4724c <_Thread_queue_Enqueue_priority+0xe4> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 47230: 2404 movel %d4,%d2 47232: 46c1 movew %d1,%sr 47234: 8481 orl %d1,%d2 47236: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 47238: 2405 movel %d5,%d2 4723a: c4a9 0010 andl %a1@(16),%d2 4723e: 6604 bnes 47244 <_Thread_queue_Enqueue_priority+0xdc> _ISR_Enable( level ); 47240: 46c1 movew %d1,%sr goto restart_reverse_search; 47242: 60cc bras 47210 <_Thread_queue_Enqueue_priority+0xa8> <== ALWAYS TAKEN } search_thread = (Thread_Control *) 47244: 2269 0004 moveal %a1@(4),%a1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 47248: b7c9 cmpal %a1,%a3 4724a: 66dc bnes 47228 <_Thread_queue_Enqueue_priority+0xc0> 4724c: 2401 movel %d1,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4724e: 7801 moveq #1,%d4 47250: b8aa 0030 cmpl %a2@(48),%d4 47254: 663c bnes 47292 <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 47256: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 4725a: b680 cmpl %d0,%d3 4725c: 6718 beqs 47276 <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4725e: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 47260: 2149 0004 movel %a1,%a0@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 47264: 208b movel %a3,%a0@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47266: 214a 0044 movel %a2,%a0@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 4726a: 2288 movel %a0,%a1@ next_node->previous = the_node; 4726c: 2748 0004 movel %a0,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47270: 46c1 movew %d1,%sr 47272: 7001 moveq #1,%d0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 47274: 6026 bras 4729c <_Thread_queue_Enqueue_priority+0x134> <== ALWAYS TAKEN 47276: 43e9 003c lea %a1@(60),%a1 equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 4727a: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4727e: 2089 movel %a1,%a0@ the_node->previous = previous_node; 47280: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47284: 214a 0044 movel %a2,%a0@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 47288: 2688 movel %a0,%a3@ search_node->previous = the_node; 4728a: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4728e: 46c2 movew %d2,%sr 47290: 60e0 bras 47272 <_Thread_queue_Enqueue_priority+0x10a> <== ALWAYS 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; 47292: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 47296: 202a 0030 movel %a2@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4729a: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 4729c: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 472a0: 4e5e unlk %fp 472a2: 4e75 rts 0004b550 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4b550: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4b556: 4e56 0000 linkw %fp,#0 4b55a: 2f0a movel %a2,%sp@- 4b55c: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4b560: 40c0 movew %sr,%d0 4b562: 8280 orl %d0,%d1 4b564: 46c1 movew %d1,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4b566: 222a 0010 movel %a2@(16),%d1 4b56a: 0281 0003 bee0 andil #245472,%d1 4b570: 660a bnes 4b57c <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4b572: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b574: 246e fffc moveal %fp@(-4),%a2 4b578: 4e5e unlk %fp 4b57a: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4b57c: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b57e: 7202 moveq #2,%d1 previous = the_node->previous; 4b580: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4b584: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4b588: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4b58a: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b58e: b2aa 0050 cmpl %a2@(80),%d1 4b592: 6704 beqs 4b598 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4b594: 46c0 movew %d0,%sr 4b596: 6014 bras 4b5ac <_Thread_queue_Extract_fifo+0x5c> <== ALWAYS TAKEN 4b598: 7203 moveq #3,%d1 4b59a: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4b59e: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4b5a0: 486a 0048 pea %a2@(72) 4b5a4: 4eb9 0004 7c94 jsr 47c94 <_Watchdog_Remove> 4b5aa: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4b5ac: 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 } 4b5b0: 246e fffc moveal %fp@(-4),%a2 4b5b4: 203c 1003 fff8 movel #268697592,%d0 4b5ba: 2d40 000c movel %d0,%fp@(12) 4b5be: 4e5e unlk %fp 4b5c0: 4ef9 0004 68b4 jmp 468b4 <_Thread_Clear_state> ... 00049fd0 <_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 ); 49fd0: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 49fd6: 4e56 ffec linkw %fp,#-20 49fda: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 49fde: 246e 000c moveal %fp@(12),%a2 49fe2: 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 ); 49fe6: 40c0 movew %sr,%d0 49fe8: 8280 orl %d0,%d1 49fea: 46c1 movew %d1,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 49fec: 222a 0010 movel %a2@(16),%d1 49ff0: 0281 0003 bee0 andil #245472,%d1 49ff6: 6606 bnes 49ffe <_Thread_queue_Extract_priority_helper+0x2e> _ISR_Enable( level ); 49ff8: 46c0 movew %d0,%sr return; 49ffa: 6000 0096 braw 4a092 <_Thread_queue_Extract_priority_helper+0xc2> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49ffe: 220a movel %a2,%d1 4a000: 0681 0000 003c addil #60,%d1 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4a006: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4a008: 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)); 4a00c: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a010: b288 cmpl %a0,%d1 4a012: 6734 beqs 4a048 <_Thread_queue_Extract_priority_helper+0x78> 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; 4a014: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4a018: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4a01a: 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; 4a01e: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4a020: 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; 4a024: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4a026: 222a 0040 movel %a2@(64),%d1 4a02a: b2aa 0038 cmpl %a2@(56),%d1 4a02e: 671e beqs 4a04e <_Thread_queue_Extract_priority_helper+0x7e> /* > two threads on 2-n */ new_second_node->previous = 4a030: 43e8 0038 lea %a0@(56),%a1 4a034: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4a038: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4a03c: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4a040: 41e8 003c lea %a0@(60),%a0 4a044: 2888 movel %a0,%a4@ 4a046: 6006 bras 4a04e <_Thread_queue_Extract_priority_helper+0x7e> <== ALWAYS TAKEN } } else { previous_node->next = next_node; next_node->previous = previous_node; 4a048: 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; 4a04c: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4a04e: 4a02 tstb %d2 4a050: 6704 beqs 4a056 <_Thread_queue_Extract_priority_helper+0x86> _ISR_Enable( level ); 4a052: 46c0 movew %d0,%sr 4a054: 603c bras 4a092 <_Thread_queue_Extract_priority_helper+0xc2> <== ALWAYS TAKEN return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a056: 7202 moveq #2,%d1 4a058: b2aa 0050 cmpl %a2@(80),%d1 4a05c: 6704 beqs 4a062 <_Thread_queue_Extract_priority_helper+0x92> _ISR_Enable( level ); 4a05e: 46c0 movew %d0,%sr 4a060: 6014 bras 4a076 <_Thread_queue_Extract_priority_helper+0xa6> <== ALWAYS TAKEN 4a062: 7203 moveq #3,%d1 4a064: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4a068: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4a06a: 486a 0048 pea %a2@(72) 4a06e: 4eb9 0004 7c94 jsr 47c94 <_Watchdog_Remove> 4a074: 588f addql #4,%sp 4a076: 2d4a 0008 movel %a2,%fp@(8) 4a07a: 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 } 4a080: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a086: 2d49 000c movel %a1,%fp@(12) 4a08a: 4e5e unlk %fp 4a08c: 4ef9 0004 68b4 jmp 468b4 <_Thread_Clear_state> 4a092: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a098: 4e5e unlk %fp 4a09a: 4e75 rts 00056b24 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 56b24: 4280 clrl %d0 56b26: 4e56 0000 linkw %fp,#0 56b2a: 226e 0008 moveal %fp@(8),%a1 56b2e: 2049 moveal %a1,%a0 56b30: 2208 movel %a0,%d1 56b32: 5881 addql #4,%d1 56b34: b290 cmpl %a0@,%d1 56b36: 670e beqs 56b46 <_Thread_queue_First_priority+0x22> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) 56b38: 2200 movel %d0,%d1 56b3a: e588 lsll #2,%d0 56b3c: e989 lsll #4,%d1 56b3e: 9280 subl %d0,%d1 56b40: 2031 1800 movel %a1@(00000000,%d1:l),%d0 56b44: 600e bras 56b54 <_Thread_queue_First_priority+0x30> <== ALWAYS TAKEN { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 56b46: 5280 addql #1,%d0 56b48: 41e8 000c lea %a0@(12),%a0 Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 56b4c: 7204 moveq #4,%d1 56b4e: b280 cmpl %d0,%d1 56b50: 66de bnes 56b30 <_Thread_queue_First_priority+0xc> 56b52: 4280 clrl %d0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 56b54: 4e5e unlk %fp 56b56: 4e75 rts 000472cc <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 472cc: 4e56 fff4 linkw %fp,#-12 472d0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 472d4: 262e 0008 movel %fp@(8),%d3 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 472d8: 45f9 0004 6f90 lea 46f90 <_Thread_queue_Dequeue>,%a2 #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 472de: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 472e2: 6006 bras 472ea <_Thread_queue_Flush+0x1e> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 472e4: 2040 moveal %d0,%a0 472e6: 2142 0034 movel %d2,%a0@(52) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 472ea: 2f03 movel %d3,%sp@- 472ec: 4e92 jsr %a2@ 472ee: 588f addql #4,%sp 472f0: 4a80 tstl %d0 472f2: 66f0 bnes 472e4 <_Thread_queue_Flush+0x18> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 472f4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 472fa: 4e5e unlk %fp 472fc: 4e75 rts ... 00047300 <_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 ) { 47300: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 47302: 4e56 0000 linkw %fp,#0 47306: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 4730a: 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 ) { 47310: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 47314: 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; 4731a: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4731e: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 47322: b280 cmpl %d0,%d1 47324: 6620 bnes 47346 <_Thread_queue_Initialize+0x46> * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 47326: 2008 movel %a0,%d0 47328: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4732e: 2208 movel %a0,%d1 47330: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 47332: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47336: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47338: 2148 0008 movel %a0,%a0@(8) 4733c: 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 ; 47340: b088 cmpl %a0,%d0 47342: 66ea bnes 4732e <_Thread_queue_Initialize+0x2e> 47344: 600e bras 47354 <_Thread_queue_Initialize+0x54> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47346: 2008 movel %a0,%d0 47348: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4734a: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4734e: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 47350: 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 ); } } 47354: 4e5e unlk %fp 47356: 4e75 rts 0004a09c <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4a09c: 4e56 0000 linkw %fp,#0 4a0a0: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4a0a4: 2268 0044 moveal %a0@(68),%a1 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 4a0a8: 2029 0030 movel %a1@(48),%d0 4a0ac: 671c beqs 4a0ca <_Thread_queue_Process_timeout+0x2e> 4a0ae: b1f9 0005 baee cmpal 5baee <_Thread_Executing>,%a0 4a0b4: 6614 bnes 4a0ca <_Thread_queue_Process_timeout+0x2e> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4a0b6: 7203 moveq #3,%d1 4a0b8: b280 cmpl %d0,%d1 4a0ba: 6722 beqs 4a0de <_Thread_queue_Process_timeout+0x42> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a0bc: 7002 moveq #2,%d0 */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a0be: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a0c4: 2340 0030 movel %d0,%a1@(48) 4a0c8: 6014 bras 4a0de <_Thread_queue_Process_timeout+0x42> <== ALWAYS TAKEN } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a0ca: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4a0d0: 2f08 movel %a0,%sp@- 4a0d2: 2f28 0044 movel %a0@(68),%sp@- 4a0d6: 4eb9 0004 9f98 jsr 49f98 <_Thread_queue_Extract> 4a0dc: 508f addql #8,%sp } } 4a0de: 4e5e unlk %fp 4a0e0: 4e75 rts ... 00047358 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 47358: 4e56 fff0 linkw %fp,#-16 4735c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47360: 246e 0008 moveal %fp@(8),%a2 47364: 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 ) 47368: 4a8a tstl %a2 4736a: 6746 beqs 473b2 <_Thread_queue_Requeue+0x5a> <== 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 ) { 4736c: 7001 moveq #1,%d0 4736e: b0aa 0034 cmpl %a2@(52),%d0 47372: 663e bnes 473b2 <_Thread_queue_Requeue+0x5a> <== ALWAYS TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 47374: 303c 0700 movew #1792,%d0 47378: 40c2 movew %sr,%d2 4737a: 8082 orl %d2,%d0 4737c: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4737e: 202b 0010 movel %a3@(16),%d0 47382: 0280 0003 bee0 andil #245472,%d0 47388: 6726 beqs 473b0 <_Thread_queue_Requeue+0x58> <== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 4738a: 4878 0001 pea 1 4738e: 7001 moveq #1,%d0 47390: 2f0b movel %a3,%sp@- 47392: 2540 0030 movel %d0,%a2@(48) 47396: 2f0a movel %a2,%sp@- 47398: 4eb9 0004 9fd0 jsr 49fd0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4739e: 486e fffc pea %fp@(-4) 473a2: 2f0b movel %a3,%sp@- 473a4: 2f0a movel %a2,%sp@- 473a6: 4eb9 0004 7168 jsr 47168 <_Thread_queue_Enqueue_priority> 473ac: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 473b0: 46c2 movew %d2,%sr } } 473b2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 473b8: 4e5e unlk %fp 473ba: 4e75 rts 000473bc <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 473bc: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 473c0: 486e fffc pea %fp@(-4) 473c4: 2f2e 0008 movel %fp@(8),%sp@- 473c8: 4eb9 0004 6c94 jsr 46c94 <_Thread_Get> switch ( location ) { 473ce: 508f addql #8,%sp 473d0: 4aae fffc tstl %fp@(-4) 473d4: 6618 bnes 473ee <_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 ); 473d6: 2f00 movel %d0,%sp@- 473d8: 4eb9 0004 a09c jsr 4a09c <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 473de: 588f addql #4,%sp 473e0: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 473e6: 5380 subql #1,%d0 473e8: 23c0 0005 ba34 movel %d0,5ba34 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 473ee: 4e5e unlk %fp 473f0: 4e75 rts ... 00050edc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 50edc: 4e56 ffb4 linkw %fp,#-76 50ee0: 200e movel %fp,%d0 50ee2: 0680 ffff fff4 addil #-12,%d0 50ee8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 50eec: 246e 0008 moveal %fp@(8),%a2 50ef0: 240e movel %fp,%d2 50ef2: 2a0e movel %fp,%d5 50ef4: 260e movel %fp,%d3 50ef6: 0682 ffff ffe8 addil #-24,%d2 50efc: 5185 subql #8,%d5 50efe: 0683 ffff ffec addil #-20,%d3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 50f04: 41ea 0008 lea %a2@(8),%a0 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 50f08: 4bea 0040 lea %a2@(64),%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f0c: 2e0a movel %a2,%d7 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f0e: 280a movel %a2,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f10: 0687 0000 0030 addil #48,%d7 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f16: 0684 0000 0068 addil #104,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f1c: 49f9 0005 48fc lea 548fc <_Watchdog_Adjust_to_chain>,%a4 ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 50f22: 47f9 0005 498c lea 5498c <_Watchdog_Insert>,%a3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 50f28: 2d48 ffe4 movel %a0,%fp@(-28) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50f2c: 2d45 fff4 movel %d5,%fp@(-12) the_chain->permanent_null = NULL; 50f30: 42ae fff8 clrl %fp@(-8) the_chain->last = _Chain_Head(the_chain); 50f34: 2d40 fffc movel %d0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50f38: 2d43 ffe8 movel %d3,%fp@(-24) the_chain->permanent_null = NULL; 50f3c: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 50f40: 2d42 fff0 movel %d2,%fp@(-16) 50f44: 2d4d ffe0 movel %a5,%fp@(-32) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 50f48: 41ee fff4 lea %fp@(-12),%a0 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 50f4c: 3a7c 0700 moveaw #1792,%a5 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 50f50: 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; 50f54: 2039 0007 3a20 movel 73a20 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 50f5a: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 50f5e: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f62: 486e ffe8 pea %fp@(-24) 50f66: 9081 subl %d1,%d0 50f68: 2f00 movel %d0,%sp@- 50f6a: 2f07 movel %d7,%sp@- 50f6c: 4e94 jsr %a4@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 50f6e: 2039 0007 3972 movel 73972 <_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 ) { 50f74: 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; 50f78: 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 ) { 50f7c: b280 cmpl %d0,%d1 50f7e: 6414 bccs 50f94 <_Timer_server_Body+0xb8> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f80: 486e ffe8 pea %fp@(-24) 50f84: 2c00 movel %d0,%d6 50f86: 9c81 subl %d1,%d6 50f88: 2f06 movel %d6,%sp@- 50f8a: 2d40 ffdc movel %d0,%fp@(-36) 50f8e: 2f04 movel %d4,%sp@- 50f90: 4e94 jsr %a4@ 50f92: 6018 bras 50fac <_Timer_server_Body+0xd0> <== ALWAYS TAKEN } else if ( snapshot < last_snapshot ) { 50f94: b280 cmpl %d0,%d1 50f96: 631c blss 50fb4 <_Timer_server_Body+0xd8> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 50f98: 9280 subl %d0,%d1 50f9a: 2f01 movel %d1,%sp@- 50f9c: 4878 0001 pea 1 50fa0: 2d40 ffdc movel %d0,%fp@(-36) 50fa4: 2f04 movel %d4,%sp@- 50fa6: 4eb9 0005 487c jsr 5487c <_Watchdog_Adjust> 50fac: 202e ffdc movel %fp@(-36),%d0 50fb0: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 50fb4: 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 ); 50fb8: 202a 0078 movel %a2@(120),%d0 50fbc: 2f00 movel %d0,%sp@- 50fbe: 4eb9 0005 185c jsr 5185c <_Chain_Get> if ( timer == NULL ) { 50fc4: 588f addql #4,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 50fc6: 2040 moveal %d0,%a0 if ( timer == NULL ) { 50fc8: 4a80 tstl %d0 50fca: 6724 beqs 50ff0 <_Timer_server_Body+0x114> <== NEVER TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 50fcc: 2028 0038 movel %a0@(56),%d0 <== NOT EXECUTED 50fd0: 7201 moveq #1,%d1 <== NOT EXECUTED 50fd2: b280 cmpl %d0,%d1 <== NOT EXECUTED 50fd4: 6608 bnes 50fde <_Timer_server_Body+0x102> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 50fd6: 4868 0010 pea %a0@(16) <== NOT EXECUTED 50fda: 2f07 movel %d7,%sp@- <== NOT EXECUTED 50fdc: 600c bras 50fea <_Timer_server_Body+0x10e> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 50fde: 7c03 moveq #3,%d6 <== NOT EXECUTED 50fe0: bc80 cmpl %d0,%d6 <== NOT EXECUTED 50fe2: 66d4 bnes 50fb8 <_Timer_server_Body+0xdc> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 50fe4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 50fe8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 50fea: 4e93 jsr %a3@ <== NOT EXECUTED 50fec: 508f addql #8,%sp <== NOT EXECUTED 50fee: 60c8 bras 50fb8 <_Timer_server_Body+0xdc> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 50ff0: 200d movel %a5,%d0 50ff2: 40c1 movew %sr,%d1 50ff4: 8081 orl %d1,%d0 50ff6: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 50ff8: baae fff4 cmpl %fp@(-12),%d5 50ffc: 6612 bnes 51010 <_Timer_server_Body+0x134> <== ALWAYS TAKEN ts->insert_chain = NULL; 50ffe: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 51002: 46c1 movew %d1,%sr /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 51004: 3a7c 0700 moveaw #1792,%a5 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 51008: b6ae ffe8 cmpl %fp@(-24),%d3 5100c: 6608 bnes 51016 <_Timer_server_Body+0x13a> 5100e: 6042 bras 51052 <_Timer_server_Body+0x176> <== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 51010: 46c1 movew %d1,%sr <== NOT EXECUTED 51012: 6000 ff40 braw 50f54 <_Timer_server_Body+0x78> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 51016: 220d movel %a5,%d1 51018: 40c0 movew %sr,%d0 5101a: 8280 orl %d0,%d1 5101c: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5101e: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 51022: b688 cmpl %a0,%d3 51024: 6726 beqs 5104c <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 51026: 2250 moveal %a0@,%a1 the_chain->first = new_first; 51028: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = _Chain_Head(the_chain); 5102c: 2342 0004 movel %d2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 51030: 4a88 tstl %a0 51032: 6718 beqs 5104c <_Timer_server_Body+0x170> <== ALWAYS TAKEN watchdog->state = WATCHDOG_INACTIVE; 51034: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 51038: 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 ); 5103a: 2f28 0024 movel %a0@(36),%sp@- 5103e: 2f28 0020 movel %a0@(32),%sp@- 51042: 2068 001c moveal %a0@(28),%a0 51046: 4e90 jsr %a0@ } 51048: 508f addql #8,%sp 5104a: 60ca bras 51016 <_Timer_server_Body+0x13a> <== ALWAYS TAKEN watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 5104c: 46c0 movew %d0,%sr 5104e: 6000 fef8 braw 50f48 <_Timer_server_Body+0x6c> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 51052: 4200 clrb %d0 51054: 1540 007c moveb %d0,%a2@(124) 51058: 2039 0007 38e0 movel 738e0 <_Thread_Dispatch_disable_level>,%d0 5105e: 5280 addql #1,%d0 51060: 23c0 0007 38e0 movel %d0,738e0 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 51066: 4878 0008 pea 8 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5106a: 4bf9 0005 4aa8 lea 54aa8 <_Watchdog_Remove>,%a5 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 51070: 2f12 movel %a2@,%sp@- 51072: 4eb9 0005 40c8 jsr 540c8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 51078: 2f0a movel %a2,%sp@- 5107a: 4eba fd9c jsr %pc@(50e18 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5107e: 2f0a movel %a2,%sp@- 51080: 4eba fdf6 jsr %pc@(50e78 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 51084: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> ts->active = true; 5108a: 7201 moveq #1,%d1 5108c: 1541 007c moveb %d1,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51090: 2f2e ffe4 movel %fp@(-28),%sp@- 51094: 4e95 jsr %a5@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 51096: 2f2e ffe0 movel %fp@(-32),%sp@- 5109a: 4e95 jsr %a5@ 5109c: 4fef 0018 lea %sp@(24),%sp 510a0: 6000 fea6 braw 50f48 <_Timer_server_Body+0x6c> <== ALWAYS TAKEN 00050e18 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 50e18: 4e56 0000 linkw %fp,#0 50e1c: 2f0a movel %a2,%sp@- 50e1e: 246e 0008 moveal %fp@(8),%a2 50e22: 2f02 movel %d2,%sp@- static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 50e24: 240a movel %a2,%d2 50e26: 5082 addql #8,%d2 50e28: 2f02 movel %d2,%sp@- 50e2a: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 50e30: 203c 0000 0700 movel #1792,%d0 50e36: 40c1 movew %sr,%d1 50e38: 8081 orl %d1,%d0 50e3a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 50e3c: 200a movel %a2,%d0 50e3e: 588f addql #4,%sp 50e40: 0680 0000 0034 addil #52,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 50e46: 206a 0030 moveal %a2@(48),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 50e4a: b088 cmpl %a0,%d0 50e4c: 671c beqs 50e6a <_Timer_server_Reset_interval_system_watchdog+0x52> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 50e4e: 2028 0010 movel %a0@(16),%d0 _ISR_Enable( level ); 50e52: 46c1 movew %d1,%sr ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 50e54: 2f02 movel %d2,%sp@- 50e56: 4879 0007 39b8 pea 739b8 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 50e5c: 2540 0014 movel %d0,%a2@(20) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 50e60: 4eb9 0005 498c jsr 5498c <_Watchdog_Insert> 50e66: 508f addql #8,%sp 50e68: 6002 bras 50e6c <_Timer_server_Reset_interval_system_watchdog+0x54> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 50e6a: 46c1 movew %d1,%sr } } 50e6c: 242e fff8 movel %fp@(-8),%d2 50e70: 246e fffc moveal %fp@(-4),%a2 50e74: 4e5e unlk %fp 50e76: 4e75 rts 00050e78 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 50e78: 4e56 0000 linkw %fp,#0 50e7c: 2f0a movel %a2,%sp@- 50e7e: 246e 0008 moveal %fp@(8),%a2 50e82: 2f02 movel %d2,%sp@- static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 50e84: 240a movel %a2,%d2 50e86: 0682 0000 0040 addil #64,%d2 50e8c: 2f02 movel %d2,%sp@- 50e8e: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 50e94: 203c 0000 0700 movel #1792,%d0 50e9a: 40c1 movew %sr,%d1 50e9c: 8081 orl %d1,%d0 50e9e: 46c0 movew %d0,%sr 50ea0: 200a movel %a2,%d0 50ea2: 588f addql #4,%sp 50ea4: 0680 0000 006c addil #108,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 50eaa: 206a 0068 moveal %a2@(104),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 50eae: b088 cmpl %a0,%d0 50eb0: 671c beqs 50ece <_Timer_server_Reset_tod_system_watchdog+0x56> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 50eb2: 2028 0010 movel %a0@(16),%d0 _ISR_Enable( level ); 50eb6: 46c1 movew %d1,%sr ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 50eb8: 2f02 movel %d2,%sp@- 50eba: 4879 0007 39ac pea 739ac <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 50ec0: 2540 004c movel %d0,%a2@(76) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 50ec4: 4eb9 0005 498c jsr 5498c <_Watchdog_Insert> 50eca: 508f addql #8,%sp 50ecc: 6002 bras 50ed0 <_Timer_server_Reset_tod_system_watchdog+0x58> <== ALWAYS TAKEN _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 50ece: 46c1 movew %d1,%sr } } 50ed0: 242e fff8 movel %fp@(-8),%d2 50ed4: 246e fffc moveal %fp@(-4),%a2 50ed8: 4e5e unlk %fp 50eda: 4e75 rts 000510a4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 510a4: 4e56 fff0 linkw %fp,#-16 510a8: 206e 000c moveal %fp@(12),%a0 510ac: 48d7 041c moveml %d2-%d4/%a2,%sp@ 510b0: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 510b4: 202a 0078 movel %a2@(120),%d0 510b8: 6600 00f8 bnew 511b2 <_Timer_server_Schedule_operation_method+0x10e> <== ALWAYS TAKEN 510bc: 2039 0007 38e0 movel 738e0 <_Thread_Dispatch_disable_level>,%d0 510c2: 5280 addql #1,%d0 510c4: 23c0 0007 38e0 movel %d0,738e0 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 510ca: 2028 0038 movel %a0@(56),%d0 510ce: 7201 moveq #1,%d1 510d0: b280 cmpl %d0,%d1 510d2: 6660 bnes 51134 <_Timer_server_Schedule_operation_method+0x90> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 510d4: 203c 0000 0700 movel #1792,%d0 510da: 40c3 movew %sr,%d3 510dc: 8083 orl %d3,%d0 510de: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 510e0: 2039 0007 3a20 movel 73a20 <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 510e6: 220a movel %a2,%d1 510e8: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 510ee: 242a 003c movel %a2@(60),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 510f2: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 510f6: b289 cmpl %a1,%d1 510f8: 6716 beqs 51110 <_Timer_server_Schedule_operation_method+0x6c> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 510fa: 2800 movel %d0,%d4 510fc: 9882 subl %d2,%d4 delta_interval = first_watchdog->delta_interval; 510fe: 2229 0010 movel %a1@(16),%d1 if (delta_interval > delta) { 51102: b881 cmpl %d1,%d4 51104: 6504 bcss 5110a <_Timer_server_Schedule_operation_method+0x66> 51106: 4281 clrl %d1 51108: 6002 bras 5110c <_Timer_server_Schedule_operation_method+0x68> <== ALWAYS TAKEN delta_interval -= delta; 5110a: 9284 subl %d4,%d1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5110c: 2341 0010 movel %d1,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 51110: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 51114: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 51116: 4868 0010 pea %a0@(16) 5111a: 486a 0030 pea %a2@(48) 5111e: 4eb9 0005 498c jsr 5498c <_Watchdog_Insert> if ( !ts->active ) { 51124: 508f addql #8,%sp 51126: 102a 007c moveb %a2@(124),%d0 5112a: 6678 bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_interval_system_watchdog( ts ); 5112c: 2f0a movel %a2,%sp@- 5112e: 4eba fce8 jsr %pc@(50e18 <_Timer_server_Reset_interval_system_watchdog>) 51132: 606e bras 511a2 <_Timer_server_Schedule_operation_method+0xfe> <== ALWAYS TAKEN } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51134: 7203 moveq #3,%d1 51136: b280 cmpl %d0,%d1 51138: 666a bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5113a: 203c 0000 0700 movel #1792,%d0 51140: 40c3 movew %sr,%d3 51142: 8083 orl %d3,%d0 51144: 46c0 movew %d0,%sr 51146: 200a movel %a2,%d0 51148: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5114e: 2239 0007 3972 movel 73972 <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 51154: 242a 0074 movel %a2@(116),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 51158: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5115c: b089 cmpl %a1,%d0 5115e: 6720 beqs 51180 <_Timer_server_Schedule_operation_method+0xdc> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 51160: 2029 0010 movel %a1@(16),%d0 if ( snapshot > last_snapshot ) { 51164: b481 cmpl %d1,%d2 51166: 6410 bccs 51178 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; 51168: 2801 movel %d1,%d4 5116a: 9882 subl %d2,%d4 if (delta_interval > delta) { 5116c: b880 cmpl %d0,%d4 5116e: 6504 bcss 51174 <_Timer_server_Schedule_operation_method+0xd0> <== NEVER TAKEN 51170: 4280 clrl %d0 <== NOT EXECUTED 51172: 6008 bras 5117c <_Timer_server_Schedule_operation_method+0xd8> <== NOT EXECUTED delta_interval -= delta; 51174: 9084 subl %d4,%d0 51176: 6004 bras 5117c <_Timer_server_Schedule_operation_method+0xd8> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 51178: d082 addl %d2,%d0 delta_interval += delta; 5117a: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 5117c: 2340 0010 movel %d0,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 51180: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 51184: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 51186: 4868 0010 pea %a0@(16) 5118a: 486a 0068 pea %a2@(104) 5118e: 4eb9 0005 498c jsr 5498c <_Watchdog_Insert> if ( !ts->active ) { 51194: 508f addql #8,%sp 51196: 102a 007c moveb %a2@(124),%d0 5119a: 6608 bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_tod_system_watchdog( ts ); 5119c: 2f0a movel %a2,%sp@- 5119e: 4eba fcd8 jsr %pc@(50e78 <_Timer_server_Reset_tod_system_watchdog>) 511a2: 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 ); } } 511a4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 511aa: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 511ac: 4ef9 0005 376a jmp 5376a <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 511b2: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 511b6: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 511ba: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 511c0: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 511c4: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 511c6: 4ef9 0005 1824 jmp 51824 <_Chain_Append> <== NOT EXECUTED 00047888 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 47888: 4e56 0000 linkw %fp,#0 4788c: 206e 0008 moveal %fp@(8),%a0 47890: 2f0a movel %a2,%sp@- 47892: 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; 47896: 226a 0004 moveal %a2@(4),%a1 4789a: d3e8 0004 addal %a0@(4),%a1 4789e: 2209 movel %a1,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 478a0: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 478a2: d190 addl %d0,%a0@ time->tv_nsec += add->tv_nsec; 478a4: 2149 0004 movel %a1,%a0@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 478a8: 600a bras 478b4 <_Timespec_Add_to+0x2c> <== ALWAYS TAKEN time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 478aa: 5290 addql #1,%a0@ seconds++; 478ac: 5280 addql #1,%d0 478ae: 0681 c465 3600 addil #-1000000000,%d1 /* 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 ) { 478b4: 0c81 3b9a c9ff cmpil #999999999,%d1 478ba: 62ee bhis 478aa <_Timespec_Add_to+0x22> time->tv_sec++; seconds++; } return seconds; } 478bc: 245f moveal %sp@+,%a2 478be: 4e5e unlk %fp /* 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 ) { 478c0: 2141 0004 movel %d1,%a0@(4) time->tv_sec++; seconds++; } return seconds; } 478c4: 4e75 rts ... 00048cd8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 48cd8: 4e56 ffdc linkw %fp,#-36 48cdc: 206e 0008 moveal %fp@(8),%a0 48ce0: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48ce4: 2f3c 3b9a ca00 movel #1000000000,%sp@- const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 48cea: 266e 000c moveal %fp@(12),%a3 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48cee: 45f9 0005 8ea0 lea 58ea0 <__muldi3>,%a2 48cf4: 42a7 clrl %sp@- /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 48cf6: 2428 0004 movel %a0@(4),%d2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48cfa: 2f13 movel %a3@,%sp@- 48cfc: 5bc0 smi %d0 48cfe: 49c0 extbl %d0 48d00: 2f00 movel %d0,%sp@- /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48d02: 2a10 movel %a0@,%d5 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48d04: 4e92 jsr %a2@ const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 48d06: 286e 0010 moveal %fp@(16),%a4 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48d0a: 2040 moveal %d0,%a0 48d0c: 2241 moveal %d1,%a1 48d0e: 4fef 0010 lea %sp@(16),%sp right += rhs->tv_nsec; 48d12: 282b 0004 movel %a3@(4),%d4 48d16: 5bc3 smi %d3 48d18: 49c3 extbl %d3 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 48d1a: 266e 0014 moveal %fp@(20),%a3 * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 48d1e: 2c08 movel %a0,%d6 48d20: d889 addl %a1,%d4 48d22: d786 addxl %d6,%d3 if ( right == 0 ) { 48d24: 6606 bnes 48d2c <_Timespec_Divide+0x54> *ival_percentage = 0; 48d26: 4294 clrl %a4@ *fval_percentage = 0; 48d28: 4293 clrl %a3@ return; 48d2a: 607a bras 48da6 <_Timespec_Divide+0xce> <== ALWAYS TAKEN * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 48d2c: 4bf9 0005 8f08 lea 58f08 <__udivdi3>,%a5 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48d32: 2f3c 3b9a ca00 movel #1000000000,%sp@- 48d38: 42a7 clrl %sp@- 48d3a: 2f05 movel %d5,%sp@- 48d3c: 5bc6 smi %d6 48d3e: 49c6 extbl %d6 48d40: 2f06 movel %d6,%sp@- 48d42: 4e92 jsr %a2@ 48d44: 4fef 0010 lea %sp@(16),%sp 48d48: 2040 moveal %d0,%a0 48d4a: 2241 moveal %d1,%a1 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 48d4c: 2f3c 0001 86a0 movel #100000,%sp@- 48d52: 2a08 movel %a0,%d5 48d54: 2c09 movel %a1,%d6 48d56: 2202 movel %d2,%d1 48d58: 5bc0 smi %d0 48d5a: 49c0 extbl %d0 48d5c: 42a7 clrl %sp@- 48d5e: dc81 addl %d1,%d6 48d60: db80 addxl %d0,%d5 48d62: 2f06 movel %d6,%sp@- 48d64: 2f05 movel %d5,%sp@- 48d66: 4e92 jsr %a2@ 48d68: 4fef 000c lea %sp@(12),%sp 48d6c: 2e84 movel %d4,%sp@ 48d6e: 2f03 movel %d3,%sp@- 48d70: 2f01 movel %d1,%sp@- 48d72: 2f00 movel %d0,%sp@- 48d74: 4e95 jsr %a5@ 48d76: 4fef 0010 lea %sp@(16),%sp 48d7a: 2400 movel %d0,%d2 *ival_percentage = answer / 1000; 48d7c: 4878 03e8 pea 3e8 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 48d80: 2601 movel %d1,%d3 *ival_percentage = answer / 1000; 48d82: 42a7 clrl %sp@- 48d84: 2f01 movel %d1,%sp@- 48d86: 2f02 movel %d2,%sp@- 48d88: 4e95 jsr %a5@ 48d8a: 4fef 0010 lea %sp@(16),%sp *fval_percentage = answer % 1000; 48d8e: 4878 03e8 pea 3e8 48d92: 42a7 clrl %sp@- * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 48d94: 2881 movel %d1,%a4@ *fval_percentage = answer % 1000; 48d96: 2f03 movel %d3,%sp@- 48d98: 2f02 movel %d2,%sp@- 48d9a: 4eb9 0005 92a4 jsr 592a4 <__umoddi3> 48da0: 4fef 0010 lea %sp@(16),%sp 48da4: 2681 movel %d1,%a3@ } 48da6: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 48dac: 4e5e unlk %fp 48dae: 4e75 rts 00071014 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 71014: 4e56 0000 linkw %fp,#0 71018: 226e 0008 moveal %fp@(8),%a1 7101c: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 71020: 2211 movel %a1@,%d1 71022: 2010 movel %a0@,%d0 71024: b081 cmpl %d1,%d0 71026: 6c04 bges 7102c <_Timespec_Greater_than+0x18> 71028: 7001 moveq #1,%d0 7102a: 6014 bras 71040 <_Timespec_Greater_than+0x2c> <== ALWAYS TAKEN return true; if ( lhs->tv_sec < rhs->tv_sec ) 7102c: b081 cmpl %d1,%d0 7102e: 6f04 bles 71034 <_Timespec_Greater_than+0x20> <== NEVER TAKEN 71030: 4200 clrb %d0 <== NOT EXECUTED 71032: 600c bras 71040 <_Timespec_Greater_than+0x2c> <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 71034: 2068 0004 moveal %a0@(4),%a0 71038: b1e9 0004 cmpal %a1@(4),%a0 7103c: 5dc0 slt %d0 7103e: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 71040: 4e5e unlk %fp 71042: 4e75 rts 0006120c <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 6120c: 4e56 0000 linkw %fp,#0 61210: 206e 0008 moveal %fp@(8),%a0 if ( !time ) 61214: 4a88 tstl %a0 61216: 6716 beqs 6122e <_Timespec_Is_valid+0x22> return false; if ( time->tv_sec < 0 ) 61218: 4a90 tstl %a0@ 6121a: 6d12 blts 6122e <_Timespec_Is_valid+0x22> return false; if ( time->tv_nsec < 0 ) 6121c: 2028 0004 movel %a0@(4),%d0 61220: 6d0c blts 6122e <_Timespec_Is_valid+0x22> #include #include #include bool _Timespec_Is_valid( 61222: 0c80 3b9a c9ff cmpil #999999999,%d0 61228: 53c0 sls %d0 6122a: 4480 negl %d0 6122c: 6002 bras 61230 <_Timespec_Is_valid+0x24> <== ALWAYS TAKEN 6122e: 4200 clrb %d0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 61230: 4e5e unlk %fp 61232: 4e75 rts 00071044 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 71044: 4e56 0000 linkw %fp,#0 71048: 226e 0008 moveal %fp@(8),%a1 7104c: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec < rhs->tv_sec ) 71050: 2211 movel %a1@,%d1 71052: 2010 movel %a0@,%d0 71054: b081 cmpl %d1,%d0 71056: 6f04 bles 7105c <_Timespec_Less_than+0x18> 71058: 7001 moveq #1,%d0 7105a: 6014 bras 71070 <_Timespec_Less_than+0x2c> <== ALWAYS TAKEN return true; if ( lhs->tv_sec > rhs->tv_sec ) 7105c: b081 cmpl %d1,%d0 7105e: 6c04 bges 71064 <_Timespec_Less_than+0x20> 71060: 4200 clrb %d0 71062: 600c bras 71070 <_Timespec_Less_than+0x2c> <== ALWAYS TAKEN #include #include #include bool _Timespec_Less_than( 71064: 2068 0004 moveal %a0@(4),%a0 71068: b1e9 0004 cmpal %a1@(4),%a0 7106c: 5ec0 sgt %d0 7106e: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 71070: 4e5e unlk %fp 71072: 4e75 rts 000478c8 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 478c8: 4e56 0000 linkw %fp,#0 478cc: 206e 0008 moveal %fp@(8),%a0 478d0: 2f0a movel %a2,%sp@- 478d2: 226e 000c moveal %fp@(12),%a1 478d6: 246e 0010 moveal %fp@(16),%a2 if (end->tv_nsec < start->tv_nsec) { 478da: 2028 0004 movel %a0@(4),%d0 478de: b0a9 0004 cmpl %a1@(4),%d0 478e2: 6f14 bles 478f8 <_Timespec_Subtract+0x30> result->tv_sec = end->tv_sec - start->tv_sec - 1; 478e4: 2211 movel %a1@,%d1 478e6: 5381 subql #1,%d1 478e8: 9290 subl %a0@,%d1 result->tv_nsec = 478ea: 2029 0004 movel %a1@(4),%d0 478ee: 0680 3b9a ca00 addil #1000000000,%d0 struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 478f4: 2481 movel %d1,%a2@ 478f6: 600a bras 47902 <_Timespec_Subtract+0x3a> <== ALWAYS TAKEN result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 478f8: 2011 movel %a1@,%d0 478fa: 9090 subl %a0@,%d0 478fc: 2480 movel %d0,%a2@ result->tv_nsec = end->tv_nsec - start->tv_nsec; 478fe: 2029 0004 movel %a1@(4),%d0 47902: 90a8 0004 subl %a0@(4),%d0 47906: 2540 0004 movel %d0,%a2@(4) } } 4790a: 245f moveal %sp@+,%a2 4790c: 4e5e unlk %fp 4790e: 4e75 rts 00061234 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 61234: 4e56 fff4 linkw %fp,#-12 61238: 48d7 040c moveml %d2-%d3/%a2,%sp@ 6123c: 246e 0008 moveal %fp@(8),%a2 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 61240: 2412 movel %a2@,%d2 61242: 660a bnes 6124e <_Timespec_To_ticks+0x1a> 61244: 4aaa 0004 tstl %a2@(4) 61248: 6604 bnes 6124e <_Timespec_To_ticks+0x1a> 6124a: 4280 clrl %d0 6124c: 602a bras 61278 <_Timespec_To_ticks+0x44> <== ALWAYS TAKEN return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 6124e: 4eb9 0006 1330 jsr 61330 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 61254: 2239 0006 50c0 movel 650c0 ,%d1 6125a: 263c 0000 03e8 movel #1000,%d3 61260: 4c03 1800 mulsl %d3,%d1 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 61264: 4c02 0800 mulsl %d2,%d0 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 61268: 262a 0004 movel %a2@(4),%d3 6126c: 4c41 3003 remul %d1,%d3,%d3 61270: d083 addl %d3,%d0 if (ticks) 61272: 6604 bnes 61278 <_Timespec_To_ticks+0x44> 61274: 103c 0001 moveb #1,%d0 return ticks; return 1; } 61278: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 6127e: 4e5e unlk %fp 61280: 4e75 rts ... 00047a32 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47a32: 4e56 fff0 linkw %fp,#-16 47a36: 48d7 041c moveml %d2-%d4/%a2,%sp@ the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 47a3a: 4282 clrl %d2 47a3c: 142e 000f moveb %fp@(15),%d2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47a40: 282e 0008 movel %fp@(8),%d4 47a44: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47a48: 2479 0005 bbca moveal 5bbca <_User_extensions_List+0x8>,%a2 47a4e: 6018 bras 47a68 <_User_extensions_Fatal+0x36> <== 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.fatal != NULL ) 47a50: 206a 0030 moveal %a2@(48),%a0 47a54: 4a88 tstl %a0 47a56: 670c beqs 47a64 <_User_extensions_Fatal+0x32> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 47a58: 2f03 movel %d3,%sp@- 47a5a: 2f02 movel %d2,%sp@- 47a5c: 2f04 movel %d4,%sp@- 47a5e: 4e90 jsr %a0@ 47a60: 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 ) { 47a64: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47a68: b5fc 0005 bbc2 cmpal #375746,%a2 47a6e: 66e0 bnes 47a50 <_User_extensions_Fatal+0x1e> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 47a70: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47a76: 4e5e unlk %fp 47a78: 4e75 rts ... 00047910 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 47910: 4e56 ffe4 linkw %fp,#-28 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47914: 203c 0005 bbc6 movel #375750,%d0 4791a: 23c0 0005 bbc2 movel %d0,5bbc2 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47920: 203c 0005 bbc2 movel #375746,%d0 47926: 23c0 0005 bbca movel %d0,5bbca <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4792c: 203c 0005 ba3c movel #375356,%d0 47932: 23c0 0005 ba38 movel %d0,5ba38 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47938: 203c 0005 ba38 movel #375352,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4793e: 42b9 0005 bbc6 clrl 5bbc6 <_User_extensions_List+0x4> 47944: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 47948: 2a39 0005 a33a movel 5a33a ,%d5 initial_extensions = Configuration.User_extension_table; 4794e: 2639 0005 a33e movel 5a33e ,%d3 47954: 42b9 0005 ba3c clrl 5ba3c <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 4795a: 23c0 0005 ba40 movel %d0,5ba40 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 47960: 4a83 tstl %d3 47962: 6750 beqs 479b4 <_User_extensions_Handler_initialization+0xa4> extension = (User_extensions_Control *) 47964: 7834 moveq #52,%d4 47966: 4c05 4800 mulsl %d5,%d4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 4796a: 4282 clrl %d2 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 4796c: 49f9 0004 c200 lea 4c200 ,%a4 _User_extensions_Add_set( extension ); 47972: 47f9 0004 a218 lea 4a218 <_User_extensions_Add_set>,%a3 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 47978: 2f04 movel %d4,%sp@- 4797a: 4eb9 0004 7d8c jsr 47d8c <_Workspace_Allocate_or_fatal_error> 47980: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 47982: 2f04 movel %d4,%sp@- 47984: 42a7 clrl %sp@- 47986: 2f00 movel %d0,%sp@- 47988: 4eb9 0004 c270 jsr 4c270 4798e: 601c bras 479ac <_User_extensions_Handler_initialization+0x9c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 47990: 4878 0020 pea 20 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 47994: 5282 addql #1,%d2 47996: 2f03 movel %d3,%sp@- 47998: 486a 0014 pea %a2@(20) 4799c: 0683 0000 0020 addil #32,%d3 479a2: 4e94 jsr %a4@ _User_extensions_Add_set( extension ); 479a4: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 479a6: 45ea 0034 lea %a2@(52),%a2 479aa: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 479ac: 4fef 0010 lea %sp@(16),%sp 479b0: ba82 cmpl %d2,%d5 479b2: 62dc bhis 47990 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 479b4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 479ba: 4e5e unlk %fp 479bc: 4e75 rts ... 000479c0 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 479c0: 4e56 0000 linkw %fp,#0 479c4: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 479c6: 2479 0005 bbc2 moveal 5bbc2 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 479cc: 2f02 movel %d2,%sp@- 479ce: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 479d2: 6010 bras 479e4 <_User_extensions_Thread_begin+0x24> <== 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 ) 479d4: 206a 0028 moveal %a2@(40),%a0 479d8: 4a88 tstl %a0 479da: 6706 beqs 479e2 <_User_extensions_Thread_begin+0x22> (*the_extension->Callouts.thread_begin)( executing ); 479dc: 2f02 movel %d2,%sp@- 479de: 4e90 jsr %a0@ 479e0: 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 ) { 479e2: 2452 moveal %a2@,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 479e4: b5fc 0005 bbc6 cmpal #375750,%a2 479ea: 66e8 bnes 479d4 <_User_extensions_Thread_begin+0x14> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 479ec: 242e fff8 movel %fp@(-8),%d2 479f0: 246e fffc moveal %fp@(-4),%a2 479f4: 4e5e unlk %fp 479f6: 4e75 rts 00047a7c <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 47a7c: 4e56 0000 linkw %fp,#0 47a80: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 47a82: 2479 0005 bbc2 moveal 5bbc2 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 47a88: 2f02 movel %d2,%sp@- 47a8a: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 47a8e: 601a bras 47aaa <_User_extensions_Thread_create+0x2e> <== 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 ) { 47a90: 206a 0014 moveal %a2@(20),%a0 47a94: 4a88 tstl %a0 47a96: 6710 beqs 47aa8 <_User_extensions_Thread_create+0x2c> status = (*the_extension->Callouts.thread_create)( 47a98: 2f02 movel %d2,%sp@- 47a9a: 2f39 0005 baee movel 5baee <_Thread_Executing>,%sp@- 47aa0: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 47aa2: 508f addql #8,%sp 47aa4: 4a00 tstb %d0 47aa6: 670c beqs 47ab4 <_User_extensions_Thread_create+0x38> 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 ) { 47aa8: 2452 moveal %a2@,%a2 47aaa: b5fc 0005 bbc6 cmpal #375750,%a2 47ab0: 66de bnes 47a90 <_User_extensions_Thread_create+0x14> 47ab2: 7001 moveq #1,%d0 return false; } } return true; } 47ab4: 242e fff8 movel %fp@(-8),%d2 47ab8: 246e fffc moveal %fp@(-4),%a2 47abc: 4e5e unlk %fp 47abe: 4e75 rts 00047ac0 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 47ac0: 4e56 0000 linkw %fp,#0 47ac4: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47ac6: 2479 0005 bbca moveal 5bbca <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 47acc: 2f02 movel %d2,%sp@- 47ace: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47ad2: 6018 bras 47aec <_User_extensions_Thread_delete+0x2c> <== 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 ) 47ad4: 206a 0020 moveal %a2@(32),%a0 47ad8: 4a88 tstl %a0 47ada: 670c beqs 47ae8 <_User_extensions_Thread_delete+0x28> (*the_extension->Callouts.thread_delete)( 47adc: 2f02 movel %d2,%sp@- 47ade: 2f39 0005 baee movel 5baee <_Thread_Executing>,%sp@- 47ae4: 4e90 jsr %a0@ 47ae6: 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 ) { 47ae8: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47aec: b5fc 0005 bbc2 cmpal #375746,%a2 47af2: 66e0 bnes 47ad4 <_User_extensions_Thread_delete+0x14> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 47af4: 242e fff8 movel %fp@(-8),%d2 47af8: 246e fffc moveal %fp@(-4),%a2 47afc: 4e5e unlk %fp 47afe: 4e75 rts 000479f8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 479f8: 4e56 0000 linkw %fp,#0 479fc: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 479fe: 2479 0005 bbca moveal 5bbca <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 47a04: 2f02 movel %d2,%sp@- 47a06: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47a0a: 6012 bras 47a1e <_User_extensions_Thread_exitted+0x26> <== 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 ) 47a0c: 206a 002c moveal %a2@(44),%a0 47a10: 4a88 tstl %a0 47a12: 6706 beqs 47a1a <_User_extensions_Thread_exitted+0x22> (*the_extension->Callouts.thread_exitted)( executing ); 47a14: 2f02 movel %d2,%sp@- 47a16: 4e90 jsr %a0@ 47a18: 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 ) { 47a1a: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47a1e: b5fc 0005 bbc2 cmpal #375746,%a2 47a24: 66e6 bnes 47a0c <_User_extensions_Thread_exitted+0x14> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 47a26: 242e fff8 movel %fp@(-8),%d2 47a2a: 246e fffc moveal %fp@(-4),%a2 47a2e: 4e5e unlk %fp 47a30: 4e75 rts 0004829c <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4829c: 4e56 0000 linkw %fp,#0 482a0: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 482a2: 2479 0005 c64a moveal 5c64a <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 482a8: 2f02 movel %d2,%sp@- 482aa: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 482ae: 6016 bras 482c6 <_User_extensions_Thread_restart+0x2a> <== 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 ) 482b0: 206a 001c moveal %a2@(28),%a0 482b4: 4a88 tstl %a0 482b6: 670c beqs 482c4 <_User_extensions_Thread_restart+0x28> (*the_extension->Callouts.thread_restart)( 482b8: 2f02 movel %d2,%sp@- 482ba: 2f39 0005 c576 movel 5c576 <_Thread_Executing>,%sp@- 482c0: 4e90 jsr %a0@ 482c2: 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 ) { 482c4: 2452 moveal %a2@,%a2 482c6: b5fc 0005 c64e cmpal #378446,%a2 482cc: 66e2 bnes 482b0 <_User_extensions_Thread_restart+0x14> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 482ce: 242e fff8 movel %fp@(-8),%d2 482d2: 246e fffc moveal %fp@(-4),%a2 482d6: 4e5e unlk %fp 482d8: 4e75 rts ... 00047b00 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 47b00: 4e56 0000 linkw %fp,#0 47b04: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47b06: 2479 0005 bbc2 moveal 5bbc2 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 47b0c: 2f02 movel %d2,%sp@- 47b0e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47b12: 6016 bras 47b2a <_User_extensions_Thread_start+0x2a> <== 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 ) 47b14: 206a 0018 moveal %a2@(24),%a0 47b18: 4a88 tstl %a0 47b1a: 670c beqs 47b28 <_User_extensions_Thread_start+0x28> (*the_extension->Callouts.thread_start)( 47b1c: 2f02 movel %d2,%sp@- 47b1e: 2f39 0005 baee movel 5baee <_Thread_Executing>,%sp@- 47b24: 4e90 jsr %a0@ 47b26: 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 ) { 47b28: 2452 moveal %a2@,%a2 47b2a: b5fc 0005 bbc6 cmpal #375750,%a2 47b30: 66e2 bnes 47b14 <_User_extensions_Thread_start+0x14> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 47b32: 242e fff8 movel %fp@(-8),%d2 47b36: 246e fffc moveal %fp@(-4),%a2 47b3a: 4e5e unlk %fp 47b3c: 4e75 rts ... 00047b40 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 47b40: 4e56 fff4 linkw %fp,#-12 47b44: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47b48: 262e 0008 movel %fp@(8),%d3 47b4c: 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 ; 47b50: 2479 0005 ba38 moveal 5ba38 <_User_extensions_Switches_list>,%a2 47b56: 600e bras 47b66 <_User_extensions_Thread_switch+0x26> <== 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 ); 47b58: 2f02 movel %d2,%sp@- 47b5a: 2f03 movel %d3,%sp@- 47b5c: 206a 0008 moveal %a2@(8),%a0 47b60: 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 ) { 47b62: 2452 moveal %a2@,%a2 47b64: 508f addql #8,%sp 47b66: b5fc 0005 ba3c cmpal #375356,%a2 47b6c: 66ea bnes 47b58 <_User_extensions_Thread_switch+0x18> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 47b6e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47b74: 4e5e unlk %fp 47b76: 4e75 rts 000490a4 <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 490a4: 327c 0700 moveaw #1792,%a1 490a8: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 490aa: 4e56 ffe8 linkw %fp,#-24 490ae: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 490b2: 266e 0008 moveal %fp@(8),%a3 490b6: 262e 000c movel %fp@(12),%d3 490ba: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 490be: 40c0 movew %sr,%d0 490c0: 8280 orl %d0,%d1 490c2: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 490c4: 244b moveal %a3,%a2 490c6: 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 ) ) { 490c8: b5c8 cmpal %a0,%a2 490ca: 674c beqs 49118 <_Watchdog_Adjust+0x74> switch ( direction ) { 490cc: 4a83 tstl %d3 490ce: 673c beqs 4910c <_Watchdog_Adjust+0x68> 490d0: 7201 moveq #1,%d1 490d2: b283 cmpl %d3,%d1 490d4: 6642 bnes 49118 <_Watchdog_Adjust+0x74> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 490d6: d5a8 0010 addl %d2,%a0@(16) break; 490da: 603c bras 49118 <_Watchdog_Adjust+0x74> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 490dc: 2053 moveal %a3@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 490de: 2628 0010 movel %a0@(16),%d3 490e2: b682 cmpl %d2,%d3 490e4: 6308 blss 490ee <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 490e6: 9682 subl %d2,%d3 490e8: 2143 0010 movel %d3,%a0@(16) break; 490ec: 602a bras 49118 <_Watchdog_Adjust+0x74> <== ALWAYS TAKEN } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 490ee: 7201 moveq #1,%d1 490f0: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 490f4: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 490f6: 2f0b movel %a3,%sp@- 490f8: 4e94 jsr %a4@ _ISR_Disable( level ); 490fa: 2204 movel %d4,%d1 490fc: 40c0 movew %sr,%d0 490fe: 8280 orl %d0,%d1 49100: 46c1 movew %d1,%sr while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 49102: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 49104: 588f addql #4,%sp 49106: b5d3 cmpal %a3@,%a2 49108: 660a bnes 49114 <_Watchdog_Adjust+0x70> 4910a: 600c bras 49118 <_Watchdog_Adjust+0x74> <== ALWAYS TAKEN _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 4910c: 2809 movel %a1,%d4 units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 4910e: 49f9 0004 92bc lea 492bc <_Watchdog_Tickle>,%a4 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 49114: 4a82 tstl %d2 49116: 66c4 bnes 490dc <_Watchdog_Adjust+0x38> <== NEVER TAKEN } break; } } _ISR_Enable( level ); 49118: 46c0 movew %d0,%sr } 4911a: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 49120: 4e5e unlk %fp 49122: 4e75 rts 000548fc <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 548fc: 4e56 ffe4 linkw %fp,#-28 54900: 202e 000c movel %fp@(12),%d0 54904: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 54908: 266e 0008 moveal %fp@(8),%a3 5490c: 246e 0010 moveal %fp@(16),%a2 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 54910: 4a80 tstl %d0 54912: 6770 beqs 54984 <_Watchdog_Adjust_to_chain+0x88> return; } _ISR_Disable( level ); 54914: 307c 0700 moveaw #1792,%a0 54918: 2208 movel %a0,%d1 5491a: 40c2 movew %sr,%d2 5491c: 8282 orl %d2,%d1 5491e: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 54920: 260b movel %a3,%d3 54922: 280a movel %a2,%d4 while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 54924: 2a08 movel %a0,%d5 54926: 5883 addql #4,%d3 54928: 5884 addql #4,%d4 5492a: 6004 bras 54930 <_Watchdog_Adjust_to_chain+0x34> <== ALWAYS TAKEN } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5492c: 4a80 tstl %d0 5492e: 6752 beqs 54982 <_Watchdog_Adjust_to_chain+0x86> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 54930: 2253 moveal %a3@,%a1 break; } if ( _Chain_Is_empty( header ) ) { 54932: b689 cmpl %a1,%d3 54934: 674c beqs 54982 <_Watchdog_Adjust_to_chain+0x86> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 54936: 2229 0010 movel %a1@(16),%d1 5493a: 2049 moveal %a1,%a0 5493c: b280 cmpl %d0,%d1 5493e: 6308 blss 54948 <_Watchdog_Adjust_to_chain+0x4c> first->delta_interval -= units; 54940: 9280 subl %d0,%d1 54942: 2341 0010 movel %d1,%a1@(16) break; 54946: 603a bras 54982 <_Watchdog_Adjust_to_chain+0x86> <== ALWAYS TAKEN /* * 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; 54948: 9081 subl %d1,%d0 first->delta_interval = 0; 5494a: 42a9 0010 clrl %a1@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5494e: 2250 moveal %a0@,%a1 previous = the_node->previous; 54950: 2868 0004 moveal %a0@(4),%a4 next->previous = previous; previous->next = next; 54954: 2889 movel %a1,%a4@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 54956: 234c 0004 movel %a4,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5495a: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 5495c: 226a 0008 moveal %a2@(8),%a1 the_chain->last = the_node; 54960: 2548 0008 movel %a0,%a2@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 54964: 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; 54968: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5496a: 2205 movel %d5,%d1 5496c: 46c2 movew %d2,%sr 5496e: 8282 orl %d2,%d1 54970: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 54972: 2213 movel %a3@,%d1 54974: 2041 moveal %d1,%a0 if ( _Chain_Is_empty( header ) ) 54976: b681 cmpl %d1,%d3 54978: 67b2 beqs 5492c <_Watchdog_Adjust_to_chain+0x30> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5497a: 4aa8 0010 tstl %a0@(16) 5497e: 67ce beqs 5494e <_Watchdog_Adjust_to_chain+0x52> 54980: 60aa bras 5492c <_Watchdog_Adjust_to_chain+0x30> <== ALWAYS TAKEN break; } } _ISR_Enable( level ); 54982: 46c2 movew %d2,%sr } 54984: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 54988: 4e5e unlk %fp 5498a: 4e75 rts 00047b78 <_Watchdog_Insert>: Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 47b78: 327c 0700 moveaw #1792,%a1 47b7c: 2009 movel %a1,%d0 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 47b7e: 4e56 ffec linkw %fp,#-20 47b82: 206e 000c moveal %fp@(12),%a0 47b86: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47b8a: 266e 0008 moveal %fp@(8),%a3 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 47b8e: 2439 0005 bace movel 5bace <_ISR_Nest_level>,%d2 _ISR_Disable( level ); 47b94: 40c1 movew %sr,%d1 47b96: 8081 orl %d1,%d0 47b98: 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 ) { 47b9a: 4aa8 0008 tstl %a0@(8) 47b9e: 6706 beqs 47ba6 <_Watchdog_Insert+0x2e> _ISR_Enable( level ); 47ba0: 46c1 movew %d1,%sr return; 47ba2: 6000 009a braw 47c3e <_Watchdog_Insert+0xc6> <== ALWAYS TAKEN } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 47ba6: 2039 0005 bb70 movel 5bb70 <_Watchdog_Sync_count>,%d0 47bac: 5280 addql #1,%d0 * 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 ); 47bae: 2449 moveal %a1,%a2 _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 47bb0: 23c0 0005 bb70 movel %d0,5bb70 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 47bb6: 7001 moveq #1,%d0 47bb8: 2140 0008 movel %d0,%a0@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 47bbc: 2028 000c movel %a0@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 47bc0: 2253 moveal %a3@,%a1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 47bc2: 4a80 tstl %d0 47bc4: 673c beqs 47c02 <_Watchdog_Insert+0x8a> 47bc6: 4a91 tstl %a1@ 47bc8: 6738 beqs 47c02 <_Watchdog_Insert+0x8a> break; if ( delta_interval < after->delta_interval ) { 47bca: 2629 0010 movel %a1@(16),%d3 47bce: b680 cmpl %d0,%d3 47bd0: 6308 blss 47bda <_Watchdog_Insert+0x62> after->delta_interval -= delta_interval; 47bd2: 9680 subl %d0,%d3 47bd4: 2343 0010 movel %d3,%a1@(16) break; 47bd8: 6028 bras 47c02 <_Watchdog_Insert+0x8a> <== ALWAYS TAKEN * 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 ); 47bda: 280a movel %a2,%d4 47bdc: 46c1 movew %d1,%sr 47bde: 8881 orl %d1,%d4 47be0: 46c4 movew %d4,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 47be2: 9083 subl %d3,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 47be4: 7601 moveq #1,%d3 47be6: b6a8 0008 cmpl %a0@(8),%d3 47bea: 663c bnes 47c28 <_Watchdog_Insert+0xb0> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 47bec: 2639 0005 baea movel 5baea <_Watchdog_Sync_level>,%d3 47bf2: b483 cmpl %d3,%d2 47bf4: 6408 bccs 47bfe <_Watchdog_Insert+0x86> _Watchdog_Sync_level = insert_isr_nest_level; 47bf6: 23c2 0005 baea movel %d2,5baea <_Watchdog_Sync_level> goto restart; 47bfc: 60be bras 47bbc <_Watchdog_Insert+0x44> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 47bfe: 2251 moveal %a1@,%a1 } } 47c00: 60c0 bras 47bc2 <_Watchdog_Insert+0x4a> <== ALWAYS TAKEN _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 47c02: 2269 0004 moveal %a1@(4),%a1 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 47c06: 2639 0005 bb74 movel 5bb74 <_Watchdog_Ticks_since_boot>,%d3 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 47c0c: 2451 moveal %a1@,%a2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 47c0e: 2149 0004 movel %a1,%a0@(4) before_node = after_node->next; after_node->next = the_node; 47c12: 2288 movel %a0,%a1@ } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 47c14: 2140 0010 movel %d0,%a0@(16) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 47c18: 7002 moveq #2,%d0 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 47c1a: 2143 0014 movel %d3,%a0@(20) the_node->next = before_node; before_node->previous = the_node; 47c1e: 2548 0004 movel %a0,%a2@(4) 47c22: 2140 0008 movel %d0,%a0@(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; 47c26: 208a movel %a2,%a0@ exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 47c28: 23c2 0005 baea movel %d2,5baea <_Watchdog_Sync_level> _Watchdog_Sync_count--; 47c2e: 2039 0005 bb70 movel 5bb70 <_Watchdog_Sync_count>,%d0 47c34: 5380 subql #1,%d0 47c36: 23c0 0005 bb70 movel %d0,5bb70 <_Watchdog_Sync_count> _ISR_Enable( level ); 47c3c: 46c1 movew %d1,%sr } 47c3e: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 47c42: 4e5e unlk %fp 47c44: 4e75 rts ... 00047c94 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 47c94: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 47c9a: 4e56 0000 linkw %fp,#0 47c9e: 206e 0008 moveal %fp@(8),%a0 47ca2: 2f0a movel %a2,%sp@- 47ca4: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 47ca6: 40c1 movew %sr,%d1 47ca8: 8081 orl %d1,%d0 47caa: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 47cac: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 47cb0: 7401 moveq #1,%d2 47cb2: b480 cmpl %d0,%d2 47cb4: 670c beqs 47cc2 <_Watchdog_Remove+0x2e> 47cb6: 6244 bhis 47cfc <_Watchdog_Remove+0x68> 47cb8: 143c 0003 moveb #3,%d2 47cbc: b480 cmpl %d0,%d2 47cbe: 653c bcss 47cfc <_Watchdog_Remove+0x68> <== ALWAYS TAKEN 47cc0: 6006 bras 47cc8 <_Watchdog_Remove+0x34> <== ALWAYS TAKEN /* * 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; 47cc2: 42a8 0008 clrl %a0@(8) break; 47cc6: 6034 bras 47cfc <_Watchdog_Remove+0x68> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 47cc8: 2250 moveal %a0@,%a1 case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 47cca: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 47cce: 4a91 tstl %a1@ 47cd0: 6708 beqs 47cda <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 47cd2: 2428 0010 movel %a0@(16),%d2 47cd6: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 47cda: 2279 0005 bb70 moveal 5bb70 <_Watchdog_Sync_count>,%a1 47ce0: 4a89 tstl %a1 47ce2: 670c beqs 47cf0 <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 47ce4: 2279 0005 bace moveal 5bace <_ISR_Nest_level>,%a1 47cea: 23c9 0005 baea movel %a1,5baea <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47cf0: 2250 moveal %a0@,%a1 previous = the_node->previous; 47cf2: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 47cf6: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47cf8: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 47cfc: 2279 0005 bb74 moveal 5bb74 <_Watchdog_Ticks_since_boot>,%a1 47d02: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 47d06: 46c1 movew %d1,%sr return( previous_state ); } 47d08: 241f movel %sp@+,%d2 47d0a: 245f moveal %sp@+,%a2 47d0c: 4e5e unlk %fp 47d0e: 4e75 rts 00048ccc <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 48ccc: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 48cd2: 4e56 ffec linkw %fp,#-20 48cd6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 48cda: 242e 0008 movel %fp@(8),%d2 48cde: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 48ce2: 40c3 movew %sr,%d3 48ce4: 8083 orl %d3,%d0 48ce6: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 48ce8: 2f0b movel %a3,%sp@- 48cea: 49f9 0004 3640 lea 43640 ,%a4 48cf0: 2f02 movel %d2,%sp@- 48cf2: 4879 0005 af40 pea 5af40 48cf8: 4e94 jsr %a4@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 48cfa: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 48cfc: 4fef 000c lea %sp@(12),%sp 48d00: b7ca cmpal %a2,%a3 48d02: 6726 beqs 48d2a <_Watchdog_Report_chain+0x5e> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 48d04: 49f9 0004 8d40 lea 48d40 <_Watchdog_Report>,%a4 48d0a: 2f0a movel %a2,%sp@- 48d0c: 42a7 clrl %sp@- 48d0e: 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 ) 48d10: 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 ; 48d12: 508f addql #8,%sp 48d14: b7ca cmpal %a2,%a3 48d16: 66f2 bnes 48d0a <_Watchdog_Report_chain+0x3e> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 48d18: 2f02 movel %d2,%sp@- 48d1a: 4879 0005 af57 pea 5af57 48d20: 4eb9 0004 3640 jsr 43640 48d26: 508f addql #8,%sp 48d28: 600a bras 48d34 <_Watchdog_Report_chain+0x68> <== ALWAYS TAKEN } else { printk( "Chain is empty\n" ); 48d2a: 4879 0005 af66 pea 5af66 48d30: 4e94 jsr %a4@ 48d32: 588f addql #4,%sp } _ISR_Enable( level ); 48d34: 46c3 movew %d3,%sr } 48d36: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 48d3c: 4e5e unlk %fp 48d3e: 4e75 rts 000582d0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 582d0: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 582d2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 582d6: 4e5e unlk %fp <== NOT EXECUTED 582d8: 4e75 rts <== NOT EXECUTED ... 00042828 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 42828: 4e56 0000 linkw %fp,#0 4282c: 4eb9 0005 8924 jsr 58924 <_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(); 42832: 4eb9 0004 27c4 jsr 427c4 rtems_shutdown_executive(status); 42838: 2f2e 0008 movel %fp@(8),%sp@- 4283c: 4eb9 0004 5558 jsr 45558 42842: 588f addql #4,%sp 42844: 60fe bras 42844 <_exit+0x1c> <== ALWAYS TAKEN ... 000702e6 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 702e6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 702ea: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 702ee: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 702f2: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 702f8: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 702fc: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 70300: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 70302: 4ef9 0007 0178 jmp 70178 <== NOT EXECUTED 0005829e <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 5829e: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 582a0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 582a4: 4e5e unlk %fp <== NOT EXECUTED 582a6: 4e75 rts 0004903c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 4903c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 49040: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 49042: 4ef9 0004 8fe0 jmp 48fe0 <== NOT EXECUTED 000582c6 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 582c6: 4280 clrl %d0 <== NOT EXECUTED #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 582c8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 582cc: 4e5e unlk %fp <== NOT EXECUTED 582ce: 4e75 rts 00061522 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 61522: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 61526: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 6152a: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 61530: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 61534: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 61536: 4ef9 0006 1338 jmp 61338 <== NOT EXECUTED 0006171e <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 6171e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 61722: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 61726: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 6172c: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 61730: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 61732: 4ef9 0006 1658 jmp 61658 <== NOT EXECUTED 000584dc <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 584dc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 584e0: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 584e4: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 584ea: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 584ee: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 584f0: 4ef9 0005 851c jmp 5851c <== NOT EXECUTED ... 0008be60 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8be60: 4e56 ffa4 linkw %fp,#-92 <== NOT EXECUTED 8be64: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 8be68: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 8be6c: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 8be70: 2f0a movel %a2,%sp@- <== NOT EXECUTED 8be72: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8be78: 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 ); 8be7a: 2600 movel %d0,%d3 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8be7c: 664a bnes 8bec8 <_rename_r+0x68> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 8be7e: 742f moveq #47,%d2 <== NOT EXECUTED 8be80: 1012 moveb %a2@,%d0 <== NOT EXECUTED 8be82: 1200 moveb %d0,%d1 <== NOT EXECUTED 8be84: 49c1 extbl %d1 <== NOT EXECUTED 8be86: b481 cmpl %d1,%d2 <== NOT EXECUTED 8be88: 670c beqs 8be96 <_rename_r+0x36> <== NOT EXECUTED 8be8a: 143c 005c moveb #92,%d2 <== NOT EXECUTED 8be8e: b481 cmpl %d1,%d2 <== NOT EXECUTED 8be90: 6704 beqs 8be96 <_rename_r+0x36> <== NOT EXECUTED 8be92: 4a00 tstb %d0 <== NOT EXECUTED 8be94: 6612 bnes 8bea8 <_rename_r+0x48> <== NOT EXECUTED 8be96: 4878 0014 pea 14 <== NOT EXECUTED 8be9a: 2079 0009 5d3c moveal 95d3c ,%a0 <== NOT EXECUTED 8bea0: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 8bea4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 8bea6: 600e bras 8beb6 <_rename_r+0x56> <== NOT EXECUTED 8bea8: 4878 0014 pea 14 <== NOT EXECUTED 8beac: 2039 0009 5d3c movel 95d3c ,%d0 <== NOT EXECUTED 8beb2: 5880 addql #4,%d0 <== NOT EXECUTED 8beb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8beb6: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8beba: 4202 clrb %d2 <== NOT EXECUTED 8bebc: 4eb9 0007 7ebc jsr 77ebc <== NOT EXECUTED 8bec2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8bec6: 6024 bras 8beec <_rename_r+0x8c> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 8bec8: 42a7 clrl %sp@- <== NOT EXECUTED 8beca: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8bece: 4878 0002 pea 2 <== NOT EXECUTED 8bed2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8bed4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 8bed6: 4eb9 0004 6566 jsr 46566 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 8bedc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 8bee0: 4a80 tstl %d0 <== NOT EXECUTED 8bee2: 6706 beqs 8beea <_rename_r+0x8a> <== NOT EXECUTED 8bee4: 76ff moveq #-1,%d3 <== NOT EXECUTED 8bee6: 6000 0286 braw 8c16e <_rename_r+0x30e> <== NOT EXECUTED 8beea: 7401 moveq #1,%d2 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8beec: 4878 0014 pea 14 <== NOT EXECUTED 8bef0: 2a0e movel %fp,%d5 <== NOT EXECUTED 8bef2: 0685 ffff ffd4 addil #-44,%d5 <== NOT EXECUTED 8bef8: 280e movel %fp,%d4 <== NOT EXECUTED 8befa: 0684 ffff ffe8 addil #-24,%d4 <== NOT EXECUTED 8bf00: 49f9 0007 7ebc lea 77ebc ,%a4 <== NOT EXECUTED name = old + old_parent_pathlen; 8bf06: d68a addl %a2,%d3 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8bf08: 45f9 0007 aee8 lea 7aee8 ,%a2 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8bf0e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 8bf10: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8bf12: 4e94 jsr %a4@ <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8bf14: 2f03 movel %d3,%sp@- <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 8bf16: 2d43 fffc movel %d3,%fp@(-4) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8bf1a: 4e92 jsr %a2@ <== NOT EXECUTED 8bf1c: 2e80 movel %d0,%sp@ <== NOT EXECUTED 8bf1e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 8bf20: 4eb9 0004 6418 jsr 46418 <== NOT EXECUTED 8bf26: d680 addl %d0,%d3 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8bf28: 2f03 movel %d3,%sp@- <== NOT EXECUTED * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8bf2a: 2d43 fffc movel %d3,%fp@(-4) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8bf2e: 4e92 jsr %a2@ <== NOT EXECUTED 8bf30: 4297 clrl %sp@ <== NOT EXECUTED 8bf32: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8bf34: 42a7 clrl %sp@- <== NOT EXECUTED 8bf36: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8bf38: 2f03 movel %d3,%sp@- <== NOT EXECUTED 8bf3a: 4eb9 0004 6496 jsr 46496 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 8bf40: 4fef 0028 lea %sp@(40),%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 ), 8bf44: 2800 movel %d0,%d4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 8bf46: 672a beqs 8bf72 <_rename_r+0x112> <== NOT EXECUTED if ( free_old_parentloc ) 8bf48: 4a02 tstb %d2 <== NOT EXECUTED 8bf4a: 6716 beqs 8bf62 <_rename_r+0x102> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8bf4c: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8bf50: 4a88 tstl %a0 <== NOT EXECUTED 8bf52: 670e beqs 8bf62 <_rename_r+0x102> <== NOT EXECUTED 8bf54: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8bf58: 4a88 tstl %a0 <== NOT EXECUTED 8bf5a: 6706 beqs 8bf62 <_rename_r+0x102> <== NOT EXECUTED 8bf5c: 2f05 movel %d5,%sp@- <== NOT EXECUTED 8bf5e: 4e90 jsr %a0@ <== NOT EXECUTED 8bf60: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8bf62: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 8bf68: 76ff moveq #-1,%d3 <== NOT EXECUTED 8bf6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 8bf6c: 2084 movel %d4,%a0@ <== NOT EXECUTED 8bf6e: 6000 01fe braw 8c16e <_rename_r+0x30e> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 8bf72: 762f moveq #47,%d3 <== NOT EXECUTED 8bf74: 1013 moveb %a3@,%d0 <== NOT EXECUTED 8bf76: 1200 moveb %d0,%d1 <== NOT EXECUTED 8bf78: 49c1 extbl %d1 <== NOT EXECUTED 8bf7a: b681 cmpl %d1,%d3 <== NOT EXECUTED 8bf7c: 670c beqs 8bf8a <_rename_r+0x12a> <== NOT EXECUTED 8bf7e: 163c 005c moveb #92,%d3 <== NOT EXECUTED 8bf82: b681 cmpl %d1,%d3 <== NOT EXECUTED 8bf84: 6704 beqs 8bf8a <_rename_r+0x12a> <== NOT EXECUTED 8bf86: 4a00 tstb %d0 <== NOT EXECUTED 8bf88: 6622 bnes 8bfac <_rename_r+0x14c> <== NOT EXECUTED 8bf8a: 4878 0014 pea 14 <== NOT EXECUTED 8bf8e: 2079 0009 5d3c moveal 95d3c ,%a0 <== NOT EXECUTED 8bf94: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 8bf98: 2f08 movel %a0,%sp@- <== NOT EXECUTED 8bf9a: 486e ffc0 pea %fp@(-64) <== NOT EXECUTED 8bf9e: 4eb9 0007 7ebc jsr 77ebc <== NOT EXECUTED 8bfa4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8bfa8: 7001 moveq #1,%d0 <== NOT EXECUTED 8bfaa: 601a bras 8bfc6 <_rename_r+0x166> <== NOT EXECUTED 8bfac: 4878 0014 pea 14 <== NOT EXECUTED 8bfb0: 2039 0009 5d3c movel 95d3c ,%d0 <== NOT EXECUTED 8bfb6: 5880 addql #4,%d0 <== NOT EXECUTED 8bfb8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8bfba: 486e ffc0 pea %fp@(-64) <== NOT EXECUTED 8bfbe: 4e94 jsr %a4@ <== NOT EXECUTED 8bfc0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8bfc4: 4280 clrl %d0 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 8bfc6: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 8bfca: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 8bfce: 4a88 tstl %a0 <== NOT EXECUTED 8bfd0: 6700 00f6 beqw 8c0c8 <_rename_r+0x268> <== 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 ); 8bfd4: 486e fffc pea %fp@(-4) <== NOT EXECUTED 8bfd8: 280e movel %fp,%d4 <== NOT EXECUTED 8bfda: 0684 ffff ffc0 addil #-64,%d4 <== NOT EXECUTED 8bfe0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8bfe2: 4873 0800 pea %a3@(00000000,%d0:l) <== NOT EXECUTED 8bfe6: 4e90 jsr %a0@ <== NOT EXECUTED if ( result != 0 ) { 8bfe8: 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 ); 8bfec: 2440 moveal %d0,%a2 <== NOT EXECUTED if ( result != 0 ) { 8bfee: 4a80 tstl %d0 <== NOT EXECUTED 8bff0: 675a beqs 8c04c <_rename_r+0x1ec> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8bff2: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 8bff6: 4a88 tstl %a0 <== NOT EXECUTED 8bff8: 670e beqs 8c008 <_rename_r+0x1a8> <== NOT EXECUTED 8bffa: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8bffe: 4a88 tstl %a0 <== NOT EXECUTED 8c000: 6706 beqs 8c008 <_rename_r+0x1a8> <== NOT EXECUTED 8c002: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8c004: 4e90 jsr %a0@ <== NOT EXECUTED 8c006: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8c008: 4a02 tstb %d2 <== NOT EXECUTED 8c00a: 6718 beqs 8c024 <_rename_r+0x1c4> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8c00c: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8c010: 4a88 tstl %a0 <== NOT EXECUTED 8c012: 6710 beqs 8c024 <_rename_r+0x1c4> <== NOT EXECUTED 8c014: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c018: 4a88 tstl %a0 <== NOT EXECUTED 8c01a: 6708 beqs 8c024 <_rename_r+0x1c4> <== NOT EXECUTED 8c01c: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8c020: 4e90 jsr %a0@ <== NOT EXECUTED 8c022: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8c024: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8c028: 4a88 tstl %a0 <== NOT EXECUTED 8c02a: 6710 beqs 8c03c <_rename_r+0x1dc> <== NOT EXECUTED 8c02c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c030: 4a88 tstl %a0 <== NOT EXECUTED 8c032: 6708 beqs 8c03c <_rename_r+0x1dc> <== NOT EXECUTED 8c034: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8c038: 4e90 jsr %a0@ <== NOT EXECUTED 8c03a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8c03c: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 8c042: 76ff moveq #-1,%d3 <== NOT EXECUTED 8c044: 2040 moveal %d0,%a0 <== NOT EXECUTED 8c046: 208a movel %a2,%a0@ <== NOT EXECUTED 8c048: 6000 0124 braw 8c16e <_rename_r+0x30e> <== NOT EXECUTED 8c04c: 206e ffcc moveal %fp@(-52),%a0 <== 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 ) { 8c050: 202e ffd0 movel %fp@(-48),%d0 <== NOT EXECUTED 8c054: b0ae ffe4 cmpl %fp@(-28),%d0 <== NOT EXECUTED 8c058: 6758 beqs 8c0b2 <_rename_r+0x252> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8c05a: 4a88 tstl %a0 <== NOT EXECUTED 8c05c: 670e beqs 8c06c <_rename_r+0x20c> <== NOT EXECUTED 8c05e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c062: 4a88 tstl %a0 <== NOT EXECUTED 8c064: 6706 beqs 8c06c <_rename_r+0x20c> <== NOT EXECUTED 8c066: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8c068: 4e90 jsr %a0@ <== NOT EXECUTED 8c06a: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8c06c: 4a02 tstb %d2 <== NOT EXECUTED 8c06e: 6718 beqs 8c088 <_rename_r+0x228> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8c070: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8c074: 4a88 tstl %a0 <== NOT EXECUTED 8c076: 6710 beqs 8c088 <_rename_r+0x228> <== NOT EXECUTED 8c078: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c07c: 4a88 tstl %a0 <== NOT EXECUTED 8c07e: 6708 beqs 8c088 <_rename_r+0x228> <== NOT EXECUTED 8c080: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8c084: 4e90 jsr %a0@ <== NOT EXECUTED 8c086: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8c088: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8c08c: 4a88 tstl %a0 <== NOT EXECUTED 8c08e: 6710 beqs 8c0a0 <_rename_r+0x240> <== NOT EXECUTED 8c090: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c094: 4a88 tstl %a0 <== NOT EXECUTED 8c096: 6708 beqs 8c0a0 <_rename_r+0x240> <== NOT EXECUTED 8c098: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8c09c: 4e90 jsr %a0@ <== NOT EXECUTED 8c09e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 8c0a0: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 8c0a6: 76ff moveq #-1,%d3 <== NOT EXECUTED 8c0a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 8c0aa: 7012 moveq #18,%d0 <== NOT EXECUTED 8c0ac: 2080 movel %d0,%a0@ <== NOT EXECUTED 8c0ae: 6000 00be braw 8c16e <_rename_r+0x30e> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 8c0b2: 2268 0040 moveal %a0@(64),%a1 <== NOT EXECUTED 8c0b6: 4a89 tstl %a1 <== NOT EXECUTED 8c0b8: 6654 bnes 8c10e <_rename_r+0x2ae> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8c0ba: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c0be: 4a88 tstl %a0 <== NOT EXECUTED 8c0c0: 6706 beqs 8c0c8 <_rename_r+0x268> <== NOT EXECUTED 8c0c2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8c0c4: 4e90 jsr %a0@ <== NOT EXECUTED 8c0c6: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8c0c8: 4a02 tstb %d2 <== NOT EXECUTED 8c0ca: 6718 beqs 8c0e4 <_rename_r+0x284> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8c0cc: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8c0d0: 4a88 tstl %a0 <== NOT EXECUTED 8c0d2: 6710 beqs 8c0e4 <_rename_r+0x284> <== NOT EXECUTED 8c0d4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c0d8: 4a88 tstl %a0 <== NOT EXECUTED 8c0da: 6708 beqs 8c0e4 <_rename_r+0x284> <== NOT EXECUTED 8c0dc: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8c0e0: 4e90 jsr %a0@ <== NOT EXECUTED 8c0e2: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8c0e4: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8c0e8: 4a88 tstl %a0 <== NOT EXECUTED 8c0ea: 6710 beqs 8c0fc <_rename_r+0x29c> <== NOT EXECUTED 8c0ec: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c0f0: 4a88 tstl %a0 <== NOT EXECUTED 8c0f2: 6708 beqs 8c0fc <_rename_r+0x29c> <== NOT EXECUTED 8c0f4: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8c0f8: 4e90 jsr %a0@ <== NOT EXECUTED 8c0fa: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8c0fc: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 8c102: 76ff moveq #-1,%d3 <== NOT EXECUTED 8c104: 2040 moveal %d0,%a0 <== NOT EXECUTED 8c106: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 8c10c: 6060 bras 8c16e <_rename_r+0x30e> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 8c10e: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 8c112: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8c114: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8c118: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8c11c: 4e91 jsr %a1@ <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8c11e: 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 ); 8c122: 2600 movel %d0,%d3 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8c124: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 8c128: 4a88 tstl %a0 <== NOT EXECUTED 8c12a: 670e beqs 8c13a <_rename_r+0x2da> <== NOT EXECUTED 8c12c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c130: 4a88 tstl %a0 <== NOT EXECUTED 8c132: 6706 beqs 8c13a <_rename_r+0x2da> <== NOT EXECUTED 8c134: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8c136: 4e90 jsr %a0@ <== NOT EXECUTED 8c138: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8c13a: 4a02 tstb %d2 <== NOT EXECUTED 8c13c: 6718 beqs 8c156 <_rename_r+0x2f6> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8c13e: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8c142: 4a88 tstl %a0 <== NOT EXECUTED 8c144: 6710 beqs 8c156 <_rename_r+0x2f6> <== NOT EXECUTED 8c146: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c14a: 4a88 tstl %a0 <== NOT EXECUTED 8c14c: 6708 beqs 8c156 <_rename_r+0x2f6> <== NOT EXECUTED 8c14e: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8c152: 4e90 jsr %a0@ <== NOT EXECUTED 8c154: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8c156: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8c15a: 4a88 tstl %a0 <== NOT EXECUTED 8c15c: 6710 beqs 8c16e <_rename_r+0x30e> <== NOT EXECUTED 8c15e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8c162: 4a88 tstl %a0 <== NOT EXECUTED 8c164: 6708 beqs 8c16e <_rename_r+0x30e> <== NOT EXECUTED 8c166: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8c16a: 4e90 jsr %a0@ <== NOT EXECUTED 8c16c: 588f addql #4,%sp <== NOT EXECUTED return result; } 8c16e: 2003 movel %d3,%d0 <== NOT EXECUTED 8c170: 4cee 1c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a4 <== NOT EXECUTED 8c176: 4e5e unlk %fp <== NOT EXECUTED 8c178: 4e75 rts <== NOT EXECUTED ... 00047ac8 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 47ac8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 47acc: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 47ad0: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 47ad6: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 47ada: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 47adc: 4ef9 0004 7a00 jmp 47a00 <== NOT EXECUTED ... 0004b986 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4b986: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4b98a: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4b990: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4b992: 4ef9 0004 b79c jmp 4b79c <== NOT EXECUTED 00060304 : int access( const char *path, int amode ) { 60304: 4e56 ffb8 linkw %fp,#-72 60308: 2f02 movel %d2,%sp@- struct stat statbuf; if ( stat(path, &statbuf) ) 6030a: 486e ffba pea %fp@(-70) 6030e: 2f2e 0008 movel %fp@(8),%sp@- int access( const char *path, int amode ) { 60312: 242e 000c movel %fp@(12),%d2 struct stat statbuf; if ( stat(path, &statbuf) ) 60316: 4eb9 0004 7a00 jsr 47a00 6031c: 508f addql #8,%sp 6031e: 4a80 tstl %d0 60320: 6630 bnes 60352 return -1; if ( amode & R_OK ) { 60322: 44c2 movew %d2,%ccr 60324: 660c bnes 60332 if (!( statbuf.st_mode & S_IREAD )) 60326: 202e ffc6 movel %fp@(-58),%d0 6032a: 0280 0000 0100 andil #256,%d0 60330: 6720 beqs 60352 return -1; } if ( amode & W_OK ) { 60332: 0802 0001 btst #1,%d2 60336: 670c beqs 60344 if ( !( statbuf.st_mode & S_IWRITE ) ) 60338: 202e ffc6 movel %fp@(-58),%d0 6033c: 0280 0000 0080 andil #128,%d0 60342: 670e beqs 60352 return -1; } if ( amode & X_OK ) { 60344: 0802 0000 btst #0,%d2 60348: 670c beqs 60356 if ( !( statbuf.st_mode & S_IEXEC ) ) 6034a: 7040 moveq #64,%d0 6034c: c0ae ffc6 andl %fp@(-58),%d0 60350: 6604 bnes 60356 60352: 70ff moveq #-1,%d0 60354: 6002 bras 60358 <== ALWAYS TAKEN 60356: 4280 clrl %d0 return -1; } return 0; } 60358: 242e ffb4 movel %fp@(-76),%d2 6035c: 4e5e unlk %fp 6035e: 4e75 rts 00048da0 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48da0: 4e56 0000 linkw %fp,#0 length = nelem * elsize; 48da4: 41ee 0008 lea %fp@(8),%a0 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48da8: 52b9 0005 b8f8 addql #1,5b8f8 48dae: 2f03 movel %d3,%sp@- length = nelem * elsize; 48db0: 262e 000c movel %fp@(12),%d3 48db4: 4c10 3800 mulsl %a0@,%d3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48db8: 2f02 movel %d2,%sp@- length = nelem * elsize; cptr = malloc( length ); 48dba: 2f03 movel %d3,%sp@- 48dbc: 4eb9 0004 935c jsr 4935c if ( cptr ) 48dc2: 588f addql #4,%sp size_t length; MSBUMP(calloc_calls, 1); length = nelem * elsize; cptr = malloc( length ); 48dc4: 2400 movel %d0,%d2 if ( cptr ) 48dc6: 6710 beqs 48dd8 <== ALWAYS TAKEN memset( cptr, '\0', length ); 48dc8: 2f03 movel %d3,%sp@- 48dca: 42a7 clrl %sp@- 48dcc: 2f00 movel %d0,%sp@- 48dce: 4eb9 0004 c270 jsr 4c270 48dd4: 4fef 000c lea %sp@(12),%sp MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ return cptr; } 48dd8: 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 */ 48dda: 53b9 0005 b8e8 subql #1,5b8e8 return cptr; } 48de0: 242e fff8 movel %fp@(-8),%d2 48de4: 262e fffc movel %fp@(-4),%d3 48de8: 4e5e unlk %fp 48dea: 4e75 rts 000604dc : #include int chdir( const char *pathname ) { 604dc: 4e56 ffec linkw %fp,#-20 604e0: 2f03 movel %d3,%sp@- 604e2: 262e 0008 movel %fp@(8),%d3 604e6: 2f02 movel %d2,%sp@- /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 604e8: 240e movel %fp,%d2 604ea: 0682 ffff ffec addil #-20,%d2 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 604f0: 2f03 movel %d3,%sp@- 604f2: 4eb9 0007 aee8 jsr 7aee8 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 604f8: 7201 moveq #1,%d1 604fa: 2e81 movel %d1,%sp@ 604fc: 2f02 movel %d2,%sp@- 604fe: 4878 0001 pea 1 60502: 2f00 movel %d0,%sp@- 60504: 2f03 movel %d3,%sp@- 60506: 4eb9 0004 6566 jsr 46566 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 6050c: 4fef 0014 lea %sp@(20),%sp 60510: 4a80 tstl %d0 60512: 6706 beqs 6051a 60514: 72ff moveq #-1,%d1 60516: 6000 009c braw 605b4 <== ALWAYS TAKEN /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 6051a: 226e fff8 moveal %fp@(-8),%a1 6051e: 2069 0010 moveal %a1@(16),%a0 60522: 4a88 tstl %a0 60524: 6620 bnes 60546 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 60526: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 6052a: 4a88 tstl %a0 <== NOT EXECUTED 6052c: 6706 beqs 60534 <== NOT EXECUTED 6052e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60530: 4e90 jsr %a0@ <== NOT EXECUTED 60532: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 60534: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 6053a: 72ff moveq #-1,%d1 <== NOT EXECUTED 6053c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6053e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 60544: 606e bras 605b4 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 60546: 2f02 movel %d2,%sp@- 60548: 4e90 jsr %a0@ 6054a: 588f addql #4,%sp 6054c: 7201 moveq #1,%d1 6054e: b280 cmpl %d0,%d1 60550: 6726 beqs 60578 rtems_filesystem_freenode( &loc ); 60552: 206e fff8 moveal %fp@(-8),%a0 60556: 4a88 tstl %a0 60558: 670e beqs 60568 <== ALWAYS TAKEN 6055a: 2068 001c moveal %a0@(28),%a0 6055e: 4a88 tstl %a0 60560: 6706 beqs 60568 <== ALWAYS TAKEN 60562: 2f02 movel %d2,%sp@- 60564: 4e90 jsr %a0@ 60566: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 60568: 4eb9 0007 4e84 jsr 74e84 <__errno> 6056e: 72ff moveq #-1,%d1 60570: 2040 moveal %d0,%a0 60572: 7014 moveq #20,%d0 60574: 2080 movel %d0,%a0@ 60576: 603c bras 605b4 <== ALWAYS TAKEN } rtems_filesystem_freenode( &rtems_filesystem_current ); 60578: 2279 0009 5d3c moveal 95d3c ,%a1 6057e: 2069 0010 moveal %a1@(16),%a0 60582: 4a88 tstl %a0 60584: 6710 beqs 60596 <== ALWAYS TAKEN 60586: 2068 001c moveal %a0@(28),%a0 6058a: 4a88 tstl %a0 6058c: 6708 beqs 60596 <== ALWAYS TAKEN 6058e: 4869 0004 pea %a1@(4) 60592: 4e90 jsr %a0@ 60594: 588f addql #4,%sp rtems_filesystem_current = loc; 60596: 4878 0014 pea 14 6059a: 486e ffec pea %fp@(-20) 6059e: 2039 0009 5d3c movel 95d3c ,%d0 605a4: 5880 addql #4,%d0 605a6: 2f00 movel %d0,%sp@- 605a8: 4eb9 0007 7ebc jsr 77ebc return 0; 605ae: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 605b2: 4281 clrl %d1 return 0; } 605b4: 242e ffe4 movel %fp@(-28),%d2 605b8: 2001 movel %d1,%d0 605ba: 262e ffe8 movel %fp@(-24),%d3 605be: 4e5e unlk %fp 605c0: 4e75 rts ... 000460e4 : int chmod( const char *path, mode_t mode ) { 460e4: 4e56 ffec linkw %fp,#-20 460e8: 2f03 movel %d3,%sp@- 460ea: 262e 0008 movel %fp@(8),%d3 460ee: 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 ); 460f0: 240e movel %fp,%d2 460f2: 0682 ffff ffec addil #-20,%d2 460f8: 2f03 movel %d3,%sp@- 460fa: 4eb9 0007 aee8 jsr 7aee8 46100: 7201 moveq #1,%d1 46102: 2e81 movel %d1,%sp@ 46104: 2f02 movel %d2,%sp@- 46106: 42a7 clrl %sp@- 46108: 2f00 movel %d0,%sp@- 4610a: 2f03 movel %d3,%sp@- 4610c: 4eb9 0004 6566 jsr 46566 if ( status != 0 ) 46112: 4fef 0014 lea %sp@(20),%sp 46116: 4a80 tstl %d0 46118: 6706 beqs 46120 4611a: 76ff moveq #-1,%d3 4611c: 6000 0082 braw 461a0 <== ALWAYS TAKEN return -1; if ( !loc.handlers ){ 46120: 206e fff4 moveal %fp@(-12),%a0 46124: 4a88 tstl %a0 46126: 6626 bnes 4614e <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 46128: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4612c: 4a88 tstl %a0 <== NOT EXECUTED 4612e: 670e beqs 4613e <== NOT EXECUTED 46130: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 46134: 4a88 tstl %a0 <== NOT EXECUTED 46136: 6706 beqs 4613e <== NOT EXECUTED 46138: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4613a: 4e90 jsr %a0@ <== NOT EXECUTED 4613c: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4613e: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 46144: 76ff moveq #-1,%d3 <== NOT EXECUTED 46146: 2040 moveal %d0,%a0 <== NOT EXECUTED 46148: 7009 moveq #9,%d0 <== NOT EXECUTED 4614a: 2080 movel %d0,%a0@ <== NOT EXECUTED 4614c: 6052 bras 461a0 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 4614e: 2068 001c moveal %a0@(28),%a0 46152: 4a88 tstl %a0 46154: 6628 bnes 4617e <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 46156: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4615a: 4a88 tstl %a0 <== NOT EXECUTED 4615c: 670e beqs 4616c <== NOT EXECUTED 4615e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 46162: 4a88 tstl %a0 <== NOT EXECUTED 46164: 6706 beqs 4616c <== NOT EXECUTED 46166: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46168: 4e90 jsr %a0@ <== NOT EXECUTED 4616a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4616c: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 46172: 76ff moveq #-1,%d3 <== NOT EXECUTED 46174: 2040 moveal %d0,%a0 <== NOT EXECUTED 46176: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4617c: 6022 bras 461a0 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4617e: 2f2e 000c movel %fp@(12),%sp@- 46182: 2f02 movel %d2,%sp@- 46184: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 46186: 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 ); 4618a: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 4618c: 508f addql #8,%sp 4618e: 4a88 tstl %a0 46190: 670e beqs 461a0 <== ALWAYS TAKEN 46192: 2068 001c moveal %a0@(28),%a0 46196: 4a88 tstl %a0 46198: 6706 beqs 461a0 <== ALWAYS TAKEN 4619a: 2f02 movel %d2,%sp@- 4619c: 4e90 jsr %a0@ 4619e: 588f addql #4,%sp return result; } 461a0: 2003 movel %d3,%d0 461a2: 242e ffe4 movel %fp@(-28),%d2 461a6: 262e ffe8 movel %fp@(-24),%d3 461aa: 4e5e unlk %fp 461ac: 4e75 rts ... 000605c4 : int chown( const char *path, uid_t owner, gid_t group ) { 605c4: 4e56 ffdc linkw %fp,#-36 605c8: 48d7 003c moveml %d2-%d5,%sp@ 605cc: 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 ) ) 605d0: 240e movel %fp,%d2 605d2: 0682 ffff ffec addil #-20,%d2 605d8: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 605da: 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 ) ) 605de: 4eb9 0007 aee8 jsr 7aee8 605e4: 7201 moveq #1,%d1 605e6: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 605e8: 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 ) ) 605ec: 2f02 movel %d2,%sp@- 605ee: 42a7 clrl %sp@- 605f0: 2f00 movel %d0,%sp@- 605f2: 2f03 movel %d3,%sp@- 605f4: 4eb9 0004 6566 jsr 46566 605fa: 4fef 0014 lea %sp@(20),%sp 605fe: 4a80 tstl %d0 60600: 6704 beqs 60606 60602: 76ff moveq #-1,%d3 60604: 6054 bras 6065a <== ALWAYS TAKEN return -1; if ( !loc.ops->chown_h ) { 60606: 226e fff8 moveal %fp@(-8),%a1 6060a: 2069 0018 moveal %a1@(24),%a0 6060e: 4a88 tstl %a0 60610: 6620 bnes 60632 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 60612: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 60616: 4a88 tstl %a0 <== NOT EXECUTED 60618: 6706 beqs 60620 <== NOT EXECUTED 6061a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6061c: 4e90 jsr %a0@ <== NOT EXECUTED 6061e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 60620: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 60626: 76ff moveq #-1,%d3 <== NOT EXECUTED 60628: 2040 moveal %d0,%a0 <== NOT EXECUTED 6062a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 60630: 6028 bras 6065a <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 60632: 3f05 movew %d5,%sp@- 60634: 4267 clrw %sp@- 60636: 3f04 movew %d4,%sp@- 60638: 4267 clrw %sp@- 6063a: 2f02 movel %d2,%sp@- 6063c: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 6063e: 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 ); 60642: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 60644: 4fef 000c lea %sp@(12),%sp 60648: 4a88 tstl %a0 6064a: 670e beqs 6065a <== ALWAYS TAKEN 6064c: 2068 001c moveal %a0@(28),%a0 60650: 4a88 tstl %a0 60652: 6706 beqs 6065a <== ALWAYS TAKEN 60654: 2f02 movel %d2,%sp@- 60656: 4e90 jsr %a0@ 60658: 588f addql #4,%sp return result; } 6065a: 2003 movel %d3,%d0 6065c: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 60662: 4e5e unlk %fp 60664: 4e75 rts ... 00060668 : #include int chroot( const char *pathname ) { 60668: 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) { 6066c: 203c 0009 a6bc movel #632508,%d0 #include int chroot( const char *pathname ) { 60672: 2f0b movel %a3,%sp@- 60674: 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) { 60676: b0b9 0009 5d3c cmpl 95d3c ,%d0 6067c: 6628 bnes 606a6 <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 6067e: 4eb9 0006 1976 jsr 61976 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 60684: 41f9 0009 a6bc lea 9a6bc ,%a0 6068a: b1f9 0009 5d3c cmpal 95d3c ,%a0 60690: 6614 bnes 606a6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 60692: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 60698: 72ff moveq #-1,%d1 <== NOT EXECUTED 6069a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6069c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 606a2: 6000 0084 braw 60728 <== NOT EXECUTED } result = chdir(pathname); 606a6: 2f2e 0008 movel %fp@(8),%sp@- 606aa: 4eb9 0006 04dc jsr 604dc if (result) { 606b0: 588f addql #4,%sp 606b2: 4a80 tstl %d0 606b4: 6620 bnes 606d6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 606b6: 42a7 clrl %sp@- 606b8: 486e ffec pea %fp@(-20) 606bc: 42a7 clrl %sp@- 606be: 4878 0001 pea 1 606c2: 4879 0008 edc7 pea 8edc7 606c8: 4eb9 0004 6566 jsr 46566 606ce: 4fef 0014 lea %sp@(20),%sp 606d2: 4a80 tstl %d0 606d4: 6714 beqs 606ea <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 606d6: 45f9 0007 4e84 lea 74e84 <__errno>,%a2 <== NOT EXECUTED 606dc: 4e92 jsr %a2@ <== NOT EXECUTED 606de: 2640 moveal %d0,%a3 <== NOT EXECUTED 606e0: 4e92 jsr %a2@ <== NOT EXECUTED 606e2: 72ff moveq #-1,%d1 <== NOT EXECUTED 606e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 606e6: 2690 movel %a0@,%a3@ <== NOT EXECUTED 606e8: 603e bras 60728 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 606ea: 2279 0009 5d3c moveal 95d3c ,%a1 606f0: 2069 0024 moveal %a1@(36),%a0 606f4: 4a88 tstl %a0 606f6: 6710 beqs 60708 <== ALWAYS TAKEN 606f8: 2068 001c moveal %a0@(28),%a0 606fc: 4a88 tstl %a0 606fe: 6708 beqs 60708 <== ALWAYS TAKEN 60700: 4869 0018 pea %a1@(24) 60704: 4e90 jsr %a0@ 60706: 588f addql #4,%sp rtems_filesystem_root = loc; 60708: 4878 0014 pea 14 6070c: 486e ffec pea %fp@(-20) 60710: 2079 0009 5d3c moveal 95d3c ,%a0 60716: 41e8 0018 lea %a0@(24),%a0 6071a: 2f08 movel %a0,%sp@- 6071c: 4eb9 0007 7ebc jsr 77ebc return 0; 60722: 4fef 000c lea %sp@(12),%sp if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; 60726: 4281 clrl %d1 return 0; } 60728: 246e ffe4 moveal %fp@(-28),%a2 6072c: 2001 movel %d1,%d0 6072e: 266e ffe8 moveal %fp@(-24),%a3 60732: 4e5e unlk %fp 60734: 4e75 rts ... 00048dec : #include int close( int fd ) { 48dec: 4e56 0000 linkw %fp,#0 48df0: 202e 0008 movel %fp@(8),%d0 48df4: 2f0a movel %a2,%sp@- 48df6: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 48df8: b0b9 0005 a254 cmpl 5a254 ,%d0 48dfe: 6416 bccs 48e16 iop = rtems_libio_iop(fd); 48e00: 2479 0005 b8d8 moveal 5b8d8 ,%a2 48e06: ed88 lsll #6,%d0 48e08: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 48e0a: 202a 0014 movel %a2@(20),%d0 48e0e: 0280 0000 0100 andil #256,%d0 48e14: 6610 bnes 48e26 48e16: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 48e1c: 74ff moveq #-1,%d2 48e1e: 2040 moveal %d0,%a0 48e20: 7009 moveq #9,%d0 48e22: 2080 movel %d0,%a0@ 48e24: 603a bras 48e60 <== ALWAYS TAKEN rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 48e26: 206a 003c moveal %a2@(60),%a0 48e2a: 2068 0004 moveal %a0@(4),%a0 48e2e: 4a88 tstl %a0 48e30: 6604 bnes 48e36 <== NEVER TAKEN 48e32: 4282 clrl %d2 <== NOT EXECUTED 48e34: 6008 bras 48e3e <== NOT EXECUTED rc = (*iop->handlers->close_h)( iop ); 48e36: 2f0a movel %a2,%sp@- 48e38: 4e90 jsr %a0@ 48e3a: 588f addql #4,%sp 48e3c: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 48e3e: 206a 0024 moveal %a2@(36),%a0 48e42: 4a88 tstl %a0 48e44: 6710 beqs 48e56 <== ALWAYS TAKEN 48e46: 2068 001c moveal %a0@(28),%a0 48e4a: 4a88 tstl %a0 48e4c: 6708 beqs 48e56 48e4e: 486a 0018 pea %a2@(24) 48e52: 4e90 jsr %a0@ 48e54: 588f addql #4,%sp rtems_libio_free( iop ); 48e56: 2f0a movel %a2,%sp@- 48e58: 4eb9 0004 918e jsr 4918e return rc; 48e5e: 588f addql #4,%sp } 48e60: 2002 movel %d2,%d0 48e62: 242e fff8 movel %fp@(-8),%d2 48e66: 246e fffc moveal %fp@(-4),%a2 48e6a: 4e5e unlk %fp 48e6c: 4e75 rts 00048328 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 48328: 4e56 fff4 linkw %fp,#-12 4832c: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 48330: 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; 48334: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 48338: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4833c: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 48340: 2f29 000c movel %a1@(12),%sp@- 48344: 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; 48348: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 4834c: 4eb9 0004 8ef0 jsr 48ef0 np->major, np->minor, (void *) &args ); if ( status ) { 48352: 4fef 000c lea %sp@(12),%sp 48356: 4a80 tstl %d0 48358: 670a beqs 48364 <== NEVER TAKEN return rtems_deviceio_errno(status); 4835a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4835c: 4eb9 0004 8418 jsr 48418 <== NOT EXECUTED 48362: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 48364: 4e5e unlk %fp 48366: 4e75 rts 0004837a : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4837a: 4e56 ffe4 linkw %fp,#-28 4837e: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 48382: 246e 0014 moveal %fp@(20),%a2 48386: 282e 0008 movel %fp@(8),%d4 4838a: 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; 4838e: 2652 moveal %a2@,%a3 if (!device_name_table) 48390: 4a8b tstl %a3 48392: 670a beqs 4839e <== ALWAYS TAKEN 48394: 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) 48396: 4bf9 0004 af80 lea 4af80 ,%a5 4839c: 6058 bras 483f6 <== 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 ); 4839e: 4eb9 0004 9c78 jsr 49c78 <__errno> <== NOT EXECUTED 483a4: 740e moveq #14,%d2 <== NOT EXECUTED 483a6: 72ff moveq #-1,%d1 <== NOT EXECUTED 483a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 483aa: 2082 movel %d2,%a0@ <== NOT EXECUTED 483ac: 605e bras 4840c <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 483ae: 2853 moveal %a3@,%a4 483b0: 4a8c tstl %a4 483b2: 673c beqs 483f0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 483b4: 2f03 movel %d3,%sp@- 483b6: 2f0c movel %a4,%sp@- 483b8: 2f04 movel %d4,%sp@- 483ba: 4e95 jsr %a5@ 483bc: 4fef 000c lea %sp@(12),%sp 483c0: 4a80 tstl %d0 483c2: 662c bnes 483f0 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 483c4: 4a34 3800 tstb %a4@(00000000,%d3:l) 483c8: 6626 bnes 483f0 <== ALWAYS TAKEN /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 483ca: 2079 0005 82c0 moveal 582c0 ,%a0 483d0: 4281 clrl %d1 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 483d2: 203c 0005 8274 movel #361076,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 483d8: 2568 0028 0010 movel %a0@(40),%a2@(16) continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 483de: 41f9 0005 822c lea 5822c ,%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; 483e4: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; 483e8: 2548 000c movel %a0,%a2@(12) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 483ec: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 483ee: 601c bras 4840c <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 483f0: 5282 addql #1,%d2 483f2: 47eb 0014 lea %a3@(20),%a3 483f6: b4b9 0005 8148 cmpl 58148 ,%d2 483fc: 65b0 bcss 483ae pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 483fe: 4eb9 0004 9c78 jsr 49c78 <__errno> 48404: 72ff moveq #-1,%d1 48406: 2040 moveal %d0,%a0 48408: 7002 moveq #2,%d0 4840a: 2080 movel %d0,%a0@ } 4840c: 2001 movel %d1,%d0 4840e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 48414: 4e5e unlk %fp 48416: 4e75 rts 00041c80 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c80: 4e56 0000 linkw %fp,#0 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41c84: 2039 0005 8148 movel 58148 ,%d0 41c8a: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c8c: 2f0a movel %a2,%sp@- 41c8e: 246e 0008 moveal %fp@(8),%a2 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41c92: e989 lsll #4,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c94: 2f02 movel %d2,%sp@- rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41c96: 2041 moveal %d1,%a0 41c98: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41c9c: 4eb9 0004 811c jsr 4811c <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca2: 588f addql #4,%sp ) { rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41ca4: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca6: 6610 bnes 41cb8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41ca8: 4eb9 0004 9c78 jsr 49c78 <__errno> <== NOT EXECUTED 41cae: 720c moveq #12,%d1 <== NOT EXECUTED 41cb0: 2040 moveal %d0,%a0 <== NOT EXECUTED 41cb2: 70ff moveq #-1,%d0 <== NOT EXECUTED 41cb4: 2081 movel %d1,%a0@ <== NOT EXECUTED 41cb6: 6038 bras 41cf0 <== NOT EXECUTED memset( 41cb8: 2039 0005 8148 movel 58148 ,%d0 41cbe: 2200 movel %d0,%d1 41cc0: e989 lsll #4,%d1 41cc2: 2041 moveal %d1,%a0 41cc4: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41cc8: 42a7 clrl %sp@- 41cca: 2f02 movel %d2,%sp@- 41ccc: 4eb9 0004 a4c8 jsr 4a4c8 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; 41cd2: 4fef 000c lea %sp@(12),%sp device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 41cd6: 203c 0005 8274 movel #361076,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41cdc: 41f9 0005 822c lea 5822c ,%a0 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 41ce2: 2540 0024 movel %d0,%a2@(36) temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 41ce6: 4280 clrl %d0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41ce8: 2548 0028 movel %a0,%a2@(40) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 41cec: 2542 001c movel %d2,%a2@(28) return 0; } 41cf0: 242e fff8 movel %fp@(-8),%d2 41cf4: 246e fffc moveal %fp@(-4),%a2 41cf8: 4e5e unlk %fp 41cfa: 4e75 rts 00041e30 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 41e30: 4e56 fff0 linkw %fp,#-16 41e34: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e38: 486e fff0 pea %fp@(-16) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; 41e3c: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e42: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e46: 2f29 000c movel %a1@(12),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; args.buffer = buffer; 41e4a: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) status = rtems_io_control( 41e50: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41e54: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 41e58: 4eb9 0004 5840 jsr 45840 np->major, np->minor, (void *) &args ); if ( status ) 41e5e: 4fef 000c lea %sp@(12),%sp 41e62: 4a80 tstl %d0 41e64: 670c beqs 41e72 <== NEVER TAKEN return rtems_deviceio_errno(status); 41e66: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41e68: 4eb9 0004 8418 jsr 48418 <== NOT EXECUTED 41e6e: 588f addql #4,%sp <== NOT EXECUTED 41e70: 6004 bras 41e76 <== NOT EXECUTED return args.ioctl_return; 41e72: 202e fffc movel %fp@(-4),%d0 } 41e76: 4e5e unlk %fp 41e78: 4e75 rts ... 00041cfc : * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41cfc: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41cfe: 4e56 ffdc linkw %fp,#-36 41d02: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 41d06: 246e 0008 moveal %fp@(8),%a2 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d0a: 1012 moveb %a2@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d0c: 282e 000c movel %fp@(12),%d4 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d10: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d12: 2c2e 0010 movel %fp@(16),%d6 41d16: 2a2e 0014 movel %fp@(20),%d5 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d1a: b280 cmpl %d0,%d1 41d1c: 6628 bnes 41d46 <== ALWAYS TAKEN 41d1e: 123c 0065 moveb #101,%d1 41d22: 102a 0001 moveb %a2@(1),%d0 41d26: 49c0 extbl %d0 41d28: b280 cmpl %d0,%d1 41d2a: 661a bnes 41d46 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) 41d2c: 123c 0076 moveb #118,%d1 41d30: 102a 0002 moveb %a2@(2),%d0 41d34: 49c0 extbl %d0 41d36: b280 cmpl %d0,%d1 41d38: 660c bnes 41d46 <== ALWAYS TAKEN 41d3a: 4a2a 0003 tstb %a2@(3) 41d3e: 6606 bnes 41d46 41d40: 4201 clrb %d1 41d42: 6000 00d2 braw 41e16 <== ALWAYS TAKEN return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 41d46: 2004 movel %d4,%d0 41d48: 0280 0000 f000 andil #61440,%d0 41d4e: 0c80 0000 6000 cmpil #24576,%d0 41d54: 671a beqs 41d70 <== ALWAYS TAKEN 41d56: 0c80 0000 2000 cmpil #8192,%d0 41d5c: 6712 beqs 41d70 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 41d5e: 4eb9 0004 9c78 jsr 49c78 <__errno> <== NOT EXECUTED 41d64: 7816 moveq #22,%d4 <== NOT EXECUTED 41d66: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d68: 2040 moveal %d0,%a0 <== NOT EXECUTED 41d6a: 2084 movel %d4,%a0@ <== NOT EXECUTED 41d6c: 6000 00a8 braw 41e16 <== NOT EXECUTED else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 41d70: 206e 0018 moveal %fp@(24),%a0 41d74: 2650 moveal %a0@,%a3 if (!device_name_table) 41d76: 4a8b tstl %a3 41d78: 670e beqs 41d88 <== ALWAYS TAKEN 41d7a: 284b moveal %a3,%a4 41d7c: 74ff moveq #-1,%d2 41d7e: 4283 clrl %d3 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41d80: 4bf9 0004 aaa4 lea 4aaa4 ,%a5 41d86: 6038 bras 41dc0 <== 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 ); 41d88: 4eb9 0004 9c78 jsr 49c78 <__errno> <== NOT EXECUTED 41d8e: 760e moveq #14,%d3 <== NOT EXECUTED 41d90: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d92: 2240 moveal %d0,%a1 <== NOT EXECUTED 41d94: 2283 movel %d3,%a1@ <== NOT EXECUTED 41d96: 607e bras 41e16 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 41d98: 2014 movel %a4@,%d0 41d9a: 671c beqs 41db8 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41d9c: 2f00 movel %d0,%sp@- 41d9e: 2f0a movel %a2,%sp@- 41da0: 4e95 jsr %a5@ 41da2: 508f addql #8,%sp 41da4: 4a80 tstl %d0 41da6: 6612 bnes 41dba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EEXIST ); 41da8: 4eb9 0004 9c78 jsr 49c78 <__errno> <== NOT EXECUTED 41dae: 7411 moveq #17,%d2 <== NOT EXECUTED 41db0: 72ff moveq #-1,%d1 <== NOT EXECUTED 41db2: 2040 moveal %d0,%a0 <== NOT EXECUTED 41db4: 2082 movel %d2,%a0@ <== NOT EXECUTED 41db6: 605e bras 41e16 <== NOT EXECUTED 41db8: 2403 movel %d3,%d2 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 41dba: 5283 addql #1,%d3 41dbc: 49ec 0014 lea %a4@(20),%a4 41dc0: b6b9 0005 8148 cmpl 58148 ,%d3 41dc6: 65d0 bcss 41d98 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 41dc8: 70ff moveq #-1,%d0 41dca: b082 cmpl %d2,%d0 41dcc: 6610 bnes 41dde <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41dce: 4eb9 0004 9c78 jsr 49c78 <__errno> <== NOT EXECUTED 41dd4: 72ff moveq #-1,%d1 <== NOT EXECUTED 41dd6: 2040 moveal %d0,%a0 <== NOT EXECUTED 41dd8: 700c moveq #12,%d0 <== NOT EXECUTED 41dda: 2080 movel %d0,%a0@ <== NOT EXECUTED 41ddc: 6038 bras 41e16 <== NOT EXECUTED _ISR_Disable(level); 41dde: 203c 0000 0700 movel #1792,%d0 41de4: 40c3 movew %sr,%d3 41de6: 8083 orl %d3,%d0 41de8: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 41dea: 2002 movel %d2,%d0 41dec: e988 lsll #4,%d0 41dee: 2240 moveal %d0,%a1 41df0: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 41df4: d7c8 addal %a0,%a3 41df6: 268a movel %a2,%a3@ device_name_table[slot].device_name_length = strlen(path); 41df8: 2f0a movel %a2,%sp@- 41dfa: 4eb9 0004 af68 jsr 4af68 41e00: 588f addql #4,%sp device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 41e02: 2744 0010 movel %d4,%a3@(16) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 41e06: 2740 0004 movel %d0,%a3@(4) device_name_table[slot].major = major; 41e0a: 2746 0008 movel %d6,%a3@(8) device_name_table[slot].minor = minor; 41e0e: 2745 000c movel %d5,%a3@(12) device_name_table[slot].mode = mode; _ISR_Enable(level); 41e12: 46c3 movew %d3,%sr 41e14: 4281 clrl %d1 return 0; } 41e16: 2001 movel %d1,%d0 41e18: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 41e1e: 4e5e unlk %fp 41e20: 4e75 rts ... 00041e7c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 41e7c: 4e56 fff4 linkw %fp,#-12 41e80: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41e84: 486e fff4 pea %fp@(-12) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 41e88: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e8e: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 41e92: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) status = rtems_io_open( 41e98: 2f29 000c movel %a1@(12),%sp@- 41e9c: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41ea0: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41ea4: 4eb9 0004 5960 jsr 45960 np->major, np->minor, (void *) &args ); if ( status ) 41eaa: 4fef 000c lea %sp@(12),%sp 41eae: 4a80 tstl %d0 41eb0: 670a beqs 41ebc <== NEVER TAKEN return rtems_deviceio_errno(status); 41eb2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41eb4: 4eb9 0004 8418 jsr 48418 <== NOT EXECUTED 41eba: 588f addql #4,%sp <== NOT EXECUTED return 0; } 41ebc: 4e5e unlk %fp 41ebe: 4e75 rts 00041ec0 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 41ec0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 41ec4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 41ec8: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 41ecc: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41ed2: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 41ed6: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 41edc: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41ee2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 41ee6: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 41eea: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41eee: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 41ef2: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41ef6: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 41efa: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 41efe: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 41f02: 4eb9 0004 59b8 jsr 459b8 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 41f08: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 41f0c: 4a80 tstl %d0 <== NOT EXECUTED 41f0e: 670c beqs 41f1c <== NOT EXECUTED return rtems_deviceio_errno(status); 41f10: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f12: 4eb9 0004 8418 jsr 48418 <== NOT EXECUTED 41f18: 588f addql #4,%sp <== NOT EXECUTED 41f1a: 6004 bras 41f20 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41f1c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 41f20: 4e5e unlk %fp <== NOT EXECUTED 41f22: 4e75 rts 00041f24 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 41f24: 4e56 0000 linkw %fp,#0 41f28: 206e 0008 moveal %fp@(8),%a0 41f2c: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 41f30: 2050 moveal %a0@,%a0 if (!the_dev) 41f32: 4a88 tstl %a0 41f34: 6610 bnes 41f46 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 41f36: 4eb9 0004 9c78 jsr 49c78 <__errno> <== NOT EXECUTED 41f3c: 720e moveq #14,%d1 <== NOT EXECUTED 41f3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f40: 70ff moveq #-1,%d0 <== NOT EXECUTED 41f42: 2081 movel %d1,%a0@ <== NOT EXECUTED 41f44: 6016 bras 41f5c <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 41f46: 2228 000c movel %a0@(12),%d1 buf->st_mode = the_dev->mode; 41f4a: 4280 clrl %d0 41f4c: 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 ); 41f52: 2368 0008 0016 movel %a0@(8),%a1@(22) 41f58: 2341 001a movel %d1,%a1@(26) buf->st_mode = the_dev->mode; return 0; } 41f5c: 4e5e unlk %fp 41f5e: 4e75 rts 00041f60 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 41f60: 4e56 ffe4 linkw %fp,#-28 41f64: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 41f68: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 41f6c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41f72: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 41f76: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 41f7c: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41f82: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 41f86: 2f29 000c movel %a1@(12),%sp@- 41f8a: 2f29 0008 movel %a1@(8),%sp@- rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41f8e: 2028 000c movel %a0@(12),%d0 41f92: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41f96: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 41f9a: 2d40 ffe8 movel %d0,%fp@(-24) 41f9e: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 41fa2: 4eb9 0004 5a10 jsr 45a10 np->major, np->minor, (void *) &args ); if ( status ) 41fa8: 4fef 000c lea %sp@(12),%sp 41fac: 4a80 tstl %d0 41fae: 670c beqs 41fbc <== NEVER TAKEN return rtems_deviceio_errno(status); 41fb0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fb2: 4eb9 0004 8418 jsr 48418 <== NOT EXECUTED 41fb8: 588f addql #4,%sp <== NOT EXECUTED 41fba: 6004 bras 41fc0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41fbc: 202e fffc movel %fp@(-4),%d0 } 41fc0: 4e5e unlk %fp 41fc2: 4e75 rts 0004a388 : */ int device_close( rtems_libio_t *iop ) { 4a388: 4e56 fff4 linkw %fp,#-12 4a38c: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4a390: 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; 4a394: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4a398: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4a39c: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4a3a0: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4a3a4: 2f28 0050 movel %a0@(80),%sp@- 4a3a8: 2f28 004c movel %a0@(76),%sp@- 4a3ac: 4eb9 0004 b1c8 jsr 4b1c8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4a3b2: 4fef 000c lea %sp@(12),%sp 4a3b6: 4a80 tstl %d0 4a3b8: 670a beqs 4a3c4 <== NEVER TAKEN return rtems_deviceio_errno(status); 4a3ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a3bc: 4eb9 0004 b728 jsr 4b728 <== NOT EXECUTED 4a3c2: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4a3c4: 4e5e unlk %fp 4a3c6: 4e75 rts 0004a276 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4a276: 4e56 fff0 linkw %fp,#-16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4a27a: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) the_jnode = iop->file_info; status = rtems_io_control( 4a280: 486e fff0 pea %fp@(-16) int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4a284: 226e 0008 moveal %fp@(8),%a1 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4a288: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4a28e: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4a292: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4a296: 2f28 0050 movel %a0@(80),%sp@- 4a29a: 2f28 004c movel %a0@(76),%sp@- 4a29e: 4eb9 0004 b220 jsr 4b220 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4a2a4: 4fef 000c lea %sp@(12),%sp 4a2a8: 4a80 tstl %d0 4a2aa: 670c beqs 4a2b8 <== NEVER TAKEN return rtems_deviceio_errno(status); 4a2ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a2ae: 4eb9 0004 b728 jsr 4b728 <== NOT EXECUTED 4a2b4: 588f addql #4,%sp <== NOT EXECUTED 4a2b6: 6004 bras 4a2bc <== NOT EXECUTED return args.ioctl_return; 4a2b8: 202e fffc movel %fp@(-4),%d0 } 4a2bc: 4e5e unlk %fp 4a2be: 4e75 rts 0004a3c8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4a3c8: 4e56 fff4 linkw %fp,#-12 4a3cc: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4a3d0: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4a3d4: 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; 4a3da: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4a3de: 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; 4a3e4: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4a3e8: 2f29 0050 movel %a1@(80),%sp@- 4a3ec: 2f29 004c movel %a1@(76),%sp@- 4a3f0: 4eb9 0004 b278 jsr 4b278 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4a3f6: 4fef 000c lea %sp@(12),%sp 4a3fa: 4a80 tstl %d0 4a3fc: 670a beqs 4a408 <== NEVER TAKEN return rtems_deviceio_errno(status); 4a3fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a400: 4eb9 0004 b728 jsr 4b728 <== NOT EXECUTED 4a406: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4a408: 4e5e unlk %fp 4a40a: 4e75 rts 0004a324 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4a324: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4a328: 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( 4a32c: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4a330: 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; 4a336: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4a33c: 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; 4a342: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4a346: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4a34a: 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; 4a34e: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4a352: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4a356: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4a35a: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4a35e: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4a362: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4a366: 4eb9 0004 b2d0 jsr 4b2d0 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4a36c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a370: 4a80 tstl %d0 <== NOT EXECUTED 4a372: 670c beqs 4a380 <== NOT EXECUTED return rtems_deviceio_errno(status); 4a374: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a376: 4eb9 0004 b728 jsr 4b728 <== NOT EXECUTED 4a37c: 588f addql #4,%sp <== NOT EXECUTED 4a37e: 6004 bras 4a384 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4a380: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4a384: 4e5e unlk %fp <== NOT EXECUTED 4a386: 4e75 rts 0004a2c0 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4a2c0: 4e56 ffe4 linkw %fp,#-28 4a2c4: 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( 4a2c8: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4a2cc: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4a2d2: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4a2d8: 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; 4a2de: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4a2e2: 2028 000c movel %a0@(12),%d0 4a2e6: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4a2ea: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4a2ee: 2d40 ffe8 movel %d0,%fp@(-24) 4a2f2: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4a2f6: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4a2fa: 2f29 0050 movel %a1@(80),%sp@- 4a2fe: 2f29 004c movel %a1@(76),%sp@- 4a302: 4eb9 0004 b328 jsr 4b328 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4a308: 4fef 000c lea %sp@(12),%sp 4a30c: 4a80 tstl %d0 4a30e: 670c beqs 4a31c <== NEVER TAKEN return rtems_deviceio_errno(status); 4a310: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a312: 4eb9 0004 b728 jsr 4b728 <== NOT EXECUTED 4a318: 588f addql #4,%sp <== NOT EXECUTED 4a31a: 6004 bras 4a320 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4a31c: 202e fffc movel %fp@(-4),%d0 } 4a320: 4e5e unlk %fp 4a322: 4e75 rts 00043a3a : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 43a3a: 4e56 fff4 linkw %fp,#-12 43a3e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43a42: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 43a46: 4aaa 00b4 tstl %a2@(180) 43a4a: 674e beqs 43a9a rtems_interrupt_disable (level); 43a4c: 243c 0000 0700 movel #1792,%d2 43a52: 2202 movel %d2,%d1 43a54: 40c0 movew %sr,%d0 43a56: 8280 orl %d0,%d1 43a58: 46c1 movew %d1,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43a5a: 47f9 0004 4f30 lea 44f30 ,%a3 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 43a60: 602a bras 43a8c <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; 43a62: 7202 moveq #2,%d1 43a64: 2541 0094 movel %d1,%a2@(148) rtems_interrupt_enable (level); 43a68: 46c0 movew %d0,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43a6a: 42a7 clrl %sp@- 43a6c: 42a7 clrl %sp@- 43a6e: 2f2a 008c movel %a2@(140),%sp@- 43a72: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43a74: 4fef 000c lea %sp@(12),%sp 43a78: 4a80 tstl %d0 43a7a: 6708 beqs 43a84 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 43a7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a7e: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED rtems_interrupt_disable (level); 43a84: 2202 movel %d2,%d1 43a86: 40c0 movew %sr,%d0 43a88: 8280 orl %d0,%d1 43a8a: 46c1 movew %d1,%sr rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 43a8c: 206a 0084 moveal %a2@(132),%a0 43a90: 222a 0080 movel %a2@(128),%d1 43a94: b288 cmpl %a0,%d1 43a96: 66ca bnes 43a62 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 43a98: 46c0 movew %d0,%sr } } 43a9a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43aa0: 4e5e unlk %fp 43aa2: 4e75 rts 00042d1c : int dup2( int fildes, int fildes2 ) { 42d1c: 4e56 ffa8 linkw %fp,#-88 42d20: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d24: 280e movel %fp,%d4 42d26: 0684 ffff ffba addil #-70,%d4 42d2c: 45f9 0004 34c8 lea 434c8 ,%a2 42d32: 2f04 movel %d4,%sp@- int dup2( int fildes, int fildes2 ) { 42d34: 242e 0008 movel %fp@(8),%d2 42d38: 262e 000c movel %fp@(12),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d3c: 2f02 movel %d2,%sp@- 42d3e: 4e92 jsr %a2@ if ( status == -1 ) 42d40: 508f addql #8,%sp 42d42: 72ff moveq #-1,%d1 42d44: b280 cmpl %d0,%d1 42d46: 6720 beqs 42d68 <== ALWAYS TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 42d48: 2f04 movel %d4,%sp@- 42d4a: 2f03 movel %d3,%sp@- 42d4c: 4e92 jsr %a2@ if ( status == -1 ) 42d4e: 508f addql #8,%sp 42d50: 72ff moveq #-1,%d1 42d52: b280 cmpl %d0,%d1 42d54: 6712 beqs 42d68 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 42d56: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42d58: 42a7 clrl %sp@- <== NOT EXECUTED 42d5a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42d5c: 4eb9 0004 3178 jsr 43178 <== NOT EXECUTED 42d62: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42d66: 6002 bras 42d6a <== NOT EXECUTED 42d68: 70ff moveq #-1,%d0 } 42d6a: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 42d70: 4e5e unlk %fp 42d72: 4e75 rts 000435a0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435a0: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 435a4: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 435a8: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435ac: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435b0: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435b4: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435ba: 1202 moveb %d2,%d1 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435bc: 4a80 tstl %d0 <== NOT EXECUTED 435be: 674c beqs 4360c <== NOT EXECUTED 435c0: 4280 clrl %d0 <== NOT EXECUTED 435c2: 1002 moveb %d2,%d0 <== NOT EXECUTED 435c4: 2079 0005 a3e8 moveal 5a3e8 <__ctype_ptr__>,%a0 <== NOT EXECUTED 435ca: 1630 0801 moveb %a0@(00000001,%d0:l),%d3 <== NOT EXECUTED 435ce: 49c3 extbl %d3 <== NOT EXECUTED 435d0: 0803 0005 btst #5,%d3 <== NOT EXECUTED 435d4: 6736 beqs 4360c <== NOT EXECUTED 435d6: 7609 moveq #9,%d3 <== NOT EXECUTED 435d8: b680 cmpl %d0,%d3 <== NOT EXECUTED 435da: 6730 beqs 4360c <== NOT EXECUTED 435dc: 163c 000a moveb #10,%d3 <== NOT EXECUTED 435e0: b680 cmpl %d0,%d3 <== NOT EXECUTED 435e2: 6728 beqs 4360c <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 435e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435e6: 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; 435ea: 7040 moveq #64,%d0 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 435ec: 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; 435f0: b182 eorl %d0,%d2 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 435f2: 765e moveq #94,%d3 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 435f4: 1d42 ffff moveb %d2,%fp@(-1) <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 435f8: 1d43 fffe moveb %d3,%fp@(-2) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 435fc: 4eb9 0004 335e jsr 4335e <== 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')) { 43602: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 43606: 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')) { 4360a: 6010 bras 4361c <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4360c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4360e: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 43614: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43616: 4eba fe40 jsr %pc@(43458 ) <== NOT EXECUTED 4361a: 508f addql #8,%sp <== NOT EXECUTED } } 4361c: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED 43622: 4e5e unlk %fp <== NOT EXECUTED 43624: 4e75 rts 00060ab0 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 60ab0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 60ab4: 2039 0009 9df2 movel 99df2 ,%d0 <== NOT EXECUTED 60aba: 670a beqs 60ac6 <== NOT EXECUTED fclose(group_fp); 60abc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60abe: 4eb9 0007 4fc2 jsr 74fc2 <== NOT EXECUTED 60ac4: 588f addql #4,%sp <== NOT EXECUTED } 60ac6: 4e5e unlk %fp <== NOT EXECUTED 60ac8: 4e75 rts 00060aca : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 60aca: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 60ace: 2039 0009 9d0a movel 99d0a ,%d0 <== NOT EXECUTED 60ad4: 670a beqs 60ae0 <== NOT EXECUTED fclose(passwd_fp); 60ad6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60ad8: 4eb9 0007 4fc2 jsr 74fc2 <== NOT EXECUTED 60ade: 588f addql #4,%sp <== NOT EXECUTED } 60ae0: 4e5e unlk %fp <== NOT EXECUTED 60ae2: 4e75 rts 00043626 : * 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) { 43626: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4362a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 4362e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 43632: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED if (tty->ccount == 0) 43636: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 4363a: 6700 0178 beqw 437b4 <== NOT EXECUTED return; if (lineFlag) { 4363e: 4a83 tstl %d3 <== NOT EXECUTED 43640: 6700 0162 beqw 437a4 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 43644: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43648: 44c0 movew %d0,%ccr <== NOT EXECUTED 4364a: 6b08 bmis 43654 <== NOT EXECUTED tty->ccount = 0; 4364c: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED return; 43650: 6000 0162 braw 437b4 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 43654: 0800 0004 btst #4,%d0 <== NOT EXECUTED 43658: 6600 014a bnew 437a4 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 4365c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4365e: 4280 clrl %d0 <== NOT EXECUTED 43660: 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; 43664: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 43668: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4366a: 4eba ff34 jsr %pc@(435a0 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 4366e: 508f addql #8,%sp <== NOT EXECUTED 43670: 7020 moveq #32,%d0 <== NOT EXECUTED 43672: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43676: 6700 013c beqw 437b4 <== NOT EXECUTED echo ('\n', tty); 4367a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4367e: 700a moveq #10,%d0 <== NOT EXECUTED 43680: 602c bras 436ae <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 43682: 5388 subql #1,%a0 <== NOT EXECUTED 43684: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43688: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4368c: 2548 0020 movel %a0,%a2@(32) <== NOT EXECUTED 43690: 1431 8800 moveb %a1@(00000000,%a0:l),%d2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43694: 44c0 movew %d0,%ccr <== NOT EXECUTED 43696: 6a00 0106 bplw 4379e <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 4369a: 4a83 tstl %d3 <== NOT EXECUTED 4369c: 6620 bnes 436be <== NOT EXECUTED 4369e: 0800 0004 btst #4,%d0 <== NOT EXECUTED 436a2: 661a bnes 436be <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 436a4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 436a8: 4280 clrl %d0 <== NOT EXECUTED 436aa: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED 436ae: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 436b2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 436b8: 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); 436ba: 6000 fee4 braw 435a0 <== NOT EXECUTED 436be: 2279 0005 a3e8 moveal 5a3e8 <__ctype_ptr__>,%a1 <== NOT EXECUTED } else if (c == '\t') { 436c4: 7209 moveq #9,%d1 <== NOT EXECUTED 436c6: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 436cc: b282 cmpl %d2,%d1 <== NOT EXECUTED 436ce: 6660 bnes 43730 <== NOT EXECUTED int col = tty->read_start_column; 436d0: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 436d4: 4201 clrb %d1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 436d6: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 436dc: 602e bras 4370c <== NOT EXECUTED c = tty->cbuf[i++]; 436de: 286a 001c moveal %a2@(28),%a4 <== NOT EXECUTED if (c == '\t') { 436e2: 4284 clrl %d4 <== NOT EXECUTED 436e4: 1834 1800 moveb %a4@(00000000,%d1:l),%d4 <== NOT EXECUTED 436e8: 7a09 moveq #9,%d5 <== NOT EXECUTED 436ea: ba84 cmpl %d4,%d5 <== NOT EXECUTED 436ec: 6606 bnes 436f4 <== NOT EXECUTED col = (col | 7) + 1; 436ee: 7807 moveq #7,%d4 <== NOT EXECUTED 436f0: 8484 orl %d4,%d2 <== NOT EXECUTED 436f2: 6014 bras 43708 <== NOT EXECUTED } else if (iscntrl (c)) { 436f4: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 <== NOT EXECUTED 436f8: 49c4 extbl %d4 <== NOT EXECUTED 436fa: 0804 0005 btst #5,%d4 <== NOT EXECUTED 436fe: 6708 beqs 43708 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43700: 4a80 tstl %d0 <== NOT EXECUTED 43702: 6706 beqs 4370a <== NOT EXECUTED col += 2; 43704: 5482 addql #2,%d2 <== NOT EXECUTED 43706: 6002 bras 4370a <== NOT EXECUTED } else { col++; 43708: 5282 addql #1,%d2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 4370a: 5281 addql #1,%d1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4370c: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4370e: 66ce bnes 436de <== NOT EXECUTED 43710: 6016 bras 43728 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 43712: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43714: 4878 0001 pea 1 <== NOT EXECUTED 43718: 4879 0005 935d pea 5935d <== NOT EXECUTED 4371e: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43720: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43724: 53aa 0028 subql #1,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43728: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 4372c: 6de4 blts 43712 <== NOT EXECUTED 4372e: 606e bras 4379e <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 43730: 5282 addql #1,%d2 <== NOT EXECUTED 43732: 1231 2800 moveb %a1@(00000000,%d2:l),%d1 <== NOT EXECUTED 43736: 49c1 extbl %d1 <== NOT EXECUTED 43738: 0801 0005 btst #5,%d1 <== NOT EXECUTED 4373c: 6724 beqs 43762 <== NOT EXECUTED 4373e: 0800 0009 btst #9,%d0 <== NOT EXECUTED 43742: 671e beqs 43762 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43744: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43746: 4878 0003 pea 3 <== NOT EXECUTED 4374a: 4879 0005 935b pea 5935b <== NOT EXECUTED 43750: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 43752: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43756: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4375a: 6706 beqs 43762 <== NOT EXECUTED tty->column--; 4375c: 5380 subql #1,%d0 <== NOT EXECUTED 4375e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 43762: 2079 0005 a3e8 moveal 5a3e8 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43768: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 4376c: 49c0 extbl %d0 <== NOT EXECUTED 4376e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43772: 670c beqs 43780 <== NOT EXECUTED 43774: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43778: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 4377e: 671e beqs 4379e <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43780: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43782: 4878 0003 pea 3 <== NOT EXECUTED 43786: 4879 0005 935b pea 5935b <== NOT EXECUTED 4378c: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 4378e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43792: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43796: 6706 beqs 4379e <== NOT EXECUTED tty->column--; 43798: 5380 subql #1,%d0 <== NOT EXECUTED 4379a: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } } } if (!lineFlag) 4379e: 4a83 tstl %d3 <== NOT EXECUTED 437a0: 6608 bnes 437aa <== NOT EXECUTED 437a2: 6010 bras 437b4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 437a4: 47f9 0004 335e lea 4335e ,%a3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 437aa: 206a 0020 moveal %a2@(32),%a0 <== NOT EXECUTED 437ae: 4a88 tstl %a0 <== NOT EXECUTED 437b0: 6600 fed0 bnew 43682 <== NOT EXECUTED } } if (!lineFlag) break; } } 437b4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 437ba: 4e5e unlk %fp <== NOT EXECUTED 437bc: 4e75 rts 00070038 : #include int fchdir( int fd ) { 70038: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 7003c: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED 70040: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 70044: b8b9 0009 5a34 cmpl 95a34 ,%d4 <== NOT EXECUTED 7004a: 6414 bccs 70060 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 7004c: 2079 0009 a660 moveal 9a660 ,%a0 <== NOT EXECUTED 70052: ed8c lsll #6,%d4 <== NOT EXECUTED 70054: d1c4 addal %d4,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 70056: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 7005a: 0800 0008 btst #8,%d0 <== NOT EXECUTED 7005e: 6612 bnes 70072 <== NOT EXECUTED 70060: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 70066: 7609 moveq #9,%d3 <== NOT EXECUTED 70068: 72ff moveq #-1,%d1 <== NOT EXECUTED 7006a: 2040 moveal %d0,%a0 <== NOT EXECUTED 7006c: 2083 movel %d3,%a0@ <== NOT EXECUTED 7006e: 6000 00fc braw 7016c <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 70072: 0800 0001 btst #1,%d0 <== NOT EXECUTED 70076: 6612 bnes 7008a <== NOT EXECUTED 70078: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 7007e: 7416 moveq #22,%d2 <== NOT EXECUTED 70080: 72ff moveq #-1,%d1 <== NOT EXECUTED 70082: 2040 moveal %d0,%a0 <== NOT EXECUTED 70084: 2082 movel %d2,%a0@ <== NOT EXECUTED 70086: 6000 00e4 braw 7016c <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 7008a: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 7008e: 4a89 tstl %a1 <== NOT EXECUTED 70090: 6708 beqs 7009a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 70092: 2269 0010 moveal %a1@(16),%a1 <== NOT EXECUTED 70096: 4a89 tstl %a1 <== NOT EXECUTED 70098: 6614 bnes 700ae <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 7009a: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 700a0: 72ff moveq #-1,%d1 <== NOT EXECUTED 700a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 700a4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 700aa: 6000 00c0 braw 7016c <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 700ae: 2808 movel %a0,%d4 <== NOT EXECUTED 700b0: 0684 0000 0018 addil #24,%d4 <== NOT EXECUTED 700b6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 700b8: 4e91 jsr %a1@ <== NOT EXECUTED 700ba: 588f addql #4,%sp <== NOT EXECUTED 700bc: 7201 moveq #1,%d1 <== NOT EXECUTED 700be: b280 cmpl %d0,%d1 <== NOT EXECUTED 700c0: 6712 beqs 700d4 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 700c2: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 700c8: 72ff moveq #-1,%d1 <== NOT EXECUTED 700ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 700cc: 7014 moveq #20,%d0 <== NOT EXECUTED 700ce: 2080 movel %d0,%a0@ <== NOT EXECUTED 700d0: 6000 009a braw 7016c <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 700d4: 4878 0014 pea 14 <== NOT EXECUTED 700d8: 240e movel %fp,%d2 <== NOT EXECUTED 700da: 0682 ffff ffd8 addil #-40,%d2 <== NOT EXECUTED 700e0: 45f9 0007 7ebc lea 77ebc ,%a2 <== NOT EXECUTED 700e6: 2639 0009 5d3c movel 95d3c ,%d3 <== NOT EXECUTED 700ec: 5883 addql #4,%d3 <== NOT EXECUTED 700ee: 2f03 movel %d3,%sp@- <== NOT EXECUTED 700f0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 700f2: 4e92 jsr %a2@ <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 700f4: 4878 0014 pea 14 <== NOT EXECUTED 700f8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 700fa: 2f03 movel %d3,%sp@- <== NOT EXECUTED 700fc: 4e92 jsr %a2@ <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 700fe: 42a7 clrl %sp@- <== NOT EXECUTED 70100: 486e ffec pea %fp@(-20) <== NOT EXECUTED 70104: 42a7 clrl %sp@- <== NOT EXECUTED 70106: 4878 0001 pea 1 <== NOT EXECUTED 7010a: 4879 0008 edc7 pea 8edc7 <== NOT EXECUTED 70110: 4eb9 0004 6566 jsr 46566 <== NOT EXECUTED 70116: 4fef 002c lea %sp@(44),%sp <== NOT EXECUTED 7011a: 4a80 tstl %d0 <== NOT EXECUTED 7011c: 671a beqs 70138 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 7011e: 4878 0014 pea 14 <== NOT EXECUTED 70122: 2039 0009 5d3c movel 95d3c ,%d0 <== NOT EXECUTED 70128: 5880 addql #4,%d0 <== NOT EXECUTED 7012a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 7012c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 7012e: 4e92 jsr %a2@ <== NOT EXECUTED return -1; 70130: 4fef 000c lea %sp@(12),%sp <== 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; 70134: 72ff moveq #-1,%d1 <== NOT EXECUTED return -1; 70136: 6034 bras 7016c <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 70138: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 7013c: 4a88 tstl %a0 <== NOT EXECUTED 7013e: 670e beqs 7014e <== NOT EXECUTED 70140: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 70144: 4a88 tstl %a0 <== NOT EXECUTED 70146: 6706 beqs 7014e <== NOT EXECUTED 70148: 2f02 movel %d2,%sp@- <== NOT EXECUTED 7014a: 4e90 jsr %a0@ <== NOT EXECUTED 7014c: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_current = loc; 7014e: 4878 0014 pea 14 <== NOT EXECUTED 70152: 486e ffec pea %fp@(-20) <== NOT EXECUTED 70156: 2239 0009 5d3c movel 95d3c ,%d1 <== NOT EXECUTED 7015c: 5881 addql #4,%d1 <== NOT EXECUTED 7015e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 70160: 4eb9 0007 7ebc jsr 77ebc <== NOT EXECUTED return 0; 70166: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; 7016a: 4281 clrl %d1 <== NOT EXECUTED return 0; } 7016c: 2001 movel %d1,%d0 <== NOT EXECUTED 7016e: 4cee 041c ffc8 moveml %fp@(-56),%d2-%d4/%a2 <== NOT EXECUTED 70174: 4e5e unlk %fp <== NOT EXECUTED 70176: 4e75 rts 00060738 : int fchmod( int fd, mode_t mode ) { 60738: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 6073c: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 60740: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 60744: b0b9 0009 5a34 cmpl 95a34 ,%d0 <== NOT EXECUTED 6074a: 6414 bccs 60760 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 6074c: 2079 0009 a660 moveal 9a660 ,%a0 <== NOT EXECUTED 60752: ed88 lsll #6,%d0 <== NOT EXECUTED 60754: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 60756: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 6075a: 0800 0008 btst #8,%d0 <== NOT EXECUTED 6075e: 660e bnes 6076e <== NOT EXECUTED 60760: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 60766: 7209 moveq #9,%d1 <== NOT EXECUTED 60768: 2040 moveal %d0,%a0 <== NOT EXECUTED 6076a: 2081 movel %d1,%a0@ <== NOT EXECUTED 6076c: 6044 bras 607b2 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 6076e: 44c0 movew %d0,%ccr <== NOT EXECUTED 60770: 670e beqs 60780 <== NOT EXECUTED 60772: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 60778: 2040 moveal %d0,%a0 <== NOT EXECUTED 6077a: 7016 moveq #22,%d0 <== NOT EXECUTED 6077c: 2080 movel %d0,%a0@ <== NOT EXECUTED 6077e: 6032 bras 607b2 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 60780: 2268 003c moveal %a0@(60),%a1 <== NOT EXECUTED 60784: 4aa9 001c tstl %a1@(28) <== NOT EXECUTED 60788: 6610 bnes 6079a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6078a: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 60790: 2040 moveal %d0,%a0 <== NOT EXECUTED 60792: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 60798: 6018 bras 607b2 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 6079a: 2268 0020 moveal %a0@(32),%a1 <== NOT EXECUTED 6079e: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 607a2: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 607a6: 2269 001c moveal %a1@(28),%a1 <== NOT EXECUTED 607aa: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED } 607ae: 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 ); 607b0: 4ed1 jmp %a1@ <== NOT EXECUTED } 607b2: 70ff moveq #-1,%d0 <== NOT EXECUTED 607b4: 4e5e unlk %fp <== NOT EXECUTED 607b6: 4e75 rts 000607b8 : int fchown( int fd, uid_t owner, gid_t group ) { 607b8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 607bc: 302e 000e movew %fp@(14),%d0 <== NOT EXECUTED 607c0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 607c2: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 607c6: 322e 0012 movew %fp@(18),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 607ca: b4b9 0009 5a34 cmpl 95a34 ,%d2 <== NOT EXECUTED 607d0: 6414 bccs 607e6 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 607d2: 2079 0009 a660 moveal 9a660 ,%a0 <== NOT EXECUTED 607d8: ed8a lsll #6,%d2 <== NOT EXECUTED 607da: d1c2 addal %d2,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 607dc: 2428 0014 movel %a0@(20),%d2 <== NOT EXECUTED 607e0: 0802 0008 btst #8,%d2 <== NOT EXECUTED 607e4: 660e bnes 607f4 <== NOT EXECUTED 607e6: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 607ec: 7209 moveq #9,%d1 <== NOT EXECUTED 607ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 607f0: 2081 movel %d1,%a0@ <== NOT EXECUTED 607f2: 6052 bras 60846 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 607f4: 44c2 movew %d2,%ccr <== NOT EXECUTED 607f6: 670e beqs 60806 <== NOT EXECUTED 607f8: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 607fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 60800: 7016 moveq #22,%d0 <== NOT EXECUTED 60802: 2080 movel %d0,%a0@ <== NOT EXECUTED 60804: 6040 bras 60846 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 60806: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 6080a: 2269 0018 moveal %a1@(24),%a1 <== NOT EXECUTED 6080e: 4a89 tstl %a1 <== NOT EXECUTED 60810: 6610 bnes 60822 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 60812: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 60818: 2040 moveal %d0,%a0 <== NOT EXECUTED 6081a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 60820: 6024 bras 60846 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 60822: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 60826: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 6082c: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED } 60832: 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 ); 60836: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED 6083a: 2d41 0010 movel %d1,%fp@(16) <== NOT EXECUTED 6083e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } 60842: 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 ); 60844: 4ed1 jmp %a1@ <== NOT EXECUTED } 60846: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 6084a: 70ff moveq #-1,%d0 <== NOT EXECUTED 6084c: 4e5e unlk %fp <== NOT EXECUTED 6084e: 4e75 rts 00070178 : int fcntl( int fd, int cmd, ... ) { 70178: 4e56 fff0 linkw %fp,#-16 7017c: 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, ...)); 70180: 41ee 0010 lea %fp@(16),%a0 70184: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 70188: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 7018c: 2279 0009 5a34 moveal 95a34 ,%a1 70192: b3c0 cmpal %d0,%a1 70194: 6316 blss 701ac <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 70196: 2239 0009 a660 movel 9a660 ,%d1 7019c: 2441 moveal %d1,%a2 7019e: ed88 lsll #6,%d0 701a0: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 701a2: 202a 0014 movel %a2@(20),%d0 701a6: 0800 0008 btst #8,%d0 701aa: 6612 bnes 701be <== NEVER TAKEN 701ac: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 701b2: 74ff moveq #-1,%d2 <== NOT EXECUTED 701b4: 7209 moveq #9,%d1 <== NOT EXECUTED 701b6: 2040 moveal %d0,%a0 <== NOT EXECUTED 701b8: 2081 movel %d1,%a0@ <== NOT EXECUTED 701ba: 6000 011e braw 702da <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 701be: 7409 moveq #9,%d2 701c0: b483 cmpl %d3,%d2 701c2: 6500 00de bcsw 702a2 701c6: 343b 3a08 movew %pc@(701d0 ,%d3:l:2),%d2 701ca: 48c2 extl %d2 701cc: 4efb 2802 jmp %pc@(701d0 ,%d2:l) 701d0: 0014 024 <== NOT EXECUTED 701d2: 006e 0156 <== NOT EXECUTED 701d4: 007a 0172 <== NOT EXECUTED 701d6: 0092 00a0 00c0 oril #10485952,%d2 <== NOT EXECUTED 701dc: 00c0 bitrev %d0 <== NOT EXECUTED 701de: 00c0 bitrev %d0 <== NOT EXECUTED 701e0: 00c0 bitrev %d0 <== NOT EXECUTED 701e2: 00c0 bitrev %d0 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 701e4: 2410 movel %a0@,%d2 if ( fd2 ) 701e6: 6710 beqs 701f8 <== NEVER TAKEN diop = rtems_libio_iop( fd2 ); 701e8: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 701ea: 6204 bhis 701f0 <== NOT EXECUTED 701ec: 97cb subal %a3,%a3 <== NOT EXECUTED 701ee: 601a bras 7020a <== NOT EXECUTED 701f0: 2641 moveal %d1,%a3 <== NOT EXECUTED 701f2: ed8a lsll #6,%d2 <== NOT EXECUTED 701f4: d7c2 addal %d2,%a3 <== NOT EXECUTED 701f6: 6012 bras 7020a <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 701f8: 4eb9 0004 6978 jsr 46978 701fe: 2640 moveal %d0,%a3 if ( diop == 0 ) { 70200: 4a80 tstl %d0 70202: 6606 bnes 7020a <== NEVER TAKEN 70204: 74ff moveq #-1,%d2 <== NOT EXECUTED 70206: 6000 00d2 braw 702da <== 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); 7020a: 240b movel %a3,%d2 ret = -1; break; } } diop->handlers = iop->handlers; 7020c: 276a 003c 003c movel %a2@(60),%a3@(60) diop->file_info = iop->file_info; 70212: 276a 0038 0038 movel %a2@(56),%a3@(56) diop->flags = iop->flags; 70218: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 7021e: 4878 0014 pea 14 70222: 486a 0018 pea %a2@(24) 70226: 486b 0018 pea %a3@(24) 7022a: 4eb9 0007 7ebc jsr 77ebc ret = (int) (diop - rtems_libio_iops); 70230: 4fef 000c lea %sp@(12),%sp 70234: 94b9 0009 a660 subl 9a660 ,%d2 7023a: ec82 asrl #6,%d2 7023c: 6074 bras 702b2 <== ALWAYS TAKEN break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 7023e: 2400 movel %d0,%d2 70240: 720b moveq #11,%d1 70242: e2aa lsrl %d1,%d2 70244: 7001 moveq #1,%d0 70246: c480 andl %d0,%d2 70248: 606c bras 702b6 <== ALWAYS TAKEN * 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 ) ) 7024a: 4a90 tstl %a0@ 7024c: 6708 beqs 70256 <== ALWAYS TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 7024e: 4282 clrl %d2 70250: 08c0 000b bset #11,%d0 70254: 6006 bras 7025c <== ALWAYS TAKEN else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 70256: 4282 clrl %d2 <== NOT EXECUTED 70258: 0880 000b bclr #11,%d0 <== NOT EXECUTED 7025c: 2540 0014 movel %d0,%a2@(20) 70260: 6054 bras 702b6 <== ALWAYS TAKEN break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 70262: 2f00 movel %d0,%sp@- 70264: 4eb9 0004 67f0 jsr 467f0 7026a: 588f addql #4,%sp 7026c: 2400 movel %d0,%d2 7026e: 6042 bras 702b2 <== ALWAYS TAKEN break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 70270: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 70272: 4282 clrl %d2 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 70274: 4eb9 0004 6a18 jsr 46a18 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 7027a: 222a 0014 movel %a2@(20),%d1 7027e: 588f addql #4,%sp 70280: 0280 0000 0201 andil #513,%d0 70286: 0281 ffff fdfe andil #-514,%d1 7028c: 8081 orl %d1,%d0 7028e: 60cc bras 7025c <== ALWAYS TAKEN errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 70290: 4eb9 0007 4e84 jsr 74e84 <__errno> 70296: 74ff moveq #-1,%d2 70298: 2040 moveal %d0,%a0 7029a: 20bc 0000 0086 movel #134,%a0@ 702a0: 6038 bras 702da <== ALWAYS TAKEN ret = -1; break; default: errno = EINVAL; 702a2: 4eb9 0007 4e84 jsr 74e84 <__errno> 702a8: 74ff moveq #-1,%d2 702aa: 2040 moveal %d0,%a0 702ac: 7016 moveq #22,%d0 702ae: 2080 movel %d0,%a0@ 702b0: 6028 bras 702da <== ALWAYS TAKEN /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 702b2: 4a82 tstl %d2 702b4: 6d24 blts 702da <== ALWAYS TAKEN if (iop->handlers->fcntl_h) { 702b6: 206a 003c moveal %a2@(60),%a0 702ba: 2068 0030 moveal %a0@(48),%a0 702be: 4a88 tstl %a0 702c0: 6718 beqs 702da <== ALWAYS TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 702c2: 2f0a movel %a2,%sp@- 702c4: 2f03 movel %d3,%sp@- 702c6: 4e90 jsr %a0@ if (err) { 702c8: 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 ); 702ca: 2600 movel %d0,%d3 if (err) { 702cc: 670c beqs 702da <== NEVER TAKEN errno = err; 702ce: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 702d4: 74ff moveq #-1,%d2 <== NOT EXECUTED 702d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 702d8: 2083 movel %d3,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 702da: 2002 movel %d2,%d0 702dc: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 702e2: 4e5e unlk %fp 702e4: 4e75 rts 00043308 : #include int fdatasync( int fd ) { 43308: 4e56 0000 linkw %fp,#0 4330c: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43310: b0b9 0005 dbd4 cmpl 5dbd4 ,%d0 43316: 6414 bccs 4332c iop = rtems_libio_iop( fd ); 43318: 2079 0005 f25c moveal 5f25c ,%a0 4331e: ed88 lsll #6,%d0 43320: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43322: 2028 0014 movel %a0@(20),%d0 43326: 0800 0008 btst #8,%d0 4332a: 660e bnes 4333a <== NEVER TAKEN 4332c: 4eb9 0004 dd7c jsr 4dd7c <__errno> 43332: 7209 moveq #9,%d1 43334: 2040 moveal %d0,%a0 43336: 2081 movel %d1,%a0@ 43338: 6036 bras 43370 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4333a: 44c0 movew %d0,%ccr 4333c: 670e beqs 4334c 4333e: 4eb9 0004 dd7c jsr 4dd7c <__errno> 43344: 2040 moveal %d0,%a0 43346: 7016 moveq #22,%d0 43348: 2080 movel %d0,%a0@ 4334a: 6024 bras 43370 <== ALWAYS TAKEN /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 4334c: 2268 003c moveal %a0@(60),%a1 43350: 2269 002c moveal %a1@(44),%a1 43354: 4a89 tstl %a1 43356: 6610 bnes 43368 rtems_set_errno_and_return_minus_one( ENOTSUP ); 43358: 4eb9 0004 dd7c jsr 4dd7c <__errno> 4335e: 2040 moveal %d0,%a0 43360: 20bc 0000 0086 movel #134,%a0@ 43366: 6008 bras 43370 <== ALWAYS TAKEN return (*iop->handlers->fdatasync_h)( iop ); 43368: 2d48 0008 movel %a0,%fp@(8) } 4336c: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 4336e: 4ed1 jmp %a1@ } 43370: 70ff moveq #-1,%d0 43372: 4e5e unlk %fp 43374: 4e75 rts ... 0004a8b2 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4a8b2: 4e56 ffdc linkw %fp,#-36 4a8b6: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4a8ba: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4a8bc: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4a8c0: 42a7 clrl %sp@- 4a8c2: 2f39 0005 b1e4 movel 5b1e4 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4a8c8: 2a6e 000c moveal %fp@(12),%a5 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4a8cc: 4eb9 0004 4f30 jsr 44f30 4a8d2: 4fef 000c lea %sp@(12),%sp 4a8d6: 4a80 tstl %d0 4a8d8: 6706 beqs 4a8e0 <== ALWAYS TAKEN 4a8da: 74fc moveq #-4,%d2 4a8dc: 6000 02fc braw 4abda RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4a8e0: 2654 moveal %a4@,%a3 <== NOT EXECUTED if (pipe == NULL) { 4a8e2: 4a8b tstl %a3 <== NOT EXECUTED 4a8e4: 6600 011a bnew 4aa00 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4a8e8: 4878 0034 pea 34 <== NOT EXECUTED 4a8ec: 243c 0004 935c movel #299868,%d2 <== NOT EXECUTED 4a8f2: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a8f4: 4e90 jsr %a0@ <== NOT EXECUTED if (pipe == NULL) 4a8f6: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4a8f8: 2440 moveal %d0,%a2 <== NOT EXECUTED 4a8fa: 2640 moveal %d0,%a3 <== NOT EXECUTED if (pipe == NULL) 4a8fc: 4a80 tstl %d0 <== NOT EXECUTED 4a8fe: 6606 bnes 4a906 <== NOT EXECUTED 4a900: 74f4 moveq #-12,%d2 <== NOT EXECUTED 4a902: 6000 012c braw 4aa30 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4a906: 4878 0034 pea 34 <== NOT EXECUTED 4a90a: 42a7 clrl %sp@- <== NOT EXECUTED 4a90c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a90e: 4eb9 0004 c270 jsr 4c270 <== NOT EXECUTED pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4a914: 4878 0200 pea 200 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4a918: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4a91e: 2042 moveal %d2,%a0 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4a920: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4a924: 4e90 jsr %a0@ <== NOT EXECUTED if (! pipe->Buffer) 4a926: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4a92a: 2480 movel %d0,%a2@ <== NOT EXECUTED if (! pipe->Buffer) 4a92c: 6606 bnes 4a934 <== NOT EXECUTED 4a92e: 74f4 moveq #-12,%d2 <== NOT EXECUTED 4a930: 6000 00c4 braw 4a9f6 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4a934: 486a 002c pea %a2@(44) <== NOT EXECUTED 4a938: 243c 0004 aebc movel #306876,%d2 <== NOT EXECUTED 4a93e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a940: 1039 0005 a3ac moveb 5a3ac ,%d0 <== NOT EXECUTED 4a946: 42a7 clrl %sp@- <== NOT EXECUTED 4a948: 49c0 extbl %d0 <== NOT EXECUTED 4a94a: 42a7 clrl %sp@- <== NOT EXECUTED 4a94c: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4a952: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a954: 4e90 jsr %a0@ <== NOT EXECUTED 4a956: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4a95a: 4a80 tstl %d0 <== NOT EXECUTED 4a95c: 6600 008c bnew 4a9ea <== 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( 4a960: 486a 0030 pea %a2@(48) <== NOT EXECUTED 4a964: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a966: 1039 0005 a3ac moveb 5a3ac ,%d0 <== NOT EXECUTED 4a96c: 42a7 clrl %sp@- <== NOT EXECUTED 4a96e: 49c0 extbl %d0 <== NOT EXECUTED 4a970: 42a7 clrl %sp@- <== NOT EXECUTED 4a972: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4a978: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a97a: 4e90 jsr %a0@ <== NOT EXECUTED 4a97c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4a980: 4a80 tstl %d0 <== NOT EXECUTED 4a982: 665a bnes 4a9de <== 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( 4a984: 486a 0028 pea %a2@(40) <== NOT EXECUTED 4a988: 1039 0005 a3ac moveb 5a3ac ,%d0 <== NOT EXECUTED 4a98e: 42a7 clrl %sp@- <== NOT EXECUTED 4a990: 4878 0010 pea 10 <== NOT EXECUTED 4a994: 49c0 extbl %d0 <== NOT EXECUTED 4a996: 4878 0001 pea 1 <== NOT EXECUTED 4a99a: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4a9a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a9a2: 4eb9 0004 4cf8 jsr 44cf8 <== NOT EXECUTED 4a9a8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4a9ac: 4a80 tstl %d0 <== NOT EXECUTED 4a9ae: 6622 bnes 4a9d2 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4a9b0: 1039 0005 a3ac moveb 5a3ac ,%d0 <== NOT EXECUTED 4a9b6: 49c0 extbl %d0 <== NOT EXECUTED 4a9b8: 2200 movel %d0,%d1 <== NOT EXECUTED 4a9ba: 5281 addql #1,%d1 <== NOT EXECUTED 4a9bc: 13c1 0005 a3ac moveb %d1,5a3ac <== NOT EXECUTED 4a9c2: 727a moveq #122,%d1 <== NOT EXECUTED 4a9c4: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a9c6: 6638 bnes 4aa00 <== NOT EXECUTED c = 'a'; 4a9c8: 7661 moveq #97,%d3 <== NOT EXECUTED 4a9ca: 13c3 0005 a3ac moveb %d3,5a3ac <== NOT EXECUTED 4a9d0: 602e bras 4aa00 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4a9d2: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a9d6: 4eb9 0004 af70 jsr 4af70 <== NOT EXECUTED 4a9dc: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4a9de: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a9e2: 4eb9 0004 af70 jsr 4af70 <== NOT EXECUTED 4a9e8: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4a9ea: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a9ec: 74fc moveq #-4,%d2 <== NOT EXECUTED 4a9ee: 4eb9 0004 8e80 jsr 48e80 <== NOT EXECUTED 4a9f4: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4a9f6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a9f8: 4eb9 0004 8e80 jsr 48e80 <== NOT EXECUTED 4a9fe: 602a bras 4aa2a <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4aa00: 42a7 clrl %sp@- <== NOT EXECUTED 4aa02: 42a7 clrl %sp@- <== NOT EXECUTED 4aa04: 2f2b 0028 movel %a3@(40),%sp@- <== NOT EXECUTED 4aa08: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4aa0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4aa12: 4a80 tstl %d0 <== NOT EXECUTED 4aa14: 6704 beqs 4aa1a <== NOT EXECUTED 4aa16: 74fc moveq #-4,%d2 <== NOT EXECUTED 4aa18: 6002 bras 4aa1c <== NOT EXECUTED 4aa1a: 4282 clrl %d2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4aa1c: 4a94 tstl %a4@ <== NOT EXECUTED 4aa1e: 6610 bnes 4aa30 <== NOT EXECUTED if (err) 4aa20: 4a82 tstl %d2 <== NOT EXECUTED 4aa22: 670a beqs 4aa2e <== NOT EXECUTED pipe_free(pipe); 4aa24: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4aa26: 4eba fd7a jsr %pc@(4a7a2 ) <== NOT EXECUTED 4aa2a: 588f addql #4,%sp <== NOT EXECUTED 4aa2c: 6002 bras 4aa30 <== NOT EXECUTED else *pipep = pipe; 4aa2e: 288b movel %a3,%a4@ <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 4aa30: 2f39 0005 b1e4 movel 5b1e4 ,%sp@- <== NOT EXECUTED 4aa36: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4aa3c: 588f addql #4,%sp <== NOT EXECUTED 4aa3e: 4a82 tstl %d2 <== NOT EXECUTED 4aa40: 6600 0198 bnew 4abda <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4aa44: 222d 0014 movel %a5@(20),%d1 <== NOT EXECUTED 4aa48: 7006 moveq #6,%d0 <== NOT EXECUTED 4aa4a: 7604 moveq #4,%d3 <== NOT EXECUTED 4aa4c: c081 andl %d1,%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4aa4e: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4aa50: b680 cmpl %d0,%d3 <== NOT EXECUTED 4aa52: 6700 009a beqw 4aaee <== NOT EXECUTED 4aa56: 7206 moveq #6,%d1 <== NOT EXECUTED 4aa58: b280 cmpl %d0,%d1 <== NOT EXECUTED 4aa5a: 6700 011a beqw 4ab76 <== NOT EXECUTED 4aa5e: 163c 0002 moveb #2,%d3 <== NOT EXECUTED 4aa62: b680 cmpl %d0,%d3 <== NOT EXECUTED 4aa64: 6600 0158 bnew 4abbe <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4aa68: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4aa6c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4aa6e: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4aa70: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4aa74: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4aa78: 4a80 tstl %d0 <== NOT EXECUTED 4aa7a: 6610 bnes 4aa8c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4aa7c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4aa80: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4aa84: 4eb9 0004 afdc jsr 4afdc <== NOT EXECUTED 4aa8a: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Writers == 0) { 4aa8c: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4aa90: 6600 012c bnew 4abbe <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4aa94: 7001 moveq #1,%d0 <== NOT EXECUTED 4aa96: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4aa9a: 6600 0122 bnew 4abbe <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4aa9e: 2a2a 0024 movel %a2@(36),%d5 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4aaa2: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4aaa8: 283c 0004 5034 movel #282676,%d4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4aaae: 263c 0004 b040 movel #307264,%d3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4aab4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4aab8: 2044 moveal %d4,%a0 <== NOT EXECUTED 4aaba: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4aabc: 2043 moveal %d3,%a0 <== NOT EXECUTED 4aabe: 42a7 clrl %sp@- <== NOT EXECUTED 4aac0: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4aac4: 4e90 jsr %a0@ <== NOT EXECUTED 4aac6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4aaca: 4a80 tstl %d0 <== NOT EXECUTED 4aacc: 6600 00fe bnew 4abcc <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4aad0: 42a7 clrl %sp@- <== NOT EXECUTED 4aad2: 42a7 clrl %sp@- <== NOT EXECUTED 4aad4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4aad8: 4e93 jsr %a3@ <== NOT EXECUTED 4aada: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4aade: 4a80 tstl %d0 <== NOT EXECUTED 4aae0: 6600 00ea bnew 4abcc <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4aae4: baaa 0024 cmpl %a2@(36),%d5 <== NOT EXECUTED 4aae8: 67ca beqs 4aab4 <== NOT EXECUTED 4aaea: 6000 00d2 braw 4abbe <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4aaee: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4aaf2: 660c bnes 4ab00 <== NOT EXECUTED 4aaf4: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4aaf8: 6706 beqs 4ab00 <== NOT EXECUTED 4aafa: 74fa moveq #-6,%d2 <== NOT EXECUTED 4aafc: 6000 00d0 braw 4abce <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4ab00: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4ab04: 2200 movel %d0,%d1 <== NOT EXECUTED 4ab06: 5281 addql #1,%d1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4ab08: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4ab0c: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4ab10: 4a80 tstl %d0 <== NOT EXECUTED 4ab12: 6610 bnes 4ab24 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4ab14: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4ab18: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4ab1c: 4eb9 0004 afdc jsr 4afdc <== NOT EXECUTED 4ab22: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Readers == 0) { 4ab24: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4ab28: 6600 0094 bnew 4abbe <== NOT EXECUTED prevCounter = pipe->readerCounter; 4ab2c: 2a2a 0020 movel %a2@(32),%d5 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4ab30: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4ab36: 283c 0004 5034 movel #282676,%d4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4ab3c: 263c 0004 b040 movel #307264,%d3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4ab42: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ab46: 2044 moveal %d4,%a0 <== NOT EXECUTED 4ab48: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4ab4a: 2043 moveal %d3,%a0 <== NOT EXECUTED 4ab4c: 42a7 clrl %sp@- <== NOT EXECUTED 4ab4e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4ab52: 4e90 jsr %a0@ <== NOT EXECUTED 4ab54: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ab58: 4a80 tstl %d0 <== NOT EXECUTED 4ab5a: 6670 bnes 4abcc <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4ab5c: 42a7 clrl %sp@- <== NOT EXECUTED 4ab5e: 42a7 clrl %sp@- <== NOT EXECUTED 4ab60: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ab64: 4e93 jsr %a3@ <== NOT EXECUTED 4ab66: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ab6a: 4a80 tstl %d0 <== NOT EXECUTED 4ab6c: 665e bnes 4abcc <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4ab6e: baaa 0020 cmpl %a2@(32),%d5 <== NOT EXECUTED 4ab72: 67ce beqs 4ab42 <== NOT EXECUTED 4ab74: 6048 bras 4abbe <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4ab76: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4ab7a: 2200 movel %d0,%d1 <== NOT EXECUTED 4ab7c: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4ab7e: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4ab82: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4ab86: 4a80 tstl %d0 <== NOT EXECUTED 4ab88: 6610 bnes 4ab9a <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4ab8a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4ab8e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4ab92: 4eb9 0004 afdc jsr 4afdc <== NOT EXECUTED 4ab98: 508f addql #8,%sp <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4ab9a: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4ab9e: 2600 movel %d0,%d3 <== NOT EXECUTED 4aba0: 5283 addql #1,%d3 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4aba2: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4aba6: 2543 0014 movel %d3,%a2@(20) <== NOT EXECUTED 4abaa: 4a80 tstl %d0 <== NOT EXECUTED 4abac: 6610 bnes 4abbe <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4abae: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4abb2: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4abb6: 4eb9 0004 afdc jsr 4afdc <== NOT EXECUTED 4abbc: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4abbe: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4abc2: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return 0; 4abc8: 588f addql #4,%sp <== NOT EXECUTED 4abca: 600e bras 4abda <== NOT EXECUTED 4abcc: 74fc moveq #-4,%d2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4abce: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4abd0: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4abd2: 4eb9 0004 a7ea jsr 4a7ea <== NOT EXECUTED return err; 4abd8: 508f addql #8,%sp <== NOT EXECUTED } 4abda: 2002 movel %d2,%d0 4abdc: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 4abe2: 4e5e unlk %fp 4abe4: 4e75 rts ... 00049664 : 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)) ) { 49664: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49668: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4966c: 2079 0009 a6a4 moveal 9a6a4 ,%a0 <== NOT EXECUTED 49672: 6010 bras 49684 <== 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 ) { 49674: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 49678: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 4967c: 6604 bnes 49682 <== NOT EXECUTED 4967e: 7001 moveq #1,%d0 <== NOT EXECUTED 49680: 600c bras 4968e <== 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 ) { 49682: 2050 moveal %a0@,%a0 <== NOT EXECUTED 49684: b1fc 0009 a6a8 cmpal #632488,%a0 <== NOT EXECUTED 4968a: 66e8 bnes 49674 <== NOT EXECUTED 4968c: 4200 clrb %d0 <== NOT EXECUTED return true; } } return false; } 4968e: 4e5e unlk %fp <== NOT EXECUTED 49690: 4e75 rts 00043378 : long fpathconf( int fd, int name ) { 43378: 4e56 0000 linkw %fp,#0 4337c: 222e 0008 movel %fp@(8),%d1 43380: 202e 000c movel %fp@(12),%d0 long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43384: b2b9 0005 dbd4 cmpl 5dbd4 ,%d1 4338a: 6414 bccs 433a0 iop = rtems_libio_iop(fd); 4338c: 2079 0005 f25c moveal 5f25c ,%a0 43392: ed89 lsll #6,%d1 43394: d1c1 addal %d1,%a0 rtems_libio_check_is_open(iop); 43396: 2228 0014 movel %a0@(20),%d1 4339a: 0801 0008 btst #8,%d1 4339e: 6612 bnes 433b2 <== NEVER TAKEN 433a0: 4eb9 0004 dd7c jsr 4dd7c <__errno> 433a6: 72ff moveq #-1,%d1 433a8: 2040 moveal %d0,%a0 433aa: 7009 moveq #9,%d0 433ac: 2080 movel %d0,%a0@ 433ae: 6000 008a braw 4343a rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 433b2: 0801 0001 btst #1,%d1 433b6: 6774 beqs 4342c <== ALWAYS TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 433b8: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 433bc: 720b moveq #11,%d1 433be: b280 cmpl %d0,%d1 433c0: 656a bcss 4342c <== ALWAYS TAKEN 433c2: 303b 0a08 movew %pc@(433cc ,%d0:l:2),%d0 433c6: 48c0 extl %d0 433c8: 4efb 0802 jmp %pc@(433cc ,%d0:l) 433cc: 0018 030 <== NOT EXECUTED 433ce: 001e 036 <== NOT EXECUTED 433d0: 0024 044 <== NOT EXECUTED 433d2: 002a 052 <== NOT EXECUTED 433d4: 0030 060 <== NOT EXECUTED 433d6: 0036 066 <== NOT EXECUTED 433d8: 003c 074 <== NOT EXECUTED 433da: 0042 0102 <== NOT EXECUTED 433dc: 0048 0110 <== NOT EXECUTED 433de: 004e 0116 <== NOT EXECUTED 433e0: 0054 0124 <== NOT EXECUTED 433e2: 005a 0132 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 433e4: 2228 0038 movel %a0@(56),%d1 break; 433e8: 6050 bras 4343a case _PC_MAX_CANON: return_value = the_limits->max_canon; 433ea: 2228 003c movel %a0@(60),%d1 break; 433ee: 604a bras 4343a case _PC_MAX_INPUT: return_value = the_limits->max_input; 433f0: 2228 0040 movel %a0@(64),%d1 break; 433f4: 6044 bras 4343a case _PC_NAME_MAX: return_value = the_limits->name_max; 433f6: 2228 0044 movel %a0@(68),%d1 break; 433fa: 603e bras 4343a case _PC_PATH_MAX: return_value = the_limits->path_max; 433fc: 2228 0048 movel %a0@(72),%d1 break; 43400: 6038 bras 4343a <== ALWAYS TAKEN case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43402: 2228 004c movel %a0@(76),%d1 break; 43406: 6032 bras 4343a <== ALWAYS TAKEN case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43408: 2228 0054 movel %a0@(84),%d1 break; 4340c: 602c bras 4343a <== ALWAYS TAKEN case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 4340e: 2228 0058 movel %a0@(88),%d1 break; 43412: 6026 bras 4343a <== ALWAYS TAKEN case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43414: 2228 0064 movel %a0@(100),%d1 break; 43418: 6020 bras 4343a <== ALWAYS TAKEN case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 4341a: 2228 0050 movel %a0@(80),%d1 break; 4341e: 601a bras 4343a <== ALWAYS TAKEN case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43420: 2228 005c movel %a0@(92),%d1 break; 43424: 6014 bras 4343a <== ALWAYS TAKEN case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43426: 2228 0060 movel %a0@(96),%d1 break; 4342a: 600e bras 4343a <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); 4342c: 4eb9 0004 dd7c jsr 4dd7c <__errno> 43432: 72ff moveq #-1,%d1 43434: 2040 moveal %d0,%a0 43436: 7016 moveq #22,%d0 43438: 2080 movel %d0,%a0@ break; } return return_value; } 4343a: 2001 movel %d1,%d0 4343c: 4e5e unlk %fp 4343e: 4e75 rts 00048e80 : void free( void *ptr ) { MSBUMP(free_calls, 1); 48e80: 4e56 0000 linkw %fp,#0 48e84: 52b9 0005 b8f0 addql #1,5b8f0 48e8a: 2f02 movel %d2,%sp@- 48e8c: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 48e90: 676c beqs 48efe /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 48e92: 7003 moveq #3,%d0 48e94: b0b9 0005 bbb6 cmpl 5bbb6 <_System_state_Current>,%d0 48e9a: 661a bnes 48eb6 <== ALWAYS TAKEN 48e9c: 4eb9 0004 92cc jsr 492cc 48ea2: 4a00 tstb %d0 48ea4: 6610 bnes 48eb6 <== NEVER TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 48ea6: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 48eaa: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48eae: 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); 48eb0: 4ef9 0004 930a jmp 4930a <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 48eb6: 2079 0005 a8a6 moveal 5a8a6 ,%a0 48ebc: 4a88 tstl %a0 48ebe: 670a beqs 48eca <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 48ec0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48ec2: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 48ec6: 4e90 jsr %a0@ <== NOT EXECUTED 48ec8: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 48eca: 2f02 movel %d2,%sp@- 48ecc: 2f39 0005 a260 movel 5a260 ,%sp@- 48ed2: 4eb9 0004 9e08 jsr 49e08 <_Protected_heap_Free> 48ed8: 508f addql #8,%sp 48eda: 4a00 tstb %d0 48edc: 6620 bnes 48efe <== NEVER TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 48ede: 2079 0005 a260 moveal 5a260 ,%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", 48ee4: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 48ee8: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 48eec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48eee: 4879 0005 96b0 pea 596b0 <== NOT EXECUTED 48ef4: 4eb9 0004 2d30 jsr 42d30 <== NOT EXECUTED 48efa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 48efe: 242e fffc movel %fp@(-4),%d2 48f02: 4e5e unlk %fp 48f04: 4e75 rts ... 00061880 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 61880: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 61884: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61886: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 6188a: b5fc 0009 a6bc cmpal #632508,%a2 <== NOT EXECUTED 61890: 6740 beqs 618d2 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 61892: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 61896: 4a88 tstl %a0 <== NOT EXECUTED 61898: 6710 beqs 618aa <== NOT EXECUTED 6189a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6189e: 4a88 tstl %a0 <== NOT EXECUTED 618a0: 6708 beqs 618aa <== NOT EXECUTED 618a2: 486a 0004 pea %a2@(4) <== NOT EXECUTED 618a6: 4e90 jsr %a0@ <== NOT EXECUTED 618a8: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 618aa: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 618ae: 4a88 tstl %a0 <== NOT EXECUTED 618b0: 6710 beqs 618c2 <== NOT EXECUTED 618b2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 618b6: 4a88 tstl %a0 <== NOT EXECUTED 618b8: 6708 beqs 618c2 <== NOT EXECUTED 618ba: 486a 0018 pea %a2@(24) <== NOT EXECUTED 618be: 4e90 jsr %a0@ <== NOT EXECUTED 618c0: 588f addql #4,%sp <== NOT EXECUTED free(env); 618c2: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 618c6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 618ca: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 618cc: 4ef9 0004 6630 jmp 46630 <== NOT EXECUTED } } 618d2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 618d6: 4e5e unlk %fp <== NOT EXECUTED 618d8: 4e75 rts 000581d0 : int fstat( int fd, struct stat *sbuf ) { 581d0: 4e56 0000 linkw %fp,#0 581d4: 202e 0008 movel %fp@(8),%d0 581d8: 2f0a movel %a2,%sp@- 581da: 2f02 movel %d2,%sp@- 581dc: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 581e0: 660e bnes 581f0 rtems_set_errno_and_return_minus_one( EFAULT ); 581e2: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 581e8: 720e moveq #14,%d1 581ea: 2040 moveal %d0,%a0 581ec: 2081 movel %d1,%a0@ 581ee: 607c bras 5826c <== ALWAYS TAKEN /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 581f0: b0b9 0005 a254 cmpl 5a254 ,%d0 581f6: 641e bccs 58216 581f8: 2479 0005 b8d8 moveal 5b8d8 ,%a2 581fe: ed88 lsll #6,%d0 58200: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 58202: 202a 0014 movel %a2@(20),%d0 58206: 0280 0000 0100 andil #256,%d0 5820c: 6708 beqs 58216 <== ALWAYS TAKEN if ( !iop->handlers ) 5820e: 206a 003c moveal %a2@(60),%a0 58212: 4a88 tstl %a0 58214: 660e bnes 58224 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 58216: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 5821c: 2040 moveal %d0,%a0 5821e: 7009 moveq #9,%d0 58220: 2080 movel %d0,%a0@ 58222: 6048 bras 5826c <== ALWAYS TAKEN if ( !iop->handlers->fstat_h ) 58224: 4aa8 0018 tstl %a0@(24) 58228: 6610 bnes 5823a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5822a: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 58230: 2040 moveal %d0,%a0 <== NOT EXECUTED 58232: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 58238: 6032 bras 5826c <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5823a: 4878 0046 pea 46 5823e: 42a7 clrl %sp@- 58240: 2f02 movel %d2,%sp@- 58242: 4eb9 0004 c270 jsr 4c270 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 58248: 206a 003c moveal %a2@(60),%a0 5824c: 45ea 0018 lea %a2@(24),%a2 58250: 4fef 000c lea %sp@(12),%sp 58254: 2d42 000c movel %d2,%fp@(12) } 58258: 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 ); 5825c: 2d4a 0008 movel %a2,%fp@(8) } 58260: 246e fffc moveal %fp@(-4),%a2 58264: 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 ); 58266: 2268 0018 moveal %a0@(24),%a1 5826a: 4ed1 jmp %a1@ } 5826c: 242e fff8 movel %fp@(-8),%d2 58270: 70ff moveq #-1,%d0 58272: 246e fffc moveal %fp@(-4),%a2 58276: 4e5e unlk %fp 58278: 4e75 rts 00060914 : #include int fsync( int fd ) { 60914: 4e56 0000 linkw %fp,#0 60918: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 6091c: b0b9 0009 5a34 cmpl 95a34 ,%d0 60922: 642e bccs 60952 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 60924: 2079 0009 a660 moveal 9a660 ,%a0 6092a: ed88 lsll #6,%d0 6092c: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 6092e: 2028 0014 movel %a0@(20),%d0 60932: 0800 0008 btst #8,%d0 60936: 671a beqs 60952 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 60938: 44c0 movew %d0,%ccr 6093a: 670e beqs 6094a 6093c: 4eb9 0007 4e84 jsr 74e84 <__errno> 60942: 7216 moveq #22,%d1 60944: 2040 moveal %d0,%a0 60946: 2081 movel %d1,%a0@ 60948: 6036 bras 60980 <== ALWAYS TAKEN /* * Now process the fsync(). */ if ( !iop->handlers ) 6094a: 2268 003c moveal %a0@(60),%a1 6094e: 4a89 tstl %a1 60950: 660e bnes 60960 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 60952: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 60958: 2040 moveal %d0,%a0 <== NOT EXECUTED 6095a: 7009 moveq #9,%d0 <== NOT EXECUTED 6095c: 2080 movel %d0,%a0@ <== NOT EXECUTED 6095e: 6020 bras 60980 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 60960: 2269 0028 moveal %a1@(40),%a1 60964: 4a89 tstl %a1 60966: 6610 bnes 60978 rtems_set_errno_and_return_minus_one( ENOTSUP ); 60968: 4eb9 0007 4e84 jsr 74e84 <__errno> 6096e: 2040 moveal %d0,%a0 60970: 20bc 0000 0086 movel #134,%a0@ 60976: 6008 bras 60980 <== ALWAYS TAKEN return (*iop->handlers->fsync_h)( iop ); 60978: 2d48 0008 movel %a0,%fp@(8) } 6097c: 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 ); 6097e: 4ed1 jmp %a1@ } 60980: 70ff moveq #-1,%d0 60982: 4e5e unlk %fp 60984: 4e75 rts ... 00048f08 : int ftruncate( int fd, off_t length ) { 48f08: 4e56 ffec linkw %fp,#-20 48f0c: 202e 0008 movel %fp@(8),%d0 48f10: 2f0a movel %a2,%sp@- 48f12: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 48f14: b0b9 0005 a254 cmpl 5a254 ,%d0 48f1a: 6416 bccs 48f32 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 48f1c: 2479 0005 b8d8 moveal 5b8d8 ,%a2 48f22: ed88 lsll #6,%d0 48f24: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 48f26: 202a 0014 movel %a2@(20),%d0 48f2a: 0280 0000 0100 andil #256,%d0 48f30: 6612 bnes 48f44 <== NEVER TAKEN 48f32: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48f38: 72ff moveq #-1,%d1 <== NOT EXECUTED 48f3a: 2040 moveal %d0,%a0 <== NOT EXECUTED 48f3c: 7009 moveq #9,%d0 <== NOT EXECUTED 48f3e: 2080 movel %d0,%a0@ <== NOT EXECUTED 48f40: 6000 008e braw 48fd0 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 48f44: 4878 0014 pea 14 48f48: 240e movel %fp,%d2 48f4a: 486a 0018 pea %a2@(24) 48f4e: 0682 ffff ffec addil #-20,%d2 48f54: 2f02 movel %d2,%sp@- 48f56: 4eb9 0004 c200 jsr 4c200 if ( !loc.ops->node_type_h ) 48f5c: 206e fff8 moveal %fp@(-8),%a0 48f60: 4fef 000c lea %sp@(12),%sp 48f64: 2068 0010 moveal %a0@(16),%a0 48f68: 4a88 tstl %a0 48f6a: 6740 beqs 48fac <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 48f6c: 2f02 movel %d2,%sp@- 48f6e: 4e90 jsr %a0@ 48f70: 588f addql #4,%sp 48f72: 7201 moveq #1,%d1 48f74: b280 cmpl %d0,%d1 48f76: 6610 bnes 48f88 rtems_set_errno_and_return_minus_one( EISDIR ); 48f78: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 48f7e: 7415 moveq #21,%d2 48f80: 72ff moveq #-1,%d1 48f82: 2040 moveal %d0,%a0 48f84: 2082 movel %d2,%a0@ 48f86: 6048 bras 48fd0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 48f88: 7004 moveq #4,%d0 48f8a: c0aa 0014 andl %a2@(20),%d0 48f8e: 6610 bnes 48fa0 <== NEVER TAKEN 48f90: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48f96: 72ff moveq #-1,%d1 <== NOT EXECUTED 48f98: 2040 moveal %d0,%a0 <== NOT EXECUTED 48f9a: 7016 moveq #22,%d0 <== NOT EXECUTED 48f9c: 2080 movel %d0,%a0@ <== NOT EXECUTED 48f9e: 6030 bras 48fd0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 48fa0: 206a 003c moveal %a2@(60),%a0 48fa4: 2068 0020 moveal %a0@(32),%a0 48fa8: 4a88 tstl %a0 48faa: 6612 bnes 48fbe <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 48fac: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48fb2: 72ff moveq #-1,%d1 <== NOT EXECUTED 48fb4: 2040 moveal %d0,%a0 <== NOT EXECUTED 48fb6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 48fbc: 6012 bras 48fd0 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); 48fbe: 2f2e 0010 movel %fp@(16),%sp@- 48fc2: 2f2e 000c movel %fp@(12),%sp@- 48fc6: 2f0a movel %a2,%sp@- 48fc8: 4e90 jsr %a0@ 48fca: 4fef 000c lea %sp@(12),%sp 48fce: 2200 movel %d0,%d1 } 48fd0: 242e ffe4 movel %fp@(-28),%d2 48fd4: 2001 movel %d1,%d0 48fd6: 246e ffe8 moveal %fp@(-24),%a2 48fda: 4e5e unlk %fp 48fdc: 4e75 rts ... 0008bd44 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8bd44: 4e56 ffec linkw %fp,#-20 8bd48: 202e 0008 movel %fp@(8),%d0 8bd4c: 2f0a movel %a2,%sp@- 8bd4e: 2f02 movel %d2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8bd50: b0b9 0009 5a34 cmpl 95a34 ,%d0 8bd56: 6504 bcss 8bd5c <== NEVER TAKEN 8bd58: 95ca subal %a2,%a2 <== NOT EXECUTED 8bd5a: 600a bras 8bd66 <== NOT EXECUTED 8bd5c: 2479 0009 a660 moveal 9a660 ,%a2 8bd62: ed88 lsll #6,%d0 8bd64: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 8bd66: 4878 0014 pea 14 8bd6a: 240e movel %fp,%d2 8bd6c: 486a 0018 pea %a2@(24) 8bd70: 0682 ffff ffec addil #-20,%d2 8bd76: 2f02 movel %d2,%sp@- 8bd78: 4eb9 0007 7ebc jsr 77ebc if ( !loc.ops->node_type_h ) 8bd7e: 206e fff8 moveal %fp@(-8),%a0 8bd82: 4fef 000c lea %sp@(12),%sp 8bd86: 2068 0010 moveal %a0@(16),%a0 8bd8a: 4a88 tstl %a0 8bd8c: 6728 beqs 8bdb6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 8bd8e: 2f02 movel %d2,%sp@- 8bd90: 4e90 jsr %a0@ 8bd92: 588f addql #4,%sp 8bd94: 7201 moveq #1,%d1 8bd96: b280 cmpl %d0,%d1 8bd98: 6710 beqs 8bdaa rtems_set_errno_and_return_minus_one( ENOTDIR ); 8bd9a: 4eb9 0007 4e84 jsr 74e84 <__errno> 8bda0: 72ff moveq #-1,%d1 8bda2: 2040 moveal %d0,%a0 8bda4: 7014 moveq #20,%d0 8bda6: 2080 movel %d0,%a0@ 8bda8: 6030 bras 8bdda <== ALWAYS TAKEN /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 8bdaa: 206a 003c moveal %a2@(60),%a0 8bdae: 2068 0008 moveal %a0@(8),%a0 8bdb2: 4a88 tstl %a0 8bdb4: 6612 bnes 8bdc8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 8bdb6: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 8bdbc: 72ff moveq #-1,%d1 <== NOT EXECUTED 8bdbe: 2040 moveal %d0,%a0 <== NOT EXECUTED 8bdc0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 8bdc6: 6012 bras 8bdda <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 8bdc8: 2f2e 0010 movel %fp@(16),%sp@- 8bdcc: 2f2e 000c movel %fp@(12),%sp@- 8bdd0: 2f0a movel %a2,%sp@- 8bdd2: 4e90 jsr %a0@ 8bdd4: 4fef 000c lea %sp@(12),%sp 8bdd8: 2200 movel %d0,%d1 } 8bdda: 242e ffe4 movel %fp@(-28),%d2 8bdde: 2001 movel %d1,%d0 8bde0: 246e ffe8 moveal %fp@(-24),%a2 8bde4: 4e5e unlk %fp 8bde6: 4e75 rts 00060a88 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 60a88: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 60a8c: 2079 0009 5d3c moveal 95d3c ,%a0 <== NOT EXECUTED return _POSIX_types_Gid; } 60a92: 4e5e unlk %fp <== NOT EXECUTED 60a94: 3028 0034 movew %a0@(52),%d0 <== NOT EXECUTED 60a98: 4e75 rts 00060f9e : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 60f9e: 4e56 ffe0 linkw %fp,#-32 60fa2: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 60fa6: 262e 0008 movel %fp@(8),%d3 60faa: 282e 000c movel %fp@(12),%d4 60fae: 246e 0010 moveal %fp@(16),%a2 60fb2: 2a2e 0014 movel %fp@(20),%d5 60fb6: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 60fba: 4eb9 0006 0e84 jsr 60e84 if ((fp = fopen("/etc/group", "r")) == NULL) { 60fc0: 4879 0008 e547 pea 8e547 60fc6: 4879 0008 cc55 pea 8cc55 <_rodata_start+0x845> 60fcc: 4eb9 0007 5828 jsr 75828 60fd2: 508f addql #8,%sp 60fd4: 2400 movel %d0,%d2 60fd6: 6610 bnes 60fe8 <== NEVER TAKEN errno = EINVAL; 60fd8: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 60fde: 7216 moveq #22,%d1 <== NOT EXECUTED 60fe0: 2040 moveal %d0,%a0 <== NOT EXECUTED 60fe2: 70ff moveq #-1,%d0 <== NOT EXECUTED 60fe4: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 60fe6: 606a bras 61052 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 60fe8: 49fa fc3c lea %pc@(60c26 ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 60fec: 47f9 0007 a970 lea 7a970 ,%a3 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 60ff2: 2f06 movel %d6,%sp@- 60ff4: 2f05 movel %d5,%sp@- 60ff6: 2f0a movel %a2,%sp@- 60ff8: 2f02 movel %d2,%sp@- 60ffa: 4e94 jsr %a4@ 60ffc: 4fef 0010 lea %sp@(16),%sp 61000: 4a80 tstl %d0 61002: 661a bnes 6101e <== NEVER TAKEN errno = EINVAL; 61004: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 6100a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6100c: 7016 moveq #22,%d0 <== NOT EXECUTED 6100e: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 61010: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61012: 4eb9 0007 4fc2 jsr 74fc2 <== NOT EXECUTED return -1; 61018: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 6101a: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 6101c: 6034 bras 61052 <== NOT EXECUTED } if (name) { 6101e: 4a83 tstl %d3 61020: 670e beqs 61030 <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); 61022: 2f03 movel %d3,%sp@- 61024: 2f12 movel %a2@,%sp@- 61026: 4e93 jsr %a3@ 61028: 508f addql #8,%sp 6102a: 4a80 tstl %d0 6102c: 57c0 seq %d0 6102e: 600a bras 6103a <== ALWAYS TAKEN } else { match = (grp->gr_gid == gid); 61030: 4280 clrl %d0 <== NOT EXECUTED 61032: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 61036: b880 cmpl %d0,%d4 <== NOT EXECUTED 61038: 57c0 seq %d0 <== NOT EXECUTED 6103a: 49c0 extbl %d0 6103c: 4480 negl %d0 } if (match) { 6103e: 67b2 beqs 60ff2 fclose(fp); 61040: 2f02 movel %d2,%sp@- 61042: 4eb9 0007 4fc2 jsr 74fc2 *result = grp; 61048: 206e 001c moveal %fp@(28),%a0 return 0; 6104c: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 6104e: 4280 clrl %d0 61050: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 61052: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 61058: 4e5e unlk %fp 6105a: 4e75 rts 00060d2c : return NULL; return p; } struct group *getgrent(void) { 60d2c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 60d30: 2039 0009 9df2 movel 99df2 ,%d0 <== NOT EXECUTED 60d36: 6724 beqs 60d5c <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 60d38: 4878 00c8 pea c8 <== NOT EXECUTED 60d3c: 4879 0009 9df6 pea 99df6 <== NOT EXECUTED 60d42: 4879 0009 9ebe pea 99ebe <== NOT EXECUTED 60d48: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60d4a: 4eba feda jsr %pc@(60c26 ) <== NOT EXECUTED 60d4e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 60d52: 223c 0009 9ebe movel #630462,%d1 <== NOT EXECUTED 60d58: 4a80 tstl %d0 <== NOT EXECUTED 60d5a: 6602 bnes 60d5e <== NOT EXECUTED 60d5c: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 60d5e: 2001 movel %d1,%d0 <== NOT EXECUTED 60d60: 4e5e unlk %fp <== NOT EXECUTED 60d62: 4e75 rts 00061082 : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 61082: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 61084: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 61088: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 6108c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 61090: 4878 00c8 pea c8 <== NOT EXECUTED 61094: 4879 0009 9df6 pea 99df6 <== NOT EXECUTED 6109a: 4879 0009 9ebe pea 99ebe <== NOT EXECUTED 610a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 610a2: 4eb9 0006 105c jsr 6105c <== NOT EXECUTED 610a8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 610ac: 4a80 tstl %d0 <== NOT EXECUTED 610ae: 6704 beqs 610b4 <== NOT EXECUTED 610b0: 4280 clrl %d0 <== NOT EXECUTED 610b2: 6004 bras 610b8 <== NOT EXECUTED return NULL; return p; 610b4: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 610b8: 4e5e unlk %fp <== NOT EXECUTED 610ba: 4e75 rts 0006105c : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 6105c: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 6105e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 61062: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 61066: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 6106a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 6106e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 61072: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 61076: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61078: 42a7 clrl %sp@- <== NOT EXECUTED 6107a: 4eba ff22 jsr %pc@(60f9e ) <== NOT EXECUTED } 6107e: 4e5e unlk %fp <== NOT EXECUTED 61080: 4e75 rts 000610de : struct group *getgrnam( const char *name ) { 610de: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 610e2: 486e fffc pea %fp@(-4) 610e6: 4878 00c8 pea c8 610ea: 4879 0009 9df6 pea 99df6 610f0: 4879 0009 9ebe pea 99ebe 610f6: 2f2e 0008 movel %fp@(8),%sp@- 610fa: 4eb9 0006 10bc jsr 610bc 61100: 4fef 0014 lea %sp@(20),%sp 61104: 4a80 tstl %d0 61106: 6704 beqs 6110c <== NEVER TAKEN 61108: 4280 clrl %d0 <== NOT EXECUTED 6110a: 6004 bras 61110 <== NOT EXECUTED return NULL; return p; 6110c: 202e fffc movel %fp@(-4),%d0 } 61110: 4e5e unlk %fp 61112: 4e75 rts 00058294 : */ pid_t getpid( void ) { return _Objects_Local_node; } 58294: 7001 moveq #1,%d0 <== NOT EXECUTED * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 58296: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return _Objects_Local_node; } 5829a: 4e5e unlk %fp <== NOT EXECUTED 5829c: 4e75 rts 0006114e : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 6114e: 4e56 ffe0 linkw %fp,#-32 61152: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 61156: 262e 0008 movel %fp@(8),%d3 6115a: 282e 000c movel %fp@(12),%d4 6115e: 246e 0010 moveal %fp@(16),%a2 61162: 2a2e 0014 movel %fp@(20),%d5 61166: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 6116a: 4eb9 0006 0e84 jsr 60e84 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 61170: 4879 0008 e547 pea 8e547 61176: 4879 0008 cc10 pea 8cc10 <_rodata_start+0x800> 6117c: 4eb9 0007 5828 jsr 75828 61182: 508f addql #8,%sp 61184: 2400 movel %d0,%d2 61186: 6610 bnes 61198 <== NEVER TAKEN errno = EINVAL; 61188: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 6118e: 7816 moveq #22,%d4 <== NOT EXECUTED 61190: 2040 moveal %d0,%a0 <== NOT EXECUTED 61192: 70ff moveq #-1,%d0 <== NOT EXECUTED 61194: 2084 movel %d4,%a0@ <== NOT EXECUTED return -1; 61196: 606a bras 61202 <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 61198: 49fa fbca lea %pc@(60d64 ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 6119c: 47f9 0007 a970 lea 7a970 ,%a3 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 611a2: 2f06 movel %d6,%sp@- 611a4: 2f05 movel %d5,%sp@- 611a6: 2f0a movel %a2,%sp@- 611a8: 2f02 movel %d2,%sp@- 611aa: 4e94 jsr %a4@ 611ac: 4fef 0010 lea %sp@(16),%sp 611b0: 4a80 tstl %d0 611b2: 661a bnes 611ce <== NEVER TAKEN errno = EINVAL; 611b4: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 611ba: 7616 moveq #22,%d3 <== NOT EXECUTED 611bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 611be: 2083 movel %d3,%a0@ <== NOT EXECUTED fclose(fp); 611c0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 611c2: 4eb9 0007 4fc2 jsr 74fc2 <== NOT EXECUTED return -1; 611c8: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 611ca: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 611cc: 6034 bras 61202 <== NOT EXECUTED } if (name) { 611ce: 4a83 tstl %d3 611d0: 670e beqs 611e0 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); 611d2: 2f03 movel %d3,%sp@- 611d4: 2f12 movel %a2@,%sp@- 611d6: 4e93 jsr %a3@ 611d8: 508f addql #8,%sp 611da: 4a80 tstl %d0 611dc: 57c0 seq %d0 611de: 600a bras 611ea <== ALWAYS TAKEN } else { match = (pwd->pw_uid == uid); 611e0: 4280 clrl %d0 <== NOT EXECUTED 611e2: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 611e6: b880 cmpl %d0,%d4 <== NOT EXECUTED 611e8: 57c0 seq %d0 <== NOT EXECUTED 611ea: 49c0 extbl %d0 611ec: 4480 negl %d0 } if (match) { 611ee: 67b2 beqs 611a2 fclose(fp); 611f0: 2f02 movel %d2,%sp@- 611f2: 4eb9 0007 4fc2 jsr 74fc2 *result = pwd; 611f8: 206e 001c moveal %fp@(28),%a0 return 0; 611fc: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 611fe: 4280 clrl %d0 61200: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 61202: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 61208: 4e5e unlk %fp 6120a: 4e75 rts 00060e4c : return NULL; return p; } struct passwd *getpwent(void) { 60e4c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 60e50: 2039 0009 9d0a movel 99d0a ,%d0 <== NOT EXECUTED 60e56: 6724 beqs 60e7c <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 60e58: 4878 00c8 pea c8 <== NOT EXECUTED 60e5c: 4879 0009 9d0e pea 99d0e <== NOT EXECUTED 60e62: 4879 0009 9dd6 pea 99dd6 <== NOT EXECUTED 60e68: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60e6a: 4eba fef8 jsr %pc@(60d64 ) <== NOT EXECUTED 60e6e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 60e72: 223c 0009 9dd6 movel #630230,%d1 <== NOT EXECUTED 60e78: 4a80 tstl %d0 <== NOT EXECUTED 60e7a: 6602 bnes 60e7e <== NOT EXECUTED 60e7c: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 60e7e: 2001 movel %d1,%d0 <== NOT EXECUTED 60e80: 4e5e unlk %fp <== NOT EXECUTED 60e82: 4e75 rts 0006128e : struct passwd *getpwnam( const char *name ) { 6128e: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 61292: 486e fffc pea %fp@(-4) 61296: 4878 00c8 pea c8 6129a: 4879 0009 9d0e pea 99d0e 612a0: 4879 0009 9dd6 pea 99dd6 612a6: 2f2e 0008 movel %fp@(8),%sp@- 612aa: 4eb9 0006 126c jsr 6126c 612b0: 4fef 0014 lea %sp@(20),%sp 612b4: 4a80 tstl %d0 612b6: 6704 beqs 612bc <== NEVER TAKEN 612b8: 4280 clrl %d0 <== NOT EXECUTED 612ba: 6004 bras 612c0 <== NOT EXECUTED return NULL; return p; 612bc: 202e fffc movel %fp@(-4),%d0 } 612c0: 4e5e unlk %fp 612c2: 4e75 rts 00061232 : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 61232: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 61234: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 61238: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 6123c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 61240: 4878 00c8 pea c8 <== NOT EXECUTED 61244: 4879 0009 9d0e pea 99d0e <== NOT EXECUTED 6124a: 4879 0009 9dd6 pea 99dd6 <== NOT EXECUTED 61250: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61252: 4eb9 0006 120c jsr 6120c <== NOT EXECUTED 61258: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 6125c: 4a80 tstl %d0 <== NOT EXECUTED 6125e: 6704 beqs 61264 <== NOT EXECUTED 61260: 4280 clrl %d0 <== NOT EXECUTED 61262: 6004 bras 61268 <== NOT EXECUTED return NULL; return p; 61264: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 61268: 4e5e unlk %fp <== NOT EXECUTED 6126a: 4e75 rts 0006120c : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 6120c: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 6120e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 61212: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 61216: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 6121a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 6121e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 61222: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 61226: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61228: 42a7 clrl %sp@- <== NOT EXECUTED 6122a: 4eba ff22 jsr %pc@(6114e ) <== NOT EXECUTED } 6122e: 4e5e unlk %fp <== NOT EXECUTED 61230: 4e75 rts 00048fe0 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 48fe0: 4e56 ffec linkw %fp,#-20 48fe4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48fe8: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 48fec: 4a8a tstl %a2 48fee: 6610 bnes 49000 <== NEVER TAKEN errno = EFAULT; 48ff0: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 48ff6: 720e moveq #14,%d1 <== NOT EXECUTED 48ff8: 2040 moveal %d0,%a0 <== NOT EXECUTED 48ffa: 70ff moveq #-1,%d0 <== NOT EXECUTED 48ffc: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 48ffe: 6032 bras 49032 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 49000: 203c 0000 0700 movel #1792,%d0 49006: 40c2 movew %sr,%d2 49008: 8082 orl %d2,%d0 4900a: 46c0 movew %d0,%sr _TOD_Get( &now ); 4900c: 486e fff8 pea %fp@(-8) 49010: 4eb9 0004 9a08 jsr 49a08 <_TOD_Get> _ISR_Enable(level); 49016: 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; 49018: 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; 4901e: 588f addql #4,%sp 49020: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 49022: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 49026: 4c43 1801 remsl %d3,%d1,%d1 4902a: 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; 4902e: 24ae fff8 movel %fp@(-8),%a2@ } 49032: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 49038: 4e5e unlk %fp 4903a: 4e75 rts 0004673c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 4673c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 46740: 2079 0009 5d3c moveal 95d3c ,%a0 <== NOT EXECUTED return _POSIX_types_Uid; } 46746: 4e5e unlk %fp <== NOT EXECUTED 46748: 3028 0032 movew %a0@(50),%d0 <== NOT EXECUTED 4674c: 4e75 rts 0004fce4 : int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4fce4: 4e56 0000 linkw %fp,#0 4fce8: 206e 0008 moveal %fp@(8),%a0 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; 4fcec: 2250 moveal %a0@,%a1 4fcee: 2009 movel %a1,%d0 4fcf0: 0680 0000 0050 addil #80,%d0 int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4fcf6: 206e 000c moveal %fp@(12),%a0 the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; 4fcfa: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_mode = the_jnode->st_mode; 4fd00: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 4fd06: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; 4fd0c: 42a8 003e clrl %a0@(62) buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; 4fd10: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; 4fd16: 42a8 0042 clrl %a0@(66) buf->st_atime = the_jnode->stat_atime; 4fd1a: 2169 003c 0026 movel %a1@(60),%a0@(38) int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4fd20: 2f03 movel %d3,%sp@- buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4fd22: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4fd28: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4fd2e: 3169 003a 0014 movew %a1@(58),%a0@(20) int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4fd34: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; 4fd36: 4281 clrl %d1 4fd38: 4282 clrl %d2 4fd3a: 2081 movel %d1,%a0@ 4fd3c: 2142 0004 movel %d2,%a0@(4) buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; 4fd40: 2141 0016 movel %d1,%a0@(22) 4fd44: 2142 001a movel %d2,%a0@(26) buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_size = 0; 4fd48: 2141 001e movel %d1,%a0@(30) 4fd4c: 2142 0022 movel %d2,%a0@(34) the_chain = &the_jnode->info.directory.Entries; /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; 4fd50: 2269 004c moveal %a1@(76),%a1 4fd54: 6018 bras 4fd6e <== ALWAYS TAKEN !rtems_chain_is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 4fd56: 2251 moveal %a1@,%a1 buf->st_size = buf->st_size + sizeof( struct dirent ); 4fd58: 4282 clrl %d2 4fd5a: 263c 0000 0110 movel #272,%d3 4fd60: d7a8 0022 addl %d3,%a0@(34) 4fd64: 2228 001e movel %a0@(30),%d1 4fd68: d382 addxl %d2,%d1 4fd6a: 2141 001e movel %d1,%a0@(30) the_chain = &the_jnode->info.directory.Entries; /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; 4fd6e: b089 cmpl %a1,%d0 4fd70: 66e4 bnes 4fd56 buf->st_size = buf->st_size + sizeof( struct dirent ); } return 0; } 4fd72: 241f movel %sp@+,%d2 4fd74: 4280 clrl %d0 4fd76: 261f movel %sp@+,%d3 4fd78: 4e5e unlk %fp 4fd7a: 4e75 rts 0004fd7c : rtems_libio_t *iop, rtems_off64_t offset, int whence ) { switch( whence ) { 4fd7c: 7001 moveq #1,%d0 rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4fd7e: 4e56 ffe8 linkw %fp,#-24 4fd82: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4fd86: 246e 0008 moveal %fp@(8),%a2 switch( whence ) { 4fd8a: b0ae 0014 cmpl %fp@(20),%d0 4fd8e: 654e bcss 4fdde case SEEK_SET: /* absolute move from the start of the file */ case SEEK_CUR: /* relative move */ iop->offset = (iop->offset/sizeof(struct dirent)) * 4fd90: 4878 0110 pea 110 4fd94: 741c moveq #28,%d2 4fd96: 42a7 clrl %sp@- 4fd98: 2f2a 0010 movel %a2@(16),%sp@- 4fd9c: 2f2a 000c movel %a2@(12),%sp@- 4fda0: 4eb9 0005 c02c jsr 5c02c <__divdi3> 4fda6: 4fef 0010 lea %sp@(16),%sp 4fdaa: 2c01 movel %d1,%d6 4fdac: e4ae lsrl %d2,%d6 4fdae: 2400 movel %d0,%d2 4fdb0: 2601 movel %d1,%d3 4fdb2: 721c moveq #28,%d1 4fdb4: e98a lsll #4,%d2 4fdb6: e98b lsll #4,%d3 4fdb8: 91c8 subal %a0,%a0 4fdba: 93c9 subal %a1,%a1 4fdbc: 8486 orl %d6,%d2 4fdbe: 2003 movel %d3,%d0 4fdc0: e2a8 lsrl %d1,%d0 4fdc2: 2802 movel %d2,%d4 4fdc4: 2a03 movel %d3,%d5 4fdc6: e98c lsll #4,%d4 4fdc8: e98d lsll #4,%d5 4fdca: 8880 orl %d0,%d4 4fdcc: 2002 movel %d2,%d0 4fdce: 2203 movel %d3,%d1 4fdd0: d285 addl %d5,%d1 4fdd2: d184 addxl %d4,%d0 4fdd4: 2540 000c movel %d0,%a2@(12) 4fdd8: 2541 0010 movel %d1,%a2@(16) default: rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; 4fddc: 6014 bras 4fdf2 <== ALWAYS TAKEN break; case SEEK_END: /* Movement past the end of the directory via lseek */ /* is not a permitted operation */ default: rtems_set_errno_and_return_minus_one( EINVAL ); 4fdde: 4eb9 0005 0460 jsr 50460 <__errno> 4fde4: 2440 moveal %d0,%a2 4fde6: 7016 moveq #22,%d0 4fde8: 307c ffff moveaw #-1,%a0 4fdec: 327c ffff moveaw #-1,%a1 4fdf0: 2480 movel %d0,%a2@ break; } return 0; } 4fdf2: 2209 movel %a1,%d1 4fdf4: 2008 movel %a0,%d0 4fdf6: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4fdfc: 4e5e unlk %fp 4fdfe: 4e75 rts 0004fcac : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4fcac: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4fcae: 4e56 0000 linkw %fp,#0 4fcb2: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4fcb6: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4fcba: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 4fcbc: b0a9 0048 cmpl %a1@(72),%d0 4fcc0: 6704 beqs 4fcc6 <== NEVER TAKEN 4fcc2: 70ff moveq #-1,%d0 <== NOT EXECUTED 4fcc4: 600e bras 4fcd4 <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4fcc6: 4280 clrl %d0 4fcc8: 4281 clrl %d1 4fcca: 4282 clrl %d2 4fccc: 2141 000c movel %d1,%a0@(12) 4fcd0: 2142 0010 movel %d2,%a0@(16) return 0; } 4fcd4: 241f movel %sp@+,%d2 4fcd6: 4e5e unlk %fp 4fcd8: 4e75 rts 0004fec0 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4fec0: 4e56 fec0 linkw %fp,#-320 4fec4: 202e 0010 movel %fp@(16),%d0 4fec8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fecc: 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; 4fed0: 206b 0038 moveal %a3@(56),%a0 4fed4: 2c08 movel %a0,%d6 4fed6: 0686 0000 0050 addil #80,%d6 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4fedc: 2468 004c moveal %a0@(76),%a2 the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 4fee0: bc8a cmpl %a2,%d6 4fee2: 6606 bnes 4feea 4fee4: 4282 clrl %d2 4fee6: 6000 00be braw 4ffa6 <== ALWAYS TAKEN 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); 4feea: 2e3c 0000 0110 movel #272,%d7 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 ); 4fef0: 2a0e movel %fp,%d5 4fef2: 0685 ffff fef0 addil #-272,%d5 4fef8: 2045 moveal %d5,%a0 4fefa: 41e8 0010 lea %a0@(16),%a0 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); 4fefe: 4283 clrl %d3 4ff00: 4282 clrl %d2 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 ); 4ff02: 4bf9 0005 1330 lea 51330 ,%a5 memcpy( 4ff08: 49f9 0005 0c80 lea 50c80 ,%a4 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); 4ff0e: 4c47 0000 remul %d7,%d0,%d0 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 4ff12: 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); 4ff16: 2200 movel %d0,%d1 4ff18: e988 lsll #4,%d0 4ff1a: e189 lsll #8,%d1 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 ); 4ff1c: 2d48 fee8 movel %a0,%fp@(-280) 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); 4ff20: d081 addl %d1,%d0 4ff22: d084 addl %d4,%d0 4ff24: 2d40 feec movel %d0,%fp@(-276) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 4ff28: 6076 bras 4ffa0 <== ALWAYS TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 4ff2a: bc8a cmpl %a2,%d6 4ff2c: 6778 beqs 4ffa6 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 4ff2e: b883 cmpl %d3,%d4 4ff30: 6e66 bgts 4ff98 /* 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 ); 4ff32: 2e0a movel %a2,%d7 4ff34: 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; 4ff3a: 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 ); 4ff40: 323c 0110 movew #272,%d1 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 4ff44: 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 ); 4ff46: 3d41 fefc movew %d1,%fp@(-260) /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 4ff4a: 2d43 fef8 movel %d3,%fp@(-264) 4ff4e: 5bc0 smi %d0 4ff50: 49c0 extbl %d0 4ff52: 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 ); 4ff56: 4eb9 0005 17dc jsr 517dc strcpy( tmp_dirent.d_name, the_jnode->name ); 4ff5c: 2e87 movel %d7,%sp@ 4ff5e: 2f2e fee8 movel %fp@(-280),%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 ); 4ff62: 3d40 fefe movew %d0,%fp@(-258) strcpy( tmp_dirent.d_name, the_jnode->name ); 4ff66: 4e95 jsr %a5@ memcpy( 4ff68: 4878 0110 pea 110 4ff6c: 206e 000c moveal %fp@(12),%a0 4ff70: 2f05 movel %d5,%sp@- 4ff72: 4870 2800 pea %a0@(00000000,%d2:l) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 4ff76: 0682 0000 0110 addil #272,%d2 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( 4ff7c: 4e94 jsr %a4@ buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 4ff7e: 4fef 0014 lea %sp@(20),%sp memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 4ff82: 4280 clrl %d0 4ff84: 223c 0000 0110 movel #272,%d1 4ff8a: d3ab 0010 addl %d1,%a3@(16) 4ff8e: 2e2b 000c movel %a3@(12),%d7 4ff92: df80 addxl %d0,%d7 4ff94: 2747 000c movel %d7,%a3@(12) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 4ff98: 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( 4ff9a: 0683 0000 0110 addil #272,%d3 /* 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 ( 4ffa0: b6ae feec cmpl %fp@(-276),%d3 4ffa4: 6d84 blts 4ff2a the_node = the_node->next; } /* Success */ return bytes_transferred; } 4ffa6: 2002 movel %d2,%d0 4ffa8: 4cee 3cfc fec0 moveml %fp@(-320),%d2-%d7/%a2-%a5 4ffae: 4e5e unlk %fp 4ffb0: 4e75 rts ... 0004fe00 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4fe00: 4e56 fff8 linkw %fp,#-8 4fe04: 2f0b movel %a3,%sp@- 4fe06: 266e 000c moveal %fp@(12),%a3 4fe0a: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4fe0c: 2453 moveal %a3@,%a2 4fe0e: 200a movel %a2,%d0 4fe10: 0680 0000 0050 addil #80,%d0 4fe16: b0aa 004c cmpl %a2@(76),%d0 4fe1a: 6712 beqs 4fe2e /* * 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 ); 4fe1c: 4eb9 0005 0460 jsr 50460 <__errno> 4fe22: 72ff moveq #-1,%d1 4fe24: 2040 moveal %d0,%a0 4fe26: 705a moveq #90,%d0 4fe28: 2080 movel %d0,%a0@ 4fe2a: 6000 0086 braw 4feb2 <== ALWAYS TAKEN /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 4fe2e: 206b 0010 moveal %a3@(16),%a0 4fe32: b5e8 001c cmpal %a0@(28),%a2 4fe36: 6706 beqs 4fe3e /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4fe38: 4aaa 0058 tstl %a2@(88) 4fe3c: 6710 beqs 4fe4e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 4fe3e: 4eb9 0005 0460 jsr 50460 <__errno> 4fe44: 72ff moveq #-1,%d1 4fe46: 2040 moveal %d0,%a0 4fe48: 7010 moveq #16,%d0 4fe4a: 2080 movel %d0,%a0@ 4fe4c: 6064 bras 4feb2 <== ALWAYS TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4fe4e: 4aaa 0008 tstl %a2@(8) 4fe52: 670e beqs 4fe62 4fe54: 2f0a movel %a2,%sp@- 4fe56: 4eb9 0004 70e0 jsr 470e0 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4fe5c: 588f addql #4,%sp 4fe5e: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4fe62: 302a 0032 movew %a2@(50),%d0 4fe66: 5380 subql #1,%d0 4fe68: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4fe6c: 42a7 clrl %sp@- 4fe6e: 486e fff8 pea %fp@(-8) 4fe72: 4eb9 0004 3554 jsr 43554 4fe78: 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) ) { 4fe7e: 2f0a movel %a2,%sp@- 4fe80: 4eb9 0004 d746 jsr 4d746 4fe86: 4fef 000c lea %sp@(12),%sp 4fe8a: 4a80 tstl %d0 4fe8c: 6622 bnes 4feb0 4fe8e: 4a6a 0032 tstw %a2@(50) 4fe92: 661c bnes 4feb0 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4fe94: 2079 0005 f67c moveal 5f67c ,%a0 4fe9a: 2653 moveal %a3@,%a3 4fe9c: b7e8 0004 cmpal %a0@(4),%a3 4fea0: 6604 bnes 4fea6 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 4fea2: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 4fea6: 2f0a movel %a2,%sp@- 4fea8: 4eb9 0004 34cc jsr 434cc 4feae: 588f addql #4,%sp 4feb0: 4281 clrl %d1 } return 0; } 4feb2: 246e fff0 moveal %fp@(-16),%a2 4feb6: 2001 movel %d1,%d0 4feb8: 266e fff4 moveal %fp@(-12),%a3 4febc: 4e5e unlk %fp 4febe: 4e75 rts 00060e84 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 60e84: 4e56 0000 linkw %fp,#0 60e88: 2f0a movel %a2,%sp@- 60e8a: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 60e8c: 4a39 0009 9d08 tstb 99d08 60e92: 6600 00c4 bnew 60f58 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 60e96: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 60e9a: 45f9 0007 5828 lea 75828 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 60ea0: 4879 0008 caf6 pea 8caf6 <_rodata_start+0x6e6> FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 60ea6: 7001 moveq #1,%d0 60ea8: 13c0 0009 9d08 moveb %d0,99d08 mkdir("/etc", 0777); 60eae: 4eb9 0004 6d44 jsr 46d44 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 60eb4: 4879 0008 e547 pea 8e547 60eba: 4879 0008 cc10 pea 8cc10 <_rodata_start+0x800> 60ec0: 4e92 jsr %a2@ 60ec2: 4fef 0010 lea %sp@(16),%sp 60ec6: 4a80 tstl %d0 60ec8: 670c beqs 60ed6 <== NEVER TAKEN fclose(fp); 60eca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60ecc: 4eb9 0007 4fc2 jsr 74fc2 <== NOT EXECUTED 60ed2: 588f addql #4,%sp <== NOT EXECUTED 60ed4: 602e bras 60f04 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 60ed6: 4879 0008 e1b8 pea 8e1b8 60edc: 4879 0008 cc10 pea 8cc10 <_rodata_start+0x800> 60ee2: 4e92 jsr %a2@ 60ee4: 508f addql #8,%sp 60ee6: 2400 movel %d0,%d2 60ee8: 671a beqs 60f04 <== ALWAYS TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 60eea: 2f00 movel %d0,%sp@- 60eec: 4879 0009 131e pea 9131e 60ef2: 4eb9 0007 59b0 jsr 759b0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 60ef8: 2f02 movel %d2,%sp@- 60efa: 4eb9 0007 4fc2 jsr 74fc2 60f00: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 60f04: 4879 0008 e547 pea 8e547 60f0a: 45f9 0007 5828 lea 75828 ,%a2 60f10: 4879 0008 cc55 pea 8cc55 <_rodata_start+0x845> 60f16: 4e92 jsr %a2@ 60f18: 508f addql #8,%sp 60f1a: 4a80 tstl %d0 60f1c: 670c beqs 60f2a <== NEVER TAKEN fclose(fp); 60f1e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60f20: 4eb9 0007 4fc2 jsr 74fc2 <== NOT EXECUTED 60f26: 588f addql #4,%sp <== NOT EXECUTED 60f28: 602e bras 60f58 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 60f2a: 4879 0008 e1b8 pea 8e1b8 60f30: 4879 0008 cc55 pea 8cc55 <_rodata_start+0x845> 60f36: 4e92 jsr %a2@ 60f38: 508f addql #8,%sp 60f3a: 2400 movel %d0,%d2 60f3c: 671a beqs 60f58 <== ALWAYS TAKEN fprintf( fp, "root:x:0:root\n" 60f3e: 2f00 movel %d0,%sp@- 60f40: 4879 0009 1385 pea 91385 60f46: 4eb9 0007 59b0 jsr 759b0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 60f4c: 2f02 movel %d2,%sp@- 60f4e: 4eb9 0007 4fc2 jsr 74fc2 60f54: 4fef 000c lea %sp@(12),%sp } } 60f58: 242e fff8 movel %fp@(-8),%d2 60f5c: 246e fffc moveal %fp@(-4),%a2 60f60: 4e5e unlk %fp 60f62: 4e75 rts 000455d4 : int ioctl( int fd, ioctl_command_t command, ... ) { 455d4: 4e56 0000 linkw %fp,#0 455d8: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 455dc: b0b9 0005 f7d4 cmpl 5f7d4 ,%d0 455e2: 6422 bccs 45606 iop = rtems_libio_iop( fd ); 455e4: 2079 0006 0f28 moveal 60f28 ,%a0 455ea: ed88 lsll #6,%d0 455ec: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 455ee: 2028 0014 movel %a0@(20),%d0 455f2: 0280 0000 0100 andil #256,%d0 455f8: 670c beqs 45606 <== ALWAYS TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 455fa: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 455fe: 2268 003c moveal %a0@(60),%a1 45602: 4a89 tstl %a1 45604: 6610 bnes 45616 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 45606: 4eb9 0005 0668 jsr 50668 <__errno> 4560c: 72ff moveq #-1,%d1 4560e: 2040 moveal %d0,%a0 45610: 7009 moveq #9,%d0 45612: 2080 movel %d0,%a0@ 45614: 602a bras 45640 <== ALWAYS TAKEN if ( !iop->handlers->ioctl_h ) 45616: 2269 0010 moveal %a1@(16),%a1 4561a: 4a89 tstl %a1 4561c: 6612 bnes 45630 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 4561e: 4eb9 0005 0668 jsr 50668 <__errno> <== NOT EXECUTED 45624: 72ff moveq #-1,%d1 <== NOT EXECUTED 45626: 2040 moveal %d0,%a0 <== NOT EXECUTED 45628: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4562e: 6010 bras 45640 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 45630: 2f00 movel %d0,%sp@- 45632: 2f2e 000c movel %fp@(12),%sp@- 45636: 2f08 movel %a0,%sp@- 45638: 4e91 jsr %a1@ return rc; 4563a: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4563e: 2200 movel %d0,%d1 return rc; } 45640: 2001 movel %d1,%d0 45642: 4e5e unlk %fp 45644: 4e75 rts ... 000437be : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 437be: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 437c2: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED 437c6: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 437ca: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 437ce: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 437d2: 1401 moveb %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 437d4: 0800 0005 btst #5,%d0 <== NOT EXECUTED 437d8: 6704 beqs 437de <== NOT EXECUTED c &= 0x7f; 437da: 747f moveq #127,%d2 <== NOT EXECUTED 437dc: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 437de: 0800 0009 btst #9,%d0 <== NOT EXECUTED 437e2: 6724 beqs 43808 <== NOT EXECUTED c = tolower (c); 437e4: 2079 0005 a3e8 moveal 5a3e8 <__ctype_ptr__>,%a0 <== NOT EXECUTED 437ea: 7603 moveq #3,%d3 <== NOT EXECUTED 437ec: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 437f2: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 437f6: 49c1 extbl %d1 <== NOT EXECUTED 437f8: c283 andl %d3,%d1 <== NOT EXECUTED 437fa: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 437fe: b681 cmpl %d1,%d3 <== NOT EXECUTED 43800: 6606 bnes 43808 <== NOT EXECUTED 43802: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED if (c == '\r') { 43808: 4281 clrl %d1 <== NOT EXECUTED 4380a: 1202 moveb %d2,%d1 <== NOT EXECUTED 4380c: 760d moveq #13,%d3 <== NOT EXECUTED 4380e: b681 cmpl %d1,%d3 <== NOT EXECUTED 43810: 6610 bnes 43822 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 43812: 4a00 tstb %d0 <== NOT EXECUTED 43814: 6d00 00f8 bltw 4390e <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 43818: 0800 0008 btst #8,%d0 <== NOT EXECUTED 4381c: 671a beqs 43838 <== NOT EXECUTED 4381e: 740a moveq #10,%d2 <== NOT EXECUTED 43820: 6016 bras 43838 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 43822: 760a moveq #10,%d3 <== NOT EXECUTED 43824: b681 cmpl %d1,%d3 <== NOT EXECUTED 43826: 660a bnes 43832 <== NOT EXECUTED 43828: 0800 0006 btst #6,%d0 <== NOT EXECUTED 4382c: 670a beqs 43838 <== NOT EXECUTED 4382e: 740d moveq #13,%d2 <== NOT EXECUTED 43830: 6006 bras 43838 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 43832: 4a02 tstb %d2 <== NOT EXECUTED 43834: 6700 009e beqw 438d4 <== NOT EXECUTED 43838: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 4383c: 0801 0001 btst #1,%d1 <== NOT EXECUTED 43840: 6700 0092 beqw 438d4 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 43844: 4283 clrl %d3 <== NOT EXECUTED 43846: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 4384a: 4280 clrl %d0 <== NOT EXECUTED 4384c: 1002 moveb %d2,%d0 <== NOT EXECUTED 4384e: b680 cmpl %d0,%d3 <== NOT EXECUTED 43850: 6604 bnes 43856 <== NOT EXECUTED erase (tty, 0); 43852: 42a7 clrl %sp@- <== NOT EXECUTED 43854: 600e bras 43864 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 43856: 4283 clrl %d3 <== NOT EXECUTED 43858: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 4385c: b680 cmpl %d0,%d3 <== NOT EXECUTED 4385e: 6610 bnes 43870 <== NOT EXECUTED erase (tty, 1); 43860: 4878 0001 pea 1 <== NOT EXECUTED 43864: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43866: 4eba fdbe jsr %pc@(43626 ) <== NOT EXECUTED return 0; 4386a: 508f addql #8,%sp <== NOT EXECUTED 4386c: 6000 00a0 braw 4390e <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { 43870: 4283 clrl %d3 <== NOT EXECUTED 43872: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 43876: b680 cmpl %d0,%d3 <== NOT EXECUTED 43878: 6606 bnes 43880 <== NOT EXECUTED 4387a: 7001 moveq #1,%d0 <== NOT EXECUTED 4387c: 6000 0092 braw 43910 <== NOT EXECUTED return 1; } else if (c == '\n') { 43880: 760a moveq #10,%d3 <== NOT EXECUTED 43882: b680 cmpl %d0,%d3 <== NOT EXECUTED 43884: 6620 bnes 438a6 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 43886: 7048 moveq #72,%d0 <== NOT EXECUTED 43888: c280 andl %d0,%d1 <== NOT EXECUTED 4388a: 670c beqs 43898 <== NOT EXECUTED echo (c, tty); 4388c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4388e: 4878 000a pea a <== NOT EXECUTED 43892: 4eba fd0c jsr %pc@(435a0 ) <== NOT EXECUTED 43896: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 43898: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 4389c: 7001 moveq #1,%d0 <== NOT EXECUTED 4389e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 438a2: 740a moveq #10,%d2 <== NOT EXECUTED 438a4: 605c bras 43902 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 438a6: 4283 clrl %d3 <== NOT EXECUTED 438a8: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 438ac: b680 cmpl %d0,%d3 <== NOT EXECUTED 438ae: 670a beqs 438ba <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 438b0: 4283 clrl %d3 <== NOT EXECUTED 438b2: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 438b6: b680 cmpl %d0,%d3 <== NOT EXECUTED 438b8: 661a bnes 438d4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 438ba: 44c1 movew %d1,%ccr <== NOT EXECUTED 438bc: 6a0e bpls 438cc <== NOT EXECUTED echo (c, tty); 438be: 2f0a movel %a2,%sp@- <== NOT EXECUTED 438c0: 4280 clrl %d0 <== NOT EXECUTED 438c2: 1002 moveb %d2,%d0 <== NOT EXECUTED 438c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438c6: 4eba fcd8 jsr %pc@(435a0 ) <== NOT EXECUTED 438ca: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 438cc: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 438d0: 7001 moveq #1,%d0 <== NOT EXECUTED 438d2: 602a bras 438fe <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 438d4: 2039 0005 a354 movel 5a354 ,%d0 <== NOT EXECUTED 438da: 5380 subql #1,%d0 <== NOT EXECUTED 438dc: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 438e0: 6f2c bles 4390e <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 438e2: 7008 moveq #8,%d0 <== NOT EXECUTED 438e4: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 438e8: 670e beqs 438f8 <== NOT EXECUTED echo (c, tty); 438ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 438ec: 4280 clrl %d0 <== NOT EXECUTED 438ee: 1002 moveb %d2,%d0 <== NOT EXECUTED 438f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438f2: 4eba fcac jsr %pc@(435a0 ) <== NOT EXECUTED 438f6: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 438f8: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 438fc: 4280 clrl %d0 <== NOT EXECUTED 438fe: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 43902: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 43906: 5281 addql #1,%d1 <== NOT EXECUTED 43908: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 4390c: 6002 bras 43910 <== NOT EXECUTED 4390e: 4280 clrl %d0 <== NOT EXECUTED } return 0; } 43910: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43916: 4e5e unlk %fp <== NOT EXECUTED 43918: 4e75 rts 000582bc : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 582bc: 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 ) { 582be: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 582c2: 4e5e unlk %fp <== NOT EXECUTED 582c4: 4e75 rts 00061338 : int link( const char *existing, const char *new ) { 61338: 4e56 ffc8 linkw %fp,#-56 6133c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 61340: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 61344: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 61346: 246e 000c moveal %fp@(12),%a2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 6134a: 4eb9 0007 aee8 jsr 7aee8 61350: 7201 moveq #1,%d1 61352: 2e81 movel %d1,%sp@ 61354: 486e ffe8 pea %fp@(-24) 61358: 42a7 clrl %sp@- 6135a: 2f00 movel %d0,%sp@- 6135c: 2f02 movel %d2,%sp@- 6135e: 4eb9 0004 6566 jsr 46566 0, &existing_loc, true ); if ( result != 0 ) 61364: 4fef 0014 lea %sp@(20),%sp 61368: 4a80 tstl %d0 6136a: 6706 beqs 61372 6136c: 74ff moveq #-1,%d2 6136e: 6000 01a6 braw 61516 <== ALWAYS TAKEN /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 61372: 742f moveq #47,%d2 61374: 1012 moveb %a2@,%d0 61376: 1200 moveb %d0,%d1 61378: 49c1 extbl %d1 6137a: b481 cmpl %d1,%d2 6137c: 670c beqs 6138a 6137e: 143c 005c moveb #92,%d2 61382: b481 cmpl %d1,%d2 61384: 6704 beqs 6138a <== ALWAYS TAKEN 61386: 4a00 tstb %d0 61388: 6622 bnes 613ac <== NEVER TAKEN 6138a: 4878 0014 pea 14 6138e: 2079 0009 5d3c moveal 95d3c ,%a0 61394: 41e8 0018 lea %a0@(24),%a0 61398: 2f08 movel %a0,%sp@- 6139a: 486e ffd4 pea %fp@(-44) 6139e: 4eb9 0007 7ebc jsr 77ebc 613a4: 4fef 000c lea %sp@(12),%sp 613a8: 7001 moveq #1,%d0 613aa: 601e bras 613ca <== ALWAYS TAKEN 613ac: 4878 0014 pea 14 613b0: 2039 0009 5d3c movel 95d3c ,%d0 613b6: 5880 addql #4,%d0 613b8: 2f00 movel %d0,%sp@- 613ba: 486e ffd4 pea %fp@(-44) 613be: 4eb9 0007 7ebc jsr 77ebc 613c4: 4fef 000c lea %sp@(12),%sp 613c8: 4280 clrl %d0 if ( !parent_loc.ops->evalformake_h ) { 613ca: 206e ffe0 moveal %fp@(-32),%a0 613ce: 2068 0004 moveal %a0@(4),%a0 613d2: 4a88 tstl %a0 613d4: 661c bnes 613f2 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); 613d6: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 613da: 4a88 tstl %a0 <== NOT EXECUTED 613dc: 6700 00e0 beqw 614be <== NOT EXECUTED 613e0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 613e4: 4a88 tstl %a0 <== NOT EXECUTED 613e6: 6700 00d6 beqw 614be <== NOT EXECUTED 613ea: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 613ee: 6000 00ca braw 614ba <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 613f2: 486e fffc pea %fp@(-4) 613f6: 240e movel %fp,%d2 613f8: 0682 ffff ffd4 addil #-44,%d2 613fe: 2f02 movel %d2,%sp@- 61400: 4872 0800 pea %a2@(00000000,%d0:l) 61404: 4e90 jsr %a0@ if ( result != 0 ) { 61406: 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 ); 6140a: 2600 movel %d0,%d3 if ( result != 0 ) { 6140c: 6728 beqs 61436 rtems_filesystem_freenode( &existing_loc ); 6140e: 206e fff4 moveal %fp@(-12),%a0 61412: 4a88 tstl %a0 61414: 6710 beqs 61426 <== ALWAYS TAKEN 61416: 2068 001c moveal %a0@(28),%a0 6141a: 4a88 tstl %a0 6141c: 6708 beqs 61426 <== ALWAYS TAKEN 6141e: 486e ffe8 pea %fp@(-24) 61422: 4e90 jsr %a0@ 61424: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 61426: 4eb9 0007 4e84 jsr 74e84 <__errno> 6142c: 74ff moveq #-1,%d2 6142e: 2040 moveal %d0,%a0 61430: 2083 movel %d3,%a0@ 61432: 6000 00e2 braw 61516 <== 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 ) { 61436: 202e fff8 movel %fp@(-8),%d0 6143a: b0ae ffe4 cmpl %fp@(-28),%d0 6143e: 6742 beqs 61482 rtems_filesystem_freenode( &existing_loc ); 61440: 206e fff4 moveal %fp@(-12),%a0 61444: 4a88 tstl %a0 61446: 6710 beqs 61458 <== ALWAYS TAKEN 61448: 2068 001c moveal %a0@(28),%a0 6144c: 4a88 tstl %a0 6144e: 6708 beqs 61458 <== ALWAYS TAKEN 61450: 486e ffe8 pea %fp@(-24) 61454: 4e90 jsr %a0@ 61456: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 61458: 206e ffe0 moveal %fp@(-32),%a0 6145c: 4a88 tstl %a0 6145e: 6710 beqs 61470 <== ALWAYS TAKEN 61460: 2068 001c moveal %a0@(28),%a0 61464: 4a88 tstl %a0 61466: 6708 beqs 61470 <== ALWAYS TAKEN 61468: 486e ffd4 pea %fp@(-44) 6146c: 4e90 jsr %a0@ 6146e: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 61470: 4eb9 0007 4e84 jsr 74e84 <__errno> 61476: 74ff moveq #-1,%d2 61478: 2040 moveal %d0,%a0 6147a: 7012 moveq #18,%d0 6147c: 2080 movel %d0,%a0@ 6147e: 6000 0096 braw 61516 <== ALWAYS TAKEN } if ( !parent_loc.ops->link_h ) { 61482: 206e ffe0 moveal %fp@(-32),%a0 61486: 2068 0008 moveal %a0@(8),%a0 6148a: 4a88 tstl %a0 6148c: 6642 bnes 614d0 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); 6148e: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 61492: 4a88 tstl %a0 <== NOT EXECUTED 61494: 6710 beqs 614a6 <== NOT EXECUTED 61496: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6149a: 4a88 tstl %a0 <== NOT EXECUTED 6149c: 6708 beqs 614a6 <== NOT EXECUTED 6149e: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 614a2: 4e90 jsr %a0@ <== NOT EXECUTED 614a4: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 614a6: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 614aa: 4a88 tstl %a0 <== NOT EXECUTED 614ac: 6710 beqs 614be <== NOT EXECUTED 614ae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 614b2: 4a88 tstl %a0 <== NOT EXECUTED 614b4: 6708 beqs 614be <== NOT EXECUTED 614b6: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 614ba: 4e90 jsr %a0@ <== NOT EXECUTED 614bc: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 614be: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 614c4: 74ff moveq #-1,%d2 <== NOT EXECUTED 614c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 614c8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 614ce: 6046 bras 61516 <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 614d0: 2f2e fffc movel %fp@(-4),%sp@- 614d4: 260e movel %fp,%d3 614d6: 0683 ffff ffe8 addil #-24,%d3 614dc: 2f02 movel %d2,%sp@- 614de: 2f03 movel %d3,%sp@- 614e0: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 614e2: 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 ); 614e6: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 614e8: 4fef 000c lea %sp@(12),%sp 614ec: 4a88 tstl %a0 614ee: 670e beqs 614fe <== ALWAYS TAKEN 614f0: 2068 001c moveal %a0@(28),%a0 614f4: 4a88 tstl %a0 614f6: 6706 beqs 614fe <== ALWAYS TAKEN 614f8: 2f03 movel %d3,%sp@- 614fa: 4e90 jsr %a0@ 614fc: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 614fe: 206e ffe0 moveal %fp@(-32),%a0 61502: 4a88 tstl %a0 61504: 6710 beqs 61516 <== ALWAYS TAKEN 61506: 2068 001c moveal %a0@(28),%a0 6150a: 4a88 tstl %a0 6150c: 6708 beqs 61516 <== ALWAYS TAKEN 6150e: 486e ffd4 pea %fp@(-44) 61512: 4e90 jsr %a0@ 61514: 588f addql #4,%sp return result; } 61516: 2002 movel %d2,%d0 61518: 4cee 040c ffc8 moveml %fp@(-56),%d2-%d3/%a2 6151e: 4e5e unlk %fp 61520: 4e75 rts 000582dc : off_t lseek( int fd, off_t offset, int whence ) { 582dc: 4e56 ffec linkw %fp,#-20 582e0: 206e 0014 moveal %fp@(20),%a0 582e4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 582e8: 242e 0008 movel %fp@(8),%d2 582ec: 202e 000c movel %fp@(12),%d0 582f0: 222e 0010 movel %fp@(16),%d1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 582f4: b4b9 0005 a254 cmpl 5a254 ,%d2 582fa: 6416 bccs 58312 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 582fc: 2479 0005 b8d8 moveal 5b8d8 ,%a2 58302: ed8a lsll #6,%d2 58304: d5c2 addal %d2,%a2 rtems_libio_check_is_open(iop); 58306: 242a 0014 movel %a2@(20),%d2 5830a: 0282 0000 0100 andil #256,%d2 58310: 660e bnes 58320 <== NEVER TAKEN 58312: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 58318: 7209 moveq #9,%d1 <== NOT EXECUTED 5831a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5831c: 2081 movel %d1,%a0@ <== NOT EXECUTED 5831e: 6068 bras 58388 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 58320: 226a 003c moveal %a2@(60),%a1 58324: 4aa9 0014 tstl %a1@(20) 58328: 6610 bnes 5833a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5832a: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 58330: 2040 moveal %d0,%a0 <== NOT EXECUTED 58332: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 58338: 604e bras 58388 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 5833a: 7801 moveq #1,%d4 /* * Now process the lseek(). */ old_offset = iop->offset; 5833c: 242a 000c movel %a2@(12),%d2 58340: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 58344: b888 cmpl %a0,%d4 58346: 6714 beqs 5835c 58348: 7a02 moveq #2,%d5 5834a: ba88 cmpl %a0,%d5 5834c: 6718 beqs 58366 5834e: 4a88 tstl %a0 58350: 662a bnes 5837c case SEEK_SET: iop->offset = offset; 58352: 2540 000c movel %d0,%a2@(12) 58356: 2541 0010 movel %d1,%a2@(16) break; 5835a: 6032 bras 5838e <== ALWAYS TAKEN case SEEK_CUR: iop->offset += offset; 5835c: 2800 movel %d0,%d4 5835e: 2a01 movel %d1,%d5 58360: da83 addl %d3,%d5 58362: d982 addxl %d2,%d4 58364: 600c bras 58372 <== ALWAYS TAKEN break; case SEEK_END: iop->offset = iop->size + offset; 58366: 282a 0004 movel %a2@(4),%d4 5836a: 2a2a 0008 movel %a2@(8),%d5 5836e: da81 addl %d1,%d5 58370: d980 addxl %d0,%d4 58372: 2544 000c movel %d4,%a2@(12) 58376: 2545 0010 movel %d5,%a2@(16) break; 5837a: 6012 bras 5838e <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); 5837c: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 58382: 2040 moveal %d0,%a0 58384: 7016 moveq #22,%d0 58386: 2080 movel %d0,%a0@ 58388: 78ff moveq #-1,%d4 5838a: 7aff moveq #-1,%d5 5838c: 602c bras 583ba <== ALWAYS TAKEN /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5838e: 226a 003c moveal %a2@(60),%a1 58392: 2f08 movel %a0,%sp@- 58394: 2f01 movel %d1,%sp@- 58396: 2f00 movel %d0,%sp@- 58398: 2f0a movel %a2,%sp@- 5839a: 2069 0014 moveal %a1@(20),%a0 5839e: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 583a0: 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 ); 583a4: 2800 movel %d0,%d4 583a6: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 583a8: 70ff moveq #-1,%d0 583aa: 72ff moveq #-1,%d1 583ac: 9285 subl %d5,%d1 583ae: 9184 subxl %d4,%d0 583b0: 6608 bnes 583ba iop->offset = old_offset; 583b2: 2542 000c movel %d2,%a2@(12) 583b6: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 583ba: 2205 movel %d5,%d1 583bc: 2004 movel %d4,%d0 583be: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 583c4: 4e5e unlk %fp 583c6: 4e75 rts 00061658 : int _STAT_NAME( const char *path, struct stat *buf ) { 61658: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 6165c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 61660: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED 61664: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 61668: 6612 bnes 6167c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 6166a: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 61670: 74ff moveq #-1,%d2 <== NOT EXECUTED 61672: 2040 moveal %d0,%a0 <== NOT EXECUTED 61674: 700e moveq #14,%d0 <== NOT EXECUTED 61676: 2080 movel %d0,%a0@ <== NOT EXECUTED 61678: 6000 0098 braw 61712 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 6167c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 6167e: 260e movel %fp,%d3 <== NOT EXECUTED 61680: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 61686: 4eb9 0007 aee8 jsr 7aee8 <== NOT EXECUTED 6168c: 4297 clrl %sp@ <== NOT EXECUTED 6168e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61690: 42a7 clrl %sp@- <== NOT EXECUTED 61692: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61694: 2f04 movel %d4,%sp@- <== NOT EXECUTED 61696: 4eb9 0004 6566 jsr 46566 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 6169c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 616a0: 4a80 tstl %d0 <== NOT EXECUTED 616a2: 6704 beqs 616a8 <== NOT EXECUTED 616a4: 74ff moveq #-1,%d2 <== NOT EXECUTED 616a6: 606a bras 61712 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 616a8: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 616ac: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 616b0: 6628 bnes 616da <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 616b2: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 616b6: 4a88 tstl %a0 <== NOT EXECUTED 616b8: 670e beqs 616c8 <== NOT EXECUTED 616ba: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 616be: 4a88 tstl %a0 <== NOT EXECUTED 616c0: 6706 beqs 616c8 <== NOT EXECUTED 616c2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 616c4: 4e90 jsr %a0@ <== NOT EXECUTED 616c6: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 616c8: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 616ce: 74ff moveq #-1,%d2 <== NOT EXECUTED 616d0: 2040 moveal %d0,%a0 <== NOT EXECUTED 616d2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 616d8: 6038 bras 61712 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 616da: 4878 0046 pea 46 <== NOT EXECUTED 616de: 42a7 clrl %sp@- <== NOT EXECUTED 616e0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 616e2: 4eb9 0007 8028 jsr 78028 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 616e8: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 616ec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 616ee: 2f03 movel %d3,%sp@- <== NOT EXECUTED 616f0: 2068 0018 moveal %a0@(24),%a0 <== NOT EXECUTED 616f4: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 616f6: 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 ); 616fa: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 616fc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61700: 4a88 tstl %a0 <== NOT EXECUTED 61702: 670e beqs 61712 <== NOT EXECUTED 61704: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61708: 4a88 tstl %a0 <== NOT EXECUTED 6170a: 6706 beqs 61712 <== NOT EXECUTED 6170c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 6170e: 4e90 jsr %a0@ <== NOT EXECUTED 61710: 588f addql #4,%sp <== NOT EXECUTED return status; } 61712: 2002 movel %d2,%d0 <== NOT EXECUTED 61714: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 6171a: 4e5e unlk %fp <== NOT EXECUTED 6171c: 4e75 rts 0004935c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4935c: 4e56 fff4 linkw %fp,#-12 49360: 52b9 0005 b8e8 addql #1,5b8e8 49366: 48d7 001c moveml %d2-%d4,%sp@ 4936a: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4936e: 4eb9 0004 9324 jsr 49324 /* * Validate the parameters */ if ( !size ) 49374: 4a83 tstl %d3 49376: 6700 0088 beqw 49400 <== 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()) && 4937a: 7003 moveq #3,%d0 4937c: b0b9 0005 bbb6 cmpl 5bbb6 <_System_state_Current>,%d0 49382: 660a bnes 4938e 49384: 4eb9 0004 92cc jsr 492cc 4938a: 4a00 tstb %d0 4938c: 6772 beqs 49400 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4938e: 42a7 clrl %sp@- 49390: 42a7 clrl %sp@- 49392: 2f03 movel %d3,%sp@- 49394: 2f39 0005 a260 movel 5a260 ,%sp@- 4939a: 4eb9 0004 9dc8 jsr 49dc8 <_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 ) { 493a0: 4fef 0010 lea %sp@(16),%sp 493a4: 2400 movel %d0,%d2 493a6: 6626 bnes 493ce if (rtems_malloc_sbrk_helpers) 493a8: 2079 0005 a8aa moveal 5a8aa ,%a0 493ae: 4a88 tstl %a0 493b0: 670e beqs 493c0 <== NEVER TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 493b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 493b4: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 493b8: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 493ba: 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 ); 493bc: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 493be: 6610 bnes 493d0 <== NOT EXECUTED errno = ENOMEM; 493c0: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 493c6: 2040 moveal %d0,%a0 493c8: 700c moveq #12,%d0 493ca: 2080 movel %d0,%a0@ return (void *) 0; 493cc: 6034 bras 49402 <== ALWAYS TAKEN 493ce: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 493d0: 2079 0005 a8ae moveal 5a8ae ,%a0 493d6: 4a88 tstl %a0 493d8: 670a beqs 493e4 <== NEVER TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 493da: 2f03 movel %d3,%sp@- <== NOT EXECUTED 493dc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 493de: 2050 moveal %a0@,%a0 <== NOT EXECUTED 493e0: 4e90 jsr %a0@ <== NOT EXECUTED 493e2: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 493e4: 2079 0005 a8a6 moveal 5a8a6 ,%a0 493ea: 4a88 tstl %a0 493ec: 6604 bnes 493f2 <== ALWAYS TAKEN 493ee: 2404 movel %d4,%d2 493f0: 6010 bras 49402 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 493f2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 493f4: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 493f8: 2404 movel %d4,%d2 <== NOT EXECUTED 493fa: 4e90 jsr %a0@ <== NOT EXECUTED 493fc: 588f addql #4,%sp <== NOT EXECUTED 493fe: 6002 bras 49402 <== NOT EXECUTED 49400: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 49402: 2002 movel %d2,%d0 49404: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4940a: 4e5e unlk %fp 4940c: 4e75 rts ... 0004930a : } void malloc_deferred_free( void *pointer ) { 4930a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4930e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 49312: 4879 0005 bc06 pea 5bc06 <== NOT EXECUTED 49318: 4eb9 0004 5880 jsr 45880 <_Chain_Append> <== NOT EXECUTED 4931e: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 49320: 4e5e unlk %fp <== NOT EXECUTED 49322: 4e75 rts 00049324 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 49324: 4e56 0000 linkw %fp,#0 49328: 2f0b movel %a3,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4932a: 47f9 0004 98a0 lea 498a0 <_Chain_Get>,%a3 49330: 2f0a movel %a2,%sp@- /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 49332: 45f9 0004 8e80 lea 48e80 ,%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) 49338: 6006 bras 49340 <== ALWAYS TAKEN free(to_be_freed); 4933a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4933c: 4e92 jsr %a2@ <== NOT EXECUTED 4933e: 588f addql #4,%sp <== NOT EXECUTED 49340: 4879 0005 bc06 pea 5bc06 49346: 4e93 jsr %a3@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 49348: 588f addql #4,%sp 4934a: 4a80 tstl %d0 4934c: 66ec bnes 4933a <== ALWAYS TAKEN free(to_be_freed); } 4934e: 246e fff8 moveal %fp@(-8),%a2 49352: 266e fffc moveal %fp@(-4),%a3 49356: 4e5e unlk %fp 49358: 4e75 rts ... 00061738 : */ int malloc_info( Heap_Information_block *the_info ) { 61738: 4e56 0000 linkw %fp,#0 6173c: 202e 0008 movel %fp@(8),%d0 if ( !the_info ) 61740: 6604 bnes 61746 61742: 70ff moveq #-1,%d0 61744: 6012 bras 61758 <== ALWAYS TAKEN return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 61746: 2f00 movel %d0,%sp@- 61748: 2f39 0009 5a40 movel 95a40 ,%sp@- 6174e: 4eb9 0006 3664 jsr 63664 <_Protected_heap_Get_information> return 0; 61754: 508f addql #8,%sp ) { if ( !the_info ) return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 61756: 4280 clrl %d0 return 0; } 61758: 4e5e unlk %fp 6175a: 4e75 rts 000492cc : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 492cc: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 492d0: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 492d6: 6704 beqs 492dc <== NEVER TAKEN 492d8: 4200 clrb %d0 <== NOT EXECUTED 492da: 600a bras 492e6 <== NOT EXECUTED return false; if ( _ISR_Nest_level > 0 ) 492dc: 2039 0005 bace movel 5bace <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 492e2: 57c0 seq %d0 492e4: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 492e6: 4e5e unlk %fp 492e8: 4e75 rts 0004ed40 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4ed40: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4ed44: 2f39 0006 0438 movel 60438 ,%sp@- 4ed4a: 4878 0001 pea 1 4ed4e: 4eb9 0004 3094 jsr 43094 if ( memory ) 4ed54: 508f addql #8,%sp 4ed56: 4a80 tstl %d0 4ed58: 6706 beqs 4ed60 <== ALWAYS TAKEN memfile_blocks_allocated++; 4ed5a: 52b9 0006 05d0 addql #1,605d0 return memory; } 4ed60: 4e5e unlk %fp 4ed62: 4e75 rts 0004f0ca : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4f0ca: 4e56 0000 linkw %fp,#0 4f0ce: 2f0a movel %a2,%sp@- 4f0d0: 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) ) { 4f0d4: 2f0a movel %a2,%sp@- 4f0d6: 4eb9 0004 d746 jsr 4d746 4f0dc: 588f addql #4,%sp 4f0de: 4a80 tstl %d0 4f0e0: 6632 bnes 4f114 4f0e2: 4a6a 0032 tstw %a2@(50) 4f0e6: 662c bnes 4f114 <== ALWAYS TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4f0e8: 2079 0005 f67c moveal 5f67c ,%a0 4f0ee: b5e8 0004 cmpal %a0@(4),%a2 4f0f2: 6604 bnes 4f0f8 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 4f0f4: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4f0f8: 7006 moveq #6,%d0 4f0fa: b0aa 0048 cmpl %a2@(72),%d0 4f0fe: 670a beqs 4f10a <== ALWAYS TAKEN IMFS_memfile_remove( the_jnode ); 4f100: 2f0a movel %a2,%sp@- 4f102: 4eb9 0004 efb0 jsr 4efb0 4f108: 588f addql #4,%sp free( the_jnode ); 4f10a: 2f0a movel %a2,%sp@- 4f10c: 4eb9 0004 34cc jsr 434cc 4f112: 588f addql #4,%sp } return 0; } 4f114: 246e fffc moveal %fp@(-4),%a2 4f118: 4280 clrl %d0 4f11a: 4e5e unlk %fp 4f11c: 4e75 rts 0004eefe : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4eefe: 4e56 ffec linkw %fp,#-20 4ef02: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4ef06: 246e 0008 moveal %fp@(8),%a2 4ef0a: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 4ef0e: 4a8a tstl %a2 4ef10: 661c bnes 4ef2e <== NEVER TAKEN 4ef12: 4879 0005 ea36 pea 5ea36 <== NOT EXECUTED 4ef18: 4879 0005 eb1d pea 5eb1d <__FUNCTION__.6025> <== NOT EXECUTED 4ef1e: 4878 01b3 pea 1b3 <== NOT EXECUTED 4ef22: 4879 0005 e9cc pea 5e9cc <== NOT EXECUTED 4ef28: 4eb9 0004 d4c8 jsr 4d4c8 <__assert_func> <== NOT EXECUTED 4ef2e: 2652 moveal %a2@,%a3 4ef30: 4282 clrl %d2 b = *block_table; for ( i=0 ; i,%a4 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== ALWAYS TAKEN if ( b[i] ) { 4ef3a: 2013 movel %a3@,%d0 4ef3c: 6708 beqs 4ef46 memfile_free_block( b[i] ); 4ef3e: 2f00 movel %d0,%sp@- 4ef40: 4e94 jsr %a4@ b[i] = 0; 4ef42: 588f addql #4,%sp 4ef44: 4293 clrl %a3@ * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4ef4e: 2f12 movel %a2@,%sp@- 4ef50: 4eb9 0004 ed26 jsr 4ed26 *block_table = 0; 4ef56: 588f addql #4,%sp 4ef58: 4292 clrl %a2@ } 4ef5a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4ef60: 4e5e unlk %fp 4ef62: 4e75 rts 0004f342 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4f342: 4e56 ffec linkw %fp,#-20 4f346: 206e 0008 moveal %fp@(8),%a0 4f34a: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4f34e: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4f352: 202e 000c movel %fp@(12),%d0 4f356: 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 ) 4f35a: 242a 004c movel %a2@(76),%d2 4f35e: 262a 0050 movel %a2@(80),%d3 4f362: 9681 subl %d1,%d3 4f364: 9580 subxl %d0,%d2 4f366: 6c12 bges 4f37a <== NEVER TAKEN return IMFS_memfile_extend( the_jnode, length ); 4f368: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4f36a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f36c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f36e: 4eb9 0004 f21a jsr 4f21a <== NOT EXECUTED 4f374: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f378: 6026 bras 4f3a0 <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 4f37a: 2540 004c movel %d0,%a2@(76) 4f37e: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 4f382: 2140 0004 movel %d0,%a0@(4) 4f386: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 4f38a: 42a7 clrl %sp@- 4f38c: 486e fff8 pea %fp@(-8) 4f390: 4eb9 0004 3554 jsr 43554 4f396: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 4f39c: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 4f39e: 4280 clrl %d0 return 0; } 4f3a0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4f3a6: 4e5e unlk %fp 4f3a8: 4e75 rts 0004f3aa : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 4f3aa: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4f3ac: 4e56 fff0 linkw %fp,#-16 4f3b0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4f3b4: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4f3b8: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4f3bc: b0ab 0048 cmpl %a3@(72),%d0 4f3c0: 6620 bnes 4f3e2 <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) 4f3c2: 202b 004c movel %a3@(76),%d0 <== NOT EXECUTED 4f3c6: 222b 0050 movel %a3@(80),%d1 <== NOT EXECUTED 4f3ca: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED 4f3ce: 262a 0010 movel %a2@(16),%d3 <== NOT EXECUTED 4f3d2: 9681 subl %d1,%d3 <== NOT EXECUTED 4f3d4: 9580 subxl %d0,%d2 <== NOT EXECUTED 4f3d6: 6f48 bles 4f420 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 4f3d8: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4f3dc: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4f3e0: 603e bras 4f420 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4f3e2: 2f2a 0010 movel %a2@(16),%sp@- 4f3e6: 2f2a 000c movel %a2@(12),%sp@- 4f3ea: 2f0b movel %a3,%sp@- 4f3ec: 4eb9 0004 f21a jsr 4f21a 4f3f2: 4fef 000c lea %sp@(12),%sp 4f3f6: 4a80 tstl %d0 4f3f8: 6716 beqs 4f410 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4f3fa: 4eb9 0005 0460 jsr 50460 <__errno> <== NOT EXECUTED 4f400: 761c moveq #28,%d3 <== NOT EXECUTED 4f402: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f404: 2083 movel %d3,%a0@ <== NOT EXECUTED 4f406: 307c ffff moveaw #-1,%a0 <== NOT EXECUTED 4f40a: 327c ffff moveaw #-1,%a1 <== NOT EXECUTED 4f40e: 6018 bras 4f428 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 4f410: 202b 004c movel %a3@(76),%d0 4f414: 222b 0050 movel %a3@(80),%d1 4f418: 2540 0004 movel %d0,%a2@(4) 4f41c: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4f420: 206a 000c moveal %a2@(12),%a0 4f424: 226a 0010 moveal %a2@(16),%a1 } 4f428: 2209 movel %a1,%d1 4f42a: 2008 movel %a0,%d0 4f42c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4f432: 4e5e unlk %fp 4f434: 4e75 rts 0004f682 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4f682: 4e56 fff0 linkw %fp,#-16 4f686: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4f68a: 266e 0008 moveal %fp@(8),%a3 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4f68e: 202b 0014 movel %a3@(20),%d0 4f692: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4f698: 246b 0038 moveal %a3@(56),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4f69c: 6750 beqs 4f6ee && (the_jnode->type == IMFS_LINEAR_FILE)) { 4f69e: 7006 moveq #6,%d0 4f6a0: b0aa 0048 cmpl %a2@(72),%d0 4f6a4: 6648 bnes 4f6ee <== NEVER TAKEN uint32_t count = the_jnode->info.linearfile.size; 4f6a6: 202a 0050 movel %a2@(80),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4f6aa: 4282 clrl %d2 <== NOT EXECUTED 4f6ac: 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; 4f6ae: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4f6b2: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 4f6b6: 2543 0050 movel %d3,%a2@(80) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4f6ba: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 4f6bc: 42aa 0054 clrl %a2@(84) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4f6c0: 2543 0048 movel %d3,%a2@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4f6c4: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4f6c8: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 4f6cc: 4a80 tstl %d0 <== NOT EXECUTED 4f6ce: 671e beqs 4f6ee <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4f6d0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f6d2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4f6d4: 42a7 clrl %sp@- <== NOT EXECUTED 4f6d6: 42a7 clrl %sp@- <== NOT EXECUTED 4f6d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f6da: 4eb9 0004 f436 jsr 4f436 <== 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) 4f6e0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4f6e4: 72ff moveq #-1,%d1 <== NOT EXECUTED 4f6e6: b280 cmpl %d0,%d1 <== NOT EXECUTED 4f6e8: 6604 bnes 4f6ee <== NOT EXECUTED 4f6ea: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f6ec: 602e bras 4f71c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4f6ee: 202b 0014 movel %a3@(20),%d0 4f6f2: 0280 0000 0200 andil #512,%d0 4f6f8: 6710 beqs 4f70a iop->offset = the_jnode->info.file.size; 4f6fa: 242a 004c movel %a2@(76),%d2 4f6fe: 262a 0050 movel %a2@(80),%d3 4f702: 2742 000c movel %d2,%a3@(12) 4f706: 2743 0010 movel %d3,%a3@(16) iop->size = the_jnode->info.file.size; 4f70a: 4280 clrl %d0 4f70c: 222a 004c movel %a2@(76),%d1 4f710: 242a 0050 movel %a2@(80),%d2 4f714: 2741 0004 movel %d1,%a3@(4) 4f718: 2742 0008 movel %d2,%a3@(8) return 0; } 4f71c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4f722: 4e5e unlk %fp 4f724: 4e75 rts 0004f11e : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4f11e: 4e56 fff8 linkw %fp,#-8 4f122: 206e 000c moveal %fp@(12),%a0 4f126: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4f128: 2450 moveal %a0@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4f12a: 4aaa 0008 tstl %a2@(8) 4f12e: 670e beqs 4f13e <== ALWAYS TAKEN 4f130: 2f0a movel %a2,%sp@- 4f132: 4eb9 0004 70e0 jsr 470e0 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4f138: 588f addql #4,%sp 4f13a: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4f13e: 302a 0032 movew %a2@(50),%d0 4f142: 5380 subql #1,%d0 4f144: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4f148: 42a7 clrl %sp@- 4f14a: 486e fff8 pea %fp@(-8) 4f14e: 4eb9 0004 3554 jsr 43554 4f154: 256e fff8 0044 movel %fp@(-8),%a2@(68) return memfile_check_rmnod( the_jnode ); 4f15a: 2f0a movel %a2,%sp@- 4f15c: 4eb9 0004 f0ca jsr 4f0ca } 4f162: 246e fff4 moveal %fp@(-12),%a2 4f166: 4e5e unlk %fp 4f168: 4e75 rts 0004246c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 4246c: 4e56 ffdc linkw %fp,#-36 42470: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42474: 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) ) ) 42478: 2002 movel %d2,%d0 4247a: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42480: 246e 0008 moveal %fp@(8),%a2 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) ) ) 42484: 6612 bnes 42498 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42486: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 4248c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4248e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42490: 7016 moveq #22,%d0 <== NOT EXECUTED 42492: 2080 movel %d0,%a0@ <== NOT EXECUTED 42494: 6000 00e0 braw 42576 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42498: 762f moveq #47,%d3 4249a: 1012 moveb %a2@,%d0 4249c: 1200 moveb %d0,%d1 4249e: 49c1 extbl %d1 424a0: b681 cmpl %d1,%d3 424a2: 670c beqs 424b0 424a4: 163c 005c moveb #92,%d3 424a8: b681 cmpl %d1,%d3 424aa: 6704 beqs 424b0 <== ALWAYS TAKEN 424ac: 4a00 tstb %d0 424ae: 6622 bnes 424d2 <== NEVER TAKEN 424b0: 4878 0014 pea 14 424b4: 2079 0005 a364 moveal 5a364 ,%a0 424ba: 41e8 0018 lea %a0@(24),%a0 424be: 2f08 movel %a0,%sp@- 424c0: 486e ffe8 pea %fp@(-24) 424c4: 4eb9 0004 c200 jsr 4c200 424ca: 4fef 000c lea %sp@(12),%sp 424ce: 7001 moveq #1,%d0 424d0: 601e bras 424f0 <== ALWAYS TAKEN 424d2: 4878 0014 pea 14 424d6: 2039 0005 a364 movel 5a364 ,%d0 424dc: 5880 addql #4,%d0 424de: 2f00 movel %d0,%sp@- 424e0: 486e ffe8 pea %fp@(-24) 424e4: 4eb9 0004 c200 jsr 4c200 424ea: 4fef 000c lea %sp@(12),%sp 424ee: 4280 clrl %d0 if ( !temp_loc.ops->evalformake_h ) { 424f0: 206e fff4 moveal %fp@(-12),%a0 424f4: 2068 0004 moveal %a0@(4),%a0 424f8: 4a88 tstl %a0 424fa: 673a beqs 42536 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 424fc: 486e fffc pea %fp@(-4) 42500: 260e movel %fp,%d3 42502: 0683 ffff ffe8 addil #-24,%d3 42508: 2f03 movel %d3,%sp@- 4250a: 4872 0800 pea %a2@(00000000,%d0:l) 4250e: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42510: 4fef 000c lea %sp@(12),%sp 42514: 4a80 tstl %d0 42516: 6704 beqs 4251c 42518: 74ff moveq #-1,%d2 4251a: 605a bras 42576 <== ALWAYS TAKEN return -1; if ( !temp_loc.ops->mknod_h ) { 4251c: 226e fff4 moveal %fp@(-12),%a1 42520: 2069 0014 moveal %a1@(20),%a0 42524: 4a88 tstl %a0 42526: 6620 bnes 42548 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); 42528: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4252c: 4a88 tstl %a0 <== NOT EXECUTED 4252e: 6706 beqs 42536 <== NOT EXECUTED 42530: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42532: 4e90 jsr %a0@ <== NOT EXECUTED 42534: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42536: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 4253c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4253e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42540: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42546: 602e bras 42576 <== NOT EXECUTED } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42548: 2f03 movel %d3,%sp@- 4254a: 2f2e 0014 movel %fp@(20),%sp@- 4254e: 2f2e 0010 movel %fp@(16),%sp@- 42552: 2f02 movel %d2,%sp@- 42554: 2f2e fffc movel %fp@(-4),%sp@- 42558: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 4255a: 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 ); 4255e: 2400 movel %d0,%d2 rtems_filesystem_freenode( &temp_loc ); 42560: 4fef 0014 lea %sp@(20),%sp 42564: 4a88 tstl %a0 42566: 670e beqs 42576 <== ALWAYS TAKEN 42568: 2068 001c moveal %a0@(28),%a0 4256c: 4a88 tstl %a0 4256e: 6706 beqs 42576 42570: 2f03 movel %d3,%sp@- 42572: 4e90 jsr %a0@ 42574: 588f addql #4,%sp return result; } 42576: 2002 movel %d2,%d0 42578: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 4257e: 4e5e unlk %fp 42580: 4e75 rts ... 000425a6 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 425a6: 4e56 ffd0 linkw %fp,#-48 425aa: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 425ae: 2a6e 0008 moveal %fp@(8),%a5 425b2: 286e 000c moveal %fp@(12),%a4 425b6: 282e 0010 movel %fp@(16),%d4 425ba: 266e 0014 moveal %fp@(20),%a3 425be: 242e 0018 movel %fp@(24),%d2 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 425c2: 4a8c tstl %a4 425c4: 6706 beqs 425cc /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 425c6: 7001 moveq #1,%d0 425c8: b084 cmpl %d4,%d0 425ca: 6412 bccs 425de options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 425cc: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 425d2: 7416 moveq #22,%d2 425d4: 72ff moveq #-1,%d1 425d6: 2040 moveal %d0,%a0 425d8: 2082 movel %d2,%a0@ return -1; 425da: 6000 01b4 braw 42790 } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 425de: 4aac 0024 tstl %a4@(36) 425e2: 660e bnes 425f2 <== NEVER TAKEN errno = ENOTSUP; 425e4: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 425ea: 97cb subal %a3,%a3 <== NOT EXECUTED 425ec: 4283 clrl %d3 <== NOT EXECUTED 425ee: 6000 00a8 braw 42698 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 425f2: 4a8b tstl %a3 425f4: 6604 bnes 425fa <== ALWAYS TAKEN 425f6: 706c moveq #108,%d0 425f8: 6010 bras 4260a <== ALWAYS TAKEN size += strlen( device ) + 1; 425fa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 425fc: 4eb9 0004 cdac jsr 4cdac <== NOT EXECUTED 42602: 588f addql #4,%sp <== NOT EXECUTED 42604: 0680 0000 006d addil #109,%d0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4260a: 2f00 movel %d0,%sp@- 4260c: 4eb9 0004 935c jsr 4935c if ( !temp_mt_entry ) { 42612: 588f addql #4,%sp */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 42614: 2440 moveal %d0,%a2 42616: 2600 movel %d0,%d3 if ( !temp_mt_entry ) { 42618: 6612 bnes 4262c <== NEVER TAKEN errno = ENOMEM; 4261a: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 42620: 72ff moveq #-1,%d1 <== NOT EXECUTED 42622: 2040 moveal %d0,%a0 <== NOT EXECUTED 42624: 700c moveq #12,%d0 <== NOT EXECUTED 42626: 2080 movel %d0,%a0@ <== NOT EXECUTED return -1; 42628: 6000 0166 braw 42790 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 4262c: 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; 42630: 2540 002c movel %d0,%a2@(44) temp_mt_entry->options = options; if ( device ) { 42634: 4a8b tstl %a3 42636: 6718 beqs 42650 <== NEVER TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42638: 2f0b movel %a3,%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 ); 4263a: 0680 0000 006c addil #108,%d0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 42640: 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 = 42642: 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 ); 42646: 4eb9 0004 c960 jsr 4c960 <== NOT EXECUTED 4264c: 508f addql #8,%sp <== NOT EXECUTED 4264e: 6004 bras 42654 <== NOT EXECUTED } else temp_mt_entry->dev = 0; 42650: 42aa 0068 clrl %a2@(104) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 42654: 4a82 tstl %d2 42656: 6700 00b6 beqw 4270e if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 4265a: 2f02 movel %d2,%sp@- * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 4265c: 7801 moveq #1,%d4 4265e: 47ee ffec lea %fp@(-20),%a3 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42662: 4eb9 0004 cdac jsr 4cdac * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42668: 2e84 movel %d4,%sp@ 4266a: 2f0b movel %a3,%sp@- 4266c: 4878 0007 pea 7 42670: 2f00 movel %d0,%sp@- 42672: 2f02 movel %d2,%sp@- 42674: 4eb9 0004 223e jsr 4223e 4267a: 4fef 0014 lea %sp@(20),%sp 4267e: 72ff moveq #-1,%d1 42680: b280 cmpl %d0,%d1 42682: 6700 00e4 beqw 42768 <== ALWAYS TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 42686: 206e fff8 moveal %fp@(-8),%a0 4268a: 2068 0010 moveal %a0@(16),%a0 4268e: 4a88 tstl %a0 42690: 6612 bnes 426a4 <== NEVER TAKEN errno = ENOTSUP; 42692: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 42698: 2040 moveal %d0,%a0 <== NOT EXECUTED 4269a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED goto cleanup_and_bail; 426a0: 6000 00c8 braw 4276a <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 426a4: 2f0b movel %a3,%sp@- 426a6: 4e90 jsr %a0@ 426a8: 588f addql #4,%sp 426aa: 7201 moveq #1,%d1 426ac: b280 cmpl %d0,%d1 426ae: 6710 beqs 426c0 errno = ENOTDIR; 426b0: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 426b6: 7214 moveq #20,%d1 426b8: 2040 moveal %d0,%a0 426ba: 2081 movel %d1,%a0@ goto cleanup_and_bail; 426bc: 6000 00ac braw 4276a /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 426c0: 2079 0005 b910 moveal 5b910 ,%a0 !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 ) 426c6: 202e ffec movel %fp@(-20),%d0 426ca: 6008 bras 426d4 <== ALWAYS TAKEN 426cc: b0a8 001c cmpl %a0@(28),%d0 426d0: 670e beqs 426e0 * 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 ) { 426d2: 2050 moveal %a0@,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 426d4: b1fc 0005 b914 cmpal #375060,%a0 426da: 66f0 bnes 426cc 426dc: 6000 00be braw 4279c <== ALWAYS TAKEN /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 426e0: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 426e6: 47ee ffec lea %fp@(-20),%a3 426ea: 2040 moveal %d0,%a0 426ec: 7010 moveq #16,%d0 426ee: 2080 movel %d0,%a0@ goto cleanup_and_bail; 426f0: 6078 bras 4276a <== ALWAYS TAKEN * 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; 426f2: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 426f8: 47ee ffec lea %fp@(-20),%a3 <== NOT EXECUTED 426fc: 609a bras 42698 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 426fe: 2f0a movel %a2,%sp@- 42700: 47ee ffec lea %fp@(-20),%a3 42704: 4e90 jsr %a0@ 42706: 588f addql #4,%sp 42708: 4a80 tstl %d0 4270a: 6720 beqs 4272c <== NEVER TAKEN 4270c: 605c bras 4276a <== NOT EXECUTED * 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; 4270e: 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; 42712: 97cb subal %a3,%a3 * 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; 42714: 42aa 0024 clrl %a2@(36) temp_mt_entry->mt_fs_root.ops = NULL; 42718: 42aa 0028 clrl %a2@(40) temp_mt_entry->mt_point_node.node_access = NULL; 4271c: 42aa 0008 clrl %a2@(8) temp_mt_entry->mt_point_node.handlers = NULL; 42720: 42aa 0010 clrl %a2@(16) temp_mt_entry->mt_point_node.ops = NULL; 42724: 42aa 0014 clrl %a2@(20) temp_mt_entry->mt_point_node.mt_entry = NULL; 42728: 42aa 0018 clrl %a2@(24) } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4272c: 2f0a movel %a2,%sp@- 4272e: 206c 0024 moveal %a4@(36),%a0 42732: 4e90 jsr %a0@ 42734: 588f addql #4,%sp 42736: 4a80 tstl %d0 42738: 6714 beqs 4274e <== NEVER TAKEN /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4273a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4273e: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42742: 4a88 tstl %a0 <== NOT EXECUTED 42744: 6724 beqs 4276a <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 42746: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42748: 4e90 jsr %a0@ <== NOT EXECUTED 4274a: 588f addql #4,%sp <== NOT EXECUTED 4274c: 601c bras 4276a <== 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 ); 4274e: 2f0a movel %a2,%sp@- 42750: 4879 0005 b910 pea 5b910 42756: 4eb9 0004 5880 jsr 45880 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 4275c: 508f addql #8,%sp 4275e: 4a8d tstl %a5 42760: 6702 beqs 42764 <== ALWAYS TAKEN *mt_entry = temp_mt_entry; 42762: 2a8a movel %a2,%a5@ 42764: 4281 clrl %d1 42766: 6028 bras 42790 <== ALWAYS TAKEN 42768: 97cb subal %a3,%a3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4276a: 2f03 movel %d3,%sp@- 4276c: 4eb9 0004 8e80 jsr 48e80 if ( loc_to_free ) 42772: 588f addql #4,%sp 42774: 4a8b tstl %a3 42776: 6716 beqs 4278e <== ALWAYS TAKEN rtems_filesystem_freenode( loc_to_free ); 42778: 206b 000c moveal %a3@(12),%a0 4277c: 4a88 tstl %a0 4277e: 670e beqs 4278e <== ALWAYS TAKEN 42780: 2068 001c moveal %a0@(28),%a0 42784: 4a88 tstl %a0 42786: 6706 beqs 4278e <== ALWAYS TAKEN 42788: 2f0b movel %a3,%sp@- 4278a: 4e90 jsr %a0@ 4278c: 588f addql #4,%sp 4278e: 72ff moveq #-1,%d1 return -1; } 42790: 2001 movel %d1,%d0 42792: 4cee 3c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a5 42798: 4e5e unlk %fp 4279a: 4e75 rts * 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; 4279c: 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; 427a0: 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; 427a6: 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 ){ 427ac: 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; 427b0: 2540 0008 movel %d0,%a2@(8) temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 427b4: 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 ){ 427b8: 4a88 tstl %a0 427ba: 6600 ff42 bnew 426fe <== NEVER TAKEN 427be: 6000 ff32 braw 426f2 <== NOT EXECUTED ... 00042850 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 42850: 4e56 fff4 linkw %fp,#-12 42854: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42858: 262e 0008 movel %fp@(8),%d3 4285c: 246e 000c moveal %fp@(12),%a2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 42860: b5c3 cmpal %d3,%a2 42862: 6608 bnes 4286c ptr = _REENT; 42864: 2439 0005 a3ec movel 5a3ec <_impure_ptr>,%d2 4286a: 6004 bras 42870 <== ALWAYS TAKEN } else { ptr = deleted_task->libc_reent; 4286c: 242a 0104 movel %a2@(260),%d2 } if (ptr && ptr != _global_impure_ptr) { 42870: 4a82 tstl %d2 42872: 6722 beqs 42896 <== ALWAYS TAKEN 42874: b4b9 0005 9a4c cmpl 59a4c <_global_impure_ptr>,%d2 4287a: 671a beqs 42896 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 4287c: 4879 0004 28ae pea 428ae 42882: 2f02 movel %d2,%sp@- 42884: 4eb9 0004 c186 jsr 4c186 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 4288a: 2f02 movel %d2,%sp@- 4288c: 4eb9 0004 7ddc jsr 47ddc <_Workspace_Free> 42892: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 42896: 42aa 0104 clrl %a2@(260) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 4289a: b5c3 cmpal %d3,%a2 4289c: 6606 bnes 428a4 _REENT = 0; 4289e: 42b9 0005 a3ec clrl 5a3ec <_impure_ptr> } } 428a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 428aa: 4e5e unlk %fp 428ac: 4e75 rts 000428ae : */ int newlib_free_buffers( FILE *fp ) { 428ae: 4e56 0000 linkw %fp,#0 428b2: 2f0a movel %a2,%sp@- 428b4: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 428b8: 2f0a movel %a2,%sp@- 428ba: 4eb9 0004 bd74 jsr 4bd74 428c0: 588f addql #4,%sp 428c2: 7202 moveq #2,%d1 428c4: b280 cmpl %d0,%d1 428c6: 652a bcss 428f2 <== ALWAYS TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 428c8: 302a 000c movew %a2@(12),%d0 428cc: 48c0 extl %d0 428ce: 4a00 tstb %d0 428d0: 6c2a bges 428fc <== NEVER TAKEN free( fp->_bf._base ); 428d2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 428d6: 4eb9 0004 8e80 jsr 48e80 <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; 428dc: 588f addql #4,%sp <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428de: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 428e2: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428e6: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 428ea: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428ec: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED 428f0: 600a bras 428fc <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 428f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 428f4: 4eb9 0004 bb1e jsr 4bb1e <== NOT EXECUTED 428fa: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 428fc: 246e fffc moveal %fp@(-4),%a2 42900: 4280 clrl %d0 42902: 4e5e unlk %fp 42904: 4e75 rts 00042764 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 42764: 4e56 0000 linkw %fp,#0 42768: 2f02 movel %d2,%sp@- 4276a: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 4276e: 4a39 0005 c320 tstb 5c320 42774: 662e bnes 427a4 initialized = 1; status = rtems_io_register_name( 42776: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 42778: 7001 moveq #1,%d0 status = rtems_io_register_name( 4277a: 2f02 movel %d2,%sp@- 4277c: 4879 0005 a0a4 pea 5a0a4 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 42782: 13c0 0005 c320 moveb %d0,5c320 status = rtems_io_register_name( 42788: 4eb9 0004 2884 jsr 42884 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 4278e: 4fef 000c lea %sp@(12),%sp 42792: 4a80 tstl %d0 42794: 6708 beqs 4279e <== NEVER TAKEN rtems_fatal_error_occurred(status); 42796: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42798: 4eb9 0004 6018 jsr 46018 <== NOT EXECUTED NULL_major = major; 4279e: 23c2 0005 cb40 movel %d2,5cb40 } return RTEMS_SUCCESSFUL; } 427a4: 242e fffc movel %fp@(-4),%d2 427a8: 4280 clrl %d0 427aa: 4e5e unlk %fp 427ac: 4e75 rts ... 00042742 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 42742: 4e56 0000 linkw %fp,#0 42746: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 4274a: 4a88 tstl %a0 4274c: 6706 beqs 42754 <== NEVER TAKEN rw_args->bytes_moved = rw_args->count; 4274e: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED return NULL_SUCCESSFUL; } 42754: 4280 clrl %d0 42756: 4e5e unlk %fp 42758: 4e75 rts 00042b10 : int open( const char *pathname, int flags, ... ) { 42b10: 4e56 ffc8 linkw %fp,#-56 42b14: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 42b18: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 42b1c: 2002 movel %d2,%d0 42b1e: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 42b20: 262e 0008 movel %fp@(8),%d3 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 42b24: 0800 0000 btst #0,%d0 42b28: 6604 bnes 42b2e 42b2a: 4284 clrl %d4 42b2c: 6002 bras 42b30 <== ALWAYS TAKEN 42b2e: 7804 moveq #4,%d4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 42b30: 0800 0001 btst #1,%d0 42b34: 6704 beqs 42b3a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 42b36: 7002 moveq #2,%d0 42b38: 8880 orl %d0,%d4 va_start(ap, flags); mode = va_arg( ap, int ); 42b3a: 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(); 42b3e: 4eb9 0004 91ec jsr 491ec 42b44: 2440 moveal %d0,%a2 if ( iop == 0 ) { 42b46: 4a80 tstl %d0 42b48: 6606 bnes 42b50 42b4a: 7417 moveq #23,%d2 42b4c: 6000 0190 braw 42cde <== ALWAYS TAKEN /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 42b50: 2f03 movel %d3,%sp@- 42b52: 2c3c 0004 cdac movel #314796,%d6 42b58: 2046 moveal %d6,%a0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 42b5a: 47ee ffec lea %fp@(-20),%a3 42b5e: 4bf9 0004 223e lea 4223e ,%a5 pathname, strlen( pathname ), eval_flags, &loc, true ); 42b64: 4e90 jsr %a0@ /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 42b66: 7201 moveq #1,%d1 42b68: 2e81 movel %d1,%sp@ 42b6a: 2f0b movel %a3,%sp@- 42b6c: 2f04 movel %d4,%sp@- 42b6e: 2f00 movel %d0,%sp@- 42b70: 2f03 movel %d3,%sp@- 42b72: 4e95 jsr %a5@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 42b74: 4fef 0014 lea %sp@(20),%sp 42b78: 72ff moveq #-1,%d1 42b7a: b280 cmpl %d0,%d1 42b7c: 6666 bnes 42be4 if ( errno != ENOENT ) { 42b7e: 49f9 0004 b9e0 lea 4b9e0 <__errno>,%a4 42b84: 4e94 jsr %a4@ 42b86: 7202 moveq #2,%d1 42b88: 2040 moveal %d0,%a0 42b8a: b290 cmpl %a0@,%d1 42b8c: 662a bnes 42bb8 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 42b8e: 0802 0009 btst #9,%d2 42b92: 6608 bnes 42b9c 42b94: 97cb subal %a3,%a3 42b96: 7402 moveq #2,%d2 42b98: 6000 011c braw 42cb6 <== ALWAYS TAKEN rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 42b9c: 42a7 clrl %sp@- 42b9e: 2005 movel %d5,%d0 42ba0: 42a7 clrl %sp@- 42ba2: 08c0 000f bset #15,%d0 42ba6: 2f00 movel %d0,%sp@- 42ba8: 2f03 movel %d3,%sp@- 42baa: 4eb9 0004 246c jsr 4246c if ( rc ) { 42bb0: 4fef 0010 lea %sp@(16),%sp 42bb4: 4a80 tstl %d0 42bb6: 6708 beqs 42bc0 <== NEVER TAKEN rc = errno; 42bb8: 4e94 jsr %a4@ 42bba: 97cb subal %a3,%a3 42bbc: 6000 009c braw 42c5a <== ALWAYS TAKEN 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 ); 42bc0: 2f03 movel %d3,%sp@- 42bc2: 2046 moveal %d6,%a0 42bc4: 4e90 jsr %a0@ 42bc6: 7201 moveq #1,%d1 42bc8: 2e81 movel %d1,%sp@ 42bca: 2f0b movel %a3,%sp@- 42bcc: 42a7 clrl %sp@- 42bce: 2f00 movel %d0,%sp@- 42bd0: 2f03 movel %d3,%sp@- 42bd2: 4e95 jsr %a5@ if ( status != 0 ) { /* The file did not exist */ 42bd4: 4fef 0014 lea %sp@(20),%sp 42bd8: 4a80 tstl %d0 42bda: 671e beqs 42bfa <== NEVER TAKEN 42bdc: 97cb subal %a3,%a3 <== NOT EXECUTED 42bde: 740d moveq #13,%d2 <== NOT EXECUTED 42be0: 6000 00d4 braw 42cb6 <== NOT EXECUTED rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 42be4: 2002 movel %d2,%d0 42be6: 0280 0000 0a00 andil #2560,%d0 42bec: 0c80 0000 0a00 cmpil #2560,%d0 42bf2: 6606 bnes 42bfa 42bf4: 7411 moveq #17,%d2 42bf6: 6000 00be braw 42cb6 <== ALWAYS TAKEN * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 42bfa: 282a 0014 movel %a2@(20),%d4 iop->pathinfo = loc; 42bfe: 47ee ffec lea %fp@(-20),%a3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 42c02: 256e fff4 003c movel %fp@(-12),%a2@(60) iop->file_info = loc.node_access; 42c08: 256e ffec 0038 movel %fp@(-20),%a2@(56) iop->flags |= rtems_libio_fcntl_flags( flags ); 42c0e: 2f02 movel %d2,%sp@- 42c10: 4eb9 0004 928c jsr 4928c 42c16: 8084 orl %d4,%d0 42c18: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; 42c1c: 4878 0014 pea 14 42c20: 2f0b movel %a3,%sp@- 42c22: 486a 0018 pea %a2@(24) 42c26: 4eb9 0004 c200 jsr 4c200 if ( !iop->handlers || !iop->handlers->open_h ) { 42c2c: 206a 003c moveal %a2@(60),%a0 42c30: 4fef 0010 lea %sp@(16),%sp 42c34: 4a88 tstl %a0 42c36: 6700 00c8 beqw 42d00 <== ALWAYS TAKEN 42c3a: 2050 moveal %a0@,%a0 42c3c: 4a88 tstl %a0 42c3e: 6700 00c0 beqw 42d00 <== ALWAYS TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 42c42: 2f05 movel %d5,%sp@- 42c44: 2f02 movel %d2,%sp@- 42c46: 2f03 movel %d3,%sp@- 42c48: 2f0a movel %a2,%sp@- 42c4a: 4e90 jsr %a0@ if ( rc ) { 42c4c: 4fef 0010 lea %sp@(16),%sp 42c50: 4a80 tstl %d0 42c52: 670c beqs 42c60 rc = errno; 42c54: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 42c5a: 2040 moveal %d0,%a0 42c5c: 2410 movel %a0@,%d2 goto done; 42c5e: 6052 bras 42cb2 <== ALWAYS TAKEN /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 42c60: 0802 000a btst #10,%d2 42c64: 6700 0086 beqw 42cec rc = ftruncate( iop - rtems_libio_iops, 0 ); 42c68: 42a7 clrl %sp@- 42c6a: 200a movel %a2,%d0 42c6c: 90b9 0005 b8d8 subl 5b8d8 ,%d0 42c72: ec80 asrl #6,%d0 42c74: 42a7 clrl %sp@- 42c76: 2f00 movel %d0,%sp@- 42c78: 4eb9 0004 8f08 jsr 48f08 if ( rc ) { 42c7e: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 42c82: 2400 movel %d0,%d2 if ( rc ) { 42c84: 6766 beqs 42cec <== NEVER TAKEN if(errno) rc = errno; 42c86: 47f9 0004 b9e0 lea 4b9e0 <__errno>,%a3 <== NOT EXECUTED 42c8c: 4e93 jsr %a3@ <== NOT EXECUTED 42c8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c90: 4a90 tstl %a0@ <== NOT EXECUTED 42c92: 6706 beqs 42c9a <== NOT EXECUTED 42c94: 4e93 jsr %a3@ <== NOT EXECUTED 42c96: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c98: 2410 movel %a0@,%d2 <== NOT EXECUTED close( iop - rtems_libio_iops ); 42c9a: 200a movel %a2,%d0 <== NOT EXECUTED 42c9c: 90b9 0005 b8d8 subl 5b8d8 ,%d0 <== NOT EXECUTED 42ca2: 97cb subal %a3,%a3 <== NOT EXECUTED 42ca4: ec80 asrl #6,%d0 <== NOT EXECUTED 42ca6: 95ca subal %a2,%a2 <== NOT EXECUTED 42ca8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42caa: 4eb9 0004 8dec jsr 48dec <== NOT EXECUTED 42cb0: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 42cb2: 4a82 tstl %d2 42cb4: 6736 beqs 42cec <== ALWAYS TAKEN if ( iop ) 42cb6: 4a8a tstl %a2 42cb8: 670a beqs 42cc4 <== ALWAYS TAKEN rtems_libio_free( iop ); 42cba: 2f0a movel %a2,%sp@- 42cbc: 4eb9 0004 918e jsr 4918e 42cc2: 588f addql #4,%sp if ( loc_to_free ) 42cc4: 4a8b tstl %a3 42cc6: 6716 beqs 42cde rtems_filesystem_freenode( loc_to_free ); 42cc8: 206b 000c moveal %a3@(12),%a0 42ccc: 4a88 tstl %a0 42cce: 670e beqs 42cde <== ALWAYS TAKEN 42cd0: 2068 001c moveal %a0@(28),%a0 42cd4: 4a88 tstl %a0 42cd6: 6706 beqs 42cde <== ALWAYS TAKEN 42cd8: 2f0b movel %a3,%sp@- 42cda: 4e90 jsr %a0@ 42cdc: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 42cde: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 42ce4: 2040 moveal %d0,%a0 42ce6: 70ff moveq #-1,%d0 42ce8: 2082 movel %d2,%a0@ 42cea: 600a bras 42cf6 <== ALWAYS TAKEN } return iop - rtems_libio_iops; 42cec: 200a movel %a2,%d0 42cee: 90b9 0005 b8d8 subl 5b8d8 ,%d0 42cf4: ec80 asrl #6,%d0 } 42cf6: 4cee 3c7c ffc8 moveml %fp@(-56),%d2-%d6/%a2-%a5 42cfc: 4e5e unlk %fp 42cfe: 4e75 rts if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 42d00: 47ee ffec lea %fp@(-20),%a3 <== NOT EXECUTED 42d04: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 42d0a: 60aa bras 42cb6 <== NOT EXECUTED 00042aa0 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 42aa0: 4e56 0000 linkw %fp,#0 42aa4: 2f0a movel %a2,%sp@- int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 42aa6: 45f9 0004 2b10 lea 42b10 ,%a2 42aac: 42a7 clrl %sp@- 42aae: 42a7 clrl %sp@- 42ab0: 4879 0005 8e3c pea 58e3c 42ab6: 4e92 jsr %a2@ 42ab8: 4fef 000c lea %sp@(12),%sp 42abc: 72ff moveq #-1,%d1 42abe: b280 cmpl %d0,%d1 42ac0: 6744 beqs 42b06 /* * 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) 42ac2: 42a7 clrl %sp@- 42ac4: 4878 0001 pea 1 42ac8: 4879 0005 8e3c pea 58e3c 42ace: 4e92 jsr %a2@ 42ad0: 4fef 000c lea %sp@(12),%sp 42ad4: 72ff moveq #-1,%d1 42ad6: b280 cmpl %d0,%d1 42ad8: 6608 bnes 42ae2 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 42ada: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 42ae0: 601e bras 42b00 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 42ae2: 42a7 clrl %sp@- 42ae4: 4878 0001 pea 1 42ae8: 4879 0005 8e3c pea 58e3c 42aee: 4e92 jsr %a2@ 42af0: 4fef 000c lea %sp@(12),%sp 42af4: 72ff moveq #-1,%d1 42af6: b280 cmpl %d0,%d1 42af8: 660c bnes 42b06 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 42afa: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 42b00: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED } 42b06: 246e fffc moveal %fp@(-4),%a2 42b0a: 4e5e unlk %fp 42b0c: 4e75 rts ... 00043458 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43458: 4e56 fff0 linkw %fp,#-16 4345c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43460: 246e 000c moveal %fp@(12),%a2 43464: 242e 0008 movel %fp@(8),%d2 int i; if (tty->termios.c_oflag & OPOST) { 43468: 202a 0034 movel %a2@(52),%d0 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 4346c: 1d42 fffe moveb %d2,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 43470: 0800 0000 btst #0,%d0 43474: 6700 010c beqw 43582 <== ALWAYS TAKEN switch (c) { 43478: 4281 clrl %d1 4347a: 1202 moveb %d2,%d1 4347c: 7609 moveq #9,%d3 4347e: b681 cmpl %d1,%d3 43480: 6776 beqs 434f8 43482: 650e bcss 43492 <== NEVER TAKEN 43484: 163c 0008 moveb #8,%d3 <== NOT EXECUTED 43488: b681 cmpl %d1,%d3 <== NOT EXECUTED 4348a: 6600 00b0 bnew 4353c <== NOT EXECUTED 4348e: 6000 009e braw 4352e <== NOT EXECUTED 43492: 760a moveq #10,%d3 43494: b681 cmpl %d1,%d3 43496: 670c beqs 434a4 43498: 163c 000d moveb #13,%d3 4349c: b681 cmpl %d1,%d3 4349e: 6600 009c bnew 4353c <== NEVER TAKEN 434a2: 602c bras 434d0 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 434a4: 0800 0005 btst #5,%d0 434a8: 6704 beqs 434ae <== NEVER TAKEN tty->column = 0; 434aa: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 434ae: 7004 moveq #4,%d0 434b0: c0aa 0034 andl %a2@(52),%d0 434b4: 6700 00cc beqw 43582 <== ALWAYS TAKEN rtems_termios_puts ("\r", 1, tty); 434b8: 2f0a movel %a2,%sp@- 434ba: 4878 0001 pea 1 434be: 4879 0005 9350 pea 59350 434c4: 4eb9 0004 335e jsr 4335e tty->column = 0; 434ca: 4fef 000c lea %sp@(12),%sp 434ce: 6020 bras 434f0 <== ALWAYS TAKEN } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 434d0: 0800 0004 btst #4,%d0 <== NOT EXECUTED 434d4: 6708 beqs 434de <== NOT EXECUTED 434d6: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 434da: 6700 00ba beqw 43596 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 434de: 44c0 movew %d0,%ccr <== NOT EXECUTED 434e0: 6a0e bpls 434f0 <== NOT EXECUTED c = '\n'; 434e2: 720a moveq #10,%d1 <== NOT EXECUTED 434e4: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 434e8: 0800 0005 btst #5,%d0 <== NOT EXECUTED 434ec: 6700 0094 beqw 43582 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 434f0: 42aa 0028 clrl %a2@(40) break; 434f4: 6000 008c braw 43582 <== ALWAYS TAKEN case '\t': i = 8 - (tty->column & 7); 434f8: 222a 0028 movel %a2@(40),%d1 434fc: 7407 moveq #7,%d2 434fe: 307c 0008 moveaw #8,%a0 43502: c481 andl %d1,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43504: 0280 0000 1800 andil #6144,%d0 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4350a: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 4350c: 0c80 0000 1800 cmpil #6144,%d0 43512: 6612 bnes 43526 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); 43514: 2f0a movel %a2,%sp@- break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 43516: d288 addl %a0,%d1 43518: 2541 0028 movel %d1,%a2@(40) rtems_termios_puts ( " ", i, tty); 4351c: 2f08 movel %a0,%sp@- 4351e: 4879 0005 9352 pea 59352 43524: 6066 bras 4358c <== ALWAYS TAKEN return; } tty->column += i; 43526: d1c1 addal %d1,%a0 <== NOT EXECUTED 43528: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED break; 4352c: 6054 bras 43582 <== NOT EXECUTED case '\b': if (tty->column > 0) 4352e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43532: 6f4e bles 43582 <== NOT EXECUTED tty->column--; 43534: 5380 subql #1,%d0 <== NOT EXECUTED 43536: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 4353a: 6046 bras 43582 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 4353c: 0800 0001 btst #1,%d0 43540: 6724 beqs 43566 <== NEVER TAKEN c = toupper(c); 43542: 4280 clrl %d0 <== NOT EXECUTED 43544: 1002 moveb %d2,%d0 <== NOT EXECUTED 43546: 7403 moveq #3,%d2 <== NOT EXECUTED 43548: 7602 moveq #2,%d3 <== NOT EXECUTED 4354a: 2079 0005 a3e8 moveal 5a3e8 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43550: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 43554: 49c1 extbl %d1 <== NOT EXECUTED 43556: c282 andl %d2,%d1 <== NOT EXECUTED 43558: b681 cmpl %d1,%d3 <== NOT EXECUTED 4355a: 6606 bnes 43562 <== NOT EXECUTED 4355c: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 43562: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (!iscntrl(c)) 43566: 4280 clrl %d0 43568: 102e fffe moveb %fp@(-2),%d0 4356c: 2079 0005 a3e8 moveal 5a3e8 <__ctype_ptr__>,%a0 43572: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 43576: 49c0 extbl %d0 43578: 0800 0005 btst #5,%d0 4357c: 6604 bnes 43582 <== ALWAYS TAKEN tty->column++; 4357e: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 43582: 2f0a movel %a2,%sp@- 43584: 4878 0001 pea 1 43588: 486e fffe pea %fp@(-2) 4358c: 4eb9 0004 335e jsr 4335e 43592: 4fef 000c lea %sp@(12),%sp } 43596: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4359c: 4e5e unlk %fp 4359e: 4e75 rts 00044574 : long pathconf( const char *path, int name ) { 44574: 4e56 0000 linkw %fp,#0 44578: 2f03 movel %d3,%sp@- 4457a: 2f02 movel %d2,%sp@- int status; int fd; fd = open( path, O_RDONLY ); 4457c: 42a7 clrl %sp@- 4457e: 2f2e 0008 movel %fp@(8),%sp@- 44582: 4eb9 0004 4354 jsr 44354 if ( fd == -1 ) 44588: 508f addql #8,%sp ) { int status; int fd; fd = open( path, O_RDONLY ); 4458a: 2400 movel %d0,%d2 if ( fd == -1 ) 4458c: 70ff moveq #-1,%d0 4458e: b082 cmpl %d2,%d0 44590: 6604 bnes 44596 44592: 76ff moveq #-1,%d3 44594: 601a bras 445b0 <== ALWAYS TAKEN return -1; status = fpathconf( fd, name ); 44596: 2f2e 000c movel %fp@(12),%sp@- 4459a: 2f02 movel %d2,%sp@- 4459c: 4eb9 0004 3378 jsr 43378 445a2: 2600 movel %d0,%d3 (void) close( fd ); 445a4: 2f02 movel %d2,%sp@- 445a6: 4eb9 0004 2c88 jsr 42c88 return status; 445ac: 4fef 000c lea %sp@(12),%sp } 445b0: 2003 movel %d3,%d0 445b2: 242e fff8 movel %fp@(-8),%d2 445b6: 262e fffc movel %fp@(-4),%d3 445ba: 4e5e unlk %fp 445bc: 4e75 rts ... 0004b5c8 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4b5c8: 4e56 ffd0 linkw %fp,#-48 4b5cc: 48d7 040c moveml %d2-%d3/%a2,%sp@ rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4b5d0: 4878 0001 pea 1 4b5d4: 240e movel %fp,%d2 4b5d6: 0682 ffff ffdc addil #-36,%d2 4b5dc: 2f02 movel %d2,%sp@- 4b5de: 4878 0007 pea 7 4b5e2: 4878 0003 pea 3 4b5e6: 4879 0005 9844 pea 59844 <__FUNCTION__.5815+0x11> * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4b5ec: 246e 0008 moveal %fp@(8),%a2 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4b5f0: 4eb9 0004 223e jsr 4223e 4b5f6: 4fef 0014 lea %sp@(20),%sp 4b5fa: 4a80 tstl %d0 4b5fc: 672a beqs 4b628 <== ALWAYS TAKEN != 0) { if (errno != ENOENT) 4b5fe: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 4b604: 7202 moveq #2,%d1 4b606: 2040 moveal %d0,%a0 4b608: b290 cmpl %a0@,%d1 4b60a: 6600 010e bnew 4b71a <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4b60e: 4878 03ff pea 3ff 4b612: 4879 0005 9844 pea 59844 <__FUNCTION__.5815+0x11> 4b618: 4eb9 0004 244c jsr 4244c 4b61e: 508f addql #8,%sp 4b620: 4a80 tstl %d0 4b622: 671a beqs 4b63e 4b624: 6000 00f4 braw 4b71a <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 4b628: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4b62c: 4a88 tstl %a0 <== NOT EXECUTED 4b62e: 670e beqs 4b63e <== NOT EXECUTED 4b630: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4b634: 4a88 tstl %a0 <== NOT EXECUTED 4b636: 6706 beqs 4b63e <== NOT EXECUTED 4b638: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b63a: 4e90 jsr %a0@ <== NOT EXECUTED 4b63c: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4b63e: 4878 000a pea a 4b642: 240e movel %fp,%d2 4b644: 4879 0005 9849 pea 59849 <__FUNCTION__.5815+0x16> 4b64a: 0682 ffff fff1 addil #-15,%d2 4b650: 2f02 movel %d2,%sp@- 4b652: 4eb9 0004 c200 jsr 4c200 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4b658: 3039 0005 b1ec movew 5b1ec ,%d0 4b65e: 2200 movel %d0,%d1 4b660: 5281 addql #1,%d1 4b662: 3f00 movew %d0,%sp@- 4b664: 33c1 0005 b1ec movew %d1,5b1ec 4b66a: 4267 clrw %sp@- 4b66c: 4879 0005 9854 pea 59854 <__FUNCTION__.5815+0x21> 4b672: 486e fffb pea %fp@(-5) 4b676: 4eb9 0004 c6d8 jsr 4c6d8 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4b67c: 4878 0180 pea 180 4b680: 2f02 movel %d2,%sp@- 4b682: 4eb9 0004 b77c jsr 4b77c 4b688: 4fef 0020 lea %sp@(32),%sp 4b68c: 4a80 tstl %d0 4b68e: 670a beqs 4b69a <== NEVER TAKEN if (errno != EEXIST){ 4b690: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 4b696: 6000 0082 braw 4b71a <== 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); 4b69a: 4878 4000 pea 4000 4b69e: 2f02 movel %d2,%sp@- 4b6a0: 4eb9 0004 2b10 jsr 42b10 if (filsdes[0] < 0) { 4b6a6: 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); 4b6a8: 2480 movel %d0,%a2@ if (filsdes[0] < 0) { 4b6aa: 6c0e bges 4b6ba <== ALWAYS TAKEN err = errno; 4b6ac: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 4b6b2: 2040 moveal %d0,%a0 4b6b4: 2610 movel %a0@,%d3 /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 4b6b6: 2f02 movel %d2,%sp@- 4b6b8: 604e bras 4b708 <== ALWAYS TAKEN } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4b6ba: b0b9 0005 a254 cmpl 5a254 ,%d0 <== NOT EXECUTED 4b6c0: 6504 bcss 4b6c6 <== NOT EXECUTED 4b6c2: 91c8 subal %a0,%a0 <== NOT EXECUTED 4b6c4: 600a bras 4b6d0 <== NOT EXECUTED 4b6c6: 2079 0005 b8d8 moveal 5b8d8 ,%a0 <== NOT EXECUTED 4b6cc: ed88 lsll #6,%d0 <== NOT EXECUTED 4b6ce: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4b6d0: 70fe moveq #-2,%d0 <== NOT EXECUTED 4b6d2: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4b6d6: 4878 0001 pea 1 <== NOT EXECUTED 4b6da: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4b6de: 4eb9 0004 2b10 jsr 42b10 <== NOT EXECUTED if (filsdes[1] < 0) { 4b6e4: 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); 4b6e6: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4b6ea: 6d04 blts 4b6f0 <== NOT EXECUTED 4b6ec: 4283 clrl %d3 <== NOT EXECUTED 4b6ee: 6014 bras 4b704 <== NOT EXECUTED err = errno; 4b6f0: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 4b6f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b6f8: 2610 movel %a0@,%d3 <== NOT EXECUTED close(filsdes[0]); 4b6fa: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4b6fc: 4eb9 0004 8dec jsr 48dec <== NOT EXECUTED 4b702: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4b704: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4b708: 4eb9 0004 b79c jsr 4b79c 4b70e: 588f addql #4,%sp } rtems_set_errno_and_return_minus_one(err); 4b710: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 4b716: 2040 moveal %d0,%a0 4b718: 2083 movel %d3,%a0@ } 4b71a: 70ff moveq #-1,%d0 4b71c: 4cee 040c ffd0 moveml %fp@(-48),%d2-%d3/%a2 4b722: 4e5e unlk %fp 4b724: 4e75 rts ... 0004a7a2 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4a7a2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4a7a6: 2f0b movel %a3,%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4a7a8: 47f9 0004 af70 lea 4af70 ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4a7ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a7b0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4a7b4: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a7b8: 4e93 jsr %a3@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4a7ba: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a7be: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4a7c0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a7c4: 4eb9 0004 4e94 jsr 44e94 <== NOT EXECUTED free(pipe->Buffer); 4a7ca: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a7cc: 4eb9 0004 8e80 jsr 48e80 <== NOT EXECUTED free(pipe); } 4a7d2: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 4a7d6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4a7da: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } 4a7de: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4a7e2: 4e5e unlk %fp <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 4a7e4: 4ef9 0004 8e80 jmp 48e80 <== NOT EXECUTED 0004a466 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4a466: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 4a46a: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4a470: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4a472: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED 4a476: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a478: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED if (cmd == FIONREAD) { 4a47c: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4a480: 6704 beqs 4a486 <== NOT EXECUTED 4a482: 70ea moveq #-22,%d0 <== NOT EXECUTED 4a484: 6034 bras 4a4ba <== NOT EXECUTED if (buffer == NULL) 4a486: 4a8b tstl %a3 <== NOT EXECUTED 4a488: 6604 bnes 4a48e <== NOT EXECUTED 4a48a: 70f2 moveq #-14,%d0 <== NOT EXECUTED 4a48c: 602c bras 4a4ba <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4a48e: 42a7 clrl %sp@- <== NOT EXECUTED 4a490: 42a7 clrl %sp@- <== NOT EXECUTED 4a492: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a496: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4a49c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a4a0: 4a80 tstl %d0 <== NOT EXECUTED 4a4a2: 6704 beqs 4a4a8 <== NOT EXECUTED 4a4a4: 70fc moveq #-4,%d0 <== NOT EXECUTED 4a4a6: 6012 bras 4a4ba <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4a4a8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4a4ac: 26aa 000c movel %a2@(12),%a3@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 4a4b0: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return 0; 4a4b6: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4a4b8: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 4a4ba: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4a4be: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 4a4c2: 4e5e unlk %fp <== NOT EXECUTED 4a4c4: 4e75 rts 0004a40c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4a40c: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 4a40e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 4a412: 4e5e unlk %fp <== NOT EXECUTED 4a414: 4e75 rts 0004a63a : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4a63a: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4a63e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4a642: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4a644: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4a648: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED 4a64e: 42a7 clrl %sp@- <== NOT EXECUTED 4a650: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4a654: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED 4a658: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED 4a65c: 2e2e 0014 movel %fp@(20),%d7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4a660: 4e93 jsr %a3@ <== NOT EXECUTED 4a662: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a666: 4a80 tstl %d0 <== NOT EXECUTED 4a668: 6706 beqs 4a670 <== NOT EXECUTED 4a66a: 74fc moveq #-4,%d2 <== NOT EXECUTED 4a66c: 6000 0128 braw 4a796 <== NOT EXECUTED 4a670: 4282 clrl %d2 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4a672: 2c3c 0004 5034 movel #282676,%d6 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4a678: 4bf9 0004 b040 lea 4b040 ,%a5 <== NOT EXECUTED 4a67e: 6000 00fc braw 4a77c <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4a682: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a686: 6700 00fa beqw 4a782 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4a68a: 7001 moveq #1,%d0 <== NOT EXECUTED 4a68c: 2047 moveal %d7,%a0 <== NOT EXECUTED 4a68e: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4a692: 6706 beqs 4a69a <== NOT EXECUTED 4a694: 78f5 moveq #-11,%d4 <== NOT EXECUTED 4a696: 6000 00ec braw 4a784 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4a69a: 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 ++; 4a69e: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4a6a2: 2246 moveal %d6,%a1 <== NOT EXECUTED 4a6a4: 4e91 jsr %a1@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4a6a6: 42a7 clrl %sp@- <== NOT EXECUTED 4a6a8: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a6ac: 4e95 jsr %a5@ <== NOT EXECUTED 4a6ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a6b2: 4a80 tstl %d0 <== NOT EXECUTED 4a6b4: 6602 bnes 4a6b8 <== NOT EXECUTED 4a6b6: 4284 clrl %d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4a6b8: 42a7 clrl %sp@- <== NOT EXECUTED 4a6ba: 42a7 clrl %sp@- <== NOT EXECUTED 4a6bc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a6c0: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4a6c6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a6ca: 4a80 tstl %d0 <== NOT EXECUTED 4a6cc: 6706 beqs 4a6d4 <== NOT EXECUTED 4a6ce: 78fc moveq #-4,%d4 <== NOT EXECUTED 4a6d0: 6000 00be braw 4a790 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4a6d4: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4a6d8: 4a84 tstl %d4 <== NOT EXECUTED 4a6da: 6600 00a8 bnew 4a784 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4a6de: 262a 000c movel %a2@(12),%d3 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4a6e2: 78fc moveq #-4,%d4 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4a6e4: 4a83 tstl %d3 <== NOT EXECUTED 4a6e6: 679a beqs 4a682 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4a6e8: 2005 movel %d5,%d0 <== NOT EXECUTED 4a6ea: 9082 subl %d2,%d0 <== NOT EXECUTED 4a6ec: b083 cmpl %d3,%d0 <== NOT EXECUTED 4a6ee: 6402 bccs 4a6f2 <== NOT EXECUTED 4a6f0: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4a6f2: 206a 0008 moveal %a2@(8),%a0 <== NOT EXECUTED 4a6f6: 200c movel %a4,%d0 <== NOT EXECUTED 4a6f8: d082 addl %d2,%d0 <== NOT EXECUTED 4a6fa: 47f9 0004 c200 lea 4c200 ,%a3 <== NOT EXECUTED 4a700: 2212 movel %a2@,%d1 <== NOT EXECUTED 4a702: d288 addl %a0,%d1 <== NOT EXECUTED 4a704: 226a 0004 moveal %a2@(4),%a1 <== NOT EXECUTED 4a708: 93c8 subal %a0,%a1 <== NOT EXECUTED if (chunk > chunk1) { 4a70a: b3c3 cmpal %d3,%a1 <== NOT EXECUTED 4a70c: 6c28 bges 4a736 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4a70e: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4a710: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a712: 2d49 fff8 movel %a1,%fp@(-8) <== NOT EXECUTED 4a716: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a718: 4e93 jsr %a3@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4a71a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4a71e: 2203 movel %d3,%d1 <== NOT EXECUTED 4a720: 9288 subl %a0,%d1 <== NOT EXECUTED 4a722: 2002 movel %d2,%d0 <== NOT EXECUTED 4a724: d088 addl %a0,%d0 <== NOT EXECUTED 4a726: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a728: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a72a: 4874 0800 pea %a4@(00000000,%d0:l) <== NOT EXECUTED 4a72e: 4e93 jsr %a3@ <== NOT EXECUTED 4a730: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4a734: 600c bras 4a742 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4a736: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4a738: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a73a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a73c: 4e93 jsr %a3@ <== NOT EXECUTED 4a73e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4a742: 2203 movel %d3,%d1 <== NOT EXECUTED 4a744: d2aa 0008 addl %a2@(8),%d1 <== NOT EXECUTED pipe->Start %= pipe->Size; pipe->Length -= chunk; 4a748: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 4a74c: 9083 subl %d3,%d0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4a74e: 4c6a 1004 0004 remul %a2@(4),%d4,%d1 <== NOT EXECUTED pipe->Length -= chunk; 4a754: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4a758: 2544 0008 movel %d4,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4a75c: 4a80 tstl %d0 <== NOT EXECUTED 4a75e: 6604 bnes 4a764 <== NOT EXECUTED pipe->Start = 0; 4a760: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4a764: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4a768: 6710 beqs 4a77a <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4a76a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a76e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a772: 4eb9 0004 afdc jsr 4afdc <== NOT EXECUTED 4a778: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4a77a: d483 addl %d3,%d2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4a77c: ba82 cmpl %d2,%d5 <== NOT EXECUTED 4a77e: 6200 ff5e bhiw 4a6de <== NOT EXECUTED 4a782: 4284 clrl %d4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4a784: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a788: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 4a78e: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4a790: 4a82 tstl %d2 <== NOT EXECUTED 4a792: 6e02 bgts 4a796 <== NOT EXECUTED 4a794: 2404 movel %d4,%d2 <== NOT EXECUTED return read; return ret; } 4a796: 2002 movel %d2,%d0 <== NOT EXECUTED 4a798: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a79e: 4e5e unlk %fp <== NOT EXECUTED 4a7a0: 4e75 rts 0004a7ea : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4a7ea: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 4a7ee: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4a7f2: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4a7f6: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4a7f8: 2453 moveal %a3@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4a7fa: 42a7 clrl %sp@- <== NOT EXECUTED 4a7fc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a800: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4a806: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a80a: 4a80 tstl %d0 <== NOT EXECUTED 4a80c: 6634 bnes 4a842 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4a80e: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a812: 7406 moveq #6,%d2 <== NOT EXECUTED 4a814: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4a818: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4a81c: 6704 beqs 4a822 <== NOT EXECUTED pipe->Readers --; 4a81e: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4a822: 44c2 movew %d2,%ccr <== NOT EXECUTED 4a824: 6604 bnes 4a82a <== NOT EXECUTED pipe->Writers --; 4a826: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4a82a: 42a7 clrl %sp@- <== NOT EXECUTED 4a82c: 42a7 clrl %sp@- <== NOT EXECUTED 4a82e: 2f39 0005 b1e4 movel 5b1e4 ,%sp@- <== NOT EXECUTED 4a834: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4a83a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a83e: 4a80 tstl %d0 <== NOT EXECUTED 4a840: 6708 beqs 4a84a <== NOT EXECUTED rtems_fatal_error_occurred(sc); 4a842: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a844: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4a84a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a84e: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4a854: 588f addql #4,%sp <== NOT EXECUTED 4a856: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a85a: 6622 bnes 4a87e <== NOT EXECUTED 4a85c: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a860: 660c bnes 4a86e <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 4a862: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a864: 4eba ff3c jsr %pc@(4a7a2 ) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4a868: 588f addql #4,%sp <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 4a86a: 4293 clrl %a3@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4a86c: 602c bras 4a89a <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4a86e: 7004 moveq #4,%d0 <== NOT EXECUTED 4a870: b082 cmpl %d2,%d0 <== NOT EXECUTED 4a872: 670a beqs 4a87e <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4a874: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a878: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a87c: 6014 bras 4a892 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4a87e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a882: 6616 bnes 4a89a <== NOT EXECUTED 4a884: 7002 moveq #2,%d0 <== NOT EXECUTED 4a886: b082 cmpl %d2,%d0 <== NOT EXECUTED 4a888: 6710 beqs 4a89a <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4a88a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a88e: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a892: 4eb9 0004 afdc jsr 4afdc <== NOT EXECUTED 4a898: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4a89a: 2f39 0005 b1e4 movel 5b1e4 ,%sp@- <== NOT EXECUTED 4a8a0: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4a8a6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4a8ac: 4280 clrl %d0 <== NOT EXECUTED 4a8ae: 4e5e unlk %fp <== NOT EXECUTED 4a8b0: 4e75 rts 0004a4c6 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4a4c6: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4a4ca: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4a4ce: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4a4d2: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED 4a4d6: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4a4da: 6606 bnes 4a4e2 <== NOT EXECUTED 4a4dc: 4282 clrl %d2 <== NOT EXECUTED 4a4de: 6000 014e braw 4a62e <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 4a4e2: 42a7 clrl %sp@- <== NOT EXECUTED 4a4e4: 42a7 clrl %sp@- <== NOT EXECUTED 4a4e6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a4ea: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4a4f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a4f4: 4a80 tstl %d0 <== NOT EXECUTED 4a4f6: 6706 beqs 4a4fe <== NOT EXECUTED 4a4f8: 74fc moveq #-4,%d2 <== NOT EXECUTED 4a4fa: 6000 0132 braw 4a62e <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4a4fe: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a502: 6608 bnes 4a50c <== NOT EXECUTED 4a504: 76e0 moveq #-32,%d3 <== NOT EXECUTED 4a506: 4282 clrl %d2 <== NOT EXECUTED 4a508: 6000 0112 braw 4a61c <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4a50c: b8aa 0004 cmpl %a2@(4),%d4 <== NOT EXECUTED 4a510: 6304 blss 4a516 <== NOT EXECUTED 4a512: 7c01 moveq #1,%d6 <== NOT EXECUTED 4a514: 6002 bras 4a518 <== NOT EXECUTED 4a516: 2c04 movel %d4,%d6 <== NOT EXECUTED 4a518: 4282 clrl %d2 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4a51a: 4bf9 0004 b040 lea 4b040 ,%a5 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4a520: 49f9 0004 4f30 lea 44f30 ,%a4 <== NOT EXECUTED 4a526: 6000 00ec braw 4a614 <== 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)) { 4a52a: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4a52e: 7001 moveq #1,%d0 <== NOT EXECUTED 4a530: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4a534: 6706 beqs 4a53c <== NOT EXECUTED 4a536: 76f5 moveq #-11,%d3 <== NOT EXECUTED 4a538: 6000 00e2 braw 4a61c <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4a53c: 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 ++; 4a540: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4a544: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4a54a: 42a7 clrl %sp@- <== NOT EXECUTED 4a54c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a550: 4e95 jsr %a5@ <== NOT EXECUTED 4a552: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a556: 4a80 tstl %d0 <== NOT EXECUTED 4a558: 6602 bnes 4a55c <== NOT EXECUTED 4a55a: 4283 clrl %d3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4a55c: 42a7 clrl %sp@- <== NOT EXECUTED 4a55e: 42a7 clrl %sp@- <== NOT EXECUTED 4a560: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a564: 4e94 jsr %a4@ <== NOT EXECUTED 4a566: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a56a: 4a80 tstl %d0 <== NOT EXECUTED 4a56c: 6706 beqs 4a574 <== NOT EXECUTED 4a56e: 76fc moveq #-4,%d3 <== NOT EXECUTED 4a570: 6000 00b6 braw 4a628 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4a574: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 4a578: 4a83 tstl %d3 <== NOT EXECUTED 4a57a: 6600 00a0 bnew 4a61c <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4a57e: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a582: 6606 bnes 4a58a <== NOT EXECUTED 4a584: 76e0 moveq #-32,%d3 <== NOT EXECUTED 4a586: 6000 0094 braw 4a61c <== 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) { 4a58a: 2a2a 0004 movel %a2@(4),%d5 <== NOT EXECUTED 4a58e: 2005 movel %d5,%d0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4a590: 76fc moveq #-4,%d3 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 4a592: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 4a596: 9088 subl %a0,%d0 <== NOT EXECUTED 4a598: bc80 cmpl %d0,%d6 <== NOT EXECUTED 4a59a: 628e bhis 4a52a <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4a59c: 2600 movel %d0,%d3 <== NOT EXECUTED 4a59e: 2004 movel %d4,%d0 <== NOT EXECUTED 4a5a0: 9082 subl %d2,%d0 <== NOT EXECUTED 4a5a2: b083 cmpl %d3,%d0 <== NOT EXECUTED 4a5a4: 6402 bccs 4a5a8 <== NOT EXECUTED 4a5a6: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4a5a8: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED 4a5ac: 220b movel %a3,%d1 <== NOT EXECUTED 4a5ae: 2e08 movel %a0,%d7 <== NOT EXECUTED 4a5b0: 2c3c 0004 c200 movel #311808,%d6 <== NOT EXECUTED 4a5b6: d282 addl %d2,%d1 <== NOT EXECUTED 4a5b8: 4c45 7000 remul %d5,%d0,%d7 <== NOT EXECUTED 4a5bc: 9a80 subl %d0,%d5 <== NOT EXECUTED 4a5be: d092 addl %a2@,%d0 <== NOT EXECUTED if (chunk > chunk1) { 4a5c0: ba83 cmpl %d3,%d5 <== NOT EXECUTED 4a5c2: 6c24 bges 4a5e8 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4a5c4: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4a5c6: 2046 moveal %d6,%a0 <== NOT EXECUTED 4a5c8: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a5ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a5cc: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4a5ce: 2203 movel %d3,%d1 <== NOT EXECUTED 4a5d0: 9285 subl %d5,%d1 <== NOT EXECUTED 4a5d2: 2005 movel %d5,%d0 <== NOT EXECUTED 4a5d4: d082 addl %d2,%d0 <== NOT EXECUTED 4a5d6: 2046 moveal %d6,%a0 <== NOT EXECUTED 4a5d8: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a5da: 4873 0800 pea %a3@(00000000,%d0:l) <== NOT EXECUTED 4a5de: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a5e0: 4e90 jsr %a0@ <== NOT EXECUTED 4a5e2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4a5e6: 600e bras 4a5f6 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4a5e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4a5ea: 2046 moveal %d6,%a0 <== NOT EXECUTED 4a5ec: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a5ee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a5f0: 4e90 jsr %a0@ <== NOT EXECUTED 4a5f2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4a5f6: d7aa 000c addl %d3,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4a5fa: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4a5fe: 6710 beqs 4a610 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4a600: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a604: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a608: 4eb9 0004 afdc jsr 4afdc <== NOT EXECUTED 4a60e: 508f addql #8,%sp <== NOT EXECUTED written += chunk; 4a610: d483 addl %d3,%d2 <== NOT EXECUTED 4a612: 7c01 moveq #1,%d6 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4a614: b882 cmpl %d2,%d4 <== NOT EXECUTED 4a616: 6200 ff72 bhiw 4a58a <== NOT EXECUTED 4a61a: 4283 clrl %d3 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4a61c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a620: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 4a626: 588f addql #4,%sp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4a628: 4a82 tstl %d2 <== NOT EXECUTED 4a62a: 6e02 bgts 4a62e <== NOT EXECUTED 4a62c: 2403 movel %d3,%d2 <== NOT EXECUTED return written; return ret; } 4a62e: 2002 movel %d2,%d0 <== NOT EXECUTED 4a630: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a636: 4e5e unlk %fp <== NOT EXECUTED 4a638: 4e75 rts 00046280 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 46280: 4e56 0000 linkw %fp,#0 46284: 202e 000c movel %fp@(12),%d0 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46288: 2200 movel %d0,%d1 4628a: 5381 subql #1,%d1 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 4628c: 52b9 0006 0b78 addql #1,60b78 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46292: c280 andl %d0,%d1 46294: 6610 bnes 462a6 <== ALWAYS TAKEN 46296: 123c 0003 moveb #3,%d1 4629a: b280 cmpl %d0,%d1 4629c: 6408 bccs 462a6 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 4629e: 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 ); 462a0: 4ef9 0004 63bc jmp 463bc } 462a6: 7016 moveq #22,%d0 462a8: 4e5e unlk %fp 462aa: 4e75 rts 00042484 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 42484: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42488: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4248a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 4248e: 6008 bras 42498 <== NOT EXECUTED BSP_output_char(*p); 42490: 49c0 extbl %d0 <== NOT EXECUTED 42492: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42494: 4e91 jsr %a1@ <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 42496: 588f addql #4,%sp <== NOT EXECUTED 42498: 2279 0005 a91c moveal 5a91c ,%a1 <== NOT EXECUTED 4249e: 1012 moveb %a2@,%d0 <== NOT EXECUTED 424a0: 528a addql #1,%a2 <== NOT EXECUTED 424a2: 66ec bnes 42490 <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 424a4: 700a moveq #10,%d0 <== NOT EXECUTED } 424a6: 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'); 424aa: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 424ae: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 424b0: 4ed1 jmp %a1@ <== NOT EXECUTED ... 0005840c : ssize_t read( int fd, void *buffer, size_t count ) { 5840c: 4e56 fff4 linkw %fp,#-12 58410: 202e 000c movel %fp@(12),%d0 58414: 48d7 040c moveml %d2-%d3/%a2,%sp@ 58418: 242e 0008 movel %fp@(8),%d2 5841c: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 58420: b4b9 0005 a254 cmpl 5a254 ,%d2 58426: 6414 bccs 5843c <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 58428: 2479 0005 b8d8 moveal 5b8d8 ,%a2 5842e: ed8a lsll #6,%d2 58430: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 58432: 242a 0014 movel %a2@(20),%d2 58436: 0802 0008 btst #8,%d2 5843a: 6610 bnes 5844c 5843c: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 58442: 7409 moveq #9,%d2 58444: 72ff moveq #-1,%d1 58446: 2040 moveal %d0,%a0 58448: 2082 movel %d2,%a0@ 5844a: 6060 bras 584ac rtems_libio_check_buffer( buffer ); 5844c: 4a80 tstl %d0 5844e: 670a beqs 5845a <== ALWAYS TAKEN rtems_libio_check_count( count ); 58450: 4a81 tstl %d1 58452: 6758 beqs 584ac <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 58454: 0802 0001 btst #1,%d2 58458: 6610 bnes 5846a <== NEVER TAKEN 5845a: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 58460: 72ff moveq #-1,%d1 <== NOT EXECUTED 58462: 2040 moveal %d0,%a0 <== NOT EXECUTED 58464: 7016 moveq #22,%d0 <== NOT EXECUTED 58466: 2080 movel %d0,%a0@ <== NOT EXECUTED 58468: 6042 bras 584ac <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 5846a: 206a 003c moveal %a2@(60),%a0 5846e: 2068 0008 moveal %a0@(8),%a0 58472: 4a88 tstl %a0 58474: 6612 bnes 58488 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 58476: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 5847c: 72ff moveq #-1,%d1 <== NOT EXECUTED 5847e: 2040 moveal %d0,%a0 <== NOT EXECUTED 58480: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 58486: 6024 bras 584ac <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 58488: 2f01 movel %d1,%sp@- 5848a: 2f00 movel %d0,%sp@- 5848c: 2f0a movel %a2,%sp@- 5848e: 4e90 jsr %a0@ if ( rc > 0 ) 58490: 4fef 000c lea %sp@(12),%sp */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 58494: 2200 movel %d0,%d1 if ( rc > 0 ) 58496: 6f14 bles 584ac iop->offset += rc; 58498: 2600 movel %d0,%d3 5849a: 5bc2 smi %d2 5849c: 49c2 extbl %d2 5849e: d7aa 0010 addl %d3,%a2@(16) 584a2: 202a 000c movel %a2@(12),%d0 584a6: d182 addxl %d2,%d0 584a8: 2540 000c movel %d0,%a2@(12) return rc; } 584ac: 2001 movel %d1,%d0 584ae: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 584b4: 4e5e unlk %fp 584b6: 4e75 rts 00061a90 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 61a90: 4e56 ffe0 linkw %fp,#-32 61a94: 48d7 001c moveml %d2-%d4,%sp@ 61a98: 282e 0008 movel %fp@(8),%d4 61a9c: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t loc; int result; if (!buf) 61aa0: 6612 bnes 61ab4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 61aa2: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 61aa8: 76ff moveq #-1,%d3 <== NOT EXECUTED 61aaa: 720e moveq #14,%d1 <== NOT EXECUTED 61aac: 2040 moveal %d0,%a0 <== NOT EXECUTED 61aae: 2081 movel %d1,%a0@ <== NOT EXECUTED 61ab0: 6000 00c2 braw 61b74 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 61ab4: 2f04 movel %d4,%sp@- 61ab6: 240e movel %fp,%d2 61ab8: 0682 ffff ffec addil #-20,%d2 61abe: 4eb9 0007 aee8 jsr 7aee8 61ac4: 4297 clrl %sp@ 61ac6: 2f02 movel %d2,%sp@- 61ac8: 42a7 clrl %sp@- 61aca: 2f00 movel %d0,%sp@- 61acc: 2f04 movel %d4,%sp@- 61ace: 4eb9 0004 6566 jsr 46566 0, &loc, false ); if ( result != 0 ) 61ad4: 4fef 0014 lea %sp@(20),%sp 61ad8: 4a80 tstl %d0 61ada: 6706 beqs 61ae2 <== NEVER TAKEN 61adc: 76ff moveq #-1,%d3 <== NOT EXECUTED 61ade: 6000 0094 braw 61b74 <== NOT EXECUTED return -1; if ( !loc.ops->node_type_h ){ 61ae2: 226e fff8 moveal %fp@(-8),%a1 61ae6: 2069 0010 moveal %a1@(16),%a0 61aea: 4a88 tstl %a0 61aec: 6606 bnes 61af4 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 61aee: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 61af2: 603e bras 61b32 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 61af4: 2f02 movel %d2,%sp@- 61af6: 4e90 jsr %a0@ 61af8: 206e fff8 moveal %fp@(-8),%a0 61afc: 588f addql #4,%sp 61afe: 7204 moveq #4,%d1 61b00: b280 cmpl %d0,%d1 61b02: 6722 beqs 61b26 rtems_filesystem_freenode( &loc ); 61b04: 4a88 tstl %a0 61b06: 670e beqs 61b16 <== ALWAYS TAKEN 61b08: 2068 001c moveal %a0@(28),%a0 61b0c: 4a88 tstl %a0 61b0e: 6706 beqs 61b16 <== ALWAYS TAKEN 61b10: 2f02 movel %d2,%sp@- 61b12: 4e90 jsr %a0@ 61b14: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 61b16: 4eb9 0007 4e84 jsr 74e84 <__errno> 61b1c: 76ff moveq #-1,%d3 61b1e: 2040 moveal %d0,%a0 61b20: 7016 moveq #22,%d0 61b22: 2080 movel %d0,%a0@ 61b24: 604e bras 61b74 <== ALWAYS TAKEN } if ( !loc.ops->readlink_h ){ 61b26: 2268 003c moveal %a0@(60),%a1 61b2a: 4a89 tstl %a1 61b2c: 6620 bnes 61b4e <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 61b2e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61b32: 4a88 tstl %a0 <== NOT EXECUTED 61b34: 6706 beqs 61b3c <== NOT EXECUTED 61b36: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61b38: 4e90 jsr %a0@ <== NOT EXECUTED 61b3a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61b3c: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 61b42: 76ff moveq #-1,%d3 <== NOT EXECUTED 61b44: 2040 moveal %d0,%a0 <== NOT EXECUTED 61b46: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61b4c: 6026 bras 61b74 <== NOT EXECUTED } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 61b4e: 2f2e 0010 movel %fp@(16),%sp@- 61b52: 2f03 movel %d3,%sp@- 61b54: 2f02 movel %d2,%sp@- 61b56: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 61b58: 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 ); 61b5c: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 61b5e: 4fef 000c lea %sp@(12),%sp 61b62: 4a88 tstl %a0 61b64: 670e beqs 61b74 <== ALWAYS TAKEN 61b66: 2068 001c moveal %a0@(28),%a0 61b6a: 4a88 tstl %a0 61b6c: 6706 beqs 61b74 <== ALWAYS TAKEN 61b6e: 2f02 movel %d2,%sp@- 61b70: 4e90 jsr %a0@ 61b72: 588f addql #4,%sp return result; } 61b74: 2003 movel %d3,%d0 61b76: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 61b7c: 4e5e unlk %fp 61b7e: 4e75 rts 00044054 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44054: 4e56 ffe4 linkw %fp,#-28 44058: 202e 0008 movel %fp@(8),%d0 4405c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 44060: 266e 000c moveal %fp@(12),%a3 44064: 262e 0010 movel %fp@(16),%d3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 44068: b0b9 0005 da54 cmpl 5da54 ,%d0 4406e: 6414 bccs 44084 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 44070: 2479 0005 f8ac moveal 5f8ac ,%a2 44076: ed88 lsll #6,%d0 44078: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 4407a: 202a 0014 movel %a2@(20),%d0 4407e: 0800 0008 btst #8,%d0 44082: 6612 bnes 44096 <== NEVER TAKEN 44084: 4eb9 0004 da60 jsr 4da60 <__errno> <== NOT EXECUTED 4408a: 74ff moveq #-1,%d2 <== NOT EXECUTED 4408c: 7209 moveq #9,%d1 <== NOT EXECUTED 4408e: 2040 moveal %d0,%a0 <== NOT EXECUTED 44090: 2081 movel %d1,%a0@ <== NOT EXECUTED 44092: 6000 00b2 braw 44146 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 44096: 0800 0001 btst #1,%d0 4409a: 6748 beqs 440e4 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 4409c: 4a8b tstl %a3 4409e: 6744 beqs 440e4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 440a0: 4a83 tstl %d3 440a2: 6f40 bles 440e4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 440a4: 0c83 0000 0400 cmpil #1024,%d3 440aa: 6e38 bgts 440e4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 440ac: 206a 003c moveal %a2@(60),%a0 440b0: 4aa8 0008 tstl %a0@(8) 440b4: 6612 bnes 440c8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 440b6: 4eb9 0004 da60 jsr 4da60 <__errno> <== NOT EXECUTED 440bc: 74ff moveq #-1,%d2 <== NOT EXECUTED 440be: 2040 moveal %d0,%a0 <== NOT EXECUTED 440c0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 440c6: 607e bras 44146 <== NOT EXECUTED 440c8: 204b moveal %a3,%a0 440ca: 4281 clrl %d1 440cc: 4280 clrl %d0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 440ce: 5281 addql #1,%d1 ssize_t old; if ( !iov[v].iov_base ) 440d0: 4a90 tstl %a0@ 440d2: 6710 beqs 440e4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 440d4: 2428 0004 movel %a0@(4),%d2 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 440d8: 2240 moveal %d0,%a1 440da: d3c2 addal %d2,%a1 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 440dc: 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 ) 440de: 6704 beqs 440e4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 440e0: b089 cmpl %a1,%d0 440e2: 6f10 bles 440f4 rtems_set_errno_and_return_minus_one( EINVAL ); 440e4: 4eb9 0004 da60 jsr 4da60 <__errno> 440ea: 74ff moveq #-1,%d2 440ec: 2040 moveal %d0,%a0 440ee: 7016 moveq #22,%d0 440f0: 2080 movel %d0,%a0@ 440f2: 6052 bras 44146 <== ALWAYS TAKEN * 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++ ) { 440f4: b681 cmpl %d1,%d3 440f6: 6f04 bles 440fc 440f8: 2009 movel %a1,%d0 440fa: 60d2 bras 440ce <== ALWAYS TAKEN 440fc: 588b addql #4,%a3 440fe: 4284 clrl %d4 44100: 4282 clrl %d2 /* * 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 ); 44102: 206a 003c moveal %a2@(60),%a0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44106: 5284 addql #1,%d4 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 44108: 2f13 movel %a3@,%sp@- 4410a: 2f2b fffc movel %a3@(-4),%sp@- 4410e: 2f0a movel %a2,%sp@- 44110: 2068 0008 moveal %a0@(8),%a0 44114: 4e90 jsr %a0@ if ( bytes < 0 ) 44116: 4fef 000c lea %sp@(12),%sp 4411a: 4a80 tstl %d0 4411c: 6c04 bges 44122 <== NEVER TAKEN 4411e: 74ff moveq #-1,%d2 <== NOT EXECUTED 44120: 6024 bras 44146 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 44122: 4a80 tstl %d0 44124: 6716 beqs 4413c <== NEVER TAKEN iop->offset += bytes; total += bytes; 44126: d480 addl %d0,%d2 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 44128: 2c00 movel %d0,%d6 <== NOT EXECUTED 4412a: 5bc5 smi %d5 <== NOT EXECUTED 4412c: 49c5 extbl %d5 <== NOT EXECUTED 4412e: ddaa 0010 addl %d6,%a2@(16) <== NOT EXECUTED 44132: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 44136: d385 addxl %d5,%d1 <== NOT EXECUTED 44138: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 4413c: b093 cmpl %a3@,%d0 4413e: 6606 bnes 44146 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44140: 508b addql #8,%a3 <== NOT EXECUTED 44142: b684 cmpl %d4,%d3 <== NOT EXECUTED 44144: 6ebc bgts 44102 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44146: 2002 movel %d2,%d0 44148: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4414e: 4e5e unlk %fp 44150: 4e75 rts ... 0005851c : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5851c: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 5851e: 4e56 fff0 linkw %fp,#-16 58522: 52b9 0005 b8f4 addql #1,5b8f4 58528: 48d7 001c moveml %d2-%d4,%sp@ 5852c: 242e 0008 movel %fp@(8),%d2 58530: 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())) { 58534: b0b9 0005 bbb6 cmpl 5bbb6 <_System_state_Current>,%d0 5853a: 6614 bnes 58550 <== ALWAYS TAKEN if (_Thread_Dispatch_disable_level > 0) 5853c: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 58542: 6600 00aa bnew 585ee <== ALWAYS TAKEN return (void *) 0; if (_ISR_Nest_level > 0) 58546: 2039 0005 bace movel 5bace <_ISR_Nest_level>,%d0 5854c: 6600 00a0 bnew 585ee <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 58550: 4a82 tstl %d2 58552: 660c bnes 58560 return malloc( size ); 58554: 2f03 movel %d3,%sp@- 58556: 4eb9 0004 935c jsr 4935c 5855c: 2400 movel %d0,%d2 5855e: 600e bras 5856e <== ALWAYS TAKEN if ( !size ) { 58560: 4a83 tstl %d3 58562: 660e bnes 58572 <== NEVER TAKEN free( ptr ); 58564: 2f02 movel %d2,%sp@- <== NOT EXECUTED 58566: 4282 clrl %d2 <== NOT EXECUTED 58568: 4eb9 0004 8e80 jsr 48e80 <== NOT EXECUTED return (void *) 0; 5856e: 588f addql #4,%sp 58570: 607e bras 585f0 <== ALWAYS TAKEN } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 58572: 486e fffc pea %fp@(-4) 58576: 2f02 movel %d2,%sp@- 58578: 2f39 0005 a260 movel 5a260 ,%sp@- 5857e: 4eb9 0005 86a8 jsr 586a8 <_Protected_heap_Get_block_size> 58584: 4fef 000c lea %sp@(12),%sp 58588: 4a00 tstb %d0 5858a: 6610 bnes 5859c errno = EINVAL; 5858c: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 58592: 4282 clrl %d2 58594: 2040 moveal %d0,%a0 58596: 7016 moveq #22,%d0 58598: 2080 movel %d0,%a0@ return (void *) 0; 5859a: 6054 bras 585f0 <== ALWAYS TAKEN #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 ) ) { 5859c: 2f03 movel %d3,%sp@- 5859e: 2f02 movel %d2,%sp@- 585a0: 2f39 0005 a260 movel 5a260 ,%sp@- 585a6: 4eb9 0005 86e4 jsr 586e4 <_Protected_heap_Resize_block> 585ac: 4fef 000c lea %sp@(12),%sp 585b0: 4a00 tstb %d0 585b2: 663c bnes 585f0 * 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 ); 585b4: 2f03 movel %d3,%sp@- 585b6: 4eb9 0004 935c jsr 4935c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 585bc: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 585be: 53b9 0005 b8e8 subql #1,5b8e8 * 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 ); 585c4: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 585c6: 6726 beqs 585ee <== ALWAYS TAKEN return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 585c8: 202e fffc movel %fp@(-4),%d0 585cc: b083 cmpl %d3,%d0 585ce: 6402 bccs 585d2 <== ALWAYS TAKEN 585d0: 2600 movel %d0,%d3 585d2: 2f03 movel %d3,%sp@- 585d4: 2f02 movel %d2,%sp@- 585d6: 2f04 movel %d4,%sp@- 585d8: 4eb9 0004 c200 jsr 4c200 free( ptr ); 585de: 2f02 movel %d2,%sp@- 585e0: 2404 movel %d4,%d2 585e2: 4eb9 0004 8e80 jsr 48e80 return new_area; 585e8: 4fef 0010 lea %sp@(16),%sp 585ec: 6002 bras 585f0 <== ALWAYS TAKEN 585ee: 4282 clrl %d2 <== NOT EXECUTED } 585f0: 2002 movel %d2,%d0 585f2: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 585f8: 4e5e unlk %fp 585fa: 4e75 rts 00047808 : #include int rmdir( const char *pathname ) { 47808: 4e56 ffc0 linkw %fp,#-64 4780c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 47810: 246e 0008 moveal %fp@(8),%a2 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 47814: 2f0a movel %a2,%sp@- 47816: 4eb9 0004 6450 jsr 46450 if ( parentpathlen == 0 ) 4781c: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 4781e: 2a00 movel %d0,%d5 if ( parentpathlen == 0 ) 47820: 664a bnes 4786c rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 47822: 742f moveq #47,%d2 47824: 1012 moveb %a2@,%d0 47826: 1200 moveb %d0,%d1 47828: 49c1 extbl %d1 4782a: b481 cmpl %d1,%d2 4782c: 670c beqs 4783a <== NEVER TAKEN 4782e: 143c 005c moveb #92,%d2 <== NOT EXECUTED 47832: b481 cmpl %d1,%d2 <== NOT EXECUTED 47834: 6704 beqs 4783a <== NOT EXECUTED 47836: 4a00 tstb %d0 <== NOT EXECUTED 47838: 6612 bnes 4784c <== NOT EXECUTED 4783a: 4878 0014 pea 14 4783e: 2079 0009 5d3c moveal 95d3c ,%a0 47844: 41e8 0018 lea %a0@(24),%a0 47848: 2f08 movel %a0,%sp@- 4784a: 600e bras 4785a <== ALWAYS TAKEN 4784c: 4878 0014 pea 14 <== NOT EXECUTED 47850: 2039 0009 5d3c movel 95d3c ,%d0 <== NOT EXECUTED 47856: 5880 addql #4,%d0 <== NOT EXECUTED 47858: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4785a: 486e ffec pea %fp@(-20) 4785e: 4203 clrb %d3 47860: 4eb9 0007 7ebc jsr 77ebc 47866: 4fef 000c lea %sp@(12),%sp 4786a: 6020 bras 4788c <== ALWAYS TAKEN else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 4786c: 42a7 clrl %sp@- 4786e: 486e ffec pea %fp@(-20) 47872: 4878 0002 pea 2 47876: 2f00 movel %d0,%sp@- 47878: 2f0a movel %a2,%sp@- 4787a: 4eb9 0004 6566 jsr 46566 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 47880: 4fef 0014 lea %sp@(20),%sp 47884: 4a80 tstl %d0 47886: 6600 0168 bnew 479f0 <== ALWAYS TAKEN 4788a: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4788c: 4878 0014 pea 14 47890: 280e movel %fp,%d4 47892: 0684 ffff ffec addil #-20,%d4 47898: 240e movel %fp,%d2 4789a: 0682 ffff ffd8 addil #-40,%d2 name = pathname + parentpathlen; 478a0: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 478a2: 47f9 0007 aee8 lea 7aee8 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 478a8: 2f04 movel %d4,%sp@- 478aa: 2f02 movel %d2,%sp@- 478ac: 4eb9 0007 7ebc jsr 77ebc name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 478b2: 2f0a movel %a2,%sp@- 478b4: 4e93 jsr %a3@ 478b6: 2e80 movel %d0,%sp@ 478b8: 2f0a movel %a2,%sp@- 478ba: 4eb9 0004 6418 jsr 46418 478c0: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 478c2: 2f0a movel %a2,%sp@- 478c4: 4e93 jsr %a3@ 478c6: 4297 clrl %sp@ 478c8: 2f02 movel %d2,%sp@- 478ca: 42a7 clrl %sp@- 478cc: 2f00 movel %d0,%sp@- 478ce: 2f0a movel %a2,%sp@- 478d0: 4eb9 0004 6496 jsr 46496 0, &loc, false ); if ( result != 0 ) { 478d6: 4fef 0028 lea %sp@(40),%sp 478da: 4a80 tstl %d0 478dc: 6722 beqs 47900 if ( free_parentloc ) 478de: 4a03 tstb %d3 478e0: 6700 010e beqw 479f0 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 478e4: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 478e8: 4a88 tstl %a0 <== NOT EXECUTED 478ea: 6700 0104 beqw 479f0 <== NOT EXECUTED 478ee: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 478f2: 4a88 tstl %a0 <== NOT EXECUTED 478f4: 6700 00fa beqw 479f0 <== NOT EXECUTED 478f8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 478fa: 78ff moveq #-1,%d4 <== NOT EXECUTED 478fc: 6000 00ec braw 479ea <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 47900: 226e ffe4 moveal %fp@(-28),%a1 47904: 2069 0010 moveal %a1@(16),%a0 47908: 4a88 tstl %a0 4790a: 6606 bnes 47912 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 4790c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 47910: 6068 bras 4797a <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 47912: 2f02 movel %d2,%sp@- 47914: 4e90 jsr %a0@ 47916: 588f addql #4,%sp 47918: 7201 moveq #1,%d1 4791a: b280 cmpl %d0,%d1 4791c: 6744 beqs 47962 rtems_filesystem_freenode( &loc ); 4791e: 206e ffe4 moveal %fp@(-28),%a0 47922: 4a88 tstl %a0 47924: 670e beqs 47934 <== ALWAYS TAKEN 47926: 2068 001c moveal %a0@(28),%a0 4792a: 4a88 tstl %a0 4792c: 6706 beqs 47934 <== ALWAYS TAKEN 4792e: 2f02 movel %d2,%sp@- 47930: 4e90 jsr %a0@ 47932: 588f addql #4,%sp if ( free_parentloc ) 47934: 4a03 tstb %d3 47936: 6718 beqs 47950 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 47938: 206e fff8 moveal %fp@(-8),%a0 4793c: 4a88 tstl %a0 4793e: 6710 beqs 47950 <== ALWAYS TAKEN 47940: 2068 001c moveal %a0@(28),%a0 47944: 4a88 tstl %a0 47946: 6708 beqs 47950 <== ALWAYS TAKEN 47948: 486e ffec pea %fp@(-20) 4794c: 4e90 jsr %a0@ 4794e: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 47950: 4eb9 0007 4e84 jsr 74e84 <__errno> 47956: 78ff moveq #-1,%d4 47958: 2040 moveal %d0,%a0 4795a: 7014 moveq #20,%d0 4795c: 2080 movel %d0,%a0@ 4795e: 6000 0092 braw 479f2 <== ALWAYS TAKEN /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 47962: 206e ffe0 moveal %fp@(-32),%a0 47966: 2068 0034 moveal %a0@(52),%a0 4796a: 4a88 tstl %a0 4796c: 6644 bnes 479b2 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 4796e: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 47972: 4a88 tstl %a0 <== NOT EXECUTED 47974: 670e beqs 47984 <== NOT EXECUTED 47976: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4797a: 4a88 tstl %a0 <== NOT EXECUTED 4797c: 6706 beqs 47984 <== NOT EXECUTED 4797e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47980: 4e90 jsr %a0@ <== NOT EXECUTED 47982: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 47984: 4a03 tstb %d3 <== NOT EXECUTED 47986: 6718 beqs 479a0 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 47988: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4798c: 4a88 tstl %a0 <== NOT EXECUTED 4798e: 6710 beqs 479a0 <== NOT EXECUTED 47990: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47994: 4a88 tstl %a0 <== NOT EXECUTED 47996: 6708 beqs 479a0 <== NOT EXECUTED 47998: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4799c: 4e90 jsr %a0@ <== NOT EXECUTED 4799e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 479a0: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 479a6: 78ff moveq #-1,%d4 <== NOT EXECUTED 479a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 479aa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 479b0: 6040 bras 479f2 <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 479b2: 2f02 movel %d2,%sp@- 479b4: 2f04 movel %d4,%sp@- 479b6: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 479b8: 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 ); 479bc: 2800 movel %d0,%d4 rtems_filesystem_freenode( &loc ); 479be: 508f addql #8,%sp 479c0: 4a88 tstl %a0 479c2: 670e beqs 479d2 <== ALWAYS TAKEN 479c4: 2068 001c moveal %a0@(28),%a0 479c8: 4a88 tstl %a0 479ca: 6706 beqs 479d2 <== ALWAYS TAKEN 479cc: 2f02 movel %d2,%sp@- 479ce: 4e90 jsr %a0@ 479d0: 588f addql #4,%sp if ( free_parentloc ) 479d2: 4a03 tstb %d3 479d4: 671c beqs 479f2 rtems_filesystem_freenode( &parentloc ); 479d6: 206e fff8 moveal %fp@(-8),%a0 479da: 4a88 tstl %a0 479dc: 6714 beqs 479f2 <== ALWAYS TAKEN 479de: 2068 001c moveal %a0@(28),%a0 479e2: 4a88 tstl %a0 479e4: 670c beqs 479f2 <== ALWAYS TAKEN 479e6: 486e ffec pea %fp@(-20) 479ea: 4e90 jsr %a0@ 479ec: 588f addql #4,%sp 479ee: 6002 bras 479f2 <== ALWAYS TAKEN 479f0: 78ff moveq #-1,%d4 return result; } 479f2: 2004 movel %d4,%d0 479f4: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 479fa: 4e5e unlk %fp 479fc: 4e75 rts ... 0004ae5c : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4ae5c: 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; } 4ae60: 203c 0005 a3b0 movel #369584,%d0 <== NOT EXECUTED 4ae66: 4e5e unlk %fp <== NOT EXECUTED 4ae68: 4e75 rts <== NOT EXECUTED ... 00048d18 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 48d18: 4e56 0000 linkw %fp,#0 48d1c: 2f02 movel %d2,%sp@- 48d1e: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 48d22: 2f02 movel %d2,%sp@- 48d24: 2f2e 0008 movel %fp@(8),%sp@- 48d28: 4eb9 0004 8d50 jsr 48d50 if (nap) 48d2e: 508f addql #8,%sp 48d30: 4a80 tstl %d0 48d32: 670c beqs 48d40 <== ALWAYS TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } 48d34: 2040 moveal %d0,%a0 48d36: 242e fffc movel %fp@(-4),%d2 48d3a: 4e5e unlk %fp 48d3c: 2010 movel %a0@,%d0 48d3e: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 48d40: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 48d44: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48d48: 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); 48d4a: 4ef9 0004 ae5c jmp 4ae5c <== NOT EXECUTED 00048d50 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 48d50: 4e56 0000 linkw %fp,#0 48d54: 2f0a movel %a2,%sp@- 48d56: 246e 0008 moveal %fp@(8),%a2 48d5a: 2f02 movel %d2,%sp@- 48d5c: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 48d60: 2012 movel %a2@,%d0 48d62: 6718 beqs 48d7c <== ALWAYS TAKEN 48d64: 4879 0005 96a6 pea 596a6 48d6a: 2f00 movel %d0,%sp@- 48d6c: 4eb9 0004 c8e8 jsr 4c8e8 48d72: 508f addql #8,%sp 48d74: 4a80 tstl %d0 48d76: 6604 bnes 48d7c <== NEVER TAKEN default_ap = ap++; 48d78: 200a movel %a2,%d0 <== NOT EXECUTED 48d7a: 600a bras 48d86 <== NOT EXECUTED 48d7c: 4280 clrl %d0 48d7e: 600a bras 48d8a <== ALWAYS TAKEN for ( ; ap->name; ap++) if (ap->local_value == local_value) 48d80: b4aa 0004 cmpl %a2@(4),%d2 48d84: 670a beqs 48d90 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 48d86: 45ea 000c lea %a2@(12),%a2 48d8a: 4a92 tstl %a2@ 48d8c: 66f2 bnes 48d80 48d8e: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 48d90: 200a movel %a2,%d0 48d92: 242e fff8 movel %fp@(-8),%d2 48d96: 246e fffc moveal %fp@(-4),%a2 48d9a: 4e5e unlk %fp 48d9c: 4e75 rts ... 0004ae6c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4ae6c: 4e56 0000 linkw %fp,#0 4ae70: 2f0a movel %a2,%sp@- 4ae72: 246e 0008 moveal %fp@(8),%a2 4ae76: 2f02 movel %d2,%sp@- 4ae78: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4ae7c: 2012 movel %a2@,%d0 4ae7e: 6718 beqs 4ae98 <== ALWAYS TAKEN 4ae80: 4879 0005 96a6 pea 596a6 4ae86: 2f00 movel %d0,%sp@- 4ae88: 4eb9 0004 c8e8 jsr 4c8e8 4ae8e: 508f addql #8,%sp 4ae90: 4a80 tstl %d0 4ae92: 6604 bnes 4ae98 <== NEVER TAKEN default_ap = ap++; 4ae94: 200a movel %a2,%d0 <== NOT EXECUTED 4ae96: 600a bras 4aea2 <== NOT EXECUTED 4ae98: 4280 clrl %d0 4ae9a: 600a bras 4aea6 <== ALWAYS TAKEN for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4ae9c: b4aa 0008 cmpl %a2@(8),%d2 4aea0: 670a beqs 4aeac const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4aea2: 45ea 000c lea %a2@(12),%a2 4aea6: 4a92 tstl %a2@ 4aea8: 66f2 bnes 4ae9c 4aeaa: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4aeac: 200a movel %a2,%d0 4aeae: 242e fff8 movel %fp@(-8),%d2 4aeb2: 246e fffc moveal %fp@(-4),%a2 4aeb6: 4e5e unlk %fp 4aeb8: 4e75 rts ... 0004b758 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4b758: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4b75c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4b760: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4b764: 4eb9 0004 8d50 jsr 48d50 <== NOT EXECUTED if (nap) 4b76a: 508f addql #8,%sp <== NOT EXECUTED 4b76c: 4a80 tstl %d0 <== NOT EXECUTED 4b76e: 6706 beqs 4b776 <== NOT EXECUTED return nap->remote_value; 4b770: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b772: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4b776: 4e5e unlk %fp <== NOT EXECUTED 4b778: 4e75 rts <== NOT EXECUTED ... 0004aebc : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4aebc: 4e56 ffe4 linkw %fp,#-28 4aec0: 202e 0010 movel %fp@(16),%d0 4aec4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4aec8: 242e 0008 movel %fp@(8),%d2 4aecc: 262e 000c movel %fp@(12),%d3 4aed0: 266e 0014 moveal %fp@(20),%a3 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4aed4: 4a82 tstl %d2 4aed6: 6606 bnes 4aede 4aed8: 7003 moveq #3,%d0 4aeda: 6000 0088 braw 4af64 <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 4aede: 4a8b tstl %a3 4aee0: 6604 bnes 4aee6 4aee2: 7009 moveq #9,%d0 4aee4: 607e bras 4af64 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4aee6: 0803 0004 btst #4,%d3 4aeea: 6710 beqs 4aefc the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4aeec: 4a80 tstl %d0 4aeee: 6606 bnes 4aef6 4aef0: 103c 000a moveb #10,%d0 4aef4: 606e bras 4af64 <== ALWAYS TAKEN if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4aef6: 42ae fff8 clrl %fp@(-8) 4aefa: 6006 bras 4af02 <== ALWAYS TAKEN if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4aefc: 7201 moveq #1,%d1 4aefe: 2d41 fff8 movel %d1,%fp@(-8) 4af02: 2239 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d1 4af08: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4af0a: 2d40 fffc movel %d0,%fp@(-4) 4af0e: 23c1 0005 ba34 movel %d1,5ba34 <_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 ); 4af14: 4879 0005 bc56 pea 5bc56 <_Barrier_Information> 4af1a: 45f9 0004 6c6e lea 46c6e <_Thread_Enable_dispatch>,%a2 4af20: 4eb9 0004 604c jsr 4604c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4af26: 588f addql #4,%sp 4af28: 2840 moveal %d0,%a4 4af2a: 4a80 tstl %d0 4af2c: 6606 bnes 4af34 _Thread_Enable_dispatch(); 4af2e: 4e92 jsr %a2@ 4af30: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4af32: 6030 bras 4af64 <== ALWAYS TAKEN } the_barrier->attribute_set = attribute_set; 4af34: 2943 0010 movel %d3,%a4@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4af38: 486e fff8 pea %fp@(-8) 4af3c: 486c 0014 pea %a4@(20) 4af40: 4eb9 0004 b380 jsr 4b380 <_CORE_barrier_Initialize> 4af46: 202c 0008 movel %a4@(8),%d0 4af4a: 4281 clrl %d1 4af4c: 2079 0005 bc6e moveal 5bc6e <_Barrier_Information+0x18>,%a0 4af52: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4af54: 2942 000c movel %d2,%a4@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4af58: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4af5c: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 4af5e: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 4af60: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4af62: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4af64: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 4af6a: 4e5e unlk %fp 4af6c: 4e75 rts ... 0004af70 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4af70: 4e56 fffc linkw %fp,#-4 4af74: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4af76: 486e fffc pea %fp@(-4) 4af7a: 2f2e 0008 movel %fp@(8),%sp@- 4af7e: 4879 0005 bc56 pea 5bc56 <_Barrier_Information> 4af84: 4eb9 0004 6498 jsr 46498 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4af8a: 4fef 000c lea %sp@(12),%sp 4af8e: 2440 moveal %d0,%a2 4af90: 4aae fffc tstl %fp@(-4) 4af94: 6704 beqs 4af9a 4af96: 7004 moveq #4,%d0 4af98: 6038 bras 4afd2 <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 4af9a: 4878 0002 pea 2 4af9e: 42a7 clrl %sp@- 4afa0: 486a 0014 pea %a2@(20) 4afa4: 4eb9 0004 72cc jsr 472cc <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 4afaa: 2f0a movel %a2,%sp@- 4afac: 4879 0005 bc56 pea 5bc56 <_Barrier_Information> 4afb2: 4eb9 0004 60cc jsr 460cc <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4afb8: 2f0a movel %a2,%sp@- 4afba: 4879 0005 bc56 pea 5bc56 <_Barrier_Information> 4afc0: 4eb9 0004 6340 jsr 46340 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4afc6: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4afcc: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_Barrier_Information, &the_barrier->Object ); _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4afd0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4afd2: 246e fff8 moveal %fp@(-8),%a2 4afd6: 4e5e unlk %fp 4afd8: 4e75 rts ... 0004afdc : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 4afdc: 4e56 fffc linkw %fp,#-4 4afe0: 2f0a movel %a2,%sp@- 4afe2: 246e 000c moveal %fp@(12),%a2 4afe6: 2f02 movel %d2,%sp@- 4afe8: 242e 0008 movel %fp@(8),%d2 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4afec: 4a8a tstl %a2 4afee: 6604 bnes 4aff4 4aff0: 7009 moveq #9,%d0 4aff2: 603e bras 4b032 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4aff4: 486e fffc pea %fp@(-4) 4aff8: 2f02 movel %d2,%sp@- 4affa: 4879 0005 bc56 pea 5bc56 <_Barrier_Information> 4b000: 4eb9 0004 6498 jsr 46498 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4b006: 4fef 000c lea %sp@(12),%sp 4b00a: 4aae fffc tstl %fp@(-4) 4b00e: 6704 beqs 4b014 4b010: 7004 moveq #4,%d0 4b012: 601e bras 4b032 <== ALWAYS TAKEN case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 4b014: 42a7 clrl %sp@- 4b016: 2040 moveal %d0,%a0 4b018: 2f02 movel %d2,%sp@- 4b01a: 4868 0014 pea %a0@(20) 4b01e: 4eb9 0004 b3bc jsr 4b3bc <_CORE_barrier_Release> 4b024: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4b026: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4b02c: 4fef 000c lea %sp@(12),%sp the_barrier = _Barrier_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch(); 4b030: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b032: 242e fff4 movel %fp@(-12),%d2 4b036: 246e fff8 moveal %fp@(-8),%a2 4b03a: 4e5e unlk %fp 4b03c: 4e75 rts ... 0004b040 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 4b040: 4e56 fffc linkw %fp,#-4 4b044: 2f02 movel %d2,%sp@- 4b046: 486e fffc pea %fp@(-4) 4b04a: 242e 0008 movel %fp@(8),%d2 4b04e: 2f02 movel %d2,%sp@- 4b050: 4879 0005 bc56 pea 5bc56 <_Barrier_Information> 4b056: 4eb9 0004 6498 jsr 46498 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4b05c: 4fef 000c lea %sp@(12),%sp 4b060: 4aae fffc tstl %fp@(-4) 4b064: 6704 beqs 4b06a 4b066: 7004 moveq #4,%d0 4b068: 6032 bras 4b09c <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Wait( 4b06a: 42a7 clrl %sp@- 4b06c: 2f2e 000c movel %fp@(12),%sp@- 4b070: 2040 moveal %d0,%a0 4b072: 4878 0001 pea 1 4b076: 2f02 movel %d2,%sp@- 4b078: 4868 0014 pea %a0@(20) 4b07c: 4eb9 0004 b3f0 jsr 4b3f0 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 4b082: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 4b088: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 4b08e: 2f28 0034 movel %a0@(52),%sp@- 4b092: 4eb9 0004 b998 jsr 4b998 <_Barrier_Translate_core_barrier_return_code> 4b098: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b09c: 242e fff8 movel %fp@(-8),%d2 4b0a0: 4e5e unlk %fp 4b0a2: 4e75 rts 00042140 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42140: 4e56 ffe8 linkw %fp,#-24 42144: 202e 0008 movel %fp@(8),%d0 42148: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4214c: 246e 000c moveal %fp@(12),%a2 42150: 242e 0010 movel %fp@(16),%d2 const char *p; if ( !name ) 42154: 4a80 tstl %d0 42156: 6756 beqs 421ae return NULL; if ( !value ) 42158: 4a8a tstl %a2 4215a: 6754 beqs 421b0 return NULL; if ( !length ) 4215c: 4a82 tstl %d2 4215e: 674e beqs 421ae return NULL; value[0] = '\0'; 42160: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 42162: 2f00 movel %d0,%sp@- 42164: 4eb9 0004 21bc jsr 421bc if ( !p ) 4216a: 588f addql #4,%sp 4216c: 4a80 tstl %d0 4216e: 673e beqs 421ae int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i <== ALWAYS TAKEN int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i <== NEVER TAKEN quotes++; 4217e: 5283 addql #1,%d3 <== NOT EXECUTED 42180: 600c bras 4218e <== NOT EXECUTED } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42182: 0803 0000 btst #0,%d3 42186: 6606 bnes 4218e <== ALWAYS TAKEN 42188: 7c20 moveq #32,%d6 4218a: bc85 cmpl %d5,%d6 4218c: 6722 beqs 421b0 <== ALWAYS TAKEN break; value[i++] = *p++; 4218e: 1584 1800 moveb %d4,%a2@(00000000,%d1:l) value[i] = '\0'; 42192: 4204 clrb %d4 for (i=0 ; *p && i 421a8: b481 cmpl %d1,%d2 421aa: 62cc bhis 42178 <== NEVER TAKEN 421ac: 6002 bras 421b0 <== NOT EXECUTED 421ae: 95ca subal %a2,%a2 return NULL; copy_string( p, value, length ); return value; } 421b0: 200a movel %a2,%d0 421b2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 421b8: 4e5e unlk %fp 421ba: 4e75 rts 000421bc : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 421bc: 4e56 0000 linkw %fp,#0 421c0: 222e 0008 movel %fp@(8),%d1 const char *p; if ( !name ) 421c4: 6716 beqs 421dc return NULL; if ( !bsp_boot_cmdline ) 421c6: 2039 0005 c404 movel 5c404 ,%d0 421cc: 670e beqs 421dc return NULL; p = strstr(bsp_boot_cmdline, name); 421ce: 2f01 movel %d1,%sp@- 421d0: 2f00 movel %d0,%sp@- 421d2: 4eb9 0004 d68c jsr 4d68c 421d8: 508f addql #8,%sp /* printf( "raw: %p (%s)\n", p, p ); */ return p; 421da: 6002 bras 421de <== ALWAYS TAKEN 421dc: 4280 clrl %d0 } 421de: 4e5e unlk %fp 421e0: 4e75 rts ... 000421e4 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421e4: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 421e8: 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 ); 421ec: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421f0: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED 421f4: 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 ); 421f8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 421fa: 2f04 movel %d4,%sp@- <== NOT EXECUTED 421fc: 4eb9 0004 2140 jsr 42140 <== NOT EXECUTED if ( !p ) 42202: 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 ); 42206: 2600 movel %d0,%d3 <== NOT EXECUTED if ( !p ) 42208: 6746 beqs 42250 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 4220a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4220c: 4eb9 0004 d194 jsr 4d194 <== NOT EXECUTED 42212: 588f addql #4,%sp <== NOT EXECUTED 42214: 2043 moveal %d3,%a0 <== NOT EXECUTED 42216: d1c0 addal %d0,%a0 <== NOT EXECUTED if ( *rhs != '=' ) 42218: 723d moveq #61,%d1 <== NOT EXECUTED 4221a: 1010 moveb %a0@,%d0 <== NOT EXECUTED 4221c: 49c0 extbl %d0 <== NOT EXECUTED 4221e: b280 cmpl %d0,%d1 <== NOT EXECUTED 42220: 662e bnes 42250 <== NOT EXECUTED return NULL; rhs++; 42222: 5288 addql #1,%a0 <== NOT EXECUTED if ( *rhs == '\"' ) 42224: 123c 0022 moveb #34,%d1 <== NOT EXECUTED 42228: 1010 moveb %a0@,%d0 <== NOT EXECUTED 4222a: 49c0 extbl %d0 <== NOT EXECUTED 4222c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4222e: 6602 bnes 42232 <== NOT EXECUTED rhs++; 42230: 5288 addql #1,%a0 <== NOT EXECUTED 42232: 2242 moveal %d2,%a1 <== NOT EXECUTED 42234: 6002 bras 42238 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 42236: 12c0 moveb %d0,%a1@+ <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42238: 1010 moveb %a0@,%d0 <== NOT EXECUTED *d++ = *rhs++; 4223a: 5288 addql #1,%a0 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 4223c: 66f8 bnes 42236 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 4223e: 2049 moveal %a1,%a0 <== NOT EXECUTED 42240: 7222 moveq #34,%d1 <== NOT EXECUTED 42242: 1020 moveb %a0@-,%d0 <== NOT EXECUTED 42244: 49c0 extbl %d0 <== NOT EXECUTED 42246: b280 cmpl %d0,%d1 <== NOT EXECUTED 42248: 6602 bnes 4224c <== NOT EXECUTED 4224a: 2248 moveal %a0,%a1 <== NOT EXECUTED d--; *d = '\0'; 4224c: 4211 clrb %a1@ <== NOT EXECUTED return value; 4224e: 6002 bras 42252 <== NOT EXECUTED 42250: 4282 clrl %d2 <== NOT EXECUTED } 42252: 2002 movel %d2,%d0 <== NOT EXECUTED 42254: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4225a: 4e5e unlk %fp <== NOT EXECUTED 4225c: 4e75 rts <== NOT EXECUTED ... 00049afc : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 49afc: 4e56 0000 linkw %fp,#0 49b00: 202e 0008 movel %fp@(8),%d0 49b04: 2f0a movel %a2,%sp@- 49b06: 246e 000c moveal %fp@(12),%a2 if ( !time_buffer ) 49b0a: 4a8a tstl %a2 49b0c: 6604 bnes 49b12 49b0e: 7209 moveq #9,%d1 49b10: 6066 bras 49b78 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 49b12: 4a80 tstl %d0 49b14: 6610 bnes 49b26 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 49b16: 2d4a 0008 movel %a2,%fp@(8) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 49b1a: 246e fffc moveal %fp@(-4),%a2 49b1e: 4e5e unlk %fp { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 49b20: 4ef9 0004 9bd4 jmp 49bd4 if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 49b26: 7201 moveq #1,%d1 49b28: b280 cmpl %d0,%d1 49b2a: 6610 bnes 49b3c return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 49b2c: 2d4a 0008 movel %a2,%fp@(8) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 49b30: 246e fffc moveal %fp@(-4),%a2 49b34: 4e5e unlk %fp if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 49b36: 4ef9 0004 9b84 jmp 49b84 if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 49b3c: 7202 moveq #2,%d1 49b3e: b280 cmpl %d0,%d1 49b40: 6608 bnes 49b4a rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 49b42: 4eb9 0004 9bc4 jsr 49bc4 49b48: 600c bras 49b56 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 49b4a: 7203 moveq #3,%d1 49b4c: b280 cmpl %d0,%d1 49b4e: 660c bnes 49b5c rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 49b50: 4eb9 0004 9bac jsr 49bac 49b56: 2480 movel %d0,%a2@ 49b58: 4281 clrl %d1 return RTEMS_SUCCESSFUL; 49b5a: 601c bras 49b78 <== ALWAYS TAKEN } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 49b5c: 7204 moveq #4,%d1 49b5e: b280 cmpl %d0,%d1 49b60: 6706 beqs 49b68 49b62: 123c 000a moveb #10,%d1 49b66: 6010 bras 49b78 <== ALWAYS TAKEN return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 49b68: 2d4a 0008 movel %a2,%fp@(8) return RTEMS_INVALID_NUMBER; } 49b6c: 246e fffc moveal %fp@(-4),%a2 49b70: 4e5e unlk %fp *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 49b72: 4ef9 0004 9c88 jmp 49c88 return RTEMS_INVALID_NUMBER; } 49b78: 246e fffc moveal %fp@(-4),%a2 49b7c: 2001 movel %d1,%d0 49b7e: 4e5e unlk %fp 49b80: 4e75 rts ... 000455f0 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 455f0: 4e56 0000 linkw %fp,#0 455f4: 206e 0008 moveal %fp@(8),%a0 if ( !the_interval ) 455f8: 4a88 tstl %a0 455fa: 6604 bnes 45600 455fc: 7009 moveq #9,%d0 455fe: 6014 bras 45614 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 45600: 4a39 0006 58b8 tstb 658b8 <_TOD_Is_set> 45606: 6604 bnes 4560c 45608: 700b moveq #11,%d0 4560a: 6008 bras 45614 <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 4560c: 20b9 0006 5936 movel 65936 <_TOD_Now>,%a0@ 45612: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45614: 4e5e unlk %fp 45616: 4e75 rts 00045640 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 45640: 4e56 ffcc linkw %fp,#-52 45644: 2f0a movel %a2,%sp@- 45646: 246e 0008 moveal %fp@(8),%a2 4564a: 2f02 movel %d2,%sp@- rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 4564c: 4a8a tstl %a2 4564e: 6606 bnes 45656 45650: 7009 moveq #9,%d0 45652: 6000 0092 braw 456e6 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 45656: 4a39 0006 58b8 tstb 658b8 <_TOD_Is_set> 4565c: 6606 bnes 45664 4565e: 700b moveq #11,%d0 45660: 6000 0084 braw 456e6 <== ALWAYS TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 45664: 203c 0000 0700 movel #1792,%d0 4566a: 40c2 movew %sr,%d2 4566c: 8082 orl %d2,%d0 4566e: 46c0 movew %d0,%sr _TOD_Get( &now ); 45670: 486e fff0 pea %fp@(-16) 45674: 4eb9 0004 6d48 jsr 46d48 <_TOD_Get> _ISR_Enable(level); 4567a: 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; 4567c: 243c 0000 03e8 movel #1000,%d2 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 45682: 486e ffcc pea %fp@(-52) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 45686: 202e fff4 movel %fp@(-12),%d0 4568a: 486e fff8 pea %fp@(-8) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 4568e: 2d6e fff0 fff8 movel %fp@(-16),%fp@(-8) time->tv_usec = useconds; 45694: 4c42 0800 remsl %d2,%d0,%d0 45698: 2d40 fffc movel %d0,%fp@(-4) 4569c: 4eb9 0004 d53c jsr 4d53c /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; 456a2: 206e ffdc moveal %fp@(-36),%a0 456a6: 5288 addql #1,%a0 tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 456a8: 4fef 000c lea %sp@(12),%sp tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / 456ac: 4280 clrl %d0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; 456ae: 2548 0004 movel %a0,%a2@(4) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 456b2: 206e ffe0 moveal %fp@(-32),%a0 456b6: 41e8 076c lea %a0@(1900),%a0 tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 456ba: 256e ffd8 0008 movel %fp@(-40),%a2@(8) tmbuf->hour = time.tm_hour; 456c0: 256e ffd4 000c movel %fp@(-44),%a2@(12) tmbuf->minute = time.tm_min; 456c6: 256e ffd0 0010 movel %fp@(-48),%a2@(16) tmbuf->second = time.tm_sec; 456cc: 256e ffcc 0014 movel %fp@(-52),%a2@(20) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 456d2: 2488 movel %a0,%a2@ tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / 456d4: 242e fffc movel %fp@(-4),%d2 456d8: 41f9 0005 c3c0 lea 5c3c0 ,%a0 456de: 4c50 2002 remul %a0@,%d2,%d2 456e2: 2542 0018 movel %d2,%a2@(24) rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 456e6: 242e ffc4 movel %fp@(-60),%d2 456ea: 246e ffc8 moveal %fp@(-56),%a2 456ee: 4e5e unlk %fp 456f0: 4e75 rts ... 00049c88 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 49c88: 4e56 ffec linkw %fp,#-20 49c8c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49c90: 246e 0008 moveal %fp@(8),%a2 if ( !time ) 49c94: 4a8a tstl %a2 49c96: 6604 bnes 49c9c 49c98: 7009 moveq #9,%d0 49c9a: 603e bras 49cda <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 49c9c: 4a39 0009 a7dc tstb 9a7dc <_TOD_Is_set> 49ca2: 6604 bnes 49ca8 49ca4: 700b moveq #11,%d0 49ca6: 6032 bras 49cda <== ALWAYS TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 49ca8: 203c 0000 0700 movel #1792,%d0 49cae: 40c2 movew %sr,%d2 49cb0: 8082 orl %d2,%d0 49cb2: 46c0 movew %d0,%sr _TOD_Get( &now ); 49cb4: 486e fff8 pea %fp@(-8) 49cb8: 4eb9 0004 afec jsr 4afec <_TOD_Get> _ISR_Enable(level); 49cbe: 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; 49cc0: 263c 0000 03e8 movel #1000,%d3 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 49cc6: 588f addql #4,%sp 49cc8: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 49cca: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 49cce: 4c43 1801 remsl %d3,%d1,%d1 49cd2: 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; 49cd6: 24ae fff8 movel %fp@(-8),%a2@ } 49cda: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 49ce0: 4e5e unlk %fp 49ce2: 4e75 rts 0006228c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 6228c: 4e56 0000 linkw %fp,#0 62290: 202e 0008 movel %fp@(8),%d0 if ( !uptime ) 62294: 6606 bnes 6229c 62296: 103c 0009 moveb #9,%d0 6229a: 600c bras 622a8 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 6229c: 2f00 movel %d0,%sp@- 6229e: 4eb9 0006 30f0 jsr 630f0 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 622a4: 588f addql #4,%sp ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 622a6: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 622a8: 4e5e unlk %fp 622aa: 4e75 rts 00045710 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 45710: 4e56 fff8 linkw %fp,#-8 45714: 2f0a movel %a2,%sp@- 45716: 246e 0008 moveal %fp@(8),%a2 4571a: 2f02 movel %d2,%sp@- struct timespec newtime; if ( !time_buffer ) 4571c: 4a8a tstl %a2 4571e: 6604 bnes 45724 45720: 7009 moveq #9,%d0 45722: 605c bras 45780 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 45724: 2f0a movel %a2,%sp@- 45726: 4eb9 0004 5868 jsr 45868 <_TOD_Validate> 4572c: 588f addql #4,%sp 4572e: 4a00 tstb %d0 45730: 6604 bnes 45736 45732: 7014 moveq #20,%d0 45734: 604a bras 45780 <== ALWAYS TAKEN newtime.tv_sec = _TOD_To_seconds( time_buffer ); 45736: 2f0a movel %a2,%sp@- 45738: 4eb9 0004 57c8 jsr 457c8 <_TOD_To_seconds> newtime.tv_nsec = time_buffer->ticks * 4573e: 242a 0018 movel %a2@(24),%d2 45742: 41f9 0005 c3c0 lea 5c3c0 ,%a0 45748: 4c10 2800 mulsl %a0@,%d2 if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 4574c: 2d40 fff8 movel %d0,%fp@(-8) newtime.tv_nsec = time_buffer->ticks * 45750: 203c 0000 03e8 movel #1000,%d0 45756: 4c02 0800 mulsl %d2,%d0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4575a: 2239 0006 58a4 movel 658a4 <_Thread_Dispatch_disable_level>,%d1 45760: 5281 addql #1,%d1 45762: 2d40 fffc movel %d0,%fp@(-4) 45766: 23c1 0006 58a4 movel %d1,658a4 <_Thread_Dispatch_disable_level> rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 4576c: 486e fff8 pea %fp@(-8) 45770: 4eb9 0004 6e50 jsr 46e50 <_TOD_Set> _Thread_Enable_dispatch(); 45776: 4eb9 0004 7fa6 jsr 47fa6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4577c: 508f addql #8,%sp newtime.tv_nsec = time_buffer->ticks * rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); 4577e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 45780: 242e fff0 movel %fp@(-16),%d2 45784: 246e fff4 moveal %fp@(-12),%a2 45788: 4e5e unlk %fp 4578a: 4e75 rts 00044920 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 44920: 4e56 0000 linkw %fp,#0 44924: 202e 0008 movel %fp@(8),%d0 if ( !routine ) 44928: 6606 bnes 44930 4492a: 103c 0009 moveb #9,%d0 4492e: 6008 bras 44938 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 44930: 23c0 0005 bbba movel %d0,5bbba <_Watchdog_Nanoseconds_since_tick_handler> 44936: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 44938: 4e5e unlk %fp 4493a: 4e75 rts 00042810 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 42810: 4e56 ffa0 linkw %fp,#-96 42814: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42818: 242e 0008 movel %fp@(8),%d2 4281c: 246e 000c moveal %fp@(12),%a2 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 42820: 4a8a tstl %a2 42822: 6700 015a beqw 4297e <== 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 ); 42826: 260e movel %fp,%d3 42828: 0683 ffff fff0 addil #-16,%d3 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 4282e: 2c0e movel %fp,%d6 42830: 0686 ffff ffe8 addil #-24,%d6 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 42836: 2a0e movel %fp,%d5 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 42838: 280e movel %fp,%d4 } } } #endif (*print)( 4283a: 49f9 0006 5860 lea 65860 <_Objects_Information_table+0x4>,%a4 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 42840: 0685 ffff ffcb addil #-53,%d5 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 42846: 0684 ffff ffe0 addil #-32,%d4 * 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 ); 4284c: 2f03 movel %d3,%sp@- 4284e: 4eb9 0004 6db4 jsr 46db4 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 42854: 2f06 movel %d6,%sp@- 42856: 2f03 movel %d3,%sp@- 42858: 4879 0006 5aae pea 65aae 4285e: 4eb9 0004 8db0 jsr 48db0 <_Timespec_Subtract> } } } #endif (*print)( 42864: 4879 0005 abec pea 5abec 4286a: 2f02 movel %d2,%sp@- 4286c: 4e92 jsr %a2@ /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( 4286e: 4fef 0018 lea %sp@(24),%sp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 42872: 2054 moveal %a4@,%a0 42874: 4a88 tstl %a0 42876: 6700 00d8 beqw 42950 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 4287a: 2a68 0004 moveal %a0@(4),%a5 if ( information ) { 4287e: 4a8d tstl %a5 42880: 6700 00ce beqw 42950 <== ALWAYS TAKEN * 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( 42884: 2c0e movel %fp,%d6 api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 42886: 7601 moveq #1,%d3 * 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( 42888: 0686 ffff ffd8 addil #-40,%d6 4288e: 6000 00b4 braw 42944 <== ALWAYS TAKEN 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 ]; 42892: 206d 0018 moveal %a5@(24),%a0 42896: 2670 3c00 moveal %a0@(00000000,%d3:l:4),%a3 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++ ) { 4289a: 5283 addql #1,%d3 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 4289c: 4a8b tstl %a3 4289e: 6700 00a4 beqw 42944 <== ALWAYS TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 428a2: 2f05 movel %d5,%sp@- 428a4: 4878 000d pea d 428a8: 2f2b 0008 movel %a3@(8),%sp@- 428ac: 4eb9 0004 5c6c jsr 45c6c (*print)( 428b2: 2f05 movel %d5,%sp@- 428b4: 2f2b 0008 movel %a3@(8),%sp@- 428b8: 4879 0005 ad5e pea 5ad5e 428be: 2f02 movel %d2,%sp@- 428c0: 4e92 jsr %a2@ /* * 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 ) { 428c2: 2079 0006 595e moveal 6595e <_Thread_Executing>,%a0 428c8: 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; 428cc: 202b 0082 movel %a3@(130),%d0 428d0: 222b 0086 movel %a3@(134),%d1 428d4: 2d40 ffe0 movel %d0,%fp@(-32) 428d8: 2d41 ffe4 movel %d1,%fp@(-28) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 428dc: 266b 0008 moveal %a3@(8),%a3 428e0: b7e8 0008 cmpal %a0@(8),%a3 428e4: 6620 bnes 42906 Timestamp_Control used; _Timestamp_Subtract( 428e6: 2f06 movel %d6,%sp@- 428e8: 486e fff0 pea %fp@(-16) 428ec: 4879 0006 5966 pea 65966 <_Thread_Time_of_last_context_switch> 428f2: 4eb9 0004 8db0 jsr 48db0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 428f8: 2f06 movel %d6,%sp@- 428fa: 2f04 movel %d4,%sp@- 428fc: 4eb9 0004 8c98 jsr 48c98 <_Timespec_Add_to> 42902: 4fef 0014 lea %sp@(20),%sp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 42906: 486e fff8 pea %fp@(-8) 4290a: 486e fffc pea %fp@(-4) 4290e: 486e ffe8 pea %fp@(-24) 42912: 2f04 movel %d4,%sp@- 42914: 4eb9 0004 8cd8 jsr 48cd8 <_Timespec_Divide> /* * Print the information */ (*print)( context, 4291a: 2f2e fff8 movel %fp@(-8),%sp@- 4291e: 223c 0000 03e8 movel #1000,%d1 42924: 202e ffe4 movel %fp@(-28),%d0 42928: 2f2e fffc movel %fp@(-4),%sp@- 4292c: 4c41 0000 remul %d1,%d0,%d0 42930: 2f00 movel %d0,%sp@- 42932: 2f2e ffe0 movel %fp@(-32),%sp@- 42936: 4879 0005 ad71 pea 5ad71 4293c: 2f02 movel %d2,%sp@- 4293e: 4e92 jsr %a2@ 42940: 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++ ) { 42944: 4280 clrl %d0 42946: 302d 000e movew %a5@(14),%d0 4294a: b083 cmpl %d3,%d0 4294c: 6400 ff44 bccw 42892 42950: 588c addql #4,%a4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 42952: b9fc 0006 5870 cmpal #415856,%a4 42958: 6600 ff18 bnew 42872 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 4295c: 202e ffec movel %fp@(-20),%d0 42960: 263c 0000 03e8 movel #1000,%d3 42966: 4c43 0000 remul %d3,%d0,%d0 4296a: 2f00 movel %d0,%sp@- 4296c: 2f2e ffe8 movel %fp@(-24),%sp@- 42970: 4879 0005 ad89 pea 5ad89 42976: 2f02 movel %d2,%sp@- 42978: 4e92 jsr %a2@ 4297a: 4fef 0010 lea %sp@(16),%sp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 4297e: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 42984: 4e5e unlk %fp 42986: 4e75 rts 0004b728 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4b728: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4b72c: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4b72e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4b732: 4879 0005 98c6 pea 598c6 <== NOT EXECUTED 4b738: 4eb9 0004 b758 jsr 4b758 <== NOT EXECUTED 4b73e: 508f addql #8,%sp <== NOT EXECUTED 4b740: 2400 movel %d0,%d2 <== NOT EXECUTED 4b742: 670a beqs 4b74e <== NOT EXECUTED { errno = rc; 4b744: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 4b74a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b74c: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4b74e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b752: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b754: 4e5e unlk %fp <== NOT EXECUTED 4b756: 4e75 rts 000420d8 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 420d8: 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); 420dc: 486e 0010 pea %fp@(16) <== NOT EXECUTED 420e0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 420e4: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 420e8: 4eba fe4a jsr %pc@(41f34 ) <== NOT EXECUTED va_end(arglist); return chars_written; } 420ec: 4e5e unlk %fp <== NOT EXECUTED 420ee: 4e75 rts 00044978 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 44978: 4e56 0000 linkw %fp,#0 4497c: 202e 0008 movel %fp@(8),%d0 44980: 206e 0014 moveal %fp@(20),%a0 RTEMS_API_Control *api; if ( !event_out ) 44984: 4a88 tstl %a0 44986: 6604 bnes 4498c 44988: 7009 moveq #9,%d0 4498a: 6046 bras 449d2 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 4498c: 2279 0005 baee moveal 5baee <_Thread_Executing>,%a1 44992: 2269 0108 moveal %a1@(264),%a1 if ( _Event_sets_Is_empty( event_in ) ) { 44996: 4a80 tstl %d0 44998: 6604 bnes 4499e *event_out = api->pending_events; 4499a: 2091 movel %a1@,%a0@ return RTEMS_SUCCESSFUL; 4499c: 6034 bras 449d2 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4499e: 2239 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d1 449a4: 5281 addql #1,%d1 449a6: 23c1 0005 ba34 movel %d1,5ba34 <_Thread_Dispatch_disable_level> } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 449ac: 2f08 movel %a0,%sp@- 449ae: 2f2e 0010 movel %fp@(16),%sp@- 449b2: 2f2e 000c movel %fp@(12),%sp@- 449b6: 2f00 movel %d0,%sp@- 449b8: 4eb9 0004 49d8 jsr 449d8 <_Event_Seize> _Thread_Enable_dispatch(); 449be: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 449c4: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 449ca: 4fef 0010 lea %sp@(16),%sp 449ce: 2028 0034 movel %a0@(52),%d0 } 449d2: 4e5e unlk %fp 449d4: 4e75 rts ... 00044adc : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 44adc: 4e56 fffc linkw %fp,#-4 44ae0: 2f02 movel %d2,%sp@- register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 44ae2: 486e fffc pea %fp@(-4) 44ae6: 2f2e 0008 movel %fp@(8),%sp@- 44aea: 4eb9 0004 6c94 jsr 46c94 <_Thread_Get> switch ( location ) { 44af0: 508f addql #8,%sp 44af2: 4aae fffc tstl %fp@(-4) 44af6: 6704 beqs 44afc 44af8: 7004 moveq #4,%d0 44afa: 602c bras 44b28 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 44afc: 2240 moveal %d0,%a1 rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 44afe: 223c 0000 0700 movel #1792,%d1 44b04: 2069 0108 moveal %a1@(264),%a0 44b08: 40c2 movew %sr,%d2 44b0a: 8282 orl %d2,%d1 44b0c: 46c1 movew %d1,%sr *the_event_set |= the_new_events; 44b0e: 222e 000c movel %fp@(12),%d1 44b12: 8390 orl %d1,%a0@ _ISR_Enable( level ); 44b14: 46c2 movew %d2,%sr _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 44b16: 2f00 movel %d0,%sp@- 44b18: 4eb9 0004 4b30 jsr 44b30 <_Event_Surrender> _Thread_Enable_dispatch(); 44b1e: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 44b24: 588f addql #4,%sp case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); _Thread_Enable_dispatch(); 44b26: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 44b28: 242e fff8 movel %fp@(-8),%d2 44b2c: 4e5e unlk %fp 44b2e: 4e75 rts 00048dc4 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 48dc4: 4e56 fff0 linkw %fp,#-16 48dc8: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48dcc: 242e 0008 movel %fp@(8),%d2 48dd0: 286e 0010 moveal %fp@(16),%a4 Extension_Control *the_extension; if ( !id ) 48dd4: 4a8c tstl %a4 48dd6: 6604 bnes 48ddc 48dd8: 7009 moveq #9,%d0 48dda: 6072 bras 48e4e <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 48ddc: 4a82 tstl %d2 48dde: 6604 bnes 48de4 48de0: 7003 moveq #3,%d0 48de2: 606a bras 48e4e <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48de4: 2039 0006 70cc movel 670cc <_Thread_Dispatch_disable_level>,%d0 48dea: 5280 addql #1,%d0 48dec: 23c0 0006 70cc movel %d0,670cc <_Thread_Dispatch_disable_level> #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 48df2: 4879 0006 7272 pea 67272 <_Extension_Information> 48df8: 47f9 0004 a6ca lea 4a6ca <_Thread_Enable_dispatch>,%a3 48dfe: 4eb9 0004 99ac jsr 499ac <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 48e04: 588f addql #4,%sp 48e06: 2440 moveal %d0,%a2 48e08: 4a80 tstl %d0 48e0a: 6606 bnes 48e12 _Thread_Enable_dispatch(); 48e0c: 4e93 jsr %a3@ 48e0e: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 48e10: 603c bras 48e4e <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 48e12: 4878 0020 pea 20 48e16: 2f2e 000c movel %fp@(12),%sp@- 48e1a: 486a 0024 pea %a2@(36) 48e1e: 4eb9 0005 4204 jsr 54204 _User_extensions_Add_set( extension ); 48e24: 486a 0010 pea %a2@(16) 48e28: 4eb9 0004 b39c jsr 4b39c <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48e2e: 202a 0008 movel %a2@(8),%d0 48e32: 4281 clrl %d1 48e34: 2079 0006 728a moveal 6728a <_Extension_Information+0x18>,%a0 48e3a: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 48e3c: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48e40: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 48e44: 2880 movel %d0,%a4@ _Thread_Enable_dispatch(); 48e46: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 48e48: 4fef 0010 lea %sp@(16),%sp &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); 48e4c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 48e4e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48e54: 4e5e unlk %fp 48e56: 4e75 rts 00048e58 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 48e58: 4e56 fffc linkw %fp,#-4 48e5c: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 48e5e: 486e fffc pea %fp@(-4) 48e62: 2f2e 0008 movel %fp@(8),%sp@- 48e66: 4879 0006 7272 pea 67272 <_Extension_Information> 48e6c: 4eb9 0004 9df8 jsr 49df8 <_Objects_Get> Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 48e72: 4fef 000c lea %sp@(12),%sp 48e76: 2440 moveal %d0,%a2 48e78: 4aae fffc tstl %fp@(-4) 48e7c: 6704 beqs 48e82 48e7e: 7004 moveq #4,%d0 48e80: 6032 bras 48eb4 <== ALWAYS TAKEN case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 48e82: 486a 0010 pea %a2@(16) 48e86: 4eb9 0004 b490 jsr 4b490 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 48e8c: 2f0a movel %a2,%sp@- 48e8e: 4879 0006 7272 pea 67272 <_Extension_Information> 48e94: 4eb9 0004 9a2c jsr 49a2c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 48e9a: 2f0a movel %a2,%sp@- 48e9c: 4879 0006 7272 pea 67272 <_Extension_Information> 48ea2: 4eb9 0004 9ca0 jsr 49ca0 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 48ea8: 4eb9 0004 a6ca jsr 4a6ca <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 48eae: 4fef 0014 lea %sp@(20),%sp switch ( location ) { case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); _Objects_Close( &_Extension_Information, &the_extension->Object ); _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 48eb2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48eb4: 246e fff8 moveal %fp@(-8),%a2 48eb8: 4e5e unlk %fp 48eba: 4e75 rts 00042128 : } int rtems_filesystem_dirname( const char *pathname ) { 42128: 4e56 fff4 linkw %fp,#-12 4212c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42130: 246e 0008 moveal %fp@(8),%a2 int len = strlen( pathname ); 42134: 2f0a movel %a2,%sp@- 42136: 4eb9 0004 cdac jsr 4cdac 4213c: 588f addql #4,%sp 4213e: 41f2 08ff lea %a2@(ffffffff,%d0:l),%a0 while ( len ) { 42142: 601c bras 42160 <== ALWAYS TAKEN len--; 42144: 5380 subql #1,%d0 if ( rtems_filesystem_is_separator( pathname[len] ) ) 42146: 762f moveq #47,%d3 42148: 1210 moveb %a0@,%d1 4214a: 5388 subql #1,%a0 4214c: 1401 moveb %d1,%d2 4214e: 49c2 extbl %d2 42150: b682 cmpl %d2,%d3 42152: 6710 beqs 42164 42154: 163c 005c moveb #92,%d3 42158: b682 cmpl %d2,%d3 4215a: 6708 beqs 42164 <== ALWAYS TAKEN 4215c: 4a01 tstb %d1 4215e: 6704 beqs 42164 <== ALWAYS TAKEN const char *pathname ) { int len = strlen( pathname ); while ( len ) { 42160: 4a80 tstl %d0 42162: 66e0 bnes 42144 <== NEVER TAKEN if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 42164: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4216a: 4e5e unlk %fp 4216c: 4e75 rts 0004223e : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4223e: 4e56 ffe8 linkw %fp,#-24 42242: 48d7 047c moveml %d2-%d6/%a2,%sp@ 42246: 246e 0008 moveal %fp@(8),%a2 4224a: 2a2e 000c movel %fp@(12),%d5 4224e: 262e 0010 movel %fp@(16),%d3 42252: 242e 0014 movel %fp@(20),%d2 42256: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4225a: 4a8a tstl %a2 4225c: 6610 bnes 4226e rtems_set_errno_and_return_minus_one( EFAULT ); 4225e: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 42264: 760e moveq #14,%d3 42266: 2040 moveal %d0,%a0 42268: 2083 movel %d3,%a0@ 4226a: 6000 008e braw 422fa <== ALWAYS TAKEN if ( !pathloc ) 4226e: 4a82 tstl %d2 42270: 660e bnes 42280 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 42272: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 42278: 7405 moveq #5,%d2 <== NOT EXECUTED 4227a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4227c: 2082 movel %d2,%a0@ <== NOT EXECUTED 4227e: 607a bras 422fa <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42280: 7c2f moveq #47,%d6 42282: 1012 moveb %a2@,%d0 42284: 1200 moveb %d0,%d1 42286: 49c1 extbl %d1 42288: bc81 cmpl %d1,%d6 4228a: 670c beqs 42298 4228c: 1c3c 005c moveb #92,%d6 42290: bc81 cmpl %d1,%d6 42292: 6704 beqs 42298 <== ALWAYS TAKEN 42294: 4a00 tstb %d0 42296: 6620 bnes 422b8 <== NEVER TAKEN 42298: 4878 0014 pea 14 4229c: 2079 0005 a364 moveal 5a364 ,%a0 422a2: 41e8 0018 lea %a0@(24),%a0 422a6: 2f08 movel %a0,%sp@- 422a8: 2f02 movel %d2,%sp@- 422aa: 4eb9 0004 c200 jsr 4c200 422b0: 4fef 000c lea %sp@(12),%sp 422b4: 7001 moveq #1,%d0 422b6: 601c bras 422d4 <== ALWAYS TAKEN 422b8: 4878 0014 pea 14 422bc: 2039 0005 a364 movel 5a364 ,%d0 422c2: 5880 addql #4,%d0 422c4: 2f00 movel %d0,%sp@- 422c6: 2f02 movel %d2,%sp@- 422c8: 4eb9 0004 c200 jsr 4c200 422ce: 4fef 000c lea %sp@(12),%sp 422d2: 4280 clrl %d0 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 422d4: d5c0 addal %d0,%a2 422d6: 9a80 subl %d0,%d5 422d8: 2d4a 0008 movel %a2,%fp@(8) 422dc: 2d45 000c movel %d5,%fp@(12) 422e0: 2d44 0018 movel %d4,%fp@(24) 422e4: 2d42 0014 movel %d2,%fp@(20) 422e8: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 422ec: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 422f2: 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], 422f4: 4ef9 0004 216e jmp 4216e pathnamelen - i, flags, pathloc, follow_link ); } 422fa: 70ff moveq #-1,%d0 422fc: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 42302: 4e5e unlk %fp 42304: 4e75 rts ... 0004216e : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4216e: 4e56 fff0 linkw %fp,#-16 42172: 202e 0008 movel %fp@(8),%d0 42176: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4217a: 222e 000c movel %fp@(12),%d1 4217e: 242e 0010 movel %fp@(16),%d2 42182: 246e 0014 moveal %fp@(20),%a2 42186: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4218a: 4a80 tstl %d0 4218c: 6612 bnes 421a0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 4218e: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 42194: 76ff moveq #-1,%d3 <== NOT EXECUTED 42196: 720e moveq #14,%d1 <== NOT EXECUTED 42198: 2040 moveal %d0,%a0 <== NOT EXECUTED 4219a: 2081 movel %d1,%a0@ <== NOT EXECUTED 4219c: 6000 0094 braw 42232 <== NOT EXECUTED if ( !pathloc ) 421a0: 4a8a tstl %a2 421a2: 6610 bnes 421b4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 421a4: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 421aa: 76ff moveq #-1,%d3 <== NOT EXECUTED 421ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 421ae: 7005 moveq #5,%d0 <== NOT EXECUTED 421b0: 2080 movel %d0,%a0@ <== NOT EXECUTED 421b2: 607e bras 42232 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 421b4: 206a 000c moveal %a2@(12),%a0 421b8: 2050 moveal %a0@,%a0 421ba: 4a88 tstl %a0 421bc: 6750 beqs 4220e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 421be: 2f0a movel %a2,%sp@- 421c0: 2f02 movel %d2,%sp@- 421c2: 2f01 movel %d1,%sp@- 421c4: 2f00 movel %d0,%sp@- 421c6: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 421c8: 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 ); 421cc: 2600 movel %d0,%d3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 421ce: 6662 bnes 42232 421d0: 4a84 tstl %d4 421d2: 675e beqs 42232 if ( !pathloc->ops->node_type_h ){ 421d4: 226a 000c moveal %a2@(12),%a1 421d8: 2069 0010 moveal %a1@(16),%a0 421dc: 4a88 tstl %a0 421de: 6606 bnes 421e6 <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); 421e0: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 421e4: 601e bras 42204 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 421e6: 2f0a movel %a2,%sp@- 421e8: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 421ea: 588f addql #4,%sp 421ec: 7201 moveq #1,%d1 421ee: 5780 subql #3,%d0 421f0: b280 cmpl %d0,%d1 421f2: 653e bcss 42232 ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 421f4: 206a 000c moveal %a2@(12),%a0 421f8: 2268 0034 moveal %a0@(52),%a1 421fc: 4a89 tstl %a1 421fe: 6620 bnes 42220 <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); 42200: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42204: 4a88 tstl %a0 <== NOT EXECUTED 42206: 6706 beqs 4220e <== NOT EXECUTED 42208: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4220a: 4e90 jsr %a0@ <== NOT EXECUTED 4220c: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4220e: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 42214: 76ff moveq #-1,%d3 <== NOT EXECUTED 42216: 2040 moveal %d0,%a0 <== NOT EXECUTED 42218: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4221e: 6012 bras 42232 <== NOT EXECUTED * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 42220: 2d42 000c movel %d2,%fp@(12) 42224: 2d4a 0008 movel %a2,%fp@(8) } } return result; } 42228: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4222e: 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 ); 42230: 4ed1 jmp %a1@ } } return result; } 42232: 2003 movel %d3,%d0 42234: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4223a: 4e5e unlk %fp 4223c: 4e75 rts 00041e0c : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 41e0c: 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 ) { 41e0e: 4e56 ffdc linkw %fp,#-36 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 41e12: 2079 0005 a364 moveal 5a364 ,%a0 41e18: 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 ) { 41e1c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ */ rtems_filesystem_umask = 022; init_fs_mount_table(); 41e20: 4eb9 0004 2584 jsr 42584 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 41e26: 4ab9 0005 8b68 tstl 58b68 41e2c: 6608 bnes 41e36 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 41e2e: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 41e34: 602e bras 41e64 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 41e36: 2079 0005 a25c moveal 5a25c ,%a0 status = mount( 41e3c: 2f28 000c movel %a0@(12),%sp@- 41e40: 2f28 0008 movel %a0@(8),%sp@- 41e44: 2f28 0004 movel %a0@(4),%sp@- 41e48: 2f10 movel %a0@,%sp@- 41e4a: 486e fffc pea %fp@(-4) 41e4e: 4eb9 0004 25a6 jsr 425a6 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 41e54: 4fef 0014 lea %sp@(20),%sp 41e58: 72ff moveq #-1,%d1 41e5a: b280 cmpl %d0,%d1 41e5c: 660c bnes 41e6a <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 41e5e: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 41e64: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 41e6a: 2079 0005 a364 moveal 5a364 ,%a0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e70: 45f9 0004 c200 lea 4c200 ,%a2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41e76: 240e movel %fp,%d2 41e78: 0682 ffff ffe8 addil #-24,%d2 41e7e: 47f9 0004 223e lea 4223e ,%a3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 41e84: 4240 clrw %d0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e86: 226e fffc moveal %fp@(-4),%a1 41e8a: 43e9 001c lea %a1@(28),%a1 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 41e8e: 3140 0030 movew %d0,%a0@(48) * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e92: 4878 0014 pea 14 41e96: 2f09 movel %a1,%sp@- 41e98: 4868 0018 pea %a0@(24) 41e9c: 4e92 jsr %a2@ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41e9e: 42a7 clrl %sp@- 41ea0: 2f02 movel %d2,%sp@- 41ea2: 42a7 clrl %sp@- 41ea4: 4878 0001 pea 1 41ea8: 4879 0005 8ed2 pea 58ed2 41eae: 4e93 jsr %a3@ rtems_filesystem_root = loc; 41eb0: 4fef 0020 lea %sp@(32),%sp 41eb4: 4878 0014 pea 14 41eb8: 2079 0005 a364 moveal 5a364 ,%a0 41ebe: 41e8 0018 lea %a0@(24),%a0 41ec2: 2f02 movel %d2,%sp@- 41ec4: 2f08 movel %a0,%sp@- 41ec6: 4e92 jsr %a2@ /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41ec8: 42a7 clrl %sp@- 41eca: 2f02 movel %d2,%sp@- 41ecc: 42a7 clrl %sp@- 41ece: 4878 0001 pea 1 41ed2: 4879 0005 8ed2 pea 58ed2 41ed8: 4e93 jsr %a3@ rtems_filesystem_current = loc; 41eda: 4fef 0020 lea %sp@(32),%sp 41ede: 4878 0014 pea 14 41ee2: 2279 0005 a364 moveal 5a364 ,%a1 41ee8: 5889 addql #4,%a1 41eea: 2f02 movel %d2,%sp@- 41eec: 2f09 movel %a1,%sp@- 41eee: 4e92 jsr %a2@ * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 41ef0: 4878 01ff pea 1ff 41ef4: 4879 0005 8ed4 pea 58ed4 41efa: 4eb9 0004 244c jsr 4244c if ( status != 0 ) 41f00: 4fef 0014 lea %sp@(20),%sp 41f04: 4a80 tstl %d0 41f06: 670a beqs 41f12 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 41f08: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 41f0e: 6000 ff54 braw 41e64 <== NOT EXECUTED * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 41f12: 4cee 0c04 ffdc moveml %fp@(-36),%d2/%a2-%a3 41f18: 4e5e unlk %fp 41f1a: 4e75 rts 0004964c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4964c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49650: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 49654: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 49658: 4e5e unlk %fp <== NOT EXECUTED ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4965a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4965c: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 4965e: 57c0 seq %d0 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 49660: 4480 negl %d0 <== NOT EXECUTED 49662: 4e75 rts 000420f0 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 420f0: 4280 clrl %d0 420f2: 4e56 0000 linkw %fp,#0 420f6: 226e 0008 moveal %fp@(8),%a1 420fa: 2f02 movel %d2,%sp@- 420fc: 206e 000c moveal %fp@(12),%a0 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42100: 6002 bras 42104 <== ALWAYS TAKEN { pathname++; pathnamelen--; stripped++; 42102: 5280 addql #1,%d0 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42104: 1431 0800 moveb %a1@(00000000,%d0:l),%d2 42108: 1202 moveb %d2,%d1 4210a: 49c1 extbl %d1 4210c: 4a02 tstb %d2 4210e: 6712 beqs 42122 <== ALWAYS TAKEN 42110: b088 cmpl %a0,%d0 42112: 670e beqs 42122 <== ALWAYS TAKEN 42114: 742f moveq #47,%d2 42116: b481 cmpl %d1,%d2 42118: 67e8 beqs 42102 4211a: 143c 005c moveb #92,%d2 4211e: b481 cmpl %d1,%d2 42120: 67e0 beqs 42102 <== ALWAYS TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 42122: 241f movel %sp@+,%d2 42124: 4e5e unlk %fp 42126: 4e75 rts 00044cb8 : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 44cb8: 4e56 0000 linkw %fp,#0 44cbc: 222e 0008 movel %fp@(8),%d1 44cc0: 202e 000c movel %fp@(12),%d0 44cc4: 206e 0010 moveal %fp@(16),%a0 if ( !_ISR_Is_vector_number_valid( vector ) ) 44cc8: 0c80 0000 00ff cmpil #255,%d0 44cce: 6304 blss 44cd4 44cd0: 700a moveq #10,%d0 44cd2: 601e bras 44cf2 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 44cd4: 4a81 tstl %d1 44cd6: 6718 beqs 44cf0 return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 44cd8: 4a88 tstl %a0 44cda: 6714 beqs 44cf0 return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 44cdc: 2f08 movel %a0,%sp@- 44cde: 2f01 movel %d1,%sp@- 44ce0: 2f00 movel %d0,%sp@- 44ce2: 4eb9 0004 7f4e jsr 47f4e <_CPU_ISR_install_vector> vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 44ce8: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 44cec: 4280 clrl %d0 vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 44cee: 6002 bras 44cf2 <== ALWAYS TAKEN 44cf0: 7009 moveq #9,%d0 } 44cf2: 4e5e unlk %fp 44cf4: 4e75 rts ... 0004b1c8 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4b1c8: 4e56 0000 linkw %fp,#0 4b1cc: 202e 0008 movel %fp@(8),%d0 4b1d0: 2f03 movel %d3,%sp@- 4b1d2: 222e 000c movel %fp@(12),%d1 4b1d6: 206e 0010 moveal %fp@(16),%a0 4b1da: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4b1dc: b0b9 0005 bc4e cmpl 5bc4e <_IO_Number_of_drivers>,%d0 4b1e2: 6504 bcss 4b1e8 4b1e4: 700a moveq #10,%d0 4b1e6: 6030 bras 4b218 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 4b1e8: 2600 movel %d0,%d3 4b1ea: 2400 movel %d0,%d2 4b1ec: e78b lsll #3,%d3 4b1ee: eb8a lsll #5,%d2 4b1f0: 2279 0005 bc52 moveal 5bc52 <_IO_Driver_address_table>,%a1 4b1f6: 9483 subl %d3,%d2 4b1f8: 2271 2808 moveal %a1@(00000008,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b1fc: 4a89 tstl %a1 4b1fe: 6604 bnes 4b204 4b200: 4280 clrl %d0 4b202: 6014 bras 4b218 <== ALWAYS TAKEN 4b204: 2d48 0010 movel %a0,%fp@(16) 4b208: 2d41 000c movel %d1,%fp@(12) 4b20c: 2d40 0008 movel %d0,%fp@(8) } 4b210: 241f movel %sp@+,%d2 4b212: 261f movel %sp@+,%d3 4b214: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b216: 4ed1 jmp %a1@ } 4b218: 241f movel %sp@+,%d2 4b21a: 261f movel %sp@+,%d3 4b21c: 4e5e unlk %fp 4b21e: 4e75 rts 0004b220 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4b220: 4e56 0000 linkw %fp,#0 4b224: 202e 0008 movel %fp@(8),%d0 4b228: 2f03 movel %d3,%sp@- 4b22a: 222e 000c movel %fp@(12),%d1 4b22e: 206e 0010 moveal %fp@(16),%a0 4b232: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4b234: b0b9 0005 bc4e cmpl 5bc4e <_IO_Number_of_drivers>,%d0 4b23a: 6504 bcss 4b240 4b23c: 700a moveq #10,%d0 4b23e: 6030 bras 4b270 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 4b240: 2600 movel %d0,%d3 4b242: 2400 movel %d0,%d2 4b244: e78b lsll #3,%d3 4b246: eb8a lsll #5,%d2 4b248: 2279 0005 bc52 moveal 5bc52 <_IO_Driver_address_table>,%a1 4b24e: 9483 subl %d3,%d2 4b250: 2271 2814 moveal %a1@(00000014,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b254: 4a89 tstl %a1 4b256: 6604 bnes 4b25c 4b258: 4280 clrl %d0 4b25a: 6014 bras 4b270 <== ALWAYS TAKEN 4b25c: 2d48 0010 movel %a0,%fp@(16) 4b260: 2d41 000c movel %d1,%fp@(12) 4b264: 2d40 0008 movel %d0,%fp@(8) } 4b268: 241f movel %sp@+,%d2 4b26a: 261f movel %sp@+,%d3 4b26c: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b26e: 4ed1 jmp %a1@ } 4b270: 241f movel %sp@+,%d2 4b272: 261f movel %sp@+,%d3 4b274: 4e5e unlk %fp 4b276: 4e75 rts 00049820 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 49820: 4e56 0000 linkw %fp,#0 49824: 202e 0008 movel %fp@(8),%d0 49828: 2f03 movel %d3,%sp@- 4982a: 222e 000c movel %fp@(12),%d1 4982e: 206e 0010 moveal %fp@(16),%a0 49832: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 49834: b0b9 0005 bc4e cmpl 5bc4e <_IO_Number_of_drivers>,%d0 4983a: 6504 bcss 49840 4983c: 700a moveq #10,%d0 4983e: 6030 bras 49870 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 49840: 2600 movel %d0,%d3 49842: 2400 movel %d0,%d2 49844: e78b lsll #3,%d3 49846: 2279 0005 bc52 moveal 5bc52 <_IO_Driver_address_table>,%a1 4984c: 93c3 subal %d3,%a1 4984e: eb8a lsll #5,%d2 49850: 2271 2800 moveal %a1@(00000000,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 49854: 4a89 tstl %a1 49856: 6604 bnes 4985c 49858: 4280 clrl %d0 4985a: 6014 bras 49870 <== ALWAYS TAKEN 4985c: 2d48 0010 movel %a0,%fp@(16) 49860: 2d41 000c movel %d1,%fp@(12) 49864: 2d40 0008 movel %d0,%fp@(8) } 49868: 241f movel %sp@+,%d2 4986a: 261f movel %sp@+,%d3 4986c: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4986e: 4ed1 jmp %a1@ } 49870: 241f movel %sp@+,%d2 49872: 261f movel %sp@+,%d3 49874: 4e5e unlk %fp 49876: 4e75 rts 00041d0c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 41d0c: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 41d10: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 41d14: 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 ); 41d18: 49f9 0004 cdac lea 4cdac ,%a4 <== NOT EXECUTED 41d1e: 240e movel %fp,%d2 <== NOT EXECUTED 41d20: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 41d26: 2f03 movel %d3,%sp@- <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 41d28: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 41d2c: 4e94 jsr %a4@ <== NOT EXECUTED 41d2e: 7201 moveq #1,%d1 <== NOT EXECUTED 41d30: 2e81 movel %d1,%sp@ <== NOT EXECUTED 41d32: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d34: 42a7 clrl %sp@- <== NOT EXECUTED 41d36: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41d38: 2f03 movel %d3,%sp@- <== NOT EXECUTED 41d3a: 4eb9 0004 223e jsr 4223e <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 41d40: 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 ); 41d44: 2800 movel %d0,%d4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 41d46: 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; 41d4a: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 41d4e: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 41d52: 4a88 tstl %a0 <== NOT EXECUTED 41d54: 6620 bnes 41d76 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41d56: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 41d5a: 4a88 tstl %a0 <== NOT EXECUTED 41d5c: 6706 beqs 41d64 <== NOT EXECUTED 41d5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d60: 4e90 jsr %a0@ <== NOT EXECUTED 41d62: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 41d64: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 41d6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 41d6c: 70ff moveq #-1,%d0 <== NOT EXECUTED 41d6e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 41d74: 6060 bras 41dd6 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 41d76: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d78: 4e90 jsr %a0@ <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 41d7a: 588f addql #4,%sp <== NOT EXECUTED 41d7c: 4a84 tstl %d4 <== NOT EXECUTED 41d7e: 6606 bnes 41d86 <== NOT EXECUTED 41d80: 7202 moveq #2,%d1 <== NOT EXECUTED 41d82: b280 cmpl %d0,%d1 <== NOT EXECUTED 41d84: 671a beqs 41da0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41d86: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 41d8a: 4a88 tstl %a0 <== NOT EXECUTED 41d8c: 6742 beqs 41dd0 <== NOT EXECUTED 41d8e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 41d92: 4a88 tstl %a0 <== NOT EXECUTED 41d94: 673a beqs 41dd0 <== NOT EXECUTED 41d96: 486e ffec pea %fp@(-20) <== NOT EXECUTED 41d9a: 4e90 jsr %a0@ <== NOT EXECUTED 41d9c: 588f addql #4,%sp <== NOT EXECUTED 41d9e: 6030 bras 41dd0 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 41da0: 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; 41da2: 2483 movel %d3,%a2@ <== NOT EXECUTED device_info->device_name_length = strlen( name ); 41da4: 4e94 jsr %a4@ <== NOT EXECUTED device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 41da6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 41daa: 588f addql #4,%sp <== NOT EXECUTED 41dac: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 41db0: 256b 004c 0008 movel %a3@(76),%a2@(8) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 41db6: 256b 0050 000c movel %a3@(80),%a2@(12) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41dbc: 4a88 tstl %a0 <== NOT EXECUTED 41dbe: 6714 beqs 41dd4 <== NOT EXECUTED 41dc0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 41dc4: 4a88 tstl %a0 <== NOT EXECUTED 41dc6: 670c beqs 41dd4 <== NOT EXECUTED 41dc8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41dca: 4e90 jsr %a0@ <== NOT EXECUTED 41dcc: 588f addql #4,%sp <== NOT EXECUTED 41dce: 6004 bras 41dd4 <== NOT EXECUTED 41dd0: 700d moveq #13,%d0 <== NOT EXECUTED 41dd2: 6002 bras 41dd6 <== NOT EXECUTED 41dd4: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 41dd6: 4cee 1c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a4 <== NOT EXECUTED 41ddc: 4e5e unlk %fp <== NOT EXECUTED 41dde: 4e75 rts 0004b278 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4b278: 4e56 0000 linkw %fp,#0 4b27c: 202e 0008 movel %fp@(8),%d0 4b280: 2f03 movel %d3,%sp@- 4b282: 222e 000c movel %fp@(12),%d1 4b286: 206e 0010 moveal %fp@(16),%a0 4b28a: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4b28c: b0b9 0005 bc4e cmpl 5bc4e <_IO_Number_of_drivers>,%d0 4b292: 6504 bcss 4b298 4b294: 700a moveq #10,%d0 4b296: 6030 bras 4b2c8 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 4b298: 2600 movel %d0,%d3 4b29a: 2400 movel %d0,%d2 4b29c: e78b lsll #3,%d3 4b29e: eb8a lsll #5,%d2 4b2a0: 2279 0005 bc52 moveal 5bc52 <_IO_Driver_address_table>,%a1 4b2a6: 9483 subl %d3,%d2 4b2a8: 2271 2804 moveal %a1@(00000004,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b2ac: 4a89 tstl %a1 4b2ae: 6604 bnes 4b2b4 4b2b0: 4280 clrl %d0 4b2b2: 6014 bras 4b2c8 <== ALWAYS TAKEN 4b2b4: 2d48 0010 movel %a0,%fp@(16) 4b2b8: 2d41 000c movel %d1,%fp@(12) 4b2bc: 2d40 0008 movel %d0,%fp@(8) } 4b2c0: 241f movel %sp@+,%d2 4b2c2: 261f movel %sp@+,%d3 4b2c4: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b2c6: 4ed1 jmp %a1@ } 4b2c8: 241f movel %sp@+,%d2 4b2ca: 261f movel %sp@+,%d3 4b2cc: 4e5e unlk %fp 4b2ce: 4e75 rts 0004b2d0 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4b2d0: 4e56 0000 linkw %fp,#0 4b2d4: 202e 0008 movel %fp@(8),%d0 4b2d8: 2f03 movel %d3,%sp@- 4b2da: 222e 000c movel %fp@(12),%d1 4b2de: 206e 0010 moveal %fp@(16),%a0 4b2e2: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4b2e4: b0b9 0005 bc4e cmpl 5bc4e <_IO_Number_of_drivers>,%d0 4b2ea: 6504 bcss 4b2f0 4b2ec: 700a moveq #10,%d0 4b2ee: 6030 bras 4b320 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 4b2f0: 2600 movel %d0,%d3 4b2f2: 2400 movel %d0,%d2 4b2f4: e78b lsll #3,%d3 4b2f6: eb8a lsll #5,%d2 4b2f8: 2279 0005 bc52 moveal 5bc52 <_IO_Driver_address_table>,%a1 4b2fe: 9483 subl %d3,%d2 4b300: 2271 280c moveal %a1@(0000000c,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b304: 4a89 tstl %a1 4b306: 6604 bnes 4b30c 4b308: 4280 clrl %d0 4b30a: 6014 bras 4b320 <== ALWAYS TAKEN 4b30c: 2d48 0010 movel %a0,%fp@(16) 4b310: 2d41 000c movel %d1,%fp@(12) 4b314: 2d40 0008 movel %d0,%fp@(8) } 4b318: 241f movel %sp@+,%d2 4b31a: 261f movel %sp@+,%d3 4b31c: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b31e: 4ed1 jmp %a1@ } 4b320: 241f movel %sp@+,%d2 4b322: 261f movel %sp@+,%d3 4b324: 4e5e unlk %fp 4b326: 4e75 rts 00046d40 : 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 ) { 46d40: 4e56 0000 linkw %fp,#0 46d44: 206e 000c moveal %fp@(12),%a0 46d48: 2f0a movel %a2,%sp@- 46d4a: 226e 0010 moveal %fp@(16),%a1 46d4e: 2f02 movel %d2,%sp@- 46d50: 242e 0008 movel %fp@(8),%d2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 46d54: 2039 0006 1072 movel 61072 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 46d5a: 2239 0006 0ec6 movel 60ec6 <_ISR_Nest_level>,%d1 46d60: 6706 beqs 46d68 46d62: 7012 moveq #18,%d0 46d64: 6000 00d6 braw 46e3c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 46d68: 4a89 tstl %a1 46d6a: 6700 00ce beqw 46e3a return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 46d6e: 2280 movel %d0,%a1@ if ( driver_table == NULL ) 46d70: 4a88 tstl %a0 46d72: 6700 00c6 beqw 46e3a static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46d76: 4a90 tstl %a0@ 46d78: 6600 00ce bnew 46e48 46d7c: 4aa8 0004 tstl %a0@(4) 46d80: 6600 00c6 bnew 46e48 46d84: 6000 00b4 braw 46e3a <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46d88: 2039 0006 0e2c movel 60e2c <_Thread_Dispatch_disable_level>,%d0 46d8e: 5280 addql #1,%d0 46d90: 23c0 0006 0e2c movel %d0,60e2c <_Thread_Dispatch_disable_level> if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 46d96: 4a82 tstl %d2 46d98: 662c bnes 46dc6 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 46d9a: 2039 0006 1072 movel 61072 <_IO_Number_of_drivers>,%d0 46da0: 2479 0006 1076 moveal 61076 <_IO_Driver_address_table>,%a2 46da6: 6010 bras 46db8 <== 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; 46da8: 4a92 tstl %a2@ 46daa: 6600 00a6 bnew 46e52 46dae: 4aaa 0004 tstl %a2@(4) 46db2: 6600 009e bnew 46e52 46db6: 6004 bras 46dbc <== ALWAYS TAKEN 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 ) { 46db8: b082 cmpl %d2,%d0 46dba: 62ec bhis 46da8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 46dbc: 2282 movel %d2,%a1@ if ( m != n ) 46dbe: b082 cmpl %d2,%d0 46dc0: 6634 bnes 46df6 46dc2: 6000 0098 braw 46e5c <== ALWAYS TAKEN _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 46dc6: 2202 movel %d2,%d1 46dc8: 2002 movel %d2,%d0 46dca: e789 lsll #3,%d1 46dcc: eb88 lsll #5,%d0 46dce: 2479 0006 1076 moveal 61076 <_IO_Driver_address_table>,%a2 46dd4: 9081 subl %d1,%d0 46dd6: d5c0 addal %d0,%a2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46dd8: 4a92 tstl %a2@ 46dda: 660e bnes 46dea 46ddc: 4aaa 0004 tstl %a2@(4) 46de0: 57c0 seq %d0 46de2: 49c0 extbl %d0 46de4: 4480 negl %d0 } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 46de6: 4a00 tstb %d0 46de8: 660a bnes 46df4 _Thread_Enable_dispatch(); 46dea: 4eb9 0004 85ee jsr 485ee <_Thread_Enable_dispatch> 46df0: 700c moveq #12,%d0 return RTEMS_RESOURCE_IN_USE; 46df2: 6048 bras 46e3c <== ALWAYS TAKEN } *registered_major = major; 46df4: 2282 movel %d2,%a1@ } _IO_Driver_address_table [major] = *driver_table; 46df6: 4878 0018 pea 18 46dfa: 2202 movel %d2,%d1 46dfc: 2002 movel %d2,%d0 46dfe: e789 lsll #3,%d1 46e00: eb88 lsll #5,%d0 46e02: 2f08 movel %a0,%sp@- 46e04: 9081 subl %d1,%d0 46e06: d0b9 0006 1076 addl 61076 <_IO_Driver_address_table>,%d0 46e0c: 2f00 movel %d0,%sp@- 46e0e: 4eb9 0005 0c80 jsr 50c80 _Thread_Enable_dispatch(); 46e14: 4eb9 0004 85ee jsr 485ee <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } 46e1a: 246e fffc moveal %fp@(-4),%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e1e: 4fef 000c lea %sp@(12),%sp 46e22: 2d42 0008 movel %d2,%fp@(8) } 46e26: 242e fff8 movel %fp@(-8),%d2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e2a: 42ae 0010 clrl %fp@(16) 46e2e: 42ae 000c clrl %fp@(12) } 46e32: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e34: 4ef9 0004 e174 jmp 4e174 46e3a: 7009 moveq #9,%d0 } 46e3c: 242e fff8 movel %fp@(-8),%d2 46e40: 246e fffc moveal %fp@(-4),%a2 46e44: 4e5e unlk %fp 46e46: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 46e48: b082 cmpl %d2,%d0 46e4a: 6200 ff3c bhiw 46d88 46e4e: 700a moveq #10,%d0 46e50: 60ea bras 46e3c <== ALWAYS TAKEN 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 ) { 46e52: 5282 addql #1,%d2 46e54: 45ea 0018 lea %a2@(24),%a2 46e58: 6000 ff5e braw 46db8 <== ALWAYS TAKEN if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 46e5c: 4eb9 0004 85ee jsr 485ee <_Thread_Enable_dispatch> 46e62: 7005 moveq #5,%d0 return sc; 46e64: 60d6 bras 46e3c <== ALWAYS TAKEN ... 00046e68 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 46e68: 4e56 0000 linkw %fp,#0 46e6c: 222e 0008 movel %fp@(8),%d1 if ( rtems_interrupt_is_in_progress() ) 46e70: 2039 0006 0ec6 movel 60ec6 <_ISR_Nest_level>,%d0 46e76: 6704 beqs 46e7c 46e78: 7012 moveq #18,%d0 46e7a: 6042 bras 46ebe <== ALWAYS TAKEN return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 46e7c: b2b9 0006 1072 cmpl 61072 <_IO_Number_of_drivers>,%d1 46e82: 6504 bcss 46e88 46e84: 700d moveq #13,%d0 46e86: 6036 bras 46ebe <== ALWAYS TAKEN 46e88: 2039 0006 0e2c movel 60e2c <_Thread_Dispatch_disable_level>,%d0 46e8e: 5280 addql #1,%d0 46e90: 23c0 0006 0e2c movel %d0,60e2c <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); memset( 46e96: 2001 movel %d1,%d0 46e98: 4878 0018 pea 18 46e9c: e789 lsll #3,%d1 46e9e: eb88 lsll #5,%d0 46ea0: 42a7 clrl %sp@- 46ea2: 9081 subl %d1,%d0 46ea4: d0b9 0006 1076 addl 61076 <_IO_Driver_address_table>,%d0 46eaa: 2f00 movel %d0,%sp@- 46eac: 4eb9 0005 0cf0 jsr 50cf0 &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 46eb2: 4eb9 0004 85ee jsr 485ee <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46eb8: 4fef 000c lea %sp@(12),%sp memset( &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 46ebc: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 46ebe: 4e5e unlk %fp 46ec0: 4e75 rts ... 0004b328 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4b328: 4e56 0000 linkw %fp,#0 4b32c: 202e 0008 movel %fp@(8),%d0 4b330: 2f03 movel %d3,%sp@- 4b332: 222e 000c movel %fp@(12),%d1 4b336: 206e 0010 moveal %fp@(16),%a0 4b33a: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4b33c: b0b9 0005 bc4e cmpl 5bc4e <_IO_Number_of_drivers>,%d0 4b342: 6504 bcss 4b348 4b344: 700a moveq #10,%d0 4b346: 6030 bras 4b378 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 4b348: 2600 movel %d0,%d3 4b34a: 2400 movel %d0,%d2 4b34c: e78b lsll #3,%d3 4b34e: eb8a lsll #5,%d2 4b350: 2279 0005 bc52 moveal 5bc52 <_IO_Driver_address_table>,%a1 4b356: 9483 subl %d3,%d2 4b358: 2271 2810 moveal %a1@(00000010,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b35c: 4a89 tstl %a1 4b35e: 6604 bnes 4b364 4b360: 4280 clrl %d0 4b362: 6014 bras 4b378 <== ALWAYS TAKEN 4b364: 2d48 0010 movel %a0,%fp@(16) 4b368: 2d41 000c movel %d1,%fp@(12) 4b36c: 2d40 0008 movel %d0,%fp@(8) } 4b370: 241f movel %sp@+,%d2 4b372: 261f movel %sp@+,%d3 4b374: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4b376: 4ed1 jmp %a1@ } 4b378: 241f movel %sp@+,%d2 4b37a: 261f movel %sp@+,%d3 4b37c: 4e5e unlk %fp 4b37e: 4e75 rts 000472c8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 472c8: 4e56 fff0 linkw %fp,#-16 472cc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 472d0: 286e 0008 moveal %fp@(8),%a4 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 472d4: 4a8c tstl %a4 472d6: 6740 beqs 47318 <== ALWAYS TAKEN 472d8: 45f9 0006 5860 lea 65860 <_Objects_Information_table+0x4>,%a2 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 472de: 2052 moveal %a2@,%a0 472e0: 4a88 tstl %a0 472e2: 672a beqs 4730e continue; information = _Objects_Information_table[ api_index ][ 1 ]; 472e4: 2668 0004 moveal %a0@(4),%a3 if ( !information ) 472e8: 4a8b tstl %a3 472ea: 6722 beqs 4730e 472ec: 7401 moveq #1,%d2 472ee: 6014 bras 47304 <== ALWAYS TAKEN continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 472f0: 206b 0018 moveal %a3@(24),%a0 472f4: 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++ ) { 472f8: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 472fa: 4a80 tstl %d0 472fc: 6706 beqs 47304 <== ALWAYS TAKEN continue; (*routine)(the_thread); 472fe: 2f00 movel %d0,%sp@- 47300: 4e94 jsr %a4@ 47302: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 47304: 4280 clrl %d0 47306: 302b 000e movew %a3@(14),%d0 4730a: b082 cmpl %d2,%d0 4730c: 64e2 bccs 472f0 4730e: 588a addql #4,%a2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 47310: b5fc 0006 5870 cmpal #415856,%a2 47316: 66c6 bnes 472de (*routine)(the_thread); } } } 47318: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4731e: 4e5e unlk %fp 47320: 4e75 rts ... 000491ec : * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { 491ec: 4e56 fffc linkw %fp,#-4 491f0: 2f0a movel %a2,%sp@- 491f2: 2f02 movel %d2,%sp@- rtems_libio_t *iop, *next; rtems_status_code rc; rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 491f4: 42a7 clrl %sp@- 491f6: 42a7 clrl %sp@- 491f8: 2f39 0005 b8e0 movel 5b8e0 ,%sp@- 491fe: 4eb9 0004 4f30 jsr 44f30 if (rtems_libio_iop_freelist) { 49204: 2039 0005 b8dc movel 5b8dc ,%d0 4920a: 4fef 000c lea %sp@(12),%sp 4920e: 6760 beqs 49270 rc = rtems_semaphore_create( 49210: 486e fffc pea %fp@(-4) 49214: 90b9 0005 b8d8 subl 5b8d8 ,%d0 4921a: ec80 asrl #6,%d0 4921c: 42a7 clrl %sp@- 4921e: 4878 0054 pea 54 49222: 4878 0001 pea 1 49226: 0080 4c42 4900 oril #1279412480,%d0 4922c: 2f00 movel %d0,%sp@- 4922e: 4eb9 0004 4cf8 jsr 44cf8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 49234: 4fef 0014 lea %sp@(20),%sp 49238: 4a80 tstl %d0 4923a: 6634 bnes 49270 goto failed; iop = rtems_libio_iop_freelist; 4923c: 2479 0005 b8dc moveal 5b8dc ,%a2 next = iop->data1; 49242: 242a 0034 movel %a2@(52),%d2 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 49246: 4878 0040 pea 40 4924a: 42a7 clrl %sp@- 4924c: 2f0a movel %a2,%sp@- 4924e: 4eb9 0004 c270 jsr 4c270 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 49254: 256e fffc 002c movel %fp@(-4),%a2@(44) if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4925a: 203c 0000 0100 movel #256,%d0 iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 49260: 4fef 000c lea %sp@(12),%sp iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 49264: 23c2 0005 b8dc movel %d2,5b8dc if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4926a: 2540 0014 movel %d0,%a2@(20) iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 4926e: 6002 bras 49272 <== ALWAYS TAKEN 49270: 95ca subal %a2,%a2 failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 49272: 2f39 0005 b8e0 movel 5b8e0 ,%sp@- 49278: 4eb9 0004 5034 jsr 45034 return iop; } 4927e: 242e fff4 movel %fp@(-12),%d2 49282: 200a movel %a2,%d0 49284: 246e fff8 moveal %fp@(-8),%a2 49288: 4e5e unlk %fp 4928a: 4e75 rts 0004918e : */ void rtems_libio_free( rtems_libio_t *iop ) { 4918e: 4e56 0000 linkw %fp,#0 49192: 2f0a movel %a2,%sp@- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 49194: 42a7 clrl %sp@- */ void rtems_libio_free( rtems_libio_t *iop ) { 49196: 246e 0008 moveal %fp@(8),%a2 rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4919a: 42a7 clrl %sp@- 4919c: 2f39 0005 b8e0 movel 5b8e0 ,%sp@- 491a2: 4eb9 0004 4f30 jsr 44f30 if (iop->sem) 491a8: 202a 002c movel %a2@(44),%d0 491ac: 4fef 000c lea %sp@(12),%sp 491b0: 670a beqs 491bc <== ALWAYS TAKEN rtems_semaphore_delete(iop->sem); 491b2: 2f00 movel %d0,%sp@- 491b4: 4eb9 0004 4e94 jsr 44e94 491ba: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 491bc: 41f9 0005 b8dc lea 5b8dc ,%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; 491c2: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 491c8: 2550 0034 movel %a0@,%a2@(52) rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 491cc: 41f9 0005 b8e0 lea 5b8e0 ,%a0 491d2: 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; 491d6: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 491da: 23ca 0005 b8dc movel %a2,5b8dc rtems_semaphore_release(rtems_libio_semaphore); } 491e0: 246e fffc moveal %fp@(-4),%a2 491e4: 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); 491e6: 4ef9 0004 5034 jmp 45034 00042308 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42308: 4e56 0000 linkw %fp,#0 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 4230c: 2039 0005 a254 movel 5a254 ,%d0 42312: 6742 beqs 42356 <== ALWAYS TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42314: 4878 0040 pea 40 42318: 2f00 movel %d0,%sp@- 4231a: 4eb9 0004 8da0 jsr 48da0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42320: 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, 42322: 23c0 0005 b8d8 movel %d0,5b8d8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42328: 6606 bnes 42330 <== NEVER TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 4232a: 4878 001a pea 1a <== NOT EXECUTED 4232e: 604c bras 4237c <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 42330: 23c0 0005 b8dc movel %d0,5b8dc for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42336: 2040 moveal %d0,%a0 42338: 4280 clrl %d0 4233a: 2239 0005 a254 movel 5a254 ,%d1 42340: 6004 bras 42346 <== ALWAYS TAKEN iop->data1 = iop + 1; 42342: 2148 fff4 movel %a0,%a0@(-12) 42346: 2248 moveal %a0,%a1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42348: 5280 addql #1,%d0 4234a: 41e8 0040 lea %a0@(64),%a0 4234e: b280 cmpl %d0,%d1 42350: 62f0 bhis 42342 iop->data1 = iop + 1; iop->data1 = NULL; 42352: 42a9 0034 clrl %a1@(52) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 42356: 4879 0005 b8e0 pea 5b8e0 4235c: 42a7 clrl %sp@- 4235e: 4878 0054 pea 54 42362: 4878 0001 pea 1 42366: 2f3c 4c42 494f movel #1279412559,%sp@- 4236c: 4eb9 0004 4cf8 jsr 44cf8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 42372: 4fef 0014 lea %sp@(20),%sp 42376: 4a80 tstl %d0 42378: 6708 beqs 42382 <== NEVER TAKEN rtems_fatal_error_occurred( rc ); 4237a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4237c: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 42382: 2279 0005 a250 moveal 5a250 ,%a1 42388: 4a89 tstl %a1 4238a: 6704 beqs 42390 <== ALWAYS TAKEN (* rtems_fs_init_helper)(); } 4238c: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 4238e: 4ed1 jmp %a1@ } 42390: 4e5e unlk %fp <== NOT EXECUTED 42392: 4e75 rts 000490b2 : */ int rtems_libio_is_file_open( void *node_access ) { 490b2: 4e56 0000 linkw %fp,#0 490b6: 2f03 movel %d3,%sp@- 490b8: 2f02 movel %d2,%sp@- 490ba: 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 ); 490be: 42a7 clrl %sp@- 490c0: 42a7 clrl %sp@- 490c2: 2f39 0005 b8e0 movel 5b8e0 ,%sp@- 490c8: 4eb9 0004 4f30 jsr 44f30 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 490ce: 2079 0005 b8d8 moveal 5b8d8 ,%a0 490d4: 4fef 000c lea %sp@(12),%sp 490d8: 41e8 0014 lea %a0@(20),%a0 490dc: 4280 clrl %d0 490de: 2239 0005 a254 movel 5a254 ,%d1 490e4: 601a bras 49100 <== ALWAYS TAKEN if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 490e6: 2610 movel %a0@,%d3 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 490e8: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 490ea: 0283 0000 0100 andil #256,%d3 490f0: 670a beqs 490fc /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 490f2: b4a8 0004 cmpl %a0@(4),%d2 490f6: 6604 bnes 490fc 490f8: 7401 moveq #1,%d2 490fa: 600a bras 49106 <== ALWAYS TAKEN /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 490fc: 41e8 0040 lea %a0@(64),%a0 49100: b280 cmpl %d0,%d1 49102: 62e2 bhis 490e6 49104: 4282 clrl %d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 49106: 2f39 0005 b8e0 movel 5b8e0 ,%sp@- 4910c: 4eb9 0004 5034 jsr 45034 return result; } 49112: 262e fffc movel %fp@(-4),%d3 49116: 2002 movel %d2,%d0 49118: 242e fff8 movel %fp@(-8),%d2 4911c: 4e5e unlk %fp 4911e: 4e75 rts 00049120 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 49120: 4e56 0000 linkw %fp,#0 49124: 2f03 movel %d3,%sp@- 49126: 2f02 movel %d2,%sp@- 49128: 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 ); 4912c: 42a7 clrl %sp@- 4912e: 42a7 clrl %sp@- 49130: 2f39 0005 b8e0 movel 5b8e0 ,%sp@- 49136: 4eb9 0004 4f30 jsr 44f30 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4913c: 2079 0005 b8d8 moveal 5b8d8 ,%a0 49142: 4fef 000c lea %sp@(12),%sp 49146: 41e8 0014 lea %a0@(20),%a0 4914a: 4280 clrl %d0 4914c: 2239 0005 a254 movel 5a254 ,%d1 49152: 601a bras 4916e <== ALWAYS TAKEN if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 49154: 2610 movel %a0@,%d3 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 49156: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 49158: 0283 0000 0100 andil #256,%d3 4915e: 670a beqs 4916a /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 49160: b4a8 0014 cmpl %a0@(20),%d2 49164: 6604 bnes 4916a 49166: 7401 moveq #1,%d2 49168: 600a bras 49174 <== ALWAYS TAKEN /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4916a: 41e8 0040 lea %a0@(64),%a0 4916e: b280 cmpl %d0,%d1 49170: 62e2 bhis 49154 49172: 4282 clrl %d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 49174: 2f39 0005 b8e0 movel 5b8e0 ,%sp@- 4917a: 4eb9 0004 5034 jsr 45034 return result; } 49180: 262e fffc movel %fp@(-4),%d3 49184: 2002 movel %d2,%d0 49186: 242e fff8 movel %fp@(-8),%d2 4918a: 4e5e unlk %fp 4918c: 4e75 rts 00061976 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 61976: 4e56 ffd4 linkw %fp,#-44 6197a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 6197e: 486e fffc pea %fp@(-4) 61982: 42a7 clrl %sp@- 61984: 42a7 clrl %sp@- 61986: 4eb9 0006 2860 jsr 62860 if (sc != RTEMS_SUCCESSFUL) return sc; 6198c: 4fef 000c lea %sp@(12),%sp rtems_status_code rtems_libio_set_private_env(void) { rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 61990: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) return sc; 61992: 6600 00f0 bnew 61a84 <== ALWAYS TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 61996: 203c 0009 a6bc movel #632508,%d0 6199c: b0b9 0009 5d3c cmpl 95d3c ,%d0 619a2: 6648 bnes 619ec rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 619a4: 4878 0048 pea 48 619a8: 4eb9 0004 6bbc jsr 46bbc if (!tmp) 619ae: 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)); 619b0: 2600 movel %d0,%d3 if (!tmp) 619b2: 6608 bnes 619bc <== NEVER TAKEN 619b4: 143c 001a moveb #26,%d2 <== NOT EXECUTED 619b8: 6000 00ca braw 61a84 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 619bc: 487a fec2 pea %pc@(61880 ) 619c0: 4879 0009 5d3c pea 95d3c 619c6: 42a7 clrl %sp@- 619c8: 4eb9 0006 2bc4 jsr 62bc4 if (sc != RTEMS_SUCCESSFUL) { 619ce: 4fef 000c lea %sp@(12),%sp 619d2: 4a80 tstl %d0 619d4: 6710 beqs 619e6 <== NEVER TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 619d6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 619d8: 2400 movel %d0,%d2 <== NOT EXECUTED 619da: 4eb9 0004 6630 jsr 46630 <== NOT EXECUTED return sc; 619e0: 588f addql #4,%sp <== NOT EXECUTED 619e2: 6000 00a0 braw 61a84 <== NOT EXECUTED } rtems_current_user_env = tmp; 619e6: 23c3 0009 5d3c movel %d3,95d3c }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 619ec: 4878 0048 pea 48 619f0: 45f9 0007 7ebc lea 77ebc ,%a2 619f6: 4879 0009 a6bc pea 9a6bc * 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); 619fc: 260e movel %fp,%d3 619fe: 0683 ffff ffe8 addil #-24,%d3 61a04: 49f9 0004 6566 lea 46566 ,%a4 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 61a0a: 2679 0009 5d3c moveal 95d3c ,%a3 61a10: 2f0b movel %a3,%sp@- 61a12: 4e92 jsr %a2@ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 61a14: 26ae fffc movel %fp@(-4),%a3@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 61a18: 4878 0014 pea 14 61a1c: 2079 0009 a6a4 moveal 9a6a4 ,%a0 61a22: 41e8 001c lea %a0@(28),%a0 61a26: 2f08 movel %a0,%sp@- 61a28: 486b 0018 pea %a3@(24) 61a2c: 4e92 jsr %a2@ * 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); 61a2e: 42a7 clrl %sp@- 61a30: 2f03 movel %d3,%sp@- 61a32: 42a7 clrl %sp@- 61a34: 4878 0001 pea 1 61a38: 4879 0009 5776 pea 95776 61a3e: 4e94 jsr %a4@ rtems_filesystem_root = loc; 61a40: 4fef 002c lea %sp@(44),%sp 61a44: 4878 0014 pea 14 61a48: 2079 0009 5d3c moveal 95d3c ,%a0 61a4e: 41e8 0018 lea %a0@(24),%a0 61a52: 2f03 movel %d3,%sp@- 61a54: 2f08 movel %a0,%sp@- 61a56: 4e92 jsr %a2@ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 61a58: 42a7 clrl %sp@- 61a5a: 2f03 movel %d3,%sp@- 61a5c: 42a7 clrl %sp@- 61a5e: 4878 0001 pea 1 61a62: 4879 0009 5776 pea 95776 61a68: 4e94 jsr %a4@ rtems_filesystem_current = loc; 61a6a: 4fef 0020 lea %sp@(32),%sp 61a6e: 4878 0014 pea 14 61a72: 2039 0009 5d3c movel 95d3c ,%d0 61a78: 5880 addql #4,%d0 61a7a: 2f03 movel %d3,%sp@- 61a7c: 2f00 movel %d0,%sp@- 61a7e: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 61a80: 4fef 000c lea %sp@(12),%sp } 61a84: 2002 movel %d2,%d0 61a86: 4cee 1c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a4 61a8c: 4e5e unlk %fp 61a8e: 4e75 rts 000618da : * 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) { 618da: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 618de: 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); 618e0: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 618e4: 42a7 clrl %sp@- <== NOT EXECUTED 618e6: 42a7 clrl %sp@- <== NOT EXECUTED 618e8: 4eb9 0006 2860 jsr 62860 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 618ee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 618f2: 4a80 tstl %d0 <== NOT EXECUTED 618f4: 6678 bnes 6196e <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 618f6: 2479 0009 5d3c moveal 95d3c ,%a2 <== NOT EXECUTED 618fc: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 61900: b092 cmpl %a2@,%d0 <== NOT EXECUTED 61902: 661c bnes 61920 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 61904: 4879 0009 5d3c pea 95d3c <== NOT EXECUTED 6190a: 42a7 clrl %sp@- <== NOT EXECUTED 6190c: 4eb9 0006 2c58 jsr 62c58 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 61912: 508f addql #8,%sp <== NOT EXECUTED 61914: 4a80 tstl %d0 <== NOT EXECUTED 61916: 6656 bnes 6196e <== NOT EXECUTED free_user_env(tmp); 61918: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6191a: 4eba ff64 jsr %pc@(61880 ) <== NOT EXECUTED 6191e: 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, 61920: 486e fffc pea %fp@(-4) <== NOT EXECUTED 61924: 4879 0009 5d3c pea 95d3c <== NOT EXECUTED 6192a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 6192e: 4eb9 0006 2ccc jsr 62ccc <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 61934: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 61938: 4a80 tstl %d0 <== NOT EXECUTED 6193a: 6626 bnes 61962 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 6193c: 487a ff42 pea %pc@(61880 ) <== NOT EXECUTED 61940: 4879 0009 5d3c pea 95d3c <== NOT EXECUTED 61946: 42a7 clrl %sp@- <== NOT EXECUTED 61948: 4eb9 0006 2bc4 jsr 62bc4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 6194e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 61952: 4a80 tstl %d0 <== NOT EXECUTED 61954: 660c bnes 61962 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 61956: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED 6195a: 23d0 0009 5d3c movel %a0@,95d3c <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 61960: 600c bras 6196e <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 61962: 223c 0009 a6bc movel #632508,%d1 <== NOT EXECUTED 61968: 23c1 0009 5d3c movel %d1,95d3c <== NOT EXECUTED return sc; } 6196e: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 61972: 4e5e unlk %fp <== NOT EXECUTED 61974: 4e75 rts 00049064 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49064: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 49066: 4e56 0000 linkw %fp,#0 4906a: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4906e: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 49070: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49072: 7406 moveq #6,%d2 49074: b480 cmpl %d0,%d2 49076: 6604 bnes 4907c <== NEVER TAKEN 49078: 7002 moveq #2,%d0 <== NOT EXECUTED 4907a: 6012 bras 4908e <== NOT EXECUTED fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4907c: 0801 0001 btst #1,%d1 49080: 6704 beqs 49086 <== ALWAYS TAKEN 49082: 4280 clrl %d0 49084: 6008 bras 4908e <== ALWAYS TAKEN 49086: 2001 movel %d1,%d0 <== NOT EXECUTED 49088: e488 lsrl #2,%d0 <== NOT EXECUTED 4908a: 7401 moveq #1,%d2 <== NOT EXECUTED 4908c: c082 andl %d2,%d0 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 4908e: 0801 0000 btst #0,%d1 49092: 6704 beqs 49098 fcntl_flags |= O_NONBLOCK; 49094: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 49098: 0801 0009 btst #9,%d1 4909c: 6704 beqs 490a2 fcntl_flags |= O_APPEND; 4909e: 7408 moveq #8,%d2 490a0: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 490a2: 0801 000a btst #10,%d1 490a6: 6704 beqs 490ac fcntl_flags |= O_CREAT; 490a8: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 490ac: 241f movel %sp@+,%d2 490ae: 4e5e unlk %fp 490b0: 4e75 rts 00046c70 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 46c70: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 46c74: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46c76: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 46c78: 486e fffc pea %fp@(-4) <== NOT EXECUTED 46c7c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 46c80: 2f39 0009 5a40 movel 95a40 ,%sp@- <== NOT EXECUTED 46c86: 4eb9 0004 bc94 jsr 4bc94 <_Protected_heap_Get_block_size> <== NOT EXECUTED 46c8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 46c90: 4a00 tstb %d0 <== NOT EXECUTED 46c92: 671a beqs 46cae <== NOT EXECUTED MSBUMP(lifetime_freed, size); 46c94: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 46c98: 4282 clrl %d2 <== NOT EXECUTED 46c9a: d7b9 0009 a6a0 addl %d3,9a6a0 <== NOT EXECUTED 46ca0: 2039 0009 a69c movel 9a69c ,%d0 <== NOT EXECUTED 46ca6: d182 addxl %d2,%d0 <== NOT EXECUTED 46ca8: 23c0 0009 a69c movel %d0,9a69c <== NOT EXECUTED } } 46cae: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 46cb2: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 46cb6: 4e5e unlk %fp <== NOT EXECUTED 46cb8: 4e75 rts 00046cba : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 46cba: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 46cbe: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 46cc2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46cc4: 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 ) 46cc6: 4a80 tstl %d0 <== NOT EXECUTED 46cc8: 674e beqs 46d18 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 46cca: 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); 46ccc: 4282 clrl %d2 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 46cce: 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); 46cd0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 46cd2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46cd4: 2f39 0009 5a40 movel 95a40 ,%sp@- <== NOT EXECUTED 46cda: 4eb9 0004 bc94 jsr 4bc94 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 46ce0: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 46ce4: 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); 46ce8: 2039 0009 a694 movel 9a694 ,%d0 <== NOT EXECUTED 46cee: d6b9 0009 a698 addl 9a698 ,%d3 <== NOT EXECUTED 46cf4: d580 addxl %d0,%d2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 46cf6: 2003 movel %d3,%d0 <== NOT EXECUTED 46cf8: 90b9 0009 a6a0 subl 9a6a0 ,%d0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 46cfe: 23c2 0009 a694 movel %d2,9a694 <== NOT EXECUTED 46d04: 23c3 0009 a698 movel %d3,9a698 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 46d0a: b0b9 0009 a690 cmpl 9a690 ,%d0 <== NOT EXECUTED 46d10: 6306 blss 46d18 <== NOT EXECUTED s->max_depth = current_depth; 46d12: 23c0 0009 a690 movel %d0,9a690 <== NOT EXECUTED } 46d18: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 46d1c: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 46d20: 4e5e unlk %fp <== NOT EXECUTED 46d22: 4e75 rts 00046d24 : #include #include static void rtems_malloc_statistics_initialize( void ) { 46d24: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 46d28: 4878 002c pea 2c <== NOT EXECUTED 46d2c: 42a7 clrl %sp@- <== NOT EXECUTED 46d2e: 4879 0009 a678 pea 9a678 <== NOT EXECUTED 46d34: 4eb9 0007 8028 jsr 78028 <== NOT EXECUTED 46d3a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 46d3e: 4e5e unlk %fp <== NOT EXECUTED 46d40: 4e75 rts <== NOT EXECUTED ... 0004d960 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4d960: 4e56 0000 linkw %fp,#0 4d964: 2f0a movel %a2,%sp@- 4d966: 246e 0008 moveal %fp@(8),%a2 4d96a: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 4d96c: 4a8a tstl %a2 4d96e: 6758 beqs 4d9c8 <== ALWAYS TAKEN return EINVAL; *pointer = NULL; 4d970: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4d972: 7003 moveq #3,%d0 4d974: b0b9 0006 0fae cmpl 60fae <_System_state_Current>,%d0 4d97a: 660a bnes 4d986 <== ALWAYS TAKEN 4d97c: 4eb9 0004 3664 jsr 43664 4d982: 4a00 tstb %d0 4d984: 6742 beqs 4d9c8 <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4d986: 4eb9 0004 36bc jsr 436bc uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 4d98c: 42a7 clrl %sp@- 4d98e: 2f2e 000c movel %fp@(12),%sp@- 4d992: 2f2e 0010 movel %fp@(16),%sp@- 4d996: 2f39 0005 f590 movel 5f590 ,%sp@- 4d99c: 4eb9 0004 7f94 jsr 47f94 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4d9a2: 4fef 0010 lea %sp@(16),%sp 4d9a6: 2400 movel %d0,%d2 4d9a8: 6604 bnes 4d9ae 4d9aa: 700c moveq #12,%d0 4d9ac: 601c bras 4d9ca <== ALWAYS TAKEN return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4d9ae: 2079 0005 fbf6 moveal 5fbf6 ,%a0 4d9b4: 4a88 tstl %a0 4d9b6: 670a beqs 4d9c2 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4d9b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d9ba: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4d9be: 4e90 jsr %a0@ <== NOT EXECUTED 4d9c0: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 4d9c2: 2482 movel %d2,%a2@ 4d9c4: 4280 clrl %d0 return 0; 4d9c6: 6002 bras 4d9ca <== ALWAYS TAKEN 4d9c8: 7016 moveq #22,%d0 } 4d9ca: 242e fff8 movel %fp@(-8),%d2 4d9ce: 246e fffc moveal %fp@(-4),%a2 4d9d2: 4e5e unlk %fp 4d9d4: 4e75 rts ... 0004e630 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 4e630: 4e56 fff0 linkw %fp,#-16 4e634: 48d7 001c moveml %d2-%d4,%sp@ 4e638: 262e 0008 movel %fp@(8),%d3 4e63c: 242e 000c movel %fp@(12),%d2 4e640: 282e 0014 movel %fp@(20),%d4 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 4e644: 4a82 tstl %d2 4e646: 6752 beqs 4e69a return RTEMS_INVALID_ADDRESS; if ( !count ) 4e648: 4a84 tstl %d4 4e64a: 674e beqs 4e69a RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4e64c: 486e fffc pea %fp@(-4) 4e650: 2f03 movel %d3,%sp@- 4e652: 4879 0007 3aca pea 73aca <_Message_queue_Information> 4e658: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4e65e: 4fef 000c lea %sp@(12),%sp 4e662: 4aae fffc tstl %fp@(-4) 4e666: 6704 beqs 4e66c 4e668: 7004 moveq #4,%d0 4e66a: 6030 bras 4e69c <== ALWAYS TAKEN case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 4e66c: 2f04 movel %d4,%sp@- 4e66e: 2040 moveal %d0,%a0 4e670: 42a7 clrl %sp@- 4e672: 2f03 movel %d3,%sp@- 4e674: 2f2e 0010 movel %fp@(16),%sp@- 4e678: 2f02 movel %d2,%sp@- 4e67a: 4868 0014 pea %a0@(20) 4e67e: 4eb9 0005 18d0 jsr 518d0 <_CORE_message_queue_Broadcast> 4e684: 2400 movel %d0,%d2 NULL, #endif count ); _Thread_Enable_dispatch(); 4e686: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 4e68c: 2f02 movel %d2,%sp@- 4e68e: 4eb9 0004 e9b4 jsr 4e9b4 <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 4e694: 4fef 001c lea %sp@(28),%sp 4e698: 6002 bras 4e69c <== ALWAYS TAKEN 4e69a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e69c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4e6a2: 4e5e unlk %fp 4e6a4: 4e75 rts ... 0004cb24 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 4cb24: 4e56 ffe0 linkw %fp,#-32 4cb28: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4cb2c: 242e 0008 movel %fp@(8),%d2 4cb30: 262e 000c movel %fp@(12),%d3 4cb34: 282e 0010 movel %fp@(16),%d4 4cb38: 2a2e 0014 movel %fp@(20),%d5 4cb3c: 286e 0018 moveal %fp@(24),%a4 CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 4cb40: 4a82 tstl %d2 4cb42: 6606 bnes 4cb4a 4cb44: 7003 moveq #3,%d0 4cb46: 6000 00a4 braw 4cbec <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 4cb4a: 4a8c tstl %a4 4cb4c: 6606 bnes 4cb54 4cb4e: 7009 moveq #9,%d0 4cb50: 6000 009a braw 4cbec <== ALWAYS TAKEN if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 4cb54: 4a83 tstl %d3 4cb56: 6606 bnes 4cb5e 4cb58: 700a moveq #10,%d0 4cb5a: 6000 0090 braw 4cbec <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 4cb5e: 4a84 tstl %d4 4cb60: 6606 bnes 4cb68 4cb62: 7008 moveq #8,%d0 4cb64: 6000 0086 braw 4cbec <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4cb68: 2039 0006 4f68 movel 64f68 <_Thread_Dispatch_disable_level>,%d0 4cb6e: 5280 addql #1,%d0 4cb70: 23c0 0006 4f68 movel %d0,64f68 <_Thread_Dispatch_disable_level> #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 4cb76: 4eb9 0005 19d8 jsr 519d8 <_Message_queue_Allocate> 4cb7c: 2440 moveal %d0,%a2 if ( !the_message_queue ) { 4cb7e: 4a80 tstl %d0 4cb80: 660a bnes 4cb8c _Thread_Enable_dispatch(); 4cb82: 4eb9 0004 f37e jsr 4f37e <_Thread_Enable_dispatch> 4cb88: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4cb8a: 6060 bras 4cbec <== ALWAYS TAKEN #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4cb8c: 204e moveal %fp,%a0 4cb8e: 47f9 0004 f37e lea 4f37e <_Thread_Enable_dispatch>,%a3 4cb94: 44c5 movew %d5,%ccr 4cb96: 56c0 sne %d0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 4cb98: 2545 0010 movel %d5,%a2@(16) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4cb9c: 49c0 extbl %d0 4cb9e: 5280 addql #1,%d0 4cba0: 2100 movel %d0,%a0@- else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 4cba2: 2f04 movel %d4,%sp@- 4cba4: 2f03 movel %d3,%sp@- 4cba6: 2f08 movel %a0,%sp@- 4cba8: 486a 0014 pea %a2@(20) 4cbac: 4eb9 0004 dc8c jsr 4dc8c <_CORE_message_queue_Initialize> 4cbb2: 4fef 0010 lea %sp@(16),%sp 4cbb6: 4a00 tstb %d0 4cbb8: 6616 bnes 4cbd0 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4cbba: 2f0a movel %a2,%sp@- 4cbbc: 4879 0006 513e pea 6513e <_Message_queue_Information> 4cbc2: 4eb9 0004 e950 jsr 4e950 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4cbc8: 4e93 jsr %a3@ return RTEMS_UNSATISFIED; 4cbca: 508f addql #8,%sp _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4cbcc: 700d moveq #13,%d0 return RTEMS_UNSATISFIED; 4cbce: 601c bras 4cbec <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cbd0: 202a 0008 movel %a2@(8),%d0 4cbd4: 4281 clrl %d1 4cbd6: 2079 0006 5156 moveal 65156 <_Message_queue_Information+0x18>,%a0 4cbdc: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4cbde: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cbe2: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 4cbe6: 2880 movel %d0,%a4@ name, 0 ); #endif _Thread_Enable_dispatch(); 4cbe8: 4e93 jsr %a3@ 4cbea: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cbec: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4cbf2: 4e5e unlk %fp 4cbf4: 4e75 rts ... 0004f2a8 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 4f2a8: 4e56 fffc linkw %fp,#-4 4f2ac: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4f2ae: 486e fffc pea %fp@(-4) 4f2b2: 2f2e 0008 movel %fp@(8),%sp@- 4f2b6: 4879 0006 72fa pea 672fa <_Message_queue_Information> 4f2bc: 4eb9 0004 9df8 jsr 49df8 <_Objects_Get> register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4f2c2: 4fef 000c lea %sp@(12),%sp 4f2c6: 2440 moveal %d0,%a2 4f2c8: 4aae fffc tstl %fp@(-4) 4f2cc: 6704 beqs 4f2d2 4f2ce: 7004 moveq #4,%d0 4f2d0: 6038 bras 4f30a <== ALWAYS TAKEN case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 4f2d2: 2f00 movel %d0,%sp@- 4f2d4: 4879 0006 72fa pea 672fa <_Message_queue_Information> 4f2da: 4eb9 0004 9a2c jsr 49a2c <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 4f2e0: 4878 0005 pea 5 4f2e4: 42a7 clrl %sp@- 4f2e6: 486a 0014 pea %a2@(20) 4f2ea: 4eb9 0004 f894 jsr 4f894 <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4f2f0: 2f0a movel %a2,%sp@- 4f2f2: 4879 0006 72fa pea 672fa <_Message_queue_Information> 4f2f8: 4eb9 0004 9ca0 jsr 49ca0 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 4f2fe: 4eb9 0004 a6ca jsr 4a6ca <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4f304: 4fef 001c lea %sp@(28),%sp 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 4f308: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4f30a: 246e fff8 moveal %fp@(-8),%a2 4f30e: 4e5e unlk %fp 4f310: 4e75 rts ... 0004e7e8 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 4e7e8: 4e56 fffc linkw %fp,#-4 4e7ec: 2f0a movel %a2,%sp@- 4e7ee: 246e 000c moveal %fp@(12),%a2 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4e7f2: 4a8a tstl %a2 4e7f4: 6604 bnes 4e7fa 4e7f6: 7009 moveq #9,%d0 4e7f8: 603a bras 4e834 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4e7fa: 486e fffc pea %fp@(-4) 4e7fe: 2f2e 0008 movel %fp@(8),%sp@- 4e802: 4879 0007 3aca pea 73aca <_Message_queue_Information> 4e808: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4e80e: 4fef 000c lea %sp@(12),%sp 4e812: 4aae fffc tstl %fp@(-4) 4e816: 6704 beqs 4e81c 4e818: 7004 moveq #4,%d0 4e81a: 6018 bras 4e834 <== ALWAYS TAKEN case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 4e81c: 2040 moveal %d0,%a0 4e81e: 4868 0014 pea %a0@(20) 4e822: 4eb9 0005 1980 jsr 51980 <_CORE_message_queue_Flush> 4e828: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4e82a: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4e830: 588f addql #4,%sp the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); _Thread_Enable_dispatch(); 4e832: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e834: 246e fff8 moveal %fp@(-8),%a2 4e838: 4e5e unlk %fp 4e83a: 4e75 rts 0004e83c : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 4e83c: 4e56 fffc linkw %fp,#-4 4e840: 2f0a movel %a2,%sp@- 4e842: 246e 000c moveal %fp@(12),%a2 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4e846: 4a8a tstl %a2 4e848: 6604 bnes 4e84e 4e84a: 7009 moveq #9,%d0 4e84c: 6030 bras 4e87e <== ALWAYS TAKEN 4e84e: 486e fffc pea %fp@(-4) 4e852: 2f2e 0008 movel %fp@(8),%sp@- 4e856: 4879 0007 3aca pea 73aca <_Message_queue_Information> 4e85c: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4e862: 4fef 000c lea %sp@(12),%sp 4e866: 4aae fffc tstl %fp@(-4) 4e86a: 6704 beqs 4e870 4e86c: 7004 moveq #4,%d0 4e86e: 600e bras 4e87e <== ALWAYS TAKEN case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 4e870: 2040 moveal %d0,%a0 4e872: 24a8 005c movel %a0@(92),%a2@ _Thread_Enable_dispatch(); 4e876: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> 4e87c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e87e: 246e fff8 moveal %fp@(-8),%a2 4e882: 4e5e unlk %fp 4e884: 4e75 rts ... 0004cc24 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 4cc24: 4e56 fff0 linkw %fp,#-16 4cc28: 48d7 001c moveml %d2-%d4,%sp@ 4cc2c: 242e 000c movel %fp@(12),%d2 4cc30: 262e 0010 movel %fp@(16),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 4cc34: 4a82 tstl %d2 4cc36: 6766 beqs 4cc9e return RTEMS_INVALID_ADDRESS; if ( !size ) 4cc38: 4a83 tstl %d3 4cc3a: 6762 beqs 4cc9e RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4cc3c: 486e fffc pea %fp@(-4) 4cc40: 2f2e 0008 movel %fp@(8),%sp@- 4cc44: 4879 0006 513e pea 6513e <_Message_queue_Information> 4cc4a: 4eb9 0004 eaa8 jsr 4eaa8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4cc50: 4fef 000c lea %sp@(12),%sp 4cc54: 4aae fffc tstl %fp@(-4) 4cc58: 6704 beqs 4cc5e 4cc5a: 7004 moveq #4,%d0 4cc5c: 6042 bras 4cca0 <== ALWAYS TAKEN if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 4cc5e: 7201 moveq #1,%d1 4cc60: 7801 moveq #1,%d4 4cc62: 2040 moveal %d0,%a0 4cc64: c2ae 0014 andl %fp@(20),%d1 4cc68: 2f2e 0018 movel %fp@(24),%sp@- 4cc6c: b384 eorl %d1,%d4 4cc6e: 2f04 movel %d4,%sp@- 4cc70: 2f03 movel %d3,%sp@- 4cc72: 2f02 movel %d2,%sp@- 4cc74: 2f28 0008 movel %a0@(8),%sp@- 4cc78: 4868 0014 pea %a0@(20) 4cc7c: 4eb9 0004 dd40 jsr 4dd40 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 4cc82: 4eb9 0004 f37e jsr 4f37e <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 4cc88: 2079 0006 5022 moveal 65022 <_Thread_Executing>,%a0 4cc8e: 2f28 0034 movel %a0@(52),%sp@- 4cc92: 4eb9 0004 cd24 jsr 4cd24 <_Message_queue_Translate_core_message_queue_return_code> 4cc98: 4fef 001c lea %sp@(28),%sp 4cc9c: 6002 bras 4cca0 <== ALWAYS TAKEN 4cc9e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cca0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cca6: 4e5e unlk %fp 4cca8: 4e75 rts ... 0004ccac : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 4ccac: 4e56 fffc linkw %fp,#-4 4ccb0: 2f03 movel %d3,%sp@- 4ccb2: 262e 0008 movel %fp@(8),%d3 4ccb6: 2f02 movel %d2,%sp@- 4ccb8: 242e 000c movel %fp@(12),%d2 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 4ccbc: 6604 bnes 4ccc2 4ccbe: 7009 moveq #9,%d0 4ccc0: 6056 bras 4cd18 <== ALWAYS TAKEN 4ccc2: 486e fffc pea %fp@(-4) 4ccc6: 2f03 movel %d3,%sp@- 4ccc8: 4879 0006 513e pea 6513e <_Message_queue_Information> 4ccce: 4eb9 0004 eaa8 jsr 4eaa8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4ccd4: 4fef 000c lea %sp@(12),%sp 4ccd8: 4aae fffc tstl %fp@(-4) 4ccdc: 6704 beqs 4cce2 4ccde: 7004 moveq #4,%d0 4cce0: 6036 bras 4cd18 <== ALWAYS TAKEN CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 4cce2: 42a7 clrl %sp@- 4cce4: 2040 moveal %d0,%a0 4cce6: 42a7 clrl %sp@- 4cce8: 2f3c 7fff ffff movel #2147483647,%sp@- 4ccee: 42a7 clrl %sp@- 4ccf0: 2f03 movel %d3,%sp@- 4ccf2: 2f2e 0010 movel %fp@(16),%sp@- 4ccf6: 2f02 movel %d2,%sp@- 4ccf8: 4868 0014 pea %a0@(20) 4ccfc: 4eb9 0004 de28 jsr 4de28 <_CORE_message_queue_Submit> MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 4cd02: 4fef 0020 lea %sp@(32),%sp 4cd06: 2400 movel %d0,%d2 4cd08: 4eb9 0004 f37e jsr 4f37e <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 4cd0e: 2f02 movel %d2,%sp@- 4cd10: 4eb9 0004 cd24 jsr 4cd24 <_Message_queue_Translate_core_message_queue_return_code> 4cd16: 588f addql #4,%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cd18: 242e fff4 movel %fp@(-12),%d2 4cd1c: 262e fff8 movel %fp@(-8),%d3 4cd20: 4e5e unlk %fp 4cd22: 4e75 rts 0004e9cc : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 4e9cc: 4e56 fffc linkw %fp,#-4 4e9d0: 2f03 movel %d3,%sp@- 4e9d2: 262e 0008 movel %fp@(8),%d3 4e9d6: 2f02 movel %d2,%sp@- 4e9d8: 242e 000c movel %fp@(12),%d2 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 4e9dc: 6604 bnes 4e9e2 4e9de: 7009 moveq #9,%d0 4e9e0: 6056 bras 4ea38 <== ALWAYS TAKEN 4e9e2: 486e fffc pea %fp@(-4) 4e9e6: 2f03 movel %d3,%sp@- 4e9e8: 4879 0007 3aca pea 73aca <_Message_queue_Information> 4e9ee: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4e9f4: 4fef 000c lea %sp@(12),%sp 4e9f8: 4aae fffc tstl %fp@(-4) 4e9fc: 6704 beqs 4ea02 4e9fe: 7004 moveq #4,%d0 4ea00: 6036 bras 4ea38 <== ALWAYS TAKEN CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 4ea02: 42a7 clrl %sp@- 4ea04: 2040 moveal %d0,%a0 4ea06: 42a7 clrl %sp@- 4ea08: 2f3c 8000 0000 movel #-2147483648,%sp@- 4ea0e: 42a7 clrl %sp@- 4ea10: 2f03 movel %d3,%sp@- 4ea12: 2f2e 0010 movel %fp@(16),%sp@- 4ea16: 2f02 movel %d2,%sp@- 4ea18: 4868 0014 pea %a0@(20) 4ea1c: 4eb9 0005 1b98 jsr 51b98 <_CORE_message_queue_Submit> id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 4ea22: 4fef 0020 lea %sp@(32),%sp 4ea26: 2400 movel %d0,%d2 4ea28: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 4ea2e: 2f02 movel %d2,%sp@- 4ea30: 4eb9 0004 e9b4 jsr 4e9b4 <_Message_queue_Translate_core_message_queue_return_code> 4ea36: 588f addql #4,%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ea38: 242e fff4 movel %fp@(-12),%d2 4ea3c: 262e fff8 movel %fp@(-8),%d3 4ea40: 4e5e unlk %fp 4ea42: 4e75 rts 000464f8 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 464f8: 4e56 0000 linkw %fp,#0 464fc: 2f0a movel %a2,%sp@- 464fe: 246e 0010 moveal %fp@(16),%a2 46502: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 46504: 4a8a tstl %a2 46506: 6604 bnes 4650c 46508: 7009 moveq #9,%d0 4650a: 6052 bras 4655e <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 4650c: 2f2e 000c movel %fp@(12),%sp@- 46510: 2f2e 0008 movel %fp@(8),%sp@- 46514: 4eb9 0004 7dbc jsr 47dbc <_Objects_Get_information> if ( !obj_info ) 4651a: 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 ); 4651c: 2040 moveal %d0,%a0 if ( !obj_info ) 4651e: 4a80 tstl %d0 46520: 6604 bnes 46526 46522: 700a moveq #10,%d0 46524: 6038 bras 4655e <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 46526: 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; 4652a: 4282 clrl %d2 4652c: 7001 moveq #1,%d0 4652e: 4281 clrl %d1 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 46530: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 46536: 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; 4653a: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 46540: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 46544: 600e bras 46554 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) 46546: 2268 0018 moveal %a0@(24),%a1 4654a: 4ab1 0c00 tstl %a1@(00000000,%d0:l:4) 4654e: 6602 bnes 46552 unallocated++; 46550: 5281 addql #1,%d1 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++ ) 46552: 5280 addql #1,%d0 46554: b480 cmpl %d0,%d2 46556: 64ee bccs 46546 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 46558: 2541 000e movel %d1,%a2@(14) 4655c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4655e: 242e fff8 movel %fp@(-8),%d2 46562: 246e fffc moveal %fp@(-4),%a2 46566: 4e5e unlk %fp 46568: 4e75 rts ... 0004834c : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 4834c: 4e56 fffc linkw %fp,#-4 48350: 2f0a movel %a2,%sp@- 48352: 246e 000c moveal %fp@(12),%a2 Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 48356: 4a8a tstl %a2 48358: 6604 bnes 4835e 4835a: 7009 moveq #9,%d0 4835c: 601e bras 4837c <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 4835e: 486e fffc pea %fp@(-4) 48362: 2f2e 0008 movel %fp@(8),%sp@- 48366: 4eb9 0004 9e58 jsr 49e58 <_Objects_Id_to_name> *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; 4836c: 508f addql #8,%sp 4836e: 41f9 0006 2c14 lea 62c14 <_Status_Object_name_errors_to_status>,%a0 48374: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !name ) return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; 48378: 24ae fffc movel %fp@(-4),%a2@ return _Status_Object_name_errors_to_status[ status ]; } 4837c: 246e fff8 moveal %fp@(-8),%a2 48380: 4e5e unlk %fp 48382: 4e75 rts 000465d4 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 465d4: 4e56 fff0 linkw %fp,#-16 465d8: 48d7 001c moveml %d2-%d4,%sp@ 465dc: 262e 0008 movel %fp@(8),%d3 465e0: 282e 000c movel %fp@(12),%d4 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 465e4: 6604 bnes 465ea 465e6: 7009 moveq #9,%d0 465e8: 6050 bras 4663a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 465ea: 4a83 tstl %d3 465ec: 660a bnes 465f8 465ee: 2079 0005 e5c6 moveal 5e5c6 <_Thread_Executing>,%a0 465f4: 2628 0008 movel %a0@(8),%d3 information = _Objects_Get_information_id( tmpId ); 465f8: 2f03 movel %d3,%sp@- 465fa: 4eb9 0004 7d90 jsr 47d90 <_Objects_Get_information_id> if ( !information ) 46600: 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 ); 46602: 2400 movel %d0,%d2 if ( !information ) 46604: 6732 beqs 46638 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 46606: 486e fffc pea %fp@(-4) 4660a: 2f03 movel %d3,%sp@- 4660c: 2f00 movel %d0,%sp@- 4660e: 4eb9 0004 7f34 jsr 47f34 <_Objects_Get> switch ( location ) { 46614: 4fef 000c lea %sp@(12),%sp 46618: 4aae fffc tstl %fp@(-4) 4661c: 661a bnes 46638 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 4661e: 2f04 movel %d4,%sp@- 46620: 2f00 movel %d0,%sp@- 46622: 2f02 movel %d2,%sp@- 46624: 4eb9 0004 811c jsr 4811c <_Objects_Set_name> _Thread_Enable_dispatch(); 4662a: 4eb9 0004 87a2 jsr 487a2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46630: 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(); 46634: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 46636: 6002 bras 4663a <== ALWAYS TAKEN 46638: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4663a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 46640: 4e5e unlk %fp 46642: 4e75 rts 000420ba : void rtems_panic( const char *printf_format, ... ) { 420ba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 420be: 486e 000c pea %fp@(12) <== NOT EXECUTED 420c2: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 420c6: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 420cc: 4eba fe66 jsr %pc@(41f34 ) <== NOT EXECUTED 420d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED va_end(arglist); } 420d4: 4e5e unlk %fp <== NOT EXECUTED 420d6: 4e75 rts 0004ea44 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 4ea44: 4e56 ffe4 linkw %fp,#-28 4ea48: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ea4c: 2a2e 0008 movel %fp@(8),%d5 4ea50: 282e 000c movel %fp@(12),%d4 4ea54: 262e 0010 movel %fp@(16),%d3 4ea58: 242e 0014 movel %fp@(20),%d2 4ea5c: 266e 001c moveal %fp@(28),%a3 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 4ea60: 4a85 tstl %d5 4ea62: 6606 bnes 4ea6a 4ea64: 7003 moveq #3,%d0 4ea66: 6000 00b2 braw 4eb1a <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !starting_address ) 4ea6a: 4a84 tstl %d4 4ea6c: 6700 00a6 beqw 4eb14 return RTEMS_INVALID_ADDRESS; if ( !id ) 4ea70: 4a8b tstl %a3 4ea72: 6700 00a0 beqw 4eb14 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 4ea76: 4a83 tstl %d3 4ea78: 6700 009e beqw 4eb18 4ea7c: 4a82 tstl %d2 4ea7e: 6700 0098 beqw 4eb18 4ea82: b483 cmpl %d3,%d2 4ea84: 6200 0092 bhiw 4eb18 4ea88: 7003 moveq #3,%d0 4ea8a: c082 andl %d2,%d0 4ea8c: 6600 008a bnew 4eb18 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 4ea90: 103c 0003 moveb #3,%d0 4ea94: c084 andl %d4,%d0 4ea96: 667c bnes 4eb14 4ea98: 2039 0007 38e0 movel 738e0 <_Thread_Dispatch_disable_level>,%d0 4ea9e: 5280 addql #1,%d0 4eaa0: 23c0 0007 38e0 movel %d0,738e0 <_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 ); 4eaa6: 4879 0007 3774 pea 73774 <_Partition_Information> 4eaac: 45f9 0005 376a lea 5376a <_Thread_Enable_dispatch>,%a2 4eab2: 4eb9 0005 2a8c jsr 52a8c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 4eab8: 588f addql #4,%sp 4eaba: 2840 moveal %d0,%a4 4eabc: 4a80 tstl %d0 4eabe: 6606 bnes 4eac6 _Thread_Enable_dispatch(); 4eac0: 4e92 jsr %a2@ 4eac2: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4eac4: 6054 bras 4eb1a <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 4eac6: 2944 0010 movel %d4,%a4@(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, 4eaca: 2003 movel %d3,%d0 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 4eacc: 296e 0018 001c movel %fp@(24),%a4@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 4ead2: 4c42 0000 remul %d2,%d0,%d0 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 4ead6: 2943 0014 movel %d3,%a4@(20) the_partition->buffer_size = buffer_size; 4eada: 2942 0018 movel %d2,%a4@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 4eade: 42ac 0020 clrl %a4@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 4eae2: 2f02 movel %d2,%sp@- 4eae4: 2f00 movel %d0,%sp@- 4eae6: 2f04 movel %d4,%sp@- 4eae8: 486c 0024 pea %a4@(36) 4eaec: 4eb9 0005 1890 jsr 51890 <_Chain_Initialize> 4eaf2: 202c 0008 movel %a4@(8),%d0 4eaf6: 4281 clrl %d1 4eaf8: 2079 0007 378c moveal 7378c <_Partition_Information+0x18>,%a0 4eafe: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4eb00: 2945 000c movel %d5,%a4@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4eb04: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 4eb08: 2680 movel %d0,%a3@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 4eb0a: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 4eb0c: 4fef 0010 lea %sp@(16),%sp name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 4eb10: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4eb12: 6006 bras 4eb1a <== ALWAYS TAKEN 4eb14: 7009 moveq #9,%d0 4eb16: 6002 bras 4eb1a <== ALWAYS TAKEN 4eb18: 7008 moveq #8,%d0 } 4eb1a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4eb20: 4e5e unlk %fp 4eb22: 4e75 rts 0004eb24 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 4eb24: 4e56 fffc linkw %fp,#-4 4eb28: 2f0b movel %a3,%sp@- 4eb2a: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4eb2c: 486e fffc pea %fp@(-4) 4eb30: 2f2e 0008 movel %fp@(8),%sp@- 4eb34: 4879 0007 3774 pea 73774 <_Partition_Information> 4eb3a: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4eb40: 4fef 000c lea %sp@(12),%sp 4eb44: 2440 moveal %d0,%a2 4eb46: 4aae fffc tstl %fp@(-4) 4eb4a: 6704 beqs 4eb50 4eb4c: 7004 moveq #4,%d0 4eb4e: 6036 bras 4eb86 <== ALWAYS TAKEN 4eb50: 47f9 0005 376a lea 5376a <_Thread_Enable_dispatch>,%a3 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 4eb56: 4aaa 0020 tstl %a2@(32) 4eb5a: 6626 bnes 4eb82 _Objects_Close( &_Partition_Information, &the_partition->Object ); 4eb5c: 2f00 movel %d0,%sp@- 4eb5e: 4879 0007 3774 pea 73774 <_Partition_Information> 4eb64: 4eb9 0005 2b0c jsr 52b0c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4eb6a: 2f0a movel %a2,%sp@- 4eb6c: 4879 0007 3774 pea 73774 <_Partition_Information> 4eb72: 4eb9 0005 2d80 jsr 52d80 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4eb78: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 4eb7a: 4fef 0010 lea %sp@(16),%sp 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4eb7e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4eb80: 6004 bras 4eb86 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 4eb82: 4e93 jsr %a3@ 4eb84: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4eb86: 246e fff4 moveal %fp@(-12),%a2 4eb8a: 266e fff8 moveal %fp@(-8),%a3 4eb8e: 4e5e unlk %fp 4eb90: 4e75 rts ... 0004eb94 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 4eb94: 4e56 fff0 linkw %fp,#-16 4eb98: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4eb9c: 266e 000c moveal %fp@(12),%a3 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 4eba0: 4a8b tstl %a3 4eba2: 6604 bnes 4eba8 4eba4: 7009 moveq #9,%d0 4eba6: 604a bras 4ebf2 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4eba8: 486e fffc pea %fp@(-4) 4ebac: 2f2e 0008 movel %fp@(8),%sp@- 4ebb0: 4879 0007 3774 pea 73774 <_Partition_Information> 4ebb6: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4ebbc: 4fef 000c lea %sp@(12),%sp 4ebc0: 2440 moveal %d0,%a2 4ebc2: 4aae fffc tstl %fp@(-4) 4ebc6: 6704 beqs 4ebcc 4ebc8: 7004 moveq #4,%d0 4ebca: 6026 bras 4ebf2 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 4ebcc: 486a 0024 pea %a2@(36) 4ebd0: 4eb9 0005 185c jsr 5185c <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 4ebd6: 588f addql #4,%sp 4ebd8: 41f9 0005 376a lea 5376a <_Thread_Enable_dispatch>,%a0 4ebde: 2400 movel %d0,%d2 4ebe0: 670c beqs 4ebee the_partition->number_of_used_blocks += 1; 4ebe2: 52aa 0020 addql #1,%a2@(32) _Thread_Enable_dispatch(); 4ebe6: 4e90 jsr %a0@ *buffer = the_buffer; 4ebe8: 4280 clrl %d0 4ebea: 2682 movel %d2,%a3@ return RTEMS_SUCCESSFUL; 4ebec: 6004 bras 4ebf2 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 4ebee: 4e90 jsr %a0@ 4ebf0: 700d moveq #13,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ebf2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4ebf8: 4e5e unlk %fp 4ebfa: 4e75 rts 0004ec28 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 4ec28: 4e56 fffc linkw %fp,#-4 4ec2c: 2f0a movel %a2,%sp@- 4ec2e: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4ec30: 486e fffc pea %fp@(-4) 4ec34: 2f2e 0008 movel %fp@(8),%sp@- 4ec38: 4879 0007 3774 pea 73774 <_Partition_Information> 4ec3e: 242e 000c movel %fp@(12),%d2 4ec42: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4ec48: 4fef 000c lea %sp@(12),%sp 4ec4c: 2440 moveal %d0,%a2 4ec4e: 4aae fffc tstl %fp@(-4) 4ec52: 6704 beqs 4ec58 4ec54: 7004 moveq #4,%d0 4ec56: 603c bras 4ec94 <== ALWAYS TAKEN ) { void *starting; void *ending; starting = the_partition->starting_address; 4ec58: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 4ec5c: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 4ec60: b082 cmpl %d2,%d0 4ec62: 623c bhis 4eca0 4ec64: d280 addl %d0,%d1 4ec66: b282 cmpl %d2,%d1 4ec68: 6536 bcss 4eca0 <== ALWAYS TAKEN return ( 4ec6a: 2202 movel %d2,%d1 4ec6c: 9280 subl %d0,%d1 4ec6e: 2001 movel %d1,%d0 4ec70: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 4ec76: 4a81 tstl %d1 4ec78: 6626 bnes 4eca0 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 4ec7a: 2f02 movel %d2,%sp@- 4ec7c: 486a 0024 pea %a2@(36) 4ec80: 4eb9 0005 1824 jsr 51824 <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 4ec86: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 4ec8a: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4ec90: 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(); 4ec92: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ec94: 242e fff4 movel %fp@(-12),%d2 4ec98: 246e fff8 moveal %fp@(-8),%a2 4ec9c: 4e5e unlk %fp 4ec9e: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4eca0: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> 4eca6: 7009 moveq #9,%d0 return RTEMS_INVALID_ADDRESS; 4eca8: 60ea bras 4ec94 <== ALWAYS TAKEN ... 0004a416 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4a416: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 4a41a: 4a39 0005 a8a4 tstb 5a8a4 4a420: 6740 beqs 4a462 <== NEVER TAKEN return; if (rtems_pipe_semaphore) 4a422: 4ab9 0005 b1e4 tstl 5b1e4 <== NOT EXECUTED 4a428: 6638 bnes 4a462 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4a42a: 4879 0005 b1e4 pea 5b1e4 <== NOT EXECUTED 4a430: 42a7 clrl %sp@- <== NOT EXECUTED 4a432: 4878 0054 pea 54 <== NOT EXECUTED 4a436: 4878 0001 pea 1 <== NOT EXECUTED 4a43a: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4a440: 4eb9 0004 4cf8 jsr 44cf8 <== 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) 4a446: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4a44a: 4a80 tstl %d0 <== NOT EXECUTED 4a44c: 6708 beqs 4a456 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4a44e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a450: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4a456: 4eb9 0004 4910 jsr 44910 <== NOT EXECUTED rtems_pipe_no = now; 4a45c: 33c0 0005 b1ec movew %d0,5b1ec <== NOT EXECUTED } 4a462: 4e5e unlk %fp 4a464: 4e75 rts 0004e0c4 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 4e0c4: 4e56 ffec linkw %fp,#-20 4e0c8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4e0cc: 282e 0008 movel %fp@(8),%d4 4e0d0: 262e 000c movel %fp@(12),%d3 4e0d4: 242e 0010 movel %fp@(16),%d2 4e0d8: 246e 0018 moveal %fp@(24),%a2 register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 4e0dc: 4a84 tstl %d4 4e0de: 6604 bnes 4e0e4 4e0e0: 7003 moveq #3,%d0 4e0e2: 606e bras 4e152 <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 4e0e4: 4a8a tstl %a2 4e0e6: 6768 beqs 4e150 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 4e0e8: 2002 movel %d2,%d0 4e0ea: 7203 moveq #3,%d1 4e0ec: 8083 orl %d3,%d0 4e0ee: c081 andl %d1,%d0 4e0f0: 665e bnes 4e150 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4e0f2: 2039 0007 38e0 movel 738e0 <_Thread_Dispatch_disable_level>,%d0 4e0f8: 5280 addql #1,%d0 4e0fa: 23c0 0007 38e0 movel %d0,738e0 <_Thread_Dispatch_disable_level> * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 4e100: 4879 0007 373c pea 7373c <_Dual_ported_memory_Information> 4e106: 4eb9 0005 2a8c jsr 52a8c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 4e10c: 588f addql #4,%sp 4e10e: 43f9 0005 376a lea 5376a <_Thread_Enable_dispatch>,%a1 4e114: 2040 moveal %d0,%a0 4e116: 4a80 tstl %d0 4e118: 6606 bnes 4e120 _Thread_Enable_dispatch(); 4e11a: 4e91 jsr %a1@ 4e11c: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4e11e: 6032 bras 4e152 <== ALWAYS TAKEN } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 4e120: 222e 0014 movel %fp@(20),%d1 4e124: 5381 subql #1,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4e126: 2028 0008 movel %a0@(8),%d0 4e12a: 2141 0018 movel %d1,%a0@(24) 4e12e: 4281 clrl %d1 4e130: 2679 0007 3754 moveal 73754 <_Dual_ported_memory_Information+0x18>,%a3 4e136: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4e138: 2144 000c movel %d4,%a0@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4e13c: 2788 1c00 movel %a0,%a3@(00000000,%d1:l:4) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 4e140: 2480 movel %d0,%a2@ if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 4e142: 2143 0010 movel %d3,%a0@(16) the_port->external_base = external_start; 4e146: 2142 0014 movel %d2,%a0@(20) &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 4e14a: 4e91 jsr %a1@ 4e14c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4e14e: 6002 bras 4e152 <== ALWAYS TAKEN 4e150: 7009 moveq #9,%d0 } 4e152: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4e158: 4e5e unlk %fp 4e15a: 4e75 rts 0004e15c : */ rtems_status_code rtems_port_delete( rtems_id id ) { 4e15c: 4e56 fffc linkw %fp,#-4 4e160: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4e162: 486e fffc pea %fp@(-4) 4e166: 2f2e 0008 movel %fp@(8),%sp@- 4e16a: 4879 0007 373c pea 7373c <_Dual_ported_memory_Information> 4e170: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e176: 4fef 000c lea %sp@(12),%sp 4e17a: 2400 movel %d0,%d2 4e17c: 4aae fffc tstl %fp@(-4) 4e180: 6704 beqs 4e186 4e182: 7004 moveq #4,%d0 4e184: 6028 bras 4e1ae <== ALWAYS TAKEN case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 4e186: 2f00 movel %d0,%sp@- 4e188: 4879 0007 373c pea 7373c <_Dual_ported_memory_Information> 4e18e: 4eb9 0005 2b0c jsr 52b0c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 4e194: 2f02 movel %d2,%sp@- 4e196: 4879 0007 373c pea 7373c <_Dual_ported_memory_Information> 4e19c: 4eb9 0005 2d80 jsr 52d80 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 4e1a2: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4e1a8: 4fef 0010 lea %sp@(16),%sp switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 4e1ac: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e1ae: 242e fff8 movel %fp@(-8),%d2 4e1b2: 4e5e unlk %fp 4e1b4: 4e75 rts ... 0004e1b8 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 4e1b8: 4e56 fffc linkw %fp,#-4 4e1bc: 2f0a movel %a2,%sp@- 4e1be: 246e 0010 moveal %fp@(16),%a2 4e1c2: 2f02 movel %d2,%sp@- 4e1c4: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 4e1c8: 4a8a tstl %a2 4e1ca: 6604 bnes 4e1d0 4e1cc: 7009 moveq #9,%d0 4e1ce: 6042 bras 4e212 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4e1d0: 486e fffc pea %fp@(-4) 4e1d4: 2f2e 0008 movel %fp@(8),%sp@- 4e1d8: 4879 0007 373c pea 7373c <_Dual_ported_memory_Information> 4e1de: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e1e4: 4fef 000c lea %sp@(12),%sp 4e1e8: 2040 moveal %d0,%a0 4e1ea: 4aae fffc tstl %fp@(-4) 4e1ee: 6704 beqs 4e1f4 4e1f0: 7004 moveq #4,%d0 4e1f2: 601e bras 4e212 <== ALWAYS TAKEN case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 4e1f4: 2002 movel %d2,%d0 4e1f6: 90a8 0014 subl %a0@(20),%d0 if ( ending > the_port->length ) 4e1fa: b0a8 0018 cmpl %a0@(24),%d0 4e1fe: 6304 blss 4e204 *internal = external; 4e200: 2482 movel %d2,%a2@ 4e202: 6006 bras 4e20a <== ALWAYS TAKEN else *internal = _Addresses_Add_offset( the_port->internal_base, 4e204: d0a8 0010 addl %a0@(16),%d0 4e208: 2480 movel %d0,%a2@ ending ); _Thread_Enable_dispatch(); 4e20a: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> 4e210: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e212: 242e fff4 movel %fp@(-12),%d2 4e216: 246e fff8 moveal %fp@(-8),%a2 4e21a: 4e5e unlk %fp 4e21c: 4e75 rts ... 0004e248 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 4e248: 4e56 fffc linkw %fp,#-4 4e24c: 2f0a movel %a2,%sp@- 4e24e: 246e 0010 moveal %fp@(16),%a2 4e252: 2f02 movel %d2,%sp@- 4e254: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 4e258: 4a8a tstl %a2 4e25a: 6604 bnes 4e260 4e25c: 7009 moveq #9,%d0 4e25e: 6042 bras 4e2a2 <== ALWAYS TAKEN 4e260: 486e fffc pea %fp@(-4) 4e264: 2f2e 0008 movel %fp@(8),%sp@- 4e268: 4879 0007 373c pea 7373c <_Dual_ported_memory_Information> 4e26e: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e274: 4fef 000c lea %sp@(12),%sp 4e278: 2040 moveal %d0,%a0 4e27a: 4aae fffc tstl %fp@(-4) 4e27e: 6704 beqs 4e284 4e280: 7004 moveq #4,%d0 4e282: 601e bras 4e2a2 <== ALWAYS TAKEN case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 4e284: 2002 movel %d2,%d0 4e286: 90a8 0010 subl %a0@(16),%d0 if ( ending > the_port->length ) 4e28a: b0a8 0018 cmpl %a0@(24),%d0 4e28e: 6304 blss 4e294 *external = internal; 4e290: 2482 movel %d2,%a2@ 4e292: 6006 bras 4e29a <== ALWAYS TAKEN else *external = _Addresses_Add_offset( the_port->external_base, 4e294: d0a8 0014 addl %a0@(20),%d0 4e298: 2480 movel %d0,%a2@ ending ); _Thread_Enable_dispatch(); 4e29a: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> 4e2a0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e2a2: 242e fff4 movel %fp@(-12),%d2 4e2a6: 246e fff8 moveal %fp@(-8),%a2 4e2aa: 4e5e unlk %fp 4e2ac: 4e75 rts ... 0004ecac : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 4ecac: 4e56 fffc linkw %fp,#-4 4ecb0: 2f0b movel %a3,%sp@- 4ecb2: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 4ecb4: 486e fffc pea %fp@(-4) 4ecb8: 2f2e 0008 movel %fp@(8),%sp@- 4ecbc: 4879 0007 37ac pea 737ac <_Rate_monotonic_Information> 4ecc2: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4ecc8: 4fef 000c lea %sp@(12),%sp 4eccc: 2440 moveal %d0,%a2 4ecce: 4aae fffc tstl %fp@(-4) 4ecd2: 6704 beqs 4ecd8 4ecd4: 7004 moveq #4,%d0 4ecd6: 602c bras 4ed04 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 4ecd8: 2039 0007 399a movel 7399a <_Thread_Executing>,%d0 4ecde: 47f9 0005 376a lea 5376a <_Thread_Enable_dispatch>,%a3 4ece4: b0aa 0040 cmpl %a2@(64),%d0 4ece8: 6706 beqs 4ecf0 _Thread_Enable_dispatch(); 4ecea: 4e93 jsr %a3@ 4ecec: 7017 moveq #23,%d0 return RTEMS_NOT_OWNER_OF_RESOURCE; 4ecee: 6014 bras 4ed04 <== ALWAYS TAKEN } (void) _Watchdog_Remove( &the_period->Timer ); 4ecf0: 486a 0010 pea %a2@(16) 4ecf4: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 4ecfa: 42aa 0038 clrl %a2@(56) _Thread_Enable_dispatch(); 4ecfe: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 4ed00: 588f addql #4,%sp _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Thread_Enable_dispatch(); 4ed02: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ed04: 246e fff4 moveal %fp@(-12),%a2 4ed08: 266e fff8 moveal %fp@(-8),%a3 4ed0c: 4e5e unlk %fp 4ed0e: 4e75 rts 000458e8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 458e8: 4e56 fff0 linkw %fp,#-16 458ec: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 458f0: 242e 0008 movel %fp@(8),%d2 458f4: 286e 000c moveal %fp@(12),%a4 Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 458f8: 6606 bnes 45900 458fa: 7003 moveq #3,%d0 458fc: 6000 009e braw 4599c <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 45900: 4a8c tstl %a4 45902: 6606 bnes 4590a 45904: 7009 moveq #9,%d0 45906: 6000 0094 braw 4599c <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4590a: 2039 0005 d60c movel 5d60c <_Thread_Dispatch_disable_level>,%d0 45910: 5280 addql #1,%d0 45912: 23c0 0005 d60c movel %d0,5d60c <_Thread_Dispatch_disable_level> * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 45918: 4879 0005 d510 pea 5d510 <_Rate_monotonic_Information> 4591e: 47f9 0004 81ee lea 481ee <_Thread_Enable_dispatch>,%a3 45924: 4eb9 0004 74fc jsr 474fc <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 4592a: 588f addql #4,%sp 4592c: 2440 moveal %d0,%a2 4592e: 4a80 tstl %d0 45930: 6606 bnes 45938 _Thread_Enable_dispatch(); 45932: 4e93 jsr %a3@ 45934: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 45936: 6064 bras 4599c <== ALWAYS TAKEN } the_period->owner = _Thread_Executing; 45938: 41f9 0005 d6c6 lea 5d6c6 <_Thread_Executing>,%a0 4593e: 2550 0040 movel %a0@,%a2@(64) the_period->state = RATE_MONOTONIC_INACTIVE; 45942: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45946: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; 4594a: 42aa 002c clrl %a2@(44) the_watchdog->id = id; 4594e: 42aa 0030 clrl %a2@(48) the_watchdog->user_data = user_data; 45952: 42aa 0034 clrl %a2@(52) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 45956: 4878 0038 pea 38 4595a: 42a7 clrl %sp@- 4595c: 486a 0054 pea %a2@(84) 45960: 4eb9 0004 d8cc jsr 4d8cc #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45966: 202a 0008 movel %a2@(8),%d0 4596a: 4281 clrl %d1 4596c: 2079 0005 d528 moveal 5d528 <_Rate_monotonic_Information+0x18>,%a0 45972: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 45974: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45978: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) 4597c: 223c 7fff ffff movel #2147483647,%d1 45982: 2541 005c movel %d1,%a2@(92) 45986: 2541 0060 movel %d1,%a2@(96) 4598a: 2541 0074 movel %d1,%a2@(116) 4598e: 2541 0078 movel %d1,%a2@(120) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 45992: 2880 movel %d0,%a4@ _Thread_Enable_dispatch(); 45994: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 45996: 4fef 000c lea %sp@(12),%sp &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; _Thread_Enable_dispatch(); 4599a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4599c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 459a2: 4e5e unlk %fp 459a4: 4e75 rts ... 0004edd0 : */ rtems_status_code rtems_rate_monotonic_delete( rtems_id id ) { 4edd0: 4e56 fffc linkw %fp,#-4 4edd4: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 4edd6: 486e fffc pea %fp@(-4) 4edda: 2f2e 0008 movel %fp@(8),%sp@- 4edde: 4879 0007 37ac pea 737ac <_Rate_monotonic_Information> 4ede4: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4edea: 4fef 000c lea %sp@(12),%sp 4edee: 2440 moveal %d0,%a2 4edf0: 4aae fffc tstl %fp@(-4) 4edf4: 6704 beqs 4edfa 4edf6: 7004 moveq #4,%d0 4edf8: 6036 bras 4ee30 <== ALWAYS TAKEN case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); 4edfa: 2f00 movel %d0,%sp@- 4edfc: 4879 0007 37ac pea 737ac <_Rate_monotonic_Information> 4ee02: 4eb9 0005 2b0c jsr 52b0c <_Objects_Close> (void) _Watchdog_Remove( &the_period->Timer ); 4ee08: 486a 0010 pea %a2@(16) 4ee0c: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 4ee12: 42aa 0038 clrl %a2@(56) */ RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); 4ee16: 2f0a movel %a2,%sp@- 4ee18: 4879 0007 37ac pea 737ac <_Rate_monotonic_Information> 4ee1e: 4eb9 0005 2d80 jsr 52d80 <_Objects_Free> _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); 4ee24: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4ee2a: 4fef 0014 lea %sp@(20),%sp case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); 4ee2e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ee30: 246e fff8 moveal %fp@(-8),%a2 4ee34: 4e5e unlk %fp 4ee36: 4e75 rts 000704f0 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 704f0: 4e56 fffc linkw %fp,#-4 704f4: 2f0a movel %a2,%sp@- 704f6: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) 704fa: 4a8a tstl %a2 704fc: 6606 bnes 70504 704fe: 7009 moveq #9,%d0 70500: 6000 0098 braw 7059a <== ALWAYS TAKEN 70504: 486e fffc pea %fp@(-4) 70508: 2f2e 0008 movel %fp@(8),%sp@- 7050c: 4879 0009 abf2 pea 9abf2 <_Rate_monotonic_Information> 70512: 4eb9 0004 ba10 jsr 4ba10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 70518: 4fef 000c lea %sp@(12),%sp 7051c: 2040 moveal %d0,%a0 7051e: 4aae fffc tstl %fp@(-4) 70522: 6704 beqs 70528 70524: 7004 moveq #4,%d0 70526: 6072 bras 7059a case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; 70528: 24a8 0054 movel %a0@(84),%a2@ dst->missed_count = src->missed_count; 7052c: 2568 0058 0004 movel %a0@(88),%a2@(4) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time ); 70532: 2028 005c movel %a0@(92),%d0 70536: 2228 0060 movel %a0@(96),%d1 7053a: 2540 0008 movel %d0,%a2@(8) 7053e: 2541 000c movel %d1,%a2@(12) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); 70542: 2028 0064 movel %a0@(100),%d0 70546: 2228 0068 movel %a0@(104),%d1 7054a: 2540 0010 movel %d0,%a2@(16) 7054e: 2541 0014 movel %d1,%a2@(20) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); 70552: 2028 006c movel %a0@(108),%d0 70556: 2228 0070 movel %a0@(112),%d1 7055a: 2540 0018 movel %d0,%a2@(24) 7055e: 2541 001c movel %d1,%a2@(28) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); 70562: 2028 0074 movel %a0@(116),%d0 70566: 2228 0078 movel %a0@(120),%d1 7056a: 2540 0020 movel %d0,%a2@(32) 7056e: 2541 0024 movel %d1,%a2@(36) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); 70572: 2028 007c movel %a0@(124),%d0 70576: 2228 0080 movel %a0@(128),%d1 7057a: 2540 0028 movel %d0,%a2@(40) 7057e: 2541 002c movel %d1,%a2@(44) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); 70582: 2028 0084 movel %a0@(132),%d0 70586: 2228 0088 movel %a0@(136),%d1 7058a: 2540 0030 movel %d0,%a2@(48) 7058e: 2541 0034 movel %d1,%a2@(52) dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); 70592: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> 70598: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7059a: 246e fff8 moveal %fp@(-8),%a2 7059e: 4e5e unlk %fp 705a0: 4e75 rts ... 000705a4 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 705a4: 4e56 ffec linkw %fp,#-20 705a8: 2f0a movel %a2,%sp@- 705aa: 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 ) 705ae: 4a8a tstl %a2 705b0: 6606 bnes 705b8 705b2: 7009 moveq #9,%d0 705b4: 6000 0094 braw 7064a <== ALWAYS TAKEN 705b8: 486e fffc pea %fp@(-4) 705bc: 2f2e 0008 movel %fp@(8),%sp@- 705c0: 4879 0009 abf2 pea 9abf2 <_Rate_monotonic_Information> 705c6: 4eb9 0004 ba10 jsr 4ba10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 705cc: 4fef 000c lea %sp@(12),%sp 705d0: 2040 moveal %d0,%a0 705d2: 4aae fffc tstl %fp@(-4) 705d6: 6704 beqs 705dc 705d8: 7004 moveq #4,%d0 705da: 606e bras 7064a <== ALWAYS TAKEN case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 705dc: 2268 0040 moveal %a0@(64),%a1 status->state = the_period->state; 705e0: 2028 0038 movel %a0@(56),%d0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 705e4: 24a9 0008 movel %a1@(8),%a2@ status->state = the_period->state; 705e8: 2540 0004 movel %d0,%a2@(4) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 705ec: 6612 bnes 70600 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); _Timespec_Set_to_zero( &status->executed_since_last_period ); 705ee: 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 ); 705f2: 42aa 0008 clrl %a2@(8) 705f6: 42aa 000c clrl %a2@(12) _Timespec_Set_to_zero( &status->executed_since_last_period ); 705fa: 42aa 0010 clrl %a2@(16) 705fe: 6042 bras 70642 <== ALWAYS TAKEN /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 70600: 486e fff4 pea %fp@(-12) 70604: 486e ffec pea %fp@(-20) 70608: 2f08 movel %a0,%sp@- 7060a: 4eb9 0007 06cc jsr 706cc <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 70610: 4fef 000c lea %sp@(12),%sp 70614: 4a00 tstb %d0 70616: 660a bnes 70622 _Thread_Enable_dispatch(); 70618: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> 7061e: 700b moveq #11,%d0 return RTEMS_NOT_DEFINED; 70620: 6028 bras 7064a <== ALWAYS TAKEN #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 70622: 202e fff4 movel %fp@(-12),%d0 70626: 222e fff8 movel %fp@(-8),%d1 7062a: 2540 0010 movel %d0,%a2@(16) 7062e: 2541 0014 movel %d1,%a2@(20) _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 70632: 202e ffec movel %fp@(-20),%d0 70636: 222e fff0 movel %fp@(-16),%d1 7063a: 2540 0008 movel %d0,%a2@(8) 7063e: 2541 000c movel %d1,%a2@(12) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 70642: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> 70648: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7064a: 246e ffe8 moveal %fp@(-24),%a2 7064e: 4e5e unlk %fp 70650: 4e75 rts ... 00070868 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 70868: 4e56 ffec linkw %fp,#-20 7086c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 70870: 486e fffc pea %fp@(-4) 70874: 262e 0008 movel %fp@(8),%d3 70878: 2f03 movel %d3,%sp@- 7087a: 4879 0009 abf2 pea 9abf2 <_Rate_monotonic_Information> 70880: 242e 000c movel %fp@(12),%d2 70884: 4eb9 0004 ba10 jsr 4ba10 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7088a: 4fef 000c lea %sp@(12),%sp 7088e: 2440 moveal %d0,%a2 70890: 4aae fffc tstl %fp@(-4) 70894: 6600 0138 bnew 709ce case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 70898: 2039 0009 a882 movel 9a882 <_Thread_Executing>,%d0 7089e: b0aa 0040 cmpl %a2@(64),%d0 708a2: 670c beqs 708b0 _Thread_Enable_dispatch(); 708a4: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> 708aa: 7817 moveq #23,%d4 return RTEMS_NOT_OWNER_OF_RESOURCE; 708ac: 6000 0122 braw 709d0 <== ALWAYS TAKEN } if ( length == RTEMS_PERIOD_STATUS ) { 708b0: 4a82 tstl %d2 708b2: 6622 bnes 708d6 switch ( the_period->state ) { 708b4: 202a 0038 movel %a2@(56),%d0 708b8: 7204 moveq #4,%d1 708ba: b280 cmpl %d0,%d1 708bc: 6404 bccs 708c2 <== NEVER TAKEN 708be: 4284 clrl %d4 <== NOT EXECUTED 708c0: 600a bras 708cc <== NOT EXECUTED 708c2: 41f9 0009 487c lea 9487c ,%a0 708c8: 2830 0c00 movel %a0@(00000000,%d0:l:4),%d4 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 708cc: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> return( return_value ); 708d2: 6000 00fc braw 709d0 <== ALWAYS TAKEN } _ISR_Disable( level ); 708d6: 203c 0000 0700 movel #1792,%d0 708dc: 40c4 movew %sr,%d4 708de: 8084 orl %d4,%d0 708e0: 46c0 movew %d0,%sr switch ( the_period->state ) { 708e2: 202a 0038 movel %a2@(56),%d0 708e6: 7202 moveq #2,%d1 708e8: b280 cmpl %d0,%d1 708ea: 6740 beqs 7092c 708ec: 123c 0004 moveb #4,%d1 708f0: b280 cmpl %d0,%d1 708f2: 6700 00a4 beqw 70998 708f6: 4a80 tstl %d0 708f8: 6600 00d4 bnew 709ce <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 708fc: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 708fe: 2f0a movel %a2,%sp@- ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 70900: 4284 clrl %d4 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 70902: 4eb9 0007 0654 jsr 70654 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 70908: 203c 0007 09dc movel #461276,%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7090e: 7202 moveq #2,%d1 70910: 2540 002c movel %d0,%a2@(44) the_watchdog->id = id; 70914: 2543 0030 movel %d3,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 70918: 2542 001c movel %d2,%a2@(28) 7091c: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 70920: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 70924: 42aa 0034 clrl %a2@(52) 70928: 6000 0084 braw 709ae <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7092c: 2f0a movel %a2,%sp@- 7092e: 4eb9 0007 0774 jsr 70774 <_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; 70934: 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; 70938: 7401 moveq #1,%d2 7093a: 2542 0038 movel %d2,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7093e: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 70940: 2079 0009 a882 moveal 9a882 <_Thread_Executing>,%a0 70946: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7094c: 4878 4000 pea 4000 70950: 2f08 movel %a0,%sp@- 70952: 4eb9 0004 ca9c jsr 4ca9c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 70958: 203c 0000 0700 movel #1792,%d0 7095e: 40c1 movew %sr,%d1 70960: 8081 orl %d1,%d0 70962: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 70964: 143c 0002 moveb #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 70968: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7096c: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 70970: 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 ) 70972: 7203 moveq #3,%d1 70974: 4fef 000c lea %sp@(12),%sp 70978: b280 cmpl %d0,%d1 7097a: 6612 bnes 7098e _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7097c: 4878 4000 pea 4000 70980: 2f39 0009 a882 movel 9a882 <_Thread_Executing>,%sp@- 70986: 4eb9 0004 beec jsr 4beec <_Thread_Clear_state> 7098c: 508f addql #8,%sp _Thread_Enable_dispatch(); 7098e: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> 70994: 4284 clrl %d4 return RTEMS_SUCCESSFUL; 70996: 6038 bras 709d0 <== ALWAYS TAKEN case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 70998: 2f0a movel %a2,%sp@- 7099a: 4eb9 0007 0774 jsr 70774 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 709a0: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 709a2: 7002 moveq #2,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 709a4: 7806 moveq #6,%d4 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 709a6: 2542 001c movel %d2,%a2@(28) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 709aa: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; 709ae: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 709b2: 486a 0010 pea %a2@(16) 709b6: 4879 0009 a8a0 pea 9a8a0 <_Watchdog_Ticks_chain> 709bc: 4eb9 0004 d1b0 jsr 4d1b0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 709c2: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 709c8: 4fef 000c lea %sp@(12),%sp 709cc: 6002 bras 709d0 <== ALWAYS TAKEN 709ce: 7804 moveq #4,%d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 709d0: 2004 movel %d4,%d0 709d2: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 709d8: 4e5e unlk %fp 709da: 4e75 rts 0006251c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 6251c: 4e56 ff78 linkw %fp,#-136 62520: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 62524: 242e 0008 movel %fp@(8),%d2 62528: 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 ) 6252c: 4a8a tstl %a2 6252e: 6700 0158 beqw 62688 <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 62532: 4879 0009 1508 pea 91508 <_TOD_Days_per_month+0x68> #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 62538: 2a0e movel %fp,%d5 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 ); 6253a: 280e movel %fp,%d4 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 ); 6253c: 4bf9 0007 05a4 lea 705a4 ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 62542: 5b85 subql #5,%d5 62544: 49f9 0004 a0bc lea 4a0bc ,%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 ); 6254a: 0684 ffff fff2 addil #-14,%d4 62550: 47f9 0006 3abc lea 63abc <_Timespec_Divide_by_integer>,%a3 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); 62556: 2f02 movel %d2,%sp@- 62558: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 6255a: 4879 0009 1526 pea 91526 <_TOD_Days_per_month+0x86> 62560: 2f02 movel %d2,%sp@- 62562: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 62564: 4879 0009 1548 pea 91548 <_TOD_Days_per_month+0xa8> 6256a: 2f02 movel %d2,%sp@- 6256c: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 6256e: 4879 0009 156b pea 9156b <_TOD_Days_per_month+0xcb> 62574: 2f02 movel %d2,%sp@- 62576: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 62578: 4fef 001c lea %sp@(28),%sp 6257c: 2ebc 0009 15b6 movel #595382,%sp@ 62582: 2f02 movel %d2,%sp@- 62584: 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 ; 62586: 2639 0009 abf8 movel 9abf8 <_Rate_monotonic_Information+0x6>,%d3 6258c: 508f addql #8,%sp 6258e: 6000 00ee braw 6267e <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 62592: 486e ffa2 pea %fp@(-94) 62596: 2f03 movel %d3,%sp@- 62598: 4eb9 0007 04f0 jsr 704f0 if ( status != RTEMS_SUCCESSFUL ) 6259e: 508f addql #8,%sp 625a0: 4a80 tstl %d0 625a2: 6600 00d8 bnew 6267c continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 625a6: 486e ffda pea %fp@(-38) 625aa: 2f03 movel %d3,%sp@- 625ac: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 625ae: 2f05 movel %d5,%sp@- 625b0: 4878 0005 pea 5 625b4: 2f2e ffda movel %fp@(-38),%sp@- 625b8: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 625ba: 2f2e ffa6 movel %fp@(-90),%sp@- 625be: 2f2e ffa2 movel %fp@(-94),%sp@- 625c2: 2f05 movel %d5,%sp@- 625c4: 2f03 movel %d3,%sp@- 625c6: 4879 0009 1602 pea 91602 <_TOD_Days_per_month+0x162> 625cc: 2f02 movel %d2,%sp@- 625ce: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 625d0: 202e ffa2 movel %fp@(-94),%d0 625d4: 4fef 002c lea %sp@(44),%sp 625d8: 6610 bnes 625ea (*print)( context, "\n" ); 625da: 4879 0009 2e22 pea 92e22 <__FUNCTION__.5937+0x5d> 625e0: 2f02 movel %d2,%sp@- 625e2: 4e92 jsr %a2@ continue; 625e4: 508f addql #8,%sp 625e6: 6000 0094 braw 6267c <== ALWAYS TAKEN 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 ); 625ea: 2f04 movel %d4,%sp@- (*print)( context, 625ec: 2e3c 0000 03e8 movel #1000,%d7 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 ); 625f2: 2f00 movel %d0,%sp@- 625f4: 486e ffba pea %fp@(-70) 625f8: 4e93 jsr %a3@ (*print)( context, 625fa: 202e fff6 movel %fp@(-10),%d0 625fe: 223c 0000 03e8 movel #1000,%d1 62604: 4c41 0800 remsl %d1,%d0,%d0 62608: 222e ffb6 movel %fp@(-74),%d1 6260c: 2f00 movel %d0,%sp@- 6260e: 2f2e fff2 movel %fp@(-14),%sp@- 62612: 202e ffae movel %fp@(-82),%d0 62616: 4c47 1801 remsl %d7,%d1,%d1 6261a: 4c47 0800 remsl %d7,%d0,%d0 6261e: 2f01 movel %d1,%sp@- 62620: 2f2e ffb2 movel %fp@(-78),%sp@- 62624: 2f00 movel %d0,%sp@- 62626: 2f2e ffaa movel %fp@(-86),%sp@- 6262a: 4879 0009 1619 pea 91619 <_TOD_Days_per_month+0x179> 62630: 2f02 movel %d2,%sp@- 62632: 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); 62634: 4fef 0028 lea %sp@(40),%sp 62638: 2e84 movel %d4,%sp@ 6263a: 2f2e ffa2 movel %fp@(-94),%sp@- 6263e: 486e ffd2 pea %fp@(-46) 62642: 4e93 jsr %a3@ (*print)( context, 62644: 202e fff6 movel %fp@(-10),%d0 62648: 4c47 0800 remsl %d7,%d0,%d0 6264c: 222e ffce movel %fp@(-50),%d1 62650: 2f00 movel %d0,%sp@- 62652: 2f2e fff2 movel %fp@(-14),%sp@- 62656: 4c47 1801 remsl %d7,%d1,%d1 6265a: 202e ffc6 movel %fp@(-58),%d0 6265e: 2f01 movel %d1,%sp@- 62660: 2f2e ffca movel %fp@(-54),%sp@- 62664: 4c47 0800 remsl %d7,%d0,%d0 62668: 2f00 movel %d0,%sp@- 6266a: 2f2e ffc2 movel %fp@(-62),%sp@- 6266e: 4879 0009 1638 pea 91638 <_TOD_Days_per_month+0x198> 62674: 2f02 movel %d2,%sp@- 62676: 4e92 jsr %a2@ 62678: 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 ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 6267c: 5283 addql #1,%d3 /* * 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 ; 6267e: b6b9 0009 abfc cmpl 9abfc <_Rate_monotonic_Information+0xa>,%d3 62684: 6300 ff0c blsw 62592 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 62688: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 6268e: 4e5e unlk %fp 62690: 4e75 rts 000626ac : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 626ac: 4e56 0000 linkw %fp,#0 626b0: 2039 0009 a7c8 movel 9a7c8 <_Thread_Dispatch_disable_level>,%d0 626b6: 5280 addql #1,%d0 626b8: 2f0a movel %a2,%sp@- 626ba: 23c0 0009 a7c8 movel %d0,9a7c8 <_Thread_Dispatch_disable_level> 626c0: 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 ; 626c2: 2439 0009 abf8 movel 9abf8 <_Rate_monotonic_Information+0x6>,%d2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 626c8: 45f9 0006 26f0 lea 626f0 ,%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 ; 626ce: 6008 bras 626d8 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 626d0: 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++ ) { 626d2: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 626d4: 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 ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 626d6: 588f addql #4,%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 ; 626d8: b4b9 0009 abfc cmpl 9abfc <_Rate_monotonic_Information+0xa>,%d2 626de: 63f0 blss 626d0 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 626e0: 242e fff8 movel %fp@(-8),%d2 626e4: 246e fffc moveal %fp@(-4),%a2 626e8: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 626ea: 4ef9 0004 c2a6 jmp 4c2a6 <_Thread_Enable_dispatch> 000626f0 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 626f0: 4e56 fffc linkw %fp,#-4 626f4: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 626f6: 486e fffc pea %fp@(-4) 626fa: 2f2e 0008 movel %fp@(8),%sp@- 626fe: 4879 0009 abf2 pea 9abf2 <_Rate_monotonic_Information> 62704: 4eb9 0004 ba10 jsr 4ba10 <_Objects_Get> Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 6270a: 4fef 000c lea %sp@(12),%sp 6270e: 2440 moveal %d0,%a2 62710: 4aae fffc tstl %fp@(-4) 62714: 6704 beqs 6271a 62716: 7004 moveq #4,%d0 62718: 6032 bras 6274c <== ALWAYS TAKEN case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 6271a: 4878 0038 pea 38 6271e: 42a7 clrl %sp@- 62720: 486a 0054 pea %a2@(84) 62724: 4eb9 0007 8028 jsr 78028 6272a: 203c 7fff ffff movel #2147483647,%d0 62730: 2540 0078 movel %d0,%a2@(120) 62734: 2540 005c movel %d0,%a2@(92) 62738: 2540 0060 movel %d0,%a2@(96) 6273c: 2540 0074 movel %d0,%a2@(116) _Thread_Enable_dispatch(); 62740: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 62746: 4fef 000c lea %sp@(12),%sp the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); _Thread_Enable_dispatch(); 6274a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6274c: 246e fff8 moveal %fp@(-8),%a2 62750: 4e5e unlk %fp 62752: 4e75 rts 0004f414 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 4f414: 4e56 ffe4 linkw %fp,#-28 4f418: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4f41c: 262e 0008 movel %fp@(8),%d3 4f420: 242e 000c movel %fp@(12),%d2 4f424: 2c2e 0010 movel %fp@(16),%d6 4f428: 2a2e 0014 movel %fp@(20),%d5 4f42c: 282e 0018 movel %fp@(24),%d4 4f430: 266e 001c moveal %fp@(28),%a3 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 4f434: 4a83 tstl %d3 4f436: 6606 bnes 4f43e 4f438: 7403 moveq #3,%d2 4f43a: 6000 00c8 braw 4f504 <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !starting_address ) 4f43e: 4a82 tstl %d2 4f440: 6700 00c0 beqw 4f502 return RTEMS_INVALID_ADDRESS; if ( !id ) 4f444: 4a8b tstl %a3 4f446: 6700 00ba beqw 4f502 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 4f44a: 7003 moveq #3,%d0 4f44c: c082 andl %d2,%d0 4f44e: 6600 00b2 bnew 4f502 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4f452: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f458: 4eb9 0005 1790 jsr 51790 <_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 ); 4f45e: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f464: 4eb9 0005 2a8c jsr 52a8c <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 4f46a: 508f addql #8,%sp 4f46c: 2440 moveal %d0,%a2 4f46e: 4a80 tstl %d0 4f470: 6604 bnes 4f476 4f472: 7405 moveq #5,%d2 4f474: 607c bras 4f4f2 <== ALWAYS TAKEN return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 4f476: 2f05 movel %d5,%sp@- 4f478: 2f06 movel %d6,%sp@- 4f47a: 2f02 movel %d2,%sp@- 4f47c: 486a 0068 pea %a2@(104) 4f480: 4eb9 0005 25a8 jsr 525a8 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 4f486: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 4f48a: 2540 005c movel %d0,%a2@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 4f48e: 6614 bnes 4f4a4 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 4f490: 2f0a movel %a2,%sp@- 4f492: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f498: 7408 moveq #8,%d2 4f49a: 4eb9 0005 2d80 jsr 52d80 <_Objects_Free> 4f4a0: 508f addql #8,%sp 4f4a2: 604e bras 4f4f2 <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 4f4a4: 2542 0050 movel %d2,%a2@(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( 4f4a8: 2004 movel %d4,%d0 4f4aa: 7201 moveq #1,%d1 4f4ac: e488 lsrl #2,%d0 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 4f4ae: 4282 clrl %d2 } else { the_region->starting_address = starting_address; the_region->length = length; 4f4b0: 2546 0054 movel %d6,%a2@(84) the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 4f4b4: c280 andl %d0,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 4f4b6: 2545 0058 movel %d5,%a2@(88) the_region->attribute_set = attribute_set; 4f4ba: 2544 0060 movel %d4,%a2@(96) the_region->number_of_used_blocks = 0; 4f4be: 42aa 0064 clrl %a2@(100) _Thread_queue_Initialize( 4f4c2: 4878 0006 pea 6 4f4c6: 4878 0040 pea 40 4f4ca: 2f01 movel %d1,%sp@- 4f4cc: 486a 0010 pea %a2@(16) 4f4d0: 4eb9 0005 3e2c jsr 53e2c <_Thread_queue_Initialize> 4f4d6: 202a 0008 movel %a2@(8),%d0 4f4da: 4281 clrl %d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 4f4dc: 4fef 0010 lea %sp@(16),%sp 4f4e0: 3200 movew %d0,%d1 4f4e2: 2079 0007 37fc moveal 737fc <_Region_Information+0x18>,%a0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4f4e8: 2543 000c movel %d3,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4f4ec: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) 4f4f0: 2680 movel %d0,%a3@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 4f4f2: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f4f8: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; 4f4fe: 588f addql #4,%sp 4f500: 6002 bras 4f504 <== ALWAYS TAKEN 4f502: 7409 moveq #9,%d2 } 4f504: 2002 movel %d2,%d0 4f506: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4f50c: 4e5e unlk %fp 4f50e: 4e75 rts 0004f510 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 4f510: 4e56 fffc linkw %fp,#-4 4f514: 2f0a movel %a2,%sp@- 4f516: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 4f518: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f51e: 4eb9 0005 1790 jsr 51790 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4f524: 486e fffc pea %fp@(-4) 4f528: 2f2e 0008 movel %fp@(8),%sp@- 4f52c: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f532: 4eb9 0005 2ed8 jsr 52ed8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f538: 4fef 0010 lea %sp@(16),%sp 4f53c: 2440 moveal %d0,%a2 4f53e: 4aae fffc tstl %fp@(-4) 4f542: 6704 beqs 4f548 4f544: 7404 moveq #4,%d2 4f546: 602c bras 4f574 <== ALWAYS TAKEN case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 4f548: 4aaa 0064 tstl %a2@(100) 4f54c: 6704 beqs 4f552 4f54e: 740c moveq #12,%d2 4f550: 6022 bras 4f574 <== ALWAYS TAKEN return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 4f552: 2f00 movel %d0,%sp@- 4f554: 4879 0007 37e4 pea 737e4 <_Region_Information> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 4f55a: 4282 clrl %d2 4f55c: 4eb9 0005 2b0c jsr 52b0c <_Objects_Close> 4f562: 2f0a movel %a2,%sp@- 4f564: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f56a: 4eb9 0005 2d80 jsr 52d80 <_Objects_Free> 4f570: 4fef 0010 lea %sp@(16),%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f574: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f57a: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; } 4f580: 246e fff8 moveal %fp@(-8),%a2 4f584: 2002 movel %d2,%d0 4f586: 242e fff4 movel %fp@(-12),%d2 4f58a: 4e5e unlk %fp 4f58c: 4e75 rts ... 0004f590 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 4f590: 4e56 fff8 linkw %fp,#-8 4f594: 2f0a movel %a2,%sp@- 4f596: 2f02 movel %d2,%sp@- 4f598: 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 ) 4f59c: 6606 bnes 4f5a4 4f59e: 143c 0009 moveb #9,%d2 4f5a2: 6076 bras 4f61a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4f5a4: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f5aa: 4eb9 0005 1790 jsr 51790 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4f5b0: 486e fff8 pea %fp@(-8) 4f5b4: 2f2e 0008 movel %fp@(8),%sp@- 4f5b8: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f5be: 4eb9 0005 2ed8 jsr 52ed8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f5c4: 4fef 0010 lea %sp@(16),%sp 4f5c8: 2440 moveal %d0,%a2 4f5ca: 4aae fff8 tstl %fp@(-8) 4f5ce: 6704 beqs 4f5d4 4f5d0: 7404 moveq #4,%d2 4f5d2: 6038 bras 4f60c <== ALWAYS TAKEN case OBJECTS_LOCAL: heap_status = _Heap_Extend( 4f5d4: 486e fffc pea %fp@(-4) 4f5d8: 2f2e 0010 movel %fp@(16),%sp@- 4f5dc: 2f02 movel %d2,%sp@- 4f5de: 486a 0068 pea %a2@(104) 4f5e2: 4eb9 0005 22ec jsr 522ec <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 4f5e8: 4fef 0010 lea %sp@(16),%sp 4f5ec: 4a80 tstl %d0 4f5ee: 6610 bnes 4f600 the_region->length += amount_extended; 4f5f0: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 4f5f4: d1aa 005c addl %d0,%a2@(92) 4f5f8: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 4f5fa: d1aa 0054 addl %d0,%a2@(84) 4f5fe: 600c bras 4f60c <== ALWAYS TAKEN the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 4f600: 7201 moveq #1,%d1 4f602: b280 cmpl %d0,%d1 4f604: 6704 beqs 4f60a 4f606: 7418 moveq #24,%d2 4f608: 6002 bras 4f60c <== ALWAYS TAKEN 4f60a: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f60c: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f612: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; 4f618: 588f addql #4,%sp } 4f61a: 2002 movel %d2,%d0 4f61c: 242e fff0 movel %fp@(-16),%d2 4f620: 246e fff4 moveal %fp@(-12),%a2 4f624: 4e5e unlk %fp 4f626: 4e75 rts 0004f628 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 4f628: 4e56 fffc linkw %fp,#-4 4f62c: 2f0a movel %a2,%sp@- 4f62e: 246e 000c moveal %fp@(12),%a2 4f632: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 4f634: 4a8a tstl %a2 4f636: 6604 bnes 4f63c 4f638: 7409 moveq #9,%d2 4f63a: 605a bras 4f696 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f63c: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f642: 4eb9 0005 1790 jsr 51790 <_API_Mutex_Lock> 4f648: 486e fffc pea %fp@(-4) 4f64c: 2f2e 0008 movel %fp@(8),%sp@- 4f650: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f656: 4eb9 0005 2ed8 jsr 52ed8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f65c: 4fef 0010 lea %sp@(16),%sp 4f660: 4aae fffc tstl %fp@(-4) 4f664: 6704 beqs 4f66a 4f666: 7404 moveq #4,%d2 4f668: 601e bras 4f688 <== ALWAYS TAKEN 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 ); 4f66a: 2f0a movel %a2,%sp@- 4f66c: 2040 moveal %d0,%a0 4f66e: 4868 0068 pea %a0@(104) 4f672: 4282 clrl %d2 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 4f674: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 4f678: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 4f67c: 42aa 0010 clrl %a2@(16) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 4f680: 4eb9 0005 24f8 jsr 524f8 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 4f686: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f688: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f68e: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; 4f694: 588f addql #4,%sp } 4f696: 2002 movel %d2,%d0 4f698: 242e fff4 movel %fp@(-12),%d2 4f69c: 246e fff8 moveal %fp@(-8),%a2 4f6a0: 4e5e unlk %fp 4f6a2: 4e75 rts 0004f6a4 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 4f6a4: 4e56 fffc linkw %fp,#-4 4f6a8: 2f02 movel %d2,%sp@- 4f6aa: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 4f6ae: 6606 bnes 4f6b6 4f6b0: 143c 0009 moveb #9,%d2 4f6b4: 604e bras 4f704 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f6b6: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f6bc: 4eb9 0005 1790 jsr 51790 <_API_Mutex_Lock> 4f6c2: 486e fffc pea %fp@(-4) 4f6c6: 2f2e 0008 movel %fp@(8),%sp@- 4f6ca: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f6d0: 4eb9 0005 2ed8 jsr 52ed8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f6d6: 4fef 0010 lea %sp@(16),%sp 4f6da: 4aae fffc tstl %fp@(-4) 4f6de: 6704 beqs 4f6e4 4f6e0: 7404 moveq #4,%d2 4f6e2: 6012 bras 4f6f6 <== ALWAYS TAKEN case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 4f6e4: 2f02 movel %d2,%sp@- 4f6e6: 2040 moveal %d0,%a0 4f6e8: 4868 0068 pea %a0@(104) 4f6ec: 4282 clrl %d2 4f6ee: 4eb9 0005 253c jsr 5253c <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 4f6f4: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f6f6: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f6fc: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; 4f702: 588f addql #4,%sp } 4f704: 2002 movel %d2,%d0 4f706: 242e fff8 movel %fp@(-8),%d2 4f70a: 4e5e unlk %fp 4f70c: 4e75 rts ... 0004f710 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 4f710: 4e56 ffe8 linkw %fp,#-24 4f714: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4f718: 262e 0008 movel %fp@(8),%d3 4f71c: 242e 000c movel %fp@(12),%d2 4f720: 286e 0018 moveal %fp@(24),%a4 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 4f724: 4a8c tstl %a4 4f726: 6606 bnes 4f72e 4f728: 7409 moveq #9,%d2 4f72a: 6000 00e8 braw 4f814 return RTEMS_INVALID_ADDRESS; *segment = NULL; 4f72e: 4294 clrl %a4@ if ( size == 0 ) 4f730: 4a82 tstl %d2 4f732: 6608 bnes 4f73c 4f734: 143c 0008 moveb #8,%d2 4f738: 6000 00da braw 4f814 return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 4f73c: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f742: 4eb9 0005 1790 jsr 51790 <_API_Mutex_Lock> 4f748: 486e fffc pea %fp@(-4) 4f74c: 2f03 movel %d3,%sp@- 4f74e: 4879 0007 37e4 pea 737e4 <_Region_Information> executing = _Thread_Executing; 4f754: 2679 0007 399a moveal 7399a <_Thread_Executing>,%a3 4f75a: 4eb9 0005 2ed8 jsr 52ed8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f760: 4fef 0010 lea %sp@(16),%sp 4f764: 2440 moveal %d0,%a2 4f766: 4aae fffc tstl %fp@(-4) 4f76a: 6600 0098 bnew 4f804 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 4f76e: b4aa 005c cmpl %a2@(92),%d2 4f772: 6306 blss 4f77a 4f774: 7408 moveq #8,%d2 4f776: 6000 008e braw 4f806 * @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 ); 4f77a: 42a7 clrl %sp@- 4f77c: 42a7 clrl %sp@- 4f77e: 2f02 movel %d2,%sp@- 4f780: 486a 0068 pea %a2@(104) 4f784: 4eb9 0005 2198 jsr 52198 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 4f78a: 4fef 0010 lea %sp@(16),%sp 4f78e: 4a80 tstl %d0 4f790: 670a beqs 4f79c the_region->number_of_used_blocks += 1; 4f792: 52aa 0064 addql #1,%a2@(100) *segment = the_segment; 4f796: 4282 clrl %d2 4f798: 2880 movel %d0,%a4@ 4f79a: 606a bras 4f806 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 4f79c: 202e 0010 movel %fp@(16),%d0 4f7a0: 0800 0000 btst #0,%d0 4f7a4: 6704 beqs 4f7aa 4f7a6: 740d moveq #13,%d2 4f7a8: 605c bras 4f806 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4f7aa: 2039 0007 38e0 movel 738e0 <_Thread_Dispatch_disable_level>,%d0 4f7b0: 5280 addql #1,%d0 4f7b2: 23c0 0007 38e0 movel %d0,738e0 <_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(); 4f7b8: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f7be: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 4f7c4: 200a movel %a2,%d0 4f7c6: 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; 4f7cc: 7201 moveq #1,%d1 executing->Wait.id = id; executing->Wait.count = size; 4f7ce: 2742 0024 movel %d2,%a3@(36) 4f7d2: 2541 0040 movel %d1,%a2@(64) * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; 4f7d6: 2740 0044 movel %d0,%a3@(68) executing->Wait.id = id; 4f7da: 2743 0020 movel %d3,%a3@(32) executing->Wait.count = size; executing->Wait.return_argument = segment; 4f7de: 274c 0028 movel %a4,%a3@(40) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 4f7e2: 4879 0005 3ee8 pea 53ee8 <_Thread_queue_Timeout> 4f7e8: 2f2e 0014 movel %fp@(20),%sp@- 4f7ec: 2f00 movel %d0,%sp@- 4f7ee: 4eb9 0005 3bfc jsr 53bfc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 4f7f4: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 4f7fa: 242b 0034 movel %a3@(52),%d2 4f7fe: 4fef 0010 lea %sp@(16),%sp 4f802: 6010 bras 4f814 <== ALWAYS TAKEN 4f804: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f806: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f80c: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; 4f812: 588f addql #4,%sp } 4f814: 2002 movel %d2,%d0 4f816: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4f81c: 4e5e unlk %fp 4f81e: 4e75 rts 0004f820 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 4f820: 4e56 fffc linkw %fp,#-4 4f824: 2f03 movel %d3,%sp@- 4f826: 262e 0010 movel %fp@(16),%d3 4f82a: 2f02 movel %d2,%sp@- 4f82c: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 4f830: 6766 beqs 4f898 return RTEMS_INVALID_ADDRESS; if ( !size ) 4f832: 4a83 tstl %d3 4f834: 6762 beqs 4f898 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f836: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f83c: 4eb9 0005 1790 jsr 51790 <_API_Mutex_Lock> 4f842: 486e fffc pea %fp@(-4) 4f846: 2f2e 0008 movel %fp@(8),%sp@- 4f84a: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f850: 4eb9 0005 2ed8 jsr 52ed8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f856: 222e fffc movel %fp@(-4),%d1 4f85a: 4fef 0010 lea %sp@(16),%sp 4f85e: 670a beqs 4f86a 4f860: 7001 moveq #1,%d0 4f862: b081 cmpl %d1,%d0 4f864: 6620 bnes 4f886 <== ALWAYS TAKEN 4f866: 7404 moveq #4,%d2 4f868: 601e bras 4f888 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 4f86a: 2f03 movel %d3,%sp@- 4f86c: 2040 moveal %d0,%a0 4f86e: 2f02 movel %d2,%sp@- 4f870: 4868 0068 pea %a0@(104) 4f874: 4eb9 0005 2958 jsr 52958 <_Heap_Size_of_alloc_area> 4f87a: 4fef 000c lea %sp@(12),%sp 4f87e: 4a00 tstb %d0 4f880: 6604 bnes 4f886 <== NEVER TAKEN 4f882: 7409 moveq #9,%d2 <== NOT EXECUTED 4f884: 6002 bras 4f888 <== NOT EXECUTED 4f886: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f888: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f88e: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; 4f894: 588f addql #4,%sp 4f896: 6002 bras 4f89a <== ALWAYS TAKEN 4f898: 7409 moveq #9,%d2 } 4f89a: 2002 movel %d2,%d0 4f89c: 242e fff4 movel %fp@(-12),%d2 4f8a0: 262e fff8 movel %fp@(-8),%d3 4f8a4: 4e5e unlk %fp 4f8a6: 4e75 rts 0004f8d4 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 4f8d4: 4e56 ffe8 linkw %fp,#-24 4f8d8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4f8dc: 266e 0014 moveal %fp@(20),%a3 uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 4f8e0: 4a8b tstl %a3 4f8e2: 6700 008e beqw 4f972 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f8e6: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f8ec: 4eb9 0005 1790 jsr 51790 <_API_Mutex_Lock> 4f8f2: 486e fff8 pea %fp@(-8) 4f8f6: 2f2e 0008 movel %fp@(8),%sp@- 4f8fa: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f900: 4eb9 0005 2ed8 jsr 52ed8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f906: 4fef 0010 lea %sp@(16),%sp 4f90a: 2440 moveal %d0,%a2 4f90c: 4aae fff8 tstl %fp@(-8) 4f910: 664e bnes 4f960 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 4f912: 486e fffc pea %fp@(-4) 4f916: 486e fff4 pea %fp@(-12) 4f91a: 2f2e 0010 movel %fp@(16),%sp@- 4f91e: 2f2e 000c movel %fp@(12),%sp@- 4f922: 486a 0068 pea %a2@(104) 4f926: 4eb9 0005 2880 jsr 52880 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 4f92c: 26ae fff4 movel %fp@(-12),%a3@ case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 4f930: 2400 movel %d0,%d2 ); *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 4f932: 4fef 0014 lea %sp@(20),%sp 4f936: 660e bnes 4f946 _Region_Process_queue( the_region ); /* unlocks allocator */ 4f938: 2f0a movel %a2,%sp@- 4f93a: 4eb9 0005 6368 jsr 56368 <_Region_Process_queue> 4f940: 588f addql #4,%sp 4f942: 4280 clrl %d0 4f944: 602e bras 4f974 <== ALWAYS TAKEN else _RTEMS_Unlock_allocator(); 4f946: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f94c: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 4f952: 588f addql #4,%sp 4f954: 7001 moveq #1,%d0 4f956: b082 cmpl %d2,%d0 4f958: 6618 bnes 4f972 4f95a: 103c 000d moveb #13,%d0 4f95e: 6014 bras 4f974 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f960: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f966: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; 4f96c: 588f addql #4,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f96e: 7004 moveq #4,%d0 return return_status; 4f970: 6002 bras 4f974 <== ALWAYS TAKEN 4f972: 7009 moveq #9,%d0 } 4f974: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 4f97a: 4e5e unlk %fp 4f97c: 4e75 rts ... 0004f980 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 4f980: 4e56 fffc linkw %fp,#-4 4f984: 2f0a movel %a2,%sp@- 4f986: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 4f988: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f98e: 4eb9 0005 1790 jsr 51790 <_API_Mutex_Lock> 4f994: 486e fffc pea %fp@(-4) 4f998: 2f2e 0008 movel %fp@(8),%sp@- 4f99c: 4879 0007 37e4 pea 737e4 <_Region_Information> 4f9a2: 4eb9 0005 2ed8 jsr 52ed8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f9a8: 4fef 0010 lea %sp@(16),%sp 4f9ac: 2440 moveal %d0,%a2 4f9ae: 4aae fffc tstl %fp@(-4) 4f9b2: 6704 beqs 4f9b8 4f9b4: 7404 moveq #4,%d2 4f9b6: 6026 bras 4f9de <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 4f9b8: 2f2e 000c movel %fp@(12),%sp@- 4f9bc: 486a 0068 pea %a2@(104) 4f9c0: 4eb9 0005 2388 jsr 52388 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 4f9c6: 508f addql #8,%sp 4f9c8: 4a00 tstb %d0 4f9ca: 6710 beqs 4f9dc return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 4f9cc: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ 4f9d0: 4282 clrl %d2 4f9d2: 2f0a movel %a2,%sp@- 4f9d4: 4eb9 0005 6368 jsr 56368 <_Region_Process_queue> 4f9da: 600e bras 4f9ea <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; 4f9dc: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f9de: 2f39 0007 3992 movel 73992 <_RTEMS_Allocator_Mutex>,%sp@- 4f9e4: 4eb9 0005 17f0 jsr 517f0 <_API_Mutex_Unlock> return return_status; } 4f9ea: 2002 movel %d2,%d0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 4f9ec: 588f addql #4,%sp } 4f9ee: 242e fff4 movel %fp@(-12),%d2 4f9f2: 246e fff8 moveal %fp@(-8),%a2 4f9f6: 4e5e unlk %fp 4f9f8: 4e75 rts ... 00044cf8 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 44cf8: 4e56 ffd0 linkw %fp,#-48 44cfc: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 44d00: 2a2e 0008 movel %fp@(8),%d5 44d04: 262e 000c movel %fp@(12),%d3 44d08: 242e 0010 movel %fp@(16),%d2 44d0c: 266e 0018 moveal %fp@(24),%a3 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 ) ) 44d10: 4a85 tstl %d5 44d12: 6606 bnes 44d1a 44d14: 7003 moveq #3,%d0 44d16: 6000 0172 braw 44e8a <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 44d1a: 4a8b tstl %a3 44d1c: 6606 bnes 44d24 44d1e: 7009 moveq #9,%d0 44d20: 6000 0168 braw 44e8a <== ALWAYS TAKEN * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 44d24: 2002 movel %d2,%d0 44d26: 0280 0000 00c0 andil #192,%d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 44d2c: 671c beqs 44d4a _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 44d2e: 7230 moveq #48,%d1 44d30: 7810 moveq #16,%d4 44d32: c282 andl %d2,%d1 44d34: b881 cmpl %d1,%d4 44d36: 6600 0150 bnew 44e88 44d3a: 44c2 movew %d2,%ccr 44d3c: 6600 014a bnew 44e88 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 44d40: 0c80 0000 00c0 cmpil #192,%d0 44d46: 6700 0140 beqw 44e88 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 44d4a: 7830 moveq #48,%d4 44d4c: c882 andl %d2,%d4 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 44d4e: 670e beqs 44d5e 44d50: 7001 moveq #1,%d0 44d52: b083 cmpl %d3,%d0 44d54: 6408 bccs 44d5e 44d56: 103c 000a moveb #10,%d0 44d5a: 6000 012e braw 44e8a <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44d5e: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 44d64: 5280 addql #1,%d0 44d66: 23c0 0005 ba34 movel %d0,5ba34 <_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 ); 44d6c: 4879 0005 b970 pea 5b970 <_Semaphore_Information> 44d72: 4eb9 0004 604c jsr 4604c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 44d78: 588f addql #4,%sp 44d7a: 2440 moveal %d0,%a2 44d7c: 4a80 tstl %d0 44d7e: 660c bnes 44d8c _Thread_Enable_dispatch(); 44d80: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> 44d86: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 44d88: 6000 0100 braw 44e8a <== ALWAYS TAKEN 44d8c: 7004 moveq #4,%d0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 44d8e: 2542 0010 movel %d2,%a2@(16) 44d92: c082 andl %d2,%d0 /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 44d94: 4a84 tstl %d4 44d96: 6632 bnes 44dca * 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; 44d98: 4a80 tstl %d0 44d9a: 57c0 seq %d0 * 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( 44d9c: 2f03 movel %d3,%sp@- 44d9e: 486e fff8 pea %fp@(-8) * 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; 44da2: 49c0 extbl %d0 * 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( 44da4: 486a 0014 pea %a2@(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; 44da8: 5280 addql #1,%d0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 44daa: 72ff moveq #-1,%d1 if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 44dac: 2d40 fffc movel %d0,%fp@(-4) */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 44db0: 2d41 fff8 movel %d1,%fp@(-8) 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; 44db4: 42ae ffea clrl %fp@(-22) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 44db8: 42ae fff4 clrl %fp@(-12) _CORE_semaphore_Initialize( 44dbc: 4eb9 0004 5b7c jsr 45b7c <_CORE_semaphore_Initialize> 44dc2: 4fef 000c lea %sp@(12),%sp 44dc6: 6000 009e braw 44e66 <== ALWAYS TAKEN /* * 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; 44dca: 4a80 tstl %d0 44dcc: 57c0 seq %d0 44dce: 49c0 extbl %d0 44dd0: 5280 addql #1,%d0 44dd2: 2d40 fff0 movel %d0,%fp@(-16) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 44dd6: 7010 moveq #16,%d0 44dd8: b084 cmpl %d4,%d0 44dda: 6640 bnes 44e1c the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 44ddc: 42ae ffea clrl %fp@(-22) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 44de0: 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; 44de2: 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; 44de4: 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; 44dea: 1d41 ffee moveb %d1,%fp@(-18) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 44dee: b8ae fff0 cmpl %fp@(-16),%d4 44df2: 6634 bnes 44e28 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 44df4: 0802 0006 btst #6,%d2 44df8: 6710 beqs 44e0a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 44dfa: 103c 0002 moveb #2,%d0 the_mutex_attr.only_owner_release = true; 44dfe: 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; 44e00: 2d40 fff0 movel %d0,%fp@(-16) the_mutex_attr.only_owner_release = true; 44e04: 1d41 ffee moveb %d1,%fp@(-18) 44e08: 601e bras 44e28 <== ALWAYS TAKEN } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 44e0a: 4a02 tstb %d2 44e0c: 6c1a bges 44e28 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 44e0e: 7803 moveq #3,%d4 the_mutex_attr.only_owner_release = true; 44e10: 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; 44e12: 2d44 fff0 movel %d4,%fp@(-16) the_mutex_attr.only_owner_release = true; 44e16: 1d40 ffee moveb %d0,%fp@(-18) 44e1a: 600c bras 44e28 <== ALWAYS TAKEN } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 44e1c: 7202 moveq #2,%d1 the_mutex_attr.only_owner_release = false; 44e1e: 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; 44e20: 2d41 ffea movel %d1,%fp@(-22) the_mutex_attr.only_owner_release = false; 44e24: 1d44 ffee moveb %d4,%fp@(-18) } mutex_status = _CORE_mutex_Initialize( 44e28: 7001 moveq #1,%d0 44e2a: b083 cmpl %d3,%d0 44e2c: 57c0 seq %d0 44e2e: 49c0 extbl %d0 44e30: 4480 negl %d0 44e32: 2f00 movel %d0,%sp@- 44e34: 486e ffea pea %fp@(-22) 44e38: 486a 0014 pea %a2@(20) 44e3c: 4eb9 0004 58c4 jsr 458c4 <_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 ) { 44e42: 4fef 000c lea %sp@(12),%sp 44e46: 7206 moveq #6,%d1 44e48: b280 cmpl %d0,%d1 44e4a: 661a bnes 44e66 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 44e4c: 2f0a movel %a2,%sp@- 44e4e: 4879 0005 b970 pea 5b970 <_Semaphore_Information> 44e54: 4eb9 0004 6340 jsr 46340 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 44e5a: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 44e60: 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(); 44e62: 7013 moveq #19,%d0 return RTEMS_INVALID_PRIORITY; 44e64: 6024 bras 44e8a <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 44e66: 202a 0008 movel %a2@(8),%d0 44e6a: 4281 clrl %d1 44e6c: 2079 0005 b988 moveal 5b988 <_Semaphore_Information+0x18>,%a0 44e72: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 44e74: 2545 000c movel %d5,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 44e78: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 44e7c: 2680 movel %d0,%a3@ the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 44e7e: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> 44e84: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 44e86: 6002 bras 44e8a <== ALWAYS TAKEN 44e88: 700b moveq #11,%d0 } 44e8a: 4cee 0c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a3 44e90: 4e5e unlk %fp 44e92: 4e75 rts 00044e94 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 44e94: 4e56 fffc linkw %fp,#-4 44e98: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 44e9a: 486e fffc pea %fp@(-4) 44e9e: 2f2e 0008 movel %fp@(8),%sp@- 44ea2: 4879 0005 b970 pea 5b970 <_Semaphore_Information> 44ea8: 4eb9 0004 6498 jsr 46498 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 44eae: 4fef 000c lea %sp@(12),%sp 44eb2: 2440 moveal %d0,%a2 44eb4: 4aae fffc tstl %fp@(-4) 44eb8: 6704 beqs 44ebe 44eba: 7004 moveq #4,%d0 44ebc: 606a bras 44f28 <== ALWAYS TAKEN 44ebe: 7030 moveq #48,%d0 44ec0: c0aa 0010 andl %a2@(16),%d0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 44ec4: 6728 beqs 44eee if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 44ec6: 4aaa 0062 tstl %a2@(98) 44eca: 6610 bnes 44edc 44ecc: 7220 moveq #32,%d1 44ece: b280 cmpl %d0,%d1 44ed0: 670a beqs 44edc !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 44ed2: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> 44ed8: 700c moveq #12,%d0 return RTEMS_RESOURCE_IN_USE; 44eda: 604c bras 44f28 <== ALWAYS TAKEN } _CORE_mutex_Flush( 44edc: 4878 0004 pea 4 44ee0: 42a7 clrl %sp@- 44ee2: 486a 0014 pea %a2@(20) 44ee6: 4eb9 0004 58b8 jsr 458b8 <_CORE_mutex_Flush> 44eec: 6010 bras 44efe <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 44eee: 4878 0002 pea 2 44ef2: 42a7 clrl %sp@- 44ef4: 486a 0014 pea %a2@(20) 44ef8: 4eb9 0004 5b70 jsr 45b70 <_CORE_semaphore_Flush> SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 44efe: 508f addql #8,%sp 44f00: 2e8a movel %a2,%sp@ 44f02: 4879 0005 b970 pea 5b970 <_Semaphore_Information> 44f08: 4eb9 0004 60cc jsr 460cc <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 44f0e: 2f0a movel %a2,%sp@- 44f10: 4879 0005 b970 pea 5b970 <_Semaphore_Information> 44f16: 4eb9 0004 6340 jsr 46340 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 44f1c: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 44f22: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 44f26: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 44f28: 246e fff8 moveal %fp@(-8),%a2 44f2c: 4e5e unlk %fp 44f2e: 4e75 rts 0004dd28 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 4dd28: 4e56 fffc linkw %fp,#-4 4dd2c: 2f02 movel %d2,%sp@- 4dd2e: 486e fffc pea %fp@(-4) 4dd32: 2f2e 0008 movel %fp@(8),%sp@- 4dd36: 4879 0006 0d68 pea 60d68 <_Semaphore_Information> 4dd3c: 4eb9 0004 7d88 jsr 47d88 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4dd42: 4fef 000c lea %sp@(12),%sp 4dd46: 4aae fffc tstl %fp@(-4) 4dd4a: 6704 beqs 4dd50 4dd4c: 7004 moveq #4,%d0 4dd4e: 603c bras 4dd8c <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4dd50: 7430 moveq #48,%d2 4dd52: 2040 moveal %d0,%a0 4dd54: 2200 movel %d0,%d1 4dd56: 0681 0000 0014 addil #20,%d1 4dd5c: c4a8 0010 andl %a0@(16),%d2 4dd60: 6710 beqs 4dd72 _CORE_mutex_Flush( 4dd62: 4878 0001 pea 1 4dd66: 42a7 clrl %sp@- 4dd68: 2f01 movel %d1,%sp@- 4dd6a: 4eb9 0004 713c jsr 4713c <_CORE_mutex_Flush> 4dd70: 600e bras 4dd80 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 4dd72: 4878 0001 pea 1 4dd76: 42a7 clrl %sp@- 4dd78: 2f01 movel %d1,%sp@- 4dd7a: 4eb9 0004 73f4 jsr 473f4 <_CORE_semaphore_Flush> 4dd80: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 4dd84: 4eb9 0004 85ee jsr 485ee <_Thread_Enable_dispatch> 4dd8a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4dd8c: 242e fff8 movel %fp@(-8),%d2 4dd90: 4e5e unlk %fp 4dd92: 4e75 rts 00044f30 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 44f30: 4e56 ffec linkw %fp,#-20 44f34: 48d7 001c moveml %d2-%d4,%sp@ Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 44f38: 486e fff8 pea %fp@(-8) 44f3c: 486e fffc pea %fp@(-4) 44f40: 242e 0008 movel %fp@(8),%d2 44f44: 2f02 movel %d2,%sp@- 44f46: 4879 0005 b970 pea 5b970 <_Semaphore_Information> 44f4c: 282e 000c movel %fp@(12),%d4 44f50: 262e 0010 movel %fp@(16),%d3 44f54: 4eb9 0004 6440 jsr 46440 <_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 ) { 44f5a: 4fef 0010 lea %sp@(16),%sp 44f5e: 2040 moveal %d0,%a0 44f60: 4aae fffc tstl %fp@(-4) 44f64: 6706 beqs 44f6c 44f66: 7004 moveq #4,%d0 44f68: 6000 00c0 braw 4502a <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 44f6c: 7030 moveq #48,%d0 44f6e: c0a8 0010 andl %a0@(16),%d0 44f72: 6732 beqs 44fa6 _CORE_mutex_Seize( 44f74: 2f2e fff8 movel %fp@(-8),%sp@- 44f78: 7001 moveq #1,%d0 44f7a: c880 andl %d0,%d4 44f7c: 2f03 movel %d3,%sp@- 44f7e: b980 eorl %d4,%d0 44f80: 2f00 movel %d0,%sp@- 44f82: 2f02 movel %d2,%sp@- 44f84: 4868 0014 pea %a0@(20) 44f88: 4eb9 0004 59d0 jsr 459d0 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 44f8e: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 44f94: 2f28 0034 movel %a0@(52),%sp@- 44f98: 4eb9 0004 50b8 jsr 450b8 <_Semaphore_Translate_core_mutex_return_code> 44f9e: 4fef 0018 lea %sp@(24),%sp 44fa2: 6000 0086 braw 4502a <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 44fa6: 2279 0005 baee moveal 5baee <_Thread_Executing>,%a1 executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 44fac: 42a9 0034 clrl %a1@(52) if ( the_semaphore->count != 0 ) { 44fb0: 2028 005c movel %a0@(92),%d0 44fb4: 670e beqs 44fc4 the_semaphore->count -= 1; 44fb6: 5380 subql #1,%d0 44fb8: 2140 005c movel %d0,%a0@(92) _ISR_Enable( *level_p ); 44fbc: 202e fff8 movel %fp@(-8),%d0 44fc0: 46c0 movew %d0,%sr 44fc2: 6054 bras 45018 <== ALWAYS TAKEN return; } if ( !wait ) { 44fc4: 0804 0000 btst #0,%d4 44fc8: 670e beqs 44fd8 _ISR_Enable( *level_p ); 44fca: 202e fff8 movel %fp@(-8),%d0 44fce: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 44fd0: 7001 moveq #1,%d0 44fd2: 2340 0034 movel %d0,%a1@(52) 44fd6: 6040 bras 45018 <== ALWAYS TAKEN 44fd8: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 44fde: 5280 addql #1,%d0 44fe0: 23c0 0005 ba34 movel %d0,5ba34 <_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; 44fe6: 7001 moveq #1,%d0 44fe8: 2140 0044 movel %d0,%a0@(68) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 44fec: 41e8 0014 lea %a0@(20),%a0 executing->Wait.id = id; 44ff0: 2342 0020 movel %d2,%a1@(32) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 44ff4: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; _ISR_Enable( *level_p ); 44ff8: 202e fff8 movel %fp@(-8),%d0 44ffc: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 44ffe: 4879 0004 73bc pea 473bc <_Thread_queue_Timeout> 45004: 2f03 movel %d3,%sp@- 45006: 2f08 movel %a0,%sp@- 45008: 4eb9 0004 70d0 jsr 470d0 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 4500e: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> 45014: 4fef 000c lea %sp@(12),%sp id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 45018: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 4501e: 2f28 0034 movel %a0@(52),%sp@- 45022: 4eb9 0004 50ce jsr 450ce <_Semaphore_Translate_core_semaphore_return_code> 45028: 588f addql #4,%sp break; } return RTEMS_INVALID_ID; } 4502a: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 45030: 4e5e unlk %fp 45032: 4e75 rts 00045034 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 45034: 4e56 fff0 linkw %fp,#-16 45038: 48d7 040c moveml %d2-%d3/%a2,%sp@ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 4503c: 486e fffc pea %fp@(-4) 45040: 242e 0008 movel %fp@(8),%d2 45044: 2f02 movel %d2,%sp@- 45046: 4879 0005 b970 pea 5b970 <_Semaphore_Information> 4504c: 4eb9 0004 6498 jsr 46498 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45052: 4fef 000c lea %sp@(12),%sp 45056: 4aae fffc tstl %fp@(-4) 4505a: 6704 beqs 45060 4505c: 7004 moveq #4,%d0 4505e: 604e bras 450ae <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 45060: 7630 moveq #48,%d3 45062: 2040 moveal %d0,%a0 45064: 2200 movel %d0,%d1 45066: 0681 0000 0014 addil #20,%d1 4506c: 45f9 0004 6c6e lea 46c6e <_Thread_Enable_dispatch>,%a2 45072: c6a8 0010 andl %a0@(16),%d3 45076: 671a beqs 45092 mutex_status = _CORE_mutex_Surrender( 45078: 42a7 clrl %sp@- 4507a: 2f02 movel %d2,%sp@- 4507c: 2f01 movel %d1,%sp@- 4507e: 4eb9 0004 5a78 jsr 45a78 <_CORE_mutex_Surrender> 45084: 2400 movel %d0,%d2 &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 45086: 4e92 jsr %a2@ return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 45088: 2f02 movel %d2,%sp@- 4508a: 4eb9 0004 50b8 jsr 450b8 <_Semaphore_Translate_core_mutex_return_code> 45090: 6018 bras 450aa <== ALWAYS TAKEN } else { semaphore_status = _CORE_semaphore_Surrender( 45092: 42a7 clrl %sp@- 45094: 2f02 movel %d2,%sp@- 45096: 2f01 movel %d1,%sp@- 45098: 4eb9 0004 5bc4 jsr 45bc4 <_CORE_semaphore_Surrender> 4509e: 2400 movel %d0,%d2 &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 450a0: 4e92 jsr %a2@ return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 450a2: 2f02 movel %d2,%sp@- 450a4: 4eb9 0004 50ce jsr 450ce <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 450aa: 4fef 0010 lea %sp@(16),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 450ae: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 450b4: 4e5e unlk %fp 450b6: 4e75 rts 00045558 : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 45558: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 4555a: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 4555e: b0b9 0005 bbb6 cmpl 5bbb6 <_System_state_Current>,%d0 45564: 6726 beqs 4558c * 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 ); 45566: 2039 0005 ba30 movel 5ba30 <_Thread_BSP_context+0x30>,%d0 4556c: 2239 0005 ba00 movel 5ba00 <_Thread_BSP_context>,%d1 45572: 46c1 movew %d1,%sr 45574: 2e40 moveal %d0,%sp 45576: 4e75 rts 45578: 23c0 0005 ba30 movel %d0,5ba30 <_Thread_BSP_context+0x30> <== NOT EXECUTED 4557e: 7004 moveq #4,%d0 <== NOT EXECUTED 45580: 23c1 0005 ba00 movel %d1,5ba00 <_Thread_BSP_context> <== NOT EXECUTED 45586: 23c0 0005 bbb6 movel %d0,5bbb6 <_System_state_Current> <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 4558c: 4e5e unlk %fp 4558e: 4e75 rts 00045d94 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 45d94: 4e56 0000 linkw %fp,#0 45d98: 2239 0005 cd4c movel 5cd4c <_Thread_Dispatch_disable_level>,%d1 45d9e: 5281 addql #1,%d1 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 45da0: 2079 0005 ce06 moveal 5ce06 <_Thread_Executing>,%a0 rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 45da6: 202e 0008 movel %fp@(8),%d0 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 45daa: 2068 0108 moveal %a0@(264),%a0 45dae: 23c1 0005 cd4c movel %d1,5cd4c <_Thread_Dispatch_disable_level> asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 45db4: 4a80 tstl %d0 45db6: 670c beqs 45dc4 asr->mode_set = mode_set; asr->handler = asr_handler; 45db8: 2140 000a movel %d0,%a0@(10) _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { asr->mode_set = mode_set; 45dbc: 216e 000c 000e movel %fp@(12),%a0@(14) 45dc2: 601a bras 45dde <== ALWAYS TAKEN information->is_enabled = false; information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; information->signals_posted = 0; information->signals_pending = 0; information->nest_level = 0; 45dc4: 42a8 001a clrl %a0@(26) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 45dc8: 4200 clrb %d0 information->handler = NULL; 45dca: 42a8 000a clrl %a0@(10) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 45dce: 1140 0008 moveb %d0,%a0@(8) information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; 45dd2: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 45dd6: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 45dda: 42a8 0016 clrl %a0@(22) asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 45dde: 4eb9 0004 7bbe jsr 47bbe <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45de4: 4280 clrl %d0 45de6: 4e5e unlk %fp 45de8: 4e75 rts ... 0004feb8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 4feb8: 4e56 fffc linkw %fp,#-4 4febc: 2f03 movel %d3,%sp@- 4febe: 2f02 movel %d2,%sp@- 4fec0: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 4fec4: 6606 bnes 4fecc 4fec6: 700a moveq #10,%d0 4fec8: 6000 0084 braw 4ff4e <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 4fecc: 486e fffc pea %fp@(-4) 4fed0: 2f2e 0008 movel %fp@(8),%sp@- 4fed4: 4eb9 0005 37c0 jsr 537c0 <_Thread_Get> switch ( location ) { 4feda: 508f addql #8,%sp 4fedc: 4aae fffc tstl %fp@(-4) 4fee0: 6704 beqs 4fee6 4fee2: 7004 moveq #4,%d0 4fee4: 6068 bras 4ff4e <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 4fee6: 2240 moveal %d0,%a1 4fee8: 2069 0108 moveal %a1@(264),%a0 asr = &api->Signal; 4feec: 4aa8 000a tstl %a0@(10) 4fef0: 6754 beqs 4ff46 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 4fef2: 4a28 0008 tstb %a0@(8) 4fef6: 6732 beqs 4ff2a rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 4fef8: 223c 0000 0700 movel #1792,%d1 4fefe: 40c3 movew %sr,%d3 4ff00: 8283 orl %d3,%d1 4ff02: 46c1 movew %d1,%sr *signal_set |= signals; 4ff04: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 4ff08: 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 ) ) 4ff0a: 2239 0007 397a movel 7397a <_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; 4ff10: 7401 moveq #1,%d2 4ff12: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4ff16: 4a81 tstl %d1 4ff18: 6722 beqs 4ff3c 4ff1a: b0b9 0007 399a cmpl 7399a <_Thread_Executing>,%d0 4ff20: 661a bnes 4ff3c <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 4ff22: 13c2 0007 3a24 moveb %d2,73a24 <_ISR_Signals_to_thread_executing> 4ff28: 6012 bras 4ff3c <== ALWAYS TAKEN rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 4ff2a: 203c 0000 0700 movel #1792,%d0 4ff30: 40c1 movew %sr,%d1 4ff32: 8081 orl %d1,%d0 4ff34: 46c0 movew %d0,%sr *signal_set |= signals; 4ff36: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 4ff3a: 46c1 movew %d1,%sr } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 4ff3c: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> 4ff42: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4ff44: 6008 bras 4ff4e <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 4ff46: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> 4ff4c: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ff4e: 242e fff4 movel %fp@(-12),%d2 4ff52: 262e fff8 movel %fp@(-8),%d3 4ff56: 4e5e unlk %fp 4ff58: 4e75 rts ... 00044b48 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 44b48: 4e56 0000 linkw %fp,#0 44b4c: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 44b50: 4aa8 0008 tstl %a0@(8) 44b54: 671c beqs 44b72 <== ALWAYS TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 44b56: 4878 0010 pea 10 44b5a: 4879 0009 a644 pea 9a644 44b60: 2068 00c0 moveal %a0@(192),%a0 44b64: 5088 addql #8,%a0 44b66: 2f08 movel %a0,%sp@- 44b68: 4eb9 0007 7ebc jsr 77ebc 44b6e: 4fef 000c lea %sp@(12),%sp } 44b72: 4e5e unlk %fp 44b74: 4e75 rts 00044f34 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 44f34: 4e56 0000 linkw %fp,#0 44f38: 2f0a movel %a2,%sp@- 44f3a: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 44f3e: 4eb9 0004 4ece jsr 44ece if (the_thread) 44f44: 4a8a tstl %a2 44f46: 6716 beqs 44f5e <== ALWAYS TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 44f48: 2f2a 00bc movel %a2@(188),%sp@- 44f4c: 4878 00a5 pea a5 44f50: 2f2a 00c0 movel %a2@(192),%sp@- 44f54: 4eb9 0007 8028 jsr 78028 44f5a: 4fef 000c lea %sp@(12),%sp return true; } 44f5e: 246e fffc moveal %fp@(-4),%a2 44f62: 4e5e unlk %fp 44f64: 7001 moveq #1,%d0 44f66: 4e75 rts 00044de0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 44de0: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 44de4: 2279 0009 a882 moveal 9a882 <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44dea: 2069 00c0 moveal %a1@(192),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 44dee: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44df0: b1ce cmpal %fp,%a0 44df2: 6304 blss 44df8 <== NEVER TAKEN 44df4: 4202 clrb %d2 <== NOT EXECUTED 44df6: 600c bras 44e04 <== NOT EXECUTED } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 44df8: 2008 movel %a0,%d0 44dfa: d0a9 00bc addl %a1@(188),%d0 44dfe: b08e cmpl %fp,%d0 44e00: 54c2 scc %d2 44e02: 4482 negl %d2 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 44e04: 4ab9 0009 7704 tstl 97704 44e0a: 6604 bnes 44e10 <== NEVER TAKEN 44e0c: 7001 moveq #1,%d0 <== NOT EXECUTED 44e0e: 601e bras 44e2e <== NOT EXECUTED pattern_ok = (!memcmp( 44e10: 4878 0010 pea 10 44e14: 4879 0009 a644 pea 9a644 44e1a: 4868 0008 pea %a0@(8) 44e1e: 4eb9 0007 7e44 jsr 77e44 44e24: 4fef 000c lea %sp@(12),%sp 44e28: 4a80 tstl %d0 44e2a: 57c0 seq %d0 44e2c: 4480 negl %d0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 44e2e: 4a02 tstb %d2 44e30: 6708 beqs 44e3a <== ALWAYS TAKEN 44e32: 4a00 tstb %d0 44e34: 6704 beqs 44e3a <== ALWAYS TAKEN 44e36: 4200 clrb %d0 44e38: 6018 bras 44e52 <== ALWAYS TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 44e3a: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44e40: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44e42: 2f39 0009 a882 movel 9a882 <_Thread_Executing>,%sp@- <== NOT EXECUTED 44e48: 4eb9 0004 4d3a jsr 44d3a <== NOT EXECUTED return true; 44e4e: 508f addql #8,%sp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 44e50: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 44e52: 242e fffc movel %fp@(-4),%d2 44e56: 4e5e unlk %fp 44e58: 4e75 rts 00044d22 : void rtems_stack_checker_report_usage( void ) { 44d22: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 44d26: 4879 0004 7640 pea 47640 <== NOT EXECUTED 44d2c: 42a7 clrl %sp@- <== NOT EXECUTED 44d2e: 4eb9 0004 4cc0 jsr 44cc0 <== NOT EXECUTED 44d34: 508f addql #8,%sp <== NOT EXECUTED } 44d36: 4e5e unlk %fp <== NOT EXECUTED 44d38: 4e75 rts 00044cc0 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 44cc0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44cc4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44cc6: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 44cca: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 44ccc: 4879 0008 d3bb pea 8d3bb <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 44cd2: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 44cd6: 23ca 0009 770c movel %a2,9770c <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 44cdc: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 44cde: 23c2 0009 7708 movel %d2,97708 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 44ce4: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 44ce6: 4879 0008 d3d2 pea 8d3d2 <== NOT EXECUTED 44cec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44cee: 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 ); 44cf0: 4879 0004 4ba6 pea 44ba6 <== NOT EXECUTED 44cf6: 4eb9 0004 b498 jsr 4b498 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 44cfc: 4878 ffff pea ffffffff <== NOT EXECUTED 44d00: 4eb9 0004 4ba6 jsr 44ba6 <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 44d06: 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; 44d0a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 44d0e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 44d12: 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; 44d14: 42b9 0009 7708 clrl 97708 <== NOT EXECUTED print_handler = NULL; 44d1a: 42b9 0009 770c clrl 9770c <== NOT EXECUTED } 44d20: 4e75 rts 00044e5a : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 44e5a: 4e56 0000 linkw %fp,#0 44e5e: 2f0a movel %a2,%sp@- 44e60: 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; 44e64: 206a 00c0 moveal %a2@(192),%a0 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 44e68: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44e6a: b1ce cmpal %fp,%a0 44e6c: 6304 blss 44e72 <== NEVER TAKEN 44e6e: 4202 clrb %d2 <== NOT EXECUTED 44e70: 600c bras 44e7e <== NOT EXECUTED } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 44e72: 2008 movel %a0,%d0 44e74: d0aa 00bc addl %a2@(188),%d0 44e78: b08e cmpl %fp,%d0 44e7a: 54c2 scc %d2 44e7c: 4482 negl %d2 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 44e7e: 4878 0010 pea 10 44e82: 4879 0009 a644 pea 9a644 44e88: 4868 0008 pea %a0@(8) 44e8c: 4eb9 0007 7e44 jsr 77e44 44e92: 4fef 000c lea %sp@(12),%sp 44e96: 4a80 tstl %d0 44e98: 57c0 seq %d0 44e9a: 4480 negl %d0 44e9c: 1200 moveb %d0,%d1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 44e9e: 4a02 tstb %d2 44ea0: 6704 beqs 44ea6 <== ALWAYS TAKEN 44ea2: 4a00 tstb %d0 44ea4: 661c bnes 44ec2 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); 44ea6: 4280 clrl %d0 <== NOT EXECUTED 44ea8: 1001 moveb %d1,%d0 <== NOT EXECUTED 44eaa: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 44eae: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44eb2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 44eb6: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 44eba: 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 ); 44ebc: 4ef9 0004 4d3a jmp 44d3a <== NOT EXECUTED } } 44ec2: 242e fff8 movel %fp@(-8),%d2 44ec6: 246e fffc moveal %fp@(-4),%a2 44eca: 4e5e unlk %fp 44ecc: 4e75 rts 0004b4fc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b4fc: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4b500: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 4b504: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4b508: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4b50c: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b510: 4a8a tstl %a2 <== NOT EXECUTED 4b512: 6604 bnes 4b518 <== NOT EXECUTED 4b514: 7009 moveq #9,%d0 <== NOT EXECUTED 4b516: 606e bras 4b586 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4b518: 4eb9 0004 d348 jsr 4d348 <__errno> <== NOT EXECUTED *n = 0; 4b51e: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b520: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4b522: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b524: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b526: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b52a: 2480 movel %d0,%a2@ <== NOT EXECUTED 4b52c: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b530: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b532: 4eb9 0004 fd9c jsr 4fd9c <== 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 ) 4b538: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b53a: 2600 movel %d0,%d3 <== NOT EXECUTED 4b53c: 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 ) 4b53e: 4a8b tstl %a3 <== NOT EXECUTED 4b540: 6704 beqs 4b546 <== NOT EXECUTED *endptr = end; 4b542: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4b546: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4b54a: 6604 bnes 4b550 <== NOT EXECUTED 4b54c: 700b moveq #11,%d0 <== NOT EXECUTED 4b54e: 6036 bras 4b586 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b550: 4878 ffff pea ffffffff <== NOT EXECUTED 4b554: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4b55a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b55c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b55e: 4eb9 0005 abdc jsr 5abdc <__gtdf2> <== NOT EXECUTED 4b564: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b568: 4a80 tstl %d0 <== NOT EXECUTED 4b56a: 6f12 bles 4b57e <== NOT EXECUTED 4b56c: 4eb9 0004 d348 jsr 4d348 <__errno> <== NOT EXECUTED 4b572: 7222 moveq #34,%d1 <== NOT EXECUTED 4b574: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b576: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b578: 6604 bnes 4b57e <== NOT EXECUTED 4b57a: 700a moveq #10,%d0 <== NOT EXECUTED 4b57c: 6008 bras 4b586 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b57e: 4280 clrl %d0 <== NOT EXECUTED 4b580: 2483 movel %d3,%a2@ <== NOT EXECUTED 4b582: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4b586: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4b58c: 4e5e unlk %fp <== NOT EXECUTED 4b58e: 4e75 rts 0004b590 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b590: 4e56 ffec linkw %fp,#-20 4b594: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b598: 262e 0008 movel %fp@(8),%d3 4b59c: 246e 000c moveal %fp@(12),%a2 4b5a0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b5a4: 4a8a tstl %a2 4b5a6: 6604 bnes 4b5ac 4b5a8: 7009 moveq #9,%d0 4b5aa: 605c bras 4b608 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b5ac: 4eb9 0004 d348 jsr 4d348 <__errno> 4b5b2: 2040 moveal %d0,%a0 4b5b4: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b5b6: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b5ba: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b5c0: 2f03 movel %d3,%sp@- 4b5c2: 4eb9 0004 fd3e jsr 4fd3e #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 ) 4b5c8: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b5ca: 2400 movel %d0,%d2 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b5cc: 4a8b tstl %a3 4b5ce: 6704 beqs 4b5d4 *endptr = end; 4b5d0: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b5d4: b6ae fffc cmpl %fp@(-4),%d3 4b5d8: 6604 bnes 4b5de 4b5da: 700b moveq #11,%d0 4b5dc: 602a bras 4b608 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b5de: 2f3c 7f7f ffff movel #2139095039,%sp@- 4b5e4: 2f02 movel %d2,%sp@- 4b5e6: 4eb9 0005 ac6c jsr 5ac6c <__gtsf2> 4b5ec: 508f addql #8,%sp 4b5ee: 4a80 tstl %d0 4b5f0: 6f12 bles 4b604 <== NEVER TAKEN 4b5f2: 4eb9 0004 d348 jsr 4d348 <__errno> <== NOT EXECUTED 4b5f8: 7222 moveq #34,%d1 <== NOT EXECUTED 4b5fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b5fc: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b5fe: 6604 bnes 4b604 <== NOT EXECUTED 4b600: 700a moveq #10,%d0 <== NOT EXECUTED 4b602: 6004 bras 4b608 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b604: 2482 movel %d2,%a2@ 4b606: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4b608: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b60e: 4e5e unlk %fp 4b610: 4e75 rts ... 00058f70 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 58f70: 4e56 ffec linkw %fp,#-20 58f74: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 58f78: 262e 0008 movel %fp@(8),%d3 58f7c: 246e 000c moveal %fp@(12),%a2 58f80: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 58f84: 4a8a tstl %a2 58f86: 6604 bnes 58f8c 58f88: 7009 moveq #9,%d0 58f8a: 6052 bras 58fde <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 58f8c: 4eb9 0007 4e84 jsr 74e84 <__errno> 58f92: 2040 moveal %d0,%a0 58f94: 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 ); 58f96: 2f2e 0014 movel %fp@(20),%sp@- 58f9a: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 58f9e: 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 ); 58fa0: 2f03 movel %d3,%sp@- 58fa2: 4eb9 0007 bbd2 jsr 7bbd2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 58fa8: 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 ); 58fac: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 58fae: 4a8b tstl %a3 58fb0: 6704 beqs 58fb6 *endptr = end; 58fb2: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 58fb6: b6ae fffc cmpl %fp@(-4),%d3 58fba: 6604 bnes 58fc0 58fbc: 700b moveq #11,%d0 58fbe: 601e bras 58fde <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 58fc0: 0c82 7fff ffff cmpil #2147483647,%d2 58fc6: 6612 bnes 58fda 58fc8: 4eb9 0007 4e84 jsr 74e84 <__errno> 58fce: 7222 moveq #34,%d1 58fd0: 2040 moveal %d0,%a0 58fd2: b290 cmpl %a0@,%d1 58fd4: 6604 bnes 58fda <== ALWAYS TAKEN 58fd6: 700a moveq #10,%d0 58fd8: 6004 bras 58fde <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 58fda: 2482 movel %d2,%a2@ 58fdc: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 58fde: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58fe4: 4e5e unlk %fp 58fe6: 4e75 rts 0004b728 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b728: 4e56 ffec linkw %fp,#-20 4b72c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b730: 262e 0008 movel %fp@(8),%d3 4b734: 246e 000c moveal %fp@(12),%a2 4b738: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b73c: 4a8a tstl %a2 4b73e: 6604 bnes 4b744 4b740: 7009 moveq #9,%d0 4b742: 605a bras 4b79e <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b744: 4eb9 0004 d348 jsr 4d348 <__errno> 4b74a: 2040 moveal %d0,%a0 4b74c: 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 ); 4b74e: 2f2e 0014 movel %fp@(20),%sp@- 4b752: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b756: 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 ); 4b758: 2f03 movel %d3,%sp@- 4b75a: 4eb9 0004 ff1e jsr 4ff1e #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b760: 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 ); 4b764: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b766: 4a8b tstl %a3 4b768: 6704 beqs 4b76e *endptr = end; 4b76a: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b76e: b6ae fffc cmpl %fp@(-4),%d3 4b772: 6604 bnes 4b778 4b774: 700b moveq #11,%d0 4b776: 6026 bras 4b79e <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b778: 0c82 7fff ffff cmpil #2147483647,%d2 4b77e: 6708 beqs 4b788 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b780: 0c82 8000 0000 cmpil #-2147483648,%d2 4b786: 660e bnes 4b796 4b788: 4eb9 0004 d348 jsr 4d348 <__errno> 4b78e: 7222 moveq #34,%d1 4b790: 2040 moveal %d0,%a0 4b792: b290 cmpl %a0@,%d1 4b794: 6706 beqs 4b79c <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b796: 2482 movel %d2,%a2@ 4b798: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4b79a: 6002 bras 4b79e <== ALWAYS TAKEN 4b79c: 700a moveq #10,%d0 } 4b79e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b7a4: 4e5e unlk %fp 4b7a6: 4e75 rts 0004b68c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b68c: 4e56 ffe8 linkw %fp,#-24 4b690: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b694: 242e 0008 movel %fp@(8),%d2 4b698: 246e 000c moveal %fp@(12),%a2 4b69c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b6a0: 4a8a tstl %a2 4b6a2: 6604 bnes 4b6a8 4b6a4: 7009 moveq #9,%d0 4b6a6: 6074 bras 4b71c <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b6a8: 4eb9 0004 d348 jsr 4d348 <__errno> 4b6ae: 2040 moveal %d0,%a0 *n = 0; 4b6b0: 4280 clrl %d0 4b6b2: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b6b4: 4290 clrl %a0@ *n = 0; 4b6b6: 2480 movel %d0,%a2@ 4b6b8: 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 ); 4b6bc: 2f2e 0014 movel %fp@(20),%sp@- 4b6c0: 486e fffc pea %fp@(-4) 4b6c4: 2f02 movel %d2,%sp@- 4b6c6: 4eb9 0004 ff40 jsr 4ff40 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b6cc: 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 ); 4b6d0: 2600 movel %d0,%d3 4b6d2: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b6d4: 4a8b tstl %a3 4b6d6: 6704 beqs 4b6dc *endptr = end; 4b6d8: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b6dc: b4ae fffc cmpl %fp@(-4),%d2 4b6e0: 6604 bnes 4b6e6 4b6e2: 700b moveq #11,%d0 4b6e4: 6036 bras 4b71c <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b6e6: 203c 7fff ffff movel #2147483647,%d0 4b6ec: 72ff moveq #-1,%d1 4b6ee: 9284 subl %d4,%d1 4b6f0: 9183 subxl %d3,%d0 4b6f2: 670e beqs 4b702 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b6f4: 203c 8000 0000 movel #-2147483648,%d0 4b6fa: 4281 clrl %d1 4b6fc: 9284 subl %d4,%d1 4b6fe: 9183 subxl %d3,%d0 4b700: 660e bnes 4b710 4b702: 4eb9 0004 d348 jsr 4d348 <__errno> 4b708: 7222 moveq #34,%d1 4b70a: 2040 moveal %d0,%a0 4b70c: b290 cmpl %a0@,%d1 4b70e: 670a beqs 4b71a <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b710: 4280 clrl %d0 4b712: 2483 movel %d3,%a2@ 4b714: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; 4b718: 6002 bras 4b71c <== ALWAYS TAKEN 4b71a: 700a moveq #10,%d0 } 4b71c: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4b722: 4e5e unlk %fp 4b724: 4e75 rts ... 00058fe8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 58fe8: 4e56 ffec linkw %fp,#-20 58fec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 58ff0: 262e 0008 movel %fp@(8),%d3 58ff4: 246e 000c moveal %fp@(12),%a2 58ff8: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 58ffc: 4a8a tstl %a2 58ffe: 6604 bnes 59004 59000: 7009 moveq #9,%d0 59002: 6050 bras 59054 return RTEMS_INVALID_ADDRESS; errno = 0; 59004: 4eb9 0007 4e84 jsr 74e84 <__errno> 5900a: 2040 moveal %d0,%a0 5900c: 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 ); 5900e: 4878 0010 pea 10 59012: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 59016: 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 ); 59018: 2f03 movel %d3,%sp@- 5901a: 4eb9 0007 c004 jsr 7c004 #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 ) 59020: 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 ); 59024: 2400 movel %d0,%d2 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 59026: 4a8b tstl %a3 59028: 6704 beqs 5902e *endptr = end; 5902a: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5902e: b6ae fffc cmpl %fp@(-4),%d3 59032: 6604 bnes 59038 59034: 700b moveq #11,%d0 59036: 601c bras 59054 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 59038: 70ff moveq #-1,%d0 5903a: b082 cmpl %d2,%d0 5903c: 6612 bnes 59050 5903e: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 59044: 7222 moveq #34,%d1 <== NOT EXECUTED 59046: 2040 moveal %d0,%a0 <== NOT EXECUTED 59048: b290 cmpl %a0@,%d1 <== NOT EXECUTED 5904a: 6604 bnes 59050 <== NOT EXECUTED 5904c: 700a moveq #10,%d0 <== NOT EXECUTED 5904e: 6004 bras 59054 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 59050: 2482 movel %d2,%a2@ 59052: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 59054: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5905a: 4e5e unlk %fp 5905c: 4e75 rts ... 00059060 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 59060: 4e56 fff0 linkw %fp,#-16 59064: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 59068: 242e 0008 movel %fp@(8),%d2 5906c: 246e 000c moveal %fp@(12),%a2 59070: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 59074: 4a8a tstl %a2 59076: 6604 bnes 5907c 59078: 7009 moveq #9,%d0 5907a: 6038 bras 590b4 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 5907c: 4eb9 0007 4e84 jsr 74e84 <__errno> 59082: 2040 moveal %d0,%a0 59084: 4290 clrl %a0@ *n = 0; 59086: 4212 clrb %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 ); 59088: 2f2e 0014 movel %fp@(20),%sp@- 5908c: 486e fffc pea %fp@(-4) 59090: 2f02 movel %d2,%sp@- 59092: 4eb9 0007 c004 jsr 7c004 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 59098: 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 ); 5909c: 2200 movel %d0,%d1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5909e: 4a8b tstl %a3 590a0: 6704 beqs 590a6 *endptr = end; 590a2: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 590a6: b4ae fffc cmpl %fp@(-4),%d2 590aa: 6604 bnes 590b0 590ac: 700b moveq #11,%d0 590ae: 6004 bras 590b4 <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 590b0: 4280 clrl %d0 590b2: 1481 moveb %d1,%a2@ return RTEMS_SUCCESSFUL; } 590b4: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 590ba: 4e5e unlk %fp 590bc: 4e75 rts ... 0004b880 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b880: 4e56 ffec linkw %fp,#-20 4b884: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b888: 262e 0008 movel %fp@(8),%d3 4b88c: 246e 000c moveal %fp@(12),%a2 4b890: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b894: 4a8a tstl %a2 4b896: 6604 bnes 4b89c 4b898: 7009 moveq #9,%d0 4b89a: 6050 bras 4b8ec <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b89c: 4eb9 0004 d348 jsr 4d348 <__errno> 4b8a2: 2040 moveal %d0,%a0 4b8a4: 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 ); 4b8a6: 2f2e 0014 movel %fp@(20),%sp@- 4b8aa: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b8ae: 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 ); 4b8b0: 2f03 movel %d3,%sp@- 4b8b2: 4eb9 0005 0350 jsr 50350 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b8b8: 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 ); 4b8bc: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b8be: 4a8b tstl %a3 4b8c0: 6704 beqs 4b8c6 *endptr = end; 4b8c2: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b8c6: b6ae fffc cmpl %fp@(-4),%d3 4b8ca: 6604 bnes 4b8d0 4b8cc: 700b moveq #11,%d0 4b8ce: 601c bras 4b8ec <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b8d0: 70ff moveq #-1,%d0 4b8d2: b082 cmpl %d2,%d0 4b8d4: 6612 bnes 4b8e8 4b8d6: 4eb9 0004 d348 jsr 4d348 <__errno> 4b8dc: 7222 moveq #34,%d1 4b8de: 2040 moveal %d0,%a0 4b8e0: b290 cmpl %a0@,%d1 4b8e2: 6604 bnes 4b8e8 <== ALWAYS TAKEN 4b8e4: 700a moveq #10,%d0 4b8e6: 6004 bras 4b8ec <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b8e8: 2482 movel %d2,%a2@ 4b8ea: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4b8ec: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b8f2: 4e5e unlk %fp 4b8f4: 4e75 rts ... 000590c0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 590c0: 4e56 ffec linkw %fp,#-20 590c4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 590c8: 262e 0008 movel %fp@(8),%d3 590cc: 246e 000c moveal %fp@(12),%a2 590d0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 590d4: 4a8a tstl %a2 590d6: 6604 bnes 590dc 590d8: 7009 moveq #9,%d0 590da: 6050 bras 5912c <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 590dc: 4eb9 0007 4e84 jsr 74e84 <__errno> 590e2: 2040 moveal %d0,%a0 590e4: 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 ); 590e6: 2f2e 0014 movel %fp@(20),%sp@- 590ea: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 590ee: 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 ); 590f0: 2f03 movel %d3,%sp@- 590f2: 4eb9 0007 c004 jsr 7c004 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 590f8: 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 ); 590fc: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 590fe: 4a8b tstl %a3 59100: 6704 beqs 59106 *endptr = end; 59102: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 59106: b6ae fffc cmpl %fp@(-4),%d3 5910a: 6604 bnes 59110 5910c: 700b moveq #11,%d0 5910e: 601c bras 5912c <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 59110: 70ff moveq #-1,%d0 59112: b082 cmpl %d2,%d0 59114: 6612 bnes 59128 59116: 4eb9 0007 4e84 jsr 74e84 <__errno> 5911c: 7222 moveq #34,%d1 5911e: 2040 moveal %d0,%a0 59120: b290 cmpl %a0@,%d1 59122: 6604 bnes 59128 <== ALWAYS TAKEN 59124: 700a moveq #10,%d0 59126: 6004 bras 5912c <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 59128: 2482 movel %d2,%a2@ 5912a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 5912c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59132: 4e5e unlk %fp 59134: 4e75 rts ... 0004b8f8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b8f8: 4e56 ffe8 linkw %fp,#-24 4b8fc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b900: 242e 0008 movel %fp@(8),%d2 4b904: 246e 000c moveal %fp@(12),%a2 4b908: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b90c: 4a8a tstl %a2 4b90e: 6604 bnes 4b914 4b910: 7009 moveq #9,%d0 4b912: 6062 bras 4b976 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b914: 4eb9 0004 d348 jsr 4d348 <__errno> 4b91a: 2040 moveal %d0,%a0 *n = 0; 4b91c: 4280 clrl %d0 4b91e: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b920: 4290 clrl %a0@ *n = 0; 4b922: 2480 movel %d0,%a2@ 4b924: 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 ); 4b928: 2f2e 0014 movel %fp@(20),%sp@- 4b92c: 486e fffc pea %fp@(-4) 4b930: 2f02 movel %d2,%sp@- 4b932: 4eb9 0005 0370 jsr 50370 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b938: 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 ); 4b93c: 2600 movel %d0,%d3 4b93e: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b940: 4a8b tstl %a3 4b942: 6704 beqs 4b948 *endptr = end; 4b944: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b948: b4ae fffc cmpl %fp@(-4),%d2 4b94c: 6604 bnes 4b952 4b94e: 700b moveq #11,%d0 4b950: 6024 bras 4b976 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b952: 70ff moveq #-1,%d0 4b954: 72ff moveq #-1,%d1 4b956: 9284 subl %d4,%d1 4b958: 9183 subxl %d3,%d0 4b95a: 6612 bnes 4b96e 4b95c: 4eb9 0004 d348 jsr 4d348 <__errno> 4b962: 7222 moveq #34,%d1 4b964: 2040 moveal %d0,%a0 4b966: b290 cmpl %a0@,%d1 4b968: 6604 bnes 4b96e <== ALWAYS TAKEN 4b96a: 700a moveq #10,%d0 4b96c: 6008 bras 4b976 <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b96e: 4280 clrl %d0 4b970: 2483 movel %d3,%a2@ 4b972: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4b976: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4b97c: 4e5e unlk %fp 4b97e: 4e75 rts 000450e4 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 450e4: 4e56 ffe4 linkw %fp,#-28 450e8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 450ec: 266e 0008 moveal %fp@(8),%a3 450f0: 262e 000c movel %fp@(12),%d3 450f4: 242e 0014 movel %fp@(20),%d2 450f8: 282e 0018 movel %fp@(24),%d4 450fc: 286e 001c moveal %fp@(28),%a4 Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 45100: 4a8c tstl %a4 45102: 6606 bnes 4510a 45104: 7009 moveq #9,%d0 45106: 6000 00f6 braw 451fe return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 4510a: 4a8b tstl %a3 4510c: 6606 bnes 45114 4510e: 7003 moveq #3,%d0 45110: 6000 00ec braw 451fe /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 45114: 4a44 tstw %d4 45116: 6d1e blts 45136 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 45118: 4a83 tstl %d3 4511a: 6714 beqs 45130 4511c: 4280 clrl %d0 4511e: 1039 0005 a302 moveb 5a302 ,%d0 45124: b083 cmpl %d3,%d0 45126: 54c0 scc %d0 45128: 49c0 extbl %d0 4512a: 4480 negl %d0 if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) 4512c: 4a00 tstb %d0 4512e: 6606 bnes 45136 45130: 7013 moveq #19,%d0 45132: 6000 00ca braw 451fe */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 45136: 2f39 0005 bae6 movel 5bae6 <_RTEMS_Allocator_Mutex>,%sp@- 4513c: 4eb9 0004 57ec jsr 457ec <_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 ); 45142: 4879 0005 b9a8 pea 5b9a8 <_RTEMS_tasks_Information> 45148: 4eb9 0004 604c jsr 4604c <_Objects_Allocate> * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 4514e: 508f addql #8,%sp 45150: 2440 moveal %d0,%a2 45152: 4a80 tstl %d0 45154: 6614 bnes 4516a _RTEMS_Unlock_allocator(); 45156: 2f39 0005 bae6 movel 5bae6 <_RTEMS_Allocator_Mutex>,%sp@- 4515c: 4eb9 0004 584c jsr 4584c <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 45162: 588f addql #4,%sp */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 45164: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 45166: 6000 0096 braw 451fe <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 4516a: 7a07 moveq #7,%d5 4516c: 7009 moveq #9,%d0 4516e: 2202 movel %d2,%d1 45170: e0a9 lsrl %d0,%d1 45172: 2002 movel %d2,%d0 45174: e088 lsrl #8,%d0 45176: 2f0b movel %a3,%sp@- 45178: 47f9 0004 584c lea 4584c <_API_Mutex_Unlock>,%a3 4517e: ca82 andl %d2,%d5 45180: 2f05 movel %d5,%sp@- 45182: 7a01 moveq #1,%d5 45184: 42a7 clrl %sp@- 45186: ca81 andl %d1,%d5 45188: 7201 moveq #1,%d1 4518a: 2f05 movel %d5,%sp@- 4518c: 7a01 moveq #1,%d5 4518e: b380 eorl %d1,%d0 45190: ca80 andl %d0,%d5 45192: 7001 moveq #1,%d0 45194: 2f05 movel %d5,%sp@- 45196: c084 andl %d4,%d0 45198: 2f03 movel %d3,%sp@- 4519a: 2f00 movel %d0,%sp@- 4519c: 2f2e 0010 movel %fp@(16),%sp@- 451a0: 42a7 clrl %sp@- 451a2: 2f0a movel %a2,%sp@- 451a4: 4879 0005 b9a8 pea 5b9a8 <_RTEMS_tasks_Information> 451aa: 4eb9 0004 6d20 jsr 46d20 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 451b0: 4fef 002c lea %sp@(44),%sp 451b4: 4a00 tstb %d0 451b6: 6624 bnes 451dc */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 451b8: 2f2a 0008 movel %a2@(8),%sp@- 451bc: 4eb9 0004 63c4 jsr 463c4 <_Objects_Get_information_id> 451c2: 2f0a movel %a2,%sp@- 451c4: 2f00 movel %d0,%sp@- 451c6: 4eb9 0004 6340 jsr 46340 <_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(); 451cc: 2f39 0005 bae6 movel 5bae6 <_RTEMS_Allocator_Mutex>,%sp@- 451d2: 4e93 jsr %a3@ return RTEMS_UNSATISFIED; 451d4: 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(); 451d8: 700d moveq #13,%d0 return RTEMS_UNSATISFIED; 451da: 6022 bras 451fe <== ALWAYS TAKEN } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 451dc: 720a moveq #10,%d1 451de: e2aa lsrl %d1,%d2 451e0: 7a01 moveq #1,%d5 451e2: bb82 eorl %d5,%d2 451e4: 206a 0108 moveal %a2@(264),%a0 451e8: c485 andl %d5,%d2 *id = the_thread->Object.id; 451ea: 28aa 0008 movel %a2@(8),%a4@ } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 451ee: 1142 0008 moveb %d2,%a0@(8) ); } #endif _RTEMS_Unlock_allocator(); 451f2: 2f39 0005 bae6 movel 5bae6 <_RTEMS_Allocator_Mutex>,%sp@- 451f8: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 451fa: 588f addql #4,%sp ); } #endif _RTEMS_Unlock_allocator(); 451fc: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 451fe: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 45204: 4e5e unlk %fp 45206: 4e75 rts 00045208 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 45208: 4e56 fff0 linkw %fp,#-16 4520c: 48d7 1c00 moveml %a2-%a4,%sp@ register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 45210: 2f39 0005 bae6 movel 5bae6 <_RTEMS_Allocator_Mutex>,%sp@- 45216: 47f9 0004 584c lea 4584c <_API_Mutex_Unlock>,%a3 4521c: 4eb9 0004 57ec jsr 457ec <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 45222: 486e fffc pea %fp@(-4) 45226: 2f2e 0008 movel %fp@(8),%sp@- 4522a: 4eb9 0004 6c94 jsr 46c94 <_Thread_Get> switch ( location ) { 45230: 4fef 000c lea %sp@(12),%sp Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); 45234: 2440 moveal %d0,%a2 switch ( location ) { 45236: 4aae fffc tstl %fp@(-4) 4523a: 663c bnes 45278 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 4523c: 2f2a 0008 movel %a2@(8),%sp@- 45240: 49f9 0004 63c4 lea 463c4 <_Objects_Get_information_id>,%a4 45246: 4e94 jsr %a4@ 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 45248: 2f0a movel %a2,%sp@- 4524a: 2f00 movel %d0,%sp@- 4524c: 4eb9 0004 6960 jsr 46960 <_Thread_Close> 45252: 2f2a 0008 movel %a2@(8),%sp@- 45256: 4e94 jsr %a4@ 45258: 2f0a movel %a2,%sp@- 4525a: 2f00 movel %d0,%sp@- 4525c: 4eb9 0004 6340 jsr 46340 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 45262: 2f39 0005 bae6 movel 5bae6 <_RTEMS_Allocator_Mutex>,%sp@- 45268: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4526a: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45270: 4fef 001c lea %sp@(28),%sp _Thread_Close( the_information, the_thread ); _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 45274: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 45276: 600c bras 45284 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 45278: 2f39 0005 bae6 movel 5bae6 <_RTEMS_Allocator_Mutex>,%sp@- 4527e: 4e93 jsr %a3@ return RTEMS_INVALID_ID; 45280: 588f addql #4,%sp case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 45282: 7004 moveq #4,%d0 return RTEMS_INVALID_ID; } 45284: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 4528a: 4e5e unlk %fp 4528c: 4e75 rts ... 00046890 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 46890: 4e56 fffc linkw %fp,#-4 46894: 202e 0008 movel %fp@(8),%d0 46898: 2f0a movel %a2,%sp@- 4689a: 246e 0010 moveal %fp@(16),%a2 4689e: 2f02 movel %d2,%sp@- 468a0: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 468a4: 4a39 0005 c874 tstb 5c874 468aa: 6604 bnes 468b0 468ac: 7016 moveq #22,%d0 468ae: 605e bras 4690e <== ALWAYS TAKEN return RTEMS_NOT_CONFIGURED; if ( !note ) 468b0: 4a8a tstl %a2 468b2: 6604 bnes 468b8 468b4: 7009 moveq #9,%d0 468b6: 6056 bras 4690e <== ALWAYS TAKEN /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 468b8: 720f moveq #15,%d1 468ba: b282 cmpl %d2,%d1 468bc: 6404 bccs 468c2 468be: 700a moveq #10,%d0 468c0: 604c bras 4690e <== ALWAYS TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 468c2: 4a80 tstl %d0 468c4: 670c beqs 468d2 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 468c6: 2079 0005 e2fe moveal 5e2fe <_Thread_Executing>,%a0 468cc: b0a8 0008 cmpl %a0@(8),%d0 468d0: 6612 bnes 468e4 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 468d2: 2079 0005 e2fe moveal 5e2fe <_Thread_Executing>,%a0 468d8: 4280 clrl %d0 468da: 2068 0108 moveal %a0@(264),%a0 468de: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ return RTEMS_SUCCESSFUL; 468e2: 602a bras 4690e <== ALWAYS TAKEN } the_thread = _Thread_Get( id, &location ); 468e4: 486e fffc pea %fp@(-4) 468e8: 2f00 movel %d0,%sp@- 468ea: 4eb9 0004 855c jsr 4855c <_Thread_Get> switch ( location ) { 468f0: 508f addql #8,%sp 468f2: 4aae fffc tstl %fp@(-4) 468f6: 6704 beqs 468fc 468f8: 7004 moveq #4,%d0 468fa: 6012 bras 4690e <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 468fc: 2240 moveal %d0,%a1 468fe: 2069 0108 moveal %a1@(264),%a0 46902: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ _Thread_Enable_dispatch(); 46906: 4eb9 0004 8536 jsr 48536 <_Thread_Enable_dispatch> 4690c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4690e: 242e fff4 movel %fp@(-12),%d2 46912: 246e fff8 moveal %fp@(-8),%a2 46916: 4e5e unlk %fp 46918: 4e75 rts ... 00045290 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 45290: 4e56 0000 linkw %fp,#0 45294: 202e 0008 movel %fp@(8),%d0 45298: 206e 0010 moveal %fp@(16),%a0 Objects_Name_or_id_lookup_errors status; if ( !id ) 4529c: 4a88 tstl %a0 4529e: 6604 bnes 452a4 452a0: 7009 moveq #9,%d0 452a2: 6032 bras 452d6 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 452a4: 4a80 tstl %d0 452a6: 660c bnes 452b4 *id = _Thread_Executing->Object.id; 452a8: 2279 0005 baee moveal 5baee <_Thread_Executing>,%a1 452ae: 20a9 0008 movel %a1@(8),%a0@ return RTEMS_SUCCESSFUL; 452b2: 6022 bras 452d6 <== ALWAYS TAKEN } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 452b4: 2f08 movel %a0,%sp@- 452b6: 2f2e 000c movel %fp@(12),%sp@- 452ba: 2f00 movel %d0,%sp@- 452bc: 4879 0005 b9a8 pea 5b9a8 <_RTEMS_tasks_Information> 452c2: 4eb9 0004 65fc jsr 465fc <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 452c8: 4fef 0010 lea %sp@(16),%sp 452cc: 41f9 0005 93ec lea 593ec <_Status_Object_name_errors_to_status>,%a0 452d2: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 } 452d6: 4e5e unlk %fp 452d8: 4e75 rts ... 00050264 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 50264: 4e56 fffc linkw %fp,#-4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 50268: 486e fffc pea %fp@(-4) 5026c: 2f2e 0008 movel %fp@(8),%sp@- 50270: 4eb9 0005 37c0 jsr 537c0 <_Thread_Get> switch ( location ) { 50276: 508f addql #8,%sp 50278: 4aae fffc tstl %fp@(-4) 5027c: 6704 beqs 50282 5027e: 7004 moveq #4,%d0 50280: 601a bras 5029c <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 50282: 7202 moveq #2,%d1 50284: 2240 moveal %d0,%a1 50286: 41f9 0005 376a lea 5376a <_Thread_Enable_dispatch>,%a0 5028c: c2a9 0010 andl %a1@(16),%d1 50290: 6606 bnes 50298 _Thread_Enable_dispatch(); 50292: 4e90 jsr %a0@ 50294: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 50296: 6004 bras 5029c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 50298: 4e90 jsr %a0@ 5029a: 700f moveq #15,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5029c: 4e5e unlk %fp 5029e: 4e75 rts 0004b0a4 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4b0a4: 4e56 ffe4 linkw %fp,#-28 4b0a8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4b0ac: 262e 0008 movel %fp@(8),%d3 4b0b0: 282e 000c movel %fp@(12),%d4 4b0b4: 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 ) 4b0b8: 4a8c tstl %a4 4b0ba: 6606 bnes 4b0c2 4b0bc: 7009 moveq #9,%d0 4b0be: 6000 00fc braw 4b1bc <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4b0c2: 2479 0005 baee moveal 5baee <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4b0c8: 4a2a 0075 tstb %a2@(117) 4b0cc: 57c0 seq %d0 4b0ce: 243c 0000 0100 movel #256,%d2 4b0d4: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4b0d6: 266a 0108 moveal %a2@(264),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4b0da: c480 andl %d0,%d2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4b0dc: 4aaa 007a tstl %a2@(122) 4b0e0: 6704 beqs 4b0e6 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4b0e2: 08c2 0009 bset #9,%d2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4b0e6: 4a2b 0008 tstb %a3@(8) 4b0ea: 57c0 seq %d0 4b0ec: 2a3c 0000 0400 movel #1024,%d5 4b0f2: 49c0 extbl %d0 4b0f4: ca80 andl %d0,%d5 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4b0f6: 4eb9 0004 7f1c jsr 47f1c <_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; 4b0fc: 8085 orl %d5,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4b0fe: 8082 orl %d2,%d0 4b100: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4b102: 0804 0008 btst #8,%d4 4b106: 670e beqs 4b116 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4b108: 2003 movel %d3,%d0 4b10a: 7201 moveq #1,%d1 4b10c: e088 lsrl #8,%d0 4b10e: b380 eorl %d1,%d0 4b110: c081 andl %d1,%d0 4b112: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4b116: 0804 0009 btst #9,%d4 4b11a: 671c beqs 4b138 if ( _Modes_Is_timeslice(mode_set) ) { 4b11c: 0803 0009 btst #9,%d3 4b120: 6712 beqs 4b134 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4b122: 41f9 0005 b9e4 lea 5b9e4 <_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; 4b128: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4b12a: 2550 0076 movel %a0@,%a2@(118) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4b12e: 2540 007a movel %d0,%a2@(122) 4b132: 6004 bras 4b138 <== ALWAYS TAKEN executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4b134: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4b138: 7007 moveq #7,%d0 4b13a: c084 andl %d4,%d0 4b13c: 6712 beqs 4b150 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4b13e: 40c0 movew %sr,%d0 4b140: 7207 moveq #7,%d1 4b142: c283 andl %d3,%d1 4b144: 0280 0000 f8ff andil #63743,%d0 4b14a: e189 lsll #8,%d1 4b14c: 8081 orl %d1,%d0 4b14e: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4b150: 0804 000a btst #10,%d4 4b154: 6744 beqs 4b19a * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4b156: 700a moveq #10,%d0 4b158: e0ab lsrl %d0,%d3 4b15a: 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; 4b15c: 4280 clrl %d0 4b15e: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4b162: b383 eorl %d1,%d3 4b164: c681 andl %d1,%d3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4b166: b083 cmpl %d3,%d0 4b168: 6730 beqs 4b19a ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4b16a: 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; 4b170: 1743 0008 moveb %d3,%a3@(8) 4b174: 40c1 movew %sr,%d1 4b176: 8081 orl %d1,%d0 4b178: 46c0 movew %d0,%sr _signals = information->signals_pending; 4b17a: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4b17e: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4b184: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4b188: 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; 4b18a: 4aab 0012 tstl %a3@(18) 4b18e: 670a beqs 4b19a 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; 4b190: 7001 moveq #1,%d0 4b192: 7401 moveq #1,%d2 4b194: 1540 0074 moveb %d0,%a2@(116) 4b198: 6002 bras 4b19c <== ALWAYS TAKEN 4b19a: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4b19c: 7203 moveq #3,%d1 4b19e: b2b9 0005 bbb6 cmpl 5bbb6 <_System_state_Current>,%d1 4b1a4: 6614 bnes 4b1ba <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4b1a6: 4eb9 0004 b484 jsr 4b484 <_Thread_Evaluate_mode> 4b1ac: 4a00 tstb %d0 4b1ae: 6604 bnes 4b1b4 4b1b0: 4a02 tstb %d2 4b1b2: 6706 beqs 4b1ba _Thread_Dispatch(); 4b1b4: 4eb9 0004 6b1c jsr 46b1c <_Thread_Dispatch> 4b1ba: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4b1bc: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4b1c2: 4e5e unlk %fp 4b1c4: 4e75 rts ... 00045a10 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 45a10: 4e56 fffc linkw %fp,#-4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 45a14: 486e fffc pea %fp@(-4) 45a18: 2f2e 0008 movel %fp@(8),%sp@- 45a1c: 4eb9 0004 73a0 jsr 473a0 <_Thread_Get> switch ( location ) { 45a22: 508f addql #8,%sp 45a24: 4aae fffc tstl %fp@(-4) 45a28: 6704 beqs 45a2e 45a2a: 7004 moveq #4,%d0 45a2c: 6026 bras 45a54 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 45a2e: 2f2e 000c movel %fp@(12),%sp@- 45a32: 42a7 clrl %sp@- 45a34: 2f00 movel %d0,%sp@- 45a36: 4eb9 0004 7b00 jsr 47b00 <_Thread_Restart> 45a3c: 4fef 000c lea %sp@(12),%sp 45a40: 41f9 0004 737a lea 4737a <_Thread_Enable_dispatch>,%a0 45a46: 4a00 tstb %d0 45a48: 6706 beqs 45a50 <== ALWAYS TAKEN _Thread_Enable_dispatch(); 45a4a: 4e90 jsr %a0@ 45a4c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 45a4e: 6004 bras 45a54 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 45a50: 4e90 jsr %a0@ 45a52: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45a54: 4e5e unlk %fp 45a56: 4e75 rts 00048888 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 48888: 4e56 fffc linkw %fp,#-4 4888c: 2f0a movel %a2,%sp@- register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4888e: 486e fffc pea %fp@(-4) 48892: 2f2e 0008 movel %fp@(8),%sp@- 48896: 4eb9 0004 a3d8 jsr 4a3d8 <_Thread_Get> switch ( location ) { 4889c: 508f addql #8,%sp 4889e: 4aae fffc tstl %fp@(-4) 488a2: 6704 beqs 488a8 488a4: 7004 moveq #4,%d0 488a6: 6028 bras 488d0 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 488a8: 7202 moveq #2,%d1 488aa: 2040 moveal %d0,%a0 488ac: 45f9 0004 a382 lea 4a382 <_Thread_Enable_dispatch>,%a2 488b2: c2a8 0010 andl %a0@(16),%d1 488b6: 6714 beqs 488cc _Thread_Resume( the_thread, true ); 488b8: 4878 0001 pea 1 488bc: 2f00 movel %d0,%sp@- 488be: 4eb9 0004 ab38 jsr 4ab38 <_Thread_Resume> _Thread_Enable_dispatch(); 488c4: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 488c6: 508f addql #8,%sp switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); 488c8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 488ca: 6004 bras 488d0 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 488cc: 4e92 jsr %a2@ 488ce: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 488d0: 246e fff8 moveal %fp@(-8),%a2 488d4: 4e5e unlk %fp 488d6: 4e75 rts 000469fc : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 469fc: 4e56 fffc linkw %fp,#-4 46a00: 202e 0008 movel %fp@(8),%d0 46a04: 2f03 movel %d3,%sp@- 46a06: 262e 0010 movel %fp@(16),%d3 46a0a: 2f02 movel %d2,%sp@- 46a0c: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 46a10: 4a39 0005 c874 tstb 5c874 46a16: 6604 bnes 46a1c 46a18: 7016 moveq #22,%d0 46a1a: 6056 bras 46a72 <== ALWAYS TAKEN /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 46a1c: 720f moveq #15,%d1 46a1e: b282 cmpl %d2,%d1 46a20: 6404 bccs 46a26 46a22: 700a moveq #10,%d0 46a24: 604c bras 46a72 <== ALWAYS TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 46a26: 4a80 tstl %d0 46a28: 670c beqs 46a36 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 46a2a: 2079 0005 e2fe moveal 5e2fe <_Thread_Executing>,%a0 46a30: b0a8 0008 cmpl %a0@(8),%d0 46a34: 6612 bnes 46a48 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 46a36: 2079 0005 e2fe moveal 5e2fe <_Thread_Executing>,%a0 46a3c: 4280 clrl %d0 46a3e: 2068 0108 moveal %a0@(264),%a0 46a42: 2183 2c1e movel %d3,%a0@(0000001e,%d2:l:4) return RTEMS_SUCCESSFUL; 46a46: 602a bras 46a72 <== ALWAYS TAKEN } the_thread = _Thread_Get( id, &location ); 46a48: 486e fffc pea %fp@(-4) 46a4c: 2f00 movel %d0,%sp@- 46a4e: 4eb9 0004 855c jsr 4855c <_Thread_Get> switch ( location ) { 46a54: 508f addql #8,%sp 46a56: 4aae fffc tstl %fp@(-4) 46a5a: 6704 beqs 46a60 46a5c: 7004 moveq #4,%d0 46a5e: 6012 bras 46a72 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 46a60: 2240 moveal %d0,%a1 46a62: 2069 0108 moveal %a1@(264),%a0 46a66: 2183 2c1e movel %d3,%a0@(0000001e,%d2:l:4) _Thread_Enable_dispatch(); 46a6a: 4eb9 0004 8536 jsr 48536 <_Thread_Enable_dispatch> 46a70: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46a72: 242e fff4 movel %fp@(-12),%d2 46a76: 262e fff8 movel %fp@(-8),%d3 46a7a: 4e5e unlk %fp 46a7c: 4e75 rts ... 000494a4 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 494a4: 4e56 fffc linkw %fp,#-4 494a8: 2f0a movel %a2,%sp@- 494aa: 246e 0010 moveal %fp@(16),%a2 494ae: 2f02 movel %d2,%sp@- 494b0: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 494b4: 6710 beqs 494c6 494b6: 4280 clrl %d0 494b8: 1039 0005 f9d2 moveb 5f9d2 ,%d0 494be: b082 cmpl %d2,%d0 494c0: 6404 bccs 494c6 494c2: 7013 moveq #19,%d0 494c4: 6054 bras 4951a <== ALWAYS TAKEN !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 494c6: 4a8a tstl %a2 494c8: 6604 bnes 494ce 494ca: 7009 moveq #9,%d0 494cc: 604c bras 4951a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 494ce: 486e fffc pea %fp@(-4) 494d2: 2f2e 0008 movel %fp@(8),%sp@- 494d6: 4eb9 0004 b13c jsr 4b13c <_Thread_Get> switch ( location ) { 494dc: 508f addql #8,%sp return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 494de: 2040 moveal %d0,%a0 switch ( location ) { 494e0: 4aae fffc tstl %fp@(-4) 494e4: 6704 beqs 494ea 494e6: 7004 moveq #4,%d0 494e8: 6030 bras 4951a <== ALWAYS TAKEN case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 494ea: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 494ee: 4a82 tstl %d2 494f0: 6720 beqs 49512 the_thread->real_priority = new_priority; 494f2: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 494f6: 4aa8 001c tstl %a0@(28) 494fa: 6706 beqs 49502 the_thread->current_priority > new_priority ) 494fc: b4a8 0014 cmpl %a0@(20),%d2 49500: 6410 bccs 49512 <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 49502: 42a7 clrl %sp@- 49504: 2f02 movel %d2,%sp@- 49506: 2f08 movel %a0,%sp@- 49508: 4eb9 0004 abec jsr 4abec <_Thread_Change_priority> 4950e: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 49512: 4eb9 0004 b0e6 jsr 4b0e6 <_Thread_Enable_dispatch> 49518: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4951a: 242e fff4 movel %fp@(-12),%d2 4951e: 246e fff8 moveal %fp@(-8),%a2 49522: 4e5e unlk %fp 49524: 4e75 rts ... 00045360 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 45360: 4e56 fffc linkw %fp,#-4 45364: 2f02 movel %d2,%sp@- 45366: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 4536a: 6604 bnes 45370 4536c: 7009 moveq #9,%d0 4536e: 6044 bras 453b4 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 45370: 486e fffc pea %fp@(-4) 45374: 2f2e 0008 movel %fp@(8),%sp@- 45378: 4eb9 0004 6c94 jsr 46c94 <_Thread_Get> switch ( location ) { 4537e: 508f addql #8,%sp 45380: 4aae fffc tstl %fp@(-4) 45384: 6704 beqs 4538a 45386: 7004 moveq #4,%d0 45388: 602a bras 453b4 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( _Thread_Start( 4538a: 2f2e 0010 movel %fp@(16),%sp@- 4538e: 42a7 clrl %sp@- 45390: 2f02 movel %d2,%sp@- 45392: 42a7 clrl %sp@- 45394: 2f00 movel %d0,%sp@- 45396: 4eb9 0004 7690 jsr 47690 <_Thread_Start> 4539c: 4fef 0014 lea %sp@(20),%sp 453a0: 41f9 0004 6c6e lea 46c6e <_Thread_Enable_dispatch>,%a0 453a6: 4a00 tstb %d0 453a8: 6706 beqs 453b0 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 453aa: 4e90 jsr %a0@ 453ac: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 453ae: 6004 bras 453b4 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 453b0: 4e90 jsr %a0@ 453b2: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 453b4: 242e fff8 movel %fp@(-8),%d2 453b8: 4e5e unlk %fp 453ba: 4e75 rts 000453bc : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 453bc: 4e56 fffc linkw %fp,#-4 453c0: 2f0a movel %a2,%sp@- register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 453c2: 486e fffc pea %fp@(-4) 453c6: 2f2e 0008 movel %fp@(8),%sp@- 453ca: 4eb9 0004 6c94 jsr 46c94 <_Thread_Get> switch ( location ) { 453d0: 508f addql #8,%sp 453d2: 4aae fffc tstl %fp@(-4) 453d6: 6704 beqs 453dc 453d8: 7004 moveq #4,%d0 453da: 6024 bras 45400 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 453dc: 7202 moveq #2,%d1 453de: 2040 moveal %d0,%a0 453e0: 45f9 0004 6c6e lea 46c6e <_Thread_Enable_dispatch>,%a2 453e6: c2a8 0010 andl %a0@(16),%d1 453ea: 6610 bnes 453fc _Thread_Suspend( the_thread ); 453ec: 2f00 movel %d0,%sp@- 453ee: 4eb9 0004 76e0 jsr 476e0 <_Thread_Suspend> _Thread_Enable_dispatch(); 453f4: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 453f6: 588f addql #4,%sp switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); 453f8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 453fa: 6004 bras 45400 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 453fc: 4e92 jsr %a2@ 453fe: 700f moveq #15,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45400: 246e fff8 moveal %fp@(-8),%a2 45404: 4e5e unlk %fp 45406: 4e75 rts 00062bc4 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 62bc4: 4e56 fff0 linkw %fp,#-16 62bc8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 62bcc: 246e 000c moveal %fp@(12),%a2 62bd0: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 62bd4: 4a8a tstl %a2 62bd6: 6604 bnes 62bdc 62bd8: 7009 moveq #9,%d0 62bda: 6070 bras 62c4c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 62bdc: 486e fffc pea %fp@(-4) 62be0: 2f2e 0008 movel %fp@(8),%sp@- 62be4: 4eb9 0004 c2cc jsr 4c2cc <_Thread_Get> switch (location) { 62bea: 508f addql #8,%sp rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 62bec: 2640 moveal %d0,%a3 switch (location) { 62bee: 4aae fffc tstl %fp@(-4) 62bf2: 6704 beqs 62bf8 62bf4: 7004 moveq #4,%d0 62bf6: 6054 bras 62c4c <== ALWAYS TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 62bf8: 206b 0118 moveal %a3@(280),%a0 while (tvp) { 62bfc: 6014 bras 62c12 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 62bfe: b5e8 0004 cmpal %a0@(4),%a2 62c02: 660c bnes 62c10 tvp->dtor = dtor; 62c04: 2142 0010 movel %d2,%a0@(16) _Thread_Enable_dispatch(); 62c08: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> 62c0e: 603a bras 62c4a <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 62c10: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 62c12: 4a88 tstl %a0 62c14: 66e8 bnes 62bfe } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 62c16: 4878 0014 pea 14 62c1a: 4eb9 0004 d3f8 jsr 4d3f8 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 62c20: 588f addql #4,%sp 62c22: 43f9 0004 c2a6 lea 4c2a6 <_Thread_Enable_dispatch>,%a1 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 62c28: 2040 moveal %d0,%a0 _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 62c2a: 4a80 tstl %d0 62c2c: 6606 bnes 62c34 _Thread_Enable_dispatch(); 62c2e: 4e91 jsr %a1@ 62c30: 701a moveq #26,%d0 return RTEMS_NO_MEMORY; 62c32: 6018 bras 62c4c <== ALWAYS TAKEN } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 62c34: 20ab 0118 movel %a3@(280),%a0@ _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 62c38: 2152 0008 movel %a2@,%a0@(8) new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 62c3c: 2740 0118 movel %d0,%a3@(280) if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; new->ptr = ptr; 62c40: 214a 0004 movel %a2,%a0@(4) new->dtor = dtor; 62c44: 2142 0010 movel %d2,%a0@(16) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; _Thread_Enable_dispatch(); 62c48: 4e91 jsr %a1@ 62c4a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 62c4c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 62c52: 4e5e unlk %fp 62c54: 4e75 rts ... 00062c58 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 62c58: 4e56 fffc linkw %fp,#-4 62c5c: 2f02 movel %d2,%sp@- 62c5e: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 62c62: 675c beqs 62cc0 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 62c64: 486e fffc pea %fp@(-4) 62c68: 2f2e 0008 movel %fp@(8),%sp@- 62c6c: 4eb9 0004 c2cc jsr 4c2cc <_Thread_Get> switch (location) { 62c72: 508f addql #8,%sp 62c74: 4aae fffc tstl %fp@(-4) 62c78: 6704 beqs 62c7e 62c7a: 7004 moveq #4,%d0 62c7c: 6044 bras 62cc2 <== ALWAYS TAKEN case OBJECTS_LOCAL: tvp = the_thread->task_variables; 62c7e: 2240 moveal %d0,%a1 62c80: 2069 0118 moveal %a1@(280),%a0 62c84: 93c9 subal %a1,%a1 while (tvp) { 62c86: 602e bras 62cb6 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 62c88: b4a8 0004 cmpl %a0@(4),%d2 62c8c: 6624 bnes 62cb2 if (prev) 62c8e: 4a89 tstl %a1 62c90: 6704 beqs 62c96 prev->next = tvp->next; 62c92: 2290 movel %a0@,%a1@ 62c94: 6006 bras 62c9c <== ALWAYS TAKEN else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 62c96: 2240 moveal %d0,%a1 62c98: 2350 0118 movel %a0@,%a1@(280) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 62c9c: 2f08 movel %a0,%sp@- 62c9e: 2f00 movel %d0,%sp@- 62ca0: 4eb9 0006 2d34 jsr 62d34 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 62ca6: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 62cac: 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(); 62cae: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 62cb0: 6010 bras 62cc2 <== ALWAYS TAKEN } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 62cb2: 2248 moveal %a0,%a1 62cb4: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 62cb6: 4a88 tstl %a0 62cb8: 66ce bnes 62c88 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 62cba: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> 62cc0: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 62cc2: 242e fff8 movel %fp@(-8),%d2 62cc6: 4e5e unlk %fp 62cc8: 4e75 rts ... 00062ccc : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 62ccc: 4e56 fffc linkw %fp,#-4 62cd0: 2f0a movel %a2,%sp@- 62cd2: 246e 0010 moveal %fp@(16),%a2 62cd6: 2f02 movel %d2,%sp@- 62cd8: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 62cdc: 6746 beqs 62d24 return RTEMS_INVALID_ADDRESS; if ( !result ) 62cde: 4a8a tstl %a2 62ce0: 6742 beqs 62d24 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 62ce2: 486e fffc pea %fp@(-4) 62ce6: 2f2e 0008 movel %fp@(8),%sp@- 62cea: 4eb9 0004 c2cc jsr 4c2cc <_Thread_Get> switch (location) { 62cf0: 508f addql #8,%sp 62cf2: 4aae fffc tstl %fp@(-4) 62cf6: 6704 beqs 62cfc 62cf8: 7004 moveq #4,%d0 62cfa: 602a bras 62d26 <== ALWAYS TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 62cfc: 2240 moveal %d0,%a1 62cfe: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 62d02: 6016 bras 62d1a <== ALWAYS TAKEN if (tvp->ptr == ptr) { 62d04: b4a8 0004 cmpl %a0@(4),%d2 62d08: 660e bnes 62d18 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 62d0a: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 62d0e: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> 62d14: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 62d16: 600e bras 62d26 <== ALWAYS TAKEN } tvp = (rtems_task_variable_t *)tvp->next; 62d18: 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) { 62d1a: 4a88 tstl %a0 62d1c: 66e6 bnes 62d04 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 62d1e: 4eb9 0004 c2a6 jsr 4c2a6 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 62d24: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 62d26: 242e fff4 movel %fp@(-12),%d2 62d2a: 246e fff8 moveal %fp@(-8),%a2 62d2e: 4e5e unlk %fp 62d30: 4e75 rts ... 00045408 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 45408: 4e56 0000 linkw %fp,#0 4540c: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 45412: 5280 addql #1,%d0 45414: 2f02 movel %d2,%sp@- 45416: 242e 0008 movel %fp@(8),%d2 4541a: 23c0 0005 ba34 movel %d0,5ba34 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( ticks == 0 ) { 45420: 4a82 tstl %d2 45422: 6608 bnes 4542c _Thread_Yield_processor(); 45424: 4eb9 0004 780c jsr 4780c <_Thread_Yield_processor> 4542a: 6048 bras 45474 <== ALWAYS TAKEN } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 4542c: 4878 0008 pea 8 45430: 2f39 0005 baee movel 5baee <_Thread_Executing>,%sp@- 45436: 4eb9 0004 7464 jsr 47464 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 4543c: 2079 0005 baee moveal 5baee <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 45442: 203c 0004 6ae0 movel #289504,%d0 45448: 2140 0064 movel %d0,%a0@(100) _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 4544c: 2028 0008 movel %a0@(8),%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 45450: 2142 0054 movel %d2,%a0@(84) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 45454: 2140 0068 movel %d0,%a0@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45458: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4545c: 42a8 006c clrl %a0@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45460: 4868 0048 pea %a0@(72) 45464: 4879 0005 bb0c pea 5bb0c <_Watchdog_Ticks_chain> 4546a: 4eb9 0004 7b78 jsr 47b78 <_Watchdog_Insert> 45470: 4fef 0010 lea %sp@(16),%sp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 45474: 4eb9 0004 6c6e jsr 46c6e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 4547a: 242e fffc movel %fp@(-4),%d2 4547e: 4280 clrl %d0 45480: 4e5e unlk %fp 45482: 4e75 rts 00045f9c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 45f9c: 4e56 0000 linkw %fp,#0 45fa0: 2f0a movel %a2,%sp@- 45fa2: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval seconds; if ( !_TOD_Is_set ) 45fa6: 4a39 0005 cf90 tstb 5cf90 <_TOD_Is_set> 45fac: 6606 bnes 45fb4 45fae: 700b moveq #11,%d0 45fb0: 6000 009a braw 4604c <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !time_buffer ) 45fb4: 4a8a tstl %a2 45fb6: 6606 bnes 45fbe 45fb8: 7009 moveq #9,%d0 45fba: 6000 0090 braw 4604c <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 45fbe: 42aa 0018 clrl %a2@(24) if ( !_TOD_Validate( time_buffer ) ) 45fc2: 2f0a movel %a2,%sp@- 45fc4: 4eb9 0004 5458 jsr 45458 <_TOD_Validate> 45fca: 588f addql #4,%sp 45fcc: 4a00 tstb %d0 45fce: 677a beqs 4604a return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 45fd0: 2f0a movel %a2,%sp@- 45fd2: 4eb9 0004 53b8 jsr 453b8 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 45fd8: 588f addql #4,%sp time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 45fda: 2440 moveal %d0,%a2 if ( seconds <= _TOD_Seconds_since_epoch() ) 45fdc: b0b9 0005 d00e cmpl 5d00e <_TOD_Now>,%d0 45fe2: 6366 blss 4604a 45fe4: 2039 0005 cf7c movel 5cf7c <_Thread_Dispatch_disable_level>,%d0 45fea: 5280 addql #1,%d0 45fec: 23c0 0005 cf7c movel %d0,5cf7c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 45ff2: 4878 0010 pea 10 45ff6: 2f39 0005 d036 movel 5d036 <_Thread_Executing>,%sp@- 45ffc: 4eb9 0004 8098 jsr 48098 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 46002: 2079 0005 d036 moveal 5d036 <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46008: 203c 0004 7714 movel #292628,%d0 4600e: 2140 0064 movel %d0,%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( 46012: 2028 0008 movel %a0@(8),%d0 the_watchdog->id = id; 46016: 2140 0068 movel %d0,%a0@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4601a: 95f9 0005 d00e subal 5d00e <_TOD_Now>,%a2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46020: 42a8 0050 clrl %a0@(80) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46024: 214a 0054 movel %a2,%a0@(84) ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 46028: 42a8 006c clrl %a0@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4602c: 4868 0048 pea %a0@(72) 46030: 4879 0005 d048 pea 5d048 <_Watchdog_Seconds_chain> 46036: 4eb9 0004 882c jsr 4882c <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 4603c: 4eb9 0004 78a2 jsr 478a2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46042: 4fef 0010 lea %sp@(16),%sp ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 46046: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 46048: 6002 bras 4604c <== ALWAYS TAKEN 4604a: 7014 moveq #20,%d0 } 4604c: 246e fffc moveal %fp@(-4),%a2 46050: 4e5e unlk %fp 46052: 4e75 rts 00043e6c : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 43e6c: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 43e6e: 4e56 0000 linkw %fp,#0 43e72: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 43e76: b280 cmpl %d0,%d1 43e78: 6700 00ce beqw 43f48 <== ALWAYS TAKEN 43e7c: 6d54 blts 43ed2 <== ALWAYS TAKEN 43e7e: 123c 0004 moveb #4,%d1 43e82: b280 cmpl %d0,%d1 43e84: 6700 00ae beqw 43f34 <== ALWAYS TAKEN 43e88: 6d2a blts 43eb4 <== ALWAYS TAKEN 43e8a: 123c 0001 moveb #1,%d1 43e8e: b280 cmpl %d0,%d1 43e90: 6700 0092 beqw 43f24 <== ALWAYS TAKEN 43e94: 6d0a blts 43ea0 <== ALWAYS TAKEN 43e96: 4a80 tstl %d0 43e98: 6700 008e beqw 43f28 <== ALWAYS TAKEN 43e9c: 6000 00d6 braw 43f74 <== ALWAYS TAKEN 43ea0: 7202 moveq #2,%d1 <== NOT EXECUTED 43ea2: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ea4: 6700 0086 beqw 43f2c <== NOT EXECUTED 43ea8: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 43eac: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eae: 6600 00c4 bnew 43f74 <== NOT EXECUTED 43eb2: 607c bras 43f30 <== NOT EXECUTED 43eb4: 7206 moveq #6,%d1 <== NOT EXECUTED 43eb6: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eb8: 6700 0082 beqw 43f3c <== NOT EXECUTED 43ebc: 6e7a bgts 43f38 <== NOT EXECUTED 43ebe: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 43ec2: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ec4: 677a beqs 43f40 <== NOT EXECUTED 43ec6: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 43eca: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ecc: 6600 00a6 bnew 43f74 <== NOT EXECUTED 43ed0: 6072 bras 43f44 <== NOT EXECUTED 43ed2: 720e moveq #14,%d1 <== NOT EXECUTED 43ed4: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ed6: 6700 0084 beqw 43f5c <== NOT EXECUTED 43eda: 6d1c blts 43ef8 <== NOT EXECUTED 43edc: 123c 000b moveb #11,%d1 <== NOT EXECUTED 43ee0: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ee2: 676c beqs 43f50 <== NOT EXECUTED 43ee4: 6e66 bgts 43f4c <== NOT EXECUTED 43ee6: 123c 000c moveb #12,%d1 <== NOT EXECUTED 43eea: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eec: 6766 beqs 43f54 <== NOT EXECUTED 43eee: 123c 000d moveb #13,%d1 <== NOT EXECUTED 43ef2: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ef4: 667e bnes 43f74 <== NOT EXECUTED 43ef6: 6060 bras 43f58 <== NOT EXECUTED 43ef8: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 43efe: 6768 beqs 43f68 <== NOT EXECUTED 43f00: 6e10 bgts 43f12 <== NOT EXECUTED 43f02: 720f moveq #15,%d1 <== NOT EXECUTED 43f04: b280 cmpl %d0,%d1 <== NOT EXECUTED 43f06: 6758 beqs 43f60 <== NOT EXECUTED 43f08: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 43f0e: 6664 bnes 43f74 <== NOT EXECUTED 43f10: 6052 bras 43f64 <== NOT EXECUTED 43f12: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 43f18: 6752 beqs 43f6c <== NOT EXECUTED 43f1a: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 43f20: 6652 bnes 43f74 <== NOT EXECUTED 43f22: 604c bras 43f70 <== NOT EXECUTED 43f24: 7001 moveq #1,%d0 <== NOT EXECUTED 43f26: 604e bras 43f76 <== NOT EXECUTED 43f28: 4280 clrl %d0 <== NOT EXECUTED 43f2a: 604a bras 43f76 <== NOT EXECUTED 43f2c: 7002 moveq #2,%d0 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 43f2e: 6046 bras 43f76 <== NOT EXECUTED 43f30: 7003 moveq #3,%d0 <== NOT EXECUTED case B110: baud_index = 3; break; 43f32: 6042 bras 43f76 <== NOT EXECUTED 43f34: 7004 moveq #4,%d0 <== NOT EXECUTED case B134: baud_index = 4; break; 43f36: 603e bras 43f76 <== NOT EXECUTED 43f38: 7005 moveq #5,%d0 <== NOT EXECUTED case B150: baud_index = 5; break; 43f3a: 603a bras 43f76 <== NOT EXECUTED 43f3c: 7006 moveq #6,%d0 <== NOT EXECUTED case B200: baud_index = 6; break; 43f3e: 6036 bras 43f76 <== NOT EXECUTED 43f40: 7007 moveq #7,%d0 <== NOT EXECUTED case B300: baud_index = 7; break; 43f42: 6032 bras 43f76 <== NOT EXECUTED 43f44: 7008 moveq #8,%d0 <== NOT EXECUTED case B600: baud_index = 8; break; 43f46: 602e bras 43f76 <== NOT EXECUTED 43f48: 7009 moveq #9,%d0 <== NOT EXECUTED case B1200: baud_index = 9; break; 43f4a: 602a bras 43f76 <== NOT EXECUTED 43f4c: 700a moveq #10,%d0 <== NOT EXECUTED case B1800: baud_index = 10; break; 43f4e: 6026 bras 43f76 <== NOT EXECUTED 43f50: 700b moveq #11,%d0 <== NOT EXECUTED case B2400: baud_index = 11; break; 43f52: 6022 bras 43f76 <== NOT EXECUTED 43f54: 700c moveq #12,%d0 <== NOT EXECUTED case B4800: baud_index = 12; break; 43f56: 601e bras 43f76 <== NOT EXECUTED 43f58: 700d moveq #13,%d0 <== NOT EXECUTED case B9600: baud_index = 13; break; 43f5a: 601a bras 43f76 <== NOT EXECUTED 43f5c: 700e moveq #14,%d0 <== NOT EXECUTED case B19200: baud_index = 14; break; 43f5e: 6016 bras 43f76 <== NOT EXECUTED 43f60: 700f moveq #15,%d0 <== NOT EXECUTED case B38400: baud_index = 15; break; 43f62: 6012 bras 43f76 <== NOT EXECUTED 43f64: 7010 moveq #16,%d0 <== NOT EXECUTED case B57600: baud_index = 16; break; 43f66: 600e bras 43f76 <== NOT EXECUTED 43f68: 7011 moveq #17,%d0 <== NOT EXECUTED case B115200: baud_index = 17; break; 43f6a: 600a bras 43f76 <== NOT EXECUTED 43f6c: 7012 moveq #18,%d0 <== NOT EXECUTED case B230400: baud_index = 18; break; 43f6e: 6006 bras 43f76 <== NOT EXECUTED 43f70: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; 43f72: 6002 bras 43f76 <== NOT EXECUTED 43f74: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 43f76: 4e5e unlk %fp 43f78: 4e75 rts ... 00042d48 : 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; 42d48: 203c 0000 04b0 movel #1200,%d0 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 42d4e: 4e56 0000 linkw %fp,#0 42d52: 222e 0008 movel %fp@(8),%d1 42d56: 2f02 movel %d2,%sp@- int32_t baud; switch (termios_baud) { 42d58: 7409 moveq #9,%d2 42d5a: b481 cmpl %d1,%d2 42d5c: 6700 0108 beqw 42e66 <== ALWAYS TAKEN 42d60: 6d6c blts 42dce <== ALWAYS TAKEN 42d62: 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; 42d66: 303c 0086 movew #134,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42d6a: b481 cmpl %d1,%d2 42d6c: 6700 00f8 beqw 42e66 <== ALWAYS TAKEN 42d70: 6d2a blts 42d9c 42d72: 103c 0001 moveb #1,%d0 42d76: b081 cmpl %d1,%d0 42d78: 6700 00da beqw 42e54 <== ALWAYS TAKEN 42d7c: 6d0a blts 42d88 42d7e: 4a81 tstl %d1 42d80: 6700 00d6 beqw 42e58 <== ALWAYS TAKEN 42d84: 6000 00de braw 42e64 42d88: 7402 moveq #2,%d2 42d8a: b481 cmpl %d1,%d2 42d8c: 6700 00ce beqw 42e5c <== ALWAYS TAKEN 42d90: 7003 moveq #3,%d0 42d92: b081 cmpl %d1,%d0 42d94: 6600 00ce bnew 42e64 <== ALWAYS TAKEN 42d98: 6000 00c6 braw 42e60 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; 42d9c: 203c 0000 00c8 movel #200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42da2: 7406 moveq #6,%d2 42da4: b481 cmpl %d1,%d2 42da6: 6700 00be beqw 42e66 <== 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; 42daa: 0680 ffff ffce addil #-50,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42db0: b481 cmpl %d1,%d2 42db2: 6e00 00b2 bgtw 42e66 <== ALWAYS TAKEN 42db6: 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; 42dba: 303c 012c movew #300,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42dbe: b481 cmpl %d1,%d2 42dc0: 6700 00a4 beqw 42e66 <== ALWAYS TAKEN 42dc4: 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; 42dc8: 303c 0258 movew #600,%d0 42dcc: 6038 bras 42e06 <== ALWAYS TAKEN 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; 42dce: 203c 0000 4b00 movel #19200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42dd4: 740e moveq #14,%d2 42dd6: b481 cmpl %d1,%d2 42dd8: 6700 008c beqw 42e66 42ddc: 6d2e blts 42e0c 42dde: 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; 42de2: 303c 0960 movew #2400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42de6: b481 cmpl %d1,%d2 42de8: 677c beqs 42e66 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; 42dea: 303c 0708 movew #1800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42dee: b481 cmpl %d1,%d2 42df0: 6e74 bgts 42e66 42df2: 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; 42df6: 303c 12c0 movew #4800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42dfa: b481 cmpl %d1,%d2 42dfc: 6768 beqs 42e66 42dfe: 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; 42e02: 303c 2580 movew #9600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e06: b481 cmpl %d1,%d2 42e08: 665a bnes 42e64 <== ALWAYS TAKEN 42e0a: 605a bras 42e66 <== ALWAYS TAKEN 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; 42e0c: 203c 0001 c200 movel #115200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e12: 0c81 0000 1002 cmpil #4098,%d1 42e18: 674c beqs 42e66 42e1a: 6e1a bgts 42e36 42e1c: 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; 42e1e: 203c 0000 9600 movel #38400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e24: b481 cmpl %d1,%d2 42e26: 673e beqs 42e66 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; 42e28: 303c e100 movew #-7936,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e2c: 0c81 0000 1001 cmpil #4097,%d1 42e32: 6630 bnes 42e64 <== ALWAYS TAKEN 42e34: 6030 bras 42e66 <== 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; 42e36: 203c 0003 8400 movel #230400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e3c: 0c81 0000 1003 cmpil #4099,%d1 42e42: 6722 beqs 42e66 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; 42e44: 203c 0007 0800 movel #460800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e4a: 0c81 0000 1004 cmpil #4100,%d1 42e50: 6612 bnes 42e64 <== ALWAYS TAKEN 42e52: 6012 bras 42e66 <== ALWAYS TAKEN 42e54: 7032 moveq #50,%d0 42e56: 600e bras 42e66 <== ALWAYS TAKEN 42e58: 4280 clrl %d0 42e5a: 600a bras 42e66 <== ALWAYS TAKEN 42e5c: 704b moveq #75,%d0 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 42e5e: 6006 bras 42e66 <== ALWAYS TAKEN 42e60: 706e moveq #110,%d0 case B110: baud = 110; break; 42e62: 6002 bras 42e66 <== ALWAYS TAKEN case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 42e64: 70ff moveq #-1,%d0 default: baud = -1; break; } return baud; } 42e66: 241f movel %sp@+,%d2 42e68: 4e5e unlk %fp 42e6a: 4e75 rts 00042ea8 : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 42ea8: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 42eaa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 42eae: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 42eb2: 23d0 0005 a354 movel %a0@,5a354 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 42eb8: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 42ebc: 23d0 0005 a358 movel %a0@,5a358 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 42ec2: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42ec6: 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; 42ec8: 23d0 0005 a35c movel %a0@,5a35c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42ece: 4e75 rts 00044090 : } } rtems_status_code rtems_termios_close (void *arg) { 44090: 4e56 fff4 linkw %fp,#-12 44094: 48d7 1c00 moveml %a2-%a4,%sp@ 44098: 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); 4409c: 49f9 0004 4f30 lea 44f30 ,%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; 440a2: 2053 moveal %a3@,%a0 440a4: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 440a8: 42a7 clrl %sp@- 440aa: 42a7 clrl %sp@- 440ac: 2f39 0005 b91c movel 5b91c ,%sp@- 440b2: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 440b4: 4fef 000c lea %sp@(12),%sp 440b8: 4a80 tstl %d0 440ba: 6670 bnes 4412c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 440bc: 202a 0008 movel %a2@(8),%d0 440c0: 5380 subql #1,%d0 440c2: 2540 0008 movel %d0,%a2@(8) 440c6: 6600 0110 bnew 441d8 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 440ca: 202a 00cc movel %a2@(204),%d0 440ce: 41f9 0005 b0d8 lea 5b0d8 ,%a0 440d4: e788 lsll #3,%d0 440d6: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 440da: 4a88 tstl %a0 440dc: 6706 beqs 440e4 <== NEVER TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 440de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 440e0: 4e90 jsr %a0@ <== NOT EXECUTED 440e2: 6018 bras 440fc <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 440e4: 42a7 clrl %sp@- 440e6: 42a7 clrl %sp@- 440e8: 2f2a 0018 movel %a2@(24),%sp@- 440ec: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 440ee: 4fef 000c lea %sp@(12),%sp 440f2: 4a80 tstl %d0 440f4: 6636 bnes 4412c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 440f6: 2f0a movel %a2,%sp@- 440f8: 4eba f940 jsr %pc@(43a3a ) 440fc: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts 440fe: 7002 moveq #2,%d0 44100: b0aa 00b4 cmpl %a2@(180),%d0 44104: 662e bnes 44134 <== NEVER TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 44106: 4878 0001 pea 1 <== NOT EXECUTED 4410a: 49f9 0004 4adc lea 44adc ,%a4 <== NOT EXECUTED 44110: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44114: 4e94 jsr %a4@ <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44116: 508f addql #8,%sp <== NOT EXECUTED 44118: 4a80 tstl %d0 <== NOT EXECUTED 4411a: 6610 bnes 4412c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 4411c: 4878 0001 pea 1 <== NOT EXECUTED 44120: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44124: 4e94 jsr %a4@ <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44126: 508f addql #8,%sp <== NOT EXECUTED 44128: 4a80 tstl %d0 <== NOT EXECUTED 4412a: 6708 beqs 44134 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4412c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4412e: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED } if (tty->device.lastClose) 44134: 206a 009c moveal %a2@(156),%a0 44138: 4a88 tstl %a0 4413a: 6710 beqs 4414c (*tty->device.lastClose)(tty->major, tty->minor, arg); 4413c: 2f0b movel %a3,%sp@- 4413e: 2f2a 0010 movel %a2@(16),%sp@- 44142: 2f2a 000c movel %a2@(12),%sp@- 44146: 4e90 jsr %a0@ 44148: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 4414c: 2052 moveal %a2@,%a0 4414e: 4a88 tstl %a0 44150: 6610 bnes 44162 rtems_termios_ttyTail = tty->back; 44152: 206a 0004 moveal %a2@(4),%a0 44156: 23c8 0005 b920 movel %a0,5b920 if ( rtems_termios_ttyTail != NULL ) { 4415c: 670a beqs 44168 <== NEVER TAKEN rtems_termios_ttyTail->forw = NULL; 4415e: 4290 clrl %a0@ <== NOT EXECUTED 44160: 6006 bras 44168 <== NOT EXECUTED } } else { tty->forw->back = tty->back; 44162: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 44168: 206a 0004 moveal %a2@(4),%a0 4416c: 4a88 tstl %a0 4416e: 6610 bnes 44180 <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; 44170: 2052 moveal %a2@,%a0 44172: 23c8 0005 b924 movel %a0,5b924 if ( rtems_termios_ttyHead != NULL ) { 44178: 6708 beqs 44182 rtems_termios_ttyHead->back = NULL; 4417a: 42a8 0004 clrl %a0@(4) 4417e: 6002 bras 44182 <== ALWAYS TAKEN } } else { tty->back->forw = tty->forw; 44180: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 44182: 2f2a 0014 movel %a2@(20),%sp@- 44186: 47f9 0004 4e94 lea 44e94 ,%a3 4418c: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 4418e: 2f2a 0018 movel %a2@(24),%sp@- 44192: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 44194: 2f2a 008c movel %a2@(140),%sp@- 44198: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 4419a: 4fef 000c lea %sp@(12),%sp 4419e: 4aaa 00a0 tstl %a2@(160) 441a2: 6708 beqs 441ac (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 441a4: 7002 moveq #2,%d0 441a6: b0aa 00b4 cmpl %a2@(180),%d0 441aa: 660c bnes 441b8 <== NEVER TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); 441ac: 2f2a 0068 movel %a2@(104),%sp@- 441b0: 4eb9 0004 4e94 jsr 44e94 441b6: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 441b8: 2f2a 0058 movel %a2@(88),%sp@- 441bc: 47f9 0004 8e80 lea 48e80 ,%a3 441c2: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 441c4: 2f2a 007c movel %a2@(124),%sp@- 441c8: 4e93 jsr %a3@ free (tty->cbuf); 441ca: 2f2a 001c movel %a2@(28),%sp@- 441ce: 4e93 jsr %a3@ free (tty); 441d0: 2f0a movel %a2,%sp@- 441d2: 4e93 jsr %a3@ 441d4: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 441d8: 2f39 0005 b91c movel 5b91c ,%sp@- 441de: 4eb9 0004 5034 jsr 45034 return RTEMS_SUCCESSFUL; } 441e4: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 441ea: 4280 clrl %d0 441ec: 4e5e unlk %fp 441ee: 4e75 rts 000430a6 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 430a6: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 430aa: 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) { 430ae: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 430b2: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 430b6: 7002 moveq #2,%d0 430b8: b0a8 00b4 cmpl %a0@(180),%d0 430bc: 661c bnes 430da <== NEVER TAKEN /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 430be: 4878 0002 pea 2 <== NOT EXECUTED 430c2: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 430c6: 4eb9 0004 4adc jsr 44adc <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 430cc: 508f addql #8,%sp <== NOT EXECUTED 430ce: 4a80 tstl %d0 <== NOT EXECUTED 430d0: 672e beqs 43100 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 430d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 430d4: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 430da: 7005 moveq #5,%d0 430dc: b0a8 00cc cmpl %a0@(204),%d0 430e0: 6612 bnes 430f4 <== NEVER TAKEN /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 430e2: 2279 0005 b18c moveal 5b18c ,%a1 <== NOT EXECUTED 430e8: 4a89 tstl %a1 <== NOT EXECUTED 430ea: 6714 beqs 43100 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 430ec: 2f08 movel %a0,%sp@- <== NOT EXECUTED 430ee: 4e91 jsr %a1@ <== NOT EXECUTED 430f0: 588f addql #4,%sp <== NOT EXECUTED 430f2: 600c bras 43100 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 430f4: 2d48 0008 movel %a0,%fp@(8) } } 430f8: 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); 430fa: 4ef9 0004 2eec jmp 42eec } } 43100: 4280 clrl %d0 <== NOT EXECUTED 43102: 4e5e unlk %fp <== NOT EXECUTED 43104: 4e75 rts 00043106 : * 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) { 43106: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4310a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4310e: 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) { 43112: 49f9 0005 b0d8 lea 5b0d8 ,%a4 <== NOT EXECUTED 43118: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 4311c: 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) { 43120: 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) { 43122: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43126: 4ab4 0810 tstl %a4@(00000010,%d0:l) <== NOT EXECUTED 4312a: 6634 bnes 43160 <== 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); 4312c: 2802 movel %d2,%d4 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 4312e: 4bea 004a lea %a2@(74),%a5 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43132: 49ea 0030 lea %a2@(48),%a4 <== NOT EXECUTED 43136: 4282 clrl %d2 <== NOT EXECUTED } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); 43138: 2c3c 0000 0700 movel #1792,%d6 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4313e: 4200 clrb %d0 <== NOT EXECUTED 43140: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED 43144: 6000 01f2 braw 43338 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 43148: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4314c: 5382 subql #1,%d2 <== NOT EXECUTED 4314e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43150: 121b moveb %a3@+,%d1 <== NOT EXECUTED 43152: eb88 lsll #5,%d0 <== NOT EXECUTED 43154: 49c1 extbl %d1 <== NOT EXECUTED 43156: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43158: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED 4315c: 4e90 jsr %a0@ <== NOT EXECUTED 4315e: 508f addql #8,%sp <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 43160: 4a82 tstl %d2 <== NOT EXECUTED 43162: 66e4 bnes 43148 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43164: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43168: 6600 01e6 bnew 43350 <== NOT EXECUTED 4316c: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43170: 4a88 tstl %a0 <== NOT EXECUTED 43172: 6700 01dc beqw 43350 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43176: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4317a: 7a01 moveq #1,%d5 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4317c: 486a 0030 pea %a2@(48) <== NOT EXECUTED 43180: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43182: 508f addql #8,%sp <== NOT EXECUTED 43184: 2545 00e4 movel %d5,%a2@(228) <== NOT EXECUTED 43188: 6000 01c8 braw 43352 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4318c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43190: 1e13 moveb %a3@,%d7 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 43192: 0800 0009 btst #9,%d0 <== NOT EXECUTED 43196: 6744 beqs 431dc <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 43198: 4283 clrl %d3 <== NOT EXECUTED 4319a: 162a 004a moveb %a2@(74),%d3 <== NOT EXECUTED 4319e: 4281 clrl %d1 <== NOT EXECUTED 431a0: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 431a4: 1007 moveb %d7,%d0 <== NOT EXECUTED 431a6: 49c0 extbl %d0 <== NOT EXECUTED 431a8: b680 cmpl %d0,%d3 <== NOT EXECUTED 431aa: 6622 bnes 431ce <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 431ac: b280 cmpl %d0,%d1 <== NOT EXECUTED 431ae: 660a bnes 431ba <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 431b0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431b4: 7210 moveq #16,%d1 <== NOT EXECUTED 431b6: b380 eorl %d1,%d0 <== NOT EXECUTED 431b8: 6008 bras 431c2 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 431ba: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431be: 7a10 moveq #16,%d5 <== NOT EXECUTED 431c0: 8085 orl %d5,%d0 <== NOT EXECUTED 431c2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 431c6: 7001 moveq #1,%d0 <== NOT EXECUTED 431c8: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED 431cc: 6014 bras 431e2 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 431ce: b280 cmpl %d0,%d1 <== NOT EXECUTED 431d0: 660a bnes 431dc <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 431d2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431d6: 72ef moveq #-17,%d1 <== NOT EXECUTED 431d8: c081 andl %d1,%d0 <== NOT EXECUTED 431da: 60e6 bras 431c2 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 431dc: 4a2e fffb tstb %fp@(-5) <== NOT EXECUTED 431e0: 674c beqs 4322e <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 431e2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431e6: 7a30 moveq #48,%d5 <== NOT EXECUTED 431e8: 7220 moveq #32,%d1 <== NOT EXECUTED 431ea: c085 andl %d5,%d0 <== NOT EXECUTED 431ec: b280 cmpl %d0,%d1 <== NOT EXECUTED 431ee: 6600 0144 bnew 43334 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 431f2: 2006 movel %d6,%d0 <== NOT EXECUTED 431f4: 40c3 movew %sr,%d3 <== NOT EXECUTED 431f6: 8083 orl %d3,%d0 <== NOT EXECUTED 431f8: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 431fa: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431fe: 7adf moveq #-33,%d5 <== NOT EXECUTED 43200: c085 andl %d5,%d0 <== NOT EXECUTED 43202: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43206: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4320a: 671c beqs 43228 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 4320c: 4878 0001 pea 1 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 43210: 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, 43214: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43218: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4321a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4321e: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43222: 4e90 jsr %a0@ <== NOT EXECUTED 43224: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43228: 46c3 movew %d3,%sr <== NOT EXECUTED 4322a: 6000 0108 braw 43334 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 4322e: 206a 0060 moveal %a2@(96),%a0 <== NOT EXECUTED 43232: 5288 addql #1,%a0 <== NOT EXECUTED 43234: 2208 movel %a0,%d1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43236: 2006 movel %d6,%d0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 43238: 226a 0064 moveal %a2@(100),%a1 <== NOT EXECUTED 4323c: 2a09 movel %a1,%d5 <== NOT EXECUTED 4323e: 4c45 1003 remul %d5,%d3,%d1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43242: 40c1 movew %sr,%d1 <== NOT EXECUTED 43244: 8081 orl %d1,%d0 <== NOT EXECUTED 43246: 46c0 movew %d0,%sr <== NOT EXECUTED 43248: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4324c: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43250: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43254: 9081 subl %d1,%d0 <== NOT EXECUTED 43256: 2240 moveal %d0,%a1 <== NOT EXECUTED 43258: d3c3 addal %d3,%a1 <== NOT EXECUTED 4325a: 2a09 movel %a1,%d5 <== NOT EXECUTED 4325c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43260: 4c41 5000 remul %d1,%d0,%d5 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 43264: b0aa 00c0 cmpl %a2@(192),%d0 <== NOT EXECUTED 43268: 6300 008e blsw 432f8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 4326c: 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) 43270: 0800 0000 btst #0,%d0 <== NOT EXECUTED 43274: 6600 0082 bnew 432f8 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 43278: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4327c: 7201 moveq #1,%d1 <== NOT EXECUTED 4327e: 8081 orl %d1,%d0 <== NOT EXECUTED 43280: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 43284: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43288: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 4328e: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 43294: 6632 bnes 432c8 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 43296: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4329a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4329e: 6606 bnes 432a6 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 432a0: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 432a4: 6652 bnes 432f8 <== 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, 432a6: 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; 432aa: 7a02 moveq #2,%d5 <== NOT EXECUTED 432ac: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 432b0: 2f0d movel %a5,%sp@- <== NOT EXECUTED 432b2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 432b6: 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; 432ba: 8285 orl %d5,%d1 <== NOT EXECUTED 432bc: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 432c0: 4e90 jsr %a0@ <== NOT EXECUTED 432c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 432c6: 6030 bras 432f8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 432c8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 432cc: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 432d2: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 432d8: 661e bnes 432f8 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 432da: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 432de: 303c 0004 movew #4,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 432e2: 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; 432e6: 8280 orl %d0,%d1 <== NOT EXECUTED 432e8: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 432ec: 4a88 tstl %a0 <== NOT EXECUTED 432ee: 6708 beqs 432f8 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 432f0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 432f4: 4e90 jsr %a0@ <== NOT EXECUTED 432f6: 588f addql #4,%sp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 432f8: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED 432fc: 46c1 movew %d1,%sr <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 432fe: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 43302: b083 cmpl %d3,%d0 <== NOT EXECUTED 43304: 6604 bnes 4330a <== NOT EXECUTED dropped++; 43306: 5282 addql #1,%d2 <== NOT EXECUTED 43308: 602a bras 43334 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 4330a: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4330e: 1187 3800 moveb %d7,%a0@(00000000,%d3:l) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 43312: 2543 0060 movel %d3,%a2@(96) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43316: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 4331a: 6618 bnes 43334 <== NOT EXECUTED 4331c: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43320: 4a88 tstl %a0 <== NOT EXECUTED 43322: 6710 beqs 43334 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43324: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43328: 7a01 moveq #1,%d5 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4332a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4332c: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4332e: 508f addql #8,%sp <== NOT EXECUTED 43330: 2545 00e4 movel %d5,%a2@(228) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43334: 528b addql #1,%a3 <== NOT EXECUTED 43336: 5384 subql #1,%d4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 43338: 4a84 tstl %d4 <== NOT EXECUTED 4333a: 6600 fe50 bnew 4318c <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); 4333e: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 43342: d5aa 0078 addl %d2,%a2@(120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 43346: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return dropped; 4334c: 588f addql #4,%sp <== NOT EXECUTED 4334e: 6002 bras 43352 <== NOT EXECUTED 43350: 4282 clrl %d2 <== NOT EXECUTED } 43352: 2002 movel %d2,%d0 <== NOT EXECUTED 43354: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4335a: 4e5e unlk %fp <== NOT EXECUTED 4335c: 4e75 rts 00042e6c : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 42e6c: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 42e70: 4ab9 0005 b91c tstl 5b91c 42e76: 662c bnes 42ea4 sc = rtems_semaphore_create ( 42e78: 4879 0005 b91c pea 5b91c 42e7e: 42a7 clrl %sp@- 42e80: 4878 0054 pea 54 42e84: 4878 0001 pea 1 42e88: 2f3c 5452 6d69 movel #1414688105,%sp@- 42e8e: 4eb9 0004 4cf8 jsr 44cf8 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) 42e94: 4fef 0014 lea %sp@(20),%sp 42e98: 4a80 tstl %d0 42e9a: 6708 beqs 42ea4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 42e9c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e9e: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED } } 42ea4: 4e5e unlk %fp 42ea6: 4e75 rts 00043d7a : } } rtems_status_code rtems_termios_ioctl (void *arg) { 43d7a: 4e56 ffec linkw %fp,#-20 43d7e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 43d82: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43d86: 2053 moveal %a3@,%a0 43d88: 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); 43d8c: 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; 43d8e: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 43d92: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43d96: 42a7 clrl %sp@- 43d98: 2f2a 0018 movel %a2@(24),%sp@- 43d9c: 4eb9 0004 4f30 jsr 44f30 if (sc != RTEMS_SUCCESSFUL) { 43da2: 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); 43da6: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 43da8: 6600 02d6 bnew 44080 <== ALWAYS TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 43dac: 202b 0004 movel %a3@(4),%d0 43db0: 7204 moveq #4,%d1 43db2: b280 cmpl %d0,%d1 43db4: 6700 023c beqw 43ff2 <== ALWAYS TAKEN 43db8: 6514 bcss 43dce <== ALWAYS TAKEN 43dba: 7602 moveq #2,%d3 43dbc: b680 cmpl %d0,%d3 43dbe: 6778 beqs 43e38 43dc0: 6500 0216 bcsw 43fd8 43dc4: 123c 0001 moveb #1,%d1 43dc8: b280 cmpl %d0,%d1 43dca: 662c bnes 43df8 <== ALWAYS TAKEN 43dcc: 6050 bras 43e1e <== ALWAYS TAKEN 43dce: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 43dd4: 6700 027c beqw 44052 <== NOT EXECUTED 43dd8: 620a bhis 43de4 <== NOT EXECUTED 43dda: 7605 moveq #5,%d3 <== NOT EXECUTED 43ddc: b680 cmpl %d0,%d3 <== NOT EXECUTED 43dde: 6618 bnes 43df8 <== NOT EXECUTED 43de0: 6000 01fe braw 43fe0 <== NOT EXECUTED 43de4: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 43dea: 6700 025c beqw 44048 <== NOT EXECUTED 43dee: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 43df4: 6700 020c beqw 44002 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 43df8: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43dfc: eb88 lsll #5,%d0 <== NOT EXECUTED 43dfe: 0680 0005 b0f0 addil #372976,%d0 <== NOT EXECUTED 43e04: 2240 moveal %d0,%a1 <== NOT EXECUTED 43e06: 2051 moveal %a1@,%a0 <== NOT EXECUTED 43e08: 4a88 tstl %a0 <== NOT EXECUTED 43e0a: 6606 bnes 43e12 <== NOT EXECUTED 43e0c: 740a moveq #10,%d2 <== NOT EXECUTED 43e0e: 6000 0264 braw 44074 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 43e12: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43e14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e16: 4e90 jsr %a0@ <== NOT EXECUTED 43e18: 2400 movel %d0,%d2 <== NOT EXECUTED 43e1a: 6000 01b6 braw 43fd2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 43e1e: 4878 0024 pea 24 43e22: 486a 0030 pea %a2@(48) 43e26: 2f2b 0008 movel %a3@(8),%sp@- 43e2a: 4eb9 0004 c200 jsr 4c200 break; 43e30: 4fef 000c lea %sp@(12),%sp 43e34: 6000 023e braw 44074 <== ALWAYS TAKEN case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 43e38: 4878 0024 pea 24 43e3c: 2f2b 0008 movel %a3@(8),%sp@- 43e40: 486a 0030 pea %a2@(48) 43e44: 4eb9 0004 c200 jsr 4c200 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 43e4a: 202a 00b8 movel %a2@(184),%d0 43e4e: 4fef 000c lea %sp@(12),%sp 43e52: 0800 0009 btst #9,%d0 43e56: 6760 beqs 43eb8 43e58: 202a 0030 movel %a2@(48),%d0 43e5c: 0280 0000 0400 andil #1024,%d0 43e62: 6654 bnes 43eb8 <== NEVER TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 43e64: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e68: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 43e6e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 43e72: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e76: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43e7a: 673c beqs 43eb8 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 43e7c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43e82: 40c3 movew %sr,%d3 <== NOT EXECUTED 43e84: 8083 orl %d3,%d0 <== NOT EXECUTED 43e86: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 43e88: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e8c: 72df moveq #-33,%d1 <== NOT EXECUTED 43e8e: c081 andl %d1,%d0 <== NOT EXECUTED 43e90: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43e94: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43e98: 671c beqs 43eb6 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43e9a: 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, 43e9e: 4878 0001 pea 1 <== NOT EXECUTED 43ea2: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43ea6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ea8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43eac: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43eb0: 4e90 jsr %a0@ <== NOT EXECUTED 43eb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43eb6: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 43eb8: 202a 00b8 movel %a2@(184),%d0 43ebc: 0800 000a btst #10,%d0 43ec0: 6724 beqs 43ee6 <== NEVER TAKEN 43ec2: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 43ec6: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 43ecc: 6618 bnes 43ee6 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 43ece: 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); 43ed2: 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); 43ed4: 0880 000a bclr #10,%d0 <== NOT EXECUTED 43ed8: 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); 43edc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43ee0: c083 andl %d3,%d0 <== NOT EXECUTED 43ee2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 43ee6: 202a 00b8 movel %a2@(184),%d0 43eea: 0800 0008 btst #8,%d0 43eee: 6736 beqs 43f26 <== NEVER TAKEN 43ef0: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 43ef4: 6d30 blts 43f26 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 43ef6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43efa: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 43efe: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 43f02: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f06: 44c0 movew %d0,%ccr <== NOT EXECUTED 43f08: 6610 bnes 43f1a <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 43f0a: 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) && 43f0e: 4a88 tstl %a0 <== NOT EXECUTED 43f10: 6708 beqs 43f1a <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 43f12: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43f16: 4e90 jsr %a0@ <== NOT EXECUTED 43f18: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 43f1a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f1e: 72fb moveq #-5,%d1 <== NOT EXECUTED 43f20: c081 andl %d1,%d0 <== NOT EXECUTED 43f22: 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) { 43f26: 4aaa 0038 tstl %a2@(56) 43f2a: 6c0c bges 43f38 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; 43f2c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f30: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 43f34: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 43f38: 202a 0030 movel %a2@(48),%d0 43f3c: 0280 0000 1000 andil #4096,%d0 43f42: 670c beqs 43f50 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXOF; 43f44: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f48: 08c0 000a bset #10,%d0 <== NOT EXECUTED 43f4c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 43f50: 202a 0030 movel %a2@(48),%d0 43f54: 0280 0000 0400 andil #1024,%d0 43f5a: 670c beqs 43f68 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXON; 43f5c: 202a 00b8 movel %a2@(184),%d0 43f60: 08c0 0009 bset #9,%d0 43f64: 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) { 43f68: 7002 moveq #2,%d0 43f6a: c0aa 003c andl %a2@(60),%d0 43f6e: 663a bnes 43faa <== NEVER TAKEN tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 43f70: 4283 clrl %d3 <== NOT EXECUTED 43f72: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 43f76: 4eb9 0004 48f8 jsr 448f8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 43f7c: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 43f80: 760a moveq #10,%d3 <== NOT EXECUTED 43f82: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 43f86: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 43f8a: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43f8e: 6714 beqs 43fa4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43f90: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 43f94: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 43f98: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43f9c: 6614 bnes 43fb2 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 43f9e: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED 43fa2: 601a bras 43fbe <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 43fa4: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43fa8: 670e beqs 43fb8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43faa: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 43fae: 42aa 0070 clrl %a2@(112) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 43fb2: 42aa 0074 clrl %a2@(116) 43fb6: 6006 bras 43fbe <== ALWAYS TAKEN } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 43fb8: 7001 moveq #1,%d0 <== NOT EXECUTED 43fba: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED } } } if (tty->device.setAttributes) 43fbe: 206a 00a8 moveal %a2@(168),%a0 43fc2: 4a88 tstl %a0 43fc4: 6700 00ae beqw 44074 <== ALWAYS TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 43fc8: 486a 0030 pea %a2@(48) 43fcc: 2f2a 0010 movel %a2@(16),%sp@- 43fd0: 4e90 jsr %a0@ 43fd2: 508f addql #8,%sp 43fd4: 6000 009e braw 44074 <== ALWAYS TAKEN break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 43fd8: 2f0a movel %a2,%sp@- 43fda: 4eba fa5e jsr %pc@(43a3a ) 43fde: 6064 bras 44044 break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 43fe0: 2014 movel %a4@,%d0 <== NOT EXECUTED 43fe2: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 43fe6: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 43fea: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED break; 43fee: 6000 0084 braw 44074 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 43ff2: 2014 movel %a4@,%d0 <== NOT EXECUTED 43ff4: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 43ff8: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 43ffc: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED break; 44000: 6072 bras 44074 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44002: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44006: 41f9 0005 b0d8 lea 5b0d8 ,%a0 <== NOT EXECUTED 4400c: e788 lsll #3,%d0 <== NOT EXECUTED 4400e: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 44012: 4a88 tstl %a0 <== NOT EXECUTED 44014: 6708 beqs 4401e <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44016: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44018: 4e90 jsr %a0@ <== NOT EXECUTED 4401a: 588f addql #4,%sp <== NOT EXECUTED 4401c: 2400 movel %d0,%d2 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 4401e: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44022: 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) { 44024: 2200 movel %d0,%d1 <== NOT EXECUTED 44026: 41f9 0005 b0d8 lea 5b0d8 ,%a0 <== NOT EXECUTED 4402c: 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); 4402e: 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) { 44032: 2070 1800 moveal %a0@(00000000,%d1:l),%a0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 44036: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 4403a: 4a88 tstl %a0 <== NOT EXECUTED 4403c: 6736 beqs 44074 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 4403e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44040: 4e90 jsr %a0@ <== NOT EXECUTED 44042: 2400 movel %d0,%d2 <== NOT EXECUTED 44044: 588f addql #4,%sp 44046: 602c bras 44074 <== ALWAYS TAKEN } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 44048: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 4404c: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED break; 44050: 6022 bras 44074 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 44052: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44056: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 4405a: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 4405c: 6a06 bpls 44064 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 4405e: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44062: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 44064: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44068: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 4406c: d280 addl %d0,%d1 <== NOT EXECUTED 4406e: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44072: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 44074: 2f2a 0018 movel %a2@(24),%sp@- 44078: 4eb9 0004 5034 jsr 45034 args->ioctl_return = sc; return sc; 4407e: 588f addql #4,%sp } 44080: 2002 movel %d2,%d0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 44082: 2742 000c movel %d2,%a3@(12) return sc; } 44086: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4408c: 4e5e unlk %fp 4408e: 4e75 rts 000440dc : #include int rtems_termios_number_to_baud( int32_t baud ) { 440dc: 4e56 0000 linkw %fp,#0 440e0: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 440e4: 0c81 0000 04b0 cmpil #1200,%d1 440ea: 6700 0106 beqw 441f2 440ee: 6e68 bgts 44158 440f0: 0c81 0000 0086 cmpil #134,%d1 440f6: 6700 00e6 beqw 441de 440fa: 6e2a bgts 44126 440fc: 7032 moveq #50,%d0 440fe: b081 cmpl %d1,%d0 44100: 6700 00cc beqw 441ce 44104: 6d0a blts 44110 44106: 4a81 tstl %d1 44108: 6700 00c8 beqw 441d2 4410c: 6000 0100 braw 4420e <== ALWAYS TAKEN 44110: 704b moveq #75,%d0 44112: b081 cmpl %d1,%d0 44114: 6700 00c0 beqw 441d6 44118: 103c 006e moveb #110,%d0 4411c: b081 cmpl %d1,%d0 4411e: 6600 00ee bnew 4420e <== ALWAYS TAKEN 44122: 6000 00b6 braw 441da <== ALWAYS TAKEN 44126: 0c81 0000 00c8 cmpil #200,%d1 4412c: 6700 00b8 beqw 441e6 44130: 6e0e bgts 44140 44132: 0c81 0000 0096 cmpil #150,%d1 44138: 6600 00d4 bnew 4420e <== ALWAYS TAKEN 4413c: 6000 00a4 braw 441e2 <== ALWAYS TAKEN 44140: 0c81 0000 012c cmpil #300,%d1 44146: 6700 00a2 beqw 441ea 4414a: 0c81 0000 0258 cmpil #600,%d1 44150: 6600 00bc bnew 4420e <== ALWAYS TAKEN 44154: 6000 0098 braw 441ee <== ALWAYS TAKEN 44158: 0c81 0000 4b00 cmpil #19200,%d1 4415e: 6700 00a6 beqw 44206 44162: 6e2c bgts 44190 44164: 0c81 0000 0960 cmpil #2400,%d1 4416a: 6700 008e beqw 441fa 4416e: 6e0c bgts 4417c 44170: 0c81 0000 0708 cmpil #1800,%d1 44176: 6600 0096 bnew 4420e <== ALWAYS TAKEN 4417a: 607a bras 441f6 <== ALWAYS TAKEN 4417c: 0c81 0000 12c0 cmpil #4800,%d1 44182: 677a beqs 441fe 44184: 0c81 0000 2580 cmpil #9600,%d1 4418a: 6600 0082 bnew 4420e 4418e: 6072 bras 44202 <== ALWAYS TAKEN 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; 44190: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44196: 0c81 0001 c200 cmpil #115200,%d1 4419c: 6772 beqs 44210 4419e: 6e14 bgts 441b4 441a0: 0c81 0000 9600 cmpil #38400,%d1 441a6: 6762 beqs 4420a 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; 441a8: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441aa: 0c81 0000 e100 cmpil #57600,%d1 441b0: 665c bnes 4420e <== ALWAYS TAKEN 441b2: 605c bras 44210 <== ALWAYS TAKEN 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; 441b4: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441ba: 0c81 0003 8400 cmpil #230400,%d1 441c0: 674e beqs 44210 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; 441c2: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441c4: 0c81 0007 0800 cmpil #460800,%d1 441ca: 6642 bnes 4420e <== ALWAYS TAKEN 441cc: 6042 bras 44210 <== ALWAYS TAKEN 441ce: 7001 moveq #1,%d0 441d0: 603e bras 44210 <== ALWAYS TAKEN 441d2: 4280 clrl %d0 441d4: 603a bras 44210 <== ALWAYS TAKEN 441d6: 7002 moveq #2,%d0 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 441d8: 6036 bras 44210 <== ALWAYS TAKEN 441da: 7003 moveq #3,%d0 case 110: termios_baud = B110; break; 441dc: 6032 bras 44210 <== ALWAYS TAKEN 441de: 7004 moveq #4,%d0 case 134: termios_baud = B134; break; 441e0: 602e bras 44210 <== ALWAYS TAKEN 441e2: 7005 moveq #5,%d0 case 150: termios_baud = B150; break; 441e4: 602a bras 44210 <== ALWAYS TAKEN 441e6: 7006 moveq #6,%d0 case 200: termios_baud = B200; break; 441e8: 6026 bras 44210 <== ALWAYS TAKEN 441ea: 7007 moveq #7,%d0 case 300: termios_baud = B300; break; 441ec: 6022 bras 44210 <== ALWAYS TAKEN 441ee: 7008 moveq #8,%d0 case 600: termios_baud = B600; break; 441f0: 601e bras 44210 <== ALWAYS TAKEN 441f2: 7009 moveq #9,%d0 case 1200: termios_baud = B1200; break; 441f4: 601a bras 44210 <== ALWAYS TAKEN 441f6: 700a moveq #10,%d0 case 1800: termios_baud = B1800; break; 441f8: 6016 bras 44210 <== ALWAYS TAKEN 441fa: 700b moveq #11,%d0 case 2400: termios_baud = B2400; break; 441fc: 6012 bras 44210 <== ALWAYS TAKEN 441fe: 700c moveq #12,%d0 case 4800: termios_baud = B4800; break; 44200: 600e bras 44210 <== ALWAYS TAKEN 44202: 700d moveq #13,%d0 case 9600: termios_baud = B9600; break; 44204: 600a bras 44210 <== ALWAYS TAKEN 44206: 700e moveq #14,%d0 case 19200: termios_baud = B19200; break; 44208: 6006 bras 44210 <== ALWAYS TAKEN 4420a: 700f moveq #15,%d0 case 38400: termios_baud = B38400; break; 4420c: 6002 bras 44210 <== ALWAYS TAKEN case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 4420e: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 44210: 4e5e unlk %fp 44212: 4e75 rts 000441f0 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 441f0: 4e56 ffe0 linkw %fp,#-32 441f4: 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, 441f8: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 441fa: 262e 0008 movel %fp@(8),%d3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 441fe: 42a7 clrl %sp@- 44200: 2f39 0005 b91c movel 5b91c ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44206: 282e 000c movel %fp@(12),%d4 4420a: 2a6e 0010 moveal %fp@(16),%a5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 4420e: 4eb9 0004 4f30 jsr 44f30 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44214: 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, 44218: 2400 movel %d0,%d2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4421a: 6600 0394 bnew 445b0 <== ALWAYS TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4421e: 2479 0005 b924 moveal 5b924 ,%a2 44224: 6010 bras 44236 <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 44226: b6aa 000c cmpl %a2@(12),%d3 4422a: 6608 bnes 44234 4422c: b8aa 0010 cmpl %a2@(16),%d4 44230: 6700 0308 beqw 4453a <== 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) { 44234: 2452 moveal %a2@,%a2 44236: 4a8a tstl %a2 44238: 66ec bnes 44226 4423a: 6000 0380 braw 445bc <== ALWAYS TAKEN /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 4423e: 2f39 0005 b91c movel 5b91c ,%sp@- <== NOT EXECUTED 44244: 741a moveq #26,%d2 <== NOT EXECUTED 44246: 6000 0360 braw 445a8 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 4424a: 41f9 0005 a358 lea 5a358 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44250: 49f9 0004 935c lea 4935c ,%a4 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44256: 2550 0064 movel %a0@,%a2@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 4425a: 202a 0064 movel %a2@(100),%d0 4425e: 2f00 movel %d0,%sp@- 44260: 4e94 jsr %a4@ if (tty->rawInBuf.theBuf == NULL) { 44262: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44264: 2540 0058 movel %d0,%a2@(88) if (tty->rawInBuf.theBuf == NULL) { 44268: 661c bnes 44286 <== NEVER TAKEN free(tty); 4426a: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 4426c: 741a moveq #26,%d2 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 4426e: 4eb9 0004 8e80 jsr 48e80 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 44274: 2f39 0005 b91c movel 5b91c ,%sp@- <== NOT EXECUTED 4427a: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 44280: 508f addql #8,%sp <== NOT EXECUTED 44282: 6000 032c braw 445b0 <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 44286: 41f9 0005 a35c lea 5a35c ,%a0 4428c: 2550 0088 movel %a0@,%a2@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44290: 202a 0088 movel %a2@(136),%d0 44294: 2f00 movel %d0,%sp@- 44296: 4e94 jsr %a4@ if (tty->rawOutBuf.theBuf == NULL) { 44298: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 4429a: 2540 007c movel %d0,%a2@(124) if (tty->rawOutBuf.theBuf == NULL) { 4429e: 6626 bnes 442c6 <== NEVER TAKEN free((void *)(tty->rawInBuf.theBuf)); 442a0: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 442a4: 47f9 0004 8e80 lea 48e80 ,%a3 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 442aa: 741a moveq #26,%d2 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 442ac: 4e93 jsr %a3@ <== NOT EXECUTED free(tty); 442ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442b0: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 442b2: 2f39 0005 b91c movel 5b91c ,%sp@- <== NOT EXECUTED 442b8: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 442be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 442c2: 6000 02ec braw 445b0 <== NOT EXECUTED } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 442c6: 2f39 0005 a354 movel 5a354 ,%sp@- 442cc: 4e94 jsr %a4@ if (tty->cbuf == NULL) { 442ce: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 442d0: 2540 001c movel %d0,%a2@(28) if (tty->cbuf == NULL) { 442d4: 662c bnes 44302 <== NEVER TAKEN free((void *)(tty->rawOutBuf.theBuf)); 442d6: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 442da: 47f9 0004 8e80 lea 48e80 ,%a3 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 442e0: 741a moveq #26,%d2 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 442e2: 4e93 jsr %a3@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 442e4: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 442e8: 4e93 jsr %a3@ <== NOT EXECUTED free(tty); 442ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442ec: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 442ee: 2f39 0005 b91c movel 5b91c ,%sp@- <== NOT EXECUTED 442f4: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 442fa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 442fe: 6000 02b0 braw 445b0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 44302: 2079 0005 b924 moveal 5b924 ,%a0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 44308: 42aa 00d4 clrl %a2@(212) tty->tty_snd.sw_arg = NULL; 4430c: 42aa 00d8 clrl %a2@(216) tty->tty_rcv.sw_pfn = NULL; 44310: 42aa 00dc clrl %a2@(220) tty->tty_rcv.sw_arg = NULL; 44314: 42aa 00e0 clrl %a2@(224) tty->tty_rcvwakeup = 0; 44318: 42aa 00e4 clrl %a2@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 4431c: 2488 movel %a0,%a2@ tty->back = NULL; 4431e: 42aa 0004 clrl %a2@(4) if (rtems_termios_ttyHead != NULL) 44322: 4a88 tstl %a0 44324: 6704 beqs 4432a rtems_termios_ttyHead->back = tty; 44326: 214a 0004 movel %a2,%a0@(4) rtems_termios_ttyHead = tty; 4432a: 23cb 0005 b924 movel %a3,5b924 if (rtems_termios_ttyTail == NULL) 44330: 4ab9 0005 b920 tstl 5b920 44336: 6606 bnes 4433e rtems_termios_ttyTail = tty; 44338: 23cb 0005 b920 movel %a3,5b920 tty->minor = minor; 4433e: 2744 0010 movel %d4,%a3@(16) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44342: 49f9 0004 4cf8 lea 44cf8 ,%a4 44348: 1039 0005 a360 moveb 5a360 ,%d0 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; 4434e: 2743 000c movel %d3,%a3@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44352: 486b 0014 pea %a3@(20) 44356: 49c0 extbl %d0 44358: 0080 5452 6900 oril #1414686976,%d0 4435e: 42a7 clrl %sp@- 44360: 4878 0054 pea 54 44364: 4878 0001 pea 1 44368: 2f00 movel %d0,%sp@- 4436a: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 4436c: 4fef 0014 lea %sp@(20),%sp 44370: 4a80 tstl %d0 44372: 6600 0226 bnew 4459a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44376: 486b 0018 pea %a3@(24) 4437a: 1039 0005 a360 moveb 5a360 ,%d0 44380: 42a7 clrl %sp@- 44382: 4878 0054 pea 54 44386: 49c0 extbl %d0 44388: 4878 0001 pea 1 4438c: 0080 5452 6f00 oril #1414688512,%d0 44392: 2f00 movel %d0,%sp@- 44394: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 44396: 4fef 0014 lea %sp@(20),%sp 4439a: 4a80 tstl %d0 4439c: 6600 01fc bnew 4459a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 443a0: 486b 008c pea %a3@(140) 443a4: 1039 0005 a360 moveb 5a360 ,%d0 443aa: 42a7 clrl %sp@- 443ac: 4878 0020 pea 20 443b0: 49c0 extbl %d0 443b2: 0080 5452 7800 oril #1414690816,%d0 443b8: 42a7 clrl %sp@- 443ba: 2f00 movel %d0,%sp@- 443bc: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 443be: 4fef 0014 lea %sp@(20),%sp 443c2: 4a80 tstl %d0 443c4: 6600 01d4 bnew 4459a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 443c8: 42ab 0094 clrl %a3@(148) /* * Set callbacks */ tty->device = *callbacks; 443cc: 4878 0020 pea 20 443d0: 2f2e 0014 movel %fp@(20),%sp@- 443d4: 486b 0098 pea %a3@(152) 443d8: 4eb9 0004 c200 jsr 4c200 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 443de: 4fef 000c lea %sp@(12),%sp 443e2: 7002 moveq #2,%d0 443e4: b0ab 00b4 cmpl %a3@(180),%d0 443e8: 6662 bnes 4444c <== NEVER TAKEN sc = rtems_task_create ( 443ea: 486b 00c8 pea %a3@(200) <== NOT EXECUTED 443ee: 49f9 0004 50e4 lea 450e4 ,%a4 <== NOT EXECUTED 443f4: 1039 0005 a360 moveb 5a360 ,%d0 <== NOT EXECUTED 443fa: 42a7 clrl %sp@- <== NOT EXECUTED 443fc: 4878 0500 pea 500 <== NOT EXECUTED 44400: 49c0 extbl %d0 <== NOT EXECUTED 44402: 4878 0400 pea 400 <== NOT EXECUTED 44406: 4878 000a pea a <== NOT EXECUTED 4440a: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 44410: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44412: 4e94 jsr %a4@ <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 44414: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44418: 4a80 tstl %d0 <== NOT EXECUTED 4441a: 6600 017e bnew 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 4441e: 486b 00c4 pea %a3@(196) <== NOT EXECUTED 44422: 1039 0005 a360 moveb 5a360 ,%d0 <== NOT EXECUTED 44428: 42a7 clrl %sp@- <== NOT EXECUTED 4442a: 4878 0500 pea 500 <== NOT EXECUTED 4442e: 49c0 extbl %d0 <== NOT EXECUTED 44430: 4878 0400 pea 400 <== NOT EXECUTED 44434: 4878 0009 pea 9 <== NOT EXECUTED 44438: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 4443e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44440: 4e94 jsr %a4@ <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 44442: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44446: 4a80 tstl %d0 <== NOT EXECUTED 44448: 6600 0150 bnew 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 4444c: 4aab 00a0 tstl %a3@(160) 44450: 6708 beqs 4445a (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 44452: 7202 moveq #2,%d1 44454: b2ab 00b4 cmpl %a3@(180),%d1 44458: 662c bnes 44486 <== NEVER TAKEN sc = rtems_semaphore_create ( 4445a: 486b 0068 pea %a3@(104) 4445e: 1039 0005 a360 moveb 5a360 ,%d0 44464: 42a7 clrl %sp@- 44466: 4878 0024 pea 24 4446a: 49c0 extbl %d0 4446c: 0080 5452 7200 oril #1414689280,%d0 44472: 42a7 clrl %sp@- 44474: 2f00 movel %d0,%sp@- 44476: 4eb9 0004 4cf8 jsr 44cf8 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 4447c: 4fef 0014 lea %sp@(20),%sp 44480: 4a80 tstl %d0 44482: 6600 0116 bnew 4459a <== 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; 44486: 42ab 00b8 clrl %a3@(184) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 4448a: 202b 0064 movel %a3@(100),%d0 4448e: e288 lsrl #1,%d0 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 44490: 7203 moveq #3,%d1 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 44492: 2740 00bc movel %d0,%a3@(188) tty->highwater = tty->rawInBuf.Size * 3/4; 44496: 206b 0064 moveal %a3@(100),%a0 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 4449a: 1741 0041 moveb %d1,%a3@(65) tty->termios.c_cc[VQUIT] = '\034'; 4449e: 721c moveq #28,%d1 tty->termios.c_cc[VERASE] = '\177'; 444a0: 707f moveq #127,%d0 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 444a2: 1741 0042 moveb %d1,%a3@(66) tty->termios.c_cc[VERASE] = '\177'; 444a6: 1740 0043 moveb %d0,%a3@(67) tty->termios.c_cc[VKILL] = '\025'; 444aa: 7215 moveq #21,%d1 tty->termios.c_cc[VEOF] = '\004'; 444ac: 7004 moveq #4,%d0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 444ae: 1741 0044 moveb %d1,%a3@(68) tty->termios.c_cc[VEOF] = '\004'; 444b2: 1740 0045 moveb %d0,%a3@(69) tty->termios.c_cc[VEOL] = '\000'; 444b6: 4201 clrb %d1 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 444b8: 7011 moveq #17,%d0 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 444ba: 1741 004c moveb %d1,%a3@(76) tty->termios.c_cc[VEOL2] = '\000'; 444be: 1741 0051 moveb %d1,%a3@(81) tty->termios.c_cc[VSTART] = '\021'; 444c2: 1740 0049 moveb %d0,%a3@(73) tty->termios.c_cc[VSTOP] = '\023'; 444c6: 7213 moveq #19,%d1 tty->termios.c_cc[VSUSP] = '\032'; 444c8: 701a moveq #26,%d0 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 444ca: 1741 004a moveb %d1,%a3@(74) tty->termios.c_cc[VSUSP] = '\032'; 444ce: 1740 004b moveb %d0,%a3@(75) tty->termios.c_cc[VREPRINT] = '\022'; 444d2: 7212 moveq #18,%d1 tty->termios.c_cc[VDISCARD] = '\017'; 444d4: 700f moveq #15,%d0 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 444d6: 1741 004d moveb %d1,%a3@(77) tty->termios.c_cc[VDISCARD] = '\017'; 444da: 1740 004e moveb %d0,%a3@(78) tty->termios.c_cc[VWERASE] = '\027'; 444de: 7217 moveq #23,%d1 tty->termios.c_cc[VLNEXT] = '\026'; 444e0: 7016 moveq #22,%d0 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 444e2: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 444e6: 1740 0050 moveb %d0,%a3@(80) tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 444ea: 1741 004f moveb %d1,%a3@(79) tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 444ee: 2008 movel %a0,%d0 444f0: e488 lsrl #2,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 444f2: 307c 2502 moveaw #9474,%a0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 444f6: 1239 0005 a360 moveb 5a360 ,%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; 444fc: 2740 00c0 movel %d0,%a3@(192) /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 44500: 203c 0000 1805 movel #6149,%d0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44506: 49c1 extbl %d1 44508: 2a01 movel %d1,%d5 4450a: 5285 addql #1,%d5 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 4450c: 2740 0034 movel %d0,%a3@(52) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44510: 303c 823b movew #-32197,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44514: 2748 0030 movel %a0,%a3@(48) tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 44518: 307c 08bd moveaw #2237,%a0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 4451c: 2740 003c movel %d0,%a3@(60) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44520: 303c 007a movew #122,%d0 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 44524: 2748 0038 movel %a0,%a3@(56) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44528: 13c5 0005 a360 moveb %d5,5a360 4452e: b081 cmpl %d1,%d0 44530: 6608 bnes 4453a <== NEVER TAKEN c = 'a'; 44532: 7261 moveq #97,%d1 <== NOT EXECUTED 44534: 13c1 0005 a360 moveb %d1,5a360 <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 4453a: 202a 0008 movel %a2@(8),%d0 4453e: 2200 movel %d0,%d1 44540: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44542: 2055 moveal %a5@,%a0 if (!tty->refcount++) { 44544: 2541 0008 movel %d1,%a2@(8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44548: 214a 0034 movel %a2,%a0@(52) if (!tty->refcount++) { 4454c: 4a80 tstl %d0 4454e: 6652 bnes 445a2 if (tty->device.firstOpen) 44550: 206a 0098 moveal %a2@(152),%a0 44554: 4a88 tstl %a0 44556: 670c beqs 44564 (*tty->device.firstOpen)(major, minor, arg); 44558: 2f0d movel %a5,%sp@- 4455a: 2f04 movel %d4,%sp@- 4455c: 2f03 movel %d3,%sp@- 4455e: 4e90 jsr %a0@ 44560: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44564: 7002 moveq #2,%d0 44566: b0aa 00b4 cmpl %a2@(180),%d0 4456a: 6636 bnes 445a2 <== NEVER TAKEN sc = rtems_task_start(tty->rxTaskId, 4456c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4456e: 487a 00d2 pea %pc@(44642 ) <== NOT EXECUTED 44572: 47f9 0004 5360 lea 45360 ,%a3 <== NOT EXECUTED 44578: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 4457c: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 4457e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44582: 4a80 tstl %d0 <== NOT EXECUTED 44584: 6614 bnes 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 44586: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44588: 487a 0050 pea %pc@(445da ) <== NOT EXECUTED 4458c: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44590: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44592: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44596: 4a80 tstl %d0 <== NOT EXECUTED 44598: 6708 beqs 445a2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4459a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4459c: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 445a2: 2f39 0005 b91c movel 5b91c ,%sp@- 445a8: 4eb9 0004 5034 jsr 45034 return RTEMS_SUCCESSFUL; 445ae: 588f addql #4,%sp } 445b0: 2002 movel %d2,%d0 445b2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 445b8: 4e5e unlk %fp 445ba: 4e75 rts static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 445bc: 4878 00e8 pea e8 445c0: 4878 0001 pea 1 445c4: 4eb9 0004 8da0 jsr 48da0 if (tty == NULL) { 445ca: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 445cc: 2440 moveal %d0,%a2 445ce: 2640 moveal %d0,%a3 if (tty == NULL) { 445d0: 4a80 tstl %d0 445d2: 6600 fc76 bnew 4424a <== NEVER TAKEN 445d6: 6000 fc66 braw 4423e <== NOT EXECUTED 0004335e : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 4335e: 4e56 ffe0 linkw %fp,#-32 43362: 202e 0008 movel %fp@(8),%d0 43366: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4336a: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 4336e: 2640 moveal %d0,%a3 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43370: 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) { 43374: 4aaa 00b4 tstl %a2@(180) 43378: 661c bnes 43396 <== NEVER TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); 4337a: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 4337e: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 43384: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43388: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 4338e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43392: 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); 43394: 4ed1 jmp %a1@ <== NOT EXECUTED return; } newHead = tty->rawOutBuf.Head; 43396: 2c2a 0080 movel %a2@(128),%d6 * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 4339a: 2a3c 0000 0700 movel #1792,%d5 while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 433a0: 49f9 0004 4f30 lea 44f30 ,%a4 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 433a6: 6000 00a0 braw 43448 <== ALWAYS TAKEN * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 433aa: 222a 0088 movel %a2@(136),%d1 433ae: 5286 addql #1,%d6 rtems_interrupt_disable (level); 433b0: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 433b2: 4c41 6004 remul %d1,%d4,%d6 433b6: 2c04 movel %d4,%d6 rtems_interrupt_disable (level); 433b8: 40c3 movew %sr,%d3 433ba: 8083 orl %d3,%d0 433bc: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 433be: 602a bras 433ea <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; 433c0: 7002 moveq #2,%d0 433c2: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 433c6: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 433c8: 42a7 clrl %sp@- 433ca: 42a7 clrl %sp@- 433cc: 2f2a 008c movel %a2@(140),%sp@- 433d0: 4e94 jsr %a4@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 433d2: 4fef 000c lea %sp@(12),%sp 433d6: 4a80 tstl %d0 433d8: 6708 beqs 433e2 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 433da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 433dc: 4eb9 0004 55c0 jsr 455c0 <== NOT EXECUTED rtems_interrupt_disable (level); 433e2: 2005 movel %d5,%d0 433e4: 40c3 movew %sr,%d3 433e6: 8083 orl %d3,%d0 433e8: 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) { 433ea: 202a 0084 movel %a2@(132),%d0 433ee: b084 cmpl %d4,%d0 433f0: 67ce beqs 433c0 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 433f2: 202a 0080 movel %a2@(128),%d0 433f6: 206a 007c moveal %a2@(124),%a0 433fa: 1193 0800 moveb %a3@,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 433fe: 2544 0080 movel %d4,%a2@(128) if (tty->rawOutBufState == rob_idle) { 43402: 4aaa 0094 tstl %a2@(148) 43406: 663a bnes 43442 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 43408: 202a 00b8 movel %a2@(184),%d0 4340c: 0800 0004 btst #4,%d0 43410: 661e bnes 43430 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, 43412: 4878 0001 pea 1 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43416: 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, 4341a: d0aa 007c addl %a2@(124),%d0 4341e: 2f00 movel %d0,%sp@- 43420: 2f2a 0010 movel %a2@(16),%sp@- 43424: 206a 00a4 moveal %a2@(164),%a0 43428: 4e90 jsr %a0@ 4342a: 4fef 000c lea %sp@(12),%sp 4342e: 600c bras 4343c <== ALWAYS TAKEN (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 43430: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43434: 7220 moveq #32,%d1 <== NOT EXECUTED 43436: 8081 orl %d1,%d0 <== NOT EXECUTED 43438: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 4343c: 7001 moveq #1,%d0 4343e: 2540 0094 movel %d0,%a2@(148) RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43442: 528b addql #1,%a3 /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 43444: 46c3 movew %d3,%sr len--; 43446: 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) { 43448: 4a82 tstl %d2 4344a: 6600 ff5e bnew 433aa tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 4344e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43454: 4e5e unlk %fp 43456: 4e75 rts 00043aa4 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 43aa4: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 43aa8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 43aac: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43ab0: 2053 moveal %a3@,%a0 <== NOT EXECUTED 43ab2: 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); 43ab6: 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; 43ab8: 242b 0010 movel %a3@(16),%d2 <== NOT EXECUTED char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43abc: 42a7 clrl %sp@- <== NOT EXECUTED 43abe: 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; 43ac2: 2a6b 000c moveal %a3@(12),%a5 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43ac6: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 43acc: 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); 43ad0: 2600 movel %d0,%d3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 43ad2: 6600 029a bnew 43d6e <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 43ad6: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43ada: 41f9 0005 b0d8 lea 5b0d8 ,%a0 <== NOT EXECUTED 43ae0: eb88 lsll #5,%d0 <== NOT EXECUTED 43ae2: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 43ae6: 4a88 tstl %a0 <== NOT EXECUTED 43ae8: 671e beqs 43b08 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 43aea: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43aee: 4e90 jsr %a0@ <== NOT EXECUTED 43af0: 2600 movel %d0,%d3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 43af2: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED rtems_semaphore_release (tty->isem); 43af6: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 43afa: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 43b00: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43b04: 6000 0268 braw 43d6e <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 43b08: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 43b0c: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 43b10: 6600 0234 bnew 43d46 <== NOT EXECUTED tty->cindex = tty->ccount = 0; 43b14: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED tty->read_start_column = tty->column; 43b18: 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; 43b1e: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 43b22: 4aaa 00a0 tstl %a2@(160) <== NOT EXECUTED 43b26: 6700 00da beqw 43c02 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 43b2a: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 43b2e: 6600 00d2 bnew 43c02 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 43b32: 7002 moveq #2,%d0 <== NOT EXECUTED 43b34: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43b38: 673e beqs 43b78 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 43b3a: 49f9 0004 5408 lea 45408 ,%a4 <== NOT EXECUTED } else { if (siproc (n, tty)) 43b40: 283c 0004 391a movel #276762,%d4 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 43b46: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43b4a: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 43b4e: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 43b50: 588f addql #4,%sp <== NOT EXECUTED 43b52: 4a80 tstl %d0 <== NOT EXECUTED 43b54: 6c0a bges 43b60 <== NOT EXECUTED rtems_task_wake_after (1); 43b56: 4878 0001 pea 1 <== NOT EXECUTED 43b5a: 4e94 jsr %a4@ <== NOT EXECUTED 43b5c: 588f addql #4,%sp <== NOT EXECUTED 43b5e: 60e6 bras 43b46 <== NOT EXECUTED } else { if (siproc (n, tty)) 43b60: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43b62: 2044 moveal %d4,%a0 <== NOT EXECUTED 43b64: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43b6a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43b6c: 4e90 jsr %a0@ <== NOT EXECUTED 43b6e: 508f addql #8,%sp <== NOT EXECUTED 43b70: 4a80 tstl %d0 <== NOT EXECUTED 43b72: 67d2 beqs 43b46 <== NOT EXECUTED 43b74: 6000 01d0 braw 43d46 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 43b78: 41f9 0004 4910 lea 44910 ,%a0 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; now = rtems_clock_get_ticks_since_boot(); 43b7e: 2848 moveal %a0,%a4 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 43b80: 2c3c 0004 5408 movel #283656,%d6 <== NOT EXECUTED } else { siproc (n, tty); 43b86: 2a3c 0004 391a movel #276762,%d5 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 43b8c: 4e90 jsr %a0@ <== NOT EXECUTED 43b8e: 2800 movel %d0,%d4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 43b90: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43b94: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 43b98: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 43b9a: 588f addql #4,%sp <== NOT EXECUTED 43b9c: 4a80 tstl %d0 <== NOT EXECUTED 43b9e: 6c34 bges 43bd4 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 43ba0: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43ba4: 670e beqs 43bb4 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 43ba6: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43baa: 671c beqs 43bc8 <== NOT EXECUTED 43bac: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 43bb0: 6716 beqs 43bc8 <== NOT EXECUTED 43bb2: 6008 bras 43bbc <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 43bb4: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43bb8: 6700 018c beqw 43d46 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 43bbc: 4e94 jsr %a4@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 43bbe: 9084 subl %d4,%d0 <== NOT EXECUTED 43bc0: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 43bc4: 6200 0180 bhiw 43d46 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 43bc8: 4878 0001 pea 1 <== NOT EXECUTED 43bcc: 2046 moveal %d6,%a0 <== NOT EXECUTED 43bce: 4e90 jsr %a0@ <== NOT EXECUTED 43bd0: 588f addql #4,%sp <== NOT EXECUTED 43bd2: 60bc bras 43b90 <== NOT EXECUTED } else { siproc (n, tty); 43bd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43bd6: 2045 moveal %d5,%a0 <== NOT EXECUTED 43bd8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43bde: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43be0: 4e90 jsr %a0@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 43be2: 508f addql #8,%sp <== NOT EXECUTED 43be4: 4281 clrl %d1 <== NOT EXECUTED 43be6: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 43bea: 1200 moveb %d0,%d1 <== NOT EXECUTED 43bec: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 43bf0: 6f00 0154 blew 43d46 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 43bf4: 4a00 tstb %d0 <== NOT EXECUTED 43bf6: 6798 beqs 43b90 <== NOT EXECUTED 43bf8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43bfc: 6792 beqs 43b90 <== NOT EXECUTED then = rtems_clock_get_ticks_since_boot(); 43bfe: 4e94 jsr %a4@ <== NOT EXECUTED 43c00: 608c bras 43b8e <== 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, 43c02: 2e0a movel %a2,%d7 <== NOT EXECUTED 43c04: 0687 0000 0049 addil #73,%d7 <== NOT EXECUTED 43c0a: 7801 moveq #1,%d4 <== NOT EXECUTED 43c0c: 49fa fd0c lea %pc@(4391a ),%a4 <== NOT EXECUTED /* * Wait for characters */ if ( wait ) { sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 43c10: 2c3c 0004 4f30 movel #282416,%d6 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 43c16: 2a2a 0074 movel %a2@(116),%d5 <== NOT EXECUTED 43c1a: 6000 00e2 braw 43cfe <== 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; 43c1e: 2a2a 005c movel %a2@(92),%d5 <== NOT EXECUTED 43c22: 5285 addql #1,%d5 <== NOT EXECUTED 43c24: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 43c28: 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; 43c2c: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 43c30: 1030 1800 moveb %a0@(00000000,%d1:l),%d0 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 43c34: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; 43c38: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 43c3c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 43c40: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 43c44: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 <== NOT EXECUTED 43c48: 93c1 subal %d1,%a1 <== NOT EXECUTED 43c4a: 2a09 movel %a1,%d5 <== NOT EXECUTED 43c4c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43c50: 4c41 5000 remul %d1,%d0,%d5 <== NOT EXECUTED 43c54: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED 43c58: b0aa 00bc cmpl %a2@(188),%d0 <== NOT EXECUTED 43c5c: 646a bccs 43cc8 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 43c5e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43c62: 72fe moveq #-2,%d1 <== NOT EXECUTED 43c64: c081 andl %d1,%d0 <== NOT EXECUTED 43c66: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 43c6a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43c6e: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 43c74: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 43c7a: 6626 bnes 43ca2 <== NOT EXECUTED 43c7c: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43c80: 670a beqs 43c8c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 43c82: 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)) 43c86: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43c8a: 6716 beqs 43ca2 <== 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, 43c8c: 4878 0001 pea 1 <== NOT EXECUTED 43c90: 2f07 movel %d7,%sp@- <== NOT EXECUTED 43c92: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43c96: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43c9a: 4e90 jsr %a0@ <== NOT EXECUTED 43c9c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43ca0: 6026 bras 43cc8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 43ca2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43ca6: 0800 0008 btst #8,%d0 <== NOT EXECUTED 43caa: 671c beqs 43cc8 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 43cac: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 43cb0: 7afb moveq #-5,%d5 <== NOT EXECUTED 43cb2: c285 andl %d5,%d1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 43cb4: 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; 43cb8: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 43cbc: 4a88 tstl %a0 <== NOT EXECUTED 43cbe: 6708 beqs 43cc8 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 43cc0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43cc4: 4e90 jsr %a0@ <== NOT EXECUTED 43cc6: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 43cc8: 7002 moveq #2,%d0 <== NOT EXECUTED 43cca: 4285 clrl %d5 <== NOT EXECUTED 43ccc: 1a2e fffb moveb %fp@(-5),%d5 <== NOT EXECUTED 43cd0: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43cd4: 670e beqs 43ce4 <== NOT EXECUTED if (siproc (c, tty)) 43cd6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43cd8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43cda: 4e94 jsr %a4@ <== NOT EXECUTED 43cdc: 508f addql #8,%sp <== NOT EXECUTED 43cde: 4a80 tstl %d0 <== NOT EXECUTED 43ce0: 6616 bnes 43cf8 <== NOT EXECUTED 43ce2: 6016 bras 43cfa <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 43ce4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43ce6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43ce8: 4e94 jsr %a4@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 43cea: 508f addql #8,%sp <== NOT EXECUTED 43cec: 4280 clrl %d0 <== NOT EXECUTED 43cee: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 43cf2: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43cf6: 6e02 bgts 43cfa <== NOT EXECUTED 43cf8: 4284 clrl %d4 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 43cfa: 2a2a 0070 movel %a2@(112),%d5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 43cfe: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43d02: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 43d06: b081 cmpl %d1,%d0 <== NOT EXECUTED 43d08: 6710 beqs 43d1a <== NOT EXECUTED 43d0a: 2039 0005 a354 movel 5a354 ,%d0 <== NOT EXECUTED 43d10: 5380 subql #1,%d0 <== NOT EXECUTED 43d12: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43d16: 6e00 ff06 bgtw 43c1e <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 43d1a: 4a84 tstl %d4 <== NOT EXECUTED 43d1c: 6728 beqs 43d46 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 43d1e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43d20: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 43d24: 2046 moveal %d6,%a0 <== NOT EXECUTED 43d26: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 43d2a: 4e90 jsr %a0@ <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 43d2c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d30: 4a80 tstl %d0 <== NOT EXECUTED 43d32: 67ca beqs 43cfe <== NOT EXECUTED 43d34: 6010 bras 43d46 <== 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++]; 43d36: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED count--; 43d3a: 5382 subql #1,%d2 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 43d3c: 1af0 0800 moveb %a0@(00000000,%d0:l),%a5@+ <== NOT EXECUTED 43d40: 5280 addql #1,%d0 <== NOT EXECUTED 43d42: 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)) { 43d46: 4a82 tstl %d2 <== NOT EXECUTED 43d48: 670a beqs 43d54 <== NOT EXECUTED 43d4a: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 43d4e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43d52: 6de2 blts 43d36 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 43d54: 202b 0010 movel %a3@(16),%d0 <== NOT EXECUTED 43d58: 9082 subl %d2,%d0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 43d5a: 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; 43d5e: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 43d62: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 43d66: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 43d6c: 588f addql #4,%sp <== NOT EXECUTED } 43d6e: 2003 movel %d3,%d0 <== NOT EXECUTED 43d70: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43d76: 4e5e unlk %fp <== NOT EXECUTED 43d78: 4e75 rts 00042eec : * 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) { 42eec: 4e56 fff4 linkw %fp,#-12 42ef0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42ef4: 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)) 42ef8: 202a 00b8 movel %a2@(184),%d0 42efc: 0280 0000 0403 andil #1027,%d0 42f02: 0c80 0000 0401 cmpil #1025,%d0 42f08: 663c bnes 42f46 <== NEVER TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 42f0a: 4878 0001 pea 1 <== NOT EXECUTED 42f0e: 486a 004a pea %a2@(74) <== NOT EXECUTED 42f12: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42f16: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 42f1a: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 42f1c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 42f22: 40c1 movew %sr,%d1 <== NOT EXECUTED 42f24: 8081 orl %d1,%d0 <== NOT EXECUTED 42f26: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 42f28: 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--; 42f2a: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 42f2e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 42f32: 8082 orl %d2,%d0 <== NOT EXECUTED 42f34: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 42f38: 46c1 movew %d1,%sr <== NOT EXECUTED 42f3a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42f3e: 143c 0001 moveb #1,%d2 <== NOT EXECUTED 42f42: 6000 0156 braw 4309a <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 42f46: 202a 00b8 movel %a2@(184),%d0 42f4a: 7203 moveq #3,%d1 42f4c: 7402 moveq #2,%d2 42f4e: c081 andl %d1,%d0 42f50: b480 cmpl %d0,%d2 42f52: 663a bnes 42f8e <== NEVER TAKEN * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 42f54: 4878 0001 pea 1 <== NOT EXECUTED 42f58: 486a 0049 pea %a2@(73) <== NOT EXECUTED 42f5c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42f60: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 42f64: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 42f66: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 42f6c: 40c1 movew %sr,%d1 <== NOT EXECUTED 42f6e: 8081 orl %d1,%d0 <== NOT EXECUTED 42f70: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 42f72: 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--; 42f74: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 42f78: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 42f7c: c082 andl %d2,%d0 <== NOT EXECUTED 42f7e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 42f82: 46c1 movew %d1,%sr <== NOT EXECUTED 42f84: 7401 moveq #1,%d2 <== NOT EXECUTED 42f86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42f8a: 6000 010e braw 4309a <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 42f8e: 222a 0080 movel %a2@(128),%d1 42f92: 202a 0084 movel %a2@(132),%d0 42f96: b081 cmpl %d1,%d0 42f98: 6620 bnes 42fba <== NEVER TAKEN /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 42f9a: 7002 moveq #2,%d0 <== NOT EXECUTED 42f9c: b0aa 0094 cmpl %a2@(148),%d0 <== NOT EXECUTED 42fa0: 6706 beqs 42fa8 <== NOT EXECUTED 42fa2: 4282 clrl %d2 <== NOT EXECUTED 42fa4: 6000 00f4 braw 4309a <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 42fa8: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 42fac: 4282 clrl %d2 <== NOT EXECUTED 42fae: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 42fb4: 588f addql #4,%sp <== NOT EXECUTED 42fb6: 6000 00e2 braw 4309a <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 42fba: 203c 0000 0700 movel #1792,%d0 42fc0: 40c2 movew %sr,%d2 42fc2: 8082 orl %d2,%d0 42fc4: 46c0 movew %d0,%sr len = tty->t_dqlen; 42fc6: 222a 0090 movel %a2@(144),%d1 tty->t_dqlen = 0; 42fca: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 42fce: 46c2 movew %d2,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 42fd0: 202a 0084 movel %a2@(132),%d0 42fd4: d280 addl %d0,%d1 42fd6: 202a 0088 movel %a2@(136),%d0 42fda: 4c40 1003 remul %d0,%d3,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 42fde: 7202 moveq #2,%d1 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 42fe0: 2543 0084 movel %d3,%a2@(132) if (tty->rawOutBufState == rob_wait) { 42fe4: b2aa 0094 cmpl %a2@(148),%d1 42fe8: 660c bnes 42ff6 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 42fea: 2f2a 008c movel %a2@(140),%sp@- 42fee: 4eb9 0004 5034 jsr 45034 42ff4: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 42ff6: 202a 0080 movel %a2@(128),%d0 42ffa: b083 cmpl %d3,%d0 42ffc: 6622 bnes 43020 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 42ffe: 206a 00d4 moveal %a2@(212),%a0 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43002: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43006: 4a88 tstl %a0 43008: 6606 bnes 43010 <== ALWAYS TAKEN 4300a: 4282 clrl %d2 4300c: 6000 0088 braw 43096 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 43010: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 43014: 4282 clrl %d2 <== NOT EXECUTED 43016: 486a 0030 pea %a2@(48) <== NOT EXECUTED 4301a: 4e90 jsr %a0@ <== NOT EXECUTED 4301c: 508f addql #8,%sp <== NOT EXECUTED 4301e: 6076 bras 43096 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 43020: 202a 00b8 movel %a2@(184),%d0 43024: 0280 0000 0210 andil #528,%d0 4302a: 0c80 0000 0210 cmpil #528,%d0 43030: 6624 bnes 43056 <== NEVER TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 43032: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 43036: 40c1 movew %sr,%d1 <== NOT EXECUTED 43038: 8081 orl %d1,%d0 <== NOT EXECUTED 4303a: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4303c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43040: 7420 moveq #32,%d2 <== NOT EXECUTED 43042: 8082 orl %d2,%d0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 43044: 143c 0001 moveb #1,%d2 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 43048: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4304c: 2542 0094 movel %d2,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 43050: 46c1 movew %d1,%sr <== NOT EXECUTED 43052: 4202 clrb %d2 <== NOT EXECUTED 43054: 6040 bras 43096 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 43056: 202a 0080 movel %a2@(128),%d0 4305a: b083 cmpl %d3,%d0 4305c: 6406 bccs 43064 nToSend = tty->rawOutBuf.Size - newTail; 4305e: 242a 0088 movel %a2@(136),%d2 43062: 6004 bras 43068 <== ALWAYS TAKEN else nToSend = tty->rawOutBuf.Head - newTail; 43064: 242a 0080 movel %a2@(128),%d2 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 43068: 202a 00b8 movel %a2@(184),%d0 * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4306c: 9483 subl %d3,%d2 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 4306e: 0280 0000 0600 andil #1536,%d0 43074: 6702 beqs 43078 <== NEVER TAKEN 43076: 7401 moveq #1,%d2 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 43078: 2f02 movel %d2,%sp@- 4307a: 202a 007c movel %a2@(124),%d0 4307e: d083 addl %d3,%d0 /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 43080: 7201 moveq #1,%d1 (*tty->device.write)(tty->minor, 43082: 2f00 movel %d0,%sp@- 43084: 2f2a 0010 movel %a2@(16),%sp@- 43088: 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*/ 4308c: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)(tty->minor, 43090: 4e90 jsr %a0@ 43092: 4fef 000c lea %sp@(12),%sp &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43096: 2543 0084 movel %d3,%a2@(132) } return nToSend; } 4309a: 2002 movel %d2,%d0 4309c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 430a2: 4e5e unlk %fp 430a4: 4e75 rts 00044642 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44642: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 44646: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4464a: 260e movel %fp,%d3 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 4464c: 240e movel %fp,%d2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4464e: 5d83 subql #6,%d3 <== NOT EXECUTED 44650: 4bf9 0004 4978 lea 44978 ,%a5 <== NOT EXECUTED RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; rtems_task_delete(RTEMS_SELF); 44656: 49f9 0004 5208 lea 45208 ,%a4 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 4465c: 5382 subql #1,%d2 <== NOT EXECUTED 4465e: 47f9 0004 3106 lea 43106 ,%a3 <== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44664: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 44668: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4466a: 42a7 clrl %sp@- <== NOT EXECUTED 4466c: 4878 0002 pea 2 <== NOT EXECUTED 44670: 4878 0003 pea 3 <== NOT EXECUTED 44674: 4e95 jsr %a5@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 44676: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4467a: 7001 moveq #1,%d0 <== NOT EXECUTED 4467c: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 44680: 670c beqs 4468e <== NOT EXECUTED tty->rxTaskId = 0; 44682: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44686: 42a7 clrl %sp@- <== NOT EXECUTED 44688: 4e94 jsr %a4@ <== NOT EXECUTED 4468a: 588f addql #4,%sp <== NOT EXECUTED 4468c: 60da bras 44668 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 4468e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44692: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44696: 4e90 jsr %a0@ <== NOT EXECUTED if (c != EOF) { 44698: 588f addql #4,%sp <== NOT EXECUTED 4469a: 72ff moveq #-1,%d1 <== NOT EXECUTED 4469c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4469e: 67c8 beqs 44668 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 446a0: 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; 446a4: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 446a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 446aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446ac: 4e93 jsr %a3@ <== NOT EXECUTED 446ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 446b2: 60b4 bras 44668 <== NOT EXECUTED 00042ed0 : * 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) { 42ed0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42ed4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 42ed8: 4878 0002 pea 2 <== NOT EXECUTED 42edc: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 42ee0: 4eb9 0004 4adc jsr 44adc <== NOT EXECUTED 42ee6: 508f addql #8,%sp <== NOT EXECUTED } 42ee8: 4e5e unlk %fp <== NOT EXECUTED 42eea: 4e75 rts 000445da : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 445da: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 445de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 445e2: 240e movel %fp,%d2 <== NOT EXECUTED 445e4: 5982 subql #4,%d2 <== NOT EXECUTED 445e6: 4bf9 0004 4978 lea 44978 ,%a5 <== NOT EXECUTED RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; rtems_task_delete(RTEMS_SELF); 445ec: 49f9 0004 5208 lea 45208 ,%a4 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 445f2: 47f9 0004 2eec lea 42eec ,%a3 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 445f8: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 445fc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445fe: 42a7 clrl %sp@- <== NOT EXECUTED 44600: 4878 0002 pea 2 <== NOT EXECUTED 44604: 4878 0003 pea 3 <== NOT EXECUTED 44608: 4e95 jsr %a5@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 4460a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4460e: 7001 moveq #1,%d0 <== NOT EXECUTED 44610: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 44614: 670a beqs 44620 <== NOT EXECUTED tty->txTaskId = 0; 44616: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4461a: 42a7 clrl %sp@- <== NOT EXECUTED 4461c: 4e94 jsr %a4@ <== NOT EXECUTED 4461e: 601e bras 4463e <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 44620: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44624: eb88 lsll #5,%d0 <== NOT EXECUTED 44626: 0680 0005 b0ec addil #372972,%d0 <== NOT EXECUTED 4462c: 2240 moveal %d0,%a1 <== NOT EXECUTED 4462e: 2051 moveal %a1@,%a0 <== NOT EXECUTED 44630: 4a88 tstl %a0 <== NOT EXECUTED 44632: 6706 beqs 4463a <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 44634: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44636: 4e90 jsr %a0@ <== NOT EXECUTED 44638: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 4463a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4463c: 4e93 jsr %a3@ <== NOT EXECUTED 4463e: 588f addql #4,%sp <== NOT EXECUTED 44640: 60ba bras 445fc <== NOT EXECUTED 00043982 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 43982: 4e56 ffe8 linkw %fp,#-24 43986: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4398a: 246e 0008 moveal %fp@(8),%a2 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4398e: 2052 moveal %a2@,%a0 43990: 2668 0034 moveal %a0@(52),%a3 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43994: 42a7 clrl %sp@- 43996: 42a7 clrl %sp@- 43998: 2f2b 0018 movel %a3@(24),%sp@- 4399c: 4eb9 0004 4f30 jsr 44f30 if (sc != RTEMS_SUCCESSFUL) 439a2: 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); 439a6: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 439a8: 6600 0084 bnew 43a2e <== ALWAYS TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 439ac: 202b 00cc movel %a3@(204),%d0 439b0: eb88 lsll #5,%d0 439b2: 0680 0005 b0e4 addil #372964,%d0 439b8: 2240 moveal %d0,%a1 439ba: 2051 moveal %a1@,%a0 439bc: 4a88 tstl %a0 439be: 6718 beqs 439d8 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 439c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 439c2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 439c4: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_release (tty->osem); 439c6: 2f2b 0018 movel %a3@(24),%sp@- <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 439ca: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 439cc: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 439d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 439d6: 6056 bras 43a2e <== NOT EXECUTED } if (tty->termios.c_oflag & OPOST) { 439d8: 7001 moveq #1,%d0 439da: c0ab 0034 andl %a3@(52),%d0 439de: 6728 beqs 43a08 <== ALWAYS TAKEN uint32_t count = args->count; 439e0: 262a 0010 movel %a2@(16),%d3 char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 439e4: 4bfa fa72 lea %pc@(43458 ),%a5 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 439e8: 286a 000c moveal %a2@(12),%a4 while (count--) 439ec: 600e bras 439fc <== ALWAYS TAKEN oproc (*buffer++, tty); 439ee: 4280 clrl %d0 439f0: 101c moveb %a4@+,%d0 439f2: 5383 subql #1,%d3 439f4: 2f0b movel %a3,%sp@- 439f6: 2f00 movel %d0,%sp@- 439f8: 4e95 jsr %a5@ 439fa: 508f addql #8,%sp return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 439fc: 4a83 tstl %d3 439fe: 66ee bnes 439ee oproc (*buffer++, tty); args->bytes_moved = args->count; 43a00: 256a 0010 0018 movel %a2@(16),%a2@(24) 43a06: 601a bras 43a22 <== ALWAYS TAKEN } else { rtems_termios_puts (args->buffer, args->count, tty); 43a08: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43a0a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a0e: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 43a12: 4eb9 0004 335e jsr 4335e <== NOT EXECUTED args->bytes_moved = args->count; 43a18: 256a 0010 0018 movel %a2@(16),%a2@(24) <== NOT EXECUTED 43a1e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 43a22: 2f2b 0018 movel %a3@(24),%sp@- 43a26: 4eb9 0004 5034 jsr 45034 return sc; 43a2c: 588f addql #4,%sp } 43a2e: 2002 movel %d2,%d0 43a30: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 43a36: 4e5e unlk %fp 43a38: 4e75 rts 00050740 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 50740: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 50744: 486e fffc pea %fp@(-4) 50748: 2f2e 0008 movel %fp@(8),%sp@- 5074c: 4879 0007 3b02 pea 73b02 <_Timer_Information> 50752: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50758: 4fef 000c lea %sp@(12),%sp 5075c: 4aae fffc tstl %fp@(-4) 50760: 6704 beqs 50766 50762: 7004 moveq #4,%d0 50764: 601e bras 50784 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 50766: 7204 moveq #4,%d1 50768: 2040 moveal %d0,%a0 5076a: b2a8 0038 cmpl %a0@(56),%d1 5076e: 670c beqs 5077c <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 50770: 4868 0010 pea %a0@(16) 50774: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> 5077a: 588f addql #4,%sp _Thread_Enable_dispatch(); 5077c: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> 50782: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50784: 4e5e unlk %fp 50786: 4e75 rts 00050810 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 50810: 4e56 fffc linkw %fp,#-4 50814: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 50816: 486e fffc pea %fp@(-4) 5081a: 2f2e 0008 movel %fp@(8),%sp@- 5081e: 4879 0007 3b02 pea 73b02 <_Timer_Information> 50824: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5082a: 4fef 000c lea %sp@(12),%sp 5082e: 2440 moveal %d0,%a2 50830: 4aae fffc tstl %fp@(-4) 50834: 6704 beqs 5083a 50836: 7004 moveq #4,%d0 50838: 6032 bras 5086c <== ALWAYS TAKEN case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 5083a: 2f00 movel %d0,%sp@- 5083c: 4879 0007 3b02 pea 73b02 <_Timer_Information> 50842: 4eb9 0005 2b0c jsr 52b0c <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 50848: 486a 0010 pea %a2@(16) 5084c: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 50852: 2f0a movel %a2,%sp@- 50854: 4879 0007 3b02 pea 73b02 <_Timer_Information> 5085a: 4eb9 0005 2d80 jsr 52d80 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 50860: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 50866: 4fef 0014 lea %sp@(20),%sp case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 5086a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5086c: 246e fff8 moveal %fp@(-8),%a2 50870: 4e5e unlk %fp 50872: 4e75 rts 00050874 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 50874: 4e56 ffe4 linkw %fp,#-28 50878: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 5087c: 282e 0008 movel %fp@(8),%d4 50880: 262e 000c movel %fp@(12),%d3 50884: 2a2e 0010 movel %fp@(16),%d5 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 50888: 4a83 tstl %d3 5088a: 6606 bnes 50892 5088c: 700a moveq #10,%d0 5088e: 6000 008e braw 5091e <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; if ( !routine ) 50892: 4a85 tstl %d5 50894: 6606 bnes 5089c 50896: 7009 moveq #9,%d0 50898: 6000 0084 braw 5091e <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 5089c: 486e fffc pea %fp@(-4) 508a0: 2f04 movel %d4,%sp@- 508a2: 4879 0007 3b02 pea 73b02 <_Timer_Information> 508a8: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 508ae: 4fef 000c lea %sp@(12),%sp 508b2: 2440 moveal %d0,%a2 508b4: 4aae fffc tstl %fp@(-4) 508b8: 6704 beqs 508be 508ba: 7004 moveq #4,%d0 508bc: 6060 bras 5091e <== ALWAYS TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 508be: 2400 movel %d0,%d2 508c0: 0682 0000 0010 addil #16,%d2 508c6: 2f02 movel %d2,%sp@- 508c8: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> _ISR_Disable( level ); 508ce: 203c 0000 0700 movel #1792,%d0 508d4: 40c1 movew %sr,%d1 508d6: 8081 orl %d1,%d0 508d8: 46c0 movew %d0,%sr 508da: 47f9 0005 376a lea 5376a <_Thread_Enable_dispatch>,%a3 /* * 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 ) { 508e0: 588f addql #4,%sp 508e2: 4aaa 0018 tstl %a2@(24) 508e6: 6706 beqs 508ee _ISR_Enable( level ); 508e8: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 508ea: 4e93 jsr %a3@ 508ec: 602e bras 5091c <== ALWAYS TAKEN Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 508ee: 2545 002c movel %d5,%a2@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 508f2: 256e 0014 0034 movel %fp@(20),%a2@(52) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 508f8: 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; 508fc: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50900: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 50904: 46c1 movew %d1,%sr Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 50906: 2543 001c movel %d3,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 5090a: 2f02 movel %d2,%sp@- 5090c: 4879 0007 39b8 pea 739b8 <_Watchdog_Ticks_chain> 50912: 4eb9 0005 498c jsr 5498c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 50918: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 5091a: 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(); 5091c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5091e: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 50924: 4e5e unlk %fp 50926: 4e75 rts 00050928 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 50928: 4e56 ffe8 linkw %fp,#-24 5092c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 50930: 2a2e 0008 movel %fp@(8),%d5 50934: 242e 000c movel %fp@(12),%d2 50938: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 5093c: 4a39 0007 38f4 tstb 738f4 <_TOD_Is_set> 50942: 6606 bnes 5094a 50944: 700b moveq #11,%d0 50946: 6000 00a2 braw 509ea <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 5094a: 2f02 movel %d2,%sp@- 5094c: 4eb9 0004 e040 jsr 4e040 <_TOD_Validate> 50952: 588f addql #4,%sp 50954: 4a00 tstb %d0 50956: 6700 0090 beqw 509e8 return RTEMS_INVALID_CLOCK; if ( !routine ) 5095a: 4a83 tstl %d3 5095c: 6606 bnes 50964 5095e: 7009 moveq #9,%d0 50960: 6000 0088 braw 509ea <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 50964: 2f02 movel %d2,%sp@- 50966: 4eb9 0004 dfa0 jsr 4dfa0 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5096c: 588f addql #4,%sp return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 5096e: 2800 movel %d0,%d4 if ( seconds <= _TOD_Seconds_since_epoch() ) 50970: b0b9 0007 3972 cmpl 73972 <_TOD_Now>,%d0 50976: 6370 blss 509e8 50978: 486e fffc pea %fp@(-4) 5097c: 2f05 movel %d5,%sp@- 5097e: 4879 0007 3b02 pea 73b02 <_Timer_Information> 50984: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5098a: 4fef 000c lea %sp@(12),%sp 5098e: 2440 moveal %d0,%a2 50990: 4aae fffc tstl %fp@(-4) 50994: 6704 beqs 5099a 50996: 7004 moveq #4,%d0 50998: 6050 bras 509ea <== ALWAYS TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5099a: 2400 movel %d0,%d2 5099c: 0682 0000 0010 addil #16,%d2 509a2: 2f02 movel %d2,%sp@- 509a4: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 509aa: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY; 509b0: 7002 moveq #2,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 509b2: 2545 0030 movel %d5,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 509b6: 98b9 0007 3972 subl 73972 <_TOD_Now>,%d4 509bc: 2540 0038 movel %d0,%a2@(56) 509c0: 2544 001c movel %d4,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 509c4: 2543 002c movel %d3,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 509c8: 42aa 0018 clrl %a2@(24) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 509cc: 2f02 movel %d2,%sp@- 509ce: 4879 0007 39ac pea 739ac <_Watchdog_Seconds_chain> 509d4: 4eb9 0005 498c jsr 5498c <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 509da: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 509e0: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 509e4: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 509e6: 6002 bras 509ea <== ALWAYS TAKEN 509e8: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 509ea: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 509f0: 4e5e unlk %fp 509f2: 4e75 rts 000509f4 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 509f4: 4e56 fffc linkw %fp,#-4 509f8: 2f0a movel %a2,%sp@- 509fa: 246e 000c moveal %fp@(12),%a2 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 509fe: 4a8a tstl %a2 50a00: 6604 bnes 50a06 50a02: 7009 moveq #9,%d0 50a04: 6042 bras 50a48 <== ALWAYS TAKEN 50a06: 486e fffc pea %fp@(-4) 50a0a: 2f2e 0008 movel %fp@(8),%sp@- 50a0e: 4879 0007 3b02 pea 73b02 <_Timer_Information> 50a14: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50a1a: 4fef 000c lea %sp@(12),%sp 50a1e: 2040 moveal %d0,%a0 50a20: 4aae fffc tstl %fp@(-4) 50a24: 6704 beqs 50a2a 50a26: 7004 moveq #4,%d0 50a28: 601e bras 50a48 <== ALWAYS TAKEN case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 50a2a: 24a8 0038 movel %a0@(56),%a2@ the_info->initial = the_timer->Ticker.initial; 50a2e: 2568 001c 0004 movel %a0@(28),%a2@(4) the_info->start_time = the_timer->Ticker.start_time; 50a34: 2568 0024 0008 movel %a0@(36),%a2@(8) the_info->stop_time = the_timer->Ticker.stop_time; 50a3a: 2568 0028 000c movel %a0@(40),%a2@(12) _Thread_Enable_dispatch(); 50a40: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> 50a46: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50a48: 246e fff8 moveal %fp@(-8),%a2 50a4c: 4e5e unlk %fp 50a4e: 4e75 rts 00050c94 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 50c94: 4e56 fffc linkw %fp,#-4 50c98: 202e 0008 movel %fp@(8),%d0 50c9c: 2f03 movel %d3,%sp@- 50c9e: 2f02 movel %d2,%sp@- */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 50ca0: 4a80 tstl %d0 50ca2: 671e beqs 50cc2 50ca4: 4281 clrl %d1 50ca6: 1239 0006 de02 moveb 6de02 ,%d1 50cac: b280 cmpl %d0,%d1 50cae: 54c1 scc %d1 50cb0: 49c1 extbl %d1 50cb2: 4481 negl %d1 * Make sure the requested priority is valid. The if is * 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 ) ) { 50cb4: 4a01 tstb %d1 50cb6: 6704 beqs 50cbc 50cb8: 2400 movel %d0,%d2 50cba: 600e bras 50cca <== ALWAYS TAKEN if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 50cbc: 72ff moveq #-1,%d1 50cbe: b280 cmpl %d0,%d1 50cc0: 6706 beqs 50cc8 50cc2: 7013 moveq #19,%d0 50cc4: 6000 0146 braw 50e0c <== ALWAYS TAKEN 50cc8: 4282 clrl %d2 50cca: 2039 0007 38e0 movel 738e0 <_Thread_Dispatch_disable_level>,%d0 50cd0: 5280 addql #1,%d0 50cd2: 23c0 0007 38e0 movel %d0,738e0 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 50cd8: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 50cda: 1639 0006 ed38 moveb 6ed38 ,%d3 initialized = true; 50ce0: 13c0 0006 ed38 moveb %d0,6ed38 _Thread_Enable_dispatch(); 50ce6: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> if ( tmpInitialized ) 50cec: 4a03 tstb %d3 50cee: 6706 beqs 50cf6 50cf0: 700e moveq #14,%d0 50cf2: 6000 0118 braw 50e0c * 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( 50cf6: 222e 0010 movel %fp@(16),%d1 50cfa: 486e fffc pea %fp@(-4) 50cfe: 08c1 000f bset #15,%d1 50d02: 2f01 movel %d1,%sp@- 50d04: 4878 0100 pea 100 50d08: 2f2e 000c movel %fp@(12),%sp@- 50d0c: 2f02 movel %d2,%sp@- 50d0e: 2f3c 5449 4d45 movel #1414090053,%sp@- 50d14: 4eb9 0004 ff5c jsr 4ff5c /* 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) { 50d1a: 4fef 0018 lea %sp@(24),%sp 50d1e: 4a80 tstl %d0 50d20: 670c beqs 50d2e initialized = false; 50d22: 4201 clrb %d1 50d24: 13c1 0006 ed38 moveb %d1,6ed38 return status; 50d2a: 6000 00e0 braw 50e0c <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50d2e: 41f9 0006 ed6e lea 6ed6e <_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( 50d34: 4282 clrl %d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 50d36: 223c 0006 ed6a movel #453994,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50d3c: 23c8 0006 ed6a movel %a0,6ed6a <_Timer_server_Default+0x30> &_RTEMS_tasks_Information, _Objects_Get_index(id) 50d42: 202e fffc movel %fp@(-4),%d0 50d46: 41f9 0006 eda6 lea 6eda6 <_Timer_server_Default+0x6c>,%a0 50d4c: 23c8 0006 eda2 movel %a0,6eda2 <_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( 50d52: 2079 0007 386c moveal 7386c <_RTEMS_tasks_Information+0x18>,%a0 50d58: 3400 movew %d0,%d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 50d5a: 23c1 0006 ed72 movel %d1,6ed72 <_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; 50d60: 2239 0007 3a20 movel 73a20 <_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( 50d66: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%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; 50d6a: 23c1 0006 ed76 movel %d1,6ed76 <_Timer_server_Default+0x3c> /* * 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( 50d70: 23d0 0006 ed3a movel %a0@,6ed3a <_Timer_server_Default> 50d76: 41f9 0006 eda2 lea 6eda2 <_Timer_server_Default+0x68>,%a0 _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 50d7c: 4879 0006 ed3a pea 6ed3a <_Timer_server_Default> 50d82: 487a 0158 pea %pc@(50edc <_Timer_server_Body>) /* * 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; 50d86: 223c 0005 10a4 movel #331940,%d1 50d8c: 23c8 0006 edaa movel %a0,6edaa <_Timer_server_Default+0x70> the_watchdog->routine = routine; 50d92: 41f9 0005 35dc lea 535dc <_Thread_Delay_ended>,%a0 50d98: 23c8 0006 ed5e movel %a0,6ed5e <_Timer_server_Default+0x24> 50d9e: 23c8 0006 ed96 movel %a0,6ed96 <_Timer_server_Default+0x5c> ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 50da4: 41f9 0007 3972 lea 73972 <_TOD_Now>,%a0 50daa: 23d0 0006 edae movel %a0@,6edae <_Timer_server_Default+0x74> ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 50db0: 41f9 0006 ed3a lea 6ed3a <_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; 50db6: 23c1 0006 ed3e movel %d1,6ed3e <_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; 50dbc: 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; 50dbe: 42b9 0006 edb2 clrl 6edb2 <_Timer_server_Default+0x78> ts->active = false; 50dc4: 13c1 0006 edb6 moveb %d1,6edb6 <_Timer_server_Default+0x7c> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 50dca: 2f00 movel %d0,%sp@- ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 50dcc: 23c8 0007 3b3a movel %a0,73b3a <_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; 50dd2: 42b9 0006 ed6e clrl 6ed6e <_Timer_server_Default+0x34> 50dd8: 42b9 0006 eda6 clrl 6eda6 <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50dde: 42b9 0006 ed4a clrl 6ed4a <_Timer_server_Default+0x10> the_watchdog->routine = routine; the_watchdog->id = id; 50de4: 23c0 0006 ed62 movel %d0,6ed62 <_Timer_server_Default+0x28> the_watchdog->user_data = user_data; 50dea: 42b9 0006 ed66 clrl 6ed66 <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50df0: 42b9 0006 ed82 clrl 6ed82 <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 50df6: 23c0 0006 ed9a movel %d0,6ed9a <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 50dfc: 42b9 0006 ed9e clrl 6ed9e <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 50e02: 4eb9 0005 0564 jsr 50564 if (status) { initialized = false; } #endif return status; 50e08: 4fef 000c lea %sp@(12),%sp } 50e0c: 242e fff4 movel %fp@(-12),%d2 50e10: 262e fff8 movel %fp@(-8),%d3 50e14: 4e5e unlk %fp 50e16: 4e75 rts 00050a7c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 50a7c: 4e56 fff0 linkw %fp,#-16 50a80: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50a84: 486e fffc pea %fp@(-4) 50a88: 2f2e 0008 movel %fp@(8),%sp@- 50a8c: 4879 0007 3b02 pea 73b02 <_Timer_Information> 50a92: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50a98: 4fef 000c lea %sp@(12),%sp 50a9c: 2440 moveal %d0,%a2 50a9e: 4aae fffc tstl %fp@(-4) 50aa2: 6704 beqs 50aa8 50aa4: 7404 moveq #4,%d2 50aa6: 6054 bras 50afc <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 50aa8: 202a 0038 movel %a2@(56),%d0 50aac: 661e bnes 50acc _Watchdog_Remove( &the_timer->Ticker ); 50aae: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 50ab2: 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 ); 50ab4: 2f0a movel %a2,%sp@- 50ab6: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 50abc: 2f0a movel %a2,%sp@- 50abe: 4879 0007 39b8 pea 739b8 <_Watchdog_Ticks_chain> 50ac4: 4eb9 0005 498c jsr 5498c <_Watchdog_Insert> 50aca: 6026 bras 50af2 <== ALWAYS TAKEN } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 50acc: 7201 moveq #1,%d1 50ace: b280 cmpl %d0,%d1 50ad0: 6704 beqs 50ad6 50ad2: 740b moveq #11,%d2 50ad4: 6020 bras 50af6 <== ALWAYS TAKEN if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 50ad6: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 50ada: 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; 50adc: 2679 0007 3b3a moveal 73b3a <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 50ae2: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 50ae8: 2f0a movel %a2,%sp@- 50aea: 2f0b movel %a3,%sp@- 50aec: 206b 0004 moveal %a3@(4),%a0 50af0: 4e90 jsr %a0@ 50af2: 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(); 50af6: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50afc: 2002 movel %d2,%d0 50afe: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 50b04: 4e5e unlk %fp 50b06: 4e75 rts 00050b08 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 50b08: 4e56 ffe4 linkw %fp,#-28 50b0c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 50b10: 262e 0008 movel %fp@(8),%d3 50b14: 242e 000c movel %fp@(12),%d2 50b18: 282e 0010 movel %fp@(16),%d4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 50b1c: 2679 0007 3b3a moveal 73b3a <_Timer_server>,%a3 if ( !timer_server ) 50b22: 4a8b tstl %a3 50b24: 6606 bnes 50b2c 50b26: 700e moveq #14,%d0 50b28: 6000 008e braw 50bb8 <== ALWAYS TAKEN return RTEMS_INCORRECT_STATE; if ( !routine ) 50b2c: 4a84 tstl %d4 50b2e: 6606 bnes 50b36 50b30: 7009 moveq #9,%d0 50b32: 6000 0084 braw 50bb8 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 50b36: 4a82 tstl %d2 50b38: 6604 bnes 50b3e 50b3a: 700a moveq #10,%d0 50b3c: 607a bras 50bb8 <== ALWAYS TAKEN 50b3e: 486e fffc pea %fp@(-4) 50b42: 2f03 movel %d3,%sp@- 50b44: 4879 0007 3b02 pea 73b02 <_Timer_Information> 50b4a: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50b50: 4fef 000c lea %sp@(12),%sp 50b54: 2440 moveal %d0,%a2 50b56: 4aae fffc tstl %fp@(-4) 50b5a: 6704 beqs 50b60 50b5c: 7004 moveq #4,%d0 50b5e: 6058 bras 50bb8 <== ALWAYS TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 50b60: 486a 0010 pea %a2@(16) 50b64: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> _ISR_Disable( level ); 50b6a: 203c 0000 0700 movel #1792,%d0 50b70: 40c1 movew %sr,%d1 50b72: 8081 orl %d1,%d0 50b74: 46c0 movew %d0,%sr 50b76: 49f9 0005 376a lea 5376a <_Thread_Enable_dispatch>,%a4 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 50b7c: 588f addql #4,%sp 50b7e: 4aaa 0018 tstl %a2@(24) 50b82: 6706 beqs 50b8a _ISR_Enable( level ); 50b84: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 50b86: 4e94 jsr %a4@ 50b88: 602c bras 50bb6 <== ALWAYS TAKEN /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 50b8a: 7001 moveq #1,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 50b8c: 256e 0014 0034 movel %fp@(20),%a2@(52) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 50b92: 2544 002c movel %d4,%a2@(44) the_watchdog->id = id; 50b96: 2543 0030 movel %d3,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 50b9a: 2542 001c movel %d2,%a2@(28) /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 50b9e: 2540 0038 movel %d0,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50ba2: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 50ba6: 46c1 movew %d1,%sr (*timer_server->schedule_operation)( timer_server, the_timer ); 50ba8: 2f0a movel %a2,%sp@- 50baa: 2f0b movel %a3,%sp@- 50bac: 206b 0004 moveal %a3@(4),%a0 50bb0: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 50bb2: 4e94 jsr %a4@ return RTEMS_SUCCESSFUL; 50bb4: 508f addql #8,%sp the_timer->Ticker.initial = ticks; _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 50bb6: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50bb8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 50bbe: 4e5e unlk %fp 50bc0: 4e75 rts ... 00050bc4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 50bc4: 4e56 ffe8 linkw %fp,#-24 50bc8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 50bcc: 282e 0008 movel %fp@(8),%d4 50bd0: 262e 000c movel %fp@(12),%d3 50bd4: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 50bd8: 2679 0007 3b3a moveal 73b3a <_Timer_server>,%a3 if ( !timer_server ) 50bde: 4a8b tstl %a3 50be0: 6606 bnes 50be8 50be2: 700e moveq #14,%d0 50be4: 6000 00a4 braw 50c8a return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 50be8: 4a39 0007 38f4 tstb 738f4 <_TOD_Is_set> 50bee: 6606 bnes 50bf6 <== NEVER TAKEN 50bf0: 700b moveq #11,%d0 <== NOT EXECUTED 50bf2: 6000 0096 braw 50c8a <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !routine ) 50bf6: 4a82 tstl %d2 50bf8: 6606 bnes 50c00 50bfa: 7009 moveq #9,%d0 50bfc: 6000 008c braw 50c8a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 50c00: 2f03 movel %d3,%sp@- 50c02: 4eb9 0004 e040 jsr 4e040 <_TOD_Validate> 50c08: 588f addql #4,%sp 50c0a: 4a00 tstb %d0 50c0c: 677a beqs 50c88 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 50c0e: 2f03 movel %d3,%sp@- 50c10: 4eb9 0004 dfa0 jsr 4dfa0 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 50c16: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 50c18: 2600 movel %d0,%d3 if ( seconds <= _TOD_Seconds_since_epoch() ) 50c1a: b0b9 0007 3972 cmpl 73972 <_TOD_Now>,%d0 50c20: 6366 blss 50c88 50c22: 486e fffc pea %fp@(-4) 50c26: 2f04 movel %d4,%sp@- 50c28: 4879 0007 3b02 pea 73b02 <_Timer_Information> 50c2e: 4eb9 0005 2f10 jsr 52f10 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50c34: 4fef 000c lea %sp@(12),%sp 50c38: 2440 moveal %d0,%a2 50c3a: 4aae fffc tstl %fp@(-4) 50c3e: 6704 beqs 50c44 50c40: 7004 moveq #4,%d0 50c42: 6046 bras 50c8a <== ALWAYS TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 50c44: 486a 0010 pea %a2@(16) 50c48: 4eb9 0005 4aa8 jsr 54aa8 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 50c4e: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 50c54: 7003 moveq #3,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 50c56: 2544 0030 movel %d4,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 50c5a: 96b9 0007 3972 subl 73972 <_TOD_Now>,%d3 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 50c60: 2540 0038 movel %d0,%a2@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 50c64: 2543 001c movel %d3,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 50c68: 2542 002c movel %d2,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50c6c: 42aa 0018 clrl %a2@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 50c70: 2f0a movel %a2,%sp@- 50c72: 2f0b movel %a3,%sp@- 50c74: 206b 0004 moveal %a3@(4),%a0 50c78: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 50c7a: 4eb9 0005 376a jsr 5376a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 50c80: 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(); 50c84: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 50c86: 6002 bras 50c8a <== ALWAYS TAKEN 50c88: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50c8a: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 50c90: 4e5e unlk %fp 50c92: 4e75 rts 00041f34 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 41f34: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 41f38: 48d7 047c moveml %d2-%d6/%a2,%sp@ <== NOT EXECUTED 41f3c: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 41f40: 2a04 movel %d4,%d5 <== NOT EXECUTED 41f42: 0285 2000 0000 andil #536870912,%d5 <== NOT EXECUTED 41f48: 672e beqs 41f78 <== NOT EXECUTED { if (rtems_panic_in_progress++) 41f4a: 2039 0005 b8d4 movel 5b8d4 ,%d0 <== NOT EXECUTED 41f50: 2200 movel %d0,%d1 <== NOT EXECUTED 41f52: 5281 addql #1,%d1 <== NOT EXECUTED 41f54: 23c1 0005 b8d4 movel %d1,5b8d4 <== NOT EXECUTED 41f5a: 4a80 tstl %d0 <== NOT EXECUTED 41f5c: 670e beqs 41f6c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 41f5e: 2039 0005 ba34 movel 5ba34 <_Thread_Dispatch_disable_level>,%d0 <== NOT EXECUTED 41f64: 5280 addql #1,%d0 <== NOT EXECUTED 41f66: 23c0 0005 ba34 movel %d0,5ba34 <_Thread_Dispatch_disable_level> <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 41f6c: 7002 moveq #2,%d0 <== NOT EXECUTED 41f6e: b0b9 0005 b8d4 cmpl 5b8d4 ,%d0 <== NOT EXECUTED 41f74: 6d00 0138 bltw 420ae <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 41f78: 2079 0005 a3ec moveal 5a3ec <_impure_ptr>,%a0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 41f7e: 2c04 movel %d4,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 41f80: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 41f84: 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 */ 41f8a: 4eb9 0004 bd3c jsr 4bd3c <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 41f90: 588f addql #4,%sp <== NOT EXECUTED 41f92: 0804 001e btst #30,%d4 <== NOT EXECUTED 41f96: 6604 bnes 41f9c <== NOT EXECUTED 41f98: 4282 clrl %d2 <== NOT EXECUTED 41f9a: 600a bras 41fa6 <== NOT EXECUTED local_errno = errno; 41f9c: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 41fa2: 2040 moveal %d0,%a0 <== NOT EXECUTED 41fa4: 2410 movel %a0@,%d2 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 41fa6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 41faa: 2079 0005 a3ec moveal 5a3ec <_impure_ptr>,%a0 <== NOT EXECUTED 41fb0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 41fb4: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 41fb8: 4eb9 0005 2268 jsr 52268 <== NOT EXECUTED if (status) 41fbe: 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); 41fc2: 2600 movel %d0,%d3 <== NOT EXECUTED if (status) 41fc4: 4a86 tstl %d6 <== NOT EXECUTED 41fc6: 6726 beqs 41fee <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 41fc8: 2f06 movel %d6,%sp@- <== NOT EXECUTED 41fca: 4eb9 0004 1f1c jsr 41f1c <== NOT EXECUTED 41fd0: 2079 0005 a3ec moveal 5a3ec <_impure_ptr>,%a0 <== NOT EXECUTED 41fd6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fd8: 4879 0005 8ed9 pea 58ed9 <== NOT EXECUTED 41fde: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 41fe2: 4eb9 0004 c0c8 jsr 4c0c8 <== NOT EXECUTED 41fe8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 41fec: d680 addl %d0,%d3 <== NOT EXECUTED if (local_errno) 41fee: 4a82 tstl %d2 <== NOT EXECUTED 41ff0: 6754 beqs 42046 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 41ff2: 6f34 bles 42028 <== NOT EXECUTED 41ff4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41ff6: 45f9 0004 c97c lea 4c97c ,%a2 <== NOT EXECUTED 41ffc: 4e92 jsr %a2@ <== NOT EXECUTED 41ffe: 588f addql #4,%sp <== NOT EXECUTED 42000: 2040 moveal %d0,%a0 <== NOT EXECUTED 42002: 4a10 tstb %a0@ <== NOT EXECUTED 42004: 6722 beqs 42028 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 42006: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42008: 4e92 jsr %a2@ <== NOT EXECUTED 4200a: 2079 0005 a3ec moveal 5a3ec <_impure_ptr>,%a0 <== NOT EXECUTED 42010: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42012: 4879 0005 8ee7 pea 58ee7 <== NOT EXECUTED 42018: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4201c: 4eb9 0004 c0c8 jsr 4c0c8 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 42022: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42026: 601c bras 42044 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 42028: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4202a: 4879 0005 8ef4 pea 58ef4 <== NOT EXECUTED 42030: 2079 0005 a3ec moveal 5a3ec <_impure_ptr>,%a0 <== NOT EXECUTED 42036: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4203a: 4eb9 0004 c0c8 jsr 4c0c8 <== NOT EXECUTED 42040: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42044: d680 addl %d0,%d3 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 42046: 4879 0005 96e6 pea 596e6 <== NOT EXECUTED 4204c: 2079 0005 a3ec moveal 5a3ec <_impure_ptr>,%a0 <== NOT EXECUTED 42052: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42056: 0284 3000 0000 andil #805306368,%d4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 4205c: 4eb9 0004 c0c8 jsr 4c0c8 <== NOT EXECUTED (void) fflush(stderr); 42062: 2079 0005 a3ec moveal 5a3ec <_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"); 42068: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 4206a: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4206e: 4eb9 0004 bd3c jsr 4bd3c <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42074: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42078: 4a84 tstl %d4 <== NOT EXECUTED 4207a: 6606 bnes 42082 <== 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"); 4207c: 2006 movel %d6,%d0 <== NOT EXECUTED 4207e: d083 addl %d3,%d0 <== NOT EXECUTED 42080: 602e bras 420b0 <== NOT EXECUTED 42082: 41f9 0004 20d8 lea 420d8 ,%a0 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) { if (error_flag & RTEMS_ERROR_PANIC) 42088: 4a85 tstl %d5 <== NOT EXECUTED 4208a: 6712 beqs 4209e <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 4208c: 4879 0005 8f08 pea 58f08 <== NOT EXECUTED 42092: 42a7 clrl %sp@- <== NOT EXECUTED 42094: 4e90 jsr %a0@ <== NOT EXECUTED _exit(local_errno); 42096: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42098: 4eb9 0004 2828 jsr 42828 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 4209e: 4879 0005 8f1d pea 58f1d <== NOT EXECUTED 420a4: 42a7 clrl %sp@- <== NOT EXECUTED 420a6: 4e90 jsr %a0@ <== NOT EXECUTED abort(); 420a8: 4eb9 0004 b9b0 jsr 4b9b0 <== NOT EXECUTED 420ae: 4280 clrl %d0 <== NOT EXECUTED } } return chars_written; } 420b0: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 420b6: 4e5e unlk %fp <== NOT EXECUTED 420b8: 4e75 rts 000456ac : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 456ac: 4e56 0000 linkw %fp,#0 456b0: 202e 0008 movel %fp@(8),%d0 456b4: 2f0a movel %a2,%sp@- 456b6: 246e 000c moveal %fp@(12),%a2 void *ptr; /* * check the arguments */ if ( !pointer ) 456ba: 4a8a tstl %a2 456bc: 6724 beqs 456e2 return false; if ( !bytes ) 456be: 4a80 tstl %d0 456c0: 6720 beqs 456e2 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 456c2: 42a7 clrl %sp@- 456c4: 42a7 clrl %sp@- 456c6: 2f00 movel %d0,%sp@- 456c8: 4879 0005 bda6 pea 5bda6 <_Workspace_Area> 456ce: 4eb9 0004 692c jsr 4692c <_Protected_heap_Allocate_aligned_with_boundary> /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 456d4: 4fef 0010 lea %sp@(16),%sp 456d8: 4a80 tstl %d0 456da: 6706 beqs 456e2 return false; *pointer = ptr; 456dc: 2480 movel %d0,%a2@ 456de: 7001 moveq #1,%d0 return true; 456e0: 6002 bras 456e4 <== ALWAYS TAKEN 456e2: 4200 clrb %d0 } 456e4: 246e fffc moveal %fp@(-4),%a2 456e8: 4e5e unlk %fp 456ea: 4e75 rts 00060ae4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 60ae4: 4e56 ffe4 linkw %fp,#-28 60ae8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 60aec: 246e 0008 moveal %fp@(8),%a2 60af0: 4283 clrl %d3 60af2: 283c 7fff ffff movel #2147483647,%d4 60af8: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 60afa: 47f9 0007 9d40 lea 79d40 <__srget_r>,%a3 60b00: 202a 0004 movel %a2@(4),%d0 60b04: 5380 subql #1,%d0 60b06: 2540 0004 movel %d0,%a2@(4) 60b0a: 6c0e bges 60b1a <== NEVER TAKEN 60b0c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60b0e: 2f39 0009 6500 movel 96500 <_impure_ptr>,%sp@- <== NOT EXECUTED 60b14: 4e93 jsr %a3@ <== NOT EXECUTED 60b16: 508f addql #8,%sp <== NOT EXECUTED 60b18: 600a bras 60b24 <== NOT EXECUTED 60b1a: 2052 moveal %a2@,%a0 60b1c: 4280 clrl %d0 60b1e: 1010 moveb %a0@,%d0 60b20: 5288 addql #1,%a0 60b22: 2488 movel %a0,%a2@ if (c == ':') 60b24: 723a moveq #58,%d1 60b26: b280 cmpl %d0,%d1 60b28: 6750 beqs 60b7a break; if (sign == 0) { 60b2a: 4a83 tstl %d3 60b2c: 660e bnes 60b3c <== ALWAYS TAKEN if (c == '-') { 60b2e: 7c2d moveq #45,%d6 60b30: bc80 cmpl %d0,%d6 60b32: 6606 bnes 60b3a <== NEVER TAKEN sign = -1; limit++; 60b34: 5284 addql #1,%d4 <== NOT EXECUTED 60b36: 76ff moveq #-1,%d3 <== NOT EXECUTED continue; 60b38: 60c6 bras 60b00 <== NOT EXECUTED 60b3a: 7601 moveq #1,%d3 } sign = 1; } if (!isdigit(c)) 60b3c: 2079 0009 64f4 moveal 964f4 <__ctype_ptr__>,%a0 60b42: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 60b46: 49c1 extbl %d1 60b48: 44c1 movew %d1,%ccr 60b4a: 6640 bnes 60b8c <== ALWAYS TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 60b4c: 2204 movel %d4,%d1 60b4e: 7c0a moveq #10,%d6 60b50: 4c46 1005 remul %d6,%d5,%d1 60b54: 4c46 1001 remul %d6,%d1,%d1 60b58: b282 cmpl %d2,%d1 60b5a: 6530 bcss 60b8c <== ALWAYS TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 60b5c: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 60b62: b282 cmpl %d2,%d1 60b64: 6604 bnes 60b6a <== NEVER TAKEN 60b66: ba80 cmpl %d0,%d5 <== NOT EXECUTED 60b68: 6522 bcss 60b8c <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 60b6a: 2202 movel %d2,%d1 60b6c: e789 lsll #3,%d1 60b6e: 2241 moveal %d1,%a1 60b70: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 60b74: 2400 movel %d0,%d2 60b76: d488 addl %a0,%d2 60b78: 6086 bras 60b00 <== ALWAYS TAKEN } if (sign == 0) 60b7a: 4a83 tstl %d3 60b7c: 670e beqs 60b8c <== ALWAYS TAKEN return 0; *val = i * sign; 60b7e: 4c02 3800 mulsl %d2,%d3 60b82: 7001 moveq #1,%d0 60b84: 206e 000c moveal %fp@(12),%a0 60b88: 2083 movel %d3,%a0@ return 1; 60b8a: 6002 bras 60b8e <== ALWAYS TAKEN 60b8c: 4280 clrl %d0 <== NOT EXECUTED } 60b8e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 60b94: 4e5e unlk %fp 60b96: 4e75 rts 00060b98 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 60b98: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 60b9c: 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) { 60ba0: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 60ba4: 246e 0010 moveal %fp@(16),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 60ba8: 4bf9 0007 9d40 lea 79d40 <__srget_r>,%a5 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 60bae: 286e 0008 moveal %fp@(8),%a4 60bb2: 266e 0014 moveal %fp@(20),%a3 60bb6: 242e 0018 movel %fp@(24),%d2 int c; *name = *bufp; 60bba: 2092 movel %a2@,%a0@ for (;;) { c = getc(fp); 60bbc: 202c 0004 movel %a4@(4),%d0 60bc0: 5380 subql #1,%d0 60bc2: 2940 0004 movel %d0,%a4@(4) 60bc6: 6c0e bges 60bd6 60bc8: 2f0c movel %a4,%sp@- 60bca: 2f39 0009 6500 movel 96500 <_impure_ptr>,%sp@- 60bd0: 4e95 jsr %a5@ 60bd2: 508f addql #8,%sp 60bd4: 600a bras 60be0 <== ALWAYS TAKEN 60bd6: 2054 moveal %a4@,%a0 60bd8: 4280 clrl %d0 60bda: 1010 moveb %a0@,%d0 60bdc: 5288 addql #1,%a0 60bde: 2888 movel %a0,%a4@ if (c == ':') { 60be0: 723a moveq #58,%d1 60be2: b280 cmpl %d0,%d1 60be4: 6606 bnes 60bec if (nlFlag) 60be6: 4a82 tstl %d2 60be8: 6724 beqs 60c0e <== NEVER TAKEN 60bea: 602e bras 60c1a <== NOT EXECUTED return 0; break; } if (c == '\n') { 60bec: 720a moveq #10,%d1 60bee: b280 cmpl %d0,%d1 60bf0: 6606 bnes 60bf8 if (!nlFlag) 60bf2: 4a82 tstl %d2 60bf4: 6618 bnes 60c0e <== NEVER TAKEN 60bf6: 6022 bras 60c1a <== NOT EXECUTED return 0; break; } if (c == EOF) 60bf8: 72ff moveq #-1,%d1 60bfa: b280 cmpl %d0,%d1 60bfc: 671c beqs 60c1a <== ALWAYS TAKEN return 0; if (*nleft < 2) 60bfe: 7201 moveq #1,%d1 60c00: b293 cmpl %a3@,%d1 60c02: 6416 bccs 60c1a <== ALWAYS TAKEN return 0; **bufp = c; 60c04: 2052 moveal %a2@,%a0 60c06: 1080 moveb %d0,%a0@ ++(*bufp); 60c08: 5292 addql #1,%a2@ --(*nleft); 60c0a: 5393 subql #1,%a3@ } 60c0c: 60ae bras 60bbc <== ALWAYS TAKEN **bufp = '\0'; 60c0e: 2052 moveal %a2@,%a0 ++(*bufp); --(*nleft); 60c10: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 60c12: 4210 clrb %a0@ ++(*bufp); 60c14: 5292 addql #1,%a2@ --(*nleft); 60c16: 5393 subql #1,%a3@ return 1; 60c18: 6002 bras 60c1c <== ALWAYS TAKEN 60c1a: 4280 clrl %d0 <== NOT EXECUTED } 60c1c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 60c22: 4e5e unlk %fp 60c24: 4e75 rts 00060c26 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 60c26: 4e56 ffe4 linkw %fp,#-28 60c2a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60c2e: 42a7 clrl %sp@- 60c30: 280e movel %fp,%d4 60c32: 0684 0000 0014 addil #20,%d4 60c38: 260e movel %fp,%d3 60c3a: 0683 0000 0010 addil #16,%d3 60c40: 47fa ff56 lea %pc@(60b98 ),%a3 60c44: 2f04 movel %d4,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 60c46: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60c4a: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 60c4c: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60c50: 2f0a movel %a2,%sp@- 60c52: 2f02 movel %d2,%sp@- 60c54: 4e93 jsr %a3@ 60c56: 4fef 0014 lea %sp@(20),%sp 60c5a: 4a80 tstl %d0 60c5c: 6700 00c2 beqw 60d20 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 60c60: 42a7 clrl %sp@- 60c62: 2f04 movel %d4,%sp@- 60c64: 2f03 movel %d3,%sp@- 60c66: 486a 0004 pea %a2@(4) 60c6a: 2f02 movel %d2,%sp@- 60c6c: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60c6e: 4fef 0014 lea %sp@(20),%sp 60c72: 4a80 tstl %d0 60c74: 6700 00aa beqw 60d20 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 60c78: 486e fffc pea %fp@(-4) 60c7c: 2f02 movel %d2,%sp@- 60c7e: 4eba fe64 jsr %pc@(60ae4 ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60c82: 508f addql #8,%sp 60c84: 4a80 tstl %d0 60c86: 6700 0098 beqw 60d20 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 60c8a: 4878 0001 pea 1 60c8e: 2f04 movel %d4,%sp@- 60c90: 2f03 movel %d3,%sp@- 60c92: 486e fff8 pea %fp@(-8) 60c96: 2f02 movel %d2,%sp@- 60c98: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60c9a: 4fef 0014 lea %sp@(20),%sp 60c9e: 4a80 tstl %d0 60ca0: 677e beqs 60d20 <== ALWAYS TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60ca2: 226e fff8 moveal %fp@(-8),%a1 60ca6: 7001 moveq #1,%d0 60ca8: 2049 moveal %a1,%a0 if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 60caa: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60cb0: 6008 bras 60cba <== ALWAYS TAKEN if(*cp == ',') 60cb2: 722c moveq #44,%d1 60cb4: b282 cmpl %d2,%d1 60cb6: 6602 bnes 60cba <== NEVER TAKEN memcount++; 60cb8: 5280 addql #1,%d0 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60cba: 1210 moveb %a0@,%d1 60cbc: 5288 addql #1,%a0 if(*cp == ',') 60cbe: 1401 moveb %d1,%d2 60cc0: 49c2 extbl %d2 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60cc2: 4a01 tstb %d1 60cc4: 66ec bnes 60cb2 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 60cc6: e588 lsll #2,%d0 60cc8: 0680 0000 0013 addil #19,%d0 60cce: b0ae 0014 cmpl %fp@(20),%d0 60cd2: 624c bhis 60d20 <== ALWAYS TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 60cd4: 202e 0010 movel %fp@(16),%d0 60cd8: 74f0 moveq #-16,%d2 60cda: 0680 0000 000f addil #15,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60ce0: 7201 moveq #1,%d1 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 60ce2: c082 andl %d2,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 60ce4: 2040 moveal %d0,%a0 60ce6: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60ce8: 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); 60cec: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60cf0: 6018 bras 60d0a <== ALWAYS TAKEN if(*cp == ',') { 60cf2: 702c moveq #44,%d0 60cf4: b082 cmpl %d2,%d0 60cf6: 6610 bnes 60d08 <== NEVER TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 60cf8: 2408 movel %a0,%d2 <== NOT EXECUTED 60cfa: 5282 addql #1,%d2 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 60cfc: 4210 clrb %a0@ <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 60cfe: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 60d02: 2382 1c00 movel %d2,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 60d06: 5281 addql #1,%d1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60d08: 5288 addql #1,%a0 60d0a: 1010 moveb %a0@,%d0 if(*cp == ',') { 60d0c: 1400 moveb %d0,%d2 60d0e: 49c2 extbl %d2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60d10: 4a00 tstb %d0 60d12: 66de bnes 60cf2 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 60d14: 206a 000a moveal %a2@(10),%a0 60d18: 7001 moveq #1,%d0 60d1a: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) return 1; 60d1e: 6002 bras 60d22 <== ALWAYS TAKEN 60d20: 4280 clrl %d0 <== NOT EXECUTED } 60d22: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 60d28: 4e5e unlk %fp 60d2a: 4e75 rts 00060d64 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60d64: 4e56 ffe0 linkw %fp,#-32 60d68: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60d6c: 42a7 clrl %sp@- 60d6e: 280e movel %fp,%d4 60d70: 0684 0000 0014 addil #20,%d4 60d76: 260e movel %fp,%d3 60d78: 0683 0000 0010 addil #16,%d3 60d7e: 47fa fe18 lea %pc@(60b98 ),%a3 60d82: 2f04 movel %d4,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60d84: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60d88: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60d8a: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60d8e: 2f0a movel %a2,%sp@- 60d90: 2f02 movel %d2,%sp@- 60d92: 4e93 jsr %a3@ 60d94: 4fef 0014 lea %sp@(20),%sp 60d98: 4a80 tstl %d0 60d9a: 6700 00a4 beqw 60e40 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 60d9e: 42a7 clrl %sp@- 60da0: 2f04 movel %d4,%sp@- 60da2: 2f03 movel %d3,%sp@- 60da4: 486a 0004 pea %a2@(4) 60da8: 2f02 movel %d2,%sp@- 60daa: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60dac: 4fef 0014 lea %sp@(20),%sp 60db0: 4a80 tstl %d0 60db2: 6700 008c beqw 60e40 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 60db6: 486e fffc pea %fp@(-4) 60dba: 49fa fd28 lea %pc@(60ae4 ),%a4 60dbe: 2f02 movel %d2,%sp@- 60dc0: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60dc2: 508f addql #8,%sp 60dc4: 4a80 tstl %d0 60dc6: 6778 beqs 60e40 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 60dc8: 486e fff8 pea %fp@(-8) 60dcc: 2f02 movel %d2,%sp@- 60dce: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60dd0: 508f addql #8,%sp 60dd2: 4a80 tstl %d0 60dd4: 676a beqs 60e40 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 60dd6: 42a7 clrl %sp@- 60dd8: 2f04 movel %d4,%sp@- 60dda: 2f03 movel %d3,%sp@- 60ddc: 486a 000c pea %a2@(12) 60de0: 2f02 movel %d2,%sp@- 60de2: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60de4: 4fef 0014 lea %sp@(20),%sp 60de8: 4a80 tstl %d0 60dea: 6754 beqs 60e40 <== 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) 60dec: 42a7 clrl %sp@- 60dee: 2f04 movel %d4,%sp@- 60df0: 2f03 movel %d3,%sp@- 60df2: 486a 0010 pea %a2@(16) 60df6: 2f02 movel %d2,%sp@- 60df8: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60dfa: 4fef 0014 lea %sp@(20),%sp 60dfe: 4a80 tstl %d0 60e00: 673e beqs 60e40 <== 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) 60e02: 42a7 clrl %sp@- 60e04: 2f04 movel %d4,%sp@- 60e06: 2f03 movel %d3,%sp@- 60e08: 486a 0014 pea %a2@(20) 60e0c: 2f02 movel %d2,%sp@- 60e0e: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60e10: 4fef 0014 lea %sp@(20),%sp 60e14: 4a80 tstl %d0 60e16: 6728 beqs 60e40 <== 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)) 60e18: 4878 0001 pea 1 60e1c: 2f04 movel %d4,%sp@- 60e1e: 2f03 movel %d3,%sp@- 60e20: 486a 0018 pea %a2@(24) 60e24: 2f02 movel %d2,%sp@- 60e26: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60e28: 4fef 0014 lea %sp@(20),%sp 60e2c: 4a80 tstl %d0 60e2e: 6710 beqs 60e40 <== 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; 60e30: 7001 moveq #1,%d0 60e32: 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; 60e38: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; 60e3e: 6002 bras 60e42 <== ALWAYS TAKEN 60e40: 4280 clrl %d0 <== NOT EXECUTED } 60e42: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 60e48: 4e5e unlk %fp 60e4a: 4e75 rts 00060a9a : gid_t gid ) { _POSIX_types_Gid = gid; return 0; } 60a9a: 4280 clrl %d0 <== NOT EXECUTED */ int setgid( gid_t gid ) { 60a9c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Gid = gid; 60aa0: 2079 0009 5d3c moveal 95d3c ,%a0 <== NOT EXECUTED 60aa6: 316e 000a 0034 movew %fp@(10),%a0@(52) <== NOT EXECUTED return 0; } 60aac: 4e5e unlk %fp <== NOT EXECUTED 60aae: 4e75 rts 00060f64 : return NULL; return &grent; } void setgrent(void) { 60f64: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 60f68: 4eb9 0006 0e84 jsr 60e84 <== NOT EXECUTED if (group_fp != NULL) 60f6e: 2039 0009 9df2 movel 99df2 ,%d0 <== NOT EXECUTED 60f74: 670a beqs 60f80 <== NOT EXECUTED fclose(group_fp); 60f76: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60f78: 4eb9 0007 4fc2 jsr 74fc2 <== NOT EXECUTED 60f7e: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 60f80: 4879 0008 e547 pea 8e547 <== NOT EXECUTED 60f86: 4879 0008 cc55 pea 8cc55 <_rodata_start+0x845> <== NOT EXECUTED 60f8c: 4eb9 0007 5828 jsr 75828 <== NOT EXECUTED 60f92: 508f addql #8,%sp <== NOT EXECUTED } 60f94: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 60f96: 23c0 0009 9df2 movel %d0,99df2 <== NOT EXECUTED } 60f9c: 4e75 rts 00061114 : return NULL; return &pwent; } void setpwent(void) { 61114: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 61118: 4eb9 0006 0e84 jsr 60e84 <== NOT EXECUTED if (passwd_fp != NULL) 6111e: 2039 0009 9d0a movel 99d0a ,%d0 <== NOT EXECUTED 61124: 670a beqs 61130 <== NOT EXECUTED fclose(passwd_fp); 61126: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61128: 4eb9 0007 4fc2 jsr 74fc2 <== NOT EXECUTED 6112e: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 61130: 4879 0008 e547 pea 8e547 <== NOT EXECUTED 61136: 4879 0008 cc10 pea 8cc10 <_rodata_start+0x800> <== NOT EXECUTED 6113c: 4eb9 0007 5828 jsr 75828 <== NOT EXECUTED 61142: 508f addql #8,%sp <== NOT EXECUTED } 61144: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 61146: 23c0 0009 9d0a movel %d0,99d0a <== NOT EXECUTED } 6114c: 4e75 rts 0004674e : uid_t uid ) { _POSIX_types_Uid = uid; return 0; } 4674e: 4280 clrl %d0 <== NOT EXECUTED */ int setuid( uid_t uid ) { 46750: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Uid = uid; 46754: 2079 0009 5d3c moveal 95d3c ,%a0 <== NOT EXECUTED 4675a: 316e 000a 0032 movew %fp@(10),%a0@(50) <== NOT EXECUTED return 0; } 46760: 4e5e unlk %fp <== NOT EXECUTED 46762: 4e75 rts 0004391a : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 4391a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4391e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43920: 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)) { 43924: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 43928: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4392a: 4282 clrl %d2 <== NOT EXECUTED 4392c: 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)) { 43930: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED 43936: 6734 beqs 4396c <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43938: 42a7 clrl %sp@- <== NOT EXECUTED 4393a: 42a7 clrl %sp@- <== NOT EXECUTED 4393c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 43940: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED i = iproc (c, tty); 43946: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43948: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4394a: 4eba fe72 jsr %pc@(437be ) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 4394e: 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); 43952: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 43954: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 4395a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4395e: 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); 43960: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 43964: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 43968: 4e5e unlk %fp <== NOT EXECUTED 4396a: 4e75 rts <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 4396c: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 43970: 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); 43974: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 43978: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4397c: 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); 4397e: 6000 fe3e braw 437be <== NOT EXECUTED 00047a00 : int _STAT_NAME( const char *path, struct stat *buf ) { 47a00: 4e56 ffe0 linkw %fp,#-32 47a04: 48d7 001c moveml %d2-%d4,%sp@ 47a08: 282e 0008 movel %fp@(8),%d4 47a0c: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 47a10: 6612 bnes 47a24 rtems_set_errno_and_return_minus_one( EFAULT ); 47a12: 4eb9 0007 4e84 jsr 74e84 <__errno> 47a18: 760e moveq #14,%d3 47a1a: 74ff moveq #-1,%d2 47a1c: 2040 moveal %d0,%a0 47a1e: 2083 movel %d3,%a0@ 47a20: 6000 009a braw 47abc <== ALWAYS TAKEN status = rtems_filesystem_evaluate_path( path, strlen( path ), 47a24: 2f04 movel %d4,%sp@- 47a26: 260e movel %fp,%d3 47a28: 0683 ffff ffec addil #-20,%d3 47a2e: 4eb9 0007 aee8 jsr 7aee8 47a34: 7201 moveq #1,%d1 47a36: 2e81 movel %d1,%sp@ 47a38: 2f03 movel %d3,%sp@- 47a3a: 42a7 clrl %sp@- 47a3c: 2f00 movel %d0,%sp@- 47a3e: 2f04 movel %d4,%sp@- 47a40: 4eb9 0004 6566 jsr 46566 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 47a46: 4fef 0014 lea %sp@(20),%sp 47a4a: 4a80 tstl %d0 47a4c: 6704 beqs 47a52 47a4e: 74ff moveq #-1,%d2 47a50: 606a bras 47abc <== ALWAYS TAKEN return -1; if ( !loc.handlers->fstat_h ){ 47a52: 206e fff4 moveal %fp@(-12),%a0 47a56: 4aa8 0018 tstl %a0@(24) 47a5a: 6628 bnes 47a84 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 47a5c: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 47a60: 4a88 tstl %a0 <== NOT EXECUTED 47a62: 670e beqs 47a72 <== NOT EXECUTED 47a64: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47a68: 4a88 tstl %a0 <== NOT EXECUTED 47a6a: 6706 beqs 47a72 <== NOT EXECUTED 47a6c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47a6e: 4e90 jsr %a0@ <== NOT EXECUTED 47a70: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 47a72: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 47a78: 74ff moveq #-1,%d2 <== NOT EXECUTED 47a7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 47a7c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 47a82: 6038 bras 47abc <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 47a84: 4878 0046 pea 46 47a88: 42a7 clrl %sp@- 47a8a: 2f02 movel %d2,%sp@- 47a8c: 4eb9 0007 8028 jsr 78028 status = (*loc.handlers->fstat_h)( &loc, buf ); 47a92: 206e fff4 moveal %fp@(-12),%a0 47a96: 2f02 movel %d2,%sp@- 47a98: 2f03 movel %d3,%sp@- 47a9a: 2068 0018 moveal %a0@(24),%a0 47a9e: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 47aa0: 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 ); 47aa4: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 47aa6: 4fef 0014 lea %sp@(20),%sp 47aaa: 4a88 tstl %a0 47aac: 670e beqs 47abc <== ALWAYS TAKEN 47aae: 2068 001c moveal %a0@(28),%a0 47ab2: 4a88 tstl %a0 47ab4: 6706 beqs 47abc <== ALWAYS TAKEN 47ab6: 2f03 movel %d3,%sp@- 47ab8: 4e90 jsr %a0@ 47aba: 588f addql #4,%sp return status; } 47abc: 2002 movel %d2,%d0 47abe: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 47ac4: 4e5e unlk %fp 47ac6: 4e75 rts 00061bf8 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 61bf8: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 61bfc: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 61c00: 246e 0008 moveal %fp@(8),%a2 <== 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 ) ) 61c04: 260e movel %fp,%d3 <== NOT EXECUTED 61c06: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 61c0c: 2f0a movel %a2,%sp@- <== NOT EXECUTED */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 61c0e: 242e 000c movel %fp@(12),%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 ) ) 61c12: 4eb9 0007 aee8 jsr 7aee8 <== NOT EXECUTED 61c18: 7201 moveq #1,%d1 <== NOT EXECUTED 61c1a: 2e81 movel %d1,%sp@ <== NOT EXECUTED 61c1c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61c1e: 42a7 clrl %sp@- <== NOT EXECUTED 61c20: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61c22: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61c24: 4eb9 0004 6566 jsr 46566 <== NOT EXECUTED 61c2a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61c2e: 4a80 tstl %d0 <== NOT EXECUTED 61c30: 6704 beqs 61c36 <== NOT EXECUTED 61c32: 74ff moveq #-1,%d2 <== NOT EXECUTED 61c34: 605a bras 61c90 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 61c36: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 61c3a: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 61c3e: 4aa8 0044 tstl %a0@(68) <== NOT EXECUTED 61c42: 6612 bnes 61c56 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 61c44: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 61c4a: 74ff moveq #-1,%d2 <== NOT EXECUTED 61c4c: 2040 moveal %d0,%a0 <== NOT EXECUTED 61c4e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61c54: 603a bras 61c90 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 61c56: 4878 0038 pea 38 <== NOT EXECUTED 61c5a: 42a7 clrl %sp@- <== NOT EXECUTED 61c5c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61c5e: 4eb9 0007 8028 jsr 78028 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 61c64: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 61c68: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61c6a: 486a 001c pea %a2@(28) <== NOT EXECUTED 61c6e: 2068 0044 moveal %a0@(68),%a0 <== NOT EXECUTED 61c72: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 61c74: 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 ); 61c78: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 61c7a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61c7e: 4a88 tstl %a0 <== NOT EXECUTED 61c80: 670e beqs 61c90 <== NOT EXECUTED 61c82: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61c86: 4a88 tstl %a0 <== NOT EXECUTED 61c88: 6706 beqs 61c90 <== NOT EXECUTED 61c8a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61c8c: 4e90 jsr %a0@ <== NOT EXECUTED 61c8e: 588f addql #4,%sp <== NOT EXECUTED return result; } 61c90: 2002 movel %d2,%d0 <== NOT EXECUTED 61c92: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 <== NOT EXECUTED 61c98: 4e5e unlk %fp <== NOT EXECUTED 61c9a: 4e75 rts 00061c9c : int symlink( const char *actualpath, const char *sympath ) { 61c9c: 4e56 ffdc linkw %fp,#-36 61ca0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 61ca4: 246e 000c moveal %fp@(12),%a2 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 61ca8: 742f moveq #47,%d2 61caa: 1012 moveb %a2@,%d0 61cac: 1200 moveb %d0,%d1 61cae: 49c1 extbl %d1 61cb0: b481 cmpl %d1,%d2 61cb2: 670c beqs 61cc0 61cb4: 143c 005c moveb #92,%d2 61cb8: b481 cmpl %d1,%d2 61cba: 6704 beqs 61cc0 <== ALWAYS TAKEN 61cbc: 4a00 tstb %d0 61cbe: 6622 bnes 61ce2 <== NEVER TAKEN 61cc0: 4878 0014 pea 14 61cc4: 2079 0009 5d3c moveal 95d3c ,%a0 61cca: 41e8 0018 lea %a0@(24),%a0 61cce: 2f08 movel %a0,%sp@- 61cd0: 486e ffe8 pea %fp@(-24) 61cd4: 4eb9 0007 7ebc jsr 77ebc 61cda: 4fef 000c lea %sp@(12),%sp 61cde: 7001 moveq #1,%d0 61ce0: 601e bras 61d00 <== ALWAYS TAKEN 61ce2: 4878 0014 pea 14 61ce6: 2039 0009 5d3c movel 95d3c ,%d0 61cec: 5880 addql #4,%d0 61cee: 2f00 movel %d0,%sp@- 61cf0: 486e ffe8 pea %fp@(-24) 61cf4: 4eb9 0007 7ebc jsr 77ebc 61cfa: 4fef 000c lea %sp@(12),%sp 61cfe: 4280 clrl %d0 if ( !loc.ops->evalformake_h ) { 61d00: 206e fff4 moveal %fp@(-12),%a0 61d04: 2068 0004 moveal %a0@(4),%a0 61d08: 4a88 tstl %a0 61d0a: 673a beqs 61d46 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 61d0c: 486e fffc pea %fp@(-4) 61d10: 260e movel %fp,%d3 61d12: 0683 ffff ffe8 addil #-24,%d3 61d18: 2f03 movel %d3,%sp@- 61d1a: 4872 0800 pea %a2@(00000000,%d0:l) 61d1e: 4e90 jsr %a0@ if ( result != 0 ) 61d20: 4fef 000c lea %sp@(12),%sp 61d24: 4a80 tstl %d0 61d26: 6704 beqs 61d2c 61d28: 74ff moveq #-1,%d2 61d2a: 6054 bras 61d80 <== ALWAYS TAKEN return -1; if ( !loc.ops->symlink_h ) { 61d2c: 226e fff4 moveal %fp@(-12),%a1 61d30: 2069 0038 moveal %a1@(56),%a0 61d34: 4a88 tstl %a0 61d36: 6620 bnes 61d58 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 61d38: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 61d3c: 4a88 tstl %a0 <== NOT EXECUTED 61d3e: 6706 beqs 61d46 <== NOT EXECUTED 61d40: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61d42: 4e90 jsr %a0@ <== NOT EXECUTED 61d44: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61d46: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 61d4c: 74ff moveq #-1,%d2 <== NOT EXECUTED 61d4e: 2040 moveal %d0,%a0 <== NOT EXECUTED 61d50: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61d56: 6028 bras 61d80 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 61d58: 2f2e fffc movel %fp@(-4),%sp@- 61d5c: 2f2e 0008 movel %fp@(8),%sp@- 61d60: 2f03 movel %d3,%sp@- 61d62: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 61d64: 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); 61d68: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 61d6a: 4fef 000c lea %sp@(12),%sp 61d6e: 4a88 tstl %a0 61d70: 670e beqs 61d80 <== ALWAYS TAKEN 61d72: 2068 001c moveal %a0@(28),%a0 61d76: 4a88 tstl %a0 61d78: 6706 beqs 61d80 <== ALWAYS TAKEN 61d7a: 2f03 movel %d3,%sp@- 61d7c: 4e90 jsr %a0@ 61d7e: 588f addql #4,%sp return result; } 61d80: 2002 movel %d2,%d0 61d82: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 61d88: 4e5e unlk %fp 61d8a: 4e75 rts 000446e4 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 446e4: 4e56 0000 linkw %fp,#0 446e8: 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; 446ec: 2028 0104 movel %a0@(260),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 446f0: 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 ) { 446f2: 4a80 tstl %d0 446f4: 6728 beqs 4471e <== ALWAYS TAKEN current_reent = _Thread_Executing->libc_reent; 446f6: 2279 0005 f47e moveal 5f47e <_Thread_Executing>,%a1 446fc: 2429 0104 movel %a1@(260),%d2 _Thread_Executing->libc_reent = this_reent; 44700: 2340 0104 movel %d0,%a1@(260) _fwalk (t->libc_reent, sync_wrapper); 44704: 487a 0046 pea %pc@(4474c ) 44708: 2f28 0104 movel %a0@(260),%sp@- 4470c: 4eb9 0004 ecfa jsr 4ecfa <_fwalk> _Thread_Executing->libc_reent = current_reent; 44712: 2079 0005 f47e moveal 5f47e <_Thread_Executing>,%a0 44718: 508f addql #8,%sp 4471a: 2142 0104 movel %d2,%a0@(260) } } 4471e: 242e fffc movel %fp@(-4),%d2 44722: 4e5e unlk %fp 44724: 4e75 rts 0004f198 : int tcsetattr( int fd, int opt, struct termios *tp ) { 4f198: 4e56 0000 linkw %fp,#0 4f19c: 202e 000c movel %fp@(12),%d0 4f1a0: 2f03 movel %d3,%sp@- 4f1a2: 262e 0010 movel %fp@(16),%d3 4f1a6: 2f02 movel %d2,%sp@- 4f1a8: 242e 0008 movel %fp@(8),%d2 switch (opt) { 4f1ac: 4a80 tstl %d0 4f1ae: 672c beqs 4f1dc <== NEVER TAKEN 4f1b0: 7201 moveq #1,%d1 <== NOT EXECUTED 4f1b2: b280 cmpl %d0,%d1 <== NOT EXECUTED 4f1b4: 6710 beqs 4f1c6 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4f1b6: 4eb9 0005 292c jsr 5292c <__errno> <== NOT EXECUTED 4f1bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f1be: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4f1c4: 6034 bras 4f1fa <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 4f1c6: 42a7 clrl %sp@- <== NOT EXECUTED 4f1c8: 4878 0003 pea 3 <== NOT EXECUTED 4f1cc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f1ce: 4eb9 0005 1cd4 jsr 51cd4 <== NOT EXECUTED 4f1d4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f1d8: 4a80 tstl %d0 <== NOT EXECUTED 4f1da: 6d1e blts 4f1fa <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f1dc: 2d43 0010 movel %d3,%fp@(16) 4f1e0: 7002 moveq #2,%d0 4f1e2: 2d42 0008 movel %d2,%fp@(8) } } 4f1e6: 242e fff8 movel %fp@(-8),%d2 4f1ea: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f1ee: 2d40 000c movel %d0,%fp@(12) } } 4f1f2: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f1f4: 4ef9 0005 1cd4 jmp 51cd4 } } 4f1fa: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4f1fe: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f200: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 4f204: 4e5e unlk %fp <== NOT EXECUTED 4f206: 4e75 rts 0004713c : int truncate( const char *path, off_t length ) { 4713c: 4e56 0000 linkw %fp,#0 47140: 2f03 movel %d3,%sp@- 47142: 2f02 movel %d2,%sp@- int status; int fd; fd = open( path, O_WRONLY ); 47144: 4878 0001 pea 1 47148: 2f2e 0008 movel %fp@(8),%sp@- 4714c: 4eb9 0004 51d4 jsr 451d4 if ( fd == -1 ) 47152: 508f addql #8,%sp ) { int status; int fd; fd = open( path, O_WRONLY ); 47154: 2400 movel %d0,%d2 if ( fd == -1 ) 47156: 70ff moveq #-1,%d0 47158: b082 cmpl %d2,%d0 4715a: 6604 bnes 47160 4715c: 76ff moveq #-1,%d3 4715e: 601e bras 4717e <== ALWAYS TAKEN return -1; status = ftruncate( fd, length ); 47160: 2f2e 0010 movel %fp@(16),%sp@- 47164: 2f2e 000c movel %fp@(12),%sp@- 47168: 2f02 movel %d2,%sp@- 4716a: 4eb9 0004 c75c jsr 4c75c 47170: 2600 movel %d0,%d3 (void) close( fd ); 47172: 2f02 movel %d2,%sp@- 47174: 4eb9 0004 3f58 jsr 43f58 return status; 4717a: 4fef 0010 lea %sp@(16),%sp } 4717e: 2003 movel %d3,%d0 47180: 242e fff8 movel %fp@(-8),%d2 47184: 262e fffc movel %fp@(-4),%d3 47188: 4e5e unlk %fp 4718a: 4e75 rts 0004b79c : #include int unlink( const char *path ) { 4b79c: 4e56 ffc0 linkw %fp,#-64 4b7a0: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4b7a4: 246e 0008 moveal %fp@(8),%a2 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4b7a8: 2f0a movel %a2,%sp@- 4b7aa: 4eb9 0004 2128 jsr 42128 if ( parentpathlen == 0 ) 4b7b0: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4b7b2: 2a00 movel %d0,%d5 if ( parentpathlen == 0 ) 4b7b4: 664a bnes 4b800 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4b7b6: 742f moveq #47,%d2 4b7b8: 1012 moveb %a2@,%d0 4b7ba: 1200 moveb %d0,%d1 4b7bc: 49c1 extbl %d1 4b7be: b481 cmpl %d1,%d2 4b7c0: 670c beqs 4b7ce <== NEVER TAKEN 4b7c2: 143c 005c moveb #92,%d2 <== NOT EXECUTED 4b7c6: b481 cmpl %d1,%d2 <== NOT EXECUTED 4b7c8: 6704 beqs 4b7ce <== NOT EXECUTED 4b7ca: 4a00 tstb %d0 <== NOT EXECUTED 4b7cc: 6612 bnes 4b7e0 <== NOT EXECUTED 4b7ce: 4878 0014 pea 14 4b7d2: 2079 0005 a364 moveal 5a364 ,%a0 4b7d8: 41e8 0018 lea %a0@(24),%a0 4b7dc: 2f08 movel %a0,%sp@- 4b7de: 600e bras 4b7ee <== ALWAYS TAKEN 4b7e0: 4878 0014 pea 14 <== NOT EXECUTED 4b7e4: 2039 0005 a364 movel 5a364 ,%d0 <== NOT EXECUTED 4b7ea: 5880 addql #4,%d0 <== NOT EXECUTED 4b7ec: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b7ee: 486e ffec pea %fp@(-20) 4b7f2: 4203 clrb %d3 4b7f4: 4eb9 0004 c200 jsr 4c200 4b7fa: 4fef 000c lea %sp@(12),%sp 4b7fe: 6020 bras 4b820 <== ALWAYS TAKEN else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4b800: 42a7 clrl %sp@- 4b802: 486e ffec pea %fp@(-20) 4b806: 4878 0002 pea 2 4b80a: 2f00 movel %d0,%sp@- 4b80c: 2f0a movel %a2,%sp@- 4b80e: 4eb9 0004 223e jsr 4223e RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4b814: 4fef 0014 lea %sp@(20),%sp 4b818: 4a80 tstl %d0 4b81a: 6600 015c bnew 4b978 <== ALWAYS TAKEN 4b81e: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4b820: 4878 0014 pea 14 4b824: 280e movel %fp,%d4 4b826: 0684 ffff ffec addil #-20,%d4 4b82c: 240e movel %fp,%d2 4b82e: 0682 ffff ffd8 addil #-40,%d2 name = path + parentpathlen; 4b834: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4b836: 47f9 0004 cdac lea 4cdac ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4b83c: 2f04 movel %d4,%sp@- 4b83e: 2f02 movel %d2,%sp@- 4b840: 4eb9 0004 c200 jsr 4c200 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4b846: 2f0a movel %a2,%sp@- 4b848: 4e93 jsr %a3@ 4b84a: 2e80 movel %d0,%sp@ 4b84c: 2f0a movel %a2,%sp@- 4b84e: 4eb9 0004 20f0 jsr 420f0 4b854: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4b856: 2f0a movel %a2,%sp@- 4b858: 4e93 jsr %a3@ 4b85a: 4297 clrl %sp@ 4b85c: 2f02 movel %d2,%sp@- 4b85e: 42a7 clrl %sp@- 4b860: 2f00 movel %d0,%sp@- 4b862: 2f0a movel %a2,%sp@- 4b864: 4eb9 0004 216e jsr 4216e 0, &loc, false ); if ( result != 0 ) { 4b86a: 4fef 0028 lea %sp@(40),%sp 4b86e: 4a80 tstl %d0 4b870: 6722 beqs 4b894 if ( free_parentloc ) 4b872: 4a03 tstb %d3 4b874: 6700 0102 beqw 4b978 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4b878: 206e fff8 moveal %fp@(-8),%a0 4b87c: 4a88 tstl %a0 4b87e: 6700 00f8 beqw 4b978 <== ALWAYS TAKEN 4b882: 2068 001c moveal %a0@(28),%a0 4b886: 4a88 tstl %a0 4b888: 6700 00ee beqw 4b978 <== ALWAYS TAKEN 4b88c: 2f04 movel %d4,%sp@- 4b88e: 78ff moveq #-1,%d4 4b890: 6000 00e0 braw 4b972 <== ALWAYS TAKEN return -1; } if ( !loc.ops->node_type_h ) { 4b894: 226e ffe4 moveal %fp@(-28),%a1 4b898: 2069 0010 moveal %a1@(16),%a0 4b89c: 4a88 tstl %a0 4b89e: 6606 bnes 4b8a6 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 4b8a0: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4b8a4: 605c bras 4b902 <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 4b8a6: 2f02 movel %d2,%sp@- 4b8a8: 4e90 jsr %a0@ 4b8aa: 206e ffe4 moveal %fp@(-28),%a0 4b8ae: 588f addql #4,%sp 4b8b0: 7201 moveq #1,%d1 4b8b2: b280 cmpl %d0,%d1 4b8b4: 6640 bnes 4b8f6 rtems_filesystem_freenode( &loc ); 4b8b6: 4a88 tstl %a0 4b8b8: 670e beqs 4b8c8 <== ALWAYS TAKEN 4b8ba: 2068 001c moveal %a0@(28),%a0 4b8be: 4a88 tstl %a0 4b8c0: 6706 beqs 4b8c8 <== ALWAYS TAKEN 4b8c2: 2f02 movel %d2,%sp@- 4b8c4: 4e90 jsr %a0@ 4b8c6: 588f addql #4,%sp if ( free_parentloc ) 4b8c8: 4a03 tstb %d3 4b8ca: 6718 beqs 4b8e4 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 4b8cc: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4b8d0: 4a88 tstl %a0 <== NOT EXECUTED 4b8d2: 6710 beqs 4b8e4 <== NOT EXECUTED 4b8d4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4b8d8: 4a88 tstl %a0 <== NOT EXECUTED 4b8da: 6708 beqs 4b8e4 <== NOT EXECUTED 4b8dc: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4b8e0: 4e90 jsr %a0@ <== NOT EXECUTED 4b8e2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4b8e4: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> 4b8ea: 78ff moveq #-1,%d4 4b8ec: 2040 moveal %d0,%a0 4b8ee: 7015 moveq #21,%d0 4b8f0: 2080 movel %d0,%a0@ 4b8f2: 6000 0086 braw 4b97a <== ALWAYS TAKEN } if ( !loc.ops->unlink_h ) { 4b8f6: 2268 000c moveal %a0@(12),%a1 4b8fa: 4a89 tstl %a1 4b8fc: 663c bnes 4b93a <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 4b8fe: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4b902: 4a88 tstl %a0 <== NOT EXECUTED 4b904: 6706 beqs 4b90c <== NOT EXECUTED 4b906: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b908: 4e90 jsr %a0@ <== NOT EXECUTED 4b90a: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4b90c: 4a03 tstb %d3 <== NOT EXECUTED 4b90e: 6718 beqs 4b928 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4b910: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4b914: 4a88 tstl %a0 <== NOT EXECUTED 4b916: 6710 beqs 4b928 <== NOT EXECUTED 4b918: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4b91c: 4a88 tstl %a0 <== NOT EXECUTED 4b91e: 6708 beqs 4b928 <== NOT EXECUTED 4b920: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4b924: 4e90 jsr %a0@ <== NOT EXECUTED 4b926: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b928: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 4b92e: 78ff moveq #-1,%d4 <== NOT EXECUTED 4b930: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b932: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4b938: 6040 bras 4b97a <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4b93a: 2f02 movel %d2,%sp@- 4b93c: 2f04 movel %d4,%sp@- 4b93e: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 4b940: 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 ); 4b944: 2800 movel %d0,%d4 rtems_filesystem_freenode( &loc ); 4b946: 508f addql #8,%sp 4b948: 4a88 tstl %a0 4b94a: 670e beqs 4b95a <== ALWAYS TAKEN 4b94c: 2068 001c moveal %a0@(28),%a0 4b950: 4a88 tstl %a0 4b952: 6706 beqs 4b95a <== ALWAYS TAKEN 4b954: 2f02 movel %d2,%sp@- 4b956: 4e90 jsr %a0@ 4b958: 588f addql #4,%sp if ( free_parentloc ) 4b95a: 4a03 tstb %d3 4b95c: 671c beqs 4b97a <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4b95e: 206e fff8 moveal %fp@(-8),%a0 4b962: 4a88 tstl %a0 4b964: 6714 beqs 4b97a <== ALWAYS TAKEN 4b966: 2068 001c moveal %a0@(28),%a0 4b96a: 4a88 tstl %a0 4b96c: 670c beqs 4b97a <== ALWAYS TAKEN 4b96e: 486e ffec pea %fp@(-20) 4b972: 4e90 jsr %a0@ 4b974: 588f addql #4,%sp 4b976: 6002 bras 4b97a <== ALWAYS TAKEN 4b978: 78ff moveq #-1,%d4 <== NOT EXECUTED return result; } 4b97a: 2004 movel %d4,%d0 4b97c: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 4b982: 4e5e unlk %fp 4b984: 4e75 rts 00049692 : */ int unmount( const char *path ) { 49692: 4e56 ffec linkw %fp,#-20 49696: 2f0a movel %a2,%sp@- 49698: 246e 0008 moveal %fp@(8),%a2 4969c: 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 ) ) 4969e: 240e movel %fp,%d2 496a0: 0682 ffff ffec addil #-20,%d2 496a6: 2f0a movel %a2,%sp@- 496a8: 4eb9 0007 aee8 jsr 7aee8 496ae: 7201 moveq #1,%d1 496b0: 2e81 movel %d1,%sp@ 496b2: 2f02 movel %d2,%sp@- 496b4: 42a7 clrl %sp@- 496b6: 2f00 movel %d0,%sp@- 496b8: 2f0a movel %a2,%sp@- 496ba: 4eb9 0004 6566 jsr 46566 496c0: 4fef 0014 lea %sp@(20),%sp 496c4: 4a80 tstl %d0 496c6: 6600 011c bnew 497e4 return -1; mt_entry = loc.mt_entry; 496ca: 246e fffc moveal %fp@(-4),%a2 496ce: 206e fff8 moveal %fp@(-8),%a0 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 496d2: 202e ffec movel %fp@(-20),%d0 496d6: b0aa 001c cmpl %a2@(28),%d0 496da: 6724 beqs 49700 /* * 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 ); 496dc: 4a88 tstl %a0 496de: 670e beqs 496ee <== ALWAYS TAKEN 496e0: 2068 001c moveal %a0@(28),%a0 496e4: 4a88 tstl %a0 496e6: 6706 beqs 496ee <== ALWAYS TAKEN 496e8: 2f02 movel %d2,%sp@- 496ea: 4e90 jsr %a0@ 496ec: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 496ee: 4eb9 0007 4e84 jsr 74e84 <__errno> 496f4: 740d moveq #13,%d2 496f6: 72ff moveq #-1,%d1 496f8: 2040 moveal %d0,%a0 496fa: 2082 movel %d2,%a0@ 496fc: 6000 00e8 braw 497e6 <== ALWAYS TAKEN /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 49700: 4a88 tstl %a0 49702: 670e beqs 49712 <== ALWAYS TAKEN 49704: 2068 001c moveal %a0@(28),%a0 49708: 4a88 tstl %a0 4970a: 6706 beqs 49712 <== ALWAYS TAKEN 4970c: 2f02 movel %d2,%sp@- 4970e: 4e90 jsr %a0@ 49710: 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; 49712: 206a 0014 moveal %a2@(20),%a0 49716: 4aa8 0028 tstl %a0@(40) 4971a: 670a beqs 49726 <== ALWAYS TAKEN fs_root_loc = &mt_entry->mt_fs_root; 4971c: 206a 0028 moveal %a2@(40),%a0 49720: 4aa8 002c tstl %a0@(44) 49724: 6614 bnes 4973a <== NEVER TAKEN if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 49726: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 4972c: 72ff moveq #-1,%d1 <== NOT EXECUTED 4972e: 2040 moveal %d0,%a0 <== NOT EXECUTED 49730: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 49736: 6000 00ae braw 497e6 <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 4973a: 2079 0009 5d3c moveal 95d3c ,%a0 49740: b5e8 0014 cmpal %a0@(20),%a2 49744: 6720 beqs 49766 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 49746: 2079 0009 a6a4 moveal 9a6a4 ,%a0 4974c: 600c bras 4975a <== ALWAYS TAKEN 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; fs_root_loc = &mt_entry->mt_fs_root; 4974e: 202a 002c movel %a2@(44),%d0 49752: b0a8 0018 cmpl %a0@(24),%d0 49756: 670e beqs 49766 * 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 ) { 49758: 2050 moveal %a0@,%a0 4975a: b1fc 0009 a6a8 cmpal #632488,%a0 49760: 66ec bnes 4974e 49762: 6000 0090 braw 497f4 <== ALWAYS TAKEN * 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 ); 49766: 4eb9 0007 4e84 jsr 74e84 <__errno> 4976c: 72ff moveq #-1,%d1 4976e: 2040 moveal %d0,%a0 49770: 7010 moveq #16,%d0 49772: 2080 movel %d0,%a0@ 49774: 6070 bras 497e6 <== ALWAYS TAKEN * 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 ) 49776: 206a 0014 moveal %a2@(20),%a0 4977a: 2f0a movel %a2,%sp@- 4977c: 2068 0028 moveal %a0@(40),%a0 49780: 4e90 jsr %a0@ 49782: 588f addql #4,%sp 49784: 4a80 tstl %d0 49786: 665c bnes 497e4 <== ALWAYS TAKEN * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 49788: 206a 0028 moveal %a2@(40),%a0 4978c: 2f0a movel %a2,%sp@- 4978e: 2068 002c moveal %a0@(44),%a0 49792: 4e90 jsr %a0@ 49794: 588f addql #4,%sp 49796: 4a80 tstl %d0 49798: 671a beqs 497b4 <== NEVER TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 4979a: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 4979e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 497a0: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 497a4: 4e90 jsr %a0@ <== NOT EXECUTED 497a6: 588f addql #4,%sp <== NOT EXECUTED 497a8: 4a80 tstl %d0 <== NOT EXECUTED 497aa: 6738 beqs 497e4 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 497ac: 42a7 clrl %sp@- <== NOT EXECUTED 497ae: 4eb9 0004 a944 jsr 4a944 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 497b4: 2f0a movel %a2,%sp@- 497b6: 4eb9 0004 ac3c jsr 4ac3c <_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 ); 497bc: 206a 0014 moveal %a2@(20),%a0 497c0: 588f addql #4,%sp 497c2: 4a88 tstl %a0 497c4: 6710 beqs 497d6 <== ALWAYS TAKEN 497c6: 2068 001c moveal %a0@(28),%a0 497ca: 4a88 tstl %a0 497cc: 6708 beqs 497d6 <== ALWAYS TAKEN 497ce: 486a 0008 pea %a2@(8) 497d2: 4e90 jsr %a0@ 497d4: 588f addql #4,%sp free( mt_entry ); 497d6: 2f0a movel %a2,%sp@- 497d8: 4eb9 0004 6630 jsr 46630 return 0; 497de: 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 ); 497e0: 4281 clrl %d1 return 0; 497e2: 6002 bras 497e6 <== ALWAYS TAKEN 497e4: 72ff moveq #-1,%d1 } 497e6: 242e ffe4 movel %fp@(-28),%d2 497ea: 2001 movel %d1,%d0 497ec: 246e ffe8 moveal %fp@(-24),%a2 497f0: 4e5e unlk %fp 497f2: 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 ) 497f4: 2f0a movel %a2,%sp@- 497f6: 4eb9 0004 68ac jsr 468ac 497fc: 588f addql #4,%sp 497fe: 7201 moveq #1,%d1 49800: b280 cmpl %d0,%d1 49802: 6600 ff72 bnew 49776 49806: 6000 ff5e braw 49766 <== ALWAYS TAKEN ... 00061e48 : int utime( const char *path, const struct utimbuf *times ) { 61e48: 4e56 ffe0 linkw %fp,#-32 61e4c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 61e50: 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 ) ) 61e54: 240e movel %fp,%d2 61e56: 0682 ffff ffec addil #-20,%d2 61e5c: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 61e5e: 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 ) ) 61e62: 4eb9 0007 aee8 jsr 7aee8 61e68: 7201 moveq #1,%d1 61e6a: 2e81 movel %d1,%sp@ 61e6c: 2f02 movel %d2,%sp@- 61e6e: 42a7 clrl %sp@- 61e70: 2f00 movel %d0,%sp@- 61e72: 2f03 movel %d3,%sp@- 61e74: 4eb9 0004 6566 jsr 46566 61e7a: 4fef 0014 lea %sp@(20),%sp 61e7e: 4a80 tstl %d0 61e80: 6704 beqs 61e86 61e82: 76ff moveq #-1,%d3 61e84: 6052 bras 61ed8 <== ALWAYS TAKEN return -1; if ( !temp_loc.ops->utime_h ){ 61e86: 226e fff8 moveal %fp@(-8),%a1 61e8a: 2069 0030 moveal %a1@(48),%a0 61e8e: 4a88 tstl %a0 61e90: 6620 bnes 61eb2 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); 61e92: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 61e96: 4a88 tstl %a0 <== NOT EXECUTED 61e98: 6706 beqs 61ea0 <== NOT EXECUTED 61e9a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61e9c: 4e90 jsr %a0@ <== NOT EXECUTED 61e9e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61ea0: 4eb9 0007 4e84 jsr 74e84 <__errno> <== NOT EXECUTED 61ea6: 76ff moveq #-1,%d3 <== NOT EXECUTED 61ea8: 2040 moveal %d0,%a0 <== NOT EXECUTED 61eaa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61eb0: 6026 bras 61ed8 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 61eb2: 2f2a 0004 movel %a2@(4),%sp@- 61eb6: 2f12 movel %a2@,%sp@- 61eb8: 2f02 movel %d2,%sp@- 61eba: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 61ebc: 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 ); 61ec0: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 61ec2: 4fef 000c lea %sp@(12),%sp 61ec6: 4a88 tstl %a0 61ec8: 670e beqs 61ed8 <== ALWAYS TAKEN 61eca: 2068 001c moveal %a0@(28),%a0 61ece: 4a88 tstl %a0 61ed0: 6706 beqs 61ed8 <== ALWAYS TAKEN 61ed2: 2f02 movel %d2,%sp@- 61ed4: 4e90 jsr %a0@ 61ed6: 588f addql #4,%sp return result; } 61ed8: 2003 movel %d3,%d0 61eda: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 61ee0: 4e5e unlk %fp 61ee2: 4e75 rts 000446b4 : */ void vprintk( const char *fmt, va_list ap ) { 446b4: 4e56 ffc4 linkw %fp,#-60 446b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 446bc: 246e 0008 moveal %fp@(8),%a2 unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 446c0: 4bee ffec lea %fp@(-20),%a5 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 446c4: 2a3c 0005 935f movel #365407,%d5 */ void vprintk( const char *fmt, va_list ap ) { 446ca: 266e 000c moveal %fp@(12),%a3 for (; *fmt != '\0'; fmt++) { 446ce: 6000 0218 braw 448e8 <== ALWAYS TAKEN bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 446d2: 49c0 extbl %d0 446d4: 7225 moveq #37,%d1 446d6: b280 cmpl %d0,%d1 446d8: 6706 beqs 446e0 BSP_output_char(*fmt); 446da: 2f00 movel %d0,%sp@- 446dc: 6000 0150 braw 4482e <== ALWAYS TAKEN continue; } fmt++; 446e0: 528a addql #1,%a2 if (*fmt == '0' ) { 446e2: 7630 moveq #48,%d3 446e4: 1012 moveb %a2@,%d0 446e6: 49c0 extbl %d0 446e8: b680 cmpl %d0,%d3 446ea: 6704 beqs 446f0 446ec: 7e20 moveq #32,%d7 446ee: 6004 bras 446f4 <== ALWAYS TAKEN lead = '0'; fmt++; 446f0: 528a addql #1,%a2 446f2: 7e30 moveq #48,%d7 } if (*fmt == '-' ) { 446f4: 782d moveq #45,%d4 446f6: 1012 moveb %a2@,%d0 446f8: 49c0 extbl %d0 446fa: b880 cmpl %d0,%d4 446fc: 6704 beqs 44702 446fe: 4206 clrb %d6 44700: 6004 bras 44706 <== ALWAYS TAKEN minus = true; fmt++; 44702: 528a addql #1,%a2 44704: 7c01 moveq #1,%d6 44706: 4282 clrl %d2 44708: 6008 bras 44712 <== ALWAYS TAKEN } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); fmt++; 4470a: 528a addql #1,%a2 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); 4470c: 41f0 08d0 lea %a0@(ffffffd0,%d0:l),%a0 44710: 2408 movel %a0,%d2 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 44712: 2002 movel %d2,%d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44714: 7809 moveq #9,%d4 44716: 1212 moveb %a2@,%d1 width *= 10; 44718: e788 lsll #3,%d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4471a: 2601 movel %d1,%d3 width *= 10; 4471c: 2040 moveal %d0,%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4471e: 0683 ffff ffd0 addil #-48,%d3 44724: 1001 moveb %d1,%d0 44726: 0283 0000 00ff andil #255,%d3 width *= 10; 4472c: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0 44730: 49c0 extbl %d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44732: b883 cmpl %d3,%d4 44734: 64d4 bccs 4470a width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 44736: 766c moveq #108,%d3 44738: b680 cmpl %d0,%d3 4473a: 6604 bnes 44740 lflag = true; c = *++fmt; 4473c: 528a addql #1,%a2 4473e: 1212 moveb %a2@,%d1 } if ( c == 'c' ) { 44740: 7663 moveq #99,%d3 44742: 1001 moveb %d1,%d0 44744: 49c0 extbl %d0 44746: b680 cmpl %d0,%d3 44748: 660c bnes 44756 <== 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); 4474a: 2013 movel %a3@,%d0 <== NOT EXECUTED 4474c: 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); 4474e: 588b addql #4,%a3 <== NOT EXECUTED BSP_output_char(chr); 44750: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44752: 6000 00da braw 4482e <== NOT EXECUTED continue; } if ( c == 's' ) { 44756: 7673 moveq #115,%d3 44758: b680 cmpl %d0,%d3 4475a: 6676 bnes 447d2 unsigned i, len; char *s, *str; str = va_arg(ap, char *); 4475c: 2853 moveal %a3@,%a4 4475e: 588b addql #4,%a3 if ( str == NULL ) { 44760: 4a8c tstl %a4 44762: 6606 bnes 4476a 44764: 49f9 0005 935e lea 5935e ,%a4 4476a: 4283 clrl %d3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 4476c: 6002 bras 44770 <== ALWAYS TAKEN 4476e: 5283 addql #1,%d3 44770: 4a34 3800 tstb %a4@(00000000,%d3:l) 44774: 66f8 bnes 4476e ; /* leading spaces */ if ( !minus ) 44776: 4a06 tstb %d6 44778: 6618 bnes 44792 4477a: 2803 movel %d3,%d4 4477c: 6010 bras 4478e <== ALWAYS TAKEN for ( i=len ; i <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i,%a0 <== NOT EXECUTED 4478a: 4e90 jsr %a0@ <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== ALWAYS TAKEN BSP_output_char(' '); /* no width option */ if (width == 0) { 44792: 4a82 tstl %d2 44794: 6602 bnes 44798 44796: 2403 movel %d3,%d2 width = len; } /* output the string */ for ( i=0 ; i 4479c: 600e bras 447ac <== ALWAYS TAKEN BSP_output_char(*str); 4479e: 49c0 extbl %d0 447a0: 2079 0005 a34c moveal 5a34c ,%a0 447a6: 2f00 movel %d0,%sp@- 447a8: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 447b2: 4a06 tstb %d6 447b4: 6700 0130 beqw 448e6 447b8: 6010 bras 447ca <== ALWAYS TAKEN for ( i=len ; i for ( i=0 ; i,%a0 447c6: 4e90 jsr %a0@ for ( i=0 ; i 447ce: 6000 0116 braw 448e6 <== ALWAYS TAKEN continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 447d2: 766f moveq #111,%d3 447d4: b680 cmpl %d0,%d3 447d6: 6764 beqs 4483c <== ALWAYS TAKEN 447d8: 163c 004f moveb #79,%d3 447dc: b680 cmpl %d0,%d3 447de: 675c beqs 4483c <== ALWAYS TAKEN base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 447e0: 163c 0069 moveb #105,%d3 447e4: b680 cmpl %d0,%d3 447e6: 6758 beqs 44840 <== ALWAYS TAKEN 447e8: 163c 0049 moveb #73,%d3 447ec: b680 cmpl %d0,%d3 447ee: 6750 beqs 44840 <== ALWAYS TAKEN 447f0: 163c 0064 moveb #100,%d3 447f4: b680 cmpl %d0,%d3 447f6: 6748 beqs 44840 447f8: 163c 0044 moveb #68,%d3 447fc: b680 cmpl %d0,%d3 447fe: 6740 beqs 44840 <== ALWAYS TAKEN c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 44800: 163c 0075 moveb #117,%d3 44804: b680 cmpl %d0,%d3 44806: 673e beqs 44846 44808: 163c 0055 moveb #85,%d3 4480c: b680 cmpl %d0,%d3 4480e: 6736 beqs 44846 <== ALWAYS TAKEN base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 44810: 49c1 extbl %d1 44812: 7078 moveq #120,%d0 44814: b081 cmpl %d1,%d0 44816: 6732 beqs 4484a 44818: 163c 0058 moveb #88,%d3 4481c: b681 cmpl %d1,%d3 4481e: 672a beqs 4484a <== ALWAYS TAKEN base = 16; sign = false; } else if ( c == 'p' ) { 44820: 7870 moveq #112,%d4 44822: b881 cmpl %d1,%d4 44824: 6606 bnes 4482c 44826: 163c 0010 moveb #16,%d3 4482a: 6020 bras 4484c <== ALWAYS TAKEN base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 4482c: 2f01 movel %d1,%sp@- 4482e: 2079 0005 a34c moveal 5a34c ,%a0 44834: 4e90 jsr %a0@ continue; 44836: 588f addql #4,%sp 44838: 6000 00ac braw 448e6 <== ALWAYS TAKEN 4483c: 7608 moveq #8,%d3 <== NOT EXECUTED 4483e: 600c bras 4484c <== NOT EXECUTED 44840: 760a moveq #10,%d3 44842: 7201 moveq #1,%d1 44844: 6008 bras 4484e <== ALWAYS TAKEN 44846: 760a moveq #10,%d3 44848: 6002 bras 4484c <== ALWAYS TAKEN 4484a: 7610 moveq #16,%d3 4484c: 4201 clrb %d1 4484e: 200b movel %a3,%d0 44850: 5880 addql #4,%d0 } printNum( 44852: 1c07 moveb %d7,%d6 44854: 2813 movel %a3@,%d4 44856: 49c6 extbl %d6 44858: 2640 moveal %d0,%a3 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 4485a: 4a01 tstb %d1 4485c: 671e beqs 4487c 4485e: 4a84 tstl %d4 44860: 6c1a bges 4487c <== NEVER TAKEN BSP_output_char('-'); 44862: 4878 002d pea 2d <== NOT EXECUTED 44866: 2079 0005 a34c moveal 5a34c ,%a0 <== NOT EXECUTED 4486c: 4e90 jsr %a0@ <== NOT EXECUTED unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 4486e: 588f addql #4,%sp <== NOT EXECUTED unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 44870: 2004 movel %d4,%d0 <== NOT EXECUTED 44872: 4480 negl %d0 <== NOT EXECUTED if (maxwidth) maxwidth--; 44874: 4a82 tstl %d2 <== NOT EXECUTED 44876: 6706 beqs 4487e <== NOT EXECUTED 44878: 5382 subql #1,%d2 <== NOT EXECUTED 4487a: 6002 bras 4487e <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; 4487c: 2004 movel %d4,%d0 4487e: 99cc subal %a4,%a4 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 44880: 3243 moveaw %d3,%a1 44882: 600e bras 44892 <== ALWAYS TAKEN 44884: 9088 subl %a0,%d0 44886: 2040 moveal %d0,%a0 44888: 2001 movel %d1,%d0 4488a: 3e08 movew %a0,%d7 4488c: 1b87 c800 moveb %d7,%a5@(00000000,%a4:l) 44890: 2844 moveal %d4,%a4 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 44892: 2200 movel %d0,%d1 44894: 280c movel %a4,%d4 44896: 5284 addql #1,%d4 44898: 4c43 1001 remul %d3,%d1,%d1 toPrint[count++] = (char) (unsigned_num - (n * base)); 4489c: 3e09 movew %a1,%d7 4489e: cfc1 mulsw %d1,%d7 448a0: 3047 moveaw %d7,%a0 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 448a2: 4a81 tstl %d1 448a4: 66de bnes 44884 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 448a6: 1d80 c8ec moveb %d0,%fp@(ffffffec,%a4:l) 448aa: 600e bras 448ba <== ALWAYS TAKEN for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 448ac: 2f06 movel %d6,%sp@- 448ae: 2079 0005 a34c moveal 5a34c ,%a0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 448b4: 5382 subql #1,%d2 BSP_output_char(lead); 448b6: 4e90 jsr %a0@ toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 448b8: 588f addql #4,%sp 448ba: b882 cmpl %d2,%d4 448bc: 65ee bcss 448ac 448be: 49f5 c800 lea %a5@(00000000,%a4:l),%a4 448c2: 4282 clrl %d2 448c4: 601c bras 448e2 <== ALWAYS TAKEN BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448c6: 2045 moveal %d5,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448c8: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448ca: 1014 moveb %a4@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448cc: 538c subql #1,%a4 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448ce: 49c0 extbl %d0 448d0: 1030 0800 moveb %a0@(00000000,%d0:l),%d0 448d4: 2079 0005 a34c moveal 5a34c ,%a0 448da: 49c0 extbl %d0 448dc: 2f00 movel %d0,%sp@- 448de: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448e0: 588f addql #4,%sp 448e2: b882 cmpl %d2,%d4 448e4: 62e0 bhis 448c6 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 448e6: 528a addql #1,%a2 448e8: 1012 moveb %a2@,%d0 448ea: 6600 fde6 bnew 446d2 sign, width, lead ); } } 448ee: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 448f4: 4e5e unlk %fp 448f6: 4e75 rts 000585fc : ssize_t write( int fd, const void *buffer, size_t count ) { 585fc: 4e56 fff4 linkw %fp,#-12 58600: 202e 000c movel %fp@(12),%d0 58604: 48d7 040c moveml %d2-%d3/%a2,%sp@ 58608: 242e 0008 movel %fp@(8),%d2 5860c: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 58610: b4b9 0005 a254 cmpl 5a254 ,%d2 58616: 6414 bccs 5862c <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 58618: 2479 0005 b8d8 moveal 5b8d8 ,%a2 5861e: ed8a lsll #6,%d2 58620: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 58622: 242a 0014 movel %a2@(20),%d2 58626: 0802 0008 btst #8,%d2 5862a: 6610 bnes 5863c <== NEVER TAKEN 5862c: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 58632: 7409 moveq #9,%d2 <== NOT EXECUTED 58634: 72ff moveq #-1,%d1 <== NOT EXECUTED 58636: 2040 moveal %d0,%a0 <== NOT EXECUTED 58638: 2082 movel %d2,%a0@ <== NOT EXECUTED 5863a: 605e bras 5869a <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 5863c: 4a80 tstl %d0 5863e: 6708 beqs 58648 <== ALWAYS TAKEN rtems_libio_check_count( count ); 58640: 4a81 tstl %d1 58642: 6756 beqs 5869a rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 58644: 44c2 movew %d2,%ccr 58646: 6710 beqs 58658 <== NEVER TAKEN 58648: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 5864e: 72ff moveq #-1,%d1 <== NOT EXECUTED 58650: 2040 moveal %d0,%a0 <== NOT EXECUTED 58652: 7016 moveq #22,%d0 <== NOT EXECUTED 58654: 2080 movel %d0,%a0@ <== NOT EXECUTED 58656: 6042 bras 5869a <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 58658: 206a 003c moveal %a2@(60),%a0 5865c: 2068 000c moveal %a0@(12),%a0 58660: 4a88 tstl %a0 58662: 6612 bnes 58676 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 58664: 4eb9 0004 b9e0 jsr 4b9e0 <__errno> <== NOT EXECUTED 5866a: 72ff moveq #-1,%d1 <== NOT EXECUTED 5866c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5866e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 58674: 6024 bras 5869a <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 58676: 2f01 movel %d1,%sp@- 58678: 2f00 movel %d0,%sp@- 5867a: 2f0a movel %a2,%sp@- 5867c: 4e90 jsr %a0@ if ( rc > 0 ) 5867e: 4fef 000c lea %sp@(12),%sp */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 58682: 2200 movel %d0,%d1 if ( rc > 0 ) 58684: 6f14 bles 5869a <== ALWAYS TAKEN iop->offset += rc; 58686: 2600 movel %d0,%d3 58688: 5bc2 smi %d2 5868a: 49c2 extbl %d2 5868c: d7aa 0010 addl %d3,%a2@(16) 58690: 202a 000c movel %a2@(12),%d0 58694: d182 addxl %d2,%d0 58696: 2540 000c movel %d0,%a2@(12) return rc; } 5869a: 2001 movel %d1,%d0 5869c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 586a2: 4e5e unlk %fp 586a4: 4e75 rts ... 00045f00 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 45f00: 4e56 ffe4 linkw %fp,#-28 45f04: 202e 0008 movel %fp@(8),%d0 45f08: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 45f0c: 266e 000c moveal %fp@(12),%a3 45f10: 262e 0010 movel %fp@(16),%d3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 45f14: b0b9 0005 da54 cmpl 5da54 ,%d0 45f1a: 6414 bccs 45f30 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 45f1c: 2479 0005 f8ac moveal 5f8ac ,%a2 45f22: ed88 lsll #6,%d0 45f24: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 45f26: 202a 0014 movel %a2@(20),%d0 45f2a: 0800 0008 btst #8,%d0 45f2e: 6612 bnes 45f42 45f30: 4eb9 0004 da60 jsr 4da60 <__errno> 45f36: 74ff moveq #-1,%d2 45f38: 7209 moveq #9,%d1 45f3a: 2040 moveal %d0,%a0 45f3c: 2081 movel %d1,%a0@ 45f3e: 6000 00ce braw 4600e rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 45f42: 44c0 movew %d0,%ccr 45f44: 665c bnes 45fa2 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 45f46: 4a8b tstl %a3 45f48: 6758 beqs 45fa2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 45f4a: 4a83 tstl %d3 45f4c: 6f54 bles 45fa2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 45f4e: 0c83 0000 0400 cmpil #1024,%d3 45f54: 6e4c bgts 45fa2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 45f56: 206a 003c moveal %a2@(60),%a0 45f5a: 4aa8 000c tstl %a0@(12) 45f5e: 6614 bnes 45f74 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 45f60: 4eb9 0004 da60 jsr 4da60 <__errno> <== NOT EXECUTED 45f66: 74ff moveq #-1,%d2 <== NOT EXECUTED 45f68: 2040 moveal %d0,%a0 <== NOT EXECUTED 45f6a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 45f70: 6000 009c braw 4600e <== NOT EXECUTED 45f74: 204b moveal %a3,%a0 45f76: 4281 clrl %d1 45f78: 4280 clrl %d0 45f7a: 7801 moveq #1,%d4 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 45f7c: 5281 addql #1,%d1 if ( !iov[v].iov_base ) 45f7e: 4a90 tstl %a0@ 45f80: 6720 beqs 45fa2 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 ) 45f82: 2268 0004 moveal %a0@(4),%a1 45f86: 4a89 tstl %a1 45f88: 57c2 seq %d2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 45f8a: 43f1 0800 lea %a1@(00000000,%d0:l),%a1 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 45f8e: 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 ) 45f90: c484 andl %d4,%d2 45f92: 1802 moveb %d2,%d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 45f94: b089 cmpl %a1,%d0 45f96: 6e0a bgts 45fa2 * 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++ ) { 45f98: 2009 movel %a1,%d0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 45f9a: b3fc 0000 7fff cmpal #32767,%a1 45fa0: 6f10 bles 45fb2 rtems_set_errno_and_return_minus_one( EINVAL ); 45fa2: 4eb9 0004 da60 jsr 4da60 <__errno> 45fa8: 74ff moveq #-1,%d2 45faa: 2040 moveal %d0,%a0 45fac: 7016 moveq #22,%d0 45fae: 2080 movel %d0,%a0@ 45fb0: 605c bras 4600e * 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++ ) { 45fb2: b681 cmpl %d1,%d3 45fb4: 6ec6 bgts 45f7c <== NEVER TAKEN } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 45fb6: 4a02 tstb %d2 <== NOT EXECUTED 45fb8: 6704 beqs 45fbe <== NOT EXECUTED 45fba: 4282 clrl %d2 <== NOT EXECUTED 45fbc: 6050 bras 4600e <== NOT EXECUTED 45fbe: 588b addql #4,%a3 <== NOT EXECUTED 45fc0: 4284 clrl %d4 <== NOT EXECUTED 45fc2: 4282 clrl %d2 <== 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 ) 45fc4: 2013 movel %a3@,%d0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 45fc6: 5284 addql #1,%d4 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 45fc8: 4a80 tstl %d0 <== NOT EXECUTED 45fca: 673c beqs 46008 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 45fcc: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED 45fd0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45fd2: 2f2b fffc movel %a3@(-4),%sp@- <== NOT EXECUTED 45fd6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45fd8: 2068 000c moveal %a0@(12),%a0 <== NOT EXECUTED 45fdc: 4e90 jsr %a0@ <== NOT EXECUTED if ( bytes < 0 ) 45fde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45fe2: 4a80 tstl %d0 <== NOT EXECUTED 45fe4: 6c04 bges 45fea <== NOT EXECUTED 45fe6: 74ff moveq #-1,%d2 <== NOT EXECUTED 45fe8: 6024 bras 4600e <== NOT EXECUTED return -1; if ( bytes > 0 ) { 45fea: 4a80 tstl %d0 <== NOT EXECUTED 45fec: 6716 beqs 46004 <== NOT EXECUTED iop->offset += bytes; total += bytes; 45fee: d480 addl %d0,%d2 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 45ff0: 2c00 movel %d0,%d6 <== NOT EXECUTED 45ff2: 5bc5 smi %d5 <== NOT EXECUTED 45ff4: 49c5 extbl %d5 <== NOT EXECUTED 45ff6: ddaa 0010 addl %d6,%a2@(16) <== NOT EXECUTED 45ffa: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 45ffe: d385 addxl %d5,%d1 <== NOT EXECUTED 46000: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 46004: b093 cmpl %a3@,%d0 <== NOT EXECUTED 46006: 6606 bnes 4600e <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46008: 508b addql #8,%a3 <== NOT EXECUTED 4600a: b684 cmpl %d4,%d3 <== NOT EXECUTED 4600c: 6eb6 bgts 45fc4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 4600e: 2002 movel %d2,%d0 46010: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46016: 4e5e unlk %fp 46018: 4e75 rts ...