000480d0 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 480d0: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 480d2: 4e56 0000 linkw %fp,#0 480d6: 206e 0008 moveal %fp@(8),%a0 480da: 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 ) { 480dc: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 480de: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 480e2: 202a 0048 movel %a2@(72),%d0 480e6: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 480e8: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 480ec: b280 cmpl %d0,%d1 480ee: 6546 bcss 48136 <== NEVER TAKEN 480f0: 303b 0a08 movew %pc@(480fa ,%d0:l:2),%d0 480f4: 48c0 extl %d0 480f6: 4efb 0802 jmp %pc@(480fa ,%d0:l) 480fa: 000e 016 <== NOT EXECUTED 480fc: 0016 026 <== NOT EXECUTED 480fe: 001e 036 <== NOT EXECUTED 48100: 001e 036 <== NOT EXECUTED 48102: 002a 052 <== NOT EXECUTED 48104: 002a 052 <== NOT EXECUTED 48106: 0032 062 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 48108: 2169 000c 0008 movel %a1@(12),%a0@(8) break; 4810e: 6026 bras 48136 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 48110: 203c 0005 a68a movel #370314,%d0 48116: 601a bras 48132 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 48118: 223c 0005 a6c2 movel #370370,%d1 4811e: 2141 0008 movel %d1,%a0@(8) break; 48122: 6012 bras 48136 case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 48124: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 4812a: 600a bras 48136 case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 4812c: 203c 0005 a5e6 movel #370150,%d0 48132: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 48136: 245f moveal %sp@+,%a2 48138: 4280 clrl %d0 4813a: 4e5e unlk %fp <== NOT EXECUTED 0004b474 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4b474: 4e56 fff8 linkw %fp,#-8 4b478: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4b47a: 4878 0060 pea 60 4b47e: 4878 0001 pea 1 4b482: 4eb9 0004 8ea0 jsr 48ea0 if ( !node ) 4b488: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4b48a: 2440 moveal %d0,%a2 if ( !node ) 4b48c: 4a80 tstl %d0 4b48e: 6758 beqs 4b4e8 <== NEVER TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4b490: 4878 0020 pea 20 4b494: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4b498: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 4b49e: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4b4a2: 7001 moveq #1,%d0 4b4a4: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4b4a8: 4eb9 0004 de6c jsr 4de6c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 4b4ae: 256e 0010 002e movel %fp@(16),%a2@(46) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4b4b4: 4eb9 0004 90f4 jsr 490f4 4b4ba: 3540 0038 movew %d0,%a2@(56) node->st_gid = getegid(); 4b4be: 4eb9 0004 90e0 jsr 490e0 #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4b4c4: 42a7 clrl %sp@- 4b4c6: 486e fff8 pea %fp@(-8) * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 4b4ca: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4b4ce: 4eb9 0004 9108 jsr 49108 node->stat_atime = (time_t) tv.tv_sec; 4b4d4: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 4b4d8: 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; 4b4dc: 2540 0044 movel %d0,%a2@(68) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4b4e0: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 4b4e4: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; return node; } 4b4e8: 200a movel %a2,%d0 4b4ea: 246e fff4 moveal %fp@(-12),%a2 4b4ee: 4e5e unlk %fp <== NOT EXECUTED 0004c854 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4c854: 4e56 ffe8 linkw %fp,#-24 4c858: 206e 0008 moveal %fp@(8),%a0 4c85c: 48d7 041c moveml %d2-%d4/%a2,%sp@ IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 4c860: 2450 moveal %a0@,%a2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4c862: 4284 clrl %d4 int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4c864: 362e 000e movew %fp@(14),%d3 4c868: 342e 0012 movew %fp@(18),%d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4c86c: 4eb9 0004 d8d0 jsr 4d8d0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4c872: 4281 clrl %d1 4c874: 3800 movew %d0,%d4 4c876: 322a 0038 movew %a2@(56),%d1 4c87a: b284 cmpl %d4,%d1 4c87c: 6714 beqs 4c892 <== ALWAYS TAKEN 4c87e: 4a40 tstw %d0 <== NOT EXECUTED 4c880: 6710 beqs 4c892 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4c882: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 4c888: 7201 moveq #1,%d1 <== NOT EXECUTED 4c88a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c88c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c88e: 2081 movel %d1,%a0@ <== NOT EXECUTED 4c890: 601e bras 4c8b0 <== NOT EXECUTED #endif jnode->st_uid = owner; 4c892: 3543 0038 movew %d3,%a2@(56) jnode->st_gid = group; 4c896: 3542 003a movew %d2,%a2@(58) IMFS_update_ctime( jnode ); 4c89a: 42a7 clrl %sp@- 4c89c: 486e fff8 pea %fp@(-8) 4c8a0: 4eb9 0004 35bc jsr 435bc 4c8a6: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4c8ac: 508f addql #8,%sp #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 4c8ae: 4280 clrl %d0 return 0; } 4c8b0: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c8b6: 4e5e unlk %fp ... 0004b52c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4b52c: 4e56 fff0 linkw %fp,#-16 4b530: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4b534: 266e 0008 moveal %fp@(8),%a3 4b538: 242e 000c movel %fp@(12),%d2 4b53c: 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 ) 4b540: 4a8b tstl %a3 4b542: 6606 bnes 4b54a <== ALWAYS TAKEN 4b544: 99cc subal %a4,%a4 <== NOT EXECUTED 4b546: 6000 00ea braw 4b632 <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4b54a: 2079 0005 b5b4 moveal 5b5b4 ,%a0 4b550: 2028 002c movel %a0@(44),%d0 4b554: 4680 notl %d0 4b556: c0ae 0014 andl %fp@(20),%d0 4b55a: 2f00 movel %d0,%sp@- 4b55c: 2f2e 0010 movel %fp@(16),%sp@- 4b560: 2f02 movel %d2,%sp@- 4b562: 4eb9 0004 b474 jsr 4b474 if ( !node ) 4b568: 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 ); 4b56c: 2840 moveal %d0,%a4 if ( !node ) 4b56e: 4a80 tstl %d0 4b570: 6700 00c0 beqw 4b632 return NULL; /* * Set the type specific information */ switch (type) { 4b574: 5382 subql #1,%d2 4b576: 7006 moveq #6,%d0 4b578: b082 cmpl %d2,%d0 4b57a: 6570 bcss 4b5ec <== NEVER TAKEN 4b57c: 303b 2a08 movew %pc@(4b586 ,%d2:l:2),%d0 4b580: 48c0 extl %d0 4b582: 4efb 0802 jmp %pc@(4b586 ,%d0:l) 4b586: 000e 016 <== NOT EXECUTED 4b588: 002a 052 <== NOT EXECUTED 4b58a: 0024 044 <== NOT EXECUTED 4b58c: 0024 044 <== NOT EXECUTED 4b58e: 0046 0106 <== NOT EXECUTED 4b590: 0036 066 <== NOT EXECUTED 4b592: 0060 0140 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4b594: 41ec 0050 lea %a4@(80),%a0 4b598: 2948 004c movel %a0,%a4@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4b59c: 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; 4b5a0: 42ac 0050 clrl %a4@(80) the_chain->last = _Chain_Head(the_chain); 4b5a4: 2948 0054 movel %a0,%a4@(84) 4b5a8: 605e bras 4b608 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; 4b5aa: 2952 004c movel %a2@,%a4@(76) break; 4b5ae: 6058 bras 4b608 case IMFS_DEVICE: node->info.device.major = info->device.major; 4b5b0: 2952 004c movel %a2@,%a4@(76) node->info.device.minor = info->device.minor; 4b5b4: 296a 0004 0050 movel %a2@(4),%a4@(80) break; 4b5ba: 604c bras 4b608 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4b5bc: 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; 4b5c0: 4280 clrl %d0 <== NOT EXECUTED 4b5c2: 4281 clrl %d1 <== NOT EXECUTED 4b5c4: 2940 004c movel %d0,%a4@(76) <== NOT EXECUTED 4b5c8: 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; 4b5cc: 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; 4b5d0: 4280 clrl %d0 4b5d2: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4b5d4: 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; 4b5d8: 2940 004c movel %d0,%a4@(76) 4b5dc: 2941 0050 movel %d1,%a4@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4b5e0: 42ac 005c clrl %a4@(92) break; 4b5e4: 6022 bras 4b608 case IMFS_FIFO: node->info.fifo.pipe = NULL; 4b5e6: 42ac 004c clrl %a4@(76) break; 4b5ea: 601c bras 4b608 default: assert(0); 4b5ec: 4879 0005 aa34 pea 5aa34 <== NOT EXECUTED 4b5f2: 4879 0005 aa7f pea 5aa7f <__FUNCTION__.5853> <== NOT EXECUTED 4b5f8: 4878 005c pea 5c <== NOT EXECUTED 4b5fc: 4879 0005 aa36 pea 5aa36 <== NOT EXECUTED 4b602: 4eb9 0004 8ddc jsr 48ddc <__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; 4b608: 206b 0010 moveal %a3@(16),%a0 4b60c: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4b610: 2028 0004 movel %a0@(4),%d0 4b614: 5280 addql #1,%d0 4b616: 2140 0004 movel %d0,%a0@(4) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4b61a: 2053 moveal %a3@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4b61c: 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; 4b620: 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 ); 4b624: 2f0c movel %a4,%sp@- 4b626: 4868 004c pea %a0@(76) 4b62a: 4eb9 0004 58d0 jsr 458d0 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4b630: 508f addql #8,%sp } 4b632: 200c movel %a4,%d0 4b634: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b63a: 4e5e unlk %fp ... 0004b4f2 : IMFS_jnode_t *IMFS_create_root_node(void) { 4b4f2: 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) ); 4b4f6: 4878 41ed pea 41ed 4b4fa: 4879 0005 a3ee pea 5a3ee 4b500: 4878 0001 pea 1 4b504: 4eb9 0004 b474 jsr 4b474 if ( !node ) 4b50a: 4fef 000c lea %sp@(12),%sp 4b50e: 4a80 tstl %d0 4b510: 6716 beqs 4b528 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4b512: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4b514: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4b516: 43e9 0050 lea %a1@(80),%a1 4b51a: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4b51e: 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; 4b520: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4b524: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4b528: 4e5e unlk %fp <== NOT EXECUTED 00043d72 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 43d72: 4e56 ffe0 linkw %fp,#-32 43d76: 206e 0008 moveal %fp@(8),%a0 43d7a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43d7e: 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 ); 43d82: 4a88 tstl %a0 43d84: 6612 bnes 43d98 <== ALWAYS TAKEN 43d86: 4879 0006 0bfc pea 60bfc <== NOT EXECUTED 43d8c: 4879 0006 0cca pea 60cca <__FUNCTION__.6604> <== NOT EXECUTED 43d92: 4878 0084 pea 84 <== NOT EXECUTED 43d96: 6014 bras 43dac <== NOT EXECUTED assert( level >= 0 ); 43d98: 4a82 tstl %d2 43d9a: 6c1c bges 43db8 <== ALWAYS TAKEN 43d9c: 4879 0006 0c0a pea 60c0a <== NOT EXECUTED 43da2: 4879 0006 0cca pea 60cca <__FUNCTION__.6604> <== NOT EXECUTED 43da8: 4878 0086 pea 86 <== NOT EXECUTED 43dac: 4879 0006 0b50 pea 60b50 <== NOT EXECUTED 43db2: 4eb9 0004 458c jsr 4458c <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 43db8: 7001 moveq #1,%d0 43dba: b0a8 0048 cmpl %a0@(72),%d0 43dbe: 6712 beqs 43dd2 <== ALWAYS TAKEN 43dc0: 4879 0006 0c15 pea 60c15 <== NOT EXECUTED 43dc6: 4879 0006 0cca pea 60cca <__FUNCTION__.6604> <== NOT EXECUTED 43dcc: 4878 0088 pea 88 <== NOT EXECUTED 43dd0: 60da bras 43dac <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 43dd2: 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 ); 43dd4: 2802 movel %d2,%d4 43dd6: 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, "...." ); 43ddc: 4bf9 0005 18a4 lea 518a4 ,%a5 IMFS_print_jnode( the_jnode ); 43de2: 49f9 0004 3bf6 lea 43bf6 ,%a4 if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43de8: 5284 addql #1,%d4 43dea: 47f9 0004 3d72 lea 43d72 ,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43df0: 2468 004c moveal %a0@(76),%a2 43df4: 6034 bras 43e2a !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 43df6: 4283 clrl %d3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43df8: 2079 0006 2760 moveal 62760 <_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++ ) 43dfe: 5283 addql #1,%d3 fprintf(stdout, "...." ); 43e00: 2f28 0008 movel %a0@(8),%sp@- 43e04: 4879 0006 0c3b pea 60c3b 43e0a: 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++ ) 43e0c: 508f addql #8,%sp 43e0e: b483 cmpl %d3,%d2 43e10: 6ce6 bges 43df8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 43e12: 2f0a movel %a2,%sp@- 43e14: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 43e16: 588f addql #4,%sp 43e18: 7001 moveq #1,%d0 43e1a: b0aa 0048 cmpl %a2@(72),%d0 43e1e: 6608 bnes 43e28 IMFS_dump_directory( the_jnode, level + 1 ); 43e20: 2f04 movel %d4,%sp@- 43e22: 2f0a movel %a2,%sp@- 43e24: 4e93 jsr %a3@ 43e26: 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 ) { 43e28: 2452 moveal %a2@,%a2 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e2a: ba8a cmpl %a2,%d5 43e2c: 66c8 bnes 43df6 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 43e2e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43e34: 4e5e unlk %fp <== NOT EXECUTED 000482be : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 482be: 4e56 ff9c linkw %fp,#-100 482c2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 482c6: 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 ); 482ca: 2a0e movel %fp,%d5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 482cc: 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 ); 482ce: 0685 ffff ffc7 addil #-57,%d5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 482d4: 2e3c 0004 8988 movel #297352,%d7 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 482da: 2a6e 0008 moveal %fp@(8),%a5 482de: 286e 000c moveal %fp@(12),%a4 482e2: 282e 0010 movel %fp@(16),%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 482e6: 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 ); 482e8: 486e fffc pea %fp@(-4) 482ec: 2f05 movel %d5,%sp@- 482ee: 2f0c movel %a4,%sp@- 482f0: 4875 2800 pea %a5@(00000000,%d2:l) 482f4: 4eb9 0004 8a18 jsr 48a18 pathnamelen -= len; 482fa: 2c2e fffc movel %fp@(-4),%d6 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 482fe: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 48300: 4fef 0010 lea %sp@(16),%sp 48304: 4a92 tstl %a2@ 48306: 6700 00dc beqw 483e4 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4830a: 4a80 tstl %d0 4830c: 671c beqs 4832a if ( node->type == IMFS_DIRECTORY ) 4830e: 7001 moveq #1,%d0 48310: b0ab 0048 cmpl %a3@(72),%d0 48314: 6614 bnes 4832a if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 48316: 4878 0001 pea 1 4831a: 2f0a movel %a2,%sp@- 4831c: 4eb9 0004 813e jsr 4813e 48322: 508f addql #8,%sp 48324: 4a80 tstl %d0 48326: 6700 0162 beqw 4848a rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 4832a: 2652 moveal %a2@,%a3 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 4832c: d486 addl %d6,%d2 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4832e: 99c6 subal %d6,%a4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 48330: 7003 moveq #3,%d0 48332: b083 cmpl %d3,%d0 48334: 6742 beqs 48378 48336: 7204 moveq #4,%d1 48338: b283 cmpl %d3,%d1 4833a: 6700 00c0 beqw 483fc 4833e: 103c 0002 moveb #2,%d0 48342: b083 cmpl %d3,%d0 48344: 6600 00c8 bnew 4840e case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 48348: 2079 0005 b5b4 moveal 5b5b4 ,%a0 4834e: b7e8 0018 cmpal %a0@(24),%a3 48352: 6794 beqs 482e8 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 48354: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 48358: b7e8 001c cmpal %a0@(28),%a3 4835c: 6614 bnes 48372 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4835e: 4878 0014 pea 14 48362: 260e movel %fp,%d3 48364: 4868 0008 pea %a0@(8) 48368: 0683 ffff ffe8 addil #-24,%d3 4836e: 6000 00ca braw 4843a pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 48372: 266b 0008 moveal %a3@(8),%a3 48376: 6068 bras 483e0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 48378: 202b 0048 movel %a3@(72),%d0 4837c: 7203 moveq #3,%d1 4837e: b280 cmpl %d0,%d1 48380: 6614 bnes 48396 IMFS_evaluate_hard_link( pathloc, 0 ); 48382: 42a7 clrl %sp@- 48384: 2f0a movel %a2,%sp@- 48386: 4eb9 0004 819c jsr 4819c node = pathloc->node_access; 4838c: 2652 moveal %a2@,%a3 if ( !node ) 4838e: 508f addql #8,%sp 48390: 4a8b tstl %a3 48392: 661e bnes 483b2 <== ALWAYS TAKEN 48394: 6024 bras 483ba <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 48396: 7204 moveq #4,%d1 48398: b280 cmpl %d0,%d1 4839a: 6616 bnes 483b2 result = IMFS_evaluate_sym_link( pathloc, 0 ); 4839c: 42a7 clrl %sp@- 4839e: 2f0a movel %a2,%sp@- 483a0: 4eb9 0004 81f6 jsr 481f6 node = pathloc->node_access; 483a6: 2652 moveal %a2@,%a3 if ( result == -1 ) 483a8: 508f addql #8,%sp 483aa: 72ff moveq #-1,%d1 483ac: b280 cmpl %d0,%d1 483ae: 6700 00ea beqw 4849a /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 483b2: 7001 moveq #1,%d0 483b4: b0ab 0048 cmpl %a3@(72),%d0 483b8: 6712 beqs 483cc rtems_set_errno_and_return_minus_one( ENOTDIR ); 483ba: 4eb9 0004 ca88 jsr 4ca88 <__errno> 483c0: 7e14 moveq #20,%d7 483c2: 76ff moveq #-1,%d3 483c4: 2040 moveal %d0,%a0 483c6: 2087 movel %d7,%a0@ 483c8: 6000 00d2 braw 4849c /* * 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 ) { 483cc: 206b 0058 moveal %a3@(88),%a0 483d0: 4a88 tstl %a0 483d2: 6656 bnes 4842a /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 483d4: 2f05 movel %d5,%sp@- 483d6: 2047 moveal %d7,%a0 483d8: 2f0b movel %a3,%sp@- 483da: 4e90 jsr %a0@ if ( !node ) 483dc: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 483de: 2640 moveal %d0,%a3 if ( !node ) 483e0: 4a8b tstl %a3 483e2: 6612 bnes 483f6 rtems_set_errno_and_return_minus_one( ENOENT ); 483e4: 4eb9 0004 ca88 jsr 4ca88 <__errno> 483ea: 7c02 moveq #2,%d6 483ec: 76ff moveq #-1,%d3 483ee: 2040 moveal %d0,%a0 483f0: 2086 movel %d6,%a0@ 483f2: 6000 00a8 braw 4849c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 483f6: 248b movel %a3,%a2@ break; 483f8: 6000 feee braw 482e8 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 483fc: 4eb9 0004 ca88 jsr 4ca88 <__errno> 48402: 7a5b moveq #91,%d5 48404: 76ff moveq #-1,%d3 48406: 2040 moveal %d0,%a0 48408: 2085 movel %d5,%a0@ 4840a: 6000 0090 braw 4849c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4840e: 4a83 tstl %d3 48410: 6708 beqs 4841a 48412: 7004 moveq #4,%d0 48414: b083 cmpl %d3,%d0 48416: 6600 fed0 bnew 482e8 * 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 ) { 4841a: 7201 moveq #1,%d1 4841c: b2ab 0048 cmpl %a3@(72),%d1 48420: 664e bnes 48470 if ( node->info.directory.mt_fs != NULL ) { 48422: 206b 0058 moveal %a3@(88),%a0 48426: 4a88 tstl %a0 48428: 6746 beqs 48470 newloc = node->info.directory.mt_fs->mt_fs_root; 4842a: 4878 0014 pea 14 4842e: 260e movel %fp,%d3 48430: 0683 ffff ffe8 addil #-24,%d3 48436: 4868 001c pea %a0@(28) 4843a: 2f03 movel %d3,%sp@- 4843c: 47f9 0004 d2a8 lea 4d2a8 ,%a3 48442: 4e93 jsr %a3@ *pathloc = newloc; 48444: 4878 0014 pea 14 48448: 2f03 movel %d3,%sp@- 4844a: 2f0a movel %a2,%sp@- 4844c: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4844e: 206e fffc moveal %fp@(-4),%a0 48452: 9488 subl %a0,%d2 48454: 2f0a movel %a2,%sp@- 48456: 226a 000c moveal %a2@(12),%a1 4845a: 2f04 movel %d4,%sp@- 4845c: 4874 8800 pea %a4@(00000000,%a0:l) 48460: 4875 2800 pea %a5@(00000000,%d2:l) 48464: 2051 moveal %a1@,%a0 48466: 4e90 jsr %a0@ 48468: 4fef 0028 lea %sp@(40),%sp 4846c: 2600 movel %d0,%d3 4846e: 602c bras 4849c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 48470: 2f0a movel %a2,%sp@- 48472: 4eb9 0004 80d0 jsr 480d0 48478: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4847a: 2e84 movel %d4,%sp@ 4847c: 2f0a movel %a2,%sp@- 4847e: 4eb9 0004 813e jsr 4813e 48484: 508f addql #8,%sp 48486: 4a80 tstl %d0 48488: 6612 bnes 4849c rtems_set_errno_and_return_minus_one( EACCES ); 4848a: 4eb9 0004 ca88 jsr 4ca88 <__errno> 48490: 780d moveq #13,%d4 48492: 76ff moveq #-1,%d3 48494: 2040 moveal %d0,%a0 48496: 2084 movel %d4,%a0@ 48498: 6002 bras 4849c 4849a: 2600 movel %d0,%d3 <== NOT EXECUTED return result; } 4849c: 2003 movel %d3,%d0 4849e: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 484a4: 4e5e unlk %fp <== NOT EXECUTED 0004853e : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4853e: 4e56 ff9c linkw %fp,#-100 48542: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48546: 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 ); 4854a: 2c0e movel %fp,%d6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4854c: 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 ); 4854e: 0686 ffff ffc7 addil #-57,%d6 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 48554: 2a3c 0004 84a8 movel #296104,%d5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4855a: 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 */ ) { 4855c: 246e 000c moveal %fp@(12),%a2 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 48560: 4eb9 0004 de54 jsr 4de54 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 48566: 2a6e 0010 moveal %fp@(16),%a5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4856a: 588f addql #4,%sp 4856c: 2800 movel %d0,%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4856e: 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 ); 48570: 486e fffc pea %fp@(-4) 48574: 2f06 movel %d6,%sp@- 48576: 2f04 movel %d4,%sp@- 48578: 4874 2800 pea %a4@(00000000,%d2:l) 4857c: 4eb9 0004 8a18 jsr 48a18 pathlen -= len; 48582: 2e2e fffc movel %fp@(-4),%d7 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 48586: 2600 movel %d0,%d3 pathlen -= len; i += len; if ( !pathloc->node_access ) 48588: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 4858c: 9887 subl %d7,%d4 i += len; if ( !pathloc->node_access ) 4858e: 4a92 tstl %a2@ 48590: 6700 0154 beqw 486e6 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 48594: 4a80 tstl %d0 48596: 671c beqs 485b4 if ( node->type == IMFS_DIRECTORY ) 48598: 7001 moveq #1,%d0 4859a: b0ab 0048 cmpl %a3@(72),%d0 4859e: 6614 bnes 485b4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 485a0: 4878 0001 pea 1 485a4: 2f0a movel %a2,%sp@- 485a6: 4eb9 0004 813e jsr 4813e 485ac: 508f addql #8,%sp 485ae: 4a80 tstl %d0 485b0: 6700 0188 beqw 4873a rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 485b4: 2652 moveal %a2@,%a3 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 485b6: d487 addl %d7,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 485b8: 7002 moveq #2,%d0 485ba: b083 cmpl %d3,%d0 485bc: 671a beqs 485d8 485be: 6508 bcss 485c8 485c0: 4a83 tstl %d3 485c2: 6700 00e4 beqw 486a8 485c6: 60a8 bras 48570 485c8: 7203 moveq #3,%d1 485ca: b283 cmpl %d3,%d1 485cc: 6740 beqs 4860e 485ce: 7004 moveq #4,%d0 485d0: b083 cmpl %d3,%d0 485d2: 669c bnes 48570 <== NEVER TAKEN 485d4: 6000 00e4 braw 486ba case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 485d8: 2079 0005 b5b4 moveal 5b5b4 ,%a0 485de: b7e8 0018 cmpal %a0@(24),%a3 485e2: 678c beqs 48570 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 485e4: 206a 0010 moveal %a2@(16),%a0 485e8: b7e8 001c cmpal %a0@(28),%a3 485ec: 6612 bnes 48600 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 485ee: 4878 0014 pea 14 485f2: 260e movel %fp,%d3 485f4: 4868 0008 pea %a0@(8) 485f8: 0683 ffff ffe8 addil #-24,%d3 485fe: 605c bras 4865c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 48600: 266b 0008 moveal %a3@(8),%a3 48604: 4a8b tstl %a3 48606: 6600 009a bnew 486a2 4860a: 6000 00da braw 486e6 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4860e: 202b 0048 movel %a3@(72),%d0 48612: 7203 moveq #3,%d1 48614: b280 cmpl %d0,%d1 48616: 6706 beqs 4861e result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 48618: 7204 moveq #4,%d1 4861a: b280 cmpl %d0,%d1 4861c: 6614 bnes 48632 result = IMFS_evaluate_link( pathloc, 0 ); 4861e: 42a7 clrl %sp@- 48620: 2045 moveal %d5,%a0 48622: 2f0a movel %a2,%sp@- 48624: 4e90 jsr %a0@ if ( result == -1 ) 48626: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 48628: 2600 movel %d0,%d3 if ( result == -1 ) 4862a: 70ff moveq #-1,%d0 4862c: b083 cmpl %d3,%d0 4862e: 6700 0118 beqw 48748 return -1; } node = pathloc->node_access; 48632: 2052 moveal %a2@,%a0 if ( !node ) 48634: 4a88 tstl %a0 48636: 6700 00e0 beqw 48718 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4863a: 7001 moveq #1,%d0 4863c: b0a8 0048 cmpl %a0@(72),%d0 48640: 6600 00d6 bnew 48718 /* * 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 ) { 48644: 2268 0058 moveal %a0@(88),%a1 48648: 4a89 tstl %a1 4864a: 6744 beqs 48690 newloc = node->info.directory.mt_fs->mt_fs_root; 4864c: 4878 0014 pea 14 48650: 260e movel %fp,%d3 48652: 0683 ffff ffe8 addil #-24,%d3 48658: 4869 001c pea %a1@(28) 4865c: 2f03 movel %d3,%sp@- 4865e: 47f9 0004 d2a8 lea 4d2a8 ,%a3 48664: 4e93 jsr %a3@ *pathloc = newloc; 48666: 4878 0014 pea 14 4866a: 2f03 movel %d3,%sp@- 4866c: 2f0a movel %a2,%sp@- 4866e: 4e93 jsr %a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 48670: 206a 000c moveal %a2@(12),%a0 48674: 94ae fffc subl %fp@(-4),%d2 48678: 2f0d movel %a5,%sp@- 4867a: 2f0a movel %a2,%sp@- 4867c: 4874 2800 pea %a4@(00000000,%d2:l) 48680: 2068 0004 moveal %a0@(4),%a0 48684: 4e90 jsr %a0@ 48686: 4fef 0024 lea %sp@(36),%sp 4868a: 2600 movel %d0,%d3 4868c: 6000 00ba braw 48748 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 48690: 2f06 movel %d6,%sp@- 48692: 2f08 movel %a0,%sp@- 48694: 4eb9 0004 8988 jsr 48988 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4869a: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4869c: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4869e: 4a80 tstl %d0 486a0: 6728 beqs 486ca done = true; else pathloc->node_access = node; 486a2: 248b movel %a3,%a2@ 486a4: 6000 feca braw 48570 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 486a8: 4eb9 0004 ca88 jsr 4ca88 <__errno> 486ae: 7e11 moveq #17,%d7 486b0: 76ff moveq #-1,%d3 486b2: 2040 moveal %d0,%a0 486b4: 2087 movel %d7,%a0@ 486b6: 6000 0090 braw 48748 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 486ba: 4eb9 0004 ca88 jsr 4ca88 <__errno> 486c0: 7c5b moveq #91,%d6 486c2: 76ff moveq #-1,%d3 486c4: 2040 moveal %d0,%a0 486c6: 2086 movel %d6,%a0@ 486c8: 607e bras 48748 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 486ca: 2002 movel %d2,%d0 486cc: 90ae fffc subl %fp@(-4),%d0 486d0: d08c addl %a4,%d0 486d2: d9c2 addal %d2,%a4 486d4: 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++) { 486d6: 601e bras 486f6 if ( !IMFS_is_separator( path[ i ] ) ) 486d8: 702f moveq #47,%d0 486da: b081 cmpl %d1,%d0 486dc: 6718 beqs 486f6 486de: 103c 005c moveb #92,%d0 486e2: b081 cmpl %d1,%d0 486e4: 6710 beqs 486f6 rtems_set_errno_and_return_minus_one( ENOENT ); 486e6: 4eb9 0004 ca88 jsr 4ca88 <__errno> 486ec: 7a02 moveq #2,%d5 486ee: 76ff moveq #-1,%d3 486f0: 2040 moveal %d0,%a0 486f2: 2085 movel %d5,%a0@ 486f4: 6052 bras 48748 /* * 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++) { 486f6: 1014 moveb %a4@,%d0 if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 486f8: 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 ] ) ) 486fa: 1200 moveb %d0,%d1 486fc: 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++) { 486fe: 4a00 tstb %d0 48700: 66d6 bnes 486d8 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 48702: 2f0a movel %a2,%sp@- 48704: 4eb9 0004 80d0 jsr 480d0 /* * The returned node must be a directory */ node = pathloc->node_access; 4870a: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4870c: 2600 movel %d0,%d3 /* * The returned node must be a directory */ node = pathloc->node_access; 4870e: 588f addql #4,%sp 48710: 7001 moveq #1,%d0 48712: b0a8 0048 cmpl %a0@(72),%d0 48716: 6710 beqs 48728 <== ALWAYS TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 48718: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4871e: 7814 moveq #20,%d4 48720: 76ff moveq #-1,%d3 48722: 2040 moveal %d0,%a0 48724: 2084 movel %d4,%a0@ 48726: 6020 bras 48748 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 48728: 4878 0003 pea 3 4872c: 2f0a movel %a2,%sp@- 4872e: 4eb9 0004 813e jsr 4813e 48734: 508f addql #8,%sp 48736: 4a80 tstl %d0 48738: 660e bnes 48748 rtems_set_errno_and_return_minus_one( EACCES ); 4873a: 4eb9 0004 ca88 jsr 4ca88 <__errno> 48740: 740d moveq #13,%d2 48742: 76ff moveq #-1,%d3 48744: 2040 moveal %d0,%a0 48746: 2082 movel %d2,%a0@ return result; } 48748: 2003 movel %d3,%d0 4874a: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 48750: 4e5e unlk %fp <== NOT EXECUTED 0004819c : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4819c: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4819e: 4e56 0000 linkw %fp,#0 481a2: 2f0a movel %a2,%sp@- 481a4: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 481a8: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 481aa: b0a8 0048 cmpl %a0@(72),%d0 481ae: 670c beqs 481bc <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 481b0: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 481b6: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 481bc: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 481c0: 2f0a movel %a2,%sp@- 481c2: 4eb9 0004 80d0 jsr 480d0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 481c8: 2f2e 000c movel %fp@(12),%sp@- 481cc: 2f0a movel %a2,%sp@- 481ce: 4eb9 0004 813e jsr 4813e 481d4: 4fef 000c lea %sp@(12),%sp 481d8: 4a80 tstl %d0 481da: 6704 beqs 481e0 <== NEVER TAKEN 481dc: 4280 clrl %d0 481de: 600e bras 481ee rtems_set_errno_and_return_minus_one( EACCES ); 481e0: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 481e6: 720d moveq #13,%d1 <== NOT EXECUTED 481e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 481ea: 70ff moveq #-1,%d0 <== NOT EXECUTED 481ec: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 481ee: 246e fffc moveal %fp@(-4),%a2 481f2: 4e5e unlk %fp <== NOT EXECUTED 0004813e : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4813e: 4e56 fff4 linkw %fp,#-12 48142: 206e 0008 moveal %fp@(8),%a0 48146: 48d7 040c moveml %d2-%d3/%a2,%sp@ if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 4814a: 2450 moveal %a0@,%a2 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4814c: 242e 000c movel %fp@(12),%d2 } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 48150: 4eb9 0004 90f4 jsr 490f4 48156: 3600 movew %d0,%d3 st_gid = getegid(); 48158: 4eb9 0004 90e0 jsr 490e0 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 4815e: 4281 clrl %d1 48160: 0283 0000 ffff andil #65535,%d3 48166: 322a 0038 movew %a2@(56),%d1 4816a: b283 cmpl %d3,%d1 4816c: 6604 bnes 48172 flags_to_test <<= 6; 4816e: ed8a lsll #6,%d2 48170: 6012 bras 48184 else if ( st_gid == jnode->st_gid ) 48172: 4281 clrl %d1 48174: 0280 0000 ffff andil #65535,%d0 4817a: 322a 003a movew %a2@(58),%d1 4817e: b280 cmpl %d0,%d1 48180: 6602 bnes 48184 <== NEVER TAKEN flags_to_test <<= 3; 48182: e78a lsll #3,%d2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 48184: 2002 movel %d2,%d0 48186: c0aa 002e andl %a2@(46),%d0 4818a: b480 cmpl %d0,%d2 4818c: 57c0 seq %d0 return 1; return 0; } 4818e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48194: 4e5e unlk %fp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 48196: 49c0 extbl %d0 return 1; return 0; } 48198: 4480 negl %d0 <== NOT EXECUTED 000481f6 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 481f6: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 481f8: 4e56 fff0 linkw %fp,#-16 481fc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 48200: 246e 0008 moveal %fp@(8),%a2 48204: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 48208: 2652 moveal %a2@,%a3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4820a: b0ab 0048 cmpl %a3@(72),%d0 4820e: 6708 beqs 48218 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 48210: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 48216: 600c bras 48224 <== NOT EXECUTED if ( !jnode->Parent ) 48218: 202b 0008 movel %a3@(8),%d0 4821c: 660c bnes 4822a <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 4821e: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 48224: 4eb9 0004 55bc jsr 455bc <== 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; 4822a: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 4822c: 206b 004c moveal %a3@(76),%a0 48230: 762f moveq #47,%d3 48232: 1010 moveb %a0@,%d0 48234: 1200 moveb %d0,%d1 48236: 49c1 extbl %d1 48238: b681 cmpl %d1,%d3 4823a: 6710 beqs 4824c 4823c: 163c 005c moveb #92,%d3 48240: b681 cmpl %d1,%d3 48242: 6708 beqs 4824c <== NEVER TAKEN 48244: 4a00 tstb %d0 48246: 6704 beqs 4824c <== NEVER TAKEN 48248: 4280 clrl %d0 4824a: 601e bras 4826a 4824c: 4878 0014 pea 14 48250: 2079 0005 b5b4 moveal 5b5b4 ,%a0 48256: 41e8 0018 lea %a0@(24),%a0 4825a: 2f08 movel %a0,%sp@- 4825c: 2f0a movel %a2,%sp@- 4825e: 4eb9 0004 d2a8 jsr 4d2a8 48264: 4fef 000c lea %sp@(12),%sp 48268: 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] ), 4826a: 266b 004c moveal %a3@(76),%a3 4826e: d7c0 addal %d0,%a3 48270: 2f0b movel %a3,%sp@- 48272: 4eb9 0004 de54 jsr 4de54 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 48278: 2e8a movel %a2,%sp@ 4827a: 2f02 movel %d2,%sp@- 4827c: 2f00 movel %d0,%sp@- 4827e: 2f0b movel %a3,%sp@- 48280: 4eb9 0004 82be jsr 482be 48286: 2640 moveal %d0,%a3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 48288: 2f0a movel %a2,%sp@- 4828a: 4eb9 0004 80d0 jsr 480d0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 48290: 2f02 movel %d2,%sp@- 48292: 2f0a movel %a2,%sp@- 48294: 4eb9 0004 813e jsr 4813e 4829a: 4fef 001c lea %sp@(28),%sp 4829e: 4a80 tstl %d0 482a0: 6610 bnes 482b2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 482a2: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 482a8: 740d moveq #13,%d2 <== NOT EXECUTED 482aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 482ac: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 482b0: 2082 movel %d2,%a0@ <== NOT EXECUTED return result; } 482b2: 200b movel %a3,%d0 482b4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 482ba: 4e5e unlk %fp <== NOT EXECUTED 0004b640 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4b640: 4e56 fff8 linkw %fp,#-8 4b644: 206e 0008 moveal %fp@(8),%a0 4b648: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4b64a: 2450 moveal %a0@,%a2 int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4b64c: 2f02 movel %d2,%sp@- * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b64e: 4282 clrl %d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4b650: 4eb9 0004 90f4 jsr 490f4 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b656: 4281 clrl %d1 4b658: 3400 movew %d0,%d2 4b65a: 322a 0038 movew %a2@(56),%d1 4b65e: b282 cmpl %d2,%d1 4b660: 6714 beqs 4b676 <== ALWAYS TAKEN 4b662: 4a40 tstw %d0 <== NOT EXECUTED 4b664: 6710 beqs 4b676 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4b666: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 4b66c: 7201 moveq #1,%d1 <== NOT EXECUTED 4b66e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b670: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b672: 2081 movel %d1,%a0@ <== NOT EXECUTED 4b674: 6030 bras 4b6a6 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4b676: 202a 002e movel %a2@(46),%d0 4b67a: 222e 000c movel %fp@(12),%d1 4b67e: 0280 ffff f000 andil #-4096,%d0 4b684: 0281 0000 0fff andil #4095,%d1 4b68a: 8280 orl %d0,%d1 4b68c: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4b690: 42a7 clrl %sp@- 4b692: 486e fff8 pea %fp@(-8) 4b696: 4eb9 0004 9108 jsr 49108 4b69c: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4b6a2: 508f addql #8,%sp */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 4b6a4: 4280 clrl %d0 return 0; } 4b6a6: 242e fff0 movel %fp@(-16),%d2 4b6aa: 246e fff4 moveal %fp@(-12),%a2 4b6ae: 4e5e unlk %fp ... 000488e2 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 488e2: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 488e6: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 488ea: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 488ee: 246b 0038 moveal %a3@(56),%a2 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 488f2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 488f4: 486a 004c pea %a2@(76) <== NOT EXECUTED 488f8: 4eb9 0004 b024 jsr 4b024 <== NOT EXECUTED if (! err) { 488fe: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 48900: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 48902: 662a bnes 4892e <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 48904: 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) 4890a: 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; 4890c: 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) 48910: 4eb9 0004 91da jsr 491da <== NOT EXECUTED 48916: 588f addql #4,%sp <== NOT EXECUTED 48918: 4a80 tstl %d0 <== NOT EXECUTED 4891a: 6624 bnes 48940 <== NOT EXECUTED 4891c: 4a6a 0032 tstw %a2@(50) <== NOT EXECUTED 48920: 661e bnes 48940 <== NOT EXECUTED free(jnode); 48922: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48924: 4eb9 0004 8f80 jsr 48f80 <== NOT EXECUTED 4892a: 588f addql #4,%sp <== NOT EXECUTED 4892c: 6012 bras 48940 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4892e: 4a80 tstl %d0 <== NOT EXECUTED 48930: 6c0e bges 48940 <== NOT EXECUTED 48932: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 48938: 4482 negl %d2 <== NOT EXECUTED 4893a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4893c: 2082 movel %d2,%a0@ <== NOT EXECUTED 4893e: 74ff moveq #-1,%d2 <== NOT EXECUTED } 48940: 2002 movel %d2,%d0 <== NOT EXECUTED 48942: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 48948: 4e5e unlk %fp <== NOT EXECUTED 000487aa : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 487aa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 487ae: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 487b2: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 487b6: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 487ba: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 487bc: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 487c2: 6620 bnes 487e4 <== NOT EXECUTED if (buffer == NULL) 487c4: 4a89 tstl %a1 <== NOT EXECUTED 487c6: 6604 bnes 487cc <== NOT EXECUTED 487c8: 74f2 moveq #-14,%d2 <== NOT EXECUTED 487ca: 6034 bras 48800 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 487cc: 4a91 tstl %a1@ <== NOT EXECUTED 487ce: 670a beqs 487da <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 487d0: 7001 moveq #1,%d0 <== NOT EXECUTED 487d2: 4282 clrl %d2 <== NOT EXECUTED 487d4: 81a8 0014 orl %d0,%a0@(20) <== NOT EXECUTED 487d8: 6034 bras 4880e <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 487da: 70fe moveq #-2,%d0 <== NOT EXECUTED 487dc: 4282 clrl %d2 <== NOT EXECUTED 487de: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED 487e2: 602a bras 4880e <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 487e4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 487e6: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 487ea: 2f09 movel %a1,%sp@- <== NOT EXECUTED 487ec: 2f00 movel %d0,%sp@- <== NOT EXECUTED 487ee: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 487f2: 4eb9 0004 ac86 jsr 4ac86 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 487f8: 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); 487fc: 2400 movel %d0,%d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 487fe: 6c0e bges 4880e <== NOT EXECUTED 48800: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 48806: 4482 negl %d2 <== NOT EXECUTED 48808: 2040 moveal %d0,%a0 <== NOT EXECUTED 4880a: 2082 movel %d2,%a0@ <== NOT EXECUTED 4880c: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4880e: 2002 movel %d2,%d0 <== NOT EXECUTED 48810: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48814: 4e5e unlk %fp <== NOT EXECUTED 00048754 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 48754: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 48758: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4875c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 48760: 2f08 movel %a0,%sp@- <== NOT EXECUTED 48762: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 48766: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 4876a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4876e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 48772: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 48776: 4eb9 0004 ac2c jsr 4ac2c <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4877c: 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); 48780: 2800 movel %d0,%d4 <== NOT EXECUTED 48782: 2600 movel %d0,%d3 <== NOT EXECUTED 48784: 5bc2 smi %d2 <== NOT EXECUTED 48786: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 48788: 4a82 tstl %d2 <== NOT EXECUTED 4878a: 6a10 bpls 4879c <== NOT EXECUTED 4878c: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 48792: 4484 negl %d4 <== NOT EXECUTED 48794: 2040 moveal %d0,%a0 <== NOT EXECUTED 48796: 74ff moveq #-1,%d2 <== NOT EXECUTED 48798: 76ff moveq #-1,%d3 <== NOT EXECUTED 4879a: 2084 movel %d4,%a0@ <== NOT EXECUTED } 4879c: 2203 movel %d3,%d1 <== NOT EXECUTED 4879e: 2002 movel %d2,%d0 <== NOT EXECUTED 487a0: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 487a6: 4e5e unlk %fp <== NOT EXECUTED 0004894c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4894c: 4e56 0000 linkw %fp,#0 48950: 206e 0008 moveal %fp@(8),%a0 48954: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 48956: 2f08 movel %a0,%sp@- 48958: 2068 0038 moveal %a0@(56),%a0 4895c: 41e8 004c lea %a0@(76),%a0 48960: 2f08 movel %a0,%sp@- 48962: 4eb9 0004 b0ec jsr 4b0ec IMFS_FIFO_RETURN(err); 48968: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 4896a: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 4896c: 6c0e bges 4897c <== NEVER TAKEN 4896e: 4eb9 0004 ca88 jsr 4ca88 <__errno> 48974: 4482 negl %d2 48976: 2040 moveal %d0,%a0 48978: 2082 movel %d2,%a0@ 4897a: 74ff moveq #-1,%d2 } 4897c: 2002 movel %d2,%d0 4897e: 242e fffc movel %fp@(-4),%d2 48982: 4e5e unlk %fp ... 00048880 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 48880: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 48884: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 48888: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4888a: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 4888c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4888e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 48892: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 48896: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 4889a: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 4889e: 4eb9 0004 ace6 jsr 4ace6 <== NOT EXECUTED if (err > 0) 488a4: 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); 488a8: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 488aa: 6f16 bles 488c2 <== NOT EXECUTED IMFS_update_atime(jnode); 488ac: 42a7 clrl %sp@- <== NOT EXECUTED 488ae: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 488b2: 4eb9 0004 9108 jsr 49108 <== NOT EXECUTED 488b8: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 488be: 508f addql #8,%sp <== NOT EXECUTED 488c0: 6012 bras 488d4 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 488c2: 4a80 tstl %d0 <== NOT EXECUTED 488c4: 670e beqs 488d4 <== NOT EXECUTED 488c6: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 488cc: 4482 negl %d2 <== NOT EXECUTED 488ce: 2040 moveal %d0,%a0 <== NOT EXECUTED 488d0: 2082 movel %d2,%a0@ <== NOT EXECUTED 488d2: 74ff moveq #-1,%d2 <== NOT EXECUTED } 488d4: 2002 movel %d2,%d0 <== NOT EXECUTED 488d6: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 488da: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 488de: 4e5e unlk %fp <== NOT EXECUTED 00048818 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 48818: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 4881c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 48820: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48822: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 48824: 2f08 movel %a0,%sp@- <== NOT EXECUTED 48826: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4882a: 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; 4882e: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 48832: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 48836: 4eb9 0004 ae4e jsr 4ae4e <== NOT EXECUTED if (err > 0) { 4883c: 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); 48840: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 48842: 6f1c bles 48860 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 48844: 42a7 clrl %sp@- <== NOT EXECUTED 48846: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4884a: 4eb9 0004 9108 jsr 49108 <== NOT EXECUTED 48850: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 48854: 508f addql #8,%sp <== NOT EXECUTED 48856: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 4885a: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED 4885e: 6012 bras 48872 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 48860: 4a80 tstl %d0 <== NOT EXECUTED 48862: 670e beqs 48872 <== NOT EXECUTED 48864: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 4886a: 4482 negl %d2 <== NOT EXECUTED 4886c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4886e: 2082 movel %d2,%a0@ <== NOT EXECUTED 48870: 74ff moveq #-1,%d2 <== NOT EXECUTED } 48872: 2002 movel %d2,%d0 <== NOT EXECUTED 48874: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 48878: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4887c: 4e5e unlk %fp <== NOT EXECUTED 00048988 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 48988: 4e56 fff0 linkw %fp,#-16 4898c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48990: 246e 0008 moveal %fp@(8),%a2 48994: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 48998: 4a8a tstl %a2 4899a: 661c bnes 489b8 <== ALWAYS TAKEN 4899c: 4879 0005 ae49 pea 5ae49 <_global_impure_ptr+0x1b1> <== NOT EXECUTED 489a2: 4879 0005 a66f pea 5a66f <__FUNCTION__.5390> <== NOT EXECUTED 489a8: 4878 002a pea 2a <== NOT EXECUTED 489ac: 4879 0005 a61e pea 5a61e <== NOT EXECUTED 489b2: 4eb9 0004 8ddc jsr 48ddc <__assert_func> <== NOT EXECUTED if ( !name ) 489b8: 4a82 tstl %d2 489ba: 674e beqs 48a0a <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 489bc: 4879 0005 a66a pea 5a66a 489c2: 49f9 0004 d990 lea 4d990 ,%a4 489c8: 2f02 movel %d2,%sp@- 489ca: 4e94 jsr %a4@ 489cc: 508f addql #8,%sp 489ce: 4a80 tstl %d0 489d0: 673a beqs 48a0c <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 489d2: 4879 0005 a66c pea 5a66c 489d8: 2f02 movel %d2,%sp@- 489da: 4e94 jsr %a4@ 489dc: 508f addql #8,%sp 489de: 4a80 tstl %d0 489e0: 6606 bnes 489e8 <== ALWAYS TAKEN return directory->Parent; 489e2: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 489e6: 6024 bras 48a0c <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 489e8: 266a 004c moveal %a2@(76),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 489ec: 45ea 0050 lea %a2@(80),%a2 489f0: 6014 bras 48a06 !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 ) ) 489f2: 486b 000c pea %a3@(12) 489f6: 2f02 movel %d2,%sp@- 489f8: 4e94 jsr %a4@ 489fa: 508f addql #8,%sp 489fc: 4a80 tstl %d0 489fe: 6604 bnes 48a04 48a00: 244b moveal %a3,%a2 48a02: 6008 bras 48a0c 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 ) { 48a04: 2653 moveal %a3@,%a3 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 48a06: b5cb cmpal %a3,%a2 48a08: 66e8 bnes 489f2 48a0a: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 48a0c: 200a movel %a2,%d0 48a0e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48a14: 4e5e unlk %fp <== NOT EXECUTED 0004d34c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d34c: 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; 4d350: 200e movel %fp,%d0 4d352: 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 ) { 4d358: 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; 4d35c: 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 ); 4d360: 2400 movel %d0,%d2 4d362: 4bf9 0004 ca88 lea 4ca88 ,%a5 if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4d368: 49f9 0004 2dcc lea 42dcc ,%a4 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d36e: 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; 4d372: 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; 4d376: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 4d37a: 2f00 movel %d0,%sp@- 4d37c: 4eb9 0005 1d70 jsr 51d70 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4d382: 4fef 000c lea %sp@(12),%sp 4d386: 42ab 001c clrl %a3@(28) do { next = jnode->Parent; 4d38a: 266a 0008 moveal %a2@(8),%a3 loc.node_access = (void *)jnode; 4d38e: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4d392: 2f02 movel %d2,%sp@- 4d394: 4e95 jsr %a5@ if ( jnode->type != IMFS_DIRECTORY ) { 4d396: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d398: 200a movel %a2,%d0 4d39a: 0680 0000 0050 addil #80,%d0 4d3a0: 7201 moveq #1,%d1 4d3a2: b2aa 0048 cmpl %a2@(72),%d1 4d3a6: 6606 bnes 4d3ae 4d3a8: b0aa 004c cmpl %a2@(76),%d0 4d3ac: 660e bnes 4d3bc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4d3ae: 2f02 movel %d2,%sp@- 4d3b0: 42a7 clrl %sp@- 4d3b2: 4e94 jsr %a4@ if (result != 0) 4d3b4: 508f addql #8,%sp 4d3b6: 4a80 tstl %d0 4d3b8: 6626 bnes 4d3e0 <== NEVER TAKEN 4d3ba: 244b moveal %a3,%a2 return -1; jnode = next; } if ( jnode != NULL ) { 4d3bc: 4a8a tstl %a2 4d3be: 6724 beqs 4d3e4 if ( jnode->type == IMFS_DIRECTORY ) { 4d3c0: 7001 moveq #1,%d0 4d3c2: b0aa 0048 cmpl %a2@(72),%d0 4d3c6: 66c2 bnes 4d38a <== NEVER TAKEN 4d3c8: 200a movel %a2,%d0 4d3ca: 0680 0000 0050 addil #80,%d0 4d3d0: b0aa 004c cmpl %a2@(76),%d0 4d3d4: 67b4 beqs 4d38a if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4d3d6: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4d3da: 4a8a tstl %a2 4d3dc: 66ac bnes 4d38a <== ALWAYS TAKEN 4d3de: 6004 bras 4d3e4 <== NOT EXECUTED 4d3e0: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d3e2: 6002 bras 4d3e6 <== NOT EXECUTED 4d3e4: 4280 clrl %d0 return 0; } 4d3e6: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4d3ec: 4e5e unlk %fp <== NOT EXECUTED 00048a18 : register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 48a18: 4280 clrl %d0 const char *path, int pathlen, char *token, int *token_len ) { 48a1a: 4e56 fff0 linkw %fp,#-16 48a1e: 226e 0008 moveal %fp@(8),%a1 48a22: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 48a26: 206e 000c moveal %fp@(12),%a0 48a2a: 246e 0010 moveal %fp@(16),%a2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 48a2e: 1211 moveb %a1@,%d1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 48a30: 6016 bras 48a48 token[i] = c; 48a32: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) if ( i == IMFS_NAME_MAX ) 48a36: 7220 moveq #32,%d1 48a38: b280 cmpl %d0,%d1 48a3a: 6606 bnes 48a42 48a3c: 7404 moveq #4,%d2 48a3e: 6000 0084 braw 48ac4 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 48a42: 5280 addql #1,%d0 48a44: 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) ) { 48a48: 762f moveq #47,%d3 48a4a: 1401 moveb %d1,%d2 48a4c: 49c2 extbl %d2 48a4e: b682 cmpl %d2,%d3 48a50: 6710 beqs 48a62 48a52: 163c 005c moveb #92,%d3 48a56: b682 cmpl %d2,%d3 48a58: 6708 beqs 48a62 48a5a: 4a01 tstb %d1 48a5c: 6704 beqs 48a62 48a5e: b1c0 cmpal %d0,%a0 48a60: 6ed0 bgts 48a32 /* * Copy a seperator into token. */ if ( i == 0 ) { 48a62: 4a80 tstl %d0 48a64: 6610 bnes 48a76 token[i] = c; 48a66: 1481 moveb %d1,%a2@ if ( (token[i] != '\0') && pathlen ) { 48a68: 6720 beqs 48a8a 48a6a: 4a88 tstl %a0 48a6c: 671c beqs 48a8a 48a6e: 7401 moveq #1,%d2 48a70: 103c 0001 moveb #1,%d0 48a74: 6016 bras 48a8c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 48a76: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 48a7a: 6604 bnes 48a80 <== ALWAYS TAKEN 48a7c: 7403 moveq #3,%d2 <== NOT EXECUTED 48a7e: 600c bras 48a8c <== NOT EXECUTED token[i] = '\0'; 48a80: 7403 moveq #3,%d2 48a82: 4201 clrb %d1 48a84: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) 48a88: 6002 bras 48a8c 48a8a: 4282 clrl %d2 /* * Set token_len to the number of characters copied. */ *token_len = i; 48a8c: 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 ) { 48a90: 7603 moveq #3,%d3 /* * Set token_len to the number of characters copied. */ *token_len = i; 48a92: 2080 movel %d0,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 48a94: b682 cmpl %d2,%d3 48a96: 662c bnes 48ac4 if ( strcmp( token, "..") == 0 ) 48a98: 4879 0005 a686 pea 5a686 <__FUNCTION__.5390+0x17> 48a9e: 47f9 0004 d990 lea 4d990 ,%a3 48aa4: 2f0a movel %a2,%sp@- 48aa6: 4e93 jsr %a3@ 48aa8: 508f addql #8,%sp 48aaa: 4a80 tstl %d0 48aac: 6604 bnes 48ab2 48aae: 7402 moveq #2,%d2 48ab0: 6012 bras 48ac4 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 48ab2: 4879 0005 a687 pea 5a687 <__FUNCTION__.5390+0x18> 48ab8: 2f0a movel %a2,%sp@- 48aba: 4e93 jsr %a3@ 48abc: 508f addql #8,%sp 48abe: 4a80 tstl %d0 48ac0: 6602 bnes 48ac4 48ac2: 7401 moveq #1,%d2 type = IMFS_CURRENT_DIR; } return type; } 48ac4: 2002 movel %d2,%d0 48ac6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 48acc: 4e5e unlk %fp <== NOT EXECUTED 00048ad0 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 48ad0: 4281 clrl %d1 48ad2: 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 ) { 48ad4: 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, 48ad8: 2079 0005 b4a8 moveal 5b4a8 ,%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 ) { 48ade: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48ae2: 246e 0008 moveal %fp@(8),%a2 48ae6: 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) { 48aea: 5281 addql #1,%d1 48aec: b1c0 cmpal %d0,%a0 48aee: 670e beqs 48afe 48af0: 7606 moveq #6,%d3 48af2: d080 addl %d0,%d0 48af4: b681 cmpl %d1,%d3 48af6: 66f2 bnes 48aea <== ALWAYS TAKEN 48af8: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 48afe: 23c0 0005 c4ac movel %d0,5c4ac /* * 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(); 48b04: 4eb9 0004 b4f2 jsr 4b4f2 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; 48b0a: 4878 0030 pea 30 48b0e: 4879 0005 aa04 pea 5aa04 48b14: 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; 48b18: 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(); 48b1e: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 48b22: 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; 48b26: 4eb9 0004 d2a8 jsr 4d2a8 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 48b2c: 4878 0010 pea 10 48b30: 4878 0001 pea 1 48b34: 4eb9 0004 8ea0 jsr 48ea0 if ( !fs_info ) { 48b3a: 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 ) ); 48b3e: 2040 moveal %d0,%a0 if ( !fs_info ) { 48b40: 4a80 tstl %d0 48b42: 661c bnes 48b60 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 48b44: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 48b48: 4eb9 0004 8f80 jsr 48f80 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 48b4e: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 48b54: 588f addql #4,%sp <== NOT EXECUTED 48b56: 720c moveq #12,%d1 <== NOT EXECUTED 48b58: 2040 moveal %d0,%a0 <== NOT EXECUTED 48b5a: 70ff moveq #-1,%d0 <== NOT EXECUTED 48b5c: 2081 movel %d1,%a0@ <== NOT EXECUTED 48b5e: 6038 bras 48b98 <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 48b60: 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; 48b62: 7601 moveq #1,%d3 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 48b64: 2140 0004 movel %d0,%a0@(4) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 48b68: 2039 0005 c4b0 movel 5c4b0 ,%d0 48b6e: 2200 movel %d0,%d1 48b70: 5281 addql #1,%d1 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 48b72: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 48b76: 23c1 0005 c4b0 movel %d1,5c4b0 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 48b7c: 216e 0010 0008 movel %fp@(16),%a0@(8) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 48b82: 2080 movel %d0,%a0@ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 48b84: 2142 000c movel %d2,%a0@(12) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 48b88: 2343 0034 movel %d3,%a1@(52) fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 48b8c: 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(); 48b90: 4eb9 0004 ac36 jsr 4ac36 48b96: 4280 clrl %d0 return 0; } 48b98: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48b9e: 4e5e unlk %fp ... 00042aac : /* * 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 ) 42aac: 4280 clrl %d0 42aae: 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 */ ) { 42ab0: 4e56 ffbc linkw %fp,#-68 42ab4: 206e 0008 moveal %fp@(8),%a0 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42ab8: 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 */ ) { 42aba: 2f03 movel %d3,%sp@- 42abc: 262e 0010 movel %fp@(16),%d3 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42ac0: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 42ac4: 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 */ ) { 42ac8: 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 ) 42aca: b280 cmpl %d0,%d1 42acc: 6410 bccs 42ade rtems_set_errno_and_return_minus_one( EMLINK ); 42ace: 4eb9 0005 1550 jsr 51550 <__errno> 42ad4: 741f moveq #31,%d2 42ad6: 72ff moveq #-1,%d1 42ad8: 2040 moveal %d0,%a0 42ada: 2082 movel %d2,%a0@ 42adc: 607c bras 42b5a /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 42ade: 2f03 movel %d3,%sp@- 42ae0: 240e movel %fp,%d2 42ae2: 0682 ffff ffbf addil #-65,%d2 42ae8: 4eb9 0005 28cc jsr 528cc 42aee: 588f addql #4,%sp 42af0: 486e fffc pea %fp@(-4) 42af4: 2f02 movel %d2,%sp@- 42af6: 2f00 movel %d0,%sp@- 42af8: 2f03 movel %d3,%sp@- 42afa: 4eb9 0004 d480 jsr 4d480 * 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( 42b00: 486e ffe0 pea %fp@(-32) 42b04: 2f3c 0000 a1ff movel #41471,%sp@- 42b0a: 2f02 movel %d2,%sp@- 42b0c: 4878 0003 pea 3 42b10: 2f2e 000c movel %fp@(12),%sp@- 42b14: 4eb9 0004 c974 jsr 4c974 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 42b1a: 4fef 0024 lea %sp@(36),%sp 42b1e: 4a80 tstl %d0 42b20: 6610 bnes 42b32 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 42b22: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 42b28: 72ff moveq #-1,%d1 <== NOT EXECUTED 42b2a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42b2c: 700c moveq #12,%d0 <== NOT EXECUTED 42b2e: 2080 movel %d0,%a0@ <== NOT EXECUTED 42b30: 6028 bras 42b5a <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 42b32: 206e ffe0 moveal %fp@(-32),%a0 42b36: 3028 0032 movew %a0@(50),%d0 42b3a: 5280 addql #1,%d0 42b3c: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 42b40: 42a7 clrl %sp@- 42b42: 486e fff4 pea %fp@(-12) 42b46: 4eb9 0004 35bc jsr 435bc 42b4c: 206e ffe0 moveal %fp@(-32),%a0 return 0; 42b50: 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 ); 42b52: 4281 clrl %d1 42b54: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 42b5a: 242e ffb4 movel %fp@(-76),%d2 42b5e: 2001 movel %d1,%d0 42b60: 262e ffb8 movel %fp@(-72),%d3 42b64: 4e5e unlk %fp <== NOT EXECUTED 0004fab0 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4fab0: 4e56 0000 linkw %fp,#0 4fab4: 206e 0008 moveal %fp@(8),%a0 4fab8: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4faba: 4a88 tstl %a0 4fabc: 6612 bnes 4fad0 <== ALWAYS TAKEN 4fabe: 4879 0005 fc5e pea 5fc5e <== NOT EXECUTED 4fac4: 4879 0005 fdf0 pea 5fdf0 <__FUNCTION__.6024> <== NOT EXECUTED 4faca: 4878 0169 pea 169 <== NOT EXECUTED 4face: 6018 bras 4fae8 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4fad0: 7005 moveq #5,%d0 4fad2: b0a8 0048 cmpl %a0@(72),%d0 4fad6: 671c beqs 4faf4 <== ALWAYS TAKEN 4fad8: 4879 0005 fcae pea 5fcae <== NOT EXECUTED 4fade: 4879 0005 fdf0 pea 5fdf0 <__FUNCTION__.6024> <== NOT EXECUTED 4fae4: 4878 016d pea 16d <== NOT EXECUTED 4fae8: 4879 0005 fc68 pea 5fc68 <== NOT EXECUTED 4faee: 4eb9 0004 d68c jsr 4d68c <__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 ); 4faf4: 4878 0001 pea 1 4faf8: 2f2e 000c movel %fp@(12),%sp@- 4fafc: 2f08 movel %a0,%sp@- 4fafe: 4eb9 0004 f674 jsr 4f674 if ( *block_entry_ptr ) 4fb04: 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 ); 4fb08: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4fb0a: 4a92 tstl %a2@ 4fb0c: 6612 bnes 4fb20 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4fb0e: 4eb9 0004 f650 jsr 4f650 if ( !memory ) 4fb14: 4a80 tstl %d0 4fb16: 6606 bnes 4fb1e <== ALWAYS TAKEN 4fb18: 103c 0001 moveb #1,%d0 <== NOT EXECUTED 4fb1c: 6004 bras 4fb22 <== NOT EXECUTED return 1; *block_entry_ptr = memory; 4fb1e: 2480 movel %d0,%a2@ 4fb20: 4280 clrl %d0 return 0; } 4fb22: 246e fffc moveal %fp@(-4),%a2 4fb26: 4e5e unlk %fp <== NOT EXECUTED 0004fb2a : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4fb2a: 4e56 ffd8 linkw %fp,#-40 4fb2e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fb32: 246e 0008 moveal %fp@(8),%a2 4fb36: 242e 000c movel %fp@(12),%d2 4fb3a: 262e 0010 movel %fp@(16),%d3 /* * Perform internal consistency checks */ assert( the_jnode ); 4fb3e: 4a8a tstl %a2 4fb40: 6612 bnes 4fb54 <== ALWAYS TAKEN 4fb42: 4879 0005 fc5e pea 5fc5e <== NOT EXECUTED 4fb48: 4879 0005 fe06 pea 5fe06 <__FUNCTION__.5975> <== NOT EXECUTED 4fb4e: 4878 0131 pea 131 <== NOT EXECUTED 4fb52: 6018 bras 4fb6c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4fb54: 7005 moveq #5,%d0 4fb56: b0aa 0048 cmpl %a2@(72),%d0 4fb5a: 671c beqs 4fb78 <== ALWAYS TAKEN 4fb5c: 4879 0005 fcae pea 5fcae <== NOT EXECUTED 4fb62: 4879 0005 fe06 pea 5fe06 <__FUNCTION__.5975> <== NOT EXECUTED 4fb68: 4878 0135 pea 135 <== NOT EXECUTED 4fb6c: 4879 0005 fc68 pea 5fc68 <== NOT EXECUTED 4fb72: 4eb9 0004 d68c jsr 4d68c <__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 ) 4fb78: 2c39 0006 1754 movel 61754 ,%d6 4fb7e: 2206 movel %d6,%d1 4fb80: e489 lsrl #2,%d1 4fb82: 2001 movel %d1,%d0 4fb84: 5280 addql #1,%d0 4fb86: 4c01 0800 mulsl %d1,%d0 4fb8a: 4284 clrl %d4 4fb8c: 5280 addql #1,%d0 4fb8e: 4c01 0800 mulsl %d1,%d0 4fb92: 5380 subql #1,%d0 4fb94: 4c06 0800 mulsl %d6,%d0 4fb98: 2a00 movel %d0,%d5 4fb9a: 2002 movel %d2,%d0 4fb9c: 2203 movel %d3,%d1 4fb9e: 9285 subl %d5,%d1 4fba0: 9184 subxl %d4,%d0 4fba2: 6d12 blts 4fbb6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4fba4: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 4fbaa: 7416 moveq #22,%d2 <== NOT EXECUTED 4fbac: 72ff moveq #-1,%d1 <== NOT EXECUTED 4fbae: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fbb0: 2082 movel %d2,%a0@ <== NOT EXECUTED 4fbb2: 6000 0092 braw 4fc46 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 4fbb6: 282a 004c movel %a2@(76),%d4 4fbba: 2a2a 0050 movel %a2@(80),%d5 4fbbe: 2002 movel %d2,%d0 4fbc0: 2203 movel %d3,%d1 4fbc2: 9285 subl %d5,%d1 4fbc4: 9184 subxl %d4,%d0 4fbc6: 6e04 bgts 4fbcc 4fbc8: 4281 clrl %d1 4fbca: 607a bras 4fc46 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fbcc: 47f9 0005 d124 lea 5d124 <__divdi3>,%a3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4fbd2: 4bf9 0004 fab0 lea 4fab0 ,%a5 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fbd8: 2e06 movel %d6,%d7 4fbda: 5bc6 smi %d6 4fbdc: 49c6 extbl %d6 4fbde: 2f07 movel %d7,%sp@- 4fbe0: 2f06 movel %d6,%sp@- 4fbe2: 2f03 movel %d3,%sp@- 4fbe4: 2f02 movel %d2,%sp@- 4fbe6: 4e93 jsr %a3@ 4fbe8: 4fef 0010 lea %sp@(16),%sp 4fbec: 2841 moveal %d1,%a4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fbee: 2f07 movel %d7,%sp@- 4fbf0: 2f06 movel %d6,%sp@- 4fbf2: 2f05 movel %d5,%sp@- 4fbf4: 2f04 movel %d4,%sp@- 4fbf6: 4e93 jsr %a3@ 4fbf8: 4fef 0010 lea %sp@(16),%sp 4fbfc: 2c01 movel %d1,%d6 4fbfe: 2801 movel %d1,%d4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4fc00: 6036 bras 4fc38 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4fc02: 2f04 movel %d4,%sp@- 4fc04: 2f0a movel %a2,%sp@- 4fc06: 4e95 jsr %a5@ 4fc08: 508f addql #8,%sp 4fc0a: 4a80 tstl %d0 4fc0c: 6728 beqs 4fc36 <== ALWAYS TAKEN 4fc0e: 600c bras 4fc1c <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 4fc10: 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-- ) { 4fc12: 5384 subql #1,%d4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4fc14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fc16: 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-- ) { 4fc18: 508f addql #8,%sp <== NOT EXECUTED 4fc1a: 6006 bras 4fc22 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4fc1c: 47f9 0004 f874 lea 4f874 ,%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-- ) { 4fc22: bc84 cmpl %d4,%d6 <== NOT EXECUTED 4fc24: 63ea blss 4fc10 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4fc26: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 4fc2c: 72ff moveq #-1,%d1 <== NOT EXECUTED 4fc2e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fc30: 701c moveq #28,%d0 <== NOT EXECUTED 4fc32: 2080 movel %d0,%a0@ <== NOT EXECUTED 4fc34: 6010 bras 4fc46 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4fc36: 5284 addql #1,%d4 4fc38: b9c4 cmpal %d4,%a4 4fc3a: 64c6 bccs 4fc02 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4fc3c: 4281 clrl %d1 4fc3e: 2542 004c movel %d2,%a2@(76) 4fc42: 2543 0050 movel %d3,%a2@(80) return 0; } 4fc46: 2001 movel %d1,%d0 4fc48: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4fc4e: 4e5e unlk %fp <== NOT EXECUTED 0004f674 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4f674: 4e56 fff0 linkw %fp,#-16 4f678: 206e 0010 moveal %fp@(16),%a0 4f67c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4f680: 246e 0008 moveal %fp@(8),%a2 4f684: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4f688: 4a8a tstl %a2 4f68a: 6612 bnes 4f69e <== ALWAYS TAKEN 4f68c: 4879 0005 fc5e pea 5fc5e <== NOT EXECUTED 4f692: 4879 0005 fd61 pea 5fd61 <__FUNCTION__.6334> <== NOT EXECUTED 4f698: 4878 0388 pea 388 <== NOT EXECUTED 4f69c: 6018 bras 4f6b6 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f69e: 7005 moveq #5,%d0 4f6a0: b0aa 0048 cmpl %a2@(72),%d0 4f6a4: 671c beqs 4f6c2 <== ALWAYS TAKEN 4f6a6: 4879 0005 fcae pea 5fcae <== NOT EXECUTED 4f6ac: 4879 0005 fd61 pea 5fd61 <__FUNCTION__.6334> <== NOT EXECUTED 4f6b2: 4878 038c pea 38c <== NOT EXECUTED 4f6b6: 4879 0005 fc68 pea 5fc68 <== NOT EXECUTED 4f6bc: 4eb9 0004 d68c jsr 4d68c <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4f6c2: 2239 0006 1754 movel 61754 ,%d1 4f6c8: e489 lsrl #2,%d1 4f6ca: 2001 movel %d1,%d0 4f6cc: 5380 subql #1,%d0 4f6ce: b082 cmpl %d2,%d0 4f6d0: 6536 bcss 4f708 <== NEVER TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 4f6d2: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4f6d6: 4a88 tstl %a0 4f6d8: 6720 beqs 4f6fa if ( !p ) { 4f6da: 4a89 tstl %a1 4f6dc: 6610 bnes 4f6ee p = memfile_alloc_block(); 4f6de: 4eb9 0004 f650 jsr 4f650 if ( !p ) 4f6e4: 4a80 tstl %d0 4f6e6: 6700 0118 beqw 4f800 return 0; info->indirect = p; 4f6ea: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4f6ee: 206a 0054 moveal %a2@(84),%a0 4f6f2: e58a lsll #2,%d2 4f6f4: d1c2 addal %d2,%a0 4f6f6: 6000 010a braw 4f802 } if ( !p ) 4f6fa: 4a89 tstl %a1 4f6fc: 6700 0102 beqw 4f800 return 0; return &info->indirect[ my_block ]; 4f700: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4f704: 6000 00fc braw 4f802 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4f708: 2001 movel %d1,%d0 <== NOT EXECUTED 4f70a: 5280 addql #1,%d0 <== NOT EXECUTED 4f70c: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 4f710: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f712: 5389 subql #1,%a1 <== NOT EXECUTED 4f714: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 4f716: 6562 bcss 4f77a <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4f718: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4f71a: 202a 0058 movel %a2@(88),%d0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4f71e: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4f722: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4f726: 4a88 tstl %a0 <== NOT EXECUTED 4f728: 6736 beqs 4f760 <== NOT EXECUTED if ( !p ) { 4f72a: 4a80 tstl %d0 <== NOT EXECUTED 4f72c: 6610 bnes 4f73e <== NOT EXECUTED p = memfile_alloc_block(); 4f72e: 4eb9 0004 f650 jsr 4f650 <== NOT EXECUTED if ( !p ) 4f734: 4a80 tstl %d0 <== NOT EXECUTED 4f736: 6700 00c8 beqw 4f800 <== NOT EXECUTED return 0; info->doubly_indirect = p; 4f73a: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 4f73e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f740: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4f744: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4f746: 660e bnes 4f756 <== NOT EXECUTED p1 = memfile_alloc_block(); 4f748: 4eb9 0004 f650 jsr 4f650 <== NOT EXECUTED if ( !p1 ) 4f74e: 4a80 tstl %d0 <== NOT EXECUTED 4f750: 6700 00ae beqw 4f800 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 4f754: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 4f756: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f758: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f75c: 6000 00a4 braw 4f802 <== NOT EXECUTED } if ( !p ) 4f760: 4a80 tstl %d0 <== NOT EXECUTED 4f762: 6700 009c beqw 4f800 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4f766: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f768: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 4f76c: 4a88 tstl %a0 <== NOT EXECUTED 4f76e: 6700 0090 beqw 4f800 <== 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 ]; 4f772: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f776: 6000 008a braw 4f802 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4f77a: 2600 movel %d0,%d3 <== NOT EXECUTED 4f77c: 5283 addql #1,%d3 <== NOT EXECUTED 4f77e: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 4f782: 5383 subql #1,%d3 <== NOT EXECUTED 4f784: b682 cmpl %d2,%d3 <== NOT EXECUTED 4f786: 6578 bcss 4f800 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 4f788: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4f78a: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 4f78e: 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; 4f792: 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; 4f796: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4f79a: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4f79e: 4a88 tstl %a0 <== NOT EXECUTED 4f7a0: 6746 beqs 4f7e8 <== NOT EXECUTED if ( !p ) { 4f7a2: 4a80 tstl %d0 <== NOT EXECUTED 4f7a4: 660e bnes 4f7b4 <== NOT EXECUTED p = memfile_alloc_block(); 4f7a6: 4eb9 0004 f650 jsr 4f650 <== NOT EXECUTED if ( !p ) 4f7ac: 4a80 tstl %d0 <== NOT EXECUTED 4f7ae: 6750 beqs 4f800 <== NOT EXECUTED return 0; info->triply_indirect = p; 4f7b0: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 4f7b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f7b6: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4f7ba: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4f7bc: 660c bnes 4f7ca <== NOT EXECUTED p1 = memfile_alloc_block(); 4f7be: 4eb9 0004 f650 jsr 4f650 <== NOT EXECUTED if ( !p1 ) 4f7c4: 4a80 tstl %d0 <== NOT EXECUTED 4f7c6: 6738 beqs 4f800 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 4f7c8: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 4f7ca: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f7cc: 45f1 3c00 lea %a1@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 4f7d0: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p2 ) { 4f7d2: 660c bnes 4f7e0 <== NOT EXECUTED p2 = memfile_alloc_block(); 4f7d4: 4eb9 0004 f650 jsr 4f650 <== NOT EXECUTED if ( !p2 ) 4f7da: 4a80 tstl %d0 <== NOT EXECUTED 4f7dc: 6722 beqs 4f800 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4f7de: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 4f7e0: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f7e2: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 4f7e6: 601a bras 4f802 <== NOT EXECUTED } if ( !p ) 4f7e8: 4a80 tstl %d0 <== NOT EXECUTED 4f7ea: 6714 beqs 4f800 <== 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 ]; 4f7ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f7ee: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1 <== NOT EXECUTED if ( !p1 ) 4f7f2: 4a89 tstl %a1 <== NOT EXECUTED 4f7f4: 670a beqs 4f800 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 4f7f6: 2071 3c00 moveal %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f7fa: e58c lsll #2,%d4 <== NOT EXECUTED 4f7fc: d1c4 addal %d4,%a0 <== NOT EXECUTED 4f7fe: 6002 bras 4f802 <== NOT EXECUTED 4f800: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4f802: 2008 movel %a0,%d0 4f804: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4f80a: 4e5e unlk %fp <== NOT EXECUTED 00050036 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 50036: 4e56 ffc0 linkw %fp,#-64 5003a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5003e: 246e 0008 moveal %fp@(8),%a2 50042: 2a2e 0014 movel %fp@(20),%d5 50046: 2a6e 0018 moveal %fp@(24),%a5 5004a: 262e 000c movel %fp@(12),%d3 5004e: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 50052: 4a8a tstl %a2 50054: 6612 bnes 50068 <== ALWAYS TAKEN 50056: 4879 0005 fc5e pea 5fc5e <== NOT EXECUTED 5005c: 4879 0005 fd93 pea 5fd93 <__FUNCTION__.6161> <== NOT EXECUTED 50062: 4878 024c pea 24c <== NOT EXECUTED 50066: 601e bras 50086 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 50068: 202a 0048 movel %a2@(72),%d0 5006c: 2200 movel %d0,%d1 5006e: 5b81 subql #5,%d1 50070: 7401 moveq #1,%d2 50072: b481 cmpl %d1,%d2 50074: 641c bccs 50092 <== ALWAYS TAKEN 50076: 4879 0005 fd11 pea 5fd11 <== NOT EXECUTED 5007c: 4879 0005 fd93 pea 5fd93 <__FUNCTION__.6161> <== NOT EXECUTED 50082: 4878 0251 pea 251 <== NOT EXECUTED 50086: 4879 0005 fc68 pea 5fc68 <== NOT EXECUTED 5008c: 4eb9 0004 d68c jsr 4d68c <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 50092: 4a85 tstl %d5 50094: 6612 bnes 500a8 <== ALWAYS TAKEN 50096: 4879 0005 fd5c pea 5fd5c <== NOT EXECUTED 5009c: 4879 0005 fd93 pea 5fd93 <__FUNCTION__.6161> <== NOT EXECUTED 500a2: 4878 025a pea 25a <== NOT EXECUTED 500a6: 60de bras 50086 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 500a8: 4a8d tstl %a5 500aa: 6612 bnes 500be <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 500ac: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 500b2: 7e16 moveq #22,%d7 <== NOT EXECUTED 500b4: 7cff moveq #-1,%d6 <== NOT EXECUTED 500b6: 2040 moveal %d0,%a0 <== NOT EXECUTED 500b8: 2087 movel %d7,%a0@ <== NOT EXECUTED 500ba: 6000 01be braw 5027a <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 500be: 7206 moveq #6,%d1 500c0: b280 cmpl %d0,%d1 500c2: 6658 bnes 5011c <== ALWAYS TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 500c4: 284d moveal %a5,%a4 <== NOT EXECUTED 500c6: 97cb subal %a3,%a3 <== NOT EXECUTED 500c8: 2c2a 004c movel %a2@(76),%d6 <== NOT EXECUTED 500cc: 2e2a 0050 movel %a2@(80),%d7 <== NOT EXECUTED 500d0: 200b movel %a3,%d0 <== NOT EXECUTED 500d2: 220c movel %a4,%d1 <== NOT EXECUTED 500d4: 2d46 ffe8 movel %d6,%fp@(-24) <== NOT EXECUTED 500d8: 2d47 ffec movel %d7,%fp@(-20) <== NOT EXECUTED 500dc: 9e84 subl %d4,%d7 <== NOT EXECUTED 500de: 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; 500e0: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 500e4: 9287 subl %d7,%d1 <== NOT EXECUTED 500e6: 9186 subxl %d6,%d0 <== NOT EXECUTED 500e8: 6e04 bgts 500ee <== NOT EXECUTED 500ea: 2c0d movel %a5,%d6 <== NOT EXECUTED 500ec: 6006 bras 500f4 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 500ee: 2c2e ffec movel %fp@(-20),%d6 <== NOT EXECUTED 500f2: 9c84 subl %d4,%d6 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 500f4: 2f06 movel %d6,%sp@- <== NOT EXECUTED 500f6: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 500fa: 2f05 movel %d5,%sp@- <== NOT EXECUTED 500fc: 4eb9 0005 1d70 jsr 51d70 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 50102: 42a7 clrl %sp@- <== NOT EXECUTED 50104: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 50108: 4eb9 0004 35bc jsr 435bc <== NOT EXECUTED 5010e: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 50114: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 50118: 6000 0160 braw 5027a <== 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 ) 5011c: 200d movel %a5,%d0 5011e: d084 addl %d4,%d0 50120: 2240 moveal %d0,%a1 50122: 91c8 subal %a0,%a0 50124: 202a 004c movel %a2@(76),%d0 50128: 222a 0050 movel %a2@(80),%d1 5012c: 2c08 movel %a0,%d6 5012e: 2e09 movel %a1,%d7 50130: 9e81 subl %d1,%d7 50132: 9d80 subxl %d0,%d6 50134: 6e04 bgts 5013a 50136: 240d movel %a5,%d2 50138: 6006 bras 50140 my_length = the_jnode->info.file.size - start; 5013a: 2e01 movel %d1,%d7 5013c: 9e84 subl %d4,%d7 5013e: 2407 movel %d7,%d2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 50140: 2e39 0006 1754 movel 61754 ,%d7 50146: 2207 movel %d7,%d1 50148: 5bc0 smi %d0 5014a: 49c0 extbl %d0 5014c: 2640 moveal %d0,%a3 5014e: 2841 moveal %d1,%a4 50150: 2f0c movel %a4,%sp@- 50152: 2f00 movel %d0,%sp@- 50154: 2f04 movel %d4,%sp@- 50156: 2f03 movel %d3,%sp@- 50158: 4eb9 0005 d4dc jsr 5d4dc <__moddi3> 5015e: 4fef 0010 lea %sp@(16),%sp 50162: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 50164: 2f0c movel %a4,%sp@- 50166: 2f0b movel %a3,%sp@- 50168: 2f04 movel %d4,%sp@- 5016a: 2f03 movel %d3,%sp@- 5016c: 4eb9 0005 d124 jsr 5d124 <__divdi3> 50172: 4fef 0010 lea %sp@(16),%sp 50176: 2601 movel %d1,%d3 if ( start_offset ) { 50178: 4a86 tstl %d6 5017a: 6604 bnes 50180 5017c: 2e05 movel %d5,%d7 5017e: 6050 bras 501d0 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 ); 50180: 42a7 clrl %sp@- 50182: 2f01 movel %d1,%sp@- 50184: 2f0a movel %a2,%sp@- 50186: 4eb9 0004 f674 jsr 4f674 assert( block_ptr ); 5018c: 4fef 000c lea %sp@(12),%sp 50190: 4a80 tstl %d0 50192: 6614 bnes 501a8 <== ALWAYS TAKEN 50194: 4879 0005 fcde pea 5fcde <== NOT EXECUTED 5019a: 4879 0005 fd93 pea 5fd93 <__FUNCTION__.6161> <== NOT EXECUTED 501a0: 4878 0296 pea 296 <== NOT EXECUTED 501a4: 6000 fee0 braw 50086 <== 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; 501a8: 9e86 subl %d6,%d7 501aa: 2202 movel %d2,%d1 501ac: be82 cmpl %d2,%d7 501ae: 6402 bccs 501b2 501b0: 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 ); 501b2: 2f01 movel %d1,%sp@- 501b4: 2040 moveal %d0,%a0 501b6: dc90 addl %a0@,%d6 dest += to_copy; 501b8: 2e05 movel %d5,%d7 501ba: de81 addl %d1,%d7 block++; my_length -= to_copy; 501bc: 9481 subl %d1,%d2 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; block++; 501be: 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 ); 501c0: 2f06 movel %d6,%sp@- dest += to_copy; block++; my_length -= to_copy; 501c2: 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 ); 501c4: 2f05 movel %d5,%sp@- 501c6: 4eb9 0005 1d70 jsr 51d70 dest += to_copy; block++; my_length -= to_copy; 501cc: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 501d0: 2a39 0006 1754 movel 61754 ,%d5 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 501d6: 49f9 0004 f674 lea 4f674 ,%a4 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 501dc: 47f9 0005 1d70 lea 51d70 ,%a3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 501e2: 603a bras 5021e block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 501e4: 42a7 clrl %sp@- 501e6: 2f03 movel %d3,%sp@- 501e8: 2f0a movel %a2,%sp@- 501ea: 4e94 jsr %a4@ assert( block_ptr ); 501ec: 4fef 000c lea %sp@(12),%sp 501f0: 4a80 tstl %d0 501f2: 6614 bnes 50208 <== ALWAYS TAKEN 501f4: 4879 0005 fcde pea 5fcde <== NOT EXECUTED 501fa: 4879 0005 fd93 pea 5fd93 <__FUNCTION__.6161> <== NOT EXECUTED 50200: 4878 02a7 pea 2a7 <== NOT EXECUTED 50204: 6000 fe80 braw 50086 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 50208: 2040 moveal %d0,%a0 dest += to_copy; block++; 5020a: 5283 addql #1,%d3 my_length -= to_copy; 5020c: 9485 subl %d5,%d2 copied += to_copy; 5020e: 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 ); 50210: 2f05 movel %d5,%sp@- 50212: 2f10 movel %a0@,%sp@- 50214: 2f07 movel %d7,%sp@- dest += to_copy; 50216: 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 ); 50218: 4e93 jsr %a3@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 5021a: 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 ) { 5021e: b4b9 0006 1754 cmpl 61754 ,%d2 50224: 64be bccs 501e4 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 50226: 4a82 tstl %d2 50228: 673c beqs 50266 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 5022a: 42a7 clrl %sp@- 5022c: 2f03 movel %d3,%sp@- 5022e: 2f0a movel %a2,%sp@- 50230: 4eb9 0004 f674 jsr 4f674 assert( block_ptr ); 50236: 4fef 000c lea %sp@(12),%sp 5023a: 4a80 tstl %d0 5023c: 6614 bnes 50252 <== ALWAYS TAKEN 5023e: 4879 0005 fcde pea 5fcde <== NOT EXECUTED 50244: 4879 0005 fd93 pea 5fd93 <__FUNCTION__.6161> <== NOT EXECUTED 5024a: 4878 02b9 pea 2b9 <== NOT EXECUTED 5024e: 6000 fe36 braw 50086 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 50252: 2040 moveal %d0,%a0 copied += my_length; 50254: 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 ); 50256: 2f02 movel %d2,%sp@- 50258: 2f10 movel %a0@,%sp@- 5025a: 2f07 movel %d7,%sp@- 5025c: 4eb9 0005 1d70 jsr 51d70 copied += my_length; 50262: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 50266: 42a7 clrl %sp@- 50268: 486e fff8 pea %fp@(-8) 5026c: 4eb9 0004 35bc jsr 435bc 50272: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 50278: 508f addql #8,%sp } 5027a: 2006 movel %d6,%d0 5027c: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 50282: 4e5e unlk %fp <== NOT EXECUTED 0004f8c0 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4f8c0: 4e56 ffe4 linkw %fp,#-28 4f8c4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4f8c8: 246e 0008 moveal %fp@(8),%a2 /* * Perform internal consistency checks */ assert( the_jnode ); 4f8cc: 4a8a tstl %a2 4f8ce: 6612 bnes 4f8e2 <== ALWAYS TAKEN 4f8d0: 4879 0005 fc5e pea 5fc5e <== NOT EXECUTED 4f8d6: 4879 0005 fda5 pea 5fda5 <__FUNCTION__.6086> <== NOT EXECUTED 4f8dc: 4878 01ee pea 1ee <== NOT EXECUTED 4f8e0: 6018 bras 4f8fa <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f8e2: 7005 moveq #5,%d0 4f8e4: b0aa 0048 cmpl %a2@(72),%d0 4f8e8: 671c beqs 4f906 <== ALWAYS TAKEN 4f8ea: 4879 0005 fcae pea 5fcae <== NOT EXECUTED 4f8f0: 4879 0005 fda5 pea 5fda5 <__FUNCTION__.6086> <== NOT EXECUTED 4f8f6: 4878 01f2 pea 1f2 <== NOT EXECUTED 4f8fa: 4879 0005 fc68 pea 5fc68 <== NOT EXECUTED 4f900: 4eb9 0004 d68c jsr 4d68c <__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; 4f906: 2439 0006 1754 movel 61754 ,%d2 4f90c: e48a lsrl #2,%d2 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f90e: 4aaa 0054 tstl %a2@(84) 4f912: 670e beqs 4f922 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 4f914: 2f02 movel %d2,%sp@- 4f916: 486a 0054 pea %a2@(84) 4f91a: 4eb9 0004 f80e jsr 4f80e 4f920: 508f addql #8,%sp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f922: 4aaa 0058 tstl %a2@(88) 4f926: 673e beqs 4f966 <== ALWAYS TAKEN 4f928: 4283 clrl %d3 <== NOT EXECUTED if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4f92a: 47f9 0004 f80e lea 4f80e ,%a3<== NOT EXECUTED 4f930: 601a bras 4f94c <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4f932: 2003 movel %d3,%d0 <== NOT EXECUTED 4f934: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4f938: e588 lsll #2,%d0 <== NOT EXECUTED 4f93a: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4f93e: 670a beqs 4f94a <== NOT EXECUTED memfile_free_blocks_in_table( 4f940: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f942: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4f946: 4e93 jsr %a3@ <== NOT EXECUTED 4f948: 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 4f952: e488 lsrl #2,%d0 <== NOT EXECUTED 4f954: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f956: 62da bhis 4f932 <== 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 ); 4f958: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f95a: 486a 0058 pea %a2@(88) <== NOT EXECUTED 4f95e: 4eb9 0004 f80e jsr 4f80e <== NOT EXECUTED 4f964: 508f addql #8,%sp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f966: 4aaa 005c tstl %a2@(92) 4f96a: 6762 beqs 4f9ce <== ALWAYS TAKEN 4f96c: 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 4f974: 603e bras 4f9b4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f976: 2a03 movel %d3,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4f978: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4f97c: e58d lsll #2,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4f97e: 2670 5800 moveal %a0@(00000000,%d5:l),%a3 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4f982: 4a8b tstl %a3 <== NOT EXECUTED 4f984: 673a beqs 4f9c0 <== NOT EXECUTED 4f986: 4284 clrl %d4 <== NOT EXECUTED 4f988: 6010 bras 4f99a <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4f98e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f990: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f992: 4e94 jsr %a4@ <== NOT EXECUTED 4f994: 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 4f9a0: e488 lsrl #2,%d0 <== NOT EXECUTED 4f9a2: b084 cmpl %d4,%d0 <== NOT EXECUTED 4f9a4: 62e4 bhis 4f98a <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4f9a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f9a8: 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 4f9ba: e488 lsrl #2,%d0 <== NOT EXECUTED 4f9bc: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f9be: 62b6 bhis 4f976 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4f9c0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f9c2: 486a 005c pea %a2@(92) <== NOT EXECUTED 4f9c6: 4eb9 0004 f80e jsr 4f80e <== NOT EXECUTED 4f9cc: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4f9ce: 4280 clrl %d0 4f9d0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4f9d6: 4e5e unlk %fp <== NOT EXECUTED 0004f874 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4f874: 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 ); 4f878: 42a7 clrl %sp@- <== NOT EXECUTED 4f87a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4f87e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4f882: 4eb9 0004 f674 jsr 4f674 <== NOT EXECUTED assert( block_ptr ); 4f888: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f88c: 4a80 tstl %d0 <== NOT EXECUTED 4f88e: 661c bnes 4f8ac <== NOT EXECUTED 4f890: 4879 0005 fcde pea 5fcde <== NOT EXECUTED 4f896: 4879 0005 fdd6 pea 5fdd6 <__FUNCTION__.6050> <== NOT EXECUTED 4f89c: 4878 0196 pea 196 <== NOT EXECUTED 4f8a0: 4879 0005 fc68 pea 5fc68 <== NOT EXECUTED 4f8a6: 4eb9 0004 d68c jsr 4d68c <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 4f8ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f8ae: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4f8b0: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4f8b2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4f8b4: 4eb9 0004 f636 jsr 4f636 <== NOT EXECUTED } return 1; } 4f8ba: 7001 moveq #1,%d0 <== NOT EXECUTED 4f8bc: 4e5e unlk %fp <== NOT EXECUTED 0004fd46 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4fd46: 4e56 ffd0 linkw %fp,#-48 4fd4a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fd4e: 246e 0008 moveal %fp@(8),%a2 4fd52: 262e 0014 movel %fp@(20),%d3 4fd56: 242e 0018 movel %fp@(24),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4fd5a: 4a8a tstl %a2 4fd5c: 6612 bnes 4fd70 <== ALWAYS TAKEN 4fd5e: 4879 0005 fc5e pea 5fc5e <== NOT EXECUTED 4fd64: 4879 0005 fd80 pea 5fd80 <__FUNCTION__.6253> <== NOT EXECUTED 4fd6a: 4878 02e3 pea 2e3 <== NOT EXECUTED 4fd6e: 6018 bras 4fd88 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4fd70: 7805 moveq #5,%d4 4fd72: b8aa 0048 cmpl %a2@(72),%d4 4fd76: 671c beqs 4fd94 <== ALWAYS TAKEN 4fd78: 4879 0005 fcae pea 5fcae <== NOT EXECUTED 4fd7e: 4879 0005 fd80 pea 5fd80 <__FUNCTION__.6253> <== NOT EXECUTED 4fd84: 4878 02e7 pea 2e7 <== NOT EXECUTED 4fd88: 4879 0005 fc68 pea 5fc68 <== NOT EXECUTED 4fd8e: 4eb9 0004 d68c jsr 4d68c <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4fd94: 4a83 tstl %d3 4fd96: 6612 bnes 4fdaa <== ALWAYS TAKEN 4fd98: 4879 0005 f3b3 pea 5f3b3 <== NOT EXECUTED 4fd9e: 4879 0005 fd80 pea 5fd80 <__FUNCTION__.6253> <== NOT EXECUTED 4fda4: 4878 02ef pea 2ef <== NOT EXECUTED 4fda8: 60de bras 4fd88 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4fdaa: 4a82 tstl %d2 4fdac: 6612 bnes 4fdc0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4fdae: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 4fdb4: 7a16 moveq #22,%d5 <== NOT EXECUTED 4fdb6: 7eff moveq #-1,%d7 <== NOT EXECUTED 4fdb8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fdba: 2085 movel %d5,%a0@ <== NOT EXECUTED 4fdbc: 6000 0186 braw 4ff44 <== 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 ) { 4fdc0: 206e 0010 moveal %fp@(16),%a0 4fdc4: d1c2 addal %d2,%a0 4fdc6: 2208 movel %a0,%d1 4fdc8: 4280 clrl %d0 4fdca: 282a 004c movel %a2@(76),%d4 4fdce: 2a2a 0050 movel %a2@(80),%d5 4fdd2: 9a81 subl %d1,%d5 4fdd4: 9980 subxl %d0,%d4 4fdd6: 6c26 bges 4fdfe <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 4fdd8: 2f08 movel %a0,%sp@- 4fdda: 2f00 movel %d0,%sp@- 4fddc: 2f0a movel %a2,%sp@- 4fdde: 4eb9 0004 fb2a jsr 4fb2a if ( status ) 4fde4: 4fef 000c lea %sp@(12),%sp 4fde8: 4a80 tstl %d0 4fdea: 6712 beqs 4fdfe <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4fdec: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 4fdf2: 781c moveq #28,%d4 <== NOT EXECUTED 4fdf4: 7eff moveq #-1,%d7 <== NOT EXECUTED 4fdf6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fdf8: 2084 movel %d4,%a0@ <== NOT EXECUTED 4fdfa: 6000 0148 braw 4ff44 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4fdfe: 2e39 0006 1754 movel 61754 ,%d7 4fe04: 2207 movel %d7,%d1 4fe06: 5bc0 smi %d0 4fe08: 49c0 extbl %d0 4fe0a: 2640 moveal %d0,%a3 4fe0c: 2841 moveal %d1,%a4 4fe0e: 2f0c movel %a4,%sp@- 4fe10: 2f00 movel %d0,%sp@- 4fe12: 2f2e 0010 movel %fp@(16),%sp@- 4fe16: 2f2e 000c movel %fp@(12),%sp@- 4fe1a: 4eb9 0005 d4dc jsr 5d4dc <__moddi3> 4fe20: 4fef 0010 lea %sp@(16),%sp 4fe24: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fe26: 2f0c movel %a4,%sp@- 4fe28: 2f0b movel %a3,%sp@- 4fe2a: 2f2e 0010 movel %fp@(16),%sp@- 4fe2e: 2f2e 000c movel %fp@(12),%sp@- 4fe32: 4eb9 0005 d124 jsr 5d124 <__divdi3> 4fe38: 4fef 0010 lea %sp@(16),%sp 4fe3c: 2a01 movel %d1,%d5 if ( start_offset ) { 4fe3e: 4a84 tstl %d4 4fe40: 6606 bnes 4fe48 4fe42: 2643 moveal %d3,%a3 4fe44: 4287 clrl %d7 4fe46: 604c bras 4fe94 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 ); 4fe48: 42a7 clrl %sp@- 4fe4a: 2f01 movel %d1,%sp@- 4fe4c: 2f0a movel %a2,%sp@- 4fe4e: 4eb9 0004 f674 jsr 4f674 assert( block_ptr ); 4fe54: 4fef 000c lea %sp@(12),%sp 4fe58: 4a80 tstl %d0 4fe5a: 6614 bnes 4fe70 <== ALWAYS TAKEN 4fe5c: 4879 0005 fcde pea 5fcde <== NOT EXECUTED 4fe62: 4879 0005 fd80 pea 5fd80 <__FUNCTION__.6253> <== NOT EXECUTED 4fe68: 4878 031c pea 31c <== NOT EXECUTED 4fe6c: 6000 ff1a braw 4fd88 <== 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; 4fe70: 9e84 subl %d4,%d7 4fe72: b487 cmpl %d7,%d2 4fe74: 6402 bccs 4fe78 4fe76: 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 ); 4fe78: 2f07 movel %d7,%sp@- 4fe7a: 2040 moveal %d0,%a0 src += to_copy; 4fe7c: 2643 moveal %d3,%a3 4fe7e: d7c7 addal %d7,%a3 block++; 4fe80: 5285 addql #1,%d5 my_length -= to_copy; 4fe82: 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 ); 4fe84: 2f03 movel %d3,%sp@- 4fe86: d890 addl %a0@,%d4 4fe88: 2f04 movel %d4,%sp@- 4fe8a: 4eb9 0005 1d70 jsr 51d70 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4fe90: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4fe94: 2639 0006 1754 movel 61754 ,%d3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4fe9a: 4bf9 0004 f674 lea 4f674 ,%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 ); 4fea0: 49f9 0005 1d70 lea 51d70 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4fea6: 603a bras 4fee2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4fea8: 42a7 clrl %sp@- 4feaa: 2f05 movel %d5,%sp@- 4feac: 2f0a movel %a2,%sp@- 4feae: 4e95 jsr %a5@ assert( block_ptr ); 4feb0: 4fef 000c lea %sp@(12),%sp 4feb4: 4a80 tstl %d0 4feb6: 6614 bnes 4fecc <== ALWAYS TAKEN 4feb8: 4879 0005 fcde pea 5fcde <== NOT EXECUTED 4febe: 4879 0005 fd80 pea 5fd80 <__FUNCTION__.6253> <== NOT EXECUTED 4fec4: 4878 0330 pea 330 <== NOT EXECUTED 4fec8: 6000 febe braw 4fd88 <== 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 ); 4fecc: 2f03 movel %d3,%sp@- 4fece: 2240 moveal %d0,%a1 src += to_copy; block++; 4fed0: 5285 addql #1,%d5 my_length -= to_copy; 4fed2: 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( 4fed4: 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 ); 4fed6: 2f0b movel %a3,%sp@- 4fed8: 2f11 movel %a1@,%sp@- src += to_copy; 4feda: 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 ); 4fedc: 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( 4fede: 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 ) { 4fee2: b4b9 0006 1754 cmpl 61754 ,%d2 4fee8: 64be bccs 4fea8 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4feea: 4a82 tstl %d2 4feec: 673c beqs 4ff2a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4feee: 42a7 clrl %sp@- 4fef0: 2f05 movel %d5,%sp@- 4fef2: 2f0a movel %a2,%sp@- 4fef4: 4eb9 0004 f674 jsr 4f674 assert( block_ptr ); 4fefa: 4fef 000c lea %sp@(12),%sp 4fefe: 4a80 tstl %d0 4ff00: 6614 bnes 4ff16 <== ALWAYS TAKEN 4ff02: 4879 0005 fcde pea 5fcde <== NOT EXECUTED 4ff08: 4879 0005 fd80 pea 5fd80 <__FUNCTION__.6253> <== NOT EXECUTED 4ff0e: 4878 0346 pea 346 <== NOT EXECUTED 4ff12: 6000 fe74 braw 4fd88 <== 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 ); 4ff16: 2f02 movel %d2,%sp@- 4ff18: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4ff1a: 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 ); 4ff1c: 2f0b movel %a3,%sp@- 4ff1e: 2f10 movel %a0@,%sp@- 4ff20: 4eb9 0005 1d70 jsr 51d70 my_length = 0; copied += to_copy; 4ff26: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4ff2a: 42a7 clrl %sp@- 4ff2c: 486e fff8 pea %fp@(-8) 4ff30: 4eb9 0004 35bc jsr 435bc 4ff36: 202e fff8 movel %fp@(-8),%d0 return copied; 4ff3a: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4ff3c: 2540 0044 movel %d0,%a2@(68) 4ff40: 2540 0040 movel %d0,%a2@(64) return copied; } 4ff44: 2007 movel %d7,%d0 4ff46: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4ff4c: 4e5e unlk %fp <== NOT EXECUTED 00048ba4 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48ba4: 4e56 ffb4 linkw %fp,#-76 48ba8: 48d7 003c moveml %d2-%d5,%sp@ 48bac: 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 ); 48bb0: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48bb2: 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 ); 48bb6: 4eb9 0004 de54 jsr 4de54 48bbc: 588f addql #4,%sp 48bbe: 486e fffc pea %fp@(-4) 48bc2: 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 */ ) { 48bc6: 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 ); 48bca: 2f00 movel %d0,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48bcc: 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 ); 48bd0: 2f03 movel %d3,%sp@- 48bd2: 4eb9 0004 8a18 jsr 48a18 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 48bd8: 4fef 0010 lea %sp@(16),%sp 48bdc: 2002 movel %d2,%d0 48bde: 0280 0000 f000 andil #61440,%d0 48be4: 0c80 0000 4000 cmpil #16384,%d0 48bea: 6748 beqs 48c34 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 48bec: 0c80 0000 8000 cmpil #32768,%d0 48bf2: 6606 bnes 48bfa 48bf4: 303c 0005 movew #5,%d0 48bf8: 603c bras 48c36 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 48bfa: 0c80 0000 6000 cmpil #24576,%d0 48c00: 6708 beqs 48c0a 48c02: 0c80 0000 2000 cmpil #8192,%d0 48c08: 660c bnes 48c16 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 48c0a: 2d45 ffe8 movel %d5,%fp@(-24) 48c0e: 7002 moveq #2,%d0 48c10: 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) ) { 48c14: 6020 bras 48c36 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 48c16: 0c80 0000 1000 cmpil #4096,%d0 48c1c: 6606 bnes 48c24 <== NEVER TAKEN 48c1e: 303c 0007 movew #7,%d0 48c22: 6012 bras 48c36 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 48c24: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 48c2a: 7416 moveq #22,%d2 <== NOT EXECUTED 48c2c: 72ff moveq #-1,%d1 <== NOT EXECUTED 48c2e: 2040 moveal %d0,%a0 <== NOT EXECUTED 48c30: 2082 movel %d2,%a0@ <== NOT EXECUTED 48c32: 6032 bras 48c66 <== NOT EXECUTED 48c34: 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( 48c36: 486e ffe8 pea %fp@(-24) 48c3a: 2f02 movel %d2,%sp@- 48c3c: 486e ffc7 pea %fp@(-57) 48c40: 2f00 movel %d0,%sp@- 48c42: 2f2e 0018 movel %fp@(24),%sp@- 48c46: 4eb9 0004 b52c jsr 4b52c new_name, mode, &info ); if ( !new_node ) 48c4c: 4fef 0014 lea %sp@(20),%sp 48c50: 4a80 tstl %d0 48c52: 6704 beqs 48c58 <== NEVER TAKEN 48c54: 4281 clrl %d1 48c56: 600e bras 48c66 rtems_set_errno_and_return_minus_one( ENOMEM ); 48c58: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 48c5e: 72ff moveq #-1,%d1 <== NOT EXECUTED 48c60: 2040 moveal %d0,%a0 <== NOT EXECUTED 48c62: 700c moveq #12,%d0 <== NOT EXECUTED 48c64: 2080 movel %d0,%a0@ <== NOT EXECUTED return 0; } 48c66: 2001 movel %d1,%d0 48c68: 4cee 003c ffb4 moveml %fp@(-76),%d2-%d5 48c6e: 4e5e unlk %fp ... 00042c38 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42c38: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42c3a: 4e56 0000 linkw %fp,#0 42c3e: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42c42: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42c46: b0a8 0048 cmpl %a0@(72),%d0 42c4a: 6710 beqs 42c5c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42c4c: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 42c52: 7214 moveq #20,%d1 <== NOT EXECUTED 42c54: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c56: 70ff moveq #-1,%d0 <== NOT EXECUTED 42c58: 2081 movel %d1,%a0@ <== NOT EXECUTED 42c5a: 6006 bras 42c62 <== 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; 42c5c: 2149 0058 movel %a1,%a0@(88) 42c60: 4280 clrl %d0 return 0; } 42c62: 4e5e unlk %fp ... 00043bf6 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43bf6: 4e56 0000 linkw %fp,#0 43bfa: 2f0a movel %a2,%sp@- 43bfc: 246e 0008 moveal %fp@(8),%a2 43c00: 2f02 movel %d2,%sp@- assert( the_jnode ); 43c02: 4a8a tstl %a2 43c04: 6614 bnes 43c1a <== ALWAYS TAKEN 43c06: 4879 0006 0b46 pea 60b46 <== NOT EXECUTED 43c0c: 4879 0006 0cde pea 60cde <__FUNCTION__.6573> <== NOT EXECUTED 43c12: 4878 0038 pea 38 <== NOT EXECUTED 43c16: 6000 00c6 braw 43cde <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 43c1a: 2079 0006 2760 moveal 62760 <_impure_ptr>,%a0 switch( the_jnode->type ) { 43c20: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 43c22: 2f28 0008 movel %a0@(8),%sp@- 43c26: 486a 000c pea %a2@(12) 43c2a: 4eb9 0005 18a4 jsr 518a4 switch( the_jnode->type ) { 43c30: 202a 0048 movel %a2@(72),%d0 43c34: 2200 movel %d0,%d1 43c36: 508f addql #8,%sp 43c38: 5381 subql #1,%d1 43c3a: b481 cmpl %d1,%d2 43c3c: 6500 00f0 bcsw 43d2e 43c40: 2079 0006 2760 moveal 62760 <_impure_ptr>,%a0 43c46: 303b 1a08 movew %pc@(43c50 ,%d1:l:2),%d0 43c4a: 48c0 extl %d0 43c4c: 4efb 0802 jmp %pc@(43c50 ,%d0:l) 43c50: 000e 016 <== NOT EXECUTED 43c52: 0022 042 <== NOT EXECUTED 43c54: 006e 0156 <== NOT EXECUTED 43c56: 009a 0052 0032 oril #5374002,%d2 <== NOT EXECUTED 43c5c: 00bc 2f28 0008 oril #791150600,%d4 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 43c62: 4878 002f pea 2f 43c66: 4eb9 0005 1778 jsr 51778 break; 43c6c: 508f addql #8,%sp 43c6e: 6000 00e8 braw 43d58 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 43c72: 2f2a 0050 movel %a2@(80),%sp@- 43c76: 2f2a 004c movel %a2@(76),%sp@- 43c7a: 4879 0006 0b99 pea 60b99 43c80: 600e bras 43c90 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 43c82: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 43c86: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 43c8a: 4879 0006 0bac pea 60bac <== NOT EXECUTED 43c90: 2f28 0008 movel %a0@(8),%sp@- 43c94: 4eb9 0005 1738 jsr 51738 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 43c9a: 4fef 0010 lea %sp@(16),%sp 43c9e: 6000 00b8 braw 43d58 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 43ca2: 2f2a 0050 movel %a2@(80),%sp@- 43ca6: 4879 0006 0bbb pea 60bbb 43cac: 2f28 0008 movel %a0@(8),%sp@- 43cb0: 4eb9 0005 1738 jsr 51738 (uint32_t)the_jnode->info.file.size ); #endif break; 43cb6: 4fef 000c lea %sp@(12),%sp 43cba: 6000 009c braw 43d58 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 43cbe: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43cc2: 4879 0006 0bc7 pea 60bc7 <== NOT EXECUTED 43cc8: 4eb9 0005 18a4 jsr 518a4 <== NOT EXECUTED assert(0); 43cce: 4879 0005 fde9 pea 5fde9 <== NOT EXECUTED 43cd4: 4879 0006 0cde pea 60cde <__FUNCTION__.6573> <== NOT EXECUTED 43cda: 4878 005d pea 5d <== NOT EXECUTED 43cde: 4879 0006 0b50 pea 60b50 <== NOT EXECUTED 43ce4: 4eb9 0004 458c jsr 4458c <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 43cea: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43cee: 4879 0006 0bc7 pea 60bc7 <== NOT EXECUTED 43cf4: 4eb9 0005 18a4 jsr 518a4 <== NOT EXECUTED assert(0); 43cfa: 4879 0005 fde9 pea 5fde9 <== NOT EXECUTED 43d00: 4879 0006 0cde pea 60cde <__FUNCTION__.6573> <== NOT EXECUTED 43d06: 4878 0062 pea 62 <== NOT EXECUTED 43d0a: 60d2 bras 43cde <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 43d0c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d10: 4879 0006 0bdb pea 60bdb <== NOT EXECUTED 43d16: 4eb9 0005 18a4 jsr 518a4 <== NOT EXECUTED assert(0); 43d1c: 4879 0005 fde9 pea 5fde9 <== NOT EXECUTED 43d22: 4879 0006 0cde pea 60cde <__FUNCTION__.6573> <== NOT EXECUTED 43d28: 4878 0067 pea 67 <== NOT EXECUTED 43d2c: 60b0 bras 43cde <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 43d2e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43d30: 4879 0006 0bee pea 60bee <== NOT EXECUTED 43d36: 2079 0006 2760 moveal 62760 <_impure_ptr>,%a0 <== NOT EXECUTED 43d3c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d40: 4eb9 0005 1738 jsr 51738 <== NOT EXECUTED assert(0); 43d46: 4879 0005 fde9 pea 5fde9 <== NOT EXECUTED 43d4c: 4879 0006 0cde pea 60cde <__FUNCTION__.6573> <== NOT EXECUTED 43d52: 4878 006c pea 6c <== NOT EXECUTED 43d56: 6086 bras 43cde <== NOT EXECUTED break; } puts(""); } 43d58: 242e fff8 movel %fp@(-8),%d2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d5c: 203c 0006 1328 movel #398120,%d0 } 43d62: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d66: 2d40 0008 movel %d0,%fp@(8) } 43d6a: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d6c: 4ef9 0005 30e0 jmp 530e0 00042c7c : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42c7c: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42c7e: 4e56 0000 linkw %fp,#0 42c82: 206e 0008 moveal %fp@(8),%a0 42c86: 2f0a movel %a2,%sp@- IMFS_jnode_t *node; int i; node = loc->node_access; 42c88: 2050 moveal %a0@,%a0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42c8a: 2f02 movel %d2,%sp@- 42c8c: 226e 000c moveal %fp@(12),%a1 42c90: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42c94: b0a8 0048 cmpl %a0@(72),%d0 42c98: 6604 bnes 42c9e <== NEVER TAKEN 42c9a: 4200 clrb %d0 42c9c: 6016 bras 42cb4 rtems_set_errno_and_return_minus_one( EINVAL ); 42c9e: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 42ca4: 7216 moveq #22,%d1 <== NOT EXECUTED 42ca6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ca8: 70ff moveq #-1,%d0 <== NOT EXECUTED 42caa: 2081 movel %d1,%a0@ <== NOT EXECUTED 42cac: 6014 bras 42cc2 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 42cae: 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++ ) 42cb2: 5280 addql #1,%d0 42cb4: b480 cmpl %d0,%d2 42cb6: 630a blss 42cc2 42cb8: 2468 004c moveal %a0@(76),%a2 42cbc: 1232 0800 moveb %a2@(00000000,%d0:l),%d1 42cc0: 66ec bnes 42cae buf[i] = node->info.sym_link.name[i]; return i; } 42cc2: 242e fff8 movel %fp@(-8),%d2 42cc6: 246e fffc moveal %fp@(-4),%a2 42cca: 4e5e unlk %fp ... 00042cd0 : 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 */ ) { 42cd0: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42cd4: 206e 000c moveal %fp@(12),%a0 rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 42cd8: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42cda: 4878 0020 pea 20 42cde: 2f2e 0014 movel %fp@(20),%sp@- ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42ce2: 2450 moveal %a0@,%a2 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42ce4: 486a 000c pea %a2@(12) 42ce8: 4eb9 0005 28e4 jsr 528e4 if ( the_jnode->Parent != NULL ) 42cee: 4fef 000c lea %sp@(12),%sp 42cf2: 4aaa 0008 tstl %a2@(8) 42cf6: 670a beqs 42d02 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42cf8: 2f0a movel %a2,%sp@- 42cfa: 4eb9 0004 7198 jsr 47198 <_Chain_Extract> 42d00: 588f addql #4,%sp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 42d02: 206e 0010 moveal %fp@(16),%a0 42d06: 2050 moveal %a0@,%a0 the_jnode->Parent = new_parent; 42d08: 2548 0008 movel %a0,%a2@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 42d0c: 2f0a movel %a2,%sp@- 42d0e: 4868 004c pea %a0@(76) 42d12: 4eb9 0004 7160 jsr 47160 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 42d18: 42a7 clrl %sp@- 42d1a: 486e fff8 pea %fp@(-8) 42d1e: 4eb9 0004 35bc jsr 435bc 42d24: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 42d2a: 4280 clrl %d0 42d2c: 246e fff4 moveal %fp@(-12),%a2 42d30: 4e5e unlk %fp <== NOT EXECUTED 00048c88 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 48c88: 4e56 fff8 linkw %fp,#-8 48c8c: 2f0b movel %a3,%sp@- 48c8e: 266e 000c moveal %fp@(12),%a3 48c92: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 48c94: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 48c96: 4aaa 0008 tstl %a2@(8) 48c9a: 670e beqs 48caa <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 48c9c: 2f0a movel %a2,%sp@- 48c9e: 4eb9 0004 a048 jsr 4a048 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 48ca4: 588f addql #4,%sp 48ca6: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 48caa: 302a 0032 movew %a2@(50),%d0 48cae: 5380 subql #1,%d0 48cb0: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 48cb4: 42a7 clrl %sp@- 48cb6: 486e fff8 pea %fp@(-8) 48cba: 4eb9 0004 9108 jsr 49108 48cc0: 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) ) { 48cc6: 2f0a movel %a2,%sp@- 48cc8: 4eb9 0004 91da jsr 491da 48cce: 4fef 000c lea %sp@(12),%sp 48cd2: 4a80 tstl %d0 48cd4: 663a bnes 48d10 <== NEVER TAKEN 48cd6: 4a6a 0032 tstw %a2@(50) 48cda: 6634 bnes 48d10 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 48cdc: 2079 0005 b5b4 moveal 5b5b4 ,%a0 48ce2: 2653 moveal %a3@,%a3 48ce4: b7e8 0004 cmpal %a0@(4),%a3 48ce8: 6604 bnes 48cee <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 48cea: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 48cee: 7004 moveq #4,%d0 48cf0: b0aa 0048 cmpl %a2@(72),%d0 48cf4: 6610 bnes 48d06 if ( the_jnode->info.sym_link.name ) 48cf6: 202a 004c movel %a2@(76),%d0 48cfa: 670a beqs 48d06 <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 48cfc: 2f00 movel %d0,%sp@- 48cfe: 4eb9 0004 8f80 jsr 48f80 48d04: 588f addql #4,%sp } free( the_jnode ); 48d06: 2f0a movel %a2,%sp@- 48d08: 4eb9 0004 8f80 jsr 48f80 48d0e: 588f addql #4,%sp } return 0; } 48d10: 246e fff0 moveal %fp@(-16),%a2 48d14: 4280 clrl %d0 48d16: 266e fff4 moveal %fp@(-12),%a3 48d1a: 4e5e unlk %fp ... 00048d20 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 48d20: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 48d22: 4e56 0000 linkw %fp,#0 48d26: 206e 000c moveal %fp@(12),%a0 48d2a: 2f0a movel %a2,%sp@- 48d2c: 246e 0008 moveal %fp@(8),%a2 IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 48d30: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 48d32: 2029 0048 movel %a1@(72),%d0 48d36: 5580 subql #2,%d0 48d38: b280 cmpl %d0,%d1 48d3a: 653e bcss 48d7a <== NEVER TAKEN 48d3c: 303b 0a08 movew %pc@(48d46 ,%d0:l:2),%d0 48d40: 48c0 extl %d0 48d42: 4efb 0802 jmp %pc@(48d46 ,%d0:l) 48d46: 000c 014 <== NOT EXECUTED 48d48: 0034 064 <== NOT EXECUTED 48d4a: 0026 046 <== NOT EXECUTED 48d4c: 001c 034 <== NOT EXECUTED 48d4e: 001c 034 <== NOT EXECUTED 48d50: 0026 046 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 48d52: 2029 0050 movel %a1@(80),%d0 48d56: 2169 004c 0016 movel %a1@(76),%a0@(22) 48d5c: 2140 001a movel %d0,%a0@(26) break; 48d60: 602a bras 48d8c case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 48d62: 2029 004c movel %a1@(76),%d0 48d66: 2229 0050 movel %a1@(80),%d1 48d6a: 6004 bras 48d70 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 48d6c: 4280 clrl %d0 <== NOT EXECUTED 48d6e: 4281 clrl %d1 <== NOT EXECUTED 48d70: 2140 001e movel %d0,%a0@(30) 48d74: 2141 0022 movel %d1,%a0@(34) break; 48d78: 6012 bras 48d8c default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 48d7a: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 48d80: 2040 moveal %d0,%a0 <== NOT EXECUTED 48d82: 70ff moveq #-1,%d0 <== NOT EXECUTED 48d84: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 48d8a: 6046 bras 48dd2 <== NOT EXECUTED * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 48d8c: 246a 0010 moveal %a2@(16),%a2 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 48d90: 4280 clrl %d0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 48d92: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 48d98: 2169 0034 0008 movel %a1@(52),%a0@(8) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 48d9e: 246a 0034 moveal %a2@(52),%a2 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 48da2: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 48da8: 2169 003c 0026 movel %a1@(60),%a0@(38) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 48dae: 2212 movel %a2@,%d1 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 48db0: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 48db6: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 48dbc: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 48dc2: 3169 003a 0014 movew %a1@(58),%a0@(20) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 48dc8: 2141 0004 movel %d1,%a0@(4) 48dcc: 20bc 0000 fffe movel #65534,%a0@ buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 48dd2: 246e fffc moveal %fp@(-4),%a2 48dd6: 4e5e unlk %fp ... 00042d34 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 42d34: 4e56 ffc4 linkw %fp,#-60 42d38: 2f03 movel %d3,%sp@- 42d3a: 262e 0010 movel %fp@(16),%d3 42d3e: 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 ); 42d40: 240e movel %fp,%d2 42d42: 0682 ffff ffc7 addil #-57,%d2 42d48: 2f03 movel %d3,%sp@- 42d4a: 4eb9 0005 28cc jsr 528cc 42d50: 588f addql #4,%sp 42d52: 486e fffc pea %fp@(-4) 42d56: 2f02 movel %d2,%sp@- 42d58: 2f00 movel %d0,%sp@- 42d5a: 2f03 movel %d3,%sp@- 42d5c: 4eb9 0004 d480 jsr 4d480 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 42d62: 2f2e 000c movel %fp@(12),%sp@- 42d66: 4eb9 0005 243c jsr 5243c if (info.sym_link.name == NULL) { 42d6c: 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); 42d70: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 42d74: 6608 bnes 42d7e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 42d76: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 42d7c: 6038 bras 42db6 <== 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( 42d7e: 486e ffe8 pea %fp@(-24) 42d82: 2f3c 0000 a1ff movel #41471,%sp@- 42d88: 2f02 movel %d2,%sp@- 42d8a: 4878 0004 pea 4 42d8e: 2f2e 0008 movel %fp@(8),%sp@- 42d92: 4eb9 0004 c974 jsr 4c974 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 42d98: 4fef 0014 lea %sp@(20),%sp 42d9c: 4a80 tstl %d0 42d9e: 6704 beqs 42da4 <== NEVER TAKEN 42da0: 4281 clrl %d1 42da2: 601a bras 42dbe free(info.sym_link.name); 42da4: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 42da8: 4eb9 0004 3534 jsr 43534 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 42dae: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 42db4: 588f addql #4,%sp <== NOT EXECUTED 42db6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42db8: 700c moveq #12,%d0 <== NOT EXECUTED 42dba: 72ff moveq #-1,%d1 <== NOT EXECUTED 42dbc: 2080 movel %d0,%a0@ <== NOT EXECUTED } return 0; } 42dbe: 242e ffbc movel %fp@(-68),%d2 42dc2: 2001 movel %d1,%d0 42dc4: 262e ffc0 movel %fp@(-64),%d3 42dc8: 4e5e unlk %fp <== NOT EXECUTED 00042dcc : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42dcc: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42dce: 4e56 ffd0 linkw %fp,#-48 42dd2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42dd6: 246e 000c moveal %fp@(12),%a2 42dda: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42dde: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42de0: b0ab 0048 cmpl %a3@(72),%d0 42de4: 6600 0086 bnew 42e6c if ( !node->info.hard_link.link_node ) 42de8: 282b 004c movel %a3@(76),%d4 42dec: 6610 bnes 42dfe <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42dee: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 42df4: 7216 moveq #22,%d1 <== NOT EXECUTED 42df6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42df8: 70ff moveq #-1,%d0 <== NOT EXECUTED 42dfa: 2081 movel %d1,%a0@ <== NOT EXECUTED 42dfc: 607e bras 42e7c <== NOT EXECUTED the_link = *loc; 42dfe: 4878 0014 pea 14 42e02: 240e movel %fp,%d2 42e04: 0682 ffff ffe4 addil #-28,%d2 42e0a: 2f0a movel %a2,%sp@- 42e0c: 2f02 movel %d2,%sp@- 42e0e: 4eb9 0005 1d70 jsr 51d70 the_link.node_access = node->info.hard_link.link_node; 42e14: 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) 42e18: 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 ); 42e1a: 2f02 movel %d2,%sp@- 42e1c: 4eb9 0004 ca88 jsr 4ca88 /* * 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) 42e22: 206b 004c moveal %a3@(76),%a0 42e26: 4281 clrl %d1 42e28: 4fef 0010 lea %sp@(16),%sp 42e2c: 3028 0032 movew %a0@(50),%d0 42e30: 3200 movew %d0,%d1 42e32: b881 cmpl %d1,%d4 42e34: 6618 bnes 42e4e { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 42e36: 2f02 movel %d2,%sp@- 42e38: 206e ffec moveal %fp@(-20),%a0 42e3c: 2f03 movel %d3,%sp@- 42e3e: 2068 0034 moveal %a0@(52),%a0 42e42: 4e90 jsr %a0@ if ( result != 0 ) 42e44: 508f addql #8,%sp 42e46: 4a80 tstl %d0 42e48: 6722 beqs 42e6c 42e4a: 70ff moveq #-1,%d0 42e4c: 602e bras 42e7c return -1; } else { node->info.hard_link.link_node->st_nlink --; 42e4e: 5380 subql #1,%d0 42e50: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 42e54: 42a7 clrl %sp@- 42e56: 486e fff8 pea %fp@(-8) 42e5a: 4eb9 0004 35bc jsr 435bc 42e60: 206b 004c moveal %a3@(76),%a0 42e64: 508f addql #8,%sp 42e66: 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 ); 42e6c: 2f0a movel %a2,%sp@- 42e6e: 206a 0008 moveal %a2@(8),%a0 42e72: 2f03 movel %d3,%sp@- 42e74: 2068 0034 moveal %a0@(52),%a0 42e78: 4e90 jsr %a0@ return result; 42e7a: 508f addql #8,%sp } 42e7c: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 42e82: 4e5e unlk %fp ... 00042e88 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42e88: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42e8a: 4e56 0000 linkw %fp,#0 42e8e: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42e92: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42e96: b0a8 0048 cmpl %a0@(72),%d0 42e9a: 6710 beqs 42eac <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42e9c: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 42ea2: 72ff moveq #-1,%d1 <== NOT EXECUTED 42ea4: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ea6: 7014 moveq #20,%d0 <== NOT EXECUTED 42ea8: 2080 movel %d0,%a0@ <== NOT EXECUTED 42eaa: 601c bras 42ec8 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 42eac: 4aa8 0058 tstl %a0@(88) 42eb0: 6610 bnes 42ec2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42eb2: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 42eb8: 72ff moveq #-1,%d1 <== NOT EXECUTED 42eba: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ebc: 7016 moveq #22,%d0 <== NOT EXECUTED 42ebe: 2080 movel %d0,%a0@ <== NOT EXECUTED 42ec0: 6006 bras 42ec8 <== 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; 42ec2: 42a8 0058 clrl %a0@(88) 42ec6: 4281 clrl %d1 return 0; } 42ec8: 2001 movel %d1,%d0 42eca: 4e5e unlk %fp ... 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 bb36 moveal 5bb36 ,%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 <== ALWAYS 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 9412 jsr 49412 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 423b8: 2079 0005 bb3a moveal 5bb3a ,%a0 423be: 4a88 tstl %a0 423c0: 6712 beqs 423d4 <== ALWAYS 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 bb35 tstb 5bb35 423da: 6618 bnes 423f4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 423dc: 4a39 0005 b57c tstb 5b57c 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 d318 jsr 4d318 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 bb35 tstb 5bb35 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 b4b0 movel 5b4b0 ,%sp@- 4240a: 4eb9 0004 5d00 jsr 45d00 <_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 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 42418: 4878 001a pea 1a <== NOT EXECUTED 4241c: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42422: 2f39 0005 b4b0 movel 5b4b0 ,%sp@- 42428: 2439 0005 cbb4 movel 5cbb4 ,%d2 4242e: 4eb9 0004 6788 jsr 46788 <_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 cbb4 movel %d0,5cbb4 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } ... 00041d3e : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 41d3e: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 41d42: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 41d46: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 41d4a: 4a8a tstl %a2 <== NOT EXECUTED 41d4c: 6700 0100 beqw 41e4e <== NOT EXECUTED return; if ( !print_handler ) 41d50: 2879 0005 c9ac moveal 5c9ac ,%a4 <== NOT EXECUTED 41d56: 4a8c tstl %a4 <== NOT EXECUTED 41d58: 6700 00f4 beqw 41e4e <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 41d5c: 70ff moveq #-1,%d0 <== NOT EXECUTED 41d5e: b08a cmpl %a2,%d0 <== NOT EXECUTED 41d60: 6616 bnes 41d78 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 41d62: 4ab9 0005 d1c4 tstl 5d1c4 <== NOT EXECUTED 41d68: 6700 00e4 beqw 41e4e <== NOT EXECUTED 41d6c: 47f9 0005 d1c0 lea 5d1c0 ,%a3 <== NOT EXECUTED 41d72: 4284 clrl %d4 <== NOT EXECUTED 41d74: 95ca subal %a2,%a2 <== NOT EXECUTED 41d76: 6008 bras 41d80 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 41d78: 282a 00fe movel %a2@(254),%d4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 41d7c: 47ea 00be lea %a2@(190),%a3 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 41d80: 2613 movel %a3@,%d3 <== NOT EXECUTED 41d82: 0683 ffff fff0 addil #-16,%d3 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 41d88: 242b 0004 movel %a3@(4),%d2 <== NOT EXECUTED 41d8c: 0682 0000 0010 addil #16,%d2 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 41d92: 2f03 movel %d3,%sp@- <== NOT EXECUTED 41d94: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d96: 4eb9 0004 1d0e jsr 41d0e <== NOT EXECUTED if ( high_water_mark ) 41d9c: 508f addql #8,%sp <== NOT EXECUTED 41d9e: 4a80 tstl %d0 <== NOT EXECUTED 41da0: 6604 bnes 41da6 <== NOT EXECUTED 41da2: 4282 clrl %d2 <== NOT EXECUTED 41da4: 6004 bras 41daa <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 41da6: d483 addl %d3,%d2 <== NOT EXECUTED 41da8: 9480 subl %d0,%d2 <== NOT EXECUTED else used = 0; if ( the_thread ) { 41daa: 4a8a tstl %a2 <== NOT EXECUTED 41dac: 672c beqs 41dda <== NOT EXECUTED (*print_handler)( 41dae: 486e fffb pea %fp@(-5) <== NOT EXECUTED 41db2: 4878 0005 pea 5 <== NOT EXECUTED 41db6: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41dba: 4eb9 0004 5104 jsr 45104 <== NOT EXECUTED 41dc0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41dc2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41dc6: 4879 0005 a3c6 pea 5a3c6 <== NOT EXECUTED 41dcc: 2f39 0005 c9a8 movel 5c9a8 ,%sp@- <== NOT EXECUTED 41dd2: 4e94 jsr %a4@ <== NOT EXECUTED 41dd4: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 41dd8: 6016 bras 41df0 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 41dda: 4878 ffff pea ffffffff <== NOT EXECUTED 41dde: 4879 0005 a3d3 pea 5a3d3 <== NOT EXECUTED 41de4: 2f39 0005 c9a8 movel 5c9a8 ,%sp@- <== NOT EXECUTED 41dea: 4e94 jsr %a4@ <== NOT EXECUTED 41dec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 41df0: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED 41df4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 41df6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 41df8: 2013 movel %a3@,%d0 <== NOT EXECUTED 41dfa: 5380 subql #1,%d0 <== NOT EXECUTED 41dfc: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 41e00: 2f08 movel %a0,%sp@- <== NOT EXECUTED 41e02: 4879 0005 a3e1 pea 5a3e1 <== NOT EXECUTED 41e08: 2f39 0005 c9a8 movel 5c9a8 ,%sp@- <== NOT EXECUTED 41e0e: 2079 0005 c9ac moveal 5c9ac ,%a0 <== NOT EXECUTED 41e14: 4e90 jsr %a0@ <== NOT EXECUTED 41e16: 2079 0005 c9ac moveal 5c9ac ,%a0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 41e1c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 41e20: 4ab9 0005 c9a4 tstl 5c9a4 <== NOT EXECUTED 41e26: 6612 bnes 41e3a <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 41e28: 4879 0005 a3ff pea 5a3ff <== NOT EXECUTED 41e2e: 2f39 0005 c9a8 movel 5c9a8 ,%sp@- <== NOT EXECUTED 41e34: 4e90 jsr %a0@ <== NOT EXECUTED 41e36: 508f addql #8,%sp <== NOT EXECUTED 41e38: 6014 bras 41e4e <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 41e3a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41e3c: 4879 0005 a40c pea 5a40c <== NOT EXECUTED 41e42: 2f39 0005 c9a8 movel 5c9a8 ,%sp@- <== NOT EXECUTED 41e48: 4e90 jsr %a0@ <== NOT EXECUTED 41e4a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 41e4e: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 41e54: 4e5e unlk %fp <== NOT EXECUTED 00042066 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 42066: 4e56 0000 linkw %fp,#0 static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 4206a: 4ab9 0005 c9a4 tstl 5c9a4 42070: 6656 bnes 420c8 42072: 41f9 0005 d1b0 lea 5d1b0 ,%a0 42078: 4280 clrl %d0 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 4207a: 43f9 0005 a544 lea 5a544 ,%a1 42080: 7203 moveq #3,%d1 42082: c280 andl %d0,%d1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 42084: 5280 addql #1,%d0 p[i] = pattern[ i%4 ]; 42086: 20f1 1c00 movel %a1@(00000000,%d1:l:4),%a0@+ /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 4208a: 7204 moveq #4,%d1 4208c: b280 cmpl %d0,%d1 4208e: 66f0 bnes 42080 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 42090: 2039 0005 d33c movel 5d33c <_CPU_Interrupt_stack_low>,%d0 42096: 6728 beqs 420c0 <== NEVER TAKEN 42098: 2239 0005 d2e0 movel 5d2e0 <_CPU_Interrupt_stack_high>,%d1 4209e: 6720 beqs 420c0 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 420a0: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420a2: 2f01 movel %d1,%sp@- 420a4: 4878 00a5 pea a5 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 420a8: 23c0 0005 d1c4 movel %d0,5d1c4 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420ae: 2f00 movel %d0,%sp@- * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 420b0: 23c1 0005 d1c0 movel %d1,5d1c0 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 420b6: 4eb9 0004 d82c jsr 4d82c 420bc: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 420c0: 7001 moveq #1,%d0 420c2: 23c0 0005 c9a4 movel %d0,5c9a4 } 420c8: 4e5e unlk %fp <== NOT EXECUTED 00041d0e : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 41d0e: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 41d10: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 41d14: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 41d18: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 41d1c: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 41d20: d088 addl %a0,%d0 <== NOT EXECUTED 41d22: 6010 bras 41d34 <== NOT EXECUTED if (*base != U32_PATTERN) 41d24: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 41d2a: b290 cmpl %a0@,%d1 <== NOT EXECUTED 41d2c: 6704 beqs 41d32 <== NOT EXECUTED return (void *) base; 41d2e: 2008 movel %a0,%d0 <== NOT EXECUTED 41d30: 6008 bras 41d3a <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 41d32: 5888 addql #4,%a0 <== NOT EXECUTED 41d34: b088 cmpl %a0,%d0 <== NOT EXECUTED 41d36: 62ec bhis 41d24 <== NOT EXECUTED 41d38: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 41d3a: 4e5e unlk %fp <== NOT EXECUTED 00041ed2 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 41ed2: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 41ed6: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 41eda: 4879 0005 a473 pea 5a473 <== NOT EXECUTED 41ee0: 45f9 0004 3124 lea 43124 ,%a2 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 41ee6: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 41eea: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 41eee: 286b 00c2 moveal %a3@(194),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 41ef2: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 41ef4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 41ef6: 4879 0005 a483 pea 5a483 <== NOT EXECUTED 41efc: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 41efe: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 41f02: 4879 0005 a4a0 pea 5a4a0 <== NOT EXECUTED 41f08: 4e92 jsr %a2@ <== NOT EXECUTED printk( 41f0a: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 41f0e: 4879 0005 a4b2 pea 5a4b2 <== NOT EXECUTED 41f14: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 41f16: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 41f1a: 4878 0020 pea 20 <== NOT EXECUTED 41f1e: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 41f22: 4eb9 0004 5104 jsr 45104 <== NOT EXECUTED 41f28: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 41f2c: 2e80 movel %d0,%sp@ <== NOT EXECUTED 41f2e: 4879 0005 a4c6 pea 5a4c6 <== NOT EXECUTED 41f34: 4e92 jsr %a2@ <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 41f36: 202b 00be movel %a3@(190),%d0 <== NOT EXECUTED 41f3a: 206b 00c2 moveal %a3@(194),%a0 <== NOT EXECUTED 41f3e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 41f42: 2f08 movel %a0,%sp@- <== NOT EXECUTED 41f44: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f46: 4879 0005 a4dc pea 5a4dc <== NOT EXECUTED 41f4c: 4e92 jsr %a2@ <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 41f4e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 41f52: 4a02 tstb %d2 <== NOT EXECUTED 41f54: 6618 bnes 41f6e <== NOT EXECUTED printk( 41f56: 486c 0018 pea %a4@(24) <== NOT EXECUTED 41f5a: 486c 0008 pea %a4@(8) <== NOT EXECUTED 41f5e: 4878 0010 pea 10 <== NOT EXECUTED 41f62: 4879 0005 a50d pea 5a50d <== NOT EXECUTED 41f68: 4e92 jsr %a2@ <== NOT EXECUTED 41f6a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 41f6e: 4878 0081 pea 81 <== NOT EXECUTED 41f72: 4eb9 0004 5988 jsr 45988 <== NOT EXECUTED 0004589c <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 4589c: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 458a0: 2039 0005 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0 458a6: 5280 addql #1,%d0 458a8: 206e 0008 moveal %fp@(8),%a0 458ac: 23c0 0005 cd08 movel %d0,5cd08 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 458b2: 42a7 clrl %sp@- 458b4: 2f28 0008 movel %a0@(8),%sp@- 458b8: 4868 0010 pea %a0@(16) 458bc: 4eb9 0004 5ac8 jsr 45ac8 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 458c2: 4fef 000c lea %sp@(12),%sp } 458c6: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 458c8: 4ef9 0004 6ce2 jmp 46ce2 <_Thread_Enable_dispatch> ... 000477f8 <_CORE_RWLock_Obtain_for_reading>: * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 477f8: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 477fe: 4e56 ffe8 linkw %fp,#-24 47802: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 47806: 246e 0008 moveal %fp@(8),%a2 4780a: 282e 000c movel %fp@(12),%d4 4780e: 262e 0014 movel %fp@(20),%d3 47812: 1a2e 0013 moveb %fp@(19),%d5 ISR_Level level; Thread_Control *executing = _Thread_Executing; 47816: 2679 0005 f766 moveal 5f766 <_Thread_Executing>,%a3 * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 4781c: 40c2 movew %sr,%d2 4781e: 8082 orl %d2,%d0 47820: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 47822: 202a 0044 movel %a2@(68),%d0 47826: 6708 beqs 47830 <_CORE_RWLock_Obtain_for_reading+0x38> 47828: 7201 moveq #1,%d1 4782a: b280 cmpl %d0,%d1 4782c: 662a bnes 47858 <_CORE_RWLock_Obtain_for_reading+0x60> 4782e: 600e bras 4783e <_CORE_RWLock_Obtain_for_reading+0x46> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 47830: 7001 moveq #1,%d0 the_rwlock->number_of_readers += 1; 47832: 52aa 0048 addql #1,%a2@(72) */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 47836: 2540 0044 movel %d0,%a2@(68) the_rwlock->number_of_readers += 1; _ISR_Enable( level ); 4783a: 46c2 movew %d2,%sr 4783c: 6014 bras 47852 <_CORE_RWLock_Obtain_for_reading+0x5a> executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 4783e: 2f0a movel %a2,%sp@- 47840: 4eb9 0004 9300 jsr 49300 <_Thread_queue_First> if ( !waiter ) { 47846: 588f addql #4,%sp 47848: 4a80 tstl %d0 4784a: 660c bnes 47858 <_CORE_RWLock_Obtain_for_reading+0x60><== NEVER TAKEN the_rwlock->number_of_readers += 1; 4784c: 52aa 0048 addql #1,%a2@(72) _ISR_Enable( level ); 47850: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 47852: 42ab 0034 clrl %a3@(52) return; 47856: 6046 bras 4789e <_CORE_RWLock_Obtain_for_reading+0xa6> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 47858: 4a05 tstb %d5 4785a: 660a bnes 47866 <_CORE_RWLock_Obtain_for_reading+0x6e> _ISR_Enable( level ); 4785c: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4785e: 7202 moveq #2,%d1 47860: 2741 0034 movel %d1,%a3@(52) 47864: 6038 bras 4789e <_CORE_RWLock_Obtain_for_reading+0xa6> 47866: 7001 moveq #1,%d0 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; 47868: 2744 0020 movel %d4,%a3@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4786c: 42ab 0034 clrl %a3@(52) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 47870: 274a 0044 movel %a2,%a3@(68) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 47874: 42ab 0030 clrl %a3@(48) 47878: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 4787c: 46c2 movew %d2,%sr _Thread_queue_Enqueue_with_handler( 4787e: 2d43 000c movel %d3,%fp@(12) 47882: 223c 0004 79e8 movel #293352,%d1 47888: 2d4a 0008 movel %a2,%fp@(8) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4788c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 47892: 2d41 0010 movel %d1,%fp@(16) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 47896: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 47898: 4ef9 0004 9000 jmp 49000 <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4789e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 478a4: 4e5e unlk %fp <== NOT EXECUTED 00047934 <_CORE_RWLock_Release>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 47934: 223c 0000 0700 movel #1792,%d1 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 4793a: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 4793e: 2079 0005 f766 moveal 5f766 <_Thread_Executing>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 47944: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47948: 246e 0008 moveal %fp@(8),%a2 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 4794c: 40c0 movew %sr,%d0 4794e: 8280 orl %d0,%d1 47950: 46c1 movew %d1,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 47952: 222a 0044 movel %a2@(68),%d1 47956: 660a bnes 47962 <_CORE_RWLock_Release+0x2e> _ISR_Enable( level ); 47958: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4795a: 7002 moveq #2,%d0 4795c: 2140 0034 movel %d0,%a0@(52) return CORE_RWLOCK_SUCCESSFUL; 47960: 6078 bras 479da <_CORE_RWLock_Release+0xa6> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 47962: 7401 moveq #1,%d2 47964: b481 cmpl %d1,%d2 47966: 6610 bnes 47978 <_CORE_RWLock_Release+0x44> the_rwlock->number_of_readers -= 1; 47968: 222a 0048 movel %a2@(72),%d1 4796c: 5381 subql #1,%d1 4796e: 2541 0048 movel %d1,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 47972: 6704 beqs 47978 <_CORE_RWLock_Release+0x44> /* must be unlocked again */ _ISR_Enable( level ); 47974: 46c0 movew %d0,%sr return CORE_RWLOCK_SUCCESSFUL; 47976: 6062 bras 479da <_CORE_RWLock_Release+0xa6> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 47978: 42a8 0034 clrl %a0@(52) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 4797c: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 47980: 46c0 movew %d0,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 47982: 2f0a movel %a2,%sp@- 47984: 4eb9 0004 8ec0 jsr 48ec0 <_Thread_queue_Dequeue> if ( next ) { 4798a: 588f addql #4,%sp 4798c: 4a80 tstl %d0 4798e: 674a beqs 479da <_CORE_RWLock_Release+0xa6> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 47990: 7201 moveq #1,%d1 47992: 2040 moveal %d0,%a0 47994: b2a8 0030 cmpl %a0@(48),%d1 47998: 6608 bnes 479a2 <_CORE_RWLock_Release+0x6e> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 4799a: 7002 moveq #2,%d0 4799c: 2540 0044 movel %d0,%a2@(68) return CORE_RWLOCK_SUCCESSFUL; 479a0: 6038 bras 479da <_CORE_RWLock_Release+0xa6> /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 479a2: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 479a4: 52aa 0048 addql #1,%a2@(72) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 479a8: 49f9 0004 9300 lea 49300 <_Thread_queue_First>,%a4 if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 479ae: 47f9 0004 91d4 lea 491d4 <_Thread_queue_Extract>,%a3 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 479b4: 2541 0044 movel %d1,%a2@(68) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 479b8: 2f0a movel %a2,%sp@- 479ba: 4e94 jsr %a4@ if ( !next || 479bc: 588f addql #4,%sp 479be: 4a80 tstl %d0 479c0: 6718 beqs 479da <_CORE_RWLock_Release+0xa6> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 479c2: 7401 moveq #1,%d2 479c4: 2040 moveal %d0,%a0 479c6: b4a8 0030 cmpl %a0@(48),%d2 479ca: 670e beqs 479da <_CORE_RWLock_Release+0xa6> <== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 479cc: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 479d0: 2f00 movel %d0,%sp@- 479d2: 2f0a movel %a2,%sp@- 479d4: 4e93 jsr %a3@ } 479d6: 508f addql #8,%sp 479d8: 60de bras 479b8 <_CORE_RWLock_Release+0x84> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 479da: 4280 clrl %d0 479dc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 479e2: 4e5e unlk %fp ... 000479e8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 479e8: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 479ec: 486e fffc pea %fp@(-4) 479f0: 2f2e 0008 movel %fp@(8),%sp@- 479f4: 4eb9 0004 8b8c jsr 48b8c <_Thread_Get> switch ( location ) { 479fa: 508f addql #8,%sp 479fc: 4aae fffc tstl %fp@(-4) 47a00: 6618 bnes 47a1a <_CORE_RWLock_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 47a02: 2f00 movel %d0,%sp@- 47a04: 4eb9 0004 93e4 jsr 493e4 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47a0a: 588f addql #4,%sp 47a0c: 2039 0005 f6ac movel 5f6ac <_Thread_Dispatch_disable_level>,%d0 47a12: 5380 subql #1,%d0 47a14: 23c0 0005 f6ac movel %d0,5f6ac <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 47a1a: 4e5e unlk %fp ... 0004bfe8 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4bfe8: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4bfee: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4bff2: 2279 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4bff8: 48d7 001c moveml %d2-%d4,%sp@ 4bffc: 242e 000c movel %fp@(12),%d2 4c000: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4c004: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4c008: 206e 0008 moveal %fp@(8),%a0 4c00c: 282e 0018 movel %fp@(24),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4c010: 40c1 movew %sr,%d1 4c012: 8081 orl %d1,%d0 4c014: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4c016: 2028 0048 movel %a0@(72),%d0 4c01a: 5280 addql #1,%d0 4c01c: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4c020: 4aa8 0040 tstl %a0@(64) 4c024: 6626 bnes 4c04c <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4c026: b0a8 0044 cmpl %a0@(68),%d0 4c02a: 6620 bnes 4c04c <_CORE_barrier_Wait+0x64> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4c02c: 7001 moveq #1,%d0 4c02e: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4c032: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4c034: 2d44 0010 movel %d4,%fp@(16) 4c038: 2d42 000c movel %d2,%fp@(12) 4c03c: 2d48 0008 movel %a0,%fp@(8) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 4c040: 4cd7 001c moveml %sp@,%d2-%d4 4c044: 4e5e unlk %fp if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4c046: 4ef9 0004 bfb4 jmp 4bfb4 <_CORE_barrier_Release> 4c04c: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4c04e: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4c052: 2348 0044 movel %a0,%a1@(68) 4c056: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4c05a: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4c05c: 2d43 000c movel %d3,%fp@(12) 4c060: 203c 0004 7468 movel #291944,%d0 4c066: 2d48 0008 movel %a0,%fp@(8) 4c06a: 2d40 0010 movel %d0,%fp@(16) } 4c06e: 4cd7 001c moveml %sp@,%d2-%d4 4c072: 4e5e unlk %fp _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4c074: 4ef9 0004 717c jmp 4717c <_Thread_queue_Enqueue_with_handler> ... 00052088 <_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 ) { 52088: 4e56 ffe0 linkw %fp,#-32 5208c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 52090: 246e 0008 moveal %fp@(8),%a2 52094: 2a2e 000c movel %fp@(12),%d5 52098: 262e 0010 movel %fp@(16),%d3 5209c: 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 ) { 520a0: b6aa 004c cmpl %a2@(76),%d3 520a4: 6304 blss 520aa <_CORE_message_queue_Broadcast+0x22><== ALWAYS TAKEN 520a6: 7001 moveq #1,%d0 <== NOT EXECUTED 520a8: 6042 bras 520ec <_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 ) { 520aa: 4aaa 0048 tstl %a2@(72) 520ae: 6610 bnes 520c0 <_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))) { 520b0: 4282 clrl %d2 520b2: 283c 0005 439c movel #344988,%d4 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 520b8: 4bf9 0005 a3f4 lea 5a3f4 ,%a5 520be: 601a bras 520da <_CORE_message_queue_Broadcast+0x52> * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 520c0: 4294 clrl %a4@ 520c2: 6026 bras 520ea <_CORE_message_queue_Broadcast+0x62> 520c4: 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; 520c6: 5282 addql #1,%d2 520c8: 2f05 movel %d5,%sp@- 520ca: 2f2b 002c movel %a3@(44),%sp@- 520ce: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 520d0: 206b 0028 moveal %a3@(40),%a0 520d4: 4fef 000c lea %sp@(12),%sp 520d8: 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))) { 520da: 2f0a movel %a2,%sp@- 520dc: 2044 moveal %d4,%a0 520de: 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 = 520e0: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 520e2: 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 = 520e4: 4a80 tstl %d0 520e6: 66dc bnes 520c4 <_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; 520e8: 2882 movel %d2,%a4@ 520ea: 4280 clrl %d0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 520ec: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 520f2: 4e5e unlk %fp ... 0004dcf0 <_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)) { 4dcf0: 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 ) { 4dcf2: 4e56 fff4 linkw %fp,#-12 4dcf6: 222e 0014 movel %fp@(20),%d1 4dcfa: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4dcfe: 246e 0008 moveal %fp@(8),%a2 4dd02: 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)) { 4dd06: c081 andl %d1,%d0 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4dd08: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4dd0c: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4dd10: 2541 004c movel %d1,%a2@(76) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4dd14: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 4dd18: 42aa 0064 clrl %a2@(100) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4dd1c: 4a80 tstl %d0 4dd1e: 6604 bnes 4dd24 <_CORE_message_queue_Initialize+0x34> 4dd20: 2001 movel %d1,%d0 4dd22: 600c bras 4dd30 <_CORE_message_queue_Initialize+0x40> allocated_message_size += sizeof(uint32_t); 4dd24: 2001 movel %d1,%d0 4dd26: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4dd28: 76fc moveq #-4,%d3 4dd2a: c083 andl %d3,%d0 } if (allocated_message_size < maximum_message_size) 4dd2c: b280 cmpl %d0,%d1 4dd2e: 626e bhis 4dd9e <_CORE_message_queue_Initialize+0xae><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4dd30: 2600 movel %d0,%d3 4dd32: 0683 0000 0014 addil #20,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4dd38: 2203 movel %d3,%d1 4dd3a: 4c02 1800 mulsl %d2,%d1 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4dd3e: b081 cmpl %d1,%d0 4dd40: 625c bhis 4dd9e <_CORE_message_queue_Initialize+0xae><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dd42: 2f01 movel %d1,%sp@- 4dd44: 4eb9 0005 06b0 jsr 506b0 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dd4a: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dd4c: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dd50: 674c beqs 4dd9e <_CORE_message_queue_Initialize+0xae> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4dd52: 2f03 movel %d3,%sp@- 4dd54: 2f02 movel %d2,%sp@- 4dd56: 2f00 movel %d0,%sp@- 4dd58: 486a 0068 pea %a2@(104) 4dd5c: 4eb9 0005 265c jsr 5265c <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dd62: 4878 0006 pea 6 4dd66: 7001 moveq #1,%d0 4dd68: 206e 000c moveal %fp@(12),%a0 4dd6c: b090 cmpl %a0@,%d0 4dd6e: 57c0 seq %d0 4dd70: 4878 0080 pea 80 4dd74: 49c0 extbl %d0 4dd76: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4dd78: 41ea 0054 lea %a2@(84),%a0 4dd7c: 2f00 movel %d0,%sp@- 4dd7e: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4dd82: 41ea 0050 lea %a2@(80),%a0 4dd86: 2548 0058 movel %a0,%a2@(88) 4dd8a: 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; 4dd8c: 42aa 0054 clrl %a2@(84) 4dd90: 4eb9 0004 fbc4 jsr 4fbc4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dd96: 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( 4dd9a: 7001 moveq #1,%d0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dd9c: 6002 bras 4dda0 <_CORE_message_queue_Initialize+0xb0> 4dd9e: 4200 clrb %d0 } 4dda0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4dda6: 4e5e unlk %fp ... 0004ddac <_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 ); 4ddac: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ddb2: 4e56 ffe0 linkw %fp,#-32 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4ddb6: 2079 0006 6446 moveal 66446 <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ddbc: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4ddc0: 282e 000c movel %fp@(12),%d4 4ddc4: 242e 001c movel %fp@(28),%d2 4ddc8: 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; 4ddcc: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ddd0: 262e 0010 movel %fp@(16),%d3 4ddd4: 226e 0014 moveal %fp@(20),%a1 4ddd8: 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 ); 4dddc: 40c0 movew %sr,%d0 4ddde: 8280 orl %d0,%d1 4dde0: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dde2: 220a movel %a2,%d1 4dde4: 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)); 4ddea: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ddee: b28b cmpl %a3,%d1 4ddf0: 6700 00a6 beqw 4de98 <_CORE_message_queue_Seize+0xec> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4ddf4: 2853 moveal %a3@,%a4 the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4ddf6: 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; 4ddfa: 254c 0050 movel %a4,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4ddfe: 294d 0004 movel %a5,%a4@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4de02: 4a8b tstl %a3 4de04: 6700 0092 beqw 4de98 <_CORE_message_queue_Seize+0xec> the_message_queue->number_of_pending_messages -= 1; 4de08: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 4de0c: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4de0e: 2079 0006 6446 moveal 66446 <_Thread_Executing>,%a0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 4de14: 22ab 000c movel %a3@(12),%a1@ _Thread_Executing->Wait.count = _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 4de18: 240b movel %a3,%d2 4de1a: 0682 0000 0010 addil #16,%d2 if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4de20: 216b 0008 0024 movel %a3@(8),%a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4de26: 49f9 0005 5674 lea 55674 ,%a4 4de2c: 2f11 movel %a1@,%sp@- 4de2e: 2f02 movel %d2,%sp@- 4de30: 2f03 movel %d3,%sp@- 4de32: 4e94 jsr %a4@ * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4de34: 2f0a movel %a2,%sp@- 4de36: 4eb9 0004 f854 jsr 4f854 <_Thread_queue_Dequeue> if ( !the_thread ) { 4de3c: 4fef 0010 lea %sp@(16),%sp * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4de40: 2040 moveal %d0,%a0 if ( !the_thread ) { 4de42: 4a80 tstl %d0 4de44: 661a bnes 4de60 <_CORE_message_queue_Seize+0xb4> 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 ); 4de46: 45ea 0068 lea %a2@(104),%a2 4de4a: 2d4b 000c movel %a3,%fp@(12) 4de4e: 2d4a 0008 movel %a2,%fp@(8) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4de52: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4de58: 4e5e unlk %fp 4de5a: 4ef9 0004 dc2c jmp 4dc2c <_Chain_Append> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 4de60: 2028 0030 movel %a0@(48),%d0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 4de64: 2768 0024 0008 movel %a0@(36),%a3@(8) 4de6a: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4de6e: 2f00 movel %d0,%sp@- 4de70: 2f28 002c movel %a0@(44),%sp@- 4de74: 2f02 movel %d2,%sp@- 4de76: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 4de78: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 4de7e: 4fef 000c lea %sp@(12),%sp 4de82: 2d4b 000c movel %a3,%fp@(12) 4de86: 2d4a 0008 movel %a2,%fp@(8) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4de8a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4de90: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 4de92: 4ef9 0005 269c jmp 5269c <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 4de98: 4a05 tstb %d5 4de9a: 6612 bnes 4deae <_CORE_message_queue_Seize+0x102> _ISR_Enable( level ); 4de9c: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4de9e: 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 ); } 4dea0: 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; 4dea6: 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 ); } 4deaa: 4e5e unlk %fp 4deac: 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; 4deae: 7201 moveq #1,%d1 4deb0: 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; 4deb4: 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; 4deb8: 2143 002c movel %d3,%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; 4debc: 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; 4dec0: 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 ); 4dec4: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4dec6: 4bf9 0004 fc80 lea 4fc80 <_Thread_queue_Timeout>,%a5 4decc: 2d42 000c movel %d2,%fp@(12) 4ded0: 2d4d 0010 movel %a5,%fp@(16) 4ded4: 2d4a 0008 movel %a2,%fp@(8) } 4ded8: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4dede: 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 ); 4dee0: 4ef9 0004 f994 jmp 4f994 <_Thread_queue_Enqueue_with_handler> ... 00045a20 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 45a20: 4e56 0000 linkw %fp,#0 45a24: 202e 0010 movel %fp@(16),%d0 45a28: 2f0a movel %a2,%sp@- 45a2a: 246e 0008 moveal %fp@(8),%a2 45a2e: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 45a30: 2239 0005 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 45a36: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 45a38: 4a81 tstl %d1 45a3a: 671c beqs 45a58 <_CORE_mutex_Seize+0x38> 45a3c: 4a00 tstb %d0 45a3e: 6718 beqs 45a58 <_CORE_mutex_Seize+0x38> <== NEVER TAKEN 45a40: 7001 moveq #1,%d0 45a42: b0b9 0005 ce90 cmpl 5ce90 <_System_state_Current>,%d0 45a48: 640e bccs 45a58 <_CORE_mutex_Seize+0x38> 45a4a: 4878 0013 pea 13 45a4e: 42a7 clrl %sp@- 45a50: 42a7 clrl %sp@- 45a52: 4eb9 0004 5fd8 jsr 45fd8 <_Internal_error_Occurred> 45a58: 486e 0018 pea %fp@(24) 45a5c: 2f0a movel %a2,%sp@- 45a5e: 4eb9 0004 a0e4 jsr 4a0e4 <_CORE_mutex_Seize_interrupt_trylock> 45a64: 508f addql #8,%sp 45a66: 4a80 tstl %d0 45a68: 6750 beqs 45aba <_CORE_mutex_Seize+0x9a> 45a6a: 4a02 tstb %d2 45a6c: 6614 bnes 45a82 <_CORE_mutex_Seize+0x62> 45a6e: 202e 0018 movel %fp@(24),%d0 45a72: 46c0 movew %d0,%sr 45a74: 2079 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a0 45a7a: 7001 moveq #1,%d0 45a7c: 2140 0034 movel %d0,%a0@(52) 45a80: 6038 bras 45aba <_CORE_mutex_Seize+0x9a> 45a82: 2039 0005 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0 45a88: 5280 addql #1,%d0 45a8a: 2079 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a0 45a90: 216e 000c 0020 movel %fp@(12),%a0@(32) 45a96: 23c0 0005 cd08 movel %d0,5cd08 <_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; 45a9c: 7001 moveq #1,%d0 45a9e: 214a 0044 movel %a2,%a0@(68) 45aa2: 2540 0030 movel %d0,%a2@(48) 45aa6: 202e 0018 movel %fp@(24),%d0 45aaa: 46c0 movew %d0,%sr 45aac: 2f2e 0014 movel %fp@(20),%sp@- 45ab0: 2f0a movel %a2,%sp@- 45ab2: 4eb9 0004 59bc jsr 459bc <_CORE_mutex_Seize_interrupt_blocking> 45ab8: 508f addql #8,%sp } 45aba: 242e fff8 movel %fp@(-8),%d2 45abe: 246e fffc moveal %fp@(-4),%a2 45ac2: 4e5e unlk %fp ... 00045c14 <_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 ) { 45c14: 4e56 0000 linkw %fp,#0 45c18: 2f0a movel %a2,%sp@- 45c1a: 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)) ) { 45c1e: 2f0a movel %a2,%sp@- 45c20: 4eb9 0004 703c jsr 4703c <_Thread_queue_Dequeue> 45c26: 588f addql #4,%sp 45c28: 4a80 tstl %d0 45c2a: 6704 beqs 45c30 <_CORE_semaphore_Surrender+0x1c> 45c2c: 4280 clrl %d0 45c2e: 6024 bras 45c54 <_CORE_semaphore_Surrender+0x40> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 45c30: 203c 0000 0700 movel #1792,%d0 45c36: 40c1 movew %sr,%d1 45c38: 8081 orl %d1,%d0 45c3a: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 45c3c: 202a 0048 movel %a2@(72),%d0 45c40: b0aa 0040 cmpl %a2@(64),%d0 45c44: 6504 bcss 45c4a <_CORE_semaphore_Surrender+0x36> <== ALWAYS TAKEN 45c46: 7004 moveq #4,%d0 <== NOT EXECUTED 45c48: 6008 bras 45c52 <_CORE_semaphore_Surrender+0x3e> <== NOT EXECUTED the_semaphore->count += 1; 45c4a: 5280 addql #1,%d0 45c4c: 2540 0048 movel %d0,%a2@(72) 45c50: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 45c52: 46c1 movew %d1,%sr } return status; } 45c54: 246e fffc moveal %fp@(-4),%a2 45c58: 4e5e unlk %fp <== NOT EXECUTED 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 cdc2 moveal 5cdc2 <_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 010a moveal %a2@(266),%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> <== NEVER 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> *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> * * 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 d556 movel %d2,5d556 <_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 cde0 pea 5cde0 <_Watchdog_Ticks_chain> 44a7e: 4eb9 0004 7c50 jsr 47c50 <_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 7510 jsr 47510 <_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 d556 movel 5d556 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 44aa8: 42b9 0005 d556 clrl 5d556 <_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> * 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 6798 jmp 46798 <_Thread_blocking_operation_Cancel> } 44ad0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 44ad6: 4e5e unlk %fp ... 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 010a moveal %a2@(266),%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> /* * 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 cda2 moveal 5cda2 <_ISR_Nest_level>,%a1 44b68: 4a89 tstl %a1 44b6a: 674a beqs 44bb6 <_Event_Surrender+0x86> 44b6c: b5f9 0005 cdc2 cmpal 5cdc2 <_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 d556 moveal 5d556 <_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> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 44b80: 2279 0005 d556 moveal 5d556 <_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> <== NEVER 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 d556 movel %d0,5d556 <_Event_Sync_state> } _ISR_Enable( level ); 44bb2: 46c1 movew %d1,%sr return; 44bb4: 6076 bras 44c2c <_Event_Surrender+0xfc> } /* * 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> <== NEVER 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 6928 lea 46928 <_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> 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 7d6c jsr 47d6c <_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> _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 ... 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 6d08 jsr 46d08 <_Thread_Get> switch ( location ) { 44c4e: 508f addql #8,%sp 44c50: 4aae fffc tstl %fp@(-4) 44c54: 6656 bnes 44cac <_Event_Timeout+0x74> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 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 cdc2 cmpl 5cdc2 <_Thread_Executing>,%d0 44c6e: 6614 bnes 44c84 <_Event_Timeout+0x4c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 44c70: 2239 0005 d556 movel 5d556 <_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 d556 movel %d1,5d556 <_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 6928 jsr 46928 <_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 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0 44ca4: 5380 subql #1,%d0 44ca6: 23c0 0005 cd08 movel %d0,5cd08 <_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 <== NOT EXECUTED 0004a2b0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4a2b0: 4e56 ffc8 linkw %fp,#-56 4a2b4: 202e 000c movel %fp@(12),%d0 4a2b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a2bc: 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; 4a2c0: 2840 moveal %d0,%a4 4a2c2: 588c addql #4,%a4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4a2c4: 222e 0010 movel %fp@(16),%d1 4a2c8: 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; 4a2cc: 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; 4a2d0: 2e2a 0010 movel %a2@(16),%d7 uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4a2d4: b08c cmpl %a4,%d0 4a2d6: 6200 0120 bhiw 4a3f8 <_Heap_Allocate_aligned_with_boundary+0x148> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4a2da: 4a85 tstl %d5 4a2dc: 670c beqs 4a2ea <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4a2de: b085 cmpl %d5,%d0 4a2e0: 6200 0116 bhiw 4a3f8 <_Heap_Allocate_aligned_with_boundary+0x148> return NULL; } if ( alignment == 0 ) { 4a2e4: 4a81 tstl %d1 4a2e6: 6602 bnes 4a2ea <_Heap_Allocate_aligned_with_boundary+0x3a> 4a2e8: 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; 4a2ea: 2407 movel %d7,%d2 4a2ec: 5e82 addql #7,%d2 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4a2ee: 4283 clrl %d3 4a2f0: 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; 4a2f2: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4a2f6: 7404 moveq #4,%d2 4a2f8: 9480 subl %d0,%d2 4a2fa: 2d42 fff4 movel %d2,%fp@(-12) 4a2fe: 6000 00c6 braw 4a3c6 <_Heap_Allocate_aligned_with_boundary+0x116> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4a302: 2628 0004 movel %a0@(4),%d3 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4a306: 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 ) { 4a308: b9c3 cmpal %d3,%a4 4a30a: 6400 00b6 bccw 4a3c2 <_Heap_Allocate_aligned_with_boundary+0x112> 4a30e: 43e8 0008 lea %a0@(8),%a1 if ( alignment == 0 ) { 4a312: 4a81 tstl %d1 4a314: 6606 bnes 4a31c <_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; 4a316: 2409 movel %a1,%d2 4a318: 6000 00a4 braw 4a3be <_Heap_Allocate_aligned_with_boundary+0x10e> uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4a31c: 74fe moveq #-2,%d2 4a31e: 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; 4a320: 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; 4a324: 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; 4a326: 282e fff8 movel %fp@(-8),%d4 4a32a: 988b subl %a3,%d4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4a32c: 242e fff4 movel %fp@(-12),%d2 4a330: d483 addl %d3,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4a332: 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; 4a334: d684 addl %d4,%d3 4a336: 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; 4a33a: 2d4b fff0 movel %a3,%fp@(-16) 4a33e: 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 ) { 4a340: b682 cmpl %d2,%d3 4a342: 640a bccs 4a34e <_Heap_Allocate_aligned_with_boundary+0x9e> 4a344: 2803 movel %d3,%d4 4a346: 4c41 4002 remul %d1,%d2,%d4 4a34a: 9682 subl %d2,%d3 4a34c: 2403 movel %d3,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4a34e: 4a85 tstl %d5 4a350: 674e beqs 4a3a0 <_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; 4a352: 2802 movel %d2,%d4 4a354: d880 addl %d0,%d4 4a356: 2604 movel %d4,%d3 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4a358: 47f1 0800 lea %a1@(00000000,%d0:l),%a3 4a35c: 4c45 3006 remul %d5,%d6,%d3 4a360: 2d4b fffc movel %a3,%fp@(-4) 4a364: 2604 movel %d4,%d3 4a366: 9686 subl %d6,%d3 4a368: 2c03 movel %d3,%d6 4a36a: 266e fff0 moveal %fp@(-16),%a3 4a36e: 6020 bras 4a390 <_Heap_Allocate_aligned_with_boundary+0xe0> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4a370: bcae fffc cmpl %fp@(-4),%d6 4a374: 654c bcss 4a3c2 <_Heap_Allocate_aligned_with_boundary+0x112> 4a376: 2803 movel %d3,%d4 4a378: 4c41 4002 remul %d1,%d2,%d4 4a37c: 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; 4a37e: 2803 movel %d3,%d4 4a380: d880 addl %d0,%d4 4a382: 2403 movel %d3,%d2 4a384: 2604 movel %d4,%d3 4a386: 4c45 3006 remul %d5,%d6,%d3 4a38a: 2604 movel %d4,%d3 4a38c: 9686 subl %d6,%d3 4a38e: 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; 4a390: 2606 movel %d6,%d3 4a392: 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 ) { 4a394: bc82 cmpl %d2,%d6 4a396: 6304 blss 4a39c <_Heap_Allocate_aligned_with_boundary+0xec> 4a398: b886 cmpl %d6,%d4 4a39a: 62d4 bhis 4a370 <_Heap_Allocate_aligned_with_boundary+0xc0> 4a39c: 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 ) { 4a3a0: b3c2 cmpal %d2,%a1 4a3a2: 621e bhis 4a3c2 <_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; 4a3a4: 2802 movel %d2,%d4 4a3a6: 327c fff8 moveaw #-8,%a1 4a3aa: 93c8 subal %a0,%a1 4a3ac: d3c2 addal %d2,%a1 4a3ae: 4c47 4003 remul %d7,%d3,%d4 4a3b2: 93c3 subal %d3,%a1 if ( free_size >= min_block_size || free_size == 0 ) { 4a3b4: b3ee fff0 cmpal %fp@(-16),%a1 4a3b8: 6404 bccs 4a3be <_Heap_Allocate_aligned_with_boundary+0x10e> 4a3ba: 4a89 tstl %a1 4a3bc: 6604 bnes 4a3c2 <_Heap_Allocate_aligned_with_boundary+0x112> boundary ); } } if ( alloc_begin != 0 ) { 4a3be: 4a82 tstl %d2 4a3c0: 6610 bnes 4a3d2 <_Heap_Allocate_aligned_with_boundary+0x122><== ALWAYS TAKEN break; } block = block->next; 4a3c2: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4a3c6: b5c8 cmpal %a0,%a2 4a3c8: 6600 ff38 bnew 4a302 <_Heap_Allocate_aligned_with_boundary+0x52> 4a3cc: 260d movel %a5,%d3 4a3ce: 4282 clrl %d2 4a3d0: 6018 bras 4a3ea <_Heap_Allocate_aligned_with_boundary+0x13a> if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4a3d2: 2f00 movel %d0,%sp@- 4a3d4: 260d movel %a5,%d3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4a3d6: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4a3da: 2f02 movel %d2,%sp@- 4a3dc: 2f08 movel %a0,%sp@- 4a3de: 2f0a movel %a2,%sp@- 4a3e0: 4eb9 0004 5ee2 jsr 45ee2 <_Heap_Block_allocate> 4a3e6: 4fef 0010 lea %sp@(16),%sp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4a3ea: b6aa 0044 cmpl %a2@(68),%d3 4a3ee: 6304 blss 4a3f4 <_Heap_Allocate_aligned_with_boundary+0x144> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4a3f0: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; 4a3f4: 2002 movel %d2,%d0 4a3f6: 6002 bras 4a3fa <_Heap_Allocate_aligned_with_boundary+0x14a> 4a3f8: 4280 clrl %d0 } 4a3fa: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4a400: 4e5e unlk %fp <== NOT EXECUTED 0004e530 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 4e530: 4e56 fff4 linkw %fp,#-12 4e534: 206e 0008 moveal %fp@(8),%a0 4e538: 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; 4e53c: 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; 4e540: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 4e544: 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; 4e548: b0a8 0018 cmpl %a0@(24),%d0 4e54c: 6508 bcss 4e556 <_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 ) { 4e54e: b280 cmpl %d0,%d1 4e550: 6304 blss 4e556 <_Heap_Extend+0x26> 4e552: 7001 moveq #1,%d0 4e554: 606c bras 4e5c2 <_Heap_Extend+0x92> return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 4e556: b280 cmpl %d0,%d1 4e558: 6704 beqs 4e55e <_Heap_Extend+0x2e> 4e55a: 7002 moveq #2,%d0 4e55c: 6064 bras 4e5c2 <_Heap_Extend+0x92> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 4e55e: 2200 movel %d0,%d1 4e560: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 4e564: 70f8 moveq #-8,%d0 4e566: 9089 subl %a1,%d0 4e568: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4e56a: 2600 movel %d0,%d3 4e56c: 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; 4e572: 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; 4e576: 246e 0014 moveal %fp@(20),%a2 4e57a: 9082 subl %d2,%d0 4e57c: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 4e57e: b0a8 0014 cmpl %a0@(20),%d0 4e582: 653c bcss 4e5c0 <_Heap_Extend+0x90> <== NEVER TAKEN uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 4e584: 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); 4e586: 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; 4e58a: 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 = 4e58e: 2228 0020 movel %a0@(32),%d1 4e592: 928a subl %a2,%d1 4e594: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 4e596: 214a 0024 movel %a2,%a0@(36) 4e59a: 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 = 4e59e: 7401 moveq #1,%d2 4e5a0: 8481 orl %d1,%d2 4e5a2: 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 )); 4e5a6: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 4e5aa: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 4e5ae: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 4e5b2: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 4e5b6: 2f08 movel %a0,%sp@- 4e5b8: 4eb9 0004 9978 jsr 49978 <_Heap_Free> 4e5be: 508f addql #8,%sp 4e5c0: 4280 clrl %d0 } return HEAP_EXTEND_SUCCESSFUL; } 4e5c2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e5c8: 4e5e unlk %fp <== NOT EXECUTED 000598a4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 598a4: 4e56 0000 linkw %fp,#0 598a8: 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 ) 598ac: 2040 moveal %d0,%a0 598ae: 5188 subql #8,%a0 598b0: 226e 0008 moveal %fp@(8),%a1 598b4: 2f02 movel %d2,%sp@- 598b6: 2400 movel %d0,%d2 598b8: 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; 598be: 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 ) 598c2: 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 598c4: b488 cmpl %a0,%d2 598c6: 6244 bhis 5990c <_Heap_Size_of_alloc_area+0x68> 598c8: b1e9 0024 cmpal %a1@(36),%a0 598cc: 53c1 sls %d1 598ce: 49c1 extbl %d1 598d0: 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 ) ) { 598d2: 4a01 tstb %d1 598d4: 6736 beqs 5990c <_Heap_Size_of_alloc_area+0x68> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 598d6: 72fe moveq #-2,%d1 598d8: c2a8 0004 andl %a0@(4),%d1 598dc: 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 598de: b488 cmpl %a0,%d2 598e0: 622a bhis 5990c <_Heap_Size_of_alloc_area+0x68> <== NEVER TAKEN 598e2: b1e9 0024 cmpal %a1@(36),%a0 598e6: 53c1 sls %d1 598e8: 49c1 extbl %d1 598ea: 4481 negl %d1 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 598ec: 4a01 tstb %d1 598ee: 671c beqs 5990c <_Heap_Size_of_alloc_area+0x68> <== NEVER TAKEN 598f0: 7201 moveq #1,%d1 598f2: c2a8 0004 andl %a0@(4),%d1 598f6: 4a01 tstb %d1 598f8: 6712 beqs 5990c <_Heap_Size_of_alloc_area+0x68> <== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 598fa: 7204 moveq #4,%d1 598fc: 9280 subl %d0,%d1 598fe: 2001 movel %d1,%d0 59900: d088 addl %a0,%d0 59902: 226e 0010 moveal %fp@(16),%a1 59906: 2280 movel %d0,%a1@ 59908: 7001 moveq #1,%d0 return true; 5990a: 6002 bras 5990e <_Heap_Size_of_alloc_area+0x6a> 5990c: 4200 clrb %d0 } 5990e: 241f movel %sp@+,%d2 59910: 4e5e unlk %fp <== NOT EXECUTED 0004699c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4699c: 4e56 ffd0 linkw %fp,#-48 469a0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 469a4: 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; 469a8: 47fa 031a lea %pc@(46cc4 <_Heap_Walk_print>),%a3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 469ac: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 469b0: 2c2c 0010 movel %a4@(16),%d6 uintptr_t const min_block_size = heap->min_block_size; 469b4: 262c 0014 movel %a4@(20),%d3 Heap_Block *const last_block = heap->last_block; 469b8: 2a2c 0024 movel %a4@(36),%d5 Heap_Block *block = heap->first_block; 469bc: 246c 0020 moveal %a4@(32),%a2 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 469c0: 4a2e 0013 tstb %fp@(19) 469c4: 6604 bnes 469ca <_Heap_Walk+0x2e> 469c6: 47fa ffcc lea %pc@(46994 <_Heap_Walk_print_nothing>),%a3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 469ca: 7003 moveq #3,%d0 469cc: b0b9 0005 f228 cmpl 5f228 <_System_state_Current>,%d0 469d2: 6600 02da bnew 46cae <_Heap_Walk+0x312> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 469d6: 2f2c 000c movel %a4@(12),%sp@- 469da: 2f2c 0008 movel %a4@(8),%sp@- 469de: 2f05 movel %d5,%sp@- 469e0: 2f0a movel %a2,%sp@- 469e2: 2f2c 001c movel %a4@(28),%sp@- 469e6: 2f2c 0018 movel %a4@(24),%sp@- 469ea: 2f03 movel %d3,%sp@- 469ec: 2f06 movel %d6,%sp@- 469ee: 4879 0005 b3a2 pea 5b3a2 469f4: 42a7 clrl %sp@- 469f6: 2f02 movel %d2,%sp@- 469f8: 4e93 jsr %a3@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 469fa: 4fef 002c lea %sp@(44),%sp 469fe: 4a86 tstl %d6 46a00: 6608 bnes 46a0a <_Heap_Walk+0x6e> (*printer)( source, true, "page size is zero\n" ); 46a02: 4879 0005 b433 pea 5b433 46a08: 607e bras 46a88 <_Heap_Walk+0xec> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 46a0a: 7003 moveq #3,%d0 46a0c: c086 andl %d6,%d0 46a0e: 670c beqs 46a1c <_Heap_Walk+0x80> (*printer)( 46a10: 2f06 movel %d6,%sp@- 46a12: 4879 0005 b446 pea 5b446 46a18: 6000 0268 braw 46c82 <_Heap_Walk+0x2e6> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 46a1c: 2203 movel %d3,%d1 46a1e: 4c46 1000 remul %d6,%d0,%d1 46a22: 4a80 tstl %d0 46a24: 670c beqs 46a32 <_Heap_Walk+0x96> (*printer)( 46a26: 2f03 movel %d3,%sp@- 46a28: 4879 0005 b464 pea 5b464 46a2e: 6000 0252 braw 46c82 <_Heap_Walk+0x2e6> ); return false; } if ( 46a32: 200a movel %a2,%d0 46a34: 5080 addql #8,%d0 46a36: 4c46 0001 remul %d6,%d1,%d0 46a3a: 4a81 tstl %d1 46a3c: 670c beqs 46a4a <_Heap_Walk+0xae> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 46a3e: 2f0a movel %a2,%sp@- 46a40: 4879 0005 b488 pea 5b488 46a46: 6000 023a braw 46c82 <_Heap_Walk+0x2e6> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 46a4a: 7001 moveq #1,%d0 46a4c: c0aa 0004 andl %a2@(4),%d0 46a50: 4a00 tstb %d0 46a52: 6608 bnes 46a5c <_Heap_Walk+0xc0> (*printer)( 46a54: 4879 0005 b4b9 pea 5b4b9 46a5a: 602c bras 46a88 <_Heap_Walk+0xec> ); return false; } if ( first_block->prev_size != page_size ) { 46a5c: 2812 movel %a2@,%d4 46a5e: bc84 cmpl %d4,%d6 46a60: 670e beqs 46a70 <_Heap_Walk+0xd4> (*printer)( 46a62: 2f06 movel %d6,%sp@- 46a64: 2f04 movel %d4,%sp@- 46a66: 4879 0005 b4e7 pea 5b4e7 46a6c: 6000 0150 braw 46bbe <_Heap_Walk+0x222> ); return false; } if ( _Heap_Is_free( last_block ) ) { 46a70: 2045 moveal %d5,%a0 46a72: 70fe moveq #-2,%d0 46a74: 7201 moveq #1,%d1 46a76: c0a8 0004 andl %a0@(4),%d0 46a7a: c2b0 0804 andl %a0@(00000004,%d0:l),%d1 46a7e: 4a01 tstb %d1 46a80: 6616 bnes 46a98 <_Heap_Walk+0xfc> (*printer)( 46a82: 4879 0005 b512 pea 5b512 46a88: 4878 0001 pea 1 46a8c: 2f02 movel %d2,%sp@- 46a8e: 4e93 jsr %a3@ 46a90: 4fef 000c lea %sp@(12),%sp 46a94: 6000 01f8 braw 46c8e <_Heap_Walk+0x2f2> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 46a98: 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; 46a9c: 220c movel %a4,%d1 46a9e: 206c 0008 moveal %a4@(8),%a0 46aa2: 606a bras 46b0e <_Heap_Walk+0x172> RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 46aa4: b1ec 0020 cmpal %a4@(32),%a0 46aa8: 650e bcss 46ab8 <_Heap_Walk+0x11c> 46aaa: b1ec 0024 cmpal %a4@(36),%a0 46aae: 53c0 sls %d0 46ab0: 49c0 extbl %d0 46ab2: 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 ) ) { 46ab4: 4a00 tstb %d0 46ab6: 660c bnes 46ac4 <_Heap_Walk+0x128> <== ALWAYS TAKEN (*printer)( 46ab8: 2f08 movel %a0,%sp@- 46aba: 4879 0005 b527 pea 5b527 46ac0: 6000 01c0 braw 46c82 <_Heap_Walk+0x2e6> ); return false; } if ( 46ac4: 4c46 7000 remul %d6,%d0,%d7 46ac8: 4a80 tstl %d0 46aca: 670c beqs 46ad8 <_Heap_Walk+0x13c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 46acc: 2f08 movel %a0,%sp@- 46ace: 4879 0005 b547 pea 5b547 46ad4: 6000 01ac braw 46c82 <_Heap_Walk+0x2e6> ); return false; } if ( _Heap_Is_used( free_block ) ) { 46ad8: 70fe moveq #-2,%d0 46ada: 7e01 moveq #1,%d7 46adc: c0a8 0004 andl %a0@(4),%d0 46ae0: ceb0 0804 andl %a0@(00000004,%d0:l),%d7 46ae4: 670c beqs 46af2 <_Heap_Walk+0x156> (*printer)( 46ae6: 2f08 movel %a0,%sp@- 46ae8: 4879 0005 b577 pea 5b577 46aee: 6000 0192 braw 46c82 <_Heap_Walk+0x2e6> ); return false; } if ( free_block->prev != prev_block ) { 46af2: 2028 000c movel %a0@(12),%d0 46af6: b280 cmpl %d0,%d1 46af8: 670e beqs 46b08 <_Heap_Walk+0x16c> (*printer)( 46afa: 2f00 movel %d0,%sp@- 46afc: 2f08 movel %a0,%sp@- 46afe: 4879 0005 b593 pea 5b593 46b04: 6000 00b8 braw 46bbe <_Heap_Walk+0x222> return false; } prev_block = free_block; free_block = free_block->next; 46b08: 2208 movel %a0,%d1 46b0a: 2068 0008 moveal %a0@(8),%a0 ); return false; } if ( 46b0e: 2e08 movel %a0,%d7 46b10: 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 ) { 46b12: b9c8 cmpal %a0,%a4 46b14: 668e bnes 46aa4 <_Heap_Walk+0x108> 46b16: 6000 0190 braw 46ca8 <_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; 46b1a: 202a 0004 movel %a2@(4),%d0 46b1e: 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 ) { 46b20: 7201 moveq #1,%d1 46b22: cc80 andl %d0,%d6 46b24: 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); 46b26: 4bf2 6800 lea %a2@(00000000,%d6:l),%a5 46b2a: 4a00 tstb %d0 46b2c: 6716 beqs 46b44 <_Heap_Walk+0x1a8> (*printer)( 46b2e: 2f06 movel %d6,%sp@- 46b30: 2f0a movel %a2,%sp@- 46b32: 4879 0005 b5c5 pea 5b5c5 46b38: 42a7 clrl %sp@- 46b3a: 2f02 movel %d2,%sp@- 46b3c: 4e93 jsr %a3@ 46b3e: 4fef 0014 lea %sp@(20),%sp 46b42: 6016 bras 46b5a <_Heap_Walk+0x1be> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 46b44: 2f12 movel %a2@,%sp@- 46b46: 2f06 movel %d6,%sp@- 46b48: 2f0a movel %a2,%sp@- 46b4a: 4879 0005 b5dc pea 5b5dc 46b50: 42a7 clrl %sp@- 46b52: 2f02 movel %d2,%sp@- 46b54: 4e93 jsr %a3@ 46b56: 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 46b5a: bbec 0020 cmpal %a4@(32),%a5 46b5e: 650e bcss 46b6e <_Heap_Walk+0x1d2> <== NEVER TAKEN 46b60: bbec 0024 cmpal %a4@(36),%a5 46b64: 53c0 sls %d0 46b66: 49c0 extbl %d0 46b68: 4480 negl %d0 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 46b6a: 4a00 tstb %d0 46b6c: 660c bnes 46b7a <_Heap_Walk+0x1de> (*printer)( 46b6e: 2f0d movel %a5,%sp@- 46b70: 2f0a movel %a2,%sp@- 46b72: 4879 0005 b601 pea 5b601 46b78: 6044 bras 46bbe <_Heap_Walk+0x222> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 46b7a: 2206 movel %d6,%d1 46b7c: 4c44 1000 remul %d4,%d0,%d1 46b80: 4a80 tstl %d0 46b82: 670c beqs 46b90 <_Heap_Walk+0x1f4> (*printer)( 46b84: 2f06 movel %d6,%sp@- 46b86: 2f0a movel %a2,%sp@- 46b88: 4879 0005 b62e pea 5b62e 46b8e: 602e bras 46bbe <_Heap_Walk+0x222> ); return false; } if ( block_size < min_block_size ) { 46b90: b686 cmpl %d6,%d3 46b92: 631c blss 46bb0 <_Heap_Walk+0x214> (*printer)( 46b94: 2f03 movel %d3,%sp@- 46b96: 2f06 movel %d6,%sp@- 46b98: 2f0a movel %a2,%sp@- 46b9a: 4879 0005 b65c pea 5b65c 46ba0: 4878 0001 pea 1 46ba4: 2f02 movel %d2,%sp@- 46ba6: 4e93 jsr %a3@ block, block_size, min_block_size ); return false; 46ba8: 4fef 0018 lea %sp@(24),%sp 46bac: 6000 00e0 braw 46c8e <_Heap_Walk+0x2f2> } if ( next_block_begin <= block_begin ) { 46bb0: b5cd cmpal %a5,%a2 46bb2: 651a bcss 46bce <_Heap_Walk+0x232> (*printer)( 46bb4: 2f0d movel %a5,%sp@- 46bb6: 2f0a movel %a2,%sp@- 46bb8: 4879 0005 b687 pea 5b687 46bbe: 4878 0001 pea 1 46bc2: 2f02 movel %d2,%sp@- 46bc4: 4e93 jsr %a3@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 46bc6: 4fef 0014 lea %sp@(20),%sp 46bca: 6000 00c2 braw 46c8e <_Heap_Walk+0x2f2> } if ( !_Heap_Is_prev_used( next_block ) ) { 46bce: 7001 moveq #1,%d0 46bd0: c0ad 0004 andl %a5@(4),%d0 46bd4: 4a00 tstb %d0 46bd6: 6600 00ce bnew 46ca6 <_Heap_Walk+0x30a> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 46bda: 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; 46bde: 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; 46be0: 43f9 0005 b6bb lea 5b6bb ,%a1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46be6: 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; 46bea: 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; 46bec: 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); 46bf0: 2e0a movel %a2,%d7 46bf2: 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; 46bf4: 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)( 46bf8: 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; 46bfc: b1ec 000c cmpal %a4@(12),%a0 46c00: 6710 beqs 46c12 <_Heap_Walk+0x276> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 46c02: 43f9 0005 b6c5 lea 5b6c5 ,%a1 46c08: b9c8 cmpal %a0,%a4 46c0a: 6706 beqs 46c12 <_Heap_Walk+0x276> 46c0c: 43f9 0005 b2f2 lea 5b2f2 ,%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)( 46c12: 202a 000c movel %a2@(12),%d0 46c16: 223c 0005 b6cf movel #374479,%d1 46c1c: b0ae fff8 cmpl %fp@(-8),%d0 46c20: 6710 beqs 46c32 <_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)" : ""), 46c22: 223c 0005 b6da movel #374490,%d1 46c28: b9c0 cmpal %d0,%a4 46c2a: 6706 beqs 46c32 <_Heap_Walk+0x296> 46c2c: 223c 0005 b2f2 movel #373490,%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)( 46c32: 2f09 movel %a1,%sp@- 46c34: 2f08 movel %a0,%sp@- 46c36: 2f01 movel %d1,%sp@- 46c38: 2f00 movel %d0,%sp@- 46c3a: 2f0a movel %a2,%sp@- 46c3c: 4879 0005 b6e4 pea 5b6e4 46c42: 42a7 clrl %sp@- 46c44: 2f02 movel %d2,%sp@- 46c46: 4e93 jsr %a3@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 46c48: 4fef 0020 lea %sp@(32),%sp 46c4c: 2047 moveal %d7,%a0 46c4e: 2010 movel %a0@,%d0 46c50: b086 cmpl %d6,%d0 46c52: 671c beqs 46c70 <_Heap_Walk+0x2d4> (*printer)( 46c54: 2f07 movel %d7,%sp@- 46c56: 2f00 movel %d0,%sp@- 46c58: 2f06 movel %d6,%sp@- 46c5a: 2f0a movel %a2,%sp@- 46c5c: 4879 0005 b710 pea 5b710 46c62: 4878 0001 pea 1 46c66: 2f02 movel %d2,%sp@- 46c68: 4e93 jsr %a3@ 46c6a: 4fef 001c lea %sp@(28),%sp 46c6e: 601e bras 46c8e <_Heap_Walk+0x2f2> ); return false; } if ( !prev_used ) { 46c70: 7001 moveq #1,%d0 46c72: c0ae fffc andl %fp@(-4),%d0 46c76: 4a00 tstb %d0 46c78: 6618 bnes 46c92 <_Heap_Walk+0x2f6> (*printer)( 46c7a: 2f0a movel %a2,%sp@- 46c7c: 4879 0005 b749 pea 5b749 46c82: 4878 0001 pea 1 46c86: 2f02 movel %d2,%sp@- 46c88: 4e93 jsr %a3@ 46c8a: 4fef 0010 lea %sp@(16),%sp 46c8e: 4200 clrb %d0 46c90: 601e bras 46cb0 <_Heap_Walk+0x314> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46c92: 206c 0008 moveal %a4@(8),%a0 46c96: 6008 bras 46ca0 <_Heap_Walk+0x304> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 46c98: b5c8 cmpal %a0,%a2 46c9a: 670a beqs 46ca6 <_Heap_Walk+0x30a> return true; } free_block = free_block->next; 46c9c: 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 ) { 46ca0: b9c8 cmpal %a0,%a4 46ca2: 66f4 bnes 46c98 <_Heap_Walk+0x2fc> 46ca4: 6014 bras 46cba <_Heap_Walk+0x31e> 46ca6: 244d moveal %a5,%a2 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 46ca8: ba8a cmpl %a2,%d5 46caa: 6600 fe6e bnew 46b1a <_Heap_Walk+0x17e> 46cae: 7001 moveq #1,%d0 block = next_block; } return true; } 46cb0: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 46cb6: 4e5e unlk %fp 46cb8: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 46cba: 2f0a movel %a2,%sp@- 46cbc: 4879 0005 b778 pea 5b778 46cc2: 60be bras 46c82 <_Heap_Walk+0x2e6> 00045fd8 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fd8: 4e56 0000 linkw %fp,#0 45fdc: 222e 000c movel %fp@(12),%d1 45fe0: 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 ); 45fe2: 4283 clrl %d3 45fe4: 1601 moveb %d1,%d3 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fe6: 2f02 movel %d2,%sp@- 45fe8: 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 ); 45fec: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fee: 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 ); 45ff2: 2f03 movel %d3,%sp@- _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 45ff4: 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 ); 45ffa: 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; 45ffc: 13c1 0005 cdb2 moveb %d1,5cdb2 <_Internal_errors_What_happened+0x4> bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46002: 23c0 0005 cdae movel %d0,5cdae <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46008: 23c2 0005 cdb4 movel %d2,5cdb4 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 4600e: 4eb9 0004 7b0a jsr 47b0a <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46014: 40c0 movew %sr,%d0 46016: 8083 orl %d3,%d0 46018: 46c0 movew %d0,%sr 4601a: 2002 movel %d2,%d0 <== NOT EXECUTED 4601c: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46022: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46024: 7005 moveq #5,%d0 46026: 4fef 000c lea %sp@(12),%sp 4602a: 23c0 0005 ce90 movel %d0,5ce90 <_System_state_Current> 46030: 60fe bras 46030 <_Internal_error_Occurred+0x58> ... 0004609c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 4609c: 4e56 fff0 linkw %fp,#-16 460a0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 460a4: 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 ) 460a8: 4aaa 0014 tstl %a2@(20) 460ac: 6604 bnes 460b2 <_Objects_Allocate+0x16> <== ALWAYS TAKEN 460ae: 4280 clrl %d0 <== NOT EXECUTED 460b0: 605e bras 46110 <_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 ); 460b2: 240a movel %a2,%d2 460b4: 0682 0000 001c addil #28,%d2 460ba: 47f9 0004 a070 lea 4a070 <_Chain_Get>,%a3 460c0: 2f02 movel %d2,%sp@- 460c2: 4e93 jsr %a3@ if ( information->auto_extend ) { 460c4: 588f addql #4,%sp 460c6: 4a2a 0010 tstb %a2@(16) 460ca: 6744 beqs 46110 <_Objects_Allocate+0x74> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 460cc: 4a80 tstl %d0 460ce: 6612 bnes 460e2 <_Objects_Allocate+0x46> _Objects_Extend_information( information ); 460d0: 2f0a movel %a2,%sp@- 460d2: 4eb9 0004 6148 jsr 46148 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 460d8: 2f02 movel %d2,%sp@- 460da: 4e93 jsr %a3@ } if ( the_object ) { 460dc: 508f addql #8,%sp 460de: 4a80 tstl %d0 460e0: 672e beqs 46110 <_Objects_Allocate+0x74> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460e2: 2040 moveal %d0,%a0 460e4: 4281 clrl %d1 460e6: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460e8: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460ea: 362a 0008 movew %a2@(8),%d3 460ee: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460f2: 342a 0012 movew %a2@(18),%d2 information->inactive--; 460f6: 306a 0028 moveaw %a2@(40),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460fa: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460fc: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 46100: 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 ]--; 46102: e589 lsll #2,%d1 information->inactive--; 46104: 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 ]--; 46108: 206a 002a moveal %a2@(42),%a0 4610c: d1c1 addal %d1,%a0 4610e: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 46110: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46116: 4e5e unlk %fp ... 0004611c <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4611c: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 4611e: 4e56 0000 linkw %fp,#0 46122: 226e 000c moveal %fp@(12),%a1 46126: 206e 0008 moveal %fp@(8),%a0 4612a: 2f0a movel %a2,%sp@- 4612c: 2468 0018 moveal %a0@(24),%a2 46130: 3029 000a movew %a1@(10),%d0 46134: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46138: 2d49 000c movel %a1,%fp@(12) } 4613c: 245f moveal %sp@+,%a2 4613e: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46140: 4ef9 0004 6640 jmp 46640 <_Objects_Namespace_remove> ... 00046440 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 46440: 4e56 0000 linkw %fp,#0 46444: 2f03 movel %d3,%sp@- 46446: 262e 0008 movel %fp@(8),%d3 4644a: 2f02 movel %d2,%sp@- 4644c: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 46450: 672e beqs 46480 <_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 ); 46452: 2f03 movel %d3,%sp@- 46454: 4eb9 0004 a574 jsr 4a574 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 4645a: 588f addql #4,%sp 4645c: 4a80 tstl %d0 4645e: 6720 beqs 46480 <_Objects_Get_information+0x40> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 46460: b082 cmpl %d2,%d0 46462: 651c bcss 46480 <_Objects_Get_information+0x40> return NULL; if ( !_Objects_Information_table[ the_api ] ) 46464: 41f9 0005 ccc0 lea 5ccc0 <_Objects_Information_table>,%a0 4646a: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 4646e: 4a88 tstl %a0 46470: 670e beqs 46480 <_Objects_Get_information+0x40> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 46472: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 46476: 670a beqs 46482 <_Objects_Get_information+0x42> <== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 46478: 2040 moveal %d0,%a0 4647a: 4a68 000e tstw %a0@(14) 4647e: 6602 bnes 46482 <_Objects_Get_information+0x42> 46480: 4280 clrl %d0 return NULL; #endif return info; } 46482: 242e fff8 movel %fp@(-8),%d2 46486: 262e fffc movel %fp@(-4),%d3 4648a: 4e5e unlk %fp ... 0004783c <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 4783c: 4e56 ffe0 linkw %fp,#-32 47840: 48d7 043c moveml %d2-%d5/%a2,%sp@ 47844: 262e 0008 movel %fp@(8),%d3 47848: 282e 000c movel %fp@(12),%d4 4784c: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 47850: 4a84 tstl %d4 47852: 6700 00be beqw 47912 <_Objects_Get_name_as_string+0xd6> return NULL; if ( name == NULL ) 47856: 4a82 tstl %d2 47858: 6700 00ba beqw 47914 <_Objects_Get_name_as_string+0xd8> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4785c: 4a83 tstl %d3 4785e: 660a bnes 4786a <_Objects_Get_name_as_string+0x2e> 47860: 2079 0006 6ce2 moveal 66ce2 <_Thread_Executing>,%a0 47866: 2628 0008 movel %a0@(8),%d3 information = _Objects_Get_information_id( tmpId ); 4786a: 2f03 movel %d3,%sp@- 4786c: 4eb9 0004 7768 jsr 47768 <_Objects_Get_information_id> if ( !information ) 47872: 588f addql #4,%sp if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); 47874: 2440 moveal %d0,%a2 if ( !information ) 47876: 4a80 tstl %d0 47878: 6700 0098 beqw 47912 <_Objects_Get_name_as_string+0xd6> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 4787c: 486e fffc pea %fp@(-4) 47880: 2f03 movel %d3,%sp@- 47882: 2f00 movel %d0,%sp@- 47884: 4eb9 0004 7920 jsr 47920 <_Objects_Get> switch ( location ) { 4788a: 4fef 000c lea %sp@(12),%sp 4788e: 4aae fffc tstl %fp@(-4) 47892: 667e bnes 47912 <_Objects_Get_name_as_string+0xd6><== NEVER TAKEN return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47894: 4a2a 0032 tstb %a2@(50) 47898: 670e beqs 478a8 <_Objects_Get_name_as_string+0x6c> s = the_object->name.name_p; 4789a: 2040 moveal %d0,%a0 4789c: 2268 000c moveal %a0@(12),%a1 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 478a0: 4a89 tstl %a1 478a2: 6634 bnes 478d8 <_Objects_Get_name_as_string+0x9c> 478a4: 2042 moveal %d2,%a0 478a6: 6060 bras 47908 <_Objects_Get_name_as_string+0xcc> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 478a8: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 478aa: 7218 moveq #24,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 478ac: 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; 478b0: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 478b4: 2a00 movel %d0,%d5 478b6: e2ad lsrl %d1,%d5 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 478b8: 2200 movel %d0,%d1 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 478ba: 2600 movel %d0,%d3 lname[ 2 ] = (u32_name >> 8) & 0xff; 478bc: e089 lsrl #8,%d1 lname[ 3 ] = (u32_name >> 0) & 0xff; 478be: 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; 478c2: 4243 clrw %d3 478c4: 4843 swap %d3 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 478c6: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 478c8: 1d45 fff7 moveb %d5,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; 478cc: 1d43 fff8 moveb %d3,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; 478d0: 1d41 fff9 moveb %d1,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 478d4: 1d40 fffb moveb %d0,%fp@(-5) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 478d8: 5384 subql #1,%d4 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 478da: 2042 moveal %d2,%a0 478dc: 4280 clrl %d0 478de: 6018 bras 478f8 <_Objects_Get_name_as_string+0xbc> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 478e0: 2479 0005 d7ec moveal 5d7ec <__ctype_ptr__>,%a2 478e6: 1632 3801 moveb %a2@(00000001,%d3:l),%d3 478ea: 49c3 extbl %d3 478ec: 0283 0000 0097 andil #151,%d3 478f2: 6602 bnes 478f6 <_Objects_Get_name_as_string+0xba> 478f4: 722a moveq #42,%d1 478f6: 10c1 moveb %d1,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 478f8: b880 cmpl %d0,%d4 478fa: 630c blss 47908 <_Objects_Get_name_as_string+0xcc> *d = (isprint((unsigned char)*s)) ? *s : '*'; 478fc: 4283 clrl %d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 478fe: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 47902: 5280 addql #1,%d0 *d = (isprint((unsigned char)*s)) ? *s : '*'; 47904: 1601 moveb %d1,%d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 47906: 66d8 bnes 478e0 <_Objects_Get_name_as_string+0xa4> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 47908: 4210 clrb %a0@ _Thread_Enable_dispatch(); 4790a: 4eb9 0004 80aa jsr 480aa <_Thread_Enable_dispatch> return name; 47910: 6002 bras 47914 <_Objects_Get_name_as_string+0xd8> 47912: 4282 clrl %d2 } return NULL; /* unreachable path */ } 47914: 2002 movel %d2,%d0 47916: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 4791c: 4e5e unlk %fp <== NOT EXECUTED 00053754 <_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; 53754: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 53756: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 53758: 4e56 0000 linkw %fp,#0 5375c: 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; 53760: 90a8 0006 subl %a0@(6),%d0 53764: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 53768: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5376c: 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 ) { 53770: b081 cmpl %d1,%d0 53772: 620e bhis 53782 <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 53774: 2068 0018 moveal %a0@(24),%a0 53778: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5377c: 6704 beqs 53782 <_Objects_Get_no_protection+0x2e><== NEVER TAKEN *location = OBJECTS_LOCAL; 5377e: 4291 clrl %a1@ return the_object; 53780: 6006 bras 53788 <_Objects_Get_no_protection+0x34> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 53782: 7001 moveq #1,%d0 53784: 2280 movel %d0,%a1@ 53786: 4280 clrl %d0 return NULL; } 53788: 4e5e unlk %fp <== NOT EXECUTED 00047370 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 47370: 4e56 fffc linkw %fp,#-4 47374: 222e 0008 movel %fp@(8),%d1 47378: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4737a: 4a81 tstl %d1 4737c: 660a bnes 47388 <_Objects_Id_to_name+0x18> 4737e: 2079 0005 e1ea moveal 5e1ea <_Thread_Executing>,%a0 47384: 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); 47388: 7418 moveq #24,%d2 4738a: 2001 movel %d1,%d0 4738c: e4a8 lsrl %d2,%d0 4738e: 143c 0007 moveb #7,%d2 47392: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47394: 143c 0003 moveb #3,%d2 47398: 2040 moveal %d0,%a0 4739a: 5388 subql #1,%a0 4739c: b488 cmpl %a0,%d2 4739e: 6540 bcss 473e0 <_Objects_Id_to_name+0x70> 473a0: 6048 bras 473ea <_Objects_Id_to_name+0x7a> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 473a2: 2001 movel %d1,%d0 473a4: 741b moveq #27,%d2 473a6: e4a8 lsrl %d2,%d0 473a8: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 473ac: 4a88 tstl %a0 473ae: 6730 beqs 473e0 <_Objects_Id_to_name+0x70> <== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 473b0: 4a28 0032 tstb %a0@(50) 473b4: 662a bnes 473e0 <_Objects_Id_to_name+0x70> <== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 473b6: 486e fffc pea %fp@(-4) 473ba: 2f01 movel %d1,%sp@- 473bc: 2f08 movel %a0,%sp@- 473be: 4eb9 0004 7310 jsr 47310 <_Objects_Get> if ( !the_object ) 473c4: 4fef 000c lea %sp@(12),%sp 473c8: 4a80 tstl %d0 473ca: 6714 beqs 473e0 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; *name = the_object->name; 473cc: 206e 000c moveal %fp@(12),%a0 473d0: 2240 moveal %d0,%a1 473d2: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 473d6: 4eb9 0004 7b96 jsr 47b96 <_Thread_Enable_dispatch> 473dc: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 473de: 6002 bras 473e2 <_Objects_Id_to_name+0x72> 473e0: 7003 moveq #3,%d0 } 473e2: 242e fff8 movel %fp@(-8),%d2 473e6: 4e5e unlk %fp 473e8: 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 ] ) 473ea: 41f9 0005 e0e8 lea 5e0e8 <_Objects_Information_table>,%a0 473f0: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 473f4: 4a88 tstl %a0 473f6: 66aa bnes 473a2 <_Objects_Id_to_name+0x32> 473f8: 60e6 bras 473e0 <_Objects_Id_to_name+0x70> ... 00046a50 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a50: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a52: 4e56 ffe0 linkw %fp,#-32 46a56: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46a5a: 2a6e 0008 moveal %fp@(8),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a5e: 302d 0034 movew %a5@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a62: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a66: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a68: 286e 000c moveal %fp@(12),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a6c: 2f0a movel %a2,%sp@- 46a6e: 4eb9 0004 e5c0 jsr 4e5c0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 46a74: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a76: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 46a78: 4a2d 0032 tstb %a5@(50) 46a7c: 6748 beqs 46ac6 <_Objects_Set_name+0x76> char *d; d = _Workspace_Allocate( length + 1 ); 46a7e: 486b 0001 pea %a3@(1) 46a82: 4eb9 0004 82dc jsr 482dc <_Workspace_Allocate> if ( !d ) 46a88: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 46a8a: 2a40 moveal %d0,%a5 if ( !d ) 46a8c: 4a80 tstl %d0 46a8e: 6604 bnes 46a94 <_Objects_Set_name+0x44> <== ALWAYS TAKEN 46a90: 4200 clrb %d0 <== NOT EXECUTED 46a92: 6076 bras 46b0a <_Objects_Set_name+0xba> <== NOT EXECUTED return false; if ( the_object->name.name_p ) { 46a94: 202c 000c movel %a4@(12),%d0 46a98: 670e beqs 46aa8 <_Objects_Set_name+0x58> _Workspace_Free( (void *)the_object->name.name_p ); 46a9a: 2f00 movel %d0,%sp@- 46a9c: 4eb9 0004 82f8 jsr 482f8 <_Workspace_Free> the_object->name.name_p = NULL; 46aa2: 588f addql #4,%sp 46aa4: 42ac 000c clrl %a4@(12) } strncpy( d, name, length ); 46aa8: 2f0b movel %a3,%sp@- 46aaa: 2f0a movel %a2,%sp@- 46aac: 2f0d movel %a5,%sp@- 46aae: 4eb9 0004 e538 jsr 4e538 d[length] = '\0'; the_object->name.name_p = d; 46ab4: 4fef 000c lea %sp@(12),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; 46ab8: 4200 clrb %d0 46aba: 1b80 b800 moveb %d0,%a5@(00000000,%a3:l) the_object->name.name_p = d; 46abe: 7001 moveq #1,%d0 46ac0: 294d 000c movel %a5,%a4@(12) 46ac4: 6044 bras 46b0a <_Objects_Set_name+0xba> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 46ac6: 7201 moveq #1,%d1 46ac8: 1012 moveb %a2@,%d0 46aca: b28b cmpl %a3,%d1 46acc: 6446 bccs 46b14 <_Objects_Set_name+0xc4> 46ace: 7602 moveq #2,%d3 46ad0: 142a 0001 moveb %a2@(1),%d2 46ad4: 49c2 extbl %d2 46ad6: 4842 swap %d2 46ad8: 4242 clrw %d2 46ada: b68b cmpl %a3,%d3 46adc: 643a bccs 46b18 <_Objects_Set_name+0xc8> 46ade: 7a03 moveq #3,%d5 46ae0: 122a 0002 moveb %a2@(2),%d1 46ae4: 49c1 extbl %d1 46ae6: e189 lsll #8,%d1 46ae8: ba8b cmpl %a3,%d5 46aea: 6506 bcss 46af2 <_Objects_Set_name+0xa2> 46aec: 163c 0020 moveb #32,%d3 46af0: 6006 bras 46af8 <_Objects_Set_name+0xa8> 46af2: 162a 0003 moveb %a2@(3),%d3 46af6: 49c3 extbl %d3 46af8: 2800 movel %d0,%d4 46afa: 7a18 moveq #24,%d5 46afc: ebac lsll %d5,%d4 46afe: 7001 moveq #1,%d0 46b00: 8484 orl %d4,%d2 46b02: 8481 orl %d1,%d2 46b04: 8483 orl %d3,%d2 46b06: 2942 000c movel %d2,%a4@(12) ); } return true; } 46b0a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46b10: 4e5e unlk %fp 46b12: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 46b14: 7420 moveq #32,%d2 46b16: 4842 swap %d2 46b18: 223c 0000 2000 movel #8192,%d1 46b1e: 7620 moveq #32,%d3 46b20: 60d6 bras 46af8 <_Objects_Set_name+0xa8> ... 00045bbc <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 45bbc: 4e56 ffe4 linkw %fp,#-28 45bc0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 45bc4: 240e movel %fp,%d2 45bc6: 5982 subql #4,%d2 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 45bc8: 246e 000c moveal %fp@(12),%a2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 45bcc: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 45bce: 2a6e 0008 moveal %fp@(8),%a5 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 45bd2: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 45bd4: 162e 0017 moveb %fp@(23),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 45bd8: 4eb9 0004 5d6e jsr 45d6e <_POSIX_Mutex_Get> 45bde: 508f addql #8,%sp 45be0: 4a80 tstl %d0 45be2: 6700 00ae beqw 45c92 <_POSIX_Condition_variables_Wait_support+0xd6> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 45be6: 2039 0005 f248 movel 5f248 <_Thread_Dispatch_disable_level>,%d0 45bec: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45bee: 2f02 movel %d2,%sp@- 45bf0: 23c0 0005 f248 movel %d0,5f248 <_Thread_Dispatch_disable_level> 45bf6: 2f0d movel %a5,%sp@- 45bf8: 4eb9 0004 59ec jsr 459ec <_POSIX_Condition_variables_Get> switch ( location ) { 45bfe: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45c00: 2640 moveal %d0,%a3 switch ( location ) { 45c02: 4aae fffc tstl %fp@(-4) 45c06: 6600 008a bnew 45c92 <_POSIX_Condition_variables_Wait_support+0xd6> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 45c0a: 202b 0014 movel %a3@(20),%d0 45c0e: 670c beqs 45c1c <_POSIX_Condition_variables_Wait_support+0x60> 45c10: b092 cmpl %a2@,%d0 45c12: 6708 beqs 45c1c <_POSIX_Condition_variables_Wait_support+0x60> _Thread_Enable_dispatch(); 45c14: 4eb9 0004 89a6 jsr 489a6 <_Thread_Enable_dispatch> 45c1a: 6076 bras 45c92 <_POSIX_Condition_variables_Wait_support+0xd6> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 45c1c: 2f0a movel %a2,%sp@- 45c1e: 49f9 0004 89a6 lea 489a6 <_Thread_Enable_dispatch>,%a4 45c24: 4eb9 0004 5f74 jsr 45f74 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 45c2a: 588f addql #4,%sp 45c2c: 4a03 tstb %d3 45c2e: 6650 bnes 45c80 <_POSIX_Condition_variables_Wait_support+0xc4> the_cond->Mutex = *mutex; 45c30: 2752 0014 movel %a2@,%a3@(20) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 45c34: 200b movel %a3,%d0 45c36: 0680 0000 0018 addil #24,%d0 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 45c3c: 7201 moveq #1,%d1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 45c3e: 2079 0005 f302 moveal 5f302 <_Thread_Executing>,%a0 45c44: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 45c48: 2155 0020 movel %a5@,%a0@(32) if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 45c4c: 2140 0044 movel %d0,%a0@(68) 45c50: 2741 0048 movel %d1,%a3@(72) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 45c54: 4879 0004 9184 pea 49184 <_Thread_queue_Timeout> 45c5a: 2f2e 0010 movel %fp@(16),%sp@- 45c5e: 2f00 movel %d0,%sp@- 45c60: 4eb9 0004 8e40 jsr 48e40 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 45c66: 4e94 jsr %a4@ /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 45c68: 2079 0005 f302 moveal 5f302 <_Thread_Executing>,%a0 if ( status && status != ETIMEDOUT ) 45c6e: 4fef 000c lea %sp@(12),%sp /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 45c72: 2428 0034 movel %a0@(52),%d2 if ( status && status != ETIMEDOUT ) 45c76: 670c beqs 45c84 <_POSIX_Condition_variables_Wait_support+0xc8> 45c78: 7074 moveq #116,%d0 45c7a: b082 cmpl %d2,%d0 45c7c: 6616 bnes 45c94 <_POSIX_Condition_variables_Wait_support+0xd8><== NEVER TAKEN 45c7e: 6004 bras 45c84 <_POSIX_Condition_variables_Wait_support+0xc8> return status; } else { _Thread_Enable_dispatch(); 45c80: 4e94 jsr %a4@ 45c82: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 45c84: 2f0a movel %a2,%sp@- 45c86: 4eb9 0004 5edc jsr 45edc if ( mutex_status ) 45c8c: 588f addql #4,%sp 45c8e: 4a80 tstl %d0 45c90: 6702 beqs 45c94 <_POSIX_Condition_variables_Wait_support+0xd8> 45c92: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 45c94: 2002 movel %d2,%d0 45c96: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 45c9c: 4e5e unlk %fp <== NOT EXECUTED 0004948c <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4948c: 4e56 ffe4 linkw %fp,#-28 49490: 48d7 043c moveml %d2-%d5/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 49494: 486e fffc pea %fp@(-4) 49498: 242e 0008 movel %fp@(8),%d2 4949c: 2f02 movel %d2,%sp@- 4949e: 4879 0006 5070 pea 65070 <_POSIX_Message_queue_Information_fds> 494a4: 246e 0014 moveal %fp@(20),%a2 494a8: 262e 0018 movel %fp@(24),%d3 494ac: 4eb9 0004 c188 jsr 4c188 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 494b2: 4fef 000c lea %sp@(12),%sp 494b6: 4aae fffc tstl %fp@(-4) 494ba: 6600 00c4 bnew 49580 <_POSIX_Message_queue_Receive_support+0xf4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 494be: 2040 moveal %d0,%a0 494c0: 7803 moveq #3,%d4 494c2: 7a01 moveq #1,%d5 494c4: 2228 0014 movel %a0@(20),%d1 494c8: c881 andl %d1,%d4 494ca: ba84 cmpl %d4,%d5 494cc: 660a bnes 494d8 <_POSIX_Message_queue_Receive_support+0x4c> _Thread_Enable_dispatch(); 494ce: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> 494d4: 6000 00aa braw 49580 <_POSIX_Message_queue_Receive_support+0xf4> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 494d8: 2240 moveal %d0,%a1 494da: 2069 0010 moveal %a1@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 494de: 2028 0066 movel %a0@(102),%d0 494e2: b0ae 0010 cmpl %fp@(16),%d0 494e6: 6318 blss 49500 <_POSIX_Message_queue_Receive_support+0x74> _Thread_Enable_dispatch(); 494e8: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 494ee: 747a moveq #122,%d2 494f0: 4eb9 0005 28c4 jsr 528c4 <__errno> 494f6: 72ff moveq #-1,%d1 494f8: 2040 moveal %d0,%a0 494fa: 2082 movel %d2,%a0@ 494fc: 6000 0090 braw 4958e <_POSIX_Message_queue_Receive_support+0x102> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 49500: 4a03 tstb %d3 49502: 6604 bnes 49508 <_POSIX_Message_queue_Receive_support+0x7c><== ALWAYS TAKEN 49504: 4200 clrb %d0 <== NOT EXECUTED 49506: 600c bras 49514 <_POSIX_Message_queue_Receive_support+0x88><== NOT EXECUTED do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 49508: 2001 movel %d1,%d0 4950a: 760e moveq #14,%d3 4950c: 7a01 moveq #1,%d5 4950e: e6a8 lsrl %d3,%d0 49510: bb80 eorl %d5,%d0 49512: c085 andl %d5,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 49514: 2f2e 001c movel %fp@(28),%sp@- 49518: 7201 moveq #1,%d1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4951a: 76ff moveq #-1,%d3 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4951c: c280 andl %d0,%d1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4951e: 2d43 fff8 movel %d3,%fp@(-8) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 49522: 2f01 movel %d1,%sp@- 49524: 486e fff8 pea %fp@(-8) 49528: 2f2e 000c movel %fp@(12),%sp@- 4952c: 2f02 movel %d2,%sp@- 4952e: 4868 001a pea %a0@(26) 49532: 4eb9 0004 b2d0 jsr 4b2d0 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 49538: 4eb9 0004 c9da jsr 4c9da <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4953e: 2079 0006 4cee moveal 64cee <_Thread_Executing>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 49544: 24a8 0024 movel %a0@(36),%a2@ 49548: 6c06 bges 49550 <_POSIX_Message_queue_Receive_support+0xc4> 4954a: 2a12 movel %a2@,%d5 4954c: 4485 negl %d5 4954e: 2485 movel %d5,%a2@ _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 49550: 4fef 0018 lea %sp@(24),%sp 49554: 4aa8 0034 tstl %a0@(52) 49558: 6606 bnes 49560 <_POSIX_Message_queue_Receive_support+0xd4> return length_out; 4955a: 222e fff8 movel %fp@(-8),%d1 4955e: 602e bras 4958e <_POSIX_Message_queue_Receive_support+0x102> rtems_set_errno_and_return_minus_one( 49560: 4eb9 0005 28c4 jsr 528c4 <__errno> 49566: 2079 0006 4cee moveal 64cee <_Thread_Executing>,%a0 4956c: 2440 moveal %d0,%a2 4956e: 2f28 0034 movel %a0@(52),%sp@- 49572: 4eb9 0004 97b8 jsr 497b8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 49578: 588f addql #4,%sp 4957a: 72ff moveq #-1,%d1 4957c: 2480 movel %d0,%a2@ 4957e: 600e bras 4958e <_POSIX_Message_queue_Receive_support+0x102> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 49580: 4eb9 0005 28c4 jsr 528c4 <__errno> 49586: 72ff moveq #-1,%d1 49588: 2040 moveal %d0,%a0 4958a: 7009 moveq #9,%d0 4958c: 2080 movel %d0,%a0@ } 4958e: 2001 movel %d1,%d0 49590: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 49596: 4e5e unlk %fp ... 00049864 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 49864: 4e56 0000 linkw %fp,#0 49868: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4986c: 2069 010e moveal %a1@(270),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 49870: 4aa8 00d4 tstl %a0@(212) 49874: 662e bnes 498a4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 49876: 7001 moveq #1,%d0 49878: b0a8 00d8 cmpl %a0@(216),%d0 4987c: 6626 bnes 498a4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40> thread_support->cancelation_requested ) { 4987e: 4aa8 00dc tstl %a0@(220) 49882: 6720 beqs 498a4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 49884: 4878 ffff pea ffffffff */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 49888: 2039 0005 d39c movel 5d39c <_Thread_Dispatch_disable_level>,%d0 4988e: 5380 subql #1,%d0 49890: 2f09 movel %a1,%sp@- 49892: 23c0 0005 d39c movel %d0,5d39c <_Thread_Dispatch_disable_level> 49898: 4eb9 0004 9e90 jsr 49e90 <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4989e: 508f addql #8,%sp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 498a0: 4e5e unlk %fp 498a2: 4e75 rts 498a4: 4e5e unlk %fp thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 498a6: 4ef9 0004 700e jmp 4700e <_Thread_Enable_dispatch> 0004a918 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4a918: 4e56 ffec linkw %fp,#-20 4a91c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a920: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4a924: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4a926: 242e 0008 movel %fp@(8),%d2 4a92a: 266e 0010 moveal %fp@(16),%a3 4a92e: 286e 0014 moveal %fp@(20),%a4 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4a932: 4eb9 0004 a8f4 jsr 4a8f4 <_POSIX_Priority_Is_valid> 4a938: 588f addql #4,%sp 4a93a: 4a00 tstb %d0 4a93c: 677c beqs 4a9ba <_POSIX_Thread_Translate_sched_param+0xa2><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4a93e: 4293 clrl %a3@ *budget_callout = NULL; 4a940: 4294 clrl %a4@ if ( policy == SCHED_OTHER ) { 4a942: 4a82 tstl %d2 4a944: 6608 bnes 4a94e <_POSIX_Thread_Translate_sched_param+0x36> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4a946: 7201 moveq #1,%d1 4a948: 4280 clrl %d0 4a94a: 2681 movel %d1,%a3@ return 0; 4a94c: 606e bras 4a9bc <_POSIX_Thread_Translate_sched_param+0xa4> } if ( policy == SCHED_FIFO ) { 4a94e: 7001 moveq #1,%d0 4a950: b082 cmpl %d2,%d0 4a952: 6604 bnes 4a958 <_POSIX_Thread_Translate_sched_param+0x40> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4a954: 4293 clrl %a3@ 4a956: 6008 bras 4a960 <_POSIX_Thread_Translate_sched_param+0x48> return 0; } if ( policy == SCHED_RR ) { 4a958: 7002 moveq #2,%d0 4a95a: b082 cmpl %d2,%d0 4a95c: 6606 bnes 4a964 <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4a95e: 2680 movel %d0,%a3@ 4a960: 4200 clrb %d0 return 0; 4a962: 6058 bras 4a9bc <_POSIX_Thread_Translate_sched_param+0xa4> } if ( policy == SCHED_SPORADIC ) { 4a964: 7004 moveq #4,%d0 4a966: b082 cmpl %d2,%d0 4a968: 6650 bnes 4a9ba <_POSIX_Thread_Translate_sched_param+0xa2> if ( (param->sched_ss_repl_period.tv_sec == 0) && 4a96a: 4aaa 0008 tstl %a2@(8) 4a96e: 6606 bnes 4a976 <_POSIX_Thread_Translate_sched_param+0x5e> (param->sched_ss_repl_period.tv_nsec == 0) ) 4a970: 4aaa 000c tstl %a2@(12) 4a974: 6744 beqs 4a9ba <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 4a976: 4aaa 0010 tstl %a2@(16) 4a97a: 6606 bnes 4a982 <_POSIX_Thread_Translate_sched_param+0x6a> (param->sched_ss_init_budget.tv_nsec == 0) ) 4a97c: 4aaa 0014 tstl %a2@(20) 4a980: 6738 beqs 4a9ba <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4a982: 486a 0008 pea %a2@(8) 4a986: 4bf9 0004 88dc lea 488dc <_Timespec_To_ticks>,%a5 4a98c: 4e95 jsr %a5@ 4a98e: 486a 0010 pea %a2@(16) 4a992: 2400 movel %d0,%d2 4a994: 4e95 jsr %a5@ 4a996: 508f addql #8,%sp 4a998: b082 cmpl %d2,%d0 4a99a: 621e bhis 4a9ba <_POSIX_Thread_Translate_sched_param+0xa2> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 4a99c: 2f2a 0004 movel %a2@(4),%sp@- 4a9a0: 4eb9 0004 a8f4 jsr 4a8f4 <_POSIX_Priority_Is_valid> 4a9a6: 588f addql #4,%sp 4a9a8: 4a00 tstb %d0 4a9aa: 670e beqs 4a9ba <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4a9ac: 7003 moveq #3,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4a9ae: 28bc 0004 5568 movel #284008,%a4@ return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4a9b4: 2680 movel %d0,%a3@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4a9b6: 4280 clrl %d0 return 0; 4a9b8: 6002 bras 4a9bc <_POSIX_Thread_Translate_sched_param+0xa4> 4a9ba: 7016 moveq #22,%d0 } return EINVAL; } 4a9bc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a9c2: 4e5e unlk %fp ... 000452cc <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 452cc: 4e56 ff9c linkw %fp,#-100 452d0: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 452d4: 2479 0005 c58e moveal 5c58e ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 452da: 2839 0005 c58a movel 5c58a ,%d4 if ( !user_threads || maximum == 0 ) 452e0: 4a8a tstl %a2 452e2: 676a beqs 4534e <_POSIX_Threads_Initialize_user_threads_body+0x82><== NEVER TAKEN 452e4: 4a84 tstl %d4 452e6: 6766 beqs 4534e <_POSIX_Threads_Initialize_user_threads_body+0x82><== NEVER TAKEN for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 452e8: 240e movel %fp,%d2 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); status = pthread_create( 452ea: 2a0e movel %fp,%d5 pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 ) 452ec: 4283 clrl %d3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 452ee: 0682 ffff ffc0 addil #-64,%d2 452f4: 2c3c 0004 a9c8 movel #305608,%d6 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 452fa: 4bf9 0004 a9f4 lea 4a9f4 ,%a5 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 45300: 49f9 0004 aa2c lea 4aa2c ,%a4 status = pthread_create( 45306: 5985 subql #4,%d5 45308: 47f9 0004 5024 lea 45024 ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 4530e: 2f02 movel %d2,%sp@- 45310: 2046 moveal %d6,%a0 45312: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 45314: 4878 0002 pea 2 45318: 2f02 movel %d2,%sp@- 4531a: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 4531c: 2f2a 0004 movel %a2@(4),%sp@- 45320: 2f02 movel %d2,%sp@- 45322: 4e94 jsr %a4@ status = pthread_create( 45324: 42a7 clrl %sp@- 45326: 2f12 movel %a2@,%sp@- 45328: 2f02 movel %d2,%sp@- 4532a: 2f05 movel %d5,%sp@- 4532c: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 4532e: 4fef 0024 lea %sp@(36),%sp 45332: 4a80 tstl %d0 45334: 6710 beqs 45346 <_POSIX_Threads_Initialize_user_threads_body+0x7a> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 45336: 2f00 movel %d0,%sp@- 45338: 4878 0001 pea 1 4533c: 4878 0002 pea 2 45340: 4eb9 0004 6ed0 jsr 46ed0 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 45346: 5283 addql #1,%d3 45348: 508a addql #8,%a2 4534a: b883 cmpl %d3,%d4 4534c: 62c0 bhis 4530e <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 4534e: 4cee 3c7c ff9c moveml %fp@(-100),%d2-%d6/%a2-%a5 45354: 4e5e unlk %fp <== NOT EXECUTED 00049ad4 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 49ad4: 4e56 0000 linkw %fp,#0 49ad8: 2f0b movel %a3,%sp@- 49ada: 2f0a movel %a2,%sp@- 49adc: 246e 000c moveal %fp@(12),%a2 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 49ae0: 266a 010e moveal %a2@(270),%a3 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 49ae4: 486b 0094 pea %a3@(148) 49ae8: 4eb9 0004 a9e8 jsr 4a9e8 <_Timespec_To_ticks> */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 49aee: 588f addql #4,%sp 49af0: 4281 clrl %d1 49af2: 1239 0005 b552 moveb 5b552 ,%d1 49af8: 92ab 0084 subl %a3@(132),%d1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; 49afc: 2540 0076 movel %d0,%a2@(118) new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 49b00: 2541 0018 movel %d1,%a2@(24) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 49b04: 4aaa 001c tstl %a2@(28) 49b08: 6618 bnes 49b22 <_POSIX_Threads_Sporadic_budget_TSR+0x4e><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 49b0a: b2aa 0014 cmpl %a2@(20),%d1 49b0e: 6412 bccs 49b22 <_POSIX_Threads_Sporadic_budget_TSR+0x4e> _Thread_Change_priority( the_thread, new_priority, true ); 49b10: 4878 0001 pea 1 49b14: 2f01 movel %d1,%sp@- 49b16: 2f0a movel %a2,%sp@- 49b18: 4eb9 0004 67e8 jsr 467e8 <_Thread_Change_priority> 49b1e: 4fef 000c lea %sp@(12),%sp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 49b22: 486b 008c pea %a3@(140) 49b26: 4eb9 0004 a9e8 jsr 4a9e8 <_Timespec_To_ticks> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 49b2c: 246e fff8 moveal %fp@(-8),%a2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 49b30: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 49b32: 2740 00b0 movel %d0,%a3@(176) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 49b36: 47eb 00a4 lea %a3@(164),%a3 49b3a: 203c 0005 cde0 movel #380384,%d0 49b40: 2d4b 000c movel %a3,%fp@(12) 49b44: 266e fffc moveal %fp@(-4),%a3 49b48: 2d40 0008 movel %d0,%fp@(8) 49b4c: 4e5e unlk %fp 49b4e: 4ef9 0004 7c50 jmp 47c50 <_Watchdog_Insert> 00049a90 <_POSIX_Threads_Sporadic_budget_callout>: RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 49a90: 4280 clrl %d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 49a92: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 49a94: 4e56 0000 linkw %fp,#0 49a98: 206e 0008 moveal %fp@(8),%a0 49a9c: 1039 0005 b552 moveb 5b552 ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 49aa2: 2268 010e moveal %a0@(270),%a1 49aa6: 90a9 0088 subl %a1@(136),%d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 49aaa: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 49aae: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 49ab2: 4aa8 001c tstl %a0@(28) 49ab6: 6618 bnes 49ad0 <_POSIX_Threads_Sporadic_budget_callout+0x40><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 49ab8: b0a8 0014 cmpl %a0@(20),%d0 49abc: 6312 blss 49ad0 <_POSIX_Threads_Sporadic_budget_callout+0x40><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); 49abe: 4878 0001 pea 1 49ac2: 2f00 movel %d0,%sp@- 49ac4: 2f08 movel %a0,%sp@- 49ac6: 4eb9 0004 67e8 jsr 467e8 <_Thread_Change_priority> 49acc: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 49ad0: 4e5e unlk %fp <== NOT EXECUTED 00044e70 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 44e70: 4e56 0000 linkw %fp,#0 44e74: 2f0a movel %a2,%sp@- 44e76: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 44e7a: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 44e7e: 4aaa 0052 tstl %a2@(82) 44e82: 6606 bnes 44e8a <_POSIX_Timer_TSR+0x1a> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 44e84: 4aaa 0056 tstl %a2@(86) 44e88: 6732 beqs 44ebc <_POSIX_Timer_TSR+0x4c> <== NEVER TAKEN activated = _POSIX_Timer_Insert_helper( 44e8a: 2f0a movel %a2,%sp@- 44e8c: 4879 0004 4e70 pea 44e70 <_POSIX_Timer_TSR> 44e92: 2f2a 0008 movel %a2@(8),%sp@- 44e96: 2f2a 0062 movel %a2@(98),%sp@- 44e9a: 486a 0010 pea %a2@(16) 44e9e: 4eb9 0004 a408 jsr 4a408 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 44ea4: 4fef 0014 lea %sp@(20),%sp 44ea8: 4a00 tstb %d0 44eaa: 672a beqs 44ed6 <_POSIX_Timer_TSR+0x66> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 44eac: 486a 006a pea %a2@(106) 44eb0: 4eb9 0004 6348 jsr 46348 <_TOD_Get> /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 44eb6: 588f addql #4,%sp /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 44eb8: 7003 moveq #3,%d0 44eba: 6002 bras 44ebe <_POSIX_Timer_TSR+0x4e> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 44ebc: 7004 moveq #4,%d0 <== NOT EXECUTED 44ebe: 1540 003c moveb %d0,%a2@(60) /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 44ec2: 2f2a 0042 movel %a2@(66),%sp@- 44ec6: 2f2a 0038 movel %a2@(56),%sp@- 44eca: 4eb9 0004 9fe8 jsr 49fe8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 44ed0: 508f addql #8,%sp 44ed2: 42aa 0066 clrl %a2@(102) } 44ed6: 246e fffc moveal %fp@(-4),%a2 44eda: 4e5e unlk %fp ... 0004b8a0 <_POSIX_signals_Check_signal>: ) { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4b8a0: 4280 clrl %d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4b8a2: 4e56 ffdc linkw %fp,#-36 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4b8a6: 102e 0013 moveb %fp@(19),%d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4b8aa: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4b8ae: 4878 0001 pea 1 4b8b2: 260e movel %fp,%d3 4b8b4: 0683 ffff fff4 addil #-12,%d3 4b8ba: 2f00 movel %d0,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4b8bc: 242e 000c movel %fp@(12),%d2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4b8c0: 2f03 movel %d3,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4b8c2: 246e 0008 moveal %fp@(8),%a2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4b8c6: 2f02 movel %d2,%sp@- 4b8c8: 2f0a movel %a2,%sp@- 4b8ca: 4eb9 0004 b93c jsr 4b93c <_POSIX_signals_Clear_signals> 4b8d0: 4fef 0014 lea %sp@(20),%sp 4b8d4: 4a00 tstb %d0 4b8d6: 6758 beqs 4b930 <_POSIX_signals_Check_signal+0x90> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4b8d8: 2202 movel %d2,%d1 4b8da: 2002 movel %d2,%d0 4b8dc: 43f9 0005 d1b6 lea 5d1b6 <_POSIX_signals_Vectors>,%a1 4b8e2: e589 lsll #2,%d1 4b8e4: e988 lsll #4,%d0 4b8e6: 9081 subl %d1,%d0 4b8e8: 2040 moveal %d0,%a0 4b8ea: d1fc 0005 d1be addal #381374,%a0 4b8f0: 7201 moveq #1,%d1 4b8f2: 2050 moveal %a0@,%a0 4b8f4: b288 cmpl %a0,%d1 4b8f6: 6738 beqs 4b930 <_POSIX_signals_Check_signal+0x90><== NEVER TAKEN /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4b8f8: 2842 moveal %d2,%a4 4b8fa: 47f4 2a01 lea %a4@(00000001,%d2:l:2),%a3 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4b8fe: 282a 00cc movel %a2@(204),%d4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4b902: 2231 bc00 movel %a1@(00000000,%a3:l:4),%d1 4b906: 8284 orl %d4,%d1 4b908: 2541 00cc movel %d1,%a2@(204) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4b90c: 7202 moveq #2,%d1 4b90e: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1 4b912: 660e bnes 4b922 <_POSIX_signals_Check_signal+0x82> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4b914: 42a7 clrl %sp@- 4b916: 2f03 movel %d3,%sp@- 4b918: 2f02 movel %d2,%sp@- 4b91a: 4e90 jsr %a0@ signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 4b91c: 4fef 000c lea %sp@(12),%sp 4b920: 6006 bras 4b928 <_POSIX_signals_Check_signal+0x88> default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4b922: 2f02 movel %d2,%sp@- 4b924: 4e90 jsr %a0@ 4b926: 588f addql #4,%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4b928: 2544 00cc movel %d4,%a2@(204) 4b92c: 7001 moveq #1,%d0 return true; 4b92e: 6002 bras 4b932 <_POSIX_signals_Check_signal+0x92> 4b930: 4200 clrb %d0 } 4b932: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 4b938: 4e5e unlk %fp <== NOT EXECUTED 0004c7d8 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4c7d8: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4c7de: 4e56 0000 linkw %fp,#0 4c7e2: 222e 0008 movel %fp@(8),%d1 4c7e6: 2f03 movel %d3,%sp@- 4c7e8: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4c7ea: 40c2 movew %sr,%d2 4c7ec: 8082 orl %d2,%d0 4c7ee: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4c7f0: 2601 movel %d1,%d3 4c7f2: 2001 movel %d1,%d0 4c7f4: 41f9 0005 d1b6 lea 5d1b6 <_POSIX_signals_Vectors>,%a0 4c7fa: e58b lsll #2,%d3 4c7fc: e988 lsll #4,%d0 4c7fe: 9083 subl %d3,%d0 4c800: 7602 moveq #2,%d3 4c802: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4c806: 6610 bnes 4c818 <_POSIX_signals_Clear_process_signals+0x40> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4c808: 2040 moveal %d0,%a0 4c80a: d1fc 0005 d3ae addal #381870,%a0 4c810: 2008 movel %a0,%d0 4c812: 5880 addql #4,%d0 4c814: b090 cmpl %a0@,%d0 4c816: 661c bnes 4c834 <_POSIX_signals_Clear_process_signals+0x5c><== NEVER TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4c818: 5381 subql #1,%d1 4c81a: 7001 moveq #1,%d0 4c81c: e3a8 lsll %d1,%d0 4c81e: 4680 notl %d0 4c820: c0b9 0005 d3aa andl 5d3aa <_POSIX_signals_Pending>,%d0 4c826: 23c0 0005 d3aa movel %d0,5d3aa <_POSIX_signals_Pending> if ( !_POSIX_signals_Pending ) 4c82c: 6606 bnes 4c834 <_POSIX_signals_Clear_process_signals+0x5c><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 4c82e: 53b9 0005 cdaa subql #1,5cdaa <_Thread_Do_post_task_switch_extension> } _ISR_Enable( level ); 4c834: 46c2 movew %d2,%sr } 4c836: 241f movel %sp@+,%d2 4c838: 261f movel %sp@+,%d3 4c83a: 4e5e unlk %fp ... 00045980 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 45980: 701b moveq #27,%d0 45982: 4e56 fff4 linkw %fp,#-12 45986: 48d7 001c moveml %d2-%d4,%sp@ 4598a: 242e 0008 movel %fp@(8),%d2 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 4598e: 7601 moveq #1,%d3 45990: 2200 movel %d0,%d1 45992: 5381 subql #1,%d1 45994: 2803 movel %d3,%d4 45996: e3ac lsll %d1,%d4 45998: 2204 movel %d4,%d1 4599a: c282 andl %d2,%d1 4599c: 6626 bnes 459c4 <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4599e: 5280 addql #1,%d0 459a0: 123c 0020 moveb #32,%d1 459a4: b280 cmpl %d0,%d1 459a6: 66e8 bnes 45990 <_POSIX_signals_Get_highest+0x10> 459a8: 7001 moveq #1,%d0 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 459aa: 7601 moveq #1,%d3 459ac: 2200 movel %d0,%d1 459ae: 5381 subql #1,%d1 459b0: 2803 movel %d3,%d4 459b2: e3ac lsll %d1,%d4 459b4: 2204 movel %d4,%d1 459b6: c282 andl %d2,%d1 459b8: 660a bnes 459c4 <_POSIX_signals_Get_highest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 459ba: 5280 addql #1,%d0 459bc: 123c 001b moveb #27,%d1 459c0: b280 cmpl %d0,%d1 459c2: 66e8 bnes 459ac <_POSIX_signals_Get_highest+0x2c><== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 459c4: 4cd7 001c moveml %sp@,%d2-%d4 459c8: 4e5e unlk %fp <== NOT EXECUTED 00044e4c <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 44e4c: 4e56 0000 linkw %fp,#0 /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 44e50: 4eb9 0004 24e8 jsr 424e8 44e56: 4878 000e pea e 44e5a: 2f00 movel %d0,%sp@- 44e5c: 4eb9 0004 4b6c jsr 44b6c RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 44e62: 4879 0005 ecde pea 5ecde <_POSIX_signals_Ualarm_timer> 44e68: 4eb9 0004 8338 jsr 48338 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44e6e: 4fef 000c lea %sp@(12),%sp 44e72: 203c 0005 ecde movel #388318,%d0 44e78: 2d40 000c movel %d0,%fp@(12) 44e7c: 203c 0005 e590 movel #386448,%d0 44e82: 2d40 0008 movel %d0,%fp@(8) /* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); } 44e86: 4e5e unlk %fp 44e88: 4ef9 0004 821c jmp 4821c <_Watchdog_Insert> ... 0004c870 <_POSIX_signals_Unblock_thread>: 4c870: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4c872: 4e56 fff4 linkw %fp,#-12 4c876: 226e 000c moveal %fp@(12),%a1 4c87a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4c87e: 246e 0008 moveal %fp@(8),%a2 4c882: 2609 movel %a1,%d3 4c884: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4c886: 242a 0010 movel %a2@(16),%d2 4c88a: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4c890: 222e 0010 movel %fp@(16),%d1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c894: 206a 010e moveal %a2@(270),%a0 4c898: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4c89a: 0c82 1000 8000 cmpil #268468224,%d2 4c8a0: 6652 bnes 4c8f4 <_POSIX_signals_Unblock_thread+0x84> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 4c8a2: 2400 movel %d0,%d2 4c8a4: c4aa 0030 andl %a2@(48),%d2 4c8a8: 660c bnes 4c8b6 <_POSIX_signals_Unblock_thread+0x46> 4c8aa: 2428 00cc movel %a0@(204),%d2 4c8ae: 4682 notl %d2 4c8b0: c082 andl %d2,%d0 4c8b2: 6700 00ac beqw 4c960 <_POSIX_signals_Unblock_thread+0xf0> the_thread->Wait.return_code = EINTR; 4c8b6: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4c8b8: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 4c8bc: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4c8c0: 4a81 tstl %d1 4c8c2: 6610 bnes 4c8d4 <_POSIX_signals_Unblock_thread+0x64> the_info->si_signo = signo; the_info->si_code = SI_USER; 4c8c4: 123c 0001 moveb #1,%d1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 4c8c8: 2089 movel %a1,%a0@ the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 4c8ca: 42a8 0008 clrl %a0@(8) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 4c8ce: 2141 0004 movel %d1,%a0@(4) 4c8d2: 6012 bras 4c8e6 <_POSIX_signals_Unblock_thread+0x76> the_info->si_value.sival_int = 0; } else { *the_info = *info; 4c8d4: 4878 000c pea c 4c8d8: 2f01 movel %d1,%sp@- 4c8da: 2f08 movel %a0,%sp@- 4c8dc: 4eb9 0004 d2a8 jsr 4d2a8 4c8e2: 4fef 000c lea %sp@(12),%sp } _Thread_queue_Extract_with_proxy( the_thread ); 4c8e6: 2f0a movel %a2,%sp@- 4c8e8: 4eb9 0004 7350 jsr 47350 <_Thread_queue_Extract_with_proxy> return true; 4c8ee: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4c8f0: 7001 moveq #1,%d0 return true; 4c8f2: 606e bras 4c962 <_POSIX_signals_Unblock_thread+0xf2> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 4c8f4: 2228 00cc movel %a0@(204),%d1 4c8f8: 4681 notl %d1 4c8fa: c081 andl %d1,%d0 4c8fc: 6762 beqs 4c960 <_POSIX_signals_Unblock_thread+0xf0> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4c8fe: 202a 0010 movel %a2@(16),%d0 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 4c902: 7201 moveq #1,%d1 4c904: 1541 0074 moveb %d1,%a2@(116) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4c908: 0800 001c btst #28,%d0 4c90c: 6736 beqs 4c944 <_POSIX_signals_Unblock_thread+0xd4> the_thread->Wait.return_code = EINTR; 4c90e: 7004 moveq #4,%d0 4c910: 2540 0034 movel %d0,%a2@(52) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 4c914: 103c 0008 moveb #8,%d0 4c918: c0aa 0010 andl %a2@(16),%d0 4c91c: 6742 beqs 4c960 <_POSIX_signals_Unblock_thread+0xf0><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4c91e: 7202 moveq #2,%d1 4c920: b2aa 0050 cmpl %a2@(80),%d1 4c924: 660c bnes 4c932 <_POSIX_signals_Unblock_thread+0xc2><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 4c926: 486a 0048 pea %a2@(72) 4c92a: 4eb9 0004 7d6c jsr 47d6c <_Watchdog_Remove> 4c930: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4c932: 2f3c 1003 fff8 movel #268697592,%sp@- 4c938: 2f0a movel %a2,%sp@- 4c93a: 4eb9 0004 6928 jsr 46928 <_Thread_Clear_state> 4c940: 508f addql #8,%sp 4c942: 601c bras 4c960 <_POSIX_signals_Unblock_thread+0xf0> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 4c944: 4a80 tstl %d0 4c946: 6618 bnes 4c960 <_POSIX_signals_Unblock_thread+0xf0><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4c948: 2039 0005 cda2 movel 5cda2 <_ISR_Nest_level>,%d0 4c94e: 6710 beqs 4c960 <_POSIX_signals_Unblock_thread+0xf0> 4c950: b5f9 0005 cdc2 cmpal 5cdc2 <_Thread_Executing>,%a2 4c956: 6608 bnes 4c960 <_POSIX_signals_Unblock_thread+0xf0><== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 4c958: 7001 moveq #1,%d0 4c95a: 13c0 0005 ce50 moveb %d0,5ce50 <_ISR_Signals_to_thread_executing> 4c960: 4200 clrb %d0 } } return false; } 4c962: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4c968: 4e5e unlk %fp <== NOT EXECUTED 00049e32 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 49e32: 4e56 ffec linkw %fp,#-20 49e36: 206e 0008 moveal %fp@(8),%a0 49e3a: 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 ]; 49e3e: 2468 010a moveal %a0@(266),%a2 if ( !api ) 49e42: 4a8a tstl %a2 49e44: 6754 beqs 49e9a <_RTEMS_tasks_Post_switch_extension+0x68><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 49e46: 203c 0000 0700 movel #1792,%d0 49e4c: 40c1 movew %sr,%d1 49e4e: 8081 orl %d1,%d0 49e50: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 49e52: 262a 0012 movel %a2@(18),%d3 asr->signals_posted = 0; 49e56: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 49e5a: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 49e5c: 4a83 tstl %d3 49e5e: 673a beqs 49e9a <_RTEMS_tasks_Post_switch_extension+0x68> return; asr->nest_level += 1; 49e60: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 49e64: 240e movel %fp,%d2 49e66: 5982 subql #4,%d2 49e68: 47f9 0004 bc9c lea 4bc9c ,%a3 49e6e: 2f02 movel %d2,%sp@- 49e70: 2f3c 0000 ffff movel #65535,%sp@- 49e76: 2f2a 000e movel %a2@(14),%sp@- 49e7a: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 49e7c: 2f03 movel %d3,%sp@- 49e7e: 206a 000a moveal %a2@(10),%a0 49e82: 4e90 jsr %a0@ asr->nest_level -= 1; 49e84: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 49e88: 2f02 movel %d2,%sp@- 49e8a: 2f3c 0000 ffff movel #65535,%sp@- 49e90: 2f2e fffc movel %fp@(-4),%sp@- 49e94: 4e93 jsr %a3@ 49e96: 4fef 001c lea %sp@(28),%sp } 49e9a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 49ea0: 4e5e unlk %fp <== NOT EXECUTED 00049d92 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 49d92: 4e56 0000 linkw %fp,#0 49d96: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 49d9a: 2068 011a moveal %a0@(282),%a0 while (tvp) { 49d9e: 600e bras 49dae <_RTEMS_tasks_Switch_extension+0x1c> tvp->tval = *tvp->ptr; 49da0: 2268 0004 moveal %a0@(4),%a1 49da4: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 49da8: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 49dac: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 49dae: 4a88 tstl %a0 49db0: 66ee bnes 49da0 <_RTEMS_tasks_Switch_extension+0xe><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 49db2: 206e 000c moveal %fp@(12),%a0 49db6: 2068 011a moveal %a0@(282),%a0 while (tvp) { 49dba: 600e bras 49dca <_RTEMS_tasks_Switch_extension+0x38> tvp->gval = *tvp->ptr; 49dbc: 2268 0004 moveal %a0@(4),%a1 49dc0: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 49dc4: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 49dc8: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 49dca: 4a88 tstl %a0 49dcc: 66ee bnes 49dbc <_RTEMS_tasks_Switch_extension+0x2a> tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 49dce: 4e5e unlk %fp <== NOT EXECUTED 00057360 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 57360: 4e56 ffe4 linkw %fp,#-28 57364: 2039 0007 545c movel 7545c <_Thread_Dispatch_disable_level>,%d0 5736a: 5280 addql #1,%d0 5736c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 57370: 266e 0008 moveal %fp@(8),%a3 57374: 23c0 0007 545c movel %d0,7545c <_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(); 5737a: 2f39 0007 550e movel 7550e <_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 ); 57380: 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 ); 57382: 280b movel %a3,%d4 57384: 0682 0000 0010 addil #16,%d2 5738a: 0684 0000 0068 addil #104,%d4 57390: 4bf9 0005 2a14 lea 52a14 <_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 ); 57396: 49f9 0005 7a6c lea 57a6c <_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(); 5739c: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> 573a2: 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 ); 573a4: 263c 0005 7b70 movel #359280,%d3 573aa: 2f02 movel %d2,%sp@- 573ac: 2043 moveal %d3,%a0 573ae: 4e90 jsr %a0@ if ( the_thread == NULL ) 573b0: 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 ); 573b2: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 573b4: 4a80 tstl %d0 573b6: 672c beqs 573e4 <_Region_Process_queue+0x84> 573b8: 42a7 clrl %sp@- 573ba: 42a7 clrl %sp@- 573bc: 2f2a 0024 movel %a2@(36),%sp@- 573c0: 2f04 movel %d4,%sp@- 573c2: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 573c4: 4fef 0010 lea %sp@(16),%sp 573c8: 4a80 tstl %d0 573ca: 6718 beqs 573e4 <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 573cc: 206a 0028 moveal %a2@(40),%a0 the_region->number_of_used_blocks += 1; 573d0: 52ab 0064 addql #1,%a3@(100) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 573d4: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 573d6: 2f0a movel %a2,%sp@- 573d8: 2f02 movel %d2,%sp@- 573da: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 573dc: 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; 573de: 42aa 0034 clrl %a2@(52) } 573e2: 60c6 bras 573aa <_Region_Process_queue+0x4a> _Thread_Enable_dispatch(); } 573e4: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 573ea: 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(); 573ec: 4ef9 0005 4012 jmp 54012 <_Thread_Enable_dispatch> ... 000458e4 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 458e4: 4e56 0000 linkw %fp,#0 458e8: 206e 0008 moveal %fp@(8),%a0 458ec: 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(); 458ee: 2039 0005 d6b0 movel 5d6b0 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 458f4: 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) || 458f6: 4a88 tstl %a0 458f8: 6762 beqs 4595c <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 458fa: 243c 000f 4240 movel #1000000,%d2 45900: 4c40 2002 remul %d0,%d2,%d2 45904: b4a8 0018 cmpl %a0@(24),%d2 45908: 6352 blss 4595c <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 4590a: 763b moveq #59,%d3 4590c: b6a8 0014 cmpl %a0@(20),%d3 45910: 654a bcss 4595c <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 45912: b6a8 0010 cmpl %a0@(16),%d3 45916: 6544 bcss 4595c <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->hour >= TOD_HOURS_PER_DAY) || 45918: 7017 moveq #23,%d0 4591a: b0a8 000c cmpl %a0@(12),%d0 4591e: 653c bcss 4595c <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->month == 0) || 45920: 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) || 45924: 6736 beqs 4595c <_TOD_Validate+0x78> <== NEVER TAKEN 45926: 720c moveq #12,%d1 45928: b280 cmpl %d0,%d1 4592a: 6530 bcss 4595c <_TOD_Validate+0x78> <== NEVER TAKEN (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) || 4592c: 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) || 4592e: 0c82 0000 07c3 cmpil #1987,%d2 45934: 6326 blss 4595c <_TOD_Validate+0x78> <== NEVER TAKEN (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) ) 45936: 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) || 4593a: 6720 beqs 4595c <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 4593c: 163c 0003 moveb #3,%d3 45940: 41f9 0005 c47e lea 5c47e <_TOD_Days_per_month>,%a0 45946: c483 andl %d3,%d2 45948: 6606 bnes 45950 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 4594a: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 4594e: 6004 bras 45954 <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 45950: 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( 45954: b081 cmpl %d1,%d0 45956: 54c0 scc %d0 45958: 4480 negl %d0 4595a: 6002 bras 4595e <_TOD_Validate+0x7a> 4595c: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 4595e: 241f movel %sp@+,%d2 45960: 261f movel %sp@+,%d3 45962: 4e5e unlk %fp ... 000467e8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 467e8: 4e56 fff0 linkw %fp,#-16 467ec: 48d7 041c moveml %d2-%d4/%a2,%sp@ 467f0: 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 ); 467f4: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 467f6: 262e 000c movel %fp@(12),%d3 */ /* * Save original state */ original_state = the_thread->current_state; 467fa: 242a 0010 movel %a2@(16),%d2 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 467fe: 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 ); 46802: 4eb9 0004 75f8 jsr 475f8 <_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 ) 46808: 588f addql #4,%sp 4680a: b6aa 0014 cmpl %a2@(20),%d3 4680e: 670c beqs 4681c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 46810: 2f03 movel %d3,%sp@- 46812: 2f0a movel %a2,%sp@- 46814: 4eb9 0004 74a0 jsr 474a0 <_Thread_Set_priority> 4681a: 508f addql #8,%sp _ISR_Disable( level ); 4681c: 223c 0000 0700 movel #1792,%d1 46822: 40c0 movew %sr,%d0 46824: 8280 orl %d0,%d1 46826: 46c1 movew %d1,%sr 46828: 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; 4682a: 222a 0010 movel %a2@(16),%d1 4682e: c483 andl %d3,%d2 if ( state != STATES_TRANSIENT ) { 46830: b681 cmpl %d1,%d3 46832: 6730 beqs 46864 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 46834: 4a82 tstl %d2 46836: 6608 bnes 46840 <_Thread_Change_priority+0x58> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 46838: 74fb moveq #-5,%d2 4683a: c481 andl %d1,%d2 4683c: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 46840: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 46842: 0281 0003 bee0 andil #245472,%d1 46848: 6700 00d2 beqw 4691c <_Thread_Change_priority+0x134> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 4684c: 2d4a 000c movel %a2,%fp@(12) 46850: 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 ); } 46856: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4685c: 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 ); 4685e: 4ef9 0004 7404 jmp 47404 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 46864: 4a82 tstl %d2 46866: 6650 bnes 468b8 <_Thread_Change_priority+0xd0> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 46868: 226a 008e moveal %a2@(142),%a1 4686c: 322a 0094 movew %a2@(148),%d1 46870: 3411 movew %a1@,%d2 46872: 206a 008a moveal %a2@(138),%a0 46876: 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 ); 46878: 42aa 0010 clrl %a2@(16) 4687c: 3281 movew %d1,%a1@ _Priority_Major_bit_map |= the_priority_map->ready_major; 4687e: 3239 0005 cdb8 movew 5cdb8 <_Priority_Major_bit_map>,%d1 46884: 342a 0092 movew %a2@(146),%d2 46888: 8282 orl %d2,%d1 4688a: 33c1 0005 cdb8 movew %d1,5cdb8 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 46890: 4a04 tstb %d4 46892: 6710 beqs 468a4 <_Thread_Change_priority+0xbc> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 46894: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 46896: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 4689a: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 4689c: 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; 468a0: 2489 movel %a1,%a2@ 468a2: 6014 bras 468b8 <_Thread_Change_priority+0xd0> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 468a4: 2608 movel %a0,%d3 468a6: 5883 addql #4,%d3 468a8: 2483 movel %d3,%a2@ old_last_node = the_chain->last; 468aa: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 468ae: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 468b2: 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; 468b6: 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 ); 468b8: 223c 0000 0700 movel #1792,%d1 468be: 46c0 movew %d0,%sr 468c0: 8280 orl %d0,%d1 468c2: 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 ); 468c4: 3239 0005 cdb8 movew 5cdb8 <_Priority_Major_bit_map>,%d1 468ca: 4841 swap %d1 468cc: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 468ce: 4282 clrl %d2 468d0: 41f9 0005 ce28 lea 5ce28 <_Priority_Bit_map>,%a0 468d6: 3401 movew %d1,%d2 468d8: 3230 2a00 movew %a0@(00000000,%d2:l:2),%d1 468dc: 4841 swap %d1 468de: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 468e0: 4283 clrl %d3 468e2: e98a lsll #4,%d2 468e4: 3601 movew %d1,%d3 468e6: 2279 0005 ccb4 moveal 5ccb4 <_Thread_Ready_chain>,%a1 468ec: 2202 movel %d2,%d1 468ee: d283 addl %d3,%d1 468f0: 2401 movel %d1,%d2 468f2: e58a lsll #2,%d2 468f4: 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 ); 468f6: 2079 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 468fc: 93c2 subal %d2,%a1 468fe: 2231 1800 movel %a1@(00000000,%d1:l),%d1 46902: 23c1 0005 cd96 movel %d1,5cd96 <_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() && 46908: b288 cmpl %a0,%d1 4690a: 670e beqs 4691a <_Thread_Change_priority+0x132> _Thread_Executing->is_preemptible ) 4690c: 4a28 0075 tstb %a0@(117) 46910: 6708 beqs 4691a <_Thread_Change_priority+0x132> _Context_Switch_necessary = true; 46912: 7201 moveq #1,%d1 46914: 13c1 0005 cdd2 moveb %d1,5cdd2 <_Context_Switch_necessary> _ISR_Enable( level ); 4691a: 46c0 movew %d0,%sr } 4691c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 46922: 4e5e unlk %fp ... 00046928 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 46928: 4e56 ffec linkw %fp,#-20 4692c: 206e 0008 moveal %fp@(8),%a0 46930: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 46934: 263c 0000 0700 movel #1792,%d3 4693a: 2203 movel %d3,%d1 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4693c: 202e 000c movel %fp@(12),%d0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 46940: 40c2 movew %sr,%d2 46942: 8282 orl %d2,%d1 46944: 46c1 movew %d1,%sr current_state = the_thread->current_state; 46946: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 4694a: 2800 movel %d0,%d4 4694c: c881 andl %d1,%d4 4694e: 6778 beqs 469c8 <_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); 46950: 4680 notl %d0 46952: c081 andl %d1,%d0 current_state = 46954: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 46958: 666e bnes 469c8 <_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; 4695a: 2668 008e moveal %a0@(142),%a3 4695e: 3028 0094 movew %a0@(148),%d0 46962: 3213 movew %a3@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 46964: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 46968: 2809 movel %a1,%d4 4696a: 5884 addql #4,%d4 4696c: 8081 orl %d1,%d0 4696e: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 46970: 2469 0008 moveal %a1@(8),%a2 46974: 3680 movew %d0,%a3@ the_chain->last = the_node; 46976: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4697a: 3039 0005 cdb8 movew 5cdb8 <_Priority_Major_bit_map>,%d0 46980: 3228 0092 movew %a0@(146),%d1 old_last_node->next = the_node; the_node->previous = old_last_node; 46984: 214a 0004 movel %a2,%a0@(4) 46988: 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; 4698a: 2488 movel %a0,%a2@ 4698c: 33c0 0005 cdb8 movew %d0,5cdb8 <_Priority_Major_bit_map> _ISR_Flash( level ); 46992: 2003 movel %d3,%d0 46994: 46c2 movew %d2,%sr 46996: 8082 orl %d2,%d0 46998: 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 ) { 4699a: 2028 0014 movel %a0@(20),%d0 4699e: 2279 0005 cd96 moveal 5cd96 <_Thread_Heir>,%a1 469a4: b0a9 0014 cmpl %a1@(20),%d0 469a8: 641e bccs 469c8 <_Thread_Clear_state+0xa0> _Thread_Heir = the_thread; 469aa: 23c8 0005 cd96 movel %a0,5cd96 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 469b0: 2079 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a0 469b6: 4a28 0075 tstb %a0@(117) 469ba: 6604 bnes 469c0 <_Thread_Clear_state+0x98> 469bc: 4a80 tstl %d0 469be: 6608 bnes 469c8 <_Thread_Clear_state+0xa0> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 469c0: 7001 moveq #1,%d0 469c2: 13c0 0005 cdd2 moveb %d0,5cdd2 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 469c8: 46c2 movew %d2,%sr } 469ca: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 469ce: 4e5e unlk %fp ... 00046b54 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 46b54: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 46b58: 486e fffc pea %fp@(-4) 46b5c: 2f2e 0008 movel %fp@(8),%sp@- 46b60: 4eb9 0004 6d08 jsr 46d08 <_Thread_Get> switch ( location ) { 46b66: 508f addql #8,%sp 46b68: 4aae fffc tstl %fp@(-4) 46b6c: 661e bnes 46b8c <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 46b6e: 2f3c 1000 0018 movel #268435480,%sp@- 46b74: 2f00 movel %d0,%sp@- 46b76: 4eb9 0004 6928 jsr 46928 <_Thread_Clear_state> 46b7c: 508f addql #8,%sp 46b7e: 2039 0005 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0 46b84: 5380 subql #1,%d0 46b86: 23c0 0005 cd08 movel %d0,5cd08 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 46b8c: 4e5e unlk %fp <== NOT EXECUTED 00046b90 <_Thread_Dispatch>: Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 46b90: 307c 0700 moveaw #1792,%a0 46b94: 2208 movel %a0,%d1 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 46b96: 4e56 ffc8 linkw %fp,#-56 46b9a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 46b9e: 2479 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a2 _ISR_Disable( level ); 46ba4: 40c0 movew %sr,%d0 46ba6: 8280 orl %d0,%d1 46ba8: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46baa: 260e movel %fp,%d3 _Timestamp_Subtract( 46bac: 240e movel %fp,%d2 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46bae: 5183 subql #8,%d3 _Timestamp_Subtract( 46bb0: 0682 ffff fff0 addil #-16,%d2 46bb6: 2e3c 0004 79a0 movel #293280,%d7 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 46bbc: 2c3c 0004 7968 movel #293224,%d6 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 46bc2: 2a3c 0004 7c18 movel #293912,%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 ); 46bc8: 4bf9 0004 8088 lea 48088 <_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 ); 46bce: 49f9 0004 8066 lea 48066 <_CPU_Context_save_fp>,%a4 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 46bd4: 283c 0004 7f30 movel #294704,%d4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 46bda: 6000 00d0 braw 46cac <_Thread_Dispatch+0x11c> heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 46bde: 7201 moveq #1,%d1 46be0: 23c1 0005 cd08 movel %d1,5cd08 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 46be6: 2679 0005 cd96 moveal 5cd96 <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 46bec: 4201 clrb %d1 _Thread_Executing = heir; 46bee: 23cb 0005 cdc2 movel %a3,5cdc2 <_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; 46bf4: 13c1 0005 cdd2 moveb %d1,5cdd2 <_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 ) 46bfa: 7201 moveq #1,%d1 46bfc: b2ab 007a cmpl %a3@(122),%d1 46c00: 660a bnes 46c0c <_Thread_Dispatch+0x7c> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 46c02: 41f9 0005 ccb8 lea 5ccb8 <_Thread_Ticks_per_timeslice>,%a0 46c08: 2750 0076 movel %a0@,%a3@(118) _ISR_Enable( level ); 46c0c: 46c0 movew %d0,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46c0e: 2f03 movel %d3,%sp@- 46c10: 4eb9 0004 a244 jsr 4a244 <_TOD_Get_uptime> _Timestamp_Subtract( 46c16: 2047 moveal %d7,%a0 46c18: 2f02 movel %d2,%sp@- 46c1a: 2f03 movel %d3,%sp@- 46c1c: 4879 0005 cdca pea 5cdca <_Thread_Time_of_last_context_switch> 46c22: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 46c24: 2046 moveal %d6,%a0 46c26: 2f02 movel %d2,%sp@- 46c28: 486a 0082 pea %a2@(130) 46c2c: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 46c2e: 2079 0005 cd92 moveal 5cd92 <_Thread_libc_reent>,%a0 46c34: 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; 46c38: 202e fff8 movel %fp@(-8),%d0 46c3c: 222e fffc movel %fp@(-4),%d1 46c40: 23c0 0005 cdca movel %d0,5cdca <_Thread_Time_of_last_context_switch> 46c46: 23c1 0005 cdce movel %d1,5cdce <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 46c4c: 4a88 tstl %a0 46c4e: 6708 beqs 46c58 <_Thread_Dispatch+0xc8> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 46c50: 2550 0106 movel %a0@,%a2@(262) *_Thread_libc_reent = heir->libc_reent; 46c54: 20ab 0106 movel %a3@(262),%a0@ } _User_extensions_Thread_switch( executing, heir ); 46c58: 2f0b movel %a3,%sp@- 46c5a: 2045 moveal %d5,%a0 46c5c: 2f0a movel %a2,%sp@- 46c5e: 4e90 jsr %a0@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 46c60: 486b 00ce pea %a3@(206) 46c64: 2044 moveal %d4,%a0 46c66: 486a 00ce pea %a2@(206) 46c6a: 4e90 jsr %a0@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 46c6c: 4fef 0010 lea %sp@(16),%sp 46c70: 4aaa 0102 tstl %a2@(258) 46c74: 6724 beqs 46c9a <_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 ); 46c76: 2079 0005 cd8e moveal 5cd8e <_Thread_Allocated_fp>,%a0 46c7c: b1ca cmpal %a2,%a0 46c7e: 671a beqs 46c9a <_Thread_Dispatch+0x10a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 46c80: 4a88 tstl %a0 46c82: 6708 beqs 46c8c <_Thread_Dispatch+0xfc> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 46c84: 4868 0102 pea %a0@(258) 46c88: 4e94 jsr %a4@ 46c8a: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 46c8c: 486a 0102 pea %a2@(258) 46c90: 4e95 jsr %a5@ _Thread_Allocated_fp = executing; 46c92: 588f addql #4,%sp 46c94: 23ca 0005 cd8e movel %a2,5cd8e <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 46c9a: 2479 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a2 _ISR_Disable( level ); 46ca0: 223c 0000 0700 movel #1792,%d1 46ca6: 40c0 movew %sr,%d0 46ca8: 8280 orl %d0,%d1 46caa: 46c1 movew %d1,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 46cac: 1239 0005 cdd2 moveb 5cdd2 <_Context_Switch_necessary>,%d1 46cb2: 6600 ff2a bnew 46bde <_Thread_Dispatch+0x4e> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 46cb6: 42b9 0005 cd08 clrl 5cd08 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 46cbc: 46c0 movew %d0,%sr if ( _Thread_Do_post_task_switch_extension || 46cbe: 4ab9 0005 cdaa tstl 5cdaa <_Thread_Do_post_task_switch_extension> 46cc4: 6606 bnes 46ccc <_Thread_Dispatch+0x13c> executing->do_post_task_switch_extension ) { 46cc6: 4a2a 0074 tstb %a2@(116) 46cca: 670c beqs 46cd8 <_Thread_Dispatch+0x148> executing->do_post_task_switch_extension = false; 46ccc: 4200 clrb %d0 46cce: 1540 0074 moveb %d0,%a2@(116) _API_extensions_Run_postswitch(); 46cd2: 4eb9 0004 5786 jsr 45786 <_API_extensions_Run_postswitch> } } 46cd8: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 46cde: 4e5e unlk %fp <== NOT EXECUTED 0004c094 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4c094: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4c098: 2079 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4c09e: 4aa8 0010 tstl %a0@(16) 4c0a2: 660e bnes 4c0b2 <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN 4c0a4: b1f9 0005 cd96 cmpal 5cd96 <_Thread_Heir>,%a0 4c0aa: 6710 beqs 4c0bc <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4c0ac: 4a28 0075 tstb %a0@(117) 4c0b0: 670a beqs 4c0bc <_Thread_Evaluate_mode+0x28> <== NEVER TAKEN _Context_Switch_necessary = true; 4c0b2: 7001 moveq #1,%d0 4c0b4: 13c0 0005 cdd2 moveb %d0,5cdd2 <_Context_Switch_necessary> return true; 4c0ba: 6002 bras 4c0be <_Thread_Evaluate_mode+0x2a> 4c0bc: 4200 clrb %d0 } return false; } 4c0be: 4e5e unlk %fp ... 0004c0c4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4c0c4: 4e56 0000 linkw %fp,#0 4c0c8: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4c0ca: 2479 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4c0d0: 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; 4c0d2: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4c0d6: 40c0 movew %sr,%d0 4c0d8: e189 lsll #8,%d1 4c0da: 0280 0000 f8ff andil #63743,%d0 4c0e0: 8081 orl %d1,%d0 4c0e2: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4c0e4: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4c0e6: 1439 0005 c4b8 moveb 5c4b8 ,%d2 doneConstructors = 1; 4c0ec: 13c0 0005 c4b8 moveb %d0,5c4b8 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4c0f2: 4aaa 0102 tstl %a2@(258) 4c0f6: 6720 beqs 4c118 <_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 ); 4c0f8: 2079 0005 cd8e moveal 5cd8e <_Thread_Allocated_fp>,%a0 4c0fe: b1ca cmpal %a2,%a0 4c100: 6716 beqs 4c118 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4c102: 4a88 tstl %a0 4c104: 670c beqs 4c112 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4c106: 4868 0102 pea %a0@(258) 4c10a: 4eb9 0004 8066 jsr 48066 <_CPU_Context_save_fp> 4c110: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4c112: 23ca 0005 cd8e movel %a2,5cd8e <_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 ); 4c118: 2f0a movel %a2,%sp@- 4c11a: 4eb9 0004 7a98 jsr 47a98 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4c120: 4eb9 0004 6ce2 jsr 46ce2 <_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) */ { 4c126: 588f addql #4,%sp 4c128: 4a02 tstb %d2 4c12a: 6606 bnes 4c132 <_Thread_Handler+0x6e> INIT_NAME (); 4c12c: 4eb9 0005 99ac jsr 599ac <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4c132: 202a 009e movel %a2@(158),%d0 4c136: 6606 bnes 4c13e <_Thread_Handler+0x7a> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4c138: 2f2a 00a6 movel %a2@(166),%sp@- 4c13c: 600a bras 4c148 <_Thread_Handler+0x84> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4c13e: 7201 moveq #1,%d1 4c140: b280 cmpl %d0,%d1 4c142: 6610 bnes 4c154 <_Thread_Handler+0x90> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4c144: 2f2a 00a2 movel %a2@(162),%sp@- 4c148: 206a 009a moveal %a2@(154),%a0 4c14c: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4c14e: 588f addql #4,%sp 4c150: 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 ); 4c154: 2f0a movel %a2,%sp@- 4c156: 4eb9 0004 7ad0 jsr 47ad0 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4c15c: 4878 0006 pea 6 4c160: 4878 0001 pea 1 4c164: 42a7 clrl %sp@- 4c166: 4eb9 0004 5fd8 jsr 45fd8 <_Internal_error_Occurred> 00046d94 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46d94: 4e56 ffe8 linkw %fp,#-24 46d98: 222e 0010 movel %fp@(16),%d1 46d9c: 48d7 047c moveml %d2-%d6/%a2,%sp@ 46da0: 246e 000c moveal %fp@(12),%a2 46da4: 242e 0014 movel %fp@(20),%d2 46da8: 282e 001c movel %fp@(28),%d4 46dac: 2a2e 0024 movel %fp@(36),%d5 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 46db0: 42aa 010a clrl %a2@(266) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46db4: 162e 001b moveb %fp@(27),%d3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 46db8: 42aa 010e clrl %a2@(270) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46dbc: 1c2e 0023 moveb %fp@(35),%d6 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 46dc0: 42aa 0112 clrl %a2@(274) extensions_area = NULL; the_thread->libc_reent = NULL; 46dc4: 42aa 0106 clrl %a2@(262) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 46dc8: 4a81 tstl %d1 46dca: 6620 bnes 46dec <_Thread_Initialize+0x58> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 46dcc: 2f02 movel %d2,%sp@- 46dce: 2f0a movel %a2,%sp@- 46dd0: 4eb9 0004 7674 jsr 47674 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 46dd6: 508f addql #8,%sp 46dd8: 4a80 tstl %d0 46dda: 6700 0176 beqw 46f52 <_Thread_Initialize+0x1be> 46dde: b480 cmpl %d0,%d2 46de0: 6200 0170 bhiw 46f52 <_Thread_Initialize+0x1be> return false; /* stack allocation failed */ stack = the_thread->Start.stack; 46de4: 222a 00ca movel %a2@(202),%d1 the_thread->Start.core_allocated_stack = true; 46de8: 7401 moveq #1,%d2 46dea: 6004 bras 46df0 <_Thread_Initialize+0x5c> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 46dec: 2002 movel %d2,%d0 46dee: 4202 clrb %d2 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 46df0: 2541 00c2 movel %d1,%a2@(194) 46df4: 1542 00bc moveb %d2,%a2@(188) the_stack->size = size; 46df8: 2540 00be movel %d0,%a2@(190) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 46dfc: 4a03 tstb %d3 46dfe: 6604 bnes 46e04 <_Thread_Initialize+0x70> 46e00: 4283 clrl %d3 46e02: 6016 bras 46e1a <_Thread_Initialize+0x86> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 46e04: 4878 001c pea 1c 46e08: 4eb9 0004 7e98 jsr 47e98 <_Workspace_Allocate> if ( !fp_area ) 46e0e: 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 ); 46e10: 2600 movel %d0,%d3 if ( !fp_area ) 46e12: 6606 bnes 46e1a <_Thread_Initialize+0x86> 46e14: 4282 clrl %d2 46e16: 6000 00d4 braw 46eec <_Thread_Initialize+0x158> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 46e1a: 2039 0005 cda6 movel 5cda6 <_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; 46e20: 2543 0102 movel %d3,%a2@(258) the_thread->Start.fp_context = fp_area; 46e24: 2543 00c6 movel %d3,%a2@(198) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46e28: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 46e2c: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 46e30: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 46e34: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 46e38: 4a80 tstl %d0 46e3a: 6604 bnes 46e40 <_Thread_Initialize+0xac> 46e3c: 4282 clrl %d2 46e3e: 6016 bras 46e56 <_Thread_Initialize+0xc2> extensions_area = _Workspace_Allocate( 46e40: e588 lsll #2,%d0 46e42: 2040 moveal %d0,%a0 46e44: 4868 0004 pea %a0@(4) 46e48: 4eb9 0004 7e98 jsr 47e98 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 46e4e: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 46e50: 2400 movel %d0,%d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 46e52: 6700 0098 beqw 46eec <_Thread_Initialize+0x158> goto failed; } the_thread->extensions = (void **) extensions_area; 46e56: 2542 0116 movel %d2,%a2@(278) * 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 ) { 46e5a: 6718 beqs 46e74 <_Thread_Initialize+0xe0> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 46e5c: 2239 0005 cda6 movel 5cda6 <_Thread_Maximum_extensions>,%d1 46e62: 4280 clrl %d0 46e64: 600a bras 46e70 <_Thread_Initialize+0xdc> the_thread->extensions[i] = NULL; 46e66: 206a 0116 moveal %a2@(278),%a0 46e6a: 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++ ) 46e6e: 5280 addql #1,%d0 46e70: b280 cmpl %d0,%d1 46e72: 64f2 bccs 46e66 <_Thread_Initialize+0xd2> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 46e74: 2545 00ac movel %d5,%a2@(172) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 46e78: 7002 moveq #2,%d0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 46e7a: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 46e80: 1546 00aa moveb %d6,%a2@(170) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 46e84: b085 cmpl %d5,%d0 46e86: 660a bnes 46e92 <_Thread_Initialize+0xfe> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 46e88: 41f9 0005 ccb8 lea 5ccb8 <_Thread_Ticks_per_timeslice>,%a0 46e8e: 2550 0076 movel %a0@,%a2@(118) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 46e92: 2f04 movel %d4,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 46e94: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 46e9a: 7001 moveq #1,%d0 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 46e9c: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 46e9e: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 46ea2: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 46ea6: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 46eaa: 2544 0018 movel %d4,%a2@(24) the_thread->Start.initial_priority = priority; 46eae: 2544 00b8 movel %d4,%a2@(184) _Thread_Set_priority( the_thread, priority ); 46eb2: 4eb9 0004 74a0 jsr 474a0 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46eb8: 206e 0008 moveal %fp@(8),%a0 46ebc: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46ebe: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46ec4: 2068 0018 moveal %a0@(24),%a0 46ec8: 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 ); 46ecc: 42aa 0082 clrl %a2@(130) 46ed0: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 46ed4: 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 ); 46ed8: 2f0a movel %a2,%sp@- 46eda: 4eb9 0004 7b54 jsr 47b54 <_User_extensions_Thread_create> if ( extension_status ) 46ee0: 4fef 000c lea %sp@(12),%sp 46ee4: 4a00 tstb %d0 46ee6: 6704 beqs 46eec <_Thread_Initialize+0x158> 46ee8: 7001 moveq #1,%d0 46eea: 6068 bras 46f54 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 46eec: 202a 0106 movel %a2@(262),%d0 46ef0: 670a beqs 46efc <_Thread_Initialize+0x168> _Workspace_Free( the_thread->libc_reent ); 46ef2: 2f00 movel %d0,%sp@- 46ef4: 4eb9 0004 7eb4 jsr 47eb4 <_Workspace_Free> 46efa: 588f addql #4,%sp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 46efc: 202a 010a movel %a2@(266),%d0 46f00: 670a beqs 46f0c <_Thread_Initialize+0x178> _Workspace_Free( the_thread->API_Extensions[i] ); 46f02: 2f00 movel %d0,%sp@- 46f04: 4eb9 0004 7eb4 jsr 47eb4 <_Workspace_Free> 46f0a: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 46f0c: 202a 010e movel %a2@(270),%d0 46f10: 670a beqs 46f1c <_Thread_Initialize+0x188> _Workspace_Free( the_thread->API_Extensions[i] ); 46f12: 2f00 movel %d0,%sp@- 46f14: 4eb9 0004 7eb4 jsr 47eb4 <_Workspace_Free> 46f1a: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 46f1c: 202a 0112 movel %a2@(274),%d0 46f20: 670a beqs 46f2c <_Thread_Initialize+0x198> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 46f22: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46f24: 4eb9 0004 7eb4 jsr 47eb4 <_Workspace_Free> <== NOT EXECUTED 46f2a: 588f addql #4,%sp <== NOT EXECUTED if ( extensions_area ) 46f2c: 4a82 tstl %d2 46f2e: 670a beqs 46f3a <_Thread_Initialize+0x1a6> (void) _Workspace_Free( extensions_area ); 46f30: 2f02 movel %d2,%sp@- 46f32: 4eb9 0004 7eb4 jsr 47eb4 <_Workspace_Free> 46f38: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 46f3a: 4a83 tstl %d3 46f3c: 670a beqs 46f48 <_Thread_Initialize+0x1b4> (void) _Workspace_Free( fp_area ); 46f3e: 2f03 movel %d3,%sp@- 46f40: 4eb9 0004 7eb4 jsr 47eb4 <_Workspace_Free> 46f46: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 46f48: 2f0a movel %a2,%sp@- 46f4a: 4eb9 0004 76c0 jsr 476c0 <_Thread_Stack_Free> return false; 46f50: 588f addql #4,%sp 46f52: 4200 clrb %d0 } 46f54: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 46f5a: 4e5e unlk %fp ... 00047c14 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 47c14: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 47c16: 4e56 0000 linkw %fp,#0 47c1a: 2f0a movel %a2,%sp@- 47c1c: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 47c20: c0aa 0010 andl %a2@(16),%d0 47c24: 4a00 tstb %d0 47c26: 6704 beqs 47c2c <_Thread_Restart+0x18> 47c28: 4200 clrb %d0 47c2a: 6064 bras 47c90 <_Thread_Restart+0x7c> _Thread_Set_transient( the_thread ); 47c2c: 2f0a movel %a2,%sp@- 47c2e: 4eb9 0004 7df0 jsr 47df0 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 47c34: 2f2e 0010 movel %fp@(16),%sp@- 47c38: 2f2e 000c movel %fp@(12),%sp@- 47c3c: 2f0a movel %a2,%sp@- 47c3e: 4eb9 0004 b1ac jsr 4b1ac <_Thread_Reset> _Thread_Load_environment( the_thread ); 47c44: 2f0a movel %a2,%sp@- 47c46: 4eb9 0004 ae48 jsr 4ae48 <_Thread_Load_environment> _Thread_Ready( the_thread ); 47c4c: 2f0a movel %a2,%sp@- 47c4e: 4eb9 0004 b0ec jsr 4b0ec <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 47c54: 2f0a movel %a2,%sp@- 47c56: 4eb9 0004 83d0 jsr 483d0 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 47c5c: 4fef 001c lea %sp@(28),%sp 47c60: b5f9 0005 d89a cmpal 5d89a <_Thread_Executing>,%a2 47c66: 6626 bnes 47c8e <_Thread_Restart+0x7a> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 47c68: 4aaa 0102 tstl %a2@(258) 47c6c: 670c beqs 47c7a <_Thread_Restart+0x66> _Context_Restore_fp( &_Thread_Executing->fp_context ); 47c6e: 486a 0102 pea %a2@(258) 47c72: 4eb9 0004 88c0 jsr 488c0 <_CPU_Context_restore_fp> 47c78: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 47c7a: 2079 0005 d89a moveal 5d89a <_Thread_Executing>,%a0 47c80: 41e8 00ce lea %a0@(206),%a0 47c84: 2f08 movel %a0,%sp@- 47c86: 4eb9 0004 877e jsr 4877e <_CPU_Context_Restart_self> 47c8c: 588f addql #4,%sp <== NOT EXECUTED 47c8e: 7001 moveq #1,%d0 return true; } return false; } 47c90: 246e fffc moveal %fp@(-4),%a2 47c94: 4e5e unlk %fp <== NOT EXECUTED 0004acc8 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4acc8: 4e56 ffec linkw %fp,#-20 4accc: 206e 0008 moveal %fp@(8),%a0 4acd0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4acd4: 243c 0000 0700 movel #1792,%d2 4acda: 2002 movel %d2,%d0 4acdc: 40c1 movew %sr,%d1 4acde: 8081 orl %d1,%d0 4ace0: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4ace2: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4ace6: 0800 0001 btst #1,%d0 4acea: 6778 beqs 4ad64 <_Thread_Resume+0x9c> <== NEVER TAKEN 4acec: 76fd moveq #-3,%d3 4acee: c083 andl %d3,%d0 current_state = 4acf0: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4acf4: 666e bnes 4ad64 <_Thread_Resume+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4acf6: 2668 008e moveal %a0@(142),%a3 4acfa: 3028 0094 movew %a0@(148),%d0 4acfe: 3613 movew %a3@,%d3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4ad00: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ad04: 2809 movel %a1,%d4 4ad06: 5884 addql #4,%d4 4ad08: 8083 orl %d3,%d0 4ad0a: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4ad0c: 2469 0008 moveal %a1@(8),%a2 4ad10: 3680 movew %d0,%a3@ the_chain->last = the_node; 4ad12: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4ad16: 3039 0006 1fa0 movew 61fa0 <_Priority_Major_bit_map>,%d0 4ad1c: 3628 0092 movew %a0@(146),%d3 old_last_node->next = the_node; the_node->previous = old_last_node; 4ad20: 214a 0004 movel %a2,%a0@(4) 4ad24: 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; 4ad26: 2488 movel %a0,%a2@ 4ad28: 33c0 0006 1fa0 movew %d0,61fa0 <_Priority_Major_bit_map> _ISR_Flash( level ); 4ad2e: 2002 movel %d2,%d0 4ad30: 46c1 movew %d1,%sr 4ad32: 8081 orl %d1,%d0 4ad34: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4ad36: 2028 0014 movel %a0@(20),%d0 4ad3a: 2279 0006 1f7e moveal 61f7e <_Thread_Heir>,%a1 4ad40: b0a9 0014 cmpl %a1@(20),%d0 4ad44: 641e bccs 4ad64 <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 4ad46: 23c8 0006 1f7e movel %a0,61f7e <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4ad4c: 2079 0006 1faa moveal 61faa <_Thread_Executing>,%a0 4ad52: 4a28 0075 tstb %a0@(117) 4ad56: 6604 bnes 4ad5c <_Thread_Resume+0x94> 4ad58: 4a80 tstl %d0 4ad5a: 6608 bnes 4ad64 <_Thread_Resume+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4ad5c: 7001 moveq #1,%d0 4ad5e: 13c0 0006 1fba moveb %d0,61fba <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4ad64: 46c1 movew %d1,%sr } 4ad66: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4ad6a: 4e5e unlk %fp ... 00047744 <_Thread_Start>: void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { 47744: 7001 moveq #1,%d0 Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 47746: 4e56 0000 linkw %fp,#0 4774a: 2f0a movel %a2,%sp@- 4774c: 246e 0008 moveal %fp@(8),%a2 if ( _States_Is_dormant( the_thread->current_state ) ) { 47750: c0aa 0010 andl %a2@(16),%d0 47754: 6736 beqs 4778c <_Thread_Start+0x48> <== NEVER TAKEN the_thread->Start.entry_point = (Thread_Entry) entry_point; 47756: 256e 0010 009a movel %fp@(16),%a2@(154) the_thread->Start.prototype = the_prototype; 4775c: 256e 000c 009e movel %fp@(12),%a2@(158) the_thread->Start.pointer_argument = pointer_argument; 47762: 256e 0014 00a2 movel %fp@(20),%a2@(162) the_thread->Start.numeric_argument = numeric_argument; 47768: 256e 0018 00a6 movel %fp@(24),%a2@(166) _Thread_Load_environment( the_thread ); 4776e: 2f0a movel %a2,%sp@- 47770: 4eb9 0004 a610 jsr 4a610 <_Thread_Load_environment> _Thread_Ready( the_thread ); 47776: 2f0a movel %a2,%sp@- 47778: 4eb9 0004 a8b4 jsr 4a8b4 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 4777e: 2f0a movel %a2,%sp@- 47780: 4eb9 0004 7bd8 jsr 47bd8 <_User_extensions_Thread_start> return true; 47786: 4fef 000c lea %sp@(12),%sp _Thread_Load_environment( the_thread ); _Thread_Ready( the_thread ); _User_extensions_Thread_start( the_thread ); 4778a: 7001 moveq #1,%d0 return true; } return false; } 4778c: 246e fffc moveal %fp@(-4),%a2 47790: 4e5e unlk %fp <== NOT EXECUTED 0004787c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 4787c: 4e56 0000 linkw %fp,#0 47880: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 47882: 2479 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 47888: 4a2a 0075 tstb %a2@(117) 4788c: 6756 beqs 478e4 <_Thread_Tickle_timeslice+0x68> return; if ( !_States_Is_ready( executing->current_state ) ) 4788e: 4aaa 0010 tstl %a2@(16) 47892: 6650 bnes 478e4 <_Thread_Tickle_timeslice+0x68> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 47894: 202a 007a movel %a2@(122),%d0 47898: 7201 moveq #1,%d1 4789a: b280 cmpl %d0,%d1 4789c: 6246 bhis 478e4 <_Thread_Tickle_timeslice+0x68> 4789e: 123c 0002 moveb #2,%d1 478a2: b280 cmpl %d0,%d1 478a4: 640a bccs 478b0 <_Thread_Tickle_timeslice+0x34> 478a6: 123c 0003 moveb #3,%d1 478aa: b280 cmpl %d0,%d1 478ac: 6636 bnes 478e4 <_Thread_Tickle_timeslice+0x68> <== NEVER TAKEN 478ae: 601e bras 478ce <_Thread_Tickle_timeslice+0x52> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 478b0: 202a 0076 movel %a2@(118),%d0 478b4: 5380 subql #1,%d0 478b6: 2540 0076 movel %d0,%a2@(118) 478ba: 6e28 bgts 478e4 <_Thread_Tickle_timeslice+0x68> _Thread_Reset_timeslice(); 478bc: 4eb9 0004 a974 jsr 4a974 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 478c2: 41f9 0005 ccb8 lea 5ccb8 <_Thread_Ticks_per_timeslice>,%a0 478c8: 2550 0076 movel %a0@,%a2@(118) 478cc: 6016 bras 478e4 <_Thread_Tickle_timeslice+0x68> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 478ce: 202a 0076 movel %a2@(118),%d0 478d2: 5380 subql #1,%d0 478d4: 2540 0076 movel %d0,%a2@(118) 478d8: 660a bnes 478e4 <_Thread_Tickle_timeslice+0x68> (*executing->budget_callout)( executing ); 478da: 2f0a movel %a2,%sp@- 478dc: 206a 007e moveal %a2@(126),%a0 478e0: 4e90 jsr %a0@ 478e2: 588f addql #4,%sp break; #endif } } 478e4: 246e fffc moveal %fp@(-4),%a2 478e8: 4e5e unlk %fp <== NOT EXECUTED 000478ec <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 478ec: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 478f0: 2079 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 478f6: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 478fa: 243c 0000 0700 movel #1792,%d2 47900: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 47902: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 47906: 40c1 movew %sr,%d1 47908: 8081 orl %d1,%d0 4790a: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 4790c: 2029 0008 movel %a1@(8),%d0 47910: b091 cmpl %a1@,%d0 47912: 6738 beqs 4794c <_Thread_Yield_processor+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47914: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47916: 2009 movel %a1,%d0 47918: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4791a: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4791e: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47920: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47924: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 47926: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4792a: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4792e: 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; 47932: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 47934: 2002 movel %d2,%d0 47936: 46c1 movew %d1,%sr 47938: 8081 orl %d1,%d0 4793a: 46c0 movew %d0,%sr if ( _Thread_Is_heir( executing ) ) 4793c: b1f9 0005 cd96 cmpal 5cd96 <_Thread_Heir>,%a0 47942: 6610 bnes 47954 <_Thread_Yield_processor+0x68> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 47944: 23d1 0005 cd96 movel %a1@,5cd96 <_Thread_Heir> 4794a: 6008 bras 47954 <_Thread_Yield_processor+0x68> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 4794c: b1f9 0005 cd96 cmpal 5cd96 <_Thread_Heir>,%a0 47952: 6708 beqs 4795c <_Thread_Yield_processor+0x70> <== ALWAYS TAKEN _Context_Switch_necessary = true; 47954: 7001 moveq #1,%d0 47956: 13c0 0005 cdd2 moveb %d0,5cdd2 <_Context_Switch_necessary> _ISR_Enable( level ); 4795c: 46c1 movew %d1,%sr } 4795e: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 47962: 4e5e unlk %fp ... 00046798 <_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 ) ) { 46798: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 4679a: 4e56 0000 linkw %fp,#0 4679e: 202e 0010 movel %fp@(16),%d0 467a2: 2f0a movel %a2,%sp@- 467a4: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 467a8: 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 ) ) { 467ac: b2aa 0050 cmpl %a2@(80),%d1 467b0: 6618 bnes 467ca <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 467b2: 123c 0003 moveb #3,%d1 467b6: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 467ba: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 467bc: 486a 0048 pea %a2@(72) 467c0: 4eb9 0004 7d6c jsr 47d6c <_Watchdog_Remove> 467c6: 588f addql #4,%sp 467c8: 6002 bras 467cc <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 467ca: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 467cc: 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 } 467d0: 246e fffc moveal %fp@(-4),%a2 467d4: 203c 1003 fff8 movel #268697592,%d0 467da: 2d40 000c movel %d0,%fp@(12) 467de: 4e5e unlk %fp 467e0: 4ef9 0004 6928 jmp 46928 <_Thread_Clear_state> ... 00047214 <_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 ) { 47214: 4e56 ffe4 linkw %fp,#-28 47218: 206e 000c moveal %fp@(12),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4721c: 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; 47220: 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 ) { 47224: 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 ]; 47228: 2400 movel %d0,%d2 4722a: ec8a lsrl #6,%d2 4722c: 2202 movel %d2,%d1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4722e: 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 ]; 47234: e989 lsll #4,%d1 47236: 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 ) { 47238: 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 ]; 4723c: 9282 subl %d2,%d1 4723e: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 47242: 2149 0038 movel %a1,%a0@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47246: 43e8 0038 lea %a0@(56),%a1 block_state = the_thread_queue->state; 4724a: 2a2a 0038 movel %a2@(56),%d5 4724e: 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; 47252: 42a8 003c clrl %a0@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 47256: 0800 0005 btst #5,%d0 4725a: 6660 bnes 472bc <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4725c: 2c0b movel %a3,%d6 4725e: 5886 addql #4,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 47260: 2404 movel %d4,%d2 47262: 40c1 movew %sr,%d1 47264: 8481 orl %d1,%d2 47266: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->first; 47268: 2253 moveal %a3@,%a1 4726a: 76ff moveq #-1,%d3 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4726c: 601e bras 4728c <_Thread_queue_Enqueue_priority+0x78> search_priority = search_thread->current_priority; 4726e: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 47272: b680 cmpl %d0,%d3 47274: 641a bccs 47290 <_Thread_queue_Enqueue_priority+0x7c> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 47276: 2404 movel %d4,%d2 47278: 46c1 movew %d1,%sr 4727a: 8481 orl %d1,%d2 4727c: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4727e: 2405 movel %d5,%d2 47280: c4a9 0010 andl %a1@(16),%d2 47284: 6604 bnes 4728a <_Thread_queue_Enqueue_priority+0x76><== ALWAYS TAKEN _ISR_Enable( level ); 47286: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 47288: 60d6 bras 47260 <_Thread_queue_Enqueue_priority+0x4c><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 4728a: 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 ) ) { 4728c: bc89 cmpl %a1,%d6 4728e: 66de bnes 4726e <_Thread_queue_Enqueue_priority+0x5a> 47290: 2401 movel %d1,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 47292: 7801 moveq #1,%d4 47294: b8aa 0030 cmpl %a2@(48),%d4 47298: 6600 00a4 bnew 4733e <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4729c: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 472a0: b680 cmpl %d0,%d3 472a2: 677e beqs 47322 <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 472a4: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 472a8: 2089 movel %a1,%a0@ the_node->previous = previous_node; 472aa: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 472ae: 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; 472b2: 2688 movel %a0,%a3@ search_node->previous = the_node; 472b4: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 472b8: 46c1 movew %d1,%sr 472ba: 6062 bras 4731e <_Thread_queue_Enqueue_priority+0x10a> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 472bc: 4283 clrl %d3 472be: 1639 0005 b552 moveb 5b552 ,%d3 _ISR_Disable( level ); 472c4: 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; 472c6: 5283 addql #1,%d3 _ISR_Disable( level ); 472c8: 40c1 movew %sr,%d1 472ca: 8481 orl %d1,%d2 472cc: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->last; 472ce: 226b 0008 moveal %a3@(8),%a1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 472d2: 6020 bras 472f4 <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 472d4: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 472d8: b680 cmpl %d0,%d3 472da: 631c blss 472f8 <_Thread_queue_Enqueue_priority+0xe4> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 472dc: 2404 movel %d4,%d2 472de: 46c1 movew %d1,%sr 472e0: 8481 orl %d1,%d2 472e2: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 472e4: 2405 movel %d5,%d2 472e6: c4a9 0010 andl %a1@(16),%d2 472ea: 6604 bnes 472f0 <_Thread_queue_Enqueue_priority+0xdc> _ISR_Enable( level ); 472ec: 46c1 movew %d1,%sr goto restart_reverse_search; 472ee: 60cc bras 472bc <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 472f0: 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 ) ) { 472f4: b7c9 cmpal %a1,%a3 472f6: 66dc bnes 472d4 <_Thread_queue_Enqueue_priority+0xc0> 472f8: 2401 movel %d1,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 472fa: 7801 moveq #1,%d4 472fc: b8aa 0030 cmpl %a2@(48),%d4 47300: 663c bnes 4733e <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 47302: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 47306: b680 cmpl %d0,%d3 47308: 6718 beqs 47322 <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4730a: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4730c: 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; 47310: 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; 47312: 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; 47316: 2288 movel %a0,%a1@ next_node->previous = the_node; 47318: 2748 0004 movel %a0,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4731c: 46c1 movew %d1,%sr 4731e: 7001 moveq #1,%d0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 47320: 6026 bras 47348 <_Thread_queue_Enqueue_priority+0x134> 47322: 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; 47326: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4732a: 2089 movel %a1,%a0@ the_node->previous = previous_node; 4732c: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 47330: 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; 47334: 2688 movel %a0,%a3@ search_node->previous = the_node; 47336: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4733a: 46c2 movew %d2,%sr 4733c: 60e0 bras 4731e <_Thread_queue_Enqueue_priority+0x10a> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4733e: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 47342: 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; 47346: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 47348: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4734c: 4e5e unlk %fp <== NOT EXECUTED 0004c16c <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4c16c: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4c172: 4e56 0000 linkw %fp,#0 4c176: 2f0a movel %a2,%sp@- 4c178: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4c17c: 40c0 movew %sr,%d0 4c17e: 8280 orl %d0,%d1 4c180: 46c1 movew %d1,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4c182: 222a 0010 movel %a2@(16),%d1 4c186: 0281 0003 bee0 andil #245472,%d1 4c18c: 660a bnes 4c198 <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4c18e: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c190: 246e fffc moveal %fp@(-4),%a2 4c194: 4e5e unlk %fp 4c196: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4c198: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c19a: 7202 moveq #2,%d1 previous = the_node->previous; 4c19c: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4c1a0: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4c1a4: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4c1a6: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c1aa: b2aa 0050 cmpl %a2@(80),%d1 4c1ae: 6704 beqs 4c1b4 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4c1b0: 46c0 movew %d0,%sr 4c1b2: 6014 bras 4c1c8 <_Thread_queue_Extract_fifo+0x5c> 4c1b4: 7203 moveq #3,%d1 4c1b6: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4c1ba: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c1bc: 486a 0048 pea %a2@(72) 4c1c0: 4eb9 0004 7d6c jsr 47d6c <_Watchdog_Remove> 4c1c6: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4c1c8: 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 } 4c1cc: 246e fffc moveal %fp@(-4),%a2 4c1d0: 203c 1003 fff8 movel #268697592,%d0 4c1d6: 2d40 000c movel %d0,%fp@(12) 4c1da: 4e5e unlk %fp 4c1dc: 4ef9 0004 6928 jmp 46928 <_Thread_Clear_state> ... 0004a86c <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4a86c: 4e56 0000 linkw %fp,#0 4a870: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4a874: 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 && 4a878: 2029 0030 movel %a1@(48),%d0 4a87c: 671c beqs 4a89a <_Thread_queue_Process_timeout+0x2e> 4a87e: b1f9 0005 cdc2 cmpal 5cdc2 <_Thread_Executing>,%a0 4a884: 6614 bnes 4a89a <_Thread_queue_Process_timeout+0x2e><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4a886: 7203 moveq #3,%d1 4a888: b280 cmpl %d0,%d1 4a88a: 6722 beqs 4a8ae <_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; 4a88c: 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; 4a88e: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a894: 2340 0030 movel %d0,%a1@(48) 4a898: 6014 bras 4a8ae <_Thread_queue_Process_timeout+0x42> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a89a: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4a8a0: 2f08 movel %a0,%sp@- 4a8a2: 2f28 0044 movel %a0@(68),%sp@- 4a8a6: 4eb9 0004 a768 jsr 4a768 <_Thread_queue_Extract> 4a8ac: 508f addql #8,%sp } } 4a8ae: 4e5e unlk %fp ... 00047404 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 47404: 4e56 fff0 linkw %fp,#-16 47408: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4740c: 246e 0008 moveal %fp@(8),%a2 47410: 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 ) 47414: 4a8a tstl %a2 47416: 6746 beqs 4745e <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 47418: 7001 moveq #1,%d0 4741a: b0aa 0034 cmpl %a2@(52),%d0 4741e: 663e bnes 4745e <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 47420: 303c 0700 movew #1792,%d0 47424: 40c2 movew %sr,%d2 47426: 8082 orl %d2,%d0 47428: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4742a: 202b 0010 movel %a3@(16),%d0 4742e: 0280 0003 bee0 andil #245472,%d0 47434: 6726 beqs 4745c <_Thread_queue_Requeue+0x58> <== NEVER TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 47436: 4878 0001 pea 1 4743a: 7001 moveq #1,%d0 4743c: 2f0b movel %a3,%sp@- 4743e: 2540 0030 movel %d0,%a2@(48) 47442: 2f0a movel %a2,%sp@- 47444: 4eb9 0004 a7a0 jsr 4a7a0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4744a: 486e fffc pea %fp@(-4) 4744e: 2f0b movel %a3,%sp@- 47450: 2f0a movel %a2,%sp@- 47452: 4eb9 0004 7214 jsr 47214 <_Thread_queue_Enqueue_priority> 47458: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4745c: 46c2 movew %d2,%sr } } 4745e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 47464: 4e5e unlk %fp <== NOT EXECUTED 00047468 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 47468: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4746c: 486e fffc pea %fp@(-4) 47470: 2f2e 0008 movel %fp@(8),%sp@- 47474: 4eb9 0004 6d08 jsr 46d08 <_Thread_Get> switch ( location ) { 4747a: 508f addql #8,%sp 4747c: 4aae fffc tstl %fp@(-4) 47480: 6618 bnes 4749a <_Thread_queue_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 47482: 2f00 movel %d0,%sp@- 47484: 4eb9 0004 a86c jsr 4a86c <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4748a: 588f addql #4,%sp 4748c: 2039 0005 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0 47492: 5380 subql #1,%d0 47494: 23c0 0005 cd08 movel %d0,5cd08 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 4749a: 4e5e unlk %fp ... 00051644 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 51644: 4e56 ffb4 linkw %fp,#-76 51648: 200e movel %fp,%d0 5164a: 0680 ffff fff4 addil #-12,%d0 51650: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51654: 246e 0008 moveal %fp@(8),%a2 51658: 240e movel %fp,%d2 5165a: 2a0e movel %fp,%d5 5165c: 260e movel %fp,%d3 5165e: 0682 ffff ffe8 addil #-24,%d2 51664: 5185 subql #8,%d5 51666: 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 ); 5166c: 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 ); 51670: 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 ); 51674: 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 ); 51676: 280a movel %a2,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51678: 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 ); 5167e: 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 ); 51684: 49f9 0005 51fc lea 551fc <_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 ); 5168a: 47f9 0005 528c lea 5528c <_Watchdog_Insert>,%a3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51690: 2d48 ffe4 movel %a0,%fp@(-28) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 51694: 2d45 fff4 movel %d5,%fp@(-12) the_chain->permanent_null = NULL; 51698: 42ae fff8 clrl %fp@(-8) the_chain->last = _Chain_Head(the_chain); 5169c: 2d40 fffc movel %d0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 516a0: 2d43 ffe8 movel %d3,%fp@(-24) the_chain->permanent_null = NULL; 516a4: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 516a8: 2d42 fff0 movel %d2,%fp@(-16) 516ac: 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; 516b0: 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 ); 516b4: 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; 516b8: 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; 516bc: 2039 0007 55a0 movel 755a0 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 516c2: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 516c6: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 516ca: 486e ffe8 pea %fp@(-24) 516ce: 9081 subl %d1,%d0 516d0: 2f00 movel %d0,%sp@- 516d2: 2f07 movel %d7,%sp@- 516d4: 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(); 516d6: 2039 0007 54ee movel 754ee <_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 ) { 516dc: 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; 516e0: 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 ) { 516e4: b280 cmpl %d0,%d1 516e6: 6414 bccs 516fc <_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 ); 516e8: 486e ffe8 pea %fp@(-24) 516ec: 2c00 movel %d0,%d6 516ee: 9c81 subl %d1,%d6 516f0: 2f06 movel %d6,%sp@- 516f2: 2d40 ffdc movel %d0,%fp@(-36) 516f6: 2f04 movel %d4,%sp@- 516f8: 4e94 jsr %a4@ 516fa: 6018 bras 51714 <_Timer_server_Body+0xd0> } else if ( snapshot < last_snapshot ) { 516fc: b280 cmpl %d0,%d1 516fe: 631c blss 5171c <_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 ); 51700: 9280 subl %d0,%d1 51702: 2f01 movel %d1,%sp@- 51704: 4878 0001 pea 1 51708: 2d40 ffdc movel %d0,%fp@(-36) 5170c: 2f04 movel %d4,%sp@- 5170e: 4eb9 0005 517c jsr 5517c <_Watchdog_Adjust> 51714: 202e ffdc movel %fp@(-36),%d0 51718: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 5171c: 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 ); 51720: 202a 0078 movel %a2@(120),%d0 51724: 2f00 movel %d0,%sp@- 51726: 4eb9 0005 2014 jsr 52014 <_Chain_Get> if ( timer == NULL ) { 5172c: 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 ); 5172e: 2040 moveal %d0,%a0 if ( timer == NULL ) { 51730: 4a80 tstl %d0 51732: 6724 beqs 51758 <_Timer_server_Body+0x114> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51734: 2028 0038 movel %a0@(56),%d0 <== NOT EXECUTED 51738: 7201 moveq #1,%d1 <== NOT EXECUTED 5173a: b280 cmpl %d0,%d1 <== NOT EXECUTED 5173c: 6608 bnes 51746 <_Timer_server_Body+0x102> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5173e: 4868 0010 pea %a0@(16) <== NOT EXECUTED 51742: 2f07 movel %d7,%sp@- <== NOT EXECUTED 51744: 600c bras 51752 <_Timer_server_Body+0x10e> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51746: 7c03 moveq #3,%d6 <== NOT EXECUTED 51748: bc80 cmpl %d0,%d6 <== NOT EXECUTED 5174a: 66d4 bnes 51720 <_Timer_server_Body+0xdc> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5174c: 4868 0010 pea %a0@(16) <== NOT EXECUTED 51750: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51752: 4e93 jsr %a3@ <== NOT EXECUTED 51754: 508f addql #8,%sp <== NOT EXECUTED 51756: 60c8 bras 51720 <_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 ); 51758: 200d movel %a5,%d0 5175a: 40c1 movew %sr,%d1 5175c: 8081 orl %d1,%d0 5175e: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 51760: baae fff4 cmpl %fp@(-12),%d5 51764: 6612 bnes 51778 <_Timer_server_Body+0x134> <== NEVER TAKEN ts->insert_chain = NULL; 51766: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 5176a: 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 ); 5176c: 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 ) ) { 51770: b6ae ffe8 cmpl %fp@(-24),%d3 51774: 6608 bnes 5177e <_Timer_server_Body+0x13a> 51776: 6042 bras 517ba <_Timer_server_Body+0x176> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 51778: 46c1 movew %d1,%sr <== NOT EXECUTED 5177a: 6000 ff40 braw 516bc <_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 ); 5177e: 220d movel %a5,%d1 51780: 40c0 movew %sr,%d0 51782: 8280 orl %d0,%d1 51784: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 51786: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 5178a: b688 cmpl %a0,%d3 5178c: 6726 beqs 517b4 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 5178e: 2250 moveal %a0@,%a1 the_chain->first = new_first; 51790: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = _Chain_Head(the_chain); 51794: 2342 0004 movel %d2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 51798: 4a88 tstl %a0 5179a: 6718 beqs 517b4 <_Timer_server_Body+0x170> <== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 5179c: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 517a0: 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 ); 517a2: 2f28 0024 movel %a0@(36),%sp@- 517a6: 2f28 0020 movel %a0@(32),%sp@- 517aa: 2068 001c moveal %a0@(28),%a0 517ae: 4e90 jsr %a0@ } 517b0: 508f addql #8,%sp 517b2: 60ca bras 5177e <_Timer_server_Body+0x13a> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 517b4: 46c0 movew %d0,%sr 517b6: 6000 fef8 braw 516b0 <_Timer_server_Body+0x6c> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 517ba: 4200 clrb %d0 517bc: 1540 007c moveb %d0,%a2@(124) 517c0: 2039 0007 545c movel 7545c <_Thread_Dispatch_disable_level>,%d0 517c6: 5280 addql #1,%d0 517c8: 23c0 0007 545c movel %d0,7545c <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 517ce: 4878 0008 pea 8 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 517d2: 4bf9 0005 53a8 lea 553a8 <_Watchdog_Remove>,%a5 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 517d8: 2f12 movel %a2@,%sp@- 517da: 4eb9 0005 499c jsr 5499c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 517e0: 2f0a movel %a2,%sp@- 517e2: 4eba fd9c jsr %pc@(51580 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 517e6: 2f0a movel %a2,%sp@- 517e8: 4eba fdf6 jsr %pc@(515e0 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 517ec: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> ts->active = true; 517f2: 7201 moveq #1,%d1 517f4: 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 ); 517f8: 2f2e ffe4 movel %fp@(-28),%sp@- 517fc: 4e95 jsr %a5@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 517fe: 2f2e ffe0 movel %fp@(-32),%sp@- 51802: 4e95 jsr %a5@ 51804: 4fef 0018 lea %sp@(24),%sp 51808: 6000 fea6 braw 516b0 <_Timer_server_Body+0x6c> 0005180c <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 5180c: 4e56 fff0 linkw %fp,#-16 51810: 206e 000c moveal %fp@(12),%a0 51814: 48d7 041c moveml %d2-%d4/%a2,%sp@ 51818: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 5181c: 202a 0078 movel %a2@(120),%d0 51820: 6600 00f8 bnew 5191a <_Timer_server_Schedule_operation_method+0x10e> 51824: 2039 0007 545c movel 7545c <_Thread_Dispatch_disable_level>,%d0 5182a: 5280 addql #1,%d0 5182c: 23c0 0007 545c movel %d0,7545c <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51832: 2028 0038 movel %a0@(56),%d0 51836: 7201 moveq #1,%d1 51838: b280 cmpl %d0,%d1 5183a: 6660 bnes 5189c <_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 ); 5183c: 203c 0000 0700 movel #1792,%d0 51842: 40c3 movew %sr,%d3 51844: 8083 orl %d3,%d0 51846: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 51848: 2039 0007 55a0 movel 755a0 <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5184e: 220a movel %a2,%d1 51850: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 51856: 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)); 5185a: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5185e: b289 cmpl %a1,%d1 51860: 6716 beqs 51878 <_Timer_server_Schedule_operation_method+0x6c> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 51862: 2800 movel %d0,%d4 51864: 9882 subl %d2,%d4 delta_interval = first_watchdog->delta_interval; 51866: 2229 0010 movel %a1@(16),%d1 if (delta_interval > delta) { 5186a: b881 cmpl %d1,%d4 5186c: 6504 bcss 51872 <_Timer_server_Schedule_operation_method+0x66> 5186e: 4281 clrl %d1 51870: 6002 bras 51874 <_Timer_server_Schedule_operation_method+0x68> delta_interval -= delta; 51872: 9284 subl %d4,%d1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 51874: 2341 0010 movel %d1,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 51878: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 5187c: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 5187e: 4868 0010 pea %a0@(16) 51882: 486a 0030 pea %a2@(48) 51886: 4eb9 0005 528c jsr 5528c <_Watchdog_Insert> if ( !ts->active ) { 5188c: 508f addql #8,%sp 5188e: 102a 007c moveb %a2@(124),%d0 51892: 6678 bnes 5190c <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_interval_system_watchdog( ts ); 51894: 2f0a movel %a2,%sp@- 51896: 4eba fce8 jsr %pc@(51580 <_Timer_server_Reset_interval_system_watchdog>) 5189a: 606e bras 5190a <_Timer_server_Schedule_operation_method+0xfe> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5189c: 7203 moveq #3,%d1 5189e: b280 cmpl %d0,%d1 518a0: 666a bnes 5190c <_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 ); 518a2: 203c 0000 0700 movel #1792,%d0 518a8: 40c3 movew %sr,%d3 518aa: 8083 orl %d3,%d0 518ac: 46c0 movew %d0,%sr 518ae: 200a movel %a2,%d0 518b0: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 518b6: 2239 0007 54ee movel 754ee <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 518bc: 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)); 518c0: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 518c4: b089 cmpl %a1,%d0 518c6: 6720 beqs 518e8 <_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; 518c8: 2029 0010 movel %a1@(16),%d0 if ( snapshot > last_snapshot ) { 518cc: b481 cmpl %d1,%d2 518ce: 6410 bccs 518e0 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; 518d0: 2801 movel %d1,%d4 518d2: 9882 subl %d2,%d4 if (delta_interval > delta) { 518d4: b880 cmpl %d0,%d4 518d6: 6504 bcss 518dc <_Timer_server_Schedule_operation_method+0xd0><== ALWAYS TAKEN 518d8: 4280 clrl %d0 <== NOT EXECUTED 518da: 6008 bras 518e4 <_Timer_server_Schedule_operation_method+0xd8><== NOT EXECUTED delta_interval -= delta; 518dc: 9084 subl %d4,%d0 518de: 6004 bras 518e4 <_Timer_server_Schedule_operation_method+0xd8> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 518e0: d082 addl %d2,%d0 delta_interval += delta; 518e2: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 518e4: 2340 0010 movel %d0,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 518e8: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 518ec: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 518ee: 4868 0010 pea %a0@(16) 518f2: 486a 0068 pea %a2@(104) 518f6: 4eb9 0005 528c jsr 5528c <_Watchdog_Insert> if ( !ts->active ) { 518fc: 508f addql #8,%sp 518fe: 102a 007c moveb %a2@(124),%d0 51902: 6608 bnes 5190c <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_tod_system_watchdog( ts ); 51904: 2f0a movel %a2,%sp@- 51906: 4eba fcd8 jsr %pc@(515e0 <_Timer_server_Reset_tod_system_watchdog>) 5190a: 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 ); } } 5190c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 51912: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 51914: 4ef9 0005 4012 jmp 54012 <_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 ); 5191a: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 5191e: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 51922: 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 ); 51928: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 5192c: 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 ); 5192e: 4ef9 0005 1fdc jmp 51fdc <_Chain_Append> <== NOT EXECUTED 0004920c <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 4920c: 327c 0700 moveaw #1792,%a1 49210: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 49212: 4e56 ffe8 linkw %fp,#-24 49216: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4921a: 266e 0008 moveal %fp@(8),%a3 4921e: 262e 000c movel %fp@(12),%d3 49222: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 49226: 40c0 movew %sr,%d0 49228: 8280 orl %d0,%d1 4922a: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4922c: 244b moveal %a3,%a2 4922e: 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 ) ) { 49230: b5c8 cmpal %a0,%a2 49232: 674c beqs 49280 <_Watchdog_Adjust+0x74> switch ( direction ) { 49234: 4a83 tstl %d3 49236: 673c beqs 49274 <_Watchdog_Adjust+0x68> 49238: 7201 moveq #1,%d1 4923a: b283 cmpl %d3,%d1 4923c: 6642 bnes 49280 <_Watchdog_Adjust+0x74> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4923e: d5a8 0010 addl %d2,%a0@(16) break; 49242: 603c bras 49280 <_Watchdog_Adjust+0x74> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49244: 2053 moveal %a3@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 49246: 2628 0010 movel %a0@(16),%d3 4924a: b682 cmpl %d2,%d3 4924c: 6308 blss 49256 <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 4924e: 9682 subl %d2,%d3 49250: 2143 0010 movel %d3,%a0@(16) break; 49254: 602a bras 49280 <_Watchdog_Adjust+0x74> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 49256: 7201 moveq #1,%d1 49258: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 4925c: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 4925e: 2f0b movel %a3,%sp@- 49260: 4e94 jsr %a4@ _ISR_Disable( level ); 49262: 2204 movel %d4,%d1 49264: 40c0 movew %sr,%d0 49266: 8280 orl %d0,%d1 49268: 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; 4926a: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4926c: 588f addql #4,%sp 4926e: b5d3 cmpal %a3@,%a2 49270: 660a bnes 4927c <_Watchdog_Adjust+0x70> 49272: 600c bras 49280 <_Watchdog_Adjust+0x74> _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 49274: 2809 movel %a1,%d4 units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 49276: 49f9 0004 9424 lea 49424 <_Watchdog_Tickle>,%a4 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4927c: 4a82 tstl %d2 4927e: 66c4 bnes 49244 <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 49280: 46c0 movew %d0,%sr } 49282: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 49288: 4e5e unlk %fp <== NOT EXECUTED 00047d6c <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 47d6c: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 47d72: 4e56 0000 linkw %fp,#0 47d76: 206e 0008 moveal %fp@(8),%a0 47d7a: 2f0a movel %a2,%sp@- 47d7c: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 47d7e: 40c1 movew %sr,%d1 47d80: 8081 orl %d1,%d0 47d82: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 47d84: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 47d88: 7401 moveq #1,%d2 47d8a: b480 cmpl %d0,%d2 47d8c: 670c beqs 47d9a <_Watchdog_Remove+0x2e> 47d8e: 6244 bhis 47dd4 <_Watchdog_Remove+0x68> 47d90: 143c 0003 moveb #3,%d2 47d94: b480 cmpl %d0,%d2 47d96: 653c bcss 47dd4 <_Watchdog_Remove+0x68> <== NEVER TAKEN 47d98: 6006 bras 47da0 <_Watchdog_Remove+0x34> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 47d9a: 42a8 0008 clrl %a0@(8) break; 47d9e: 6034 bras 47dd4 <_Watchdog_Remove+0x68> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 47da0: 2250 moveal %a0@,%a1 case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 47da2: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 47da6: 4a91 tstl %a1@ 47da8: 6708 beqs 47db2 <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 47daa: 2428 0010 movel %a0@(16),%d2 47dae: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 47db2: 2279 0005 ce48 moveal 5ce48 <_Watchdog_Sync_count>,%a1 47db8: 4a89 tstl %a1 47dba: 670c beqs 47dc8 <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 47dbc: 2279 0005 cda2 moveal 5cda2 <_ISR_Nest_level>,%a1 47dc2: 23c9 0005 cdbe movel %a1,5cdbe <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47dc8: 2250 moveal %a0@,%a1 previous = the_node->previous; 47dca: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 47dce: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47dd0: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 47dd4: 2279 0005 ce4c moveal 5ce4c <_Watchdog_Ticks_since_boot>,%a1 47dda: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 47dde: 46c1 movew %d1,%sr return( previous_state ); } 47de0: 241f movel %sp@+,%d2 47de2: 245f moveal %sp@+,%a2 47de4: 4e5e unlk %fp <== NOT EXECUTED 00048dfc <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 48dfc: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 48e02: 4e56 ffec linkw %fp,#-20 48e06: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 48e0a: 242e 0008 movel %fp@(8),%d2 48e0e: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 48e12: 40c3 movew %sr,%d3 48e14: 8083 orl %d3,%d0 48e16: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 48e18: 2f0b movel %a3,%sp@- 48e1a: 49f9 0004 3698 lea 43698 ,%a4 48e20: 2f02 movel %d2,%sp@- 48e22: 4879 0005 c030 pea 5c030 48e28: 4e94 jsr %a4@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 48e2a: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 48e2c: 4fef 000c lea %sp@(12),%sp 48e30: b7ca cmpal %a2,%a3 48e32: 6726 beqs 48e5a <_Watchdog_Report_chain+0x5e> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 48e34: 49f9 0004 8e70 lea 48e70 <_Watchdog_Report>,%a4 48e3a: 2f0a movel %a2,%sp@- 48e3c: 42a7 clrl %sp@- 48e3e: 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 ) 48e40: 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 ; 48e42: 508f addql #8,%sp 48e44: b7ca cmpal %a2,%a3 48e46: 66f2 bnes 48e3a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 48e48: 2f02 movel %d2,%sp@- 48e4a: 4879 0005 c047 pea 5c047 48e50: 4eb9 0004 3698 jsr 43698 48e56: 508f addql #8,%sp 48e58: 600a bras 48e64 <_Watchdog_Report_chain+0x68> } else { printk( "Chain is empty\n" ); 48e5a: 4879 0005 c056 pea 5c056 48e60: 4e94 jsr %a4@ 48e62: 588f addql #4,%sp } _ISR_Enable( level ); 48e64: 46c3 movew %d3,%sr } 48e66: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 48e6c: 4e5e unlk %fp <== NOT EXECUTED 00047de8 <_Watchdog_Tickle>: * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 47de8: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 47dee: 4e56 ffe8 linkw %fp,#-24 47df2: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 47df6: 286e 0008 moveal %fp@(8),%a4 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 47dfa: 40c2 movew %sr,%d2 47dfc: 8082 orl %d2,%d0 47dfe: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 47e00: 264c moveal %a4,%a3 47e02: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 47e04: b7ca cmpal %a2,%a3 47e06: 674e beqs 47e56 <_Watchdog_Tickle+0x6e> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 47e08: 202a 0010 movel %a2@(16),%d0 47e0c: 6708 beqs 47e16 <_Watchdog_Tickle+0x2e> the_watchdog->delta_interval--; 47e0e: 5380 subql #1,%d0 47e10: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 47e14: 6640 bnes 47e56 <_Watchdog_Tickle+0x6e> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 47e16: 4bf9 0004 7d6c lea 47d6c <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 47e1c: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 47e22: 2f0a movel %a2,%sp@- 47e24: 4e95 jsr %a5@ _ISR_Enable( level ); 47e26: 46c2 movew %d2,%sr switch( watchdog_state ) { 47e28: 7202 moveq #2,%d1 47e2a: 588f addql #4,%sp 47e2c: b280 cmpl %d0,%d1 47e2e: 6610 bnes 47e40 <_Watchdog_Tickle+0x58> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 47e30: 2f2a 0024 movel %a2@(36),%sp@- 47e34: 2f2a 0020 movel %a2@(32),%sp@- 47e38: 206a 001c moveal %a2@(28),%a0 47e3c: 4e90 jsr %a0@ 47e3e: 508f addql #8,%sp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 47e40: 2003 movel %d3,%d0 47e42: 40c2 movew %sr,%d2 47e44: 8082 orl %d2,%d0 47e46: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 47e48: 2014 movel %a4@,%d0 47e4a: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 47e4c: b7c0 cmpal %d0,%a3 47e4e: 6706 beqs 47e56 <_Watchdog_Tickle+0x6e> 47e50: 4aaa 0010 tstl %a2@(16) 47e54: 67cc beqs 47e22 <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 47e56: 46c2 movew %d2,%sr } 47e58: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47e5e: 4e5e unlk %fp ... 00059254 <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 59254: 4e56 0000 linkw %fp,#0 59258: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5925c: 2d6e 0010 000c movel %fp@(16),%fp@(12) 59262: 2d40 0008 movel %d0,%fp@(8) } 59266: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 59268: 4ef9 0004 8ea0 jmp 48ea0 ... 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 99c0 jsr 599c0 <_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 5560 jsr 45560 42842: 588f addql #4,%sp <== NOT EXECUTED 42844: 60fe bras 42844 <_exit+0x1c> <== NOT EXECUTED ... 000432fa <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 432fa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 432fe: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 43302: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 43306: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 4330c: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 43310: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43314: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 43316: 4ef9 0004 318c jmp 4318c <== NOT EXECUTED 00059270 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 59270: 4e56 0000 linkw %fp,#0 free( ptr ); 59274: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5927a: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5927c: 4ef9 0004 8f80 jmp 48f80 ... 0004b792 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4b792: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 4b794: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 4b798: 4e5e unlk %fp <== NOT EXECUTED 00049164 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 49164: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 49168: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4916a: 4ef9 0004 9108 jmp 49108 <== NOT EXECUTED 00049170 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 49170: 4e56 0000 linkw %fp,#0 49174: 202e 000c movel %fp@(12),%d0 return gettimeofday( tp, tzp ); 49178: 2d6e 0010 000c movel %fp@(16),%fp@(12) 4917e: 2d40 0008 movel %d0,%fp@(8) } 49182: 4e5e unlk %fp struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 49184: 4ef9 0004 9108 jmp 49108 ... 00059348 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 59348: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5934c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59352: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 59354: 4ef9 0005 9914 jmp 59914 ... 00043b76 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 43b76: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43b7a: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 43b7e: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 43b84: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43b88: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 43b8a: 4ef9 0004 398c jmp 4398c <== NOT EXECUTED 00059448 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 59448: 4e56 0000 linkw %fp,#0 5944c: 202e 000c movel %fp@(12),%d0 59450: 2f02 movel %d2,%sp@- 59452: 222e 0010 movel %fp@(16),%d1 59456: 242e 0014 movel %fp@(20),%d2 return lseek( fd, offset, whence ); 5945a: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 59460: 2d41 000c movel %d1,%fp@(12) 59464: 2d42 0010 movel %d2,%fp@(16) 59468: 2d40 0008 movel %d0,%fp@(8) } 5946c: 241f movel %sp@+,%d2 5946e: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 59470: 4ef9 0005 935c jmp 5935c ... 00059478 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 59478: 4e56 0000 linkw %fp,#0 return malloc( size ); 5947c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59482: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 59484: 4ef9 0004 9484 jmp 49484 ... 00042d0c <_open_r>: struct _reent *ptr __attribute__((unused)), const char *buf, int flags, int mode ) { 42d0c: 4e56 0000 linkw %fp,#0 42d10: 222e 0010 movel %fp@(16),%d1 42d14: 202e 000c movel %fp@(12),%d0 return open( buf, flags, mode ); 42d18: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 42d1e: 2d41 000c movel %d1,%fp@(12) 42d22: 2d40 0008 movel %d0,%fp@(8) } 42d26: 4e5e unlk %fp const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 42d28: 4ef9 0004 2b10 jmp 42b10 ... 00059538 <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 59538: 4e56 0000 linkw %fp,#0 5953c: 222e 0010 movel %fp@(16),%d1 59540: 202e 000c movel %fp@(12),%d0 return read( fd, buf, nbytes ); 59544: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5954a: 2d41 000c movel %d1,%fp@(12) 5954e: 2d40 0008 movel %d0,%fp@(8) } 59552: 4e5e unlk %fp int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 59554: 4ef9 0005 948c jmp 5948c ... 0005955c <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5955c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 59560: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 59564: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5956a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 5956e: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 59570: 4ef9 0005 95b8 jmp 595b8 <== NOT EXECUTED ... 00045da4 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 45da4: 4e56 ffa4 linkw %fp,#-92 45da8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 45dac: 246e 000c moveal %fp@(12),%a2 45db0: 266e 0010 moveal %fp@(16),%a3 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 45db4: 2f0a movel %a2,%sp@- 45db6: 4eb9 0004 4ac0 jsr 44ac0 if ( old_parent_pathlen == 0 ) 45dbc: 588f addql #4,%sp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 45dbe: 2600 movel %d0,%d3 if ( old_parent_pathlen == 0 ) 45dc0: 664a bnes 45e0c <_rename_r+0x68> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 45dc2: 742f moveq #47,%d2 45dc4: 1012 moveb %a2@,%d0 45dc6: 1200 moveb %d0,%d1 45dc8: 49c1 extbl %d1 45dca: b481 cmpl %d1,%d2 45dcc: 670c beqs 45dda <_rename_r+0x36> <== NEVER TAKEN 45dce: 143c 005c moveb #92,%d2 45dd2: b481 cmpl %d1,%d2 45dd4: 6704 beqs 45dda <_rename_r+0x36> <== NEVER TAKEN 45dd6: 4a00 tstb %d0 45dd8: 6612 bnes 45dec <_rename_r+0x48> <== ALWAYS TAKEN 45dda: 4878 0014 pea 14 <== NOT EXECUTED 45dde: 2079 0006 2694 moveal 62694 ,%a0 <== NOT EXECUTED 45de4: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 45de8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 45dea: 600e bras 45dfa <_rename_r+0x56> <== NOT EXECUTED 45dec: 4878 0014 pea 14 45df0: 2039 0006 2694 movel 62694 ,%d0 45df6: 5880 addql #4,%d0 45df8: 2f00 movel %d0,%sp@- 45dfa: 486e ffd4 pea %fp@(-44) 45dfe: 4202 clrb %d2 45e00: 4eb9 0005 2648 jsr 52648 45e06: 4fef 000c lea %sp@(12),%sp 45e0a: 6020 bras 45e2c <_rename_r+0x88> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 45e0c: 42a7 clrl %sp@- 45e0e: 486e ffd4 pea %fp@(-44) 45e12: 4878 0002 pea 2 45e16: 2f00 movel %d0,%sp@- 45e18: 2f0a movel %a2,%sp@- 45e1a: 4eb9 0004 4bd6 jsr 44bd6 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 45e20: 4fef 0014 lea %sp@(20),%sp 45e24: 4a80 tstl %d0 45e26: 6600 0274 bnew 4609c <_rename_r+0x2f8> 45e2a: 7401 moveq #1,%d2 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 45e2c: 4878 0014 pea 14 45e30: 280e movel %fp,%d4 45e32: 0684 ffff ffd4 addil #-44,%d4 45e38: 2a0e movel %fp,%d5 45e3a: 0685 ffff ffe8 addil #-24,%d5 45e40: 49f9 0005 2648 lea 52648 ,%a4 name = old + old_parent_pathlen; 45e46: d68a addl %a2,%d3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 45e48: 45f9 0005 3dc4 lea 53dc4 ,%a2 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 45e4e: 2f04 movel %d4,%sp@- 45e50: 2f05 movel %d5,%sp@- 45e52: 4e94 jsr %a4@ name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 45e54: 2f03 movel %d3,%sp@- /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 45e56: 2d43 fffc movel %d3,%fp@(-4) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 45e5a: 4e92 jsr %a2@ 45e5c: 2e80 movel %d0,%sp@ 45e5e: 2f03 movel %d3,%sp@- 45e60: 4eb9 0004 4a88 jsr 44a88 45e66: d680 addl %d0,%d3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 45e68: 2f03 movel %d3,%sp@- * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 45e6a: 2d43 fffc movel %d3,%fp@(-4) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 45e6e: 4e92 jsr %a2@ 45e70: 4297 clrl %sp@ 45e72: 2f05 movel %d5,%sp@- 45e74: 42a7 clrl %sp@- 45e76: 2f00 movel %d0,%sp@- 45e78: 2f03 movel %d3,%sp@- 45e7a: 4eb9 0004 4b06 jsr 44b06 0, &old_loc, false ); if ( result != 0 ) { 45e80: 4fef 0028 lea %sp@(40),%sp 45e84: 4a80 tstl %d0 45e86: 6720 beqs 45ea8 <_rename_r+0x104> if ( free_old_parentloc ) 45e88: 4a02 tstb %d2 45e8a: 6700 0210 beqw 4609c <_rename_r+0x2f8> rtems_filesystem_freenode( &old_parent_loc ); 45e8e: 206e ffe0 moveal %fp@(-32),%a0 45e92: 4a88 tstl %a0 45e94: 6700 0206 beqw 4609c <_rename_r+0x2f8> 45e98: 2068 001c moveal %a0@(28),%a0 45e9c: 4a88 tstl %a0 45e9e: 6700 01fc beqw 4609c <_rename_r+0x2f8> 45ea2: 2f04 movel %d4,%sp@- 45ea4: 6000 00ca braw 45f70 <_rename_r+0x1cc> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 45ea8: 762f moveq #47,%d3 45eaa: 1013 moveb %a3@,%d0 45eac: 1200 moveb %d0,%d1 45eae: 49c1 extbl %d1 45eb0: b681 cmpl %d1,%d3 45eb2: 670c beqs 45ec0 <_rename_r+0x11c> 45eb4: 163c 005c moveb #92,%d3 45eb8: b681 cmpl %d1,%d3 45eba: 6704 beqs 45ec0 <_rename_r+0x11c> <== NEVER TAKEN 45ebc: 4a00 tstb %d0 45ebe: 6622 bnes 45ee2 <_rename_r+0x13e> <== ALWAYS TAKEN 45ec0: 4878 0014 pea 14 45ec4: 2079 0006 2694 moveal 62694 ,%a0 45eca: 41e8 0018 lea %a0@(24),%a0 45ece: 2f08 movel %a0,%sp@- 45ed0: 486e ffc0 pea %fp@(-64) 45ed4: 4eb9 0005 2648 jsr 52648 45eda: 4fef 000c lea %sp@(12),%sp 45ede: 7001 moveq #1,%d0 45ee0: 601a bras 45efc <_rename_r+0x158> 45ee2: 4878 0014 pea 14 45ee6: 2039 0006 2694 movel 62694 ,%d0 45eec: 5880 addql #4,%d0 45eee: 2f00 movel %d0,%sp@- 45ef0: 486e ffc0 pea %fp@(-64) 45ef4: 4e94 jsr %a4@ 45ef6: 4fef 000c lea %sp@(12),%sp 45efa: 4280 clrl %d0 if ( !new_parent_loc.ops->evalformake_h ) { 45efc: 206e ffcc moveal %fp@(-52),%a0 45f00: 2068 0004 moveal %a0@(4),%a0 45f04: 4a88 tstl %a0 45f06: 6700 00ee beqw 45ff6 <_rename_r+0x252> 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 ); 45f0a: 486e fffc pea %fp@(-4) 45f0e: 280e movel %fp,%d4 45f10: 0684 ffff ffc0 addil #-64,%d4 45f16: 2f04 movel %d4,%sp@- 45f18: 4873 0800 pea %a3@(00000000,%d0:l) 45f1c: 4e90 jsr %a0@ if ( result != 0 ) { 45f1e: 4fef 000c lea %sp@(12),%sp 45f22: 4a80 tstl %d0 45f24: 6754 beqs 45f7a <_rename_r+0x1d6> rtems_filesystem_freenode( &new_parent_loc ); 45f26: 206e ffcc moveal %fp@(-52),%a0 45f2a: 4a88 tstl %a0 45f2c: 670e beqs 45f3c <_rename_r+0x198> <== NEVER TAKEN 45f2e: 2068 001c moveal %a0@(28),%a0 45f32: 4a88 tstl %a0 45f34: 6706 beqs 45f3c <_rename_r+0x198> <== NEVER TAKEN 45f36: 2f04 movel %d4,%sp@- 45f38: 4e90 jsr %a0@ 45f3a: 588f addql #4,%sp if ( free_old_parentloc ) 45f3c: 4a02 tstb %d2 45f3e: 6718 beqs 45f58 <_rename_r+0x1b4> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 45f40: 206e ffe0 moveal %fp@(-32),%a0 45f44: 4a88 tstl %a0 45f46: 6710 beqs 45f58 <_rename_r+0x1b4> <== NEVER TAKEN 45f48: 2068 001c moveal %a0@(28),%a0 45f4c: 4a88 tstl %a0 45f4e: 6708 beqs 45f58 <_rename_r+0x1b4> <== NEVER TAKEN 45f50: 486e ffd4 pea %fp@(-44) 45f54: 4e90 jsr %a0@ 45f56: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 45f58: 206e fff4 moveal %fp@(-12),%a0 45f5c: 4a88 tstl %a0 45f5e: 6700 013c beqw 4609c <_rename_r+0x2f8> 45f62: 2068 001c moveal %a0@(28),%a0 45f66: 4a88 tstl %a0 45f68: 6700 0132 beqw 4609c <_rename_r+0x2f8> 45f6c: 486e ffe8 pea %fp@(-24) 45f70: 76ff moveq #-1,%d3 45f72: 4e90 jsr %a0@ 45f74: 588f addql #4,%sp 45f76: 6000 0126 braw 4609e <_rename_r+0x2fa> 45f7a: 206e ffcc moveal %fp@(-52),%a0 /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 45f7e: 202e ffd0 movel %fp@(-48),%d0 45f82: b0ae ffe4 cmpl %fp@(-28),%d0 45f86: 6758 beqs 45fe0 <_rename_r+0x23c> rtems_filesystem_freenode( &new_parent_loc ); 45f88: 4a88 tstl %a0 45f8a: 670e beqs 45f9a <_rename_r+0x1f6> <== NEVER TAKEN 45f8c: 2068 001c moveal %a0@(28),%a0 45f90: 4a88 tstl %a0 45f92: 6706 beqs 45f9a <_rename_r+0x1f6> <== NEVER TAKEN 45f94: 2f04 movel %d4,%sp@- 45f96: 4e90 jsr %a0@ 45f98: 588f addql #4,%sp if ( free_old_parentloc ) 45f9a: 4a02 tstb %d2 45f9c: 6718 beqs 45fb6 <_rename_r+0x212> rtems_filesystem_freenode( &old_parent_loc ); 45f9e: 206e ffe0 moveal %fp@(-32),%a0 45fa2: 4a88 tstl %a0 45fa4: 6710 beqs 45fb6 <_rename_r+0x212> <== NEVER TAKEN 45fa6: 2068 001c moveal %a0@(28),%a0 45faa: 4a88 tstl %a0 45fac: 6708 beqs 45fb6 <_rename_r+0x212> <== NEVER TAKEN 45fae: 486e ffd4 pea %fp@(-44) 45fb2: 4e90 jsr %a0@ 45fb4: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 45fb6: 206e fff4 moveal %fp@(-12),%a0 45fba: 4a88 tstl %a0 45fbc: 6710 beqs 45fce <_rename_r+0x22a> <== NEVER TAKEN 45fbe: 2068 001c moveal %a0@(28),%a0 45fc2: 4a88 tstl %a0 45fc4: 6708 beqs 45fce <_rename_r+0x22a> <== NEVER TAKEN 45fc6: 486e ffe8 pea %fp@(-24) 45fca: 4e90 jsr %a0@ 45fcc: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 45fce: 4eb9 0005 0e18 jsr 50e18 <__errno> 45fd4: 76ff moveq #-1,%d3 45fd6: 2040 moveal %d0,%a0 45fd8: 7012 moveq #18,%d0 45fda: 2080 movel %d0,%a0@ 45fdc: 6000 00c0 braw 4609e <_rename_r+0x2fa> } if ( !new_parent_loc.ops->rename_h ) { 45fe0: 2268 0040 moveal %a0@(64),%a1 45fe4: 4a89 tstl %a1 45fe6: 6654 bnes 4603c <_rename_r+0x298> <== NEVER TAKEN rtems_filesystem_freenode( &new_parent_loc ); 45fe8: 2068 001c moveal %a0@(28),%a0 45fec: 4a88 tstl %a0 45fee: 6706 beqs 45ff6 <_rename_r+0x252> <== NEVER TAKEN 45ff0: 2f04 movel %d4,%sp@- 45ff2: 4e90 jsr %a0@ 45ff4: 588f addql #4,%sp if ( free_old_parentloc ) 45ff6: 4a02 tstb %d2 45ff8: 6718 beqs 46012 <_rename_r+0x26e> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 45ffa: 206e ffe0 moveal %fp@(-32),%a0 45ffe: 4a88 tstl %a0 46000: 6710 beqs 46012 <_rename_r+0x26e> <== NEVER TAKEN 46002: 2068 001c moveal %a0@(28),%a0 46006: 4a88 tstl %a0 46008: 6708 beqs 46012 <_rename_r+0x26e> <== NEVER TAKEN 4600a: 486e ffd4 pea %fp@(-44) 4600e: 4e90 jsr %a0@ 46010: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46012: 206e fff4 moveal %fp@(-12),%a0 46016: 4a88 tstl %a0 46018: 6710 beqs 4602a <_rename_r+0x286> <== NEVER TAKEN 4601a: 2068 001c moveal %a0@(28),%a0 4601e: 4a88 tstl %a0 46020: 6708 beqs 4602a <_rename_r+0x286> <== NEVER TAKEN 46022: 486e ffe8 pea %fp@(-24) 46026: 4e90 jsr %a0@ 46028: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTSUP ); 4602a: 4eb9 0005 0e18 jsr 50e18 <__errno> 46030: 76ff moveq #-1,%d3 46032: 2040 moveal %d0,%a0 46034: 20bc 0000 0086 movel #134,%a0@ 4603a: 6062 bras 4609e <_rename_r+0x2fa> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 4603c: 2f2e fffc movel %fp@(-4),%sp@- 46040: 2f04 movel %d4,%sp@- 46042: 486e ffe8 pea %fp@(-24) 46046: 486e ffd4 pea %fp@(-44) 4604a: 4e91 jsr %a1@ rtems_filesystem_freenode( &new_parent_loc ); 4604c: 206e ffcc moveal %fp@(-52),%a0 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 46050: 2600 movel %d0,%d3 rtems_filesystem_freenode( &new_parent_loc ); 46052: 4fef 0010 lea %sp@(16),%sp 46056: 4a88 tstl %a0 46058: 670e beqs 46068 <_rename_r+0x2c4> <== NEVER TAKEN 4605a: 2068 001c moveal %a0@(28),%a0 4605e: 4a88 tstl %a0 46060: 6706 beqs 46068 <_rename_r+0x2c4> <== NEVER TAKEN 46062: 2f04 movel %d4,%sp@- 46064: 4e90 jsr %a0@ 46066: 588f addql #4,%sp if ( free_old_parentloc ) 46068: 4a02 tstb %d2 4606a: 6718 beqs 46084 <_rename_r+0x2e0> rtems_filesystem_freenode( &old_parent_loc ); 4606c: 206e ffe0 moveal %fp@(-32),%a0 46070: 4a88 tstl %a0 46072: 6710 beqs 46084 <_rename_r+0x2e0> <== NEVER TAKEN 46074: 2068 001c moveal %a0@(28),%a0 46078: 4a88 tstl %a0 4607a: 6708 beqs 46084 <_rename_r+0x2e0> <== NEVER TAKEN 4607c: 486e ffd4 pea %fp@(-44) 46080: 4e90 jsr %a0@ 46082: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 46084: 206e fff4 moveal %fp@(-12),%a0 46088: 4a88 tstl %a0 4608a: 6712 beqs 4609e <_rename_r+0x2fa> <== NEVER TAKEN 4608c: 2068 001c moveal %a0@(28),%a0 46090: 4a88 tstl %a0 46092: 670a beqs 4609e <_rename_r+0x2fa> <== NEVER TAKEN 46094: 486e ffe8 pea %fp@(-24) 46098: 6000 fed8 braw 45f72 <_rename_r+0x1ce> 4609c: 76ff moveq #-1,%d3 <== NOT EXECUTED return result; } 4609e: 2003 movel %d3,%d0 460a0: 4cee 1c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a4 460a6: 4e5e unlk %fp ... 000446dc <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 446dc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 446e0: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 446e4: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 446ea: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 446ee: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 446f0: 4ef9 0004 4614 jmp 44614 <== NOT EXECUTED ... 0004c5a2 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4c5a2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4c5a6: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4c5ac: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4c5ae: 4ef9 0004 c3b8 jmp 4c3b8 <== NOT EXECUTED 00059578 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 59578: 4e56 0000 linkw %fp,#0 5957c: 222e 0010 movel %fp@(16),%d1 59580: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 59584: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5958a: 2d41 000c movel %d1,%fp@(12) 5958e: 2d40 0008 movel %d0,%fp@(8) } 59592: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 59594: 4ef9 0005 9698 jmp 59698 ... 00044eb0 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 44eb0: 4e56 fff8 linkw %fp,#-8 44eb4: 2f0b movel %a3,%sp@- 44eb6: 266e 000c moveal %fp@(12),%a3 44eba: 2f0a movel %a2,%sp@- 44ebc: 246e 0008 moveal %fp@(8),%a2 long adjustment; /* * Simple validations */ if ( !delta ) 44ec0: 4a8a tstl %a2 44ec2: 670c beqs 44ed0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 44ec4: 227c 000f 423f moveal #999999,%a1 44eca: b3ea 0004 cmpal %a2@(4),%a1 44ece: 6412 bccs 44ee2 rtems_set_errno_and_return_minus_one( EINVAL ); 44ed0: 4eb9 0004 d3d0 jsr 4d3d0 <__errno> 44ed6: 72ff moveq #-1,%d1 44ed8: 2040 moveal %d0,%a0 44eda: 7016 moveq #22,%d0 44edc: 2080 movel %d0,%a0@ 44ede: 6000 00b2 braw 44f92 if ( olddelta ) { 44ee2: 4a8b tstl %a3 44ee4: 6706 beqs 44eec olddelta->tv_sec = 0; 44ee6: 4293 clrl %a3@ olddelta->tv_usec = 0; 44ee8: 42ab 0004 clrl %a3@(4) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 44eec: 203c 000f 4240 movel #1000000,%d0 44ef2: 4c12 0800 mulsl %a2@,%d0 adjustment += delta->tv_usec; 44ef6: d0aa 0004 addl %a2@(4),%d0 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 44efa: b0b9 0005 c850 cmpl 5c850 ,%d0 44f00: 6500 008e bcsw 44f90 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44f04: 2039 0005 e130 movel 5e130 <_Thread_Dispatch_disable_level>,%d0 44f0a: 5280 addql #1,%d0 44f0c: 23c0 0005 e130 movel %d0,5e130 <_Thread_Dispatch_disable_level> * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 44f12: 486e fff8 pea %fp@(-8) 44f16: 4eb9 0004 650c jsr 4650c <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 44f1c: 202a 0004 movel %a2@(4),%d0 44f20: 223c 0000 03e8 movel #1000,%d1 44f26: 4c01 0800 mulsl %d1,%d0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 44f2a: 588f addql #4,%sp _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 44f2c: 2212 movel %a2@,%d1 44f2e: d3ae fff8 addl %d1,%fp@(-8) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 44f32: d0ae fffc addl %fp@(-4),%d0 44f36: 206e fff8 moveal %fp@(-8),%a0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 44f3a: 6006 bras 44f42 44f3c: 0680 c465 3600 addil #-1000000000,%d0 44f42: 2208 movel %a0,%d1 44f44: 5288 addql #1,%a0 44f46: 0c80 3b9a c9ff cmpil #999999999,%d0 44f4c: 62ee bhis 44f3c 44f4e: 6006 bras 44f56 44f50: 0680 3b9a ca00 addil #1000000000,%d0 44f56: 2041 moveal %d1,%a0 44f58: 5381 subql #1,%d1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 44f5a: 0c80 c465 3600 cmpil #-1000000000,%d0 44f60: 63ee blss 44f50 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 44f62: 486e fff8 pea %fp@(-8) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 44f66: 2d40 fffc movel %d0,%fp@(-4) 44f6a: 2d48 fff8 movel %a0,%fp@(-8) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 44f6e: 4eb9 0004 65a8 jsr 465a8 <_TOD_Set> _Thread_Enable_dispatch(); 44f74: 4eb9 0004 75f6 jsr 475f6 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 44f7a: 588f addql #4,%sp 44f7c: 4a8b tstl %a3 44f7e: 6710 beqs 44f90 <== NEVER TAKEN *olddelta = *delta; 44f80: 4281 clrl %d1 44f82: 2052 moveal %a2@,%a0 44f84: 226a 0004 moveal %a2@(4),%a1 44f88: 2688 movel %a0,%a3@ 44f8a: 2749 0004 movel %a1,%a3@(4) 44f8e: 6002 bras 44f92 44f90: 4281 clrl %d1 return 0; } 44f92: 246e fff0 moveal %fp@(-16),%a2 44f96: 2001 movel %d1,%d0 44f98: 266e fff4 moveal %fp@(-12),%a3 44f9c: 4e5e unlk %fp <== NOT EXECUTED 00048ea0 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48ea0: 4e56 0000 linkw %fp,#0 length = nelem * elsize; 48ea4: 41ee 0008 lea %fp@(8),%a0 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48ea8: 52b9 0005 cbc8 addql #1,5cbc8 48eae: 2f03 movel %d3,%sp@- length = nelem * elsize; 48eb0: 262e 000c movel %fp@(12),%d3 48eb4: 4c10 3800 mulsl %a0@,%d3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48eb8: 2f02 movel %d2,%sp@- length = nelem * elsize; cptr = malloc( length ); 48eba: 2f03 movel %d3,%sp@- 48ebc: 4eb9 0004 9484 jsr 49484 if ( cptr ) 48ec2: 588f addql #4,%sp size_t length; MSBUMP(calloc_calls, 1); length = nelem * elsize; cptr = malloc( length ); 48ec4: 2400 movel %d0,%d2 if ( cptr ) 48ec6: 6710 beqs 48ed8 <== NEVER TAKEN memset( cptr, '\0', length ); 48ec8: 2f03 movel %d3,%sp@- 48eca: 42a7 clrl %sp@- 48ecc: 2f00 movel %d0,%sp@- 48ece: 4eb9 0004 d318 jsr 4d318 48ed4: 4fef 000c lea %sp@(12),%sp MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ return cptr; } 48ed8: 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 */ 48eda: 53b9 0005 cbb8 subql #1,5cbb8 return cptr; } 48ee0: 242e fff8 movel %fp@(-8),%d2 48ee4: 262e fffc movel %fp@(-4),%d3 48ee8: 4e5e unlk %fp <== NOT EXECUTED 0004ac38 : #include int chdir( const char *pathname ) { 4ac38: 4e56 ffec linkw %fp,#-20 4ac3c: 2f03 movel %d3,%sp@- 4ac3e: 262e 0008 movel %fp@(8),%d3 4ac42: 2f02 movel %d2,%sp@- rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 4ac44: 4a83 tstl %d3 4ac46: 6612 bnes 4ac5a rtems_set_errno_and_return_minus_one( EFAULT ); 4ac48: 4eb9 0004 e6c8 jsr 4e6c8 <__errno> 4ac4e: 740e moveq #14,%d2 4ac50: 72ff moveq #-1,%d1 4ac52: 2040 moveal %d0,%a0 4ac54: 2082 movel %d2,%a0@ 4ac56: 6000 00ce braw 4ad26 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4ac5a: 2f03 movel %d3,%sp@- rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4ac5c: 240e movel %fp,%d2 4ac5e: 0682 ffff ffec addil #-20,%d2 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4ac64: 4eb9 0004 fa44 jsr 4fa44 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4ac6a: 7201 moveq #1,%d1 4ac6c: 2e81 movel %d1,%sp@ 4ac6e: 2f02 movel %d2,%sp@- 4ac70: 4878 0001 pea 1 4ac74: 2f00 movel %d0,%sp@- 4ac76: 2f03 movel %d3,%sp@- 4ac78: 4eb9 0004 2b2e jsr 42b2e pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4ac7e: 4fef 0014 lea %sp@(20),%sp 4ac82: 4a80 tstl %d0 4ac84: 6706 beqs 4ac8c 4ac86: 72ff moveq #-1,%d1 4ac88: 6000 009c braw 4ad26 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4ac8c: 226e fff8 moveal %fp@(-8),%a1 4ac90: 2069 0010 moveal %a1@(16),%a0 4ac94: 4a88 tstl %a0 4ac96: 6620 bnes 4acb8 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4ac98: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4ac9c: 4a88 tstl %a0 <== NOT EXECUTED 4ac9e: 6706 beqs 4aca6 <== NOT EXECUTED 4aca0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4aca2: 4e90 jsr %a0@ <== NOT EXECUTED 4aca4: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4aca6: 4eb9 0004 e6c8 jsr 4e6c8 <__errno> <== NOT EXECUTED 4acac: 72ff moveq #-1,%d1 <== NOT EXECUTED 4acae: 2040 moveal %d0,%a0 <== NOT EXECUTED 4acb0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4acb6: 606e bras 4ad26 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4acb8: 2f02 movel %d2,%sp@- 4acba: 4e90 jsr %a0@ 4acbc: 588f addql #4,%sp 4acbe: 7201 moveq #1,%d1 4acc0: b280 cmpl %d0,%d1 4acc2: 6726 beqs 4acea rtems_filesystem_freenode( &loc ); 4acc4: 206e fff8 moveal %fp@(-8),%a0 4acc8: 4a88 tstl %a0 4acca: 670e beqs 4acda <== NEVER TAKEN 4accc: 2068 001c moveal %a0@(28),%a0 4acd0: 4a88 tstl %a0 4acd2: 6706 beqs 4acda <== NEVER TAKEN 4acd4: 2f02 movel %d2,%sp@- 4acd6: 4e90 jsr %a0@ 4acd8: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 4acda: 4eb9 0004 e6c8 jsr 4e6c8 <__errno> 4ace0: 72ff moveq #-1,%d1 4ace2: 2040 moveal %d0,%a0 4ace4: 7014 moveq #20,%d0 4ace6: 2080 movel %d0,%a0@ 4ace8: 603c bras 4ad26 } rtems_filesystem_freenode( &rtems_filesystem_current ); 4acea: 2279 0005 dc1c moveal 5dc1c ,%a1 4acf0: 2069 0010 moveal %a1@(16),%a0 4acf4: 4a88 tstl %a0 4acf6: 6710 beqs 4ad08 <== NEVER TAKEN 4acf8: 2068 001c moveal %a0@(28),%a0 4acfc: 4a88 tstl %a0 4acfe: 6708 beqs 4ad08 <== NEVER TAKEN 4ad00: 4869 0004 pea %a1@(4) 4ad04: 4e90 jsr %a0@ 4ad06: 588f addql #4,%sp rtems_filesystem_current = loc; 4ad08: 4878 0014 pea 14 4ad0c: 486e ffec pea %fp@(-20) 4ad10: 2039 0005 dc1c movel 5dc1c ,%d0 4ad16: 5880 addql #4,%d0 4ad18: 2f00 movel %d0,%sp@- 4ad1a: 4eb9 0004 eee8 jsr 4eee8 return 0; 4ad20: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 4ad24: 4281 clrl %d1 return 0; } 4ad26: 242e ffe4 movel %fp@(-28),%d2 4ad2a: 2001 movel %d1,%d0 4ad2c: 262e ffe8 movel %fp@(-24),%d3 4ad30: 4e5e unlk %fp <== NOT EXECUTED 00043e28 : int chmod( const char *path, mode_t mode ) { 43e28: 4e56 ffec linkw %fp,#-20 43e2c: 2f03 movel %d3,%sp@- 43e2e: 262e 0008 movel %fp@(8),%d3 43e32: 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 ); 43e34: 240e movel %fp,%d2 43e36: 0682 ffff ffec addil #-20,%d2 43e3c: 2f03 movel %d3,%sp@- 43e3e: 4eb9 0005 1fcc jsr 51fcc 43e44: 7201 moveq #1,%d1 43e46: 2e81 movel %d1,%sp@ 43e48: 2f02 movel %d2,%sp@- 43e4a: 42a7 clrl %sp@- 43e4c: 2f00 movel %d0,%sp@- 43e4e: 2f03 movel %d3,%sp@- 43e50: 4eb9 0004 42ba jsr 442ba if ( status != 0 ) 43e56: 4fef 0014 lea %sp@(20),%sp 43e5a: 4a80 tstl %d0 43e5c: 6706 beqs 43e64 43e5e: 76ff moveq #-1,%d3 43e60: 6000 0082 braw 43ee4 return -1; if ( !loc.handlers ){ 43e64: 206e fff4 moveal %fp@(-12),%a0 43e68: 4a88 tstl %a0 43e6a: 6626 bnes 43e92 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 43e6c: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 43e70: 4a88 tstl %a0 <== NOT EXECUTED 43e72: 670e beqs 43e82 <== NOT EXECUTED 43e74: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43e78: 4a88 tstl %a0 <== NOT EXECUTED 43e7a: 6706 beqs 43e82 <== NOT EXECUTED 43e7c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43e7e: 4e90 jsr %a0@ <== NOT EXECUTED 43e80: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 43e82: 4eb9 0005 0568 jsr 50568 <__errno> <== NOT EXECUTED 43e88: 76ff moveq #-1,%d3 <== NOT EXECUTED 43e8a: 2040 moveal %d0,%a0 <== NOT EXECUTED 43e8c: 7009 moveq #9,%d0 <== NOT EXECUTED 43e8e: 2080 movel %d0,%a0@ <== NOT EXECUTED 43e90: 6052 bras 43ee4 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 43e92: 2068 001c moveal %a0@(28),%a0 43e96: 4a88 tstl %a0 43e98: 6628 bnes 43ec2 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 43e9a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 43e9e: 4a88 tstl %a0 <== NOT EXECUTED 43ea0: 670e beqs 43eb0 <== NOT EXECUTED 43ea2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43ea6: 4a88 tstl %a0 <== NOT EXECUTED 43ea8: 6706 beqs 43eb0 <== NOT EXECUTED 43eaa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43eac: 4e90 jsr %a0@ <== NOT EXECUTED 43eae: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 43eb0: 4eb9 0005 0568 jsr 50568 <__errno> <== NOT EXECUTED 43eb6: 76ff moveq #-1,%d3 <== NOT EXECUTED 43eb8: 2040 moveal %d0,%a0 <== NOT EXECUTED 43eba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 43ec0: 6022 bras 43ee4 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 43ec2: 2f2e 000c movel %fp@(12),%sp@- 43ec6: 2f02 movel %d2,%sp@- 43ec8: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 43eca: 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 ); 43ece: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 43ed0: 508f addql #8,%sp 43ed2: 4a88 tstl %a0 43ed4: 670e beqs 43ee4 <== NEVER TAKEN 43ed6: 2068 001c moveal %a0@(28),%a0 43eda: 4a88 tstl %a0 43edc: 6706 beqs 43ee4 <== NEVER TAKEN 43ede: 2f02 movel %d2,%sp@- 43ee0: 4e90 jsr %a0@ 43ee2: 588f addql #4,%sp return result; } 43ee4: 2003 movel %d3,%d0 43ee6: 242e ffe4 movel %fp@(-28),%d2 43eea: 262e ffe8 movel %fp@(-24),%d3 43eee: 4e5e unlk %fp ... 00043ef4 : int chown( const char *path, uid_t owner, gid_t group ) { 43ef4: 4e56 ffdc linkw %fp,#-36 43ef8: 48d7 003c moveml %d2-%d5,%sp@ 43efc: 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 ) ) 43f00: 240e movel %fp,%d2 43f02: 0682 ffff ffec addil #-20,%d2 43f08: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 43f0a: 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 ) ) 43f0e: 4eb9 0005 1fcc jsr 51fcc 43f14: 7201 moveq #1,%d1 43f16: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 43f18: 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 ) ) 43f1c: 2f02 movel %d2,%sp@- 43f1e: 42a7 clrl %sp@- 43f20: 2f00 movel %d0,%sp@- 43f22: 2f03 movel %d3,%sp@- 43f24: 4eb9 0004 42ba jsr 442ba 43f2a: 4fef 0014 lea %sp@(20),%sp 43f2e: 4a80 tstl %d0 43f30: 6704 beqs 43f36 43f32: 76ff moveq #-1,%d3 43f34: 6054 bras 43f8a return -1; if ( !loc.ops->chown_h ) { 43f36: 226e fff8 moveal %fp@(-8),%a1 43f3a: 2069 0018 moveal %a1@(24),%a0 43f3e: 4a88 tstl %a0 43f40: 6620 bnes 43f62 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 43f42: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 43f46: 4a88 tstl %a0 <== NOT EXECUTED 43f48: 6706 beqs 43f50 <== NOT EXECUTED 43f4a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43f4c: 4e90 jsr %a0@ <== NOT EXECUTED 43f4e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 43f50: 4eb9 0005 0568 jsr 50568 <__errno> <== NOT EXECUTED 43f56: 76ff moveq #-1,%d3 <== NOT EXECUTED 43f58: 2040 moveal %d0,%a0 <== NOT EXECUTED 43f5a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 43f60: 6028 bras 43f8a <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 43f62: 3f05 movew %d5,%sp@- 43f64: 4267 clrw %sp@- 43f66: 3f04 movew %d4,%sp@- 43f68: 4267 clrw %sp@- 43f6a: 2f02 movel %d2,%sp@- 43f6c: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 43f6e: 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 ); 43f72: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 43f74: 4fef 000c lea %sp@(12),%sp 43f78: 4a88 tstl %a0 43f7a: 670e beqs 43f8a <== NEVER TAKEN 43f7c: 2068 001c moveal %a0@(28),%a0 43f80: 4a88 tstl %a0 43f82: 6706 beqs 43f8a <== NEVER TAKEN 43f84: 2f02 movel %d2,%sp@- 43f86: 4e90 jsr %a0@ 43f88: 588f addql #4,%sp return result; } 43f8a: 2003 movel %d3,%d0 43f8c: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 43f92: 4e5e unlk %fp ... 000426a8 : #include int chroot( const char *pathname ) { 426a8: 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) { 426ac: 203c 0005 f278 movel #389752,%d0 #include int chroot( const char *pathname ) { 426b2: 2f0b movel %a3,%sp@- 426b4: 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) { 426b6: b0b9 0005 dc1c cmpl 5dc1c ,%d0 426bc: 6628 bnes 426e6 <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 426be: 4eb9 0004 3be6 jsr 43be6 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 426c4: 41f9 0005 f278 lea 5f278 ,%a0 426ca: b1f9 0005 dc1c cmpal 5dc1c ,%a0 426d0: 6614 bnes 426e6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 426d2: 4eb9 0004 e6c8 jsr 4e6c8 <__errno> <== NOT EXECUTED 426d8: 72ff moveq #-1,%d1 <== NOT EXECUTED 426da: 2040 moveal %d0,%a0 <== NOT EXECUTED 426dc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 426e2: 6000 0084 braw 42768 <== NOT EXECUTED } result = chdir(pathname); 426e6: 2f2e 0008 movel %fp@(8),%sp@- 426ea: 4eb9 0004 ac38 jsr 4ac38 if (result) { 426f0: 588f addql #4,%sp 426f2: 4a80 tstl %d0 426f4: 6620 bnes 42716 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 426f6: 42a7 clrl %sp@- 426f8: 486e ffec pea %fp@(-20) 426fc: 42a7 clrl %sp@- 426fe: 4878 0001 pea 1 42702: 4879 0005 cc63 pea 5cc63 <__FUNCTION__.5390+0x18> 42708: 4eb9 0004 2b2e jsr 42b2e 4270e: 4fef 0014 lea %sp@(20),%sp 42712: 4a80 tstl %d0 42714: 6714 beqs 4272a <== ALWAYS TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 42716: 45f9 0004 e6c8 lea 4e6c8 <__errno>,%a2 <== NOT EXECUTED 4271c: 4e92 jsr %a2@ <== NOT EXECUTED 4271e: 2640 moveal %d0,%a3 <== NOT EXECUTED 42720: 4e92 jsr %a2@ <== NOT EXECUTED 42722: 72ff moveq #-1,%d1 <== NOT EXECUTED 42724: 2040 moveal %d0,%a0 <== NOT EXECUTED 42726: 2690 movel %a0@,%a3@ <== NOT EXECUTED 42728: 603e bras 42768 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 4272a: 2279 0005 dc1c moveal 5dc1c ,%a1 42730: 2069 0024 moveal %a1@(36),%a0 42734: 4a88 tstl %a0 42736: 6710 beqs 42748 <== NEVER TAKEN 42738: 2068 001c moveal %a0@(28),%a0 4273c: 4a88 tstl %a0 4273e: 6708 beqs 42748 <== NEVER TAKEN 42740: 4869 0018 pea %a1@(24) 42744: 4e90 jsr %a0@ 42746: 588f addql #4,%sp rtems_filesystem_root = loc; 42748: 4878 0014 pea 14 4274c: 486e ffec pea %fp@(-20) 42750: 2079 0005 dc1c moveal 5dc1c ,%a0 42756: 41e8 0018 lea %a0@(24),%a0 4275a: 2f08 movel %a0,%sp@- 4275c: 4eb9 0004 eee8 jsr 4eee8 return 0; 42762: 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; 42766: 4281 clrl %d1 return 0; } 42768: 246e ffe4 moveal %fp@(-28),%a2 4276c: 2001 movel %d1,%d0 4276e: 266e ffe8 moveal %fp@(-24),%a3 42772: 4e5e unlk %fp ... 00044da8 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 44da8: 4e56 0000 linkw %fp,#0 44dac: 222e 0008 movel %fp@(8),%d1 44db0: 202e 000c movel %fp@(12),%d0 44db4: 2f02 movel %d2,%sp@- if ( !tp ) 44db6: 4a80 tstl %d0 44db8: 6608 bnes 44dc2 rtems_set_errno_and_return_minus_one( EINVAL ); 44dba: 4eb9 0004 d780 jsr 4d780 <__errno> 44dc0: 6044 bras 44e06 if ( clock_id == CLOCK_REALTIME ) { 44dc2: 7401 moveq #1,%d2 44dc4: b481 cmpl %d1,%d2 44dc6: 660a bnes 44dd2 _TOD_Get(tp); 44dc8: 2f00 movel %d0,%sp@- 44dca: 4eb9 0004 69ec jsr 469ec <_TOD_Get> 44dd0: 600e bras 44de0 return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 44dd2: 7404 moveq #4,%d2 44dd4: b481 cmpl %d1,%d2 44dd6: 660e bnes 44de6 <== ALWAYS TAKEN _TOD_Get_uptime_as_timespec( tp ); 44dd8: 2f00 movel %d0,%sp@- 44dda: 4eb9 0004 6a58 jsr 46a58 <_TOD_Get_uptime_as_timespec> return 0; 44de0: 588f addql #4,%sp _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { _TOD_Get_uptime_as_timespec( tp ); 44de2: 4281 clrl %d1 return 0; 44de4: 6028 bras 44e0e } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 44de6: 7402 moveq #2,%d2 44de8: b481 cmpl %d1,%d2 44dea: 67ec beqs 44dd8 44dec: 41f9 0004 d780 lea 4d780 <__errno>,%a0 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 44df2: 7003 moveq #3,%d0 44df4: b081 cmpl %d1,%d0 44df6: 660c bnes 44e04 rtems_set_errno_and_return_minus_one( ENOSYS ); 44df8: 4e90 jsr %a0@ 44dfa: 7458 moveq #88,%d2 44dfc: 72ff moveq #-1,%d1 44dfe: 2040 moveal %d0,%a0 44e00: 2082 movel %d2,%a0@ 44e02: 600a bras 44e0e #endif rtems_set_errno_and_return_minus_one( EINVAL ); 44e04: 4e90 jsr %a0@ 44e06: 2040 moveal %d0,%a0 44e08: 7016 moveq #22,%d0 44e0a: 72ff moveq #-1,%d1 44e0c: 2080 movel %d0,%a0@ return 0; } 44e0e: 242e fffc movel %fp@(-4),%d2 44e12: 2001 movel %d1,%d0 44e14: 4e5e unlk %fp <== NOT EXECUTED 00044e18 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 44e18: 4e56 0000 linkw %fp,#0 44e1c: 222e 0008 movel %fp@(8),%d1 44e20: 206e 000c moveal %fp@(12),%a0 if ( !tp ) 44e24: 4a88 tstl %a0 44e26: 6710 beqs 44e38 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 44e28: 7001 moveq #1,%d0 44e2a: b081 cmpl %d1,%d0 44e2c: 6634 bnes 44e62 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 44e2e: 203c 21da e4ff movel #567993599,%d0 44e34: b090 cmpl %a0@,%d0 44e36: 6508 bcss 44e40 rtems_set_errno_and_return_minus_one( EINVAL ); 44e38: 4eb9 0004 d780 jsr 4d780 <__errno> 44e3e: 604a bras 44e8a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44e40: 2039 0005 e908 movel 5e908 <_Thread_Dispatch_disable_level>,%d0 44e46: 5280 addql #1,%d0 44e48: 23c0 0005 e908 movel %d0,5e908 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _TOD_Set( tp ); 44e4e: 2f08 movel %a0,%sp@- 44e50: 4eb9 0004 6ab0 jsr 46ab0 <_TOD_Set> _Thread_Enable_dispatch(); 44e56: 4eb9 0004 7afe jsr 47afe <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 44e5c: 588f addql #4,%sp if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 44e5e: 4281 clrl %d1 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 44e60: 6030 bras 44e92 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 44e62: 7002 moveq #2,%d0 44e64: b081 cmpl %d1,%d0 44e66: 6608 bnes 44e70 rtems_set_errno_and_return_minus_one( ENOSYS ); 44e68: 4eb9 0004 d780 jsr 4d780 <__errno> 44e6e: 600e bras 44e7e 44e70: 41f9 0004 d780 lea 4d780 <__errno>,%a0 #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 44e76: 7003 moveq #3,%d0 44e78: b081 cmpl %d1,%d0 44e7a: 660c bnes 44e88 rtems_set_errno_and_return_minus_one( ENOSYS ); 44e7c: 4e90 jsr %a0@ 44e7e: 2040 moveal %d0,%a0 44e80: 7058 moveq #88,%d0 44e82: 72ff moveq #-1,%d1 44e84: 2080 movel %d0,%a0@ 44e86: 600a bras 44e92 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 44e88: 4e90 jsr %a0@ 44e8a: 2040 moveal %d0,%a0 44e8c: 7016 moveq #22,%d0 44e8e: 72ff moveq #-1,%d1 44e90: 2080 movel %d0,%a0@ return 0; } 44e92: 2001 movel %d1,%d0 44e94: 4e5e unlk %fp <== NOT EXECUTED 00048eec : #include int close( int fd ) { 48eec: 4e56 0000 linkw %fp,#0 48ef0: 202e 0008 movel %fp@(8),%d0 48ef4: 2f0a movel %a2,%sp@- 48ef6: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 48ef8: b0b9 0005 b4a4 cmpl 5b4a4 ,%d0 48efe: 6416 bccs 48f16 iop = rtems_libio_iop(fd); 48f00: 2479 0005 cba8 moveal 5cba8 ,%a2 48f06: ed88 lsll #6,%d0 48f08: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 48f0a: 202a 0014 movel %a2@(20),%d0 48f0e: 0280 0000 0100 andil #256,%d0 48f14: 6610 bnes 48f26 48f16: 4eb9 0004 ca88 jsr 4ca88 <__errno> 48f1c: 74ff moveq #-1,%d2 48f1e: 2040 moveal %d0,%a0 48f20: 7009 moveq #9,%d0 48f22: 2080 movel %d0,%a0@ 48f24: 603a bras 48f60 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 48f26: 206a 003c moveal %a2@(60),%a0 48f2a: 2068 0004 moveal %a0@(4),%a0 48f2e: 4a88 tstl %a0 48f30: 6604 bnes 48f36 <== ALWAYS TAKEN 48f32: 4282 clrl %d2 <== NOT EXECUTED 48f34: 6008 bras 48f3e <== NOT EXECUTED rc = (*iop->handlers->close_h)( iop ); 48f36: 2f0a movel %a2,%sp@- 48f38: 4e90 jsr %a0@ 48f3a: 588f addql #4,%sp 48f3c: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 48f3e: 206a 0024 moveal %a2@(36),%a0 48f42: 4a88 tstl %a0 48f44: 6710 beqs 48f56 <== NEVER TAKEN 48f46: 2068 001c moveal %a0@(28),%a0 48f4a: 4a88 tstl %a0 48f4c: 6708 beqs 48f56 48f4e: 486a 0018 pea %a2@(24) 48f52: 4e90 jsr %a0@ 48f54: 588f addql #4,%sp rtems_libio_free( iop ); 48f56: 2f0a movel %a2,%sp@- 48f58: 4eb9 0004 92b6 jsr 492b6 return rc; 48f5e: 588f addql #4,%sp } 48f60: 2002 movel %d2,%d0 48f62: 242e fff8 movel %fp@(-8),%d2 48f66: 246e fffc moveal %fp@(-4),%a2 48f6a: 4e5e unlk %fp <== NOT EXECUTED 00048408 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 48408: 4e56 fff4 linkw %fp,#-12 4840c: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 48410: 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; 48414: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 48418: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4841c: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 48420: 2f29 000c movel %a1@(12),%sp@- 48424: 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; 48428: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 4842c: 4eb9 0004 9678 jsr 49678 np->major, np->minor, (void *) &args ); if ( status ) { 48432: 4fef 000c lea %sp@(12),%sp 48436: 4a80 tstl %d0 48438: 670a beqs 48444 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4843a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4843c: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 48442: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 48444: 4e5e unlk %fp <== NOT EXECUTED 0004845a : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4845a: 4e56 ffe4 linkw %fp,#-28 4845e: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 48462: 246e 0014 moveal %fp@(20),%a2 48466: 282e 0008 movel %fp@(8),%d4 4846a: 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; 4846e: 2652 moveal %a2@,%a3 if (!device_name_table) 48470: 4a8b tstl %a3 48472: 670a beqs 4847e <== NEVER TAKEN 48474: 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) 48476: 4bf9 0004 bae4 lea 4bae4 ,%a5 4847c: 6058 bras 484d6 } /* 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 ); 4847e: 4eb9 0004 a7dc jsr 4a7dc <__errno> <== NOT EXECUTED 48484: 740e moveq #14,%d2 <== NOT EXECUTED 48486: 72ff moveq #-1,%d1 <== NOT EXECUTED 48488: 2040 moveal %d0,%a0 <== NOT EXECUTED 4848a: 2082 movel %d2,%a0@ <== NOT EXECUTED 4848c: 605e bras 484ec <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4848e: 2853 moveal %a3@,%a4 48490: 4a8c tstl %a4 48492: 673c beqs 484d0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 48494: 2f03 movel %d3,%sp@- 48496: 2f0c movel %a4,%sp@- 48498: 2f04 movel %d4,%sp@- 4849a: 4e95 jsr %a5@ 4849c: 4fef 000c lea %sp@(12),%sp 484a0: 4a80 tstl %d0 484a2: 662c bnes 484d0 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 484a4: 4a34 3800 tstb %a4@(00000000,%d3:l) 484a8: 6626 bnes 484d0 <== NEVER TAKEN /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 484aa: 2079 0005 9410 moveal 59410 ,%a0 484b0: 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; 484b2: 203c 0005 93c4 movel #365508,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 484b8: 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; 484be: 41f9 0005 937c lea 5937c ,%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; 484c4: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; 484c8: 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]; 484cc: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 484ce: 601c bras 484ec /* 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++) { 484d0: 5282 addql #1,%d2 484d2: 47eb 0014 lea %a3@(20),%a3 484d6: b4b9 0005 9298 cmpl 59298 ,%d2 484dc: 65b0 bcss 4848e pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 484de: 4eb9 0004 a7dc jsr 4a7dc <__errno> 484e4: 72ff moveq #-1,%d1 484e6: 2040 moveal %d0,%a0 484e8: 7002 moveq #2,%d0 484ea: 2080 movel %d0,%a0@ } 484ec: 2001 movel %d1,%d0 484ee: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 484f4: 4e5e unlk %fp <== NOT EXECUTED 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 9298 movel 59298 ,%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 81f4 jsr 481f4 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca2: 588f addql #4,%sp ) { rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 41ca4: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca6: 6610 bnes 41cb8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41ca8: 4eb9 0004 a7dc jsr 4a7dc <__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 9298 movel 59298 ,%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 b02c jsr 4b02c 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 93c4 movel #365508,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41cdc: 41f9 0005 937c lea 5937c ,%a0 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 41ce2: 2540 0024 movel %d0,%a2@(36) temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 41ce6: 4280 clrl %d0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41ce8: 2548 0028 movel %a0,%a2@(40) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 41cec: 2542 001c movel %d2,%a2@(28) return 0; } 41cf0: 242e fff8 movel %fp@(-8),%d2 41cf4: 246e fffc moveal %fp@(-4),%a2 41cf8: 4e5e unlk %fp <== NOT EXECUTED 00041e30 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 41e30: 4e56 fff0 linkw %fp,#-16 41e34: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e38: 486e fff0 pea %fp@(-16) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; 41e3c: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e42: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e46: 2f29 000c movel %a1@(12),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; args.buffer = buffer; 41e4a: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) status = rtems_io_control( 41e50: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41e54: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 41e58: 4eb9 0004 583c jsr 4583c np->major, np->minor, (void *) &args ); if ( status ) 41e5e: 4fef 000c lea %sp@(12),%sp 41e62: 4a80 tstl %d0 41e64: 670c beqs 41e72 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 41e66: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41e68: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 41e6e: 588f addql #4,%sp <== NOT EXECUTED 41e70: 6004 bras 41e76 <== NOT EXECUTED return args.ioctl_return; 41e72: 202e fffc movel %fp@(-4),%d0 } 41e76: 4e5e unlk %fp ... 00041cfc : * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41cfc: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41cfe: 4e56 ffdc linkw %fp,#-36 41d02: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 41d06: 246e 0008 moveal %fp@(8),%a2 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d0a: 1012 moveb %a2@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d0c: 282e 000c movel %fp@(12),%d4 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d10: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d12: 2c2e 0010 movel %fp@(16),%d6 41d16: 2a2e 0014 movel %fp@(20),%d5 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 41d1a: b280 cmpl %d0,%d1 41d1c: 6628 bnes 41d46 <== NEVER TAKEN 41d1e: 123c 0065 moveb #101,%d1 41d22: 102a 0001 moveb %a2@(1),%d0 41d26: 49c0 extbl %d0 41d28: b280 cmpl %d0,%d1 41d2a: 661a bnes 41d46 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 41d2c: 123c 0076 moveb #118,%d1 41d30: 102a 0002 moveb %a2@(2),%d0 41d34: 49c0 extbl %d0 41d36: b280 cmpl %d0,%d1 41d38: 660c bnes 41d46 <== NEVER TAKEN 41d3a: 4a2a 0003 tstb %a2@(3) 41d3e: 6606 bnes 41d46 41d40: 4201 clrb %d1 41d42: 6000 00d2 braw 41e16 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 41d46: 2004 movel %d4,%d0 41d48: 0280 0000 f000 andil #61440,%d0 41d4e: 0c80 0000 6000 cmpil #24576,%d0 41d54: 671a beqs 41d70 <== NEVER TAKEN 41d56: 0c80 0000 2000 cmpil #8192,%d0 41d5c: 6712 beqs 41d70 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 41d5e: 4eb9 0004 a7dc jsr 4a7dc <__errno> <== NOT EXECUTED 41d64: 7816 moveq #22,%d4 <== NOT EXECUTED 41d66: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d68: 2040 moveal %d0,%a0 <== NOT EXECUTED 41d6a: 2084 movel %d4,%a0@ <== NOT EXECUTED 41d6c: 6000 00a8 braw 41e16 <== NOT EXECUTED else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 41d70: 206e 0018 moveal %fp@(24),%a0 41d74: 2650 moveal %a0@,%a3 if (!device_name_table) 41d76: 4a8b tstl %a3 41d78: 670e beqs 41d88 <== NEVER TAKEN 41d7a: 284b moveal %a3,%a4 41d7c: 74ff moveq #-1,%d2 41d7e: 4283 clrl %d3 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41d80: 4bf9 0004 b608 lea 4b608 ,%a5 41d86: 6038 bras 41dc0 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 41d88: 4eb9 0004 a7dc jsr 4a7dc <__errno> <== NOT EXECUTED 41d8e: 760e moveq #14,%d3 <== NOT EXECUTED 41d90: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d92: 2240 moveal %d0,%a1 <== NOT EXECUTED 41d94: 2283 movel %d3,%a1@ <== NOT EXECUTED 41d96: 607e bras 41e16 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 41d98: 2014 movel %a4@,%d0 41d9a: 671c beqs 41db8 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41d9c: 2f00 movel %d0,%sp@- 41d9e: 2f0a movel %a2,%sp@- 41da0: 4e95 jsr %a5@ 41da2: 508f addql #8,%sp 41da4: 4a80 tstl %d0 41da6: 6612 bnes 41dba <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EEXIST ); 41da8: 4eb9 0004 a7dc jsr 4a7dc <__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 9298 cmpl 59298 ,%d3 41dc6: 65d0 bcss 41d98 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 41dc8: 70ff moveq #-1,%d0 41dca: b082 cmpl %d2,%d0 41dcc: 6610 bnes 41dde <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41dce: 4eb9 0004 a7dc jsr 4a7dc <__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 bacc jsr 4bacc 41e00: 588f addql #4,%sp device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 41e02: 2744 0010 movel %d4,%a3@(16) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 41e06: 2740 0004 movel %d0,%a3@(4) device_name_table[slot].major = major; 41e0a: 2746 0008 movel %d6,%a3@(8) device_name_table[slot].minor = minor; 41e0e: 2745 000c movel %d5,%a3@(12) device_name_table[slot].mode = mode; _ISR_Enable(level); 41e12: 46c3 movew %d3,%sr 41e14: 4281 clrl %d1 return 0; } 41e16: 2001 movel %d1,%d0 41e18: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 41e1e: 4e5e unlk %fp ... 00041e7c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 41e7c: 4e56 fff4 linkw %fp,#-12 41e80: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41e84: 486e fff4 pea %fp@(-12) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 41e88: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e8e: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 41e92: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) status = rtems_io_open( 41e98: 2f29 000c movel %a1@(12),%sp@- 41e9c: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41ea0: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41ea4: 4eb9 0004 595c jsr 4595c np->major, np->minor, (void *) &args ); if ( status ) 41eaa: 4fef 000c lea %sp@(12),%sp 41eae: 4a80 tstl %d0 41eb0: 670a beqs 41ebc <== ALWAYS TAKEN return rtems_deviceio_errno(status); 41eb2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41eb4: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 41eba: 588f addql #4,%sp <== NOT EXECUTED return 0; } 41ebc: 4e5e unlk %fp <== NOT EXECUTED 00041ec0 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 41ec0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 41ec4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 41ec8: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 41ecc: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41ed2: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 41ed6: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 41edc: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41ee2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 41ee6: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 41eea: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41eee: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 41ef2: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41ef6: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 41efa: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 41efe: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 41f02: 4eb9 0004 59b4 jsr 459b4 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 41f08: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 41f0c: 4a80 tstl %d0 <== NOT EXECUTED 41f0e: 670c beqs 41f1c <== NOT EXECUTED return rtems_deviceio_errno(status); 41f10: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f12: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 41f18: 588f addql #4,%sp <== NOT EXECUTED 41f1a: 6004 bras 41f20 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41f1c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 41f20: 4e5e unlk %fp <== NOT EXECUTED 00041f24 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 41f24: 4e56 0000 linkw %fp,#0 41f28: 206e 0008 moveal %fp@(8),%a0 41f2c: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 41f30: 2050 moveal %a0@,%a0 if (!the_dev) 41f32: 4a88 tstl %a0 41f34: 6610 bnes 41f46 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 41f36: 4eb9 0004 a7dc jsr 4a7dc <__errno> <== NOT EXECUTED 41f3c: 720e moveq #14,%d1 <== NOT EXECUTED 41f3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f40: 70ff moveq #-1,%d0 <== NOT EXECUTED 41f42: 2081 movel %d1,%a0@ <== NOT EXECUTED 41f44: 6016 bras 41f5c <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 41f46: 2228 000c movel %a0@(12),%d1 buf->st_mode = the_dev->mode; 41f4a: 4280 clrl %d0 the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 41f4c: 2368 0008 0016 movel %a0@(8),%a1@(22) buf->st_mode = the_dev->mode; 41f52: 2368 0010 000c movel %a0@(16),%a1@(12) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 41f58: 2341 001a movel %d1,%a1@(26) buf->st_mode = the_dev->mode; return 0; } 41f5c: 4e5e unlk %fp <== NOT EXECUTED 00041f60 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 41f60: 4e56 ffe4 linkw %fp,#-28 41f64: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 41f68: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 41f6c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41f72: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 41f76: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 41f7c: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41f82: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 41f86: 2f29 000c movel %a1@(12),%sp@- 41f8a: 2f29 0008 movel %a1@(8),%sp@- rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41f8e: 2028 000c movel %a0@(12),%d0 41f92: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 41f96: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 41f9a: 2d40 ffe8 movel %d0,%fp@(-24) 41f9e: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 41fa2: 4eb9 0004 5a0c jsr 45a0c np->major, np->minor, (void *) &args ); if ( status ) 41fa8: 4fef 000c lea %sp@(12),%sp 41fac: 4a80 tstl %d0 41fae: 670c beqs 41fbc <== ALWAYS TAKEN return rtems_deviceio_errno(status); 41fb0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fb2: 4eb9 0004 84f8 jsr 484f8 <== NOT EXECUTED 41fb8: 588f addql #4,%sp <== NOT EXECUTED 41fba: 6004 bras 41fc0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41fbc: 202e fffc movel %fp@(-4),%d0 } 41fc0: 4e5e unlk %fp <== NOT EXECUTED 0004aba8 : */ int device_close( rtems_libio_t *iop ) { 4aba8: 4e56 fff4 linkw %fp,#-12 4abac: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4abb0: 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; 4abb4: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4abb8: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4abbc: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4abc0: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4abc4: 2f28 0050 movel %a0@(80),%sp@- 4abc8: 2f28 004c movel %a0@(76),%sp@- 4abcc: 4eb9 0004 bdc0 jsr 4bdc0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4abd2: 4fef 000c lea %sp@(12),%sp 4abd6: 4a80 tstl %d0 4abd8: 670a beqs 4abe4 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4abda: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4abdc: 4eb9 0004 c344 jsr 4c344 <== NOT EXECUTED 4abe2: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4abe4: 4e5e unlk %fp <== NOT EXECUTED 0004aa96 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4aa96: 4e56 fff0 linkw %fp,#-16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4aa9a: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) the_jnode = iop->file_info; status = rtems_io_control( 4aaa0: 486e fff0 pea %fp@(-16) int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4aaa4: 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; 4aaa8: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4aaae: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4aab2: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4aab6: 2f28 0050 movel %a0@(80),%sp@- 4aaba: 2f28 004c movel %a0@(76),%sp@- 4aabe: 4eb9 0004 be18 jsr 4be18 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4aac4: 4fef 000c lea %sp@(12),%sp 4aac8: 4a80 tstl %d0 4aaca: 670c beqs 4aad8 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4aacc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4aace: 4eb9 0004 c344 jsr 4c344 <== NOT EXECUTED 4aad4: 588f addql #4,%sp <== NOT EXECUTED 4aad6: 6004 bras 4aadc <== NOT EXECUTED return args.ioctl_return; 4aad8: 202e fffc movel %fp@(-4),%d0 } 4aadc: 4e5e unlk %fp <== NOT EXECUTED 0004abe8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4abe8: 4e56 fff4 linkw %fp,#-12 4abec: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4abf0: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4abf4: 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; 4abfa: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4abfe: 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; 4ac04: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4ac08: 2f29 0050 movel %a1@(80),%sp@- 4ac0c: 2f29 004c movel %a1@(76),%sp@- 4ac10: 4eb9 0004 be70 jsr 4be70 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4ac16: 4fef 000c lea %sp@(12),%sp 4ac1a: 4a80 tstl %d0 4ac1c: 670a beqs 4ac28 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4ac1e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ac20: 4eb9 0004 c344 jsr 4c344 <== NOT EXECUTED 4ac26: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4ac28: 4e5e unlk %fp <== NOT EXECUTED 0004ab44 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4ab44: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4ab48: 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( 4ab4c: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4ab50: 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; 4ab56: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4ab5c: 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; 4ab62: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4ab66: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4ab6a: 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; 4ab6e: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4ab72: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4ab76: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4ab7a: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4ab7e: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4ab82: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4ab86: 4eb9 0004 bec8 jsr 4bec8 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4ab8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ab90: 4a80 tstl %d0 <== NOT EXECUTED 4ab92: 670c beqs 4aba0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4ab94: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ab96: 4eb9 0004 c344 jsr 4c344 <== NOT EXECUTED 4ab9c: 588f addql #4,%sp <== NOT EXECUTED 4ab9e: 6004 bras 4aba4 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4aba0: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4aba4: 4e5e unlk %fp <== NOT EXECUTED 0004aae0 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4aae0: 4e56 ffe4 linkw %fp,#-28 4aae4: 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( 4aae8: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4aaec: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4aaf2: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4aaf8: 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; 4aafe: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4ab02: 2028 000c movel %a0@(12),%d0 4ab06: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4ab0a: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4ab0e: 2d40 ffe8 movel %d0,%fp@(-24) 4ab12: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4ab16: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4ab1a: 2f29 0050 movel %a1@(80),%sp@- 4ab1e: 2f29 004c movel %a1@(76),%sp@- 4ab22: 4eb9 0004 bf20 jsr 4bf20 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4ab28: 4fef 000c lea %sp@(12),%sp 4ab2c: 4a80 tstl %d0 4ab2e: 670c beqs 4ab3c <== ALWAYS TAKEN return rtems_deviceio_errno(status); 4ab30: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ab32: 4eb9 0004 c344 jsr 4c344 <== NOT EXECUTED 4ab38: 588f addql #4,%sp <== NOT EXECUTED 4ab3a: 6004 bras 4ab40 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4ab3c: 202e fffc movel %fp@(-4),%d0 } 4ab40: 4e5e unlk %fp <== NOT EXECUTED 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 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 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43a7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a7e: 4eb9 0004 55bc jsr 455bc <== 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 <== NOT EXECUTED 00042d30 : int dup2( int fildes, int fildes2 ) { 42d30: 4e56 ffa8 linkw %fp,#-88 42d34: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d38: 280e movel %fp,%d4 42d3a: 0684 ffff ffba addil #-70,%d4 42d40: 45f9 0004 34dc lea 434dc ,%a2 42d46: 2f04 movel %d4,%sp@- int dup2( int fildes, int fildes2 ) { 42d48: 242e 0008 movel %fp@(8),%d2 42d4c: 262e 000c movel %fp@(12),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d50: 2f02 movel %d2,%sp@- 42d52: 4e92 jsr %a2@ if ( status == -1 ) 42d54: 508f addql #8,%sp 42d56: 72ff moveq #-1,%d1 42d58: b280 cmpl %d0,%d1 42d5a: 6720 beqs 42d7c <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 42d5c: 2f04 movel %d4,%sp@- 42d5e: 2f03 movel %d3,%sp@- 42d60: 4e92 jsr %a2@ if ( status == -1 ) 42d62: 508f addql #8,%sp 42d64: 72ff moveq #-1,%d1 42d66: b280 cmpl %d0,%d1 42d68: 6712 beqs 42d7c <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 42d6a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42d6c: 42a7 clrl %sp@- <== NOT EXECUTED 42d6e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42d70: 4eb9 0004 318c jsr 4318c <== NOT EXECUTED 42d76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42d7a: 6002 bras 42d7e <== NOT EXECUTED 42d7c: 70ff moveq #-1,%d0 } 42d7e: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 42d84: 4e5e unlk %fp <== NOT EXECUTED 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 b67c moveal 5b67c <__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 00042a50 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 42a50: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 42a54: 2039 0005 f7a6 movel 5f7a6 ,%d0 <== NOT EXECUTED 42a5a: 670a beqs 42a66 <== NOT EXECUTED fclose(group_fp); 42a5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42a5e: 4eb9 0004 e862 jsr 4e862 <== NOT EXECUTED 42a64: 588f addql #4,%sp <== NOT EXECUTED } 42a66: 4e5e unlk %fp <== NOT EXECUTED 00042a6a : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 42a6a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 42a6e: 2039 0005 f6be movel 5f6be ,%d0 <== NOT EXECUTED 42a74: 670a beqs 42a80 <== NOT EXECUTED fclose(passwd_fp); 42a76: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42a78: 4eb9 0004 e862 jsr 4e862 <== NOT EXECUTED 42a7e: 588f addql #4,%sp <== NOT EXECUTED } 42a80: 4e5e unlk %fp <== NOT EXECUTED 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 b67c moveal 5b67c <__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 a3ed pea 5a3ed <== 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 a3eb pea 5a3eb <== 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 b67c moveal 5b67c <__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 a3eb pea 5a3eb <== 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 0004318c : int fcntl( int fd, int cmd, ... ) { 4318c: 4e56 fff0 linkw %fp,#-16 43190: 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, ...)); 43194: 41ee 0010 lea %fp@(16),%a0 43198: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4319c: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 431a0: 2279 0005 ee64 moveal 5ee64 ,%a1 431a6: b3c0 cmpal %d0,%a1 431a8: 6316 blss 431c0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 431aa: 2239 0006 056c movel 6056c ,%d1 431b0: 2441 moveal %d1,%a2 431b2: ed88 lsll #6,%d0 431b4: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 431b6: 202a 0014 movel %a2@(20),%d0 431ba: 0800 0008 btst #8,%d0 431be: 6612 bnes 431d2 <== ALWAYS TAKEN 431c0: 4eb9 0004 ee58 jsr 4ee58 <__errno> <== NOT EXECUTED 431c6: 74ff moveq #-1,%d2 <== NOT EXECUTED 431c8: 7209 moveq #9,%d1 <== NOT EXECUTED 431ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 431cc: 2081 movel %d1,%a0@ <== NOT EXECUTED 431ce: 6000 011e braw 432ee <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 431d2: 7409 moveq #9,%d2 431d4: b483 cmpl %d3,%d2 431d6: 6500 00de bcsw 432b6 431da: 343b 3a08 movew %pc@(431e4 ,%d3:l:2),%d2 431de: 48c2 extl %d2 431e0: 4efb 2802 jmp %pc@(431e4 ,%d2:l) 431e4: 0014 024 <== NOT EXECUTED 431e6: 006e 0156 <== NOT EXECUTED 431e8: 007a 0172 <== NOT EXECUTED 431ea: 0092 00a0 00c0 oril #10485952,%d2 <== NOT EXECUTED 431f0: 00c0 bitrev %d0 <== NOT EXECUTED 431f2: 00c0 bitrev %d0 <== NOT EXECUTED 431f4: 00c0 bitrev %d0 <== NOT EXECUTED 431f6: 00c0 bitrev %d0 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 431f8: 2410 movel %a0@,%d2 if ( fd2 ) 431fa: 6710 beqs 4320c <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 431fc: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 431fe: 6204 bhis 43204 <== NOT EXECUTED 43200: 97cb subal %a3,%a3 <== NOT EXECUTED 43202: 601a bras 4321e <== NOT EXECUTED 43204: 2641 moveal %d1,%a3 <== NOT EXECUTED 43206: ed8a lsll #6,%d2 <== NOT EXECUTED 43208: d7c2 addal %d2,%a3 <== NOT EXECUTED 4320a: 6012 bras 4321e <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 4320c: 4eb9 0004 38ac jsr 438ac 43212: 2640 moveal %d0,%a3 if ( diop == 0 ) { 43214: 4a80 tstl %d0 43216: 6606 bnes 4321e <== ALWAYS TAKEN 43218: 74ff moveq #-1,%d2 <== NOT EXECUTED 4321a: 6000 00d2 braw 432ee <== 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); 4321e: 240b movel %a3,%d2 ret = -1; break; } } diop->handlers = iop->handlers; 43220: 276a 003c 003c movel %a2@(60),%a3@(60) diop->file_info = iop->file_info; 43226: 276a 0038 0038 movel %a2@(56),%a3@(56) diop->flags = iop->flags; 4322c: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 43232: 4878 0014 pea 14 43236: 486a 0018 pea %a2@(24) 4323a: 486b 0018 pea %a3@(24) 4323e: 4eb9 0005 0088 jsr 50088 ret = (int) (diop - rtems_libio_iops); 43244: 4fef 000c lea %sp@(12),%sp 43248: 94b9 0006 056c subl 6056c ,%d2 4324e: ec82 asrl #6,%d2 43250: 6074 bras 432c6 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 43252: 2400 movel %d0,%d2 43254: 720b moveq #11,%d1 43256: e2aa lsrl %d1,%d2 43258: 7001 moveq #1,%d0 4325a: c480 andl %d0,%d2 4325c: 606c bras 432ca * 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 ) ) 4325e: 4a90 tstl %a0@ 43260: 6708 beqs 4326a <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 43262: 4282 clrl %d2 43264: 08c0 000b bset #11,%d0 43268: 6006 bras 43270 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 4326a: 4282 clrl %d2 <== NOT EXECUTED 4326c: 0880 000b bclr #11,%d0 <== NOT EXECUTED 43270: 2540 0014 movel %d0,%a2@(20) 43274: 6054 bras 432ca break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 43276: 2f00 movel %d0,%sp@- 43278: 4eb9 0004 3724 jsr 43724 4327e: 588f addql #4,%sp 43280: 2400 movel %d0,%d2 43282: 6042 bras 432c6 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 43284: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 43286: 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 ) ); 43288: 4eb9 0004 394c jsr 4394c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 4328e: 222a 0014 movel %a2@(20),%d1 43292: 588f addql #4,%sp 43294: 0280 0000 0201 andil #513,%d0 4329a: 0281 ffff fdfe andil #-514,%d1 432a0: 8081 orl %d1,%d0 432a2: 60cc bras 43270 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 432a4: 4eb9 0004 ee58 jsr 4ee58 <__errno> 432aa: 74ff moveq #-1,%d2 432ac: 2040 moveal %d0,%a0 432ae: 20bc 0000 0086 movel #134,%a0@ 432b4: 6038 bras 432ee ret = -1; break; default: errno = EINVAL; 432b6: 4eb9 0004 ee58 jsr 4ee58 <__errno> 432bc: 74ff moveq #-1,%d2 432be: 2040 moveal %d0,%a0 432c0: 7016 moveq #22,%d0 432c2: 2080 movel %d0,%a0@ 432c4: 6028 bras 432ee /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 432c6: 4a82 tstl %d2 432c8: 6d24 blts 432ee <== NEVER TAKEN if (iop->handlers->fcntl_h) { 432ca: 206a 003c moveal %a2@(60),%a0 432ce: 2068 0030 moveal %a0@(48),%a0 432d2: 4a88 tstl %a0 432d4: 6718 beqs 432ee <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 432d6: 2f0a movel %a2,%sp@- 432d8: 2f03 movel %d3,%sp@- 432da: 4e90 jsr %a0@ if (err) { 432dc: 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 ); 432de: 2600 movel %d0,%d3 if (err) { 432e0: 670c beqs 432ee <== ALWAYS TAKEN errno = err; 432e2: 4eb9 0004 ee58 jsr 4ee58 <__errno> <== NOT EXECUTED 432e8: 74ff moveq #-1,%d2 <== NOT EXECUTED 432ea: 2040 moveal %d0,%a0 <== NOT EXECUTED 432ec: 2083 movel %d3,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 432ee: 2002 movel %d2,%d0 432f0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 432f6: 4e5e unlk %fp <== NOT EXECUTED 0004331c : #include int fdatasync( int fd ) { 4331c: 4e56 0000 linkw %fp,#0 43320: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43324: b0b9 0005 ee64 cmpl 5ee64 ,%d0 4332a: 6414 bccs 43340 iop = rtems_libio_iop( fd ); 4332c: 2079 0006 056c moveal 6056c ,%a0 43332: ed88 lsll #6,%d0 43334: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43336: 2028 0014 movel %a0@(20),%d0 4333a: 0800 0008 btst #8,%d0 4333e: 660e bnes 4334e <== ALWAYS TAKEN 43340: 4eb9 0004 ee58 jsr 4ee58 <__errno> 43346: 7209 moveq #9,%d1 43348: 2040 moveal %d0,%a0 4334a: 2081 movel %d1,%a0@ 4334c: 6036 bras 43384 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4334e: 44c0 movew %d0,%ccr 43350: 670e beqs 43360 43352: 4eb9 0004 ee58 jsr 4ee58 <__errno> 43358: 2040 moveal %d0,%a0 4335a: 7016 moveq #22,%d0 4335c: 2080 movel %d0,%a0@ 4335e: 6024 bras 43384 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 43360: 2268 003c moveal %a0@(60),%a1 43364: 2269 002c moveal %a1@(44),%a1 43368: 4a89 tstl %a1 4336a: 6610 bnes 4337c rtems_set_errno_and_return_minus_one( ENOTSUP ); 4336c: 4eb9 0004 ee58 jsr 4ee58 <__errno> 43372: 2040 moveal %d0,%a0 43374: 20bc 0000 0086 movel #134,%a0@ 4337a: 6008 bras 43384 return (*iop->handlers->fdatasync_h)( iop ); 4337c: 2d48 0008 movel %a0,%fp@(8) } 43380: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43382: 4ed1 jmp %a1@ } 43384: 70ff moveq #-1,%d0 43386: 4e5e unlk %fp ... 0004b0ec : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b0ec: 4e56 ffd8 linkw %fp,#-40 4b0f0: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b0f4: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b0f6: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b0fa: 42a7 clrl %sp@- 4b0fc: 2f39 0005 c4b4 movel 5c4b4 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b102: 2a6e 000c moveal %fp@(12),%a5 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b106: 4eb9 0004 4f30 jsr 44f30 4b10c: 4fef 000c lea %sp@(12),%sp 4b110: 4a80 tstl %d0 4b112: 6706 beqs 4b11a <== NEVER TAKEN 4b114: 74fc moveq #-4,%d2 4b116: 6000 034e braw 4b466 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4b11a: 2454 moveal %a4@,%a2 <== NOT EXECUTED if (pipe == NULL) { 4b11c: 4a8a tstl %a2 <== NOT EXECUTED 4b11e: 6600 016c bnew 4b28c <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b122: 4878 0034 pea 34 <== NOT EXECUTED 4b126: 243c 0004 9484 movel #300164,%d2 <== NOT EXECUTED 4b12c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b12e: 4e90 jsr %a0@ <== NOT EXECUTED if (pipe == NULL) 4b130: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b132: 2640 moveal %d0,%a3 <== NOT EXECUTED 4b134: 2440 moveal %d0,%a2 <== NOT EXECUTED if (pipe == NULL) 4b136: 4a80 tstl %d0 <== NOT EXECUTED 4b138: 6606 bnes 4b140 <== NOT EXECUTED 4b13a: 74f4 moveq #-12,%d2 <== NOT EXECUTED 4b13c: 6000 017e braw 4b2bc <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4b140: 4878 0034 pea 34 <== NOT EXECUTED 4b144: 42a7 clrl %sp@- <== NOT EXECUTED 4b146: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b148: 4eb9 0004 d318 jsr 4d318 <== NOT EXECUTED pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4b14e: 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; 4b152: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4b158: 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; 4b15a: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4b15e: 4e90 jsr %a0@ <== NOT EXECUTED if (! pipe->Buffer) 4b160: 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); 4b164: 2680 movel %d0,%a3@ <== NOT EXECUTED if (! pipe->Buffer) 4b166: 6606 bnes 4b16e <== NOT EXECUTED 4b168: 74f4 moveq #-12,%d2 <== NOT EXECUTED 4b16a: 6000 0116 braw 4b282 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4b16e: 486b 002c pea %a3@(44) <== NOT EXECUTED 4b172: 243c 0004 bab4 movel #309940,%d2 <== NOT EXECUTED 4b178: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b17a: 1039 0005 b640 moveb 5b640 ,%d0 <== NOT EXECUTED 4b180: 42a7 clrl %sp@- <== NOT EXECUTED 4b182: 49c0 extbl %d0 <== NOT EXECUTED 4b184: 42a7 clrl %sp@- <== NOT EXECUTED 4b186: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4b18c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b18e: 4e90 jsr %a0@ <== NOT EXECUTED 4b190: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b194: 4a80 tstl %d0 <== NOT EXECUTED 4b196: 6600 00de bnew 4b276 <== 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( 4b19a: 486b 0030 pea %a3@(48) <== NOT EXECUTED 4b19e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b1a0: 1039 0005 b640 moveb 5b640 ,%d0 <== NOT EXECUTED 4b1a6: 42a7 clrl %sp@- <== NOT EXECUTED 4b1a8: 49c0 extbl %d0 <== NOT EXECUTED 4b1aa: 42a7 clrl %sp@- <== NOT EXECUTED 4b1ac: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4b1b2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b1b4: 4e90 jsr %a0@ <== NOT EXECUTED 4b1b6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b1ba: 4a80 tstl %d0 <== NOT EXECUTED 4b1bc: 6600 00ac bnew 4b26a <== 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( 4b1c0: 486b 0028 pea %a3@(40) <== NOT EXECUTED 4b1c4: 1039 0005 b640 moveb 5b640 ,%d0 <== NOT EXECUTED 4b1ca: 42a7 clrl %sp@- <== NOT EXECUTED 4b1cc: 4878 0010 pea 10 <== NOT EXECUTED 4b1d0: 49c0 extbl %d0 <== NOT EXECUTED 4b1d2: 4878 0001 pea 1 <== NOT EXECUTED 4b1d6: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4b1dc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b1de: 4eb9 0004 4cf8 jsr 44cf8 <== NOT EXECUTED 4b1e4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4b1e8: 4a80 tstl %d0 <== NOT EXECUTED 4b1ea: 6672 bnes 4b25e <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4b1ec: 260e movel %fp,%d3 <== NOT EXECUTED 4b1ee: 5183 subql #8,%d3 <== NOT EXECUTED 4b1f0: 243c 0004 64e8 movel #287976,%d2 <== NOT EXECUTED 4b1f6: 2042 moveal %d2,%a0 <== NOT EXECUTED { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b1f8: 47f9 0004 6ce2 lea 46ce2 <_Thread_Enable_dispatch>,%a3 <== NOT EXECUTED 4b1fe: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b200: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b204: 4879 0005 d59c pea 5d59c <_Barrier_Information> <== NOT EXECUTED 4b20a: 4e90 jsr %a0@ <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 4b20c: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4b212: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b214: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b218: 4e93 jsr %a3@ <== NOT EXECUTED 4b21a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b21c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b21e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b222: 4879 0005 d59c pea 5d59c <_Barrier_Information> <== NOT EXECUTED 4b228: 4e90 jsr %a0@ <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4b22a: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4b230: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b232: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b236: 4e93 jsr %a3@ <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4b238: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4b23c: 1039 0005 b640 moveb 5b640 ,%d0 <== NOT EXECUTED 4b242: 49c0 extbl %d0 <== NOT EXECUTED 4b244: 2200 movel %d0,%d1 <== NOT EXECUTED 4b246: 5281 addql #1,%d1 <== NOT EXECUTED 4b248: 13c1 0005 b640 moveb %d1,5b640 <== NOT EXECUTED 4b24e: 727a moveq #122,%d1 <== NOT EXECUTED 4b250: b280 cmpl %d0,%d1 <== NOT EXECUTED 4b252: 6638 bnes 4b28c <== NOT EXECUTED c = 'a'; 4b254: 7661 moveq #97,%d3 <== NOT EXECUTED 4b256: 13c3 0005 b640 moveb %d3,5b640 <== NOT EXECUTED 4b25c: 602e bras 4b28c <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4b25e: 2f2b 0030 movel %a3@(48),%sp@- <== NOT EXECUTED 4b262: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4b268: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4b26a: 2f2b 002c movel %a3@(44),%sp@- <== NOT EXECUTED 4b26e: 4eb9 0004 bb68 jsr 4bb68 <== NOT EXECUTED 4b274: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4b276: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 4b278: 74fc moveq #-4,%d2 <== NOT EXECUTED 4b27a: 4eb9 0004 8f80 jsr 48f80 <== NOT EXECUTED 4b280: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4b282: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4b284: 4eb9 0004 8f80 jsr 48f80 <== NOT EXECUTED 4b28a: 602a bras 4b2b6 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4b28c: 42a7 clrl %sp@- <== NOT EXECUTED 4b28e: 42a7 clrl %sp@- <== NOT EXECUTED 4b290: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b294: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4b29a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b29e: 4a80 tstl %d0 <== NOT EXECUTED 4b2a0: 6704 beqs 4b2a6 <== NOT EXECUTED 4b2a2: 74fc moveq #-4,%d2 <== NOT EXECUTED 4b2a4: 6002 bras 4b2a8 <== NOT EXECUTED 4b2a6: 4282 clrl %d2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4b2a8: 4a94 tstl %a4@ <== NOT EXECUTED 4b2aa: 6610 bnes 4b2bc <== NOT EXECUTED if (err) 4b2ac: 4a82 tstl %d2 <== NOT EXECUTED 4b2ae: 670a beqs 4b2ba <== NOT EXECUTED pipe_free(pipe); 4b2b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b2b2: 4eba fd28 jsr %pc@(4afdc ) <== NOT EXECUTED 4b2b6: 588f addql #4,%sp <== NOT EXECUTED 4b2b8: 6002 bras 4b2bc <== NOT EXECUTED else *pipep = pipe; 4b2ba: 288a movel %a2,%a4@ <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 4b2bc: 2f39 0005 c4b4 movel 5c4b4 ,%sp@- <== NOT EXECUTED 4b2c2: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4b2c8: 588f addql #4,%sp <== NOT EXECUTED 4b2ca: 4a82 tstl %d2 <== NOT EXECUTED 4b2cc: 6600 0198 bnew 4b466 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4b2d0: 222d 0014 movel %a5@(20),%d1 <== NOT EXECUTED 4b2d4: 7006 moveq #6,%d0 <== NOT EXECUTED 4b2d6: 7604 moveq #4,%d3 <== NOT EXECUTED 4b2d8: c081 andl %d1,%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4b2da: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4b2dc: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b2de: 6700 009a beqw 4b37a <== NOT EXECUTED 4b2e2: 7206 moveq #6,%d1 <== NOT EXECUTED 4b2e4: b280 cmpl %d0,%d1 <== NOT EXECUTED 4b2e6: 6700 011a beqw 4b402 <== NOT EXECUTED 4b2ea: 163c 0002 moveb #2,%d3 <== NOT EXECUTED 4b2ee: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b2f0: 6600 0158 bnew 4b44a <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b2f4: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4b2f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b2fa: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4b2fc: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4b300: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4b304: 4a80 tstl %d0 <== NOT EXECUTED 4b306: 6610 bnes 4b318 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4b308: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b30c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b310: 4eb9 0004 bbd4 jsr 4bbd4 <== NOT EXECUTED 4b316: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Writers == 0) { 4b318: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b31c: 6600 012c bnew 4b44a <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4b320: 7001 moveq #1,%d0 <== NOT EXECUTED 4b322: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4b326: 6600 0122 bnew 4b44a <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4b32a: 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)) 4b32e: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b334: 283c 0004 5034 movel #282676,%d4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4b33a: 263c 0004 bc38 movel #310328,%d3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b340: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b344: 2044 moveal %d4,%a0 <== NOT EXECUTED 4b346: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4b348: 2043 moveal %d3,%a0 <== NOT EXECUTED 4b34a: 42a7 clrl %sp@- <== NOT EXECUTED 4b34c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b350: 4e90 jsr %a0@ <== NOT EXECUTED 4b352: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b356: 4a80 tstl %d0 <== NOT EXECUTED 4b358: 6600 00fe bnew 4b458 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4b35c: 42a7 clrl %sp@- <== NOT EXECUTED 4b35e: 42a7 clrl %sp@- <== NOT EXECUTED 4b360: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b364: 4e93 jsr %a3@ <== NOT EXECUTED 4b366: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b36a: 4a80 tstl %d0 <== NOT EXECUTED 4b36c: 6600 00ea bnew 4b458 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4b370: baaa 0024 cmpl %a2@(36),%d5 <== NOT EXECUTED 4b374: 67ca beqs 4b340 <== NOT EXECUTED 4b376: 6000 00d2 braw 4b44a <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4b37a: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b37e: 660c bnes 4b38c <== NOT EXECUTED 4b380: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4b384: 6706 beqs 4b38c <== NOT EXECUTED 4b386: 74fa moveq #-6,%d2 <== NOT EXECUTED 4b388: 6000 00d0 braw 4b45a <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b38c: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4b390: 2200 movel %d0,%d1 <== NOT EXECUTED 4b392: 5281 addql #1,%d1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4b394: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4b398: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4b39c: 4a80 tstl %d0 <== NOT EXECUTED 4b39e: 6610 bnes 4b3b0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b3a0: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b3a4: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b3a8: 4eb9 0004 bbd4 jsr 4bbd4 <== NOT EXECUTED 4b3ae: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Readers == 0) { 4b3b0: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b3b4: 6600 0094 bnew 4b44a <== NOT EXECUTED prevCounter = pipe->readerCounter; 4b3b8: 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)) 4b3bc: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b3c2: 283c 0004 5034 movel #282676,%d4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4b3c8: 263c 0004 bc38 movel #310328,%d3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b3ce: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b3d2: 2044 moveal %d4,%a0 <== NOT EXECUTED 4b3d4: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4b3d6: 2043 moveal %d3,%a0 <== NOT EXECUTED 4b3d8: 42a7 clrl %sp@- <== NOT EXECUTED 4b3da: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b3de: 4e90 jsr %a0@ <== NOT EXECUTED 4b3e0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b3e4: 4a80 tstl %d0 <== NOT EXECUTED 4b3e6: 6670 bnes 4b458 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4b3e8: 42a7 clrl %sp@- <== NOT EXECUTED 4b3ea: 42a7 clrl %sp@- <== NOT EXECUTED 4b3ec: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b3f0: 4e93 jsr %a3@ <== NOT EXECUTED 4b3f2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b3f6: 4a80 tstl %d0 <== NOT EXECUTED 4b3f8: 665e bnes 4b458 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4b3fa: baaa 0020 cmpl %a2@(32),%d5 <== NOT EXECUTED 4b3fe: 67ce beqs 4b3ce <== NOT EXECUTED 4b400: 6048 bras 4b44a <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b402: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4b406: 2200 movel %d0,%d1 <== NOT EXECUTED 4b408: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4b40a: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4b40e: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4b412: 4a80 tstl %d0 <== NOT EXECUTED 4b414: 6610 bnes 4b426 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4b416: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b41a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b41e: 4eb9 0004 bbd4 jsr 4bbd4 <== NOT EXECUTED 4b424: 508f addql #8,%sp <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b426: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4b42a: 2600 movel %d0,%d3 <== NOT EXECUTED 4b42c: 5283 addql #1,%d3 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4b42e: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4b432: 2543 0014 movel %d3,%a2@(20) <== NOT EXECUTED 4b436: 4a80 tstl %d0 <== NOT EXECUTED 4b438: 6610 bnes 4b44a <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b43a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b43e: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b442: 4eb9 0004 bbd4 jsr 4bbd4 <== NOT EXECUTED 4b448: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4b44a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b44e: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return 0; 4b454: 588f addql #4,%sp <== NOT EXECUTED 4b456: 600e bras 4b466 <== NOT EXECUTED 4b458: 74fc moveq #-4,%d2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4b45a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4b45c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4b45e: 4eb9 0004 b024 jsr 4b024 <== NOT EXECUTED return err; 4b464: 508f addql #8,%sp <== NOT EXECUTED } 4b466: 2002 movel %d2,%d0 4b468: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5 4b46e: 4e5e unlk %fp ... 00047f70 : 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)) ) { 47f70: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 47f74: 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; 47f78: 2079 0006 45b8 moveal 645b8 ,%a0<== NOT EXECUTED 47f7e: 6010 bras 47f90 <== 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 ) { 47f80: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 47f84: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 47f88: 6604 bnes 47f8e <== NOT EXECUTED 47f8a: 7001 moveq #1,%d0 <== NOT EXECUTED 47f8c: 600c bras 47f9a <== 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 ) { 47f8e: 2050 moveal %a0@,%a0 <== NOT EXECUTED 47f90: b1fc 0006 45bc cmpal #411068,%a0 <== NOT EXECUTED 47f96: 66e8 bnes 47f80 <== NOT EXECUTED 47f98: 4200 clrb %d0 <== NOT EXECUTED return true; } } return false; } 47f9a: 4e5e unlk %fp <== NOT EXECUTED 0004338c : long fpathconf( int fd, int name ) { 4338c: 4e56 0000 linkw %fp,#0 43390: 222e 0008 movel %fp@(8),%d1 43394: 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); 43398: b2b9 0005 ee64 cmpl 5ee64 ,%d1 4339e: 6414 bccs 433b4 iop = rtems_libio_iop(fd); 433a0: 2079 0006 056c moveal 6056c ,%a0 433a6: ed89 lsll #6,%d1 433a8: d1c1 addal %d1,%a0 rtems_libio_check_is_open(iop); 433aa: 2228 0014 movel %a0@(20),%d1 433ae: 0801 0008 btst #8,%d1 433b2: 6612 bnes 433c6 <== ALWAYS TAKEN 433b4: 4eb9 0004 ee58 jsr 4ee58 <__errno> 433ba: 72ff moveq #-1,%d1 433bc: 2040 moveal %d0,%a0 433be: 7009 moveq #9,%d0 433c0: 2080 movel %d0,%a0@ 433c2: 6000 008a braw 4344e rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 433c6: 0801 0001 btst #1,%d1 433ca: 6774 beqs 43440 <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 433cc: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 433d0: 720b moveq #11,%d1 433d2: b280 cmpl %d0,%d1 433d4: 656a bcss 43440 <== NEVER TAKEN 433d6: 303b 0a08 movew %pc@(433e0 ,%d0:l:2),%d0 433da: 48c0 extl %d0 433dc: 4efb 0802 jmp %pc@(433e0 ,%d0:l) 433e0: 0018 030 <== NOT EXECUTED 433e2: 001e 036 <== NOT EXECUTED 433e4: 0024 044 <== NOT EXECUTED 433e6: 002a 052 <== NOT EXECUTED 433e8: 0030 060 <== NOT EXECUTED 433ea: 0036 066 <== NOT EXECUTED 433ec: 003c 074 <== NOT EXECUTED 433ee: 0042 0102 <== NOT EXECUTED 433f0: 0048 0110 <== NOT EXECUTED 433f2: 004e 0116 <== NOT EXECUTED 433f4: 0054 0124 <== NOT EXECUTED 433f6: 005a 0132 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 433f8: 2228 0038 movel %a0@(56),%d1 break; 433fc: 6050 bras 4344e case _PC_MAX_CANON: return_value = the_limits->max_canon; 433fe: 2228 003c movel %a0@(60),%d1 break; 43402: 604a bras 4344e case _PC_MAX_INPUT: return_value = the_limits->max_input; 43404: 2228 0040 movel %a0@(64),%d1 break; 43408: 6044 bras 4344e case _PC_NAME_MAX: return_value = the_limits->name_max; 4340a: 2228 0044 movel %a0@(68),%d1 break; 4340e: 603e bras 4344e case _PC_PATH_MAX: return_value = the_limits->path_max; 43410: 2228 0048 movel %a0@(72),%d1 break; 43414: 6038 bras 4344e case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43416: 2228 004c movel %a0@(76),%d1 break; 4341a: 6032 bras 4344e case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 4341c: 2228 0054 movel %a0@(84),%d1 break; 43420: 602c bras 4344e case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 43422: 2228 0058 movel %a0@(88),%d1 break; 43426: 6026 bras 4344e case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43428: 2228 0064 movel %a0@(100),%d1 break; 4342c: 6020 bras 4344e case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 4342e: 2228 0050 movel %a0@(80),%d1 break; 43432: 601a bras 4344e case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43434: 2228 005c movel %a0@(92),%d1 break; 43438: 6014 bras 4344e case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 4343a: 2228 0060 movel %a0@(96),%d1 break; 4343e: 600e bras 4344e default: rtems_set_errno_and_return_minus_one( EINVAL ); 43440: 4eb9 0004 ee58 jsr 4ee58 <__errno> 43446: 72ff moveq #-1,%d1 43448: 2040 moveal %d0,%a0 4344a: 7016 moveq #22,%d0 4344c: 2080 movel %d0,%a0@ break; } return return_value; } 4344e: 2001 movel %d1,%d0 43450: 4e5e unlk %fp <== NOT EXECUTED 00048f80 : void free( void *ptr ) { MSBUMP(free_calls, 1); 48f80: 4e56 0000 linkw %fp,#0 48f84: 52b9 0005 cbc0 addql #1,5cbc0 48f8a: 2f02 movel %d2,%sp@- 48f8c: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 48f90: 676c beqs 48ffe /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 48f92: 7003 moveq #3,%d0 48f94: b0b9 0005 ce90 cmpl 5ce90 <_System_state_Current>,%d0 48f9a: 661a bnes 48fb6 <== NEVER TAKEN 48f9c: 4eb9 0004 93f4 jsr 493f4 48fa2: 4a00 tstb %d0 48fa4: 6610 bnes 48fb6 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 48fa6: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 48faa: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48fae: 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); 48fb0: 4ef9 0004 9432 jmp 49432 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 48fb6: 2079 0005 bb36 moveal 5bb36 ,%a0 48fbc: 4a88 tstl %a0 48fbe: 670a beqs 48fca <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 48fc0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48fc2: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 48fc6: 4e90 jsr %a0@ <== NOT EXECUTED 48fc8: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 48fca: 2f02 movel %d2,%sp@- 48fcc: 2f39 0005 b4b0 movel 5b4b0 ,%sp@- 48fd2: 4eb9 0004 a5d8 jsr 4a5d8 <_Protected_heap_Free> 48fd8: 508f addql #8,%sp 48fda: 4a00 tstb %d0 48fdc: 6620 bnes 48ffe <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 48fde: 2079 0005 b4b0 moveal 5b4b0 ,%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", 48fe4: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 48fe8: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 48fec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48fee: 4879 0005 a740 pea 5a740 <== NOT EXECUTED 48ff4: 4eb9 0004 2d30 jsr 42d30 <== NOT EXECUTED 48ffa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 48ffe: 242e fffc movel %fp@(-4),%d2 49002: 4e5e unlk %fp ... 00043af0 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 43af0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43af4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43af6: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 43afa: b5fc 0005 f278 cmpal #389752,%a2 <== NOT EXECUTED 43b00: 6740 beqs 43b42 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 43b02: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 43b06: 4a88 tstl %a0 <== NOT EXECUTED 43b08: 6710 beqs 43b1a <== NOT EXECUTED 43b0a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43b0e: 4a88 tstl %a0 <== NOT EXECUTED 43b10: 6708 beqs 43b1a <== NOT EXECUTED 43b12: 486a 0004 pea %a2@(4) <== NOT EXECUTED 43b16: 4e90 jsr %a0@ <== NOT EXECUTED 43b18: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 43b1a: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 43b1e: 4a88 tstl %a0 <== NOT EXECUTED 43b20: 6710 beqs 43b32 <== NOT EXECUTED 43b22: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43b26: 4a88 tstl %a0 <== NOT EXECUTED 43b28: 6708 beqs 43b32 <== NOT EXECUTED 43b2a: 486a 0018 pea %a2@(24) <== NOT EXECUTED 43b2e: 4e90 jsr %a0@ <== NOT EXECUTED 43b30: 588f addql #4,%sp <== NOT EXECUTED free(env); 43b32: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 43b36: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43b3a: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 43b3c: 4ef9 0004 2bf8 jmp 42bf8 <== NOT EXECUTED } } 43b42: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43b46: 4e5e unlk %fp <== NOT EXECUTED 00059284 : int fstat( int fd, struct stat *sbuf ) { 59284: 4e56 0000 linkw %fp,#0 59288: 202e 0008 movel %fp@(8),%d0 5928c: 2f0a movel %a2,%sp@- 5928e: 2f02 movel %d2,%sp@- 59290: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 59294: 660e bnes 592a4 rtems_set_errno_and_return_minus_one( EFAULT ); 59296: 4eb9 0004 ca88 jsr 4ca88 <__errno> 5929c: 720e moveq #14,%d1 5929e: 2040 moveal %d0,%a0 592a0: 2081 movel %d1,%a0@ 592a2: 607c bras 59320 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 592a4: b0b9 0005 b4a4 cmpl 5b4a4 ,%d0 592aa: 641e bccs 592ca 592ac: 2479 0005 cba8 moveal 5cba8 ,%a2 592b2: ed88 lsll #6,%d0 592b4: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 592b6: 202a 0014 movel %a2@(20),%d0 592ba: 0280 0000 0100 andil #256,%d0 592c0: 6708 beqs 592ca <== NEVER TAKEN if ( !iop->handlers ) 592c2: 206a 003c moveal %a2@(60),%a0 592c6: 4a88 tstl %a0 592c8: 660e bnes 592d8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 592ca: 4eb9 0004 ca88 jsr 4ca88 <__errno> 592d0: 2040 moveal %d0,%a0 592d2: 7009 moveq #9,%d0 592d4: 2080 movel %d0,%a0@ 592d6: 6048 bras 59320 if ( !iop->handlers->fstat_h ) 592d8: 4aa8 0018 tstl %a0@(24) 592dc: 6610 bnes 592ee <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 592de: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 592e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 592e6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 592ec: 6032 bras 59320 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 592ee: 4878 0046 pea 46 592f2: 42a7 clrl %sp@- 592f4: 2f02 movel %d2,%sp@- 592f6: 4eb9 0004 d318 jsr 4d318 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 592fc: 206a 003c moveal %a2@(60),%a0 59300: 45ea 0018 lea %a2@(24),%a2 59304: 4fef 000c lea %sp@(12),%sp 59308: 2d42 000c movel %d2,%fp@(12) } 5930c: 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 ); 59310: 2d4a 0008 movel %a2,%fp@(8) } 59314: 246e fffc moveal %fp@(-4),%a2 59318: 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 ); 5931a: 2268 0018 moveal %a0@(24),%a1 5931e: 4ed1 jmp %a1@ } 59320: 242e fff8 movel %fp@(-8),%d2 59324: 70ff moveq #-1,%d0 59326: 246e fffc moveal %fp@(-4),%a2 5932a: 4e5e unlk %fp <== NOT EXECUTED 000435a0 : #include int fsync( int fd ) { 435a0: 4e56 0000 linkw %fp,#0 435a4: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 435a8: b0b9 0005 ee64 cmpl 5ee64 ,%d0 435ae: 642e bccs 435de <== NEVER TAKEN iop = rtems_libio_iop( fd ); 435b0: 2079 0006 056c moveal 6056c ,%a0 435b6: ed88 lsll #6,%d0 435b8: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 435ba: 2028 0014 movel %a0@(20),%d0 435be: 0800 0008 btst #8,%d0 435c2: 671a beqs 435de <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 435c4: 44c0 movew %d0,%ccr 435c6: 670e beqs 435d6 435c8: 4eb9 0004 ee58 jsr 4ee58 <__errno> 435ce: 7216 moveq #22,%d1 435d0: 2040 moveal %d0,%a0 435d2: 2081 movel %d1,%a0@ 435d4: 6036 bras 4360c /* * Now process the fsync(). */ if ( !iop->handlers ) 435d6: 2268 003c moveal %a0@(60),%a1 435da: 4a89 tstl %a1 435dc: 660e bnes 435ec <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 435de: 4eb9 0004 ee58 jsr 4ee58 <__errno> <== NOT EXECUTED 435e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 435e6: 7009 moveq #9,%d0 <== NOT EXECUTED 435e8: 2080 movel %d0,%a0@ <== NOT EXECUTED 435ea: 6020 bras 4360c <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 435ec: 2269 0028 moveal %a1@(40),%a1 435f0: 4a89 tstl %a1 435f2: 6610 bnes 43604 rtems_set_errno_and_return_minus_one( ENOTSUP ); 435f4: 4eb9 0004 ee58 jsr 4ee58 <__errno> 435fa: 2040 moveal %d0,%a0 435fc: 20bc 0000 0086 movel #134,%a0@ 43602: 6008 bras 4360c return (*iop->handlers->fsync_h)( iop ); 43604: 2d48 0008 movel %a0,%fp@(8) } 43608: 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 ); 4360a: 4ed1 jmp %a1@ } 4360c: 70ff moveq #-1,%d0 4360e: 4e5e unlk %fp ... 00049008 : int ftruncate( int fd, off_t length ) { 49008: 4e56 ffec linkw %fp,#-20 4900c: 202e 0008 movel %fp@(8),%d0 49010: 2f0a movel %a2,%sp@- 49012: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 49014: b0b9 0005 b4a4 cmpl 5b4a4 ,%d0 4901a: 6416 bccs 49032 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 4901c: 2479 0005 cba8 moveal 5cba8 ,%a2 49022: ed88 lsll #6,%d0 49024: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 49026: 202a 0014 movel %a2@(20),%d0 4902a: 0280 0000 0100 andil #256,%d0 49030: 6612 bnes 49044 <== ALWAYS TAKEN 49032: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 49038: 72ff moveq #-1,%d1 <== NOT EXECUTED 4903a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4903c: 7009 moveq #9,%d0 <== NOT EXECUTED 4903e: 2080 movel %d0,%a0@ <== NOT EXECUTED 49040: 6000 008e braw 490d0 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 49044: 4878 0014 pea 14 49048: 240e movel %fp,%d2 4904a: 486a 0018 pea %a2@(24) 4904e: 0682 ffff ffec addil #-20,%d2 49054: 2f02 movel %d2,%sp@- 49056: 4eb9 0004 d2a8 jsr 4d2a8 if ( !loc.ops->node_type_h ) 4905c: 206e fff8 moveal %fp@(-8),%a0 49060: 4fef 000c lea %sp@(12),%sp 49064: 2068 0010 moveal %a0@(16),%a0 49068: 4a88 tstl %a0 4906a: 6740 beqs 490ac <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4906c: 2f02 movel %d2,%sp@- 4906e: 4e90 jsr %a0@ 49070: 588f addql #4,%sp 49072: 7201 moveq #1,%d1 49074: b280 cmpl %d0,%d1 49076: 6610 bnes 49088 rtems_set_errno_and_return_minus_one( EISDIR ); 49078: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4907e: 7415 moveq #21,%d2 49080: 72ff moveq #-1,%d1 49082: 2040 moveal %d0,%a0 49084: 2082 movel %d2,%a0@ 49086: 6048 bras 490d0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 49088: 7004 moveq #4,%d0 4908a: c0aa 0014 andl %a2@(20),%d0 4908e: 6610 bnes 490a0 <== ALWAYS TAKEN 49090: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 49096: 72ff moveq #-1,%d1 <== NOT EXECUTED 49098: 2040 moveal %d0,%a0 <== NOT EXECUTED 4909a: 7016 moveq #22,%d0 <== NOT EXECUTED 4909c: 2080 movel %d0,%a0@ <== NOT EXECUTED 4909e: 6030 bras 490d0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 490a0: 206a 003c moveal %a2@(60),%a0 490a4: 2068 0020 moveal %a0@(32),%a0 490a8: 4a88 tstl %a0 490aa: 6612 bnes 490be <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 490ac: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 490b2: 72ff moveq #-1,%d1 <== NOT EXECUTED 490b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 490b6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 490bc: 6012 bras 490d0 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); 490be: 2f2e 0010 movel %fp@(16),%sp@- 490c2: 2f2e 000c movel %fp@(12),%sp@- 490c6: 2f0a movel %a2,%sp@- 490c8: 4e90 jsr %a0@ 490ca: 4fef 000c lea %sp@(12),%sp 490ce: 2200 movel %d0,%d1 } 490d0: 242e ffe4 movel %fp@(-28),%d2 490d4: 2001 movel %d1,%d0 490d6: 246e ffe8 moveal %fp@(-24),%a2 490da: 4e5e unlk %fp ... 0005c84c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5c84c: 4e56 ffec linkw %fp,#-20 5c850: 202e 0008 movel %fp@(8),%d0 5c854: 2f0a movel %a2,%sp@- 5c856: 2f02 movel %d2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5c858: b0b9 0005 f544 cmpl 5f544 ,%d0 5c85e: 6504 bcss 5c864 <== ALWAYS TAKEN 5c860: 95ca subal %a2,%a2 <== NOT EXECUTED 5c862: 600a bras 5c86e <== NOT EXECUTED 5c864: 2479 0006 0d6c moveal 60d6c ,%a2 5c86a: ed88 lsll #6,%d0 5c86c: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5c86e: 4878 0014 pea 14 5c872: 240e movel %fp,%d2 5c874: 486a 0018 pea %a2@(24) 5c878: 0682 ffff ffec addil #-20,%d2 5c87e: 2f02 movel %d2,%sp@- 5c880: 4eb9 0004 f858 jsr 4f858 if ( !loc.ops->node_type_h ) 5c886: 206e fff8 moveal %fp@(-8),%a0 5c88a: 4fef 000c lea %sp@(12),%sp 5c88e: 2068 0010 moveal %a0@(16),%a0 5c892: 4a88 tstl %a0 5c894: 6728 beqs 5c8be <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5c896: 2f02 movel %d2,%sp@- 5c898: 4e90 jsr %a0@ 5c89a: 588f addql #4,%sp 5c89c: 7201 moveq #1,%d1 5c89e: b280 cmpl %d0,%d1 5c8a0: 6710 beqs 5c8b2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 5c8a2: 4eb9 0004 f038 jsr 4f038 <__errno> 5c8a8: 72ff moveq #-1,%d1 5c8aa: 2040 moveal %d0,%a0 5c8ac: 7014 moveq #20,%d0 5c8ae: 2080 movel %d0,%a0@ 5c8b0: 6030 bras 5c8e2 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 5c8b2: 206a 003c moveal %a2@(60),%a0 5c8b6: 2068 0008 moveal %a0@(8),%a0 5c8ba: 4a88 tstl %a0 5c8bc: 6612 bnes 5c8d0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c8be: 4eb9 0004 f038 jsr 4f038 <__errno> <== NOT EXECUTED 5c8c4: 72ff moveq #-1,%d1 <== NOT EXECUTED 5c8c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c8c8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 5c8ce: 6012 bras 5c8e2 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5c8d0: 2f2e 0010 movel %fp@(16),%sp@- 5c8d4: 2f2e 000c movel %fp@(12),%sp@- 5c8d8: 2f0a movel %a2,%sp@- 5c8da: 4e90 jsr %a0@ 5c8dc: 4fef 000c lea %sp@(12),%sp 5c8e0: 2200 movel %d0,%d1 } 5c8e2: 242e ffe4 movel %fp@(-28),%d2 5c8e6: 2001 movel %d1,%d0 5c8e8: 246e ffe8 moveal %fp@(-24),%a2 5c8ec: 4e5e unlk %fp <== NOT EXECUTED 00042f3e : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 42f3e: 4e56 ffe0 linkw %fp,#-32 42f42: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 42f46: 262e 0008 movel %fp@(8),%d3 42f4a: 282e 000c movel %fp@(12),%d4 42f4e: 246e 0010 moveal %fp@(16),%a2 42f52: 2a2e 0014 movel %fp@(20),%d5 42f56: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 42f5a: 4eb9 0004 2e24 jsr 42e24 if ((fp = fopen("/etc/group", "r")) == NULL) { 42f60: 4879 0005 e067 pea 5e067 <_global_impure_ptr+0xbf> 42f66: 4879 0005 d548 pea 5d548 42f6c: 4eb9 0004 eee4 jsr 4eee4 42f72: 508f addql #8,%sp 42f74: 2400 movel %d0,%d2 42f76: 6610 bnes 42f88 <== ALWAYS TAKEN errno = EINVAL; 42f78: 4eb9 0004 e724 jsr 4e724 <__errno> <== NOT EXECUTED 42f7e: 7216 moveq #22,%d1 <== NOT EXECUTED 42f80: 2040 moveal %d0,%a0 <== NOT EXECUTED 42f82: 70ff moveq #-1,%d0 <== NOT EXECUTED 42f84: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 42f86: 606a bras 42ff2 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 42f88: 49fa fc3c lea %pc@(42bc6 ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 42f8c: 47f9 0005 06e8 lea 506e8 ,%a3 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 42f92: 2f06 movel %d6,%sp@- 42f94: 2f05 movel %d5,%sp@- 42f96: 2f0a movel %a2,%sp@- 42f98: 2f02 movel %d2,%sp@- 42f9a: 4e94 jsr %a4@ 42f9c: 4fef 0010 lea %sp@(16),%sp 42fa0: 4a80 tstl %d0 42fa2: 661a bnes 42fbe <== ALWAYS TAKEN errno = EINVAL; 42fa4: 4eb9 0004 e724 jsr 4e724 <__errno> <== NOT EXECUTED 42faa: 2040 moveal %d0,%a0 <== NOT EXECUTED 42fac: 7016 moveq #22,%d0 <== NOT EXECUTED 42fae: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 42fb0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42fb2: 4eb9 0004 e862 jsr 4e862 <== NOT EXECUTED return -1; 42fb8: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 42fba: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 42fbc: 6034 bras 42ff2 <== NOT EXECUTED } if (name) { 42fbe: 4a83 tstl %d3 42fc0: 670e beqs 42fd0 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 42fc2: 2f03 movel %d3,%sp@- 42fc4: 2f12 movel %a2@,%sp@- 42fc6: 4e93 jsr %a3@ 42fc8: 508f addql #8,%sp 42fca: 4a80 tstl %d0 42fcc: 57c0 seq %d0 42fce: 600a bras 42fda } else { match = (grp->gr_gid == gid); 42fd0: 4280 clrl %d0 <== NOT EXECUTED 42fd2: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 42fd6: b880 cmpl %d0,%d4 <== NOT EXECUTED 42fd8: 57c0 seq %d0 <== NOT EXECUTED 42fda: 49c0 extbl %d0 42fdc: 4480 negl %d0 } if (match) { 42fde: 67b2 beqs 42f92 fclose(fp); 42fe0: 2f02 movel %d2,%sp@- 42fe2: 4eb9 0004 e862 jsr 4e862 *result = grp; 42fe8: 206e 001c moveal %fp@(28),%a0 return 0; 42fec: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 42fee: 4280 clrl %d0 42ff0: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 42ff2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 42ff8: 4e5e unlk %fp <== NOT EXECUTED 00042ccc : return NULL; return p; } struct group *getgrent(void) { 42ccc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 42cd0: 2039 0005 f7a6 movel 5f7a6 ,%d0 <== NOT EXECUTED 42cd6: 6724 beqs 42cfc <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 42cd8: 4878 00c8 pea c8 <== NOT EXECUTED 42cdc: 4879 0005 f7aa pea 5f7aa <== NOT EXECUTED 42ce2: 4879 0005 f872 pea 5f872 <== NOT EXECUTED 42ce8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42cea: 4eba feda jsr %pc@(42bc6 ) <== NOT EXECUTED 42cee: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42cf2: 223c 0005 f872 movel #391282,%d1 <== NOT EXECUTED 42cf8: 4a80 tstl %d0 <== NOT EXECUTED 42cfa: 6602 bnes 42cfe <== NOT EXECUTED 42cfc: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 42cfe: 2001 movel %d1,%d0 <== NOT EXECUTED 42d00: 4e5e unlk %fp <== NOT EXECUTED 00043022 : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 43022: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 43024: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 43028: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 4302c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 43030: 4878 00c8 pea c8 <== NOT EXECUTED 43034: 4879 0005 f7aa pea 5f7aa <== NOT EXECUTED 4303a: 4879 0005 f872 pea 5f872 <== NOT EXECUTED 43040: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43042: 4eb9 0004 2ffc jsr 42ffc <== NOT EXECUTED 43048: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4304c: 4a80 tstl %d0 <== NOT EXECUTED 4304e: 6704 beqs 43054 <== NOT EXECUTED 43050: 4280 clrl %d0 <== NOT EXECUTED 43052: 6004 bras 43058 <== NOT EXECUTED return NULL; return p; 43054: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 43058: 4e5e unlk %fp <== NOT EXECUTED 00042ffc : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 42ffc: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 42ffe: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 43002: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 43006: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 4300a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4300e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 43012: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43016: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43018: 42a7 clrl %sp@- <== NOT EXECUTED 4301a: 4eba ff22 jsr %pc@(42f3e ) <== NOT EXECUTED } 4301e: 4e5e unlk %fp <== NOT EXECUTED 0004307e : struct group *getgrnam( const char *name ) { 4307e: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 43082: 486e fffc pea %fp@(-4) 43086: 4878 00c8 pea c8 4308a: 4879 0005 f7aa pea 5f7aa 43090: 4879 0005 f872 pea 5f872 43096: 2f2e 0008 movel %fp@(8),%sp@- 4309a: 4eb9 0004 305c jsr 4305c 430a0: 4fef 0014 lea %sp@(20),%sp 430a4: 4a80 tstl %d0 430a6: 6704 beqs 430ac <== ALWAYS TAKEN 430a8: 4280 clrl %d0 <== NOT EXECUTED 430aa: 6004 bras 430b0 <== NOT EXECUTED return NULL; return p; 430ac: 202e fffc movel %fp@(-4),%d0 } 430b0: 4e5e unlk %fp <== NOT EXECUTED 000430ee : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 430ee: 4e56 ffe0 linkw %fp,#-32 430f2: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 430f6: 262e 0008 movel %fp@(8),%d3 430fa: 282e 000c movel %fp@(12),%d4 430fe: 246e 0010 moveal %fp@(16),%a2 43102: 2a2e 0014 movel %fp@(20),%d5 43106: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 4310a: 4eb9 0004 2e24 jsr 42e24 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 43110: 4879 0005 e067 pea 5e067 <_global_impure_ptr+0xbf> 43116: 4879 0005 d4d5 pea 5d4d5 4311c: 4eb9 0004 eee4 jsr 4eee4 43122: 508f addql #8,%sp 43124: 2400 movel %d0,%d2 43126: 6610 bnes 43138 <== ALWAYS TAKEN errno = EINVAL; 43128: 4eb9 0004 e724 jsr 4e724 <__errno> <== NOT EXECUTED 4312e: 7816 moveq #22,%d4 <== NOT EXECUTED 43130: 2040 moveal %d0,%a0 <== NOT EXECUTED 43132: 70ff moveq #-1,%d0 <== NOT EXECUTED 43134: 2084 movel %d4,%a0@ <== NOT EXECUTED return -1; 43136: 606a bras 431a2 <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 43138: 49fa fbca lea %pc@(42d04 ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 4313c: 47f9 0005 06e8 lea 506e8 ,%a3 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 43142: 2f06 movel %d6,%sp@- 43144: 2f05 movel %d5,%sp@- 43146: 2f0a movel %a2,%sp@- 43148: 2f02 movel %d2,%sp@- 4314a: 4e94 jsr %a4@ 4314c: 4fef 0010 lea %sp@(16),%sp 43150: 4a80 tstl %d0 43152: 661a bnes 4316e <== ALWAYS TAKEN errno = EINVAL; 43154: 4eb9 0004 e724 jsr 4e724 <__errno> <== NOT EXECUTED 4315a: 7616 moveq #22,%d3 <== NOT EXECUTED 4315c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4315e: 2083 movel %d3,%a0@ <== NOT EXECUTED fclose(fp); 43160: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43162: 4eb9 0004 e862 jsr 4e862 <== NOT EXECUTED return -1; 43168: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 4316a: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 4316c: 6034 bras 431a2 <== NOT EXECUTED } if (name) { 4316e: 4a83 tstl %d3 43170: 670e beqs 43180 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 43172: 2f03 movel %d3,%sp@- 43174: 2f12 movel %a2@,%sp@- 43176: 4e93 jsr %a3@ 43178: 508f addql #8,%sp 4317a: 4a80 tstl %d0 4317c: 57c0 seq %d0 4317e: 600a bras 4318a } else { match = (pwd->pw_uid == uid); 43180: 4280 clrl %d0 <== NOT EXECUTED 43182: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 43186: b880 cmpl %d0,%d4 <== NOT EXECUTED 43188: 57c0 seq %d0 <== NOT EXECUTED 4318a: 49c0 extbl %d0 4318c: 4480 negl %d0 } if (match) { 4318e: 67b2 beqs 43142 fclose(fp); 43190: 2f02 movel %d2,%sp@- 43192: 4eb9 0004 e862 jsr 4e862 *result = pwd; 43198: 206e 001c moveal %fp@(28),%a0 return 0; 4319c: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 4319e: 4280 clrl %d0 431a0: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 431a2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 431a8: 4e5e unlk %fp <== NOT EXECUTED 00042dec : return NULL; return p; } struct passwd *getpwent(void) { 42dec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 42df0: 2039 0005 f6be movel 5f6be ,%d0 <== NOT EXECUTED 42df6: 6724 beqs 42e1c <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 42df8: 4878 00c8 pea c8 <== NOT EXECUTED 42dfc: 4879 0005 f6c2 pea 5f6c2 <== NOT EXECUTED 42e02: 4879 0005 f78a pea 5f78a <== NOT EXECUTED 42e08: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e0a: 4eba fef8 jsr %pc@(42d04 ) <== NOT EXECUTED 42e0e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42e12: 223c 0005 f78a movel #391050,%d1 <== NOT EXECUTED 42e18: 4a80 tstl %d0 <== NOT EXECUTED 42e1a: 6602 bnes 42e1e <== NOT EXECUTED 42e1c: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 42e1e: 2001 movel %d1,%d0 <== NOT EXECUTED 42e20: 4e5e unlk %fp <== NOT EXECUTED 0004322e : struct passwd *getpwnam( const char *name ) { 4322e: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 43232: 486e fffc pea %fp@(-4) 43236: 4878 00c8 pea c8 4323a: 4879 0005 f6c2 pea 5f6c2 43240: 4879 0005 f78a pea 5f78a 43246: 2f2e 0008 movel %fp@(8),%sp@- 4324a: 4eb9 0004 320c jsr 4320c 43250: 4fef 0014 lea %sp@(20),%sp 43254: 4a80 tstl %d0 43256: 6704 beqs 4325c <== ALWAYS TAKEN 43258: 4280 clrl %d0 <== NOT EXECUTED 4325a: 6004 bras 43260 <== NOT EXECUTED return NULL; return p; 4325c: 202e fffc movel %fp@(-4),%d0 } 43260: 4e5e unlk %fp <== NOT EXECUTED 000431d2 : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 431d2: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 431d4: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 431d8: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 431dc: 486e fffc pea %fp@(-4) <== NOT EXECUTED 431e0: 4878 00c8 pea c8 <== NOT EXECUTED 431e4: 4879 0005 f6c2 pea 5f6c2 <== NOT EXECUTED 431ea: 4879 0005 f78a pea 5f78a <== NOT EXECUTED 431f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 431f2: 4eb9 0004 31ac jsr 431ac <== NOT EXECUTED 431f8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 431fc: 4a80 tstl %d0 <== NOT EXECUTED 431fe: 6704 beqs 43204 <== NOT EXECUTED 43200: 4280 clrl %d0 <== NOT EXECUTED 43202: 6004 bras 43208 <== NOT EXECUTED return NULL; return p; 43204: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 43208: 4e5e unlk %fp <== NOT EXECUTED 000431ac : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 431ac: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 431ae: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 431b2: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 431b6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 431ba: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 431be: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 431c2: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 431c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 431c8: 42a7 clrl %sp@- <== NOT EXECUTED 431ca: 4eba ff22 jsr %pc@(430ee ) <== NOT EXECUTED } 431ce: 4e5e unlk %fp <== NOT EXECUTED 00049108 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 49108: 4e56 ffec linkw %fp,#-20 4910c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49110: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 49114: 4a8a tstl %a2 49116: 6610 bnes 49128 <== ALWAYS TAKEN errno = EFAULT; 49118: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 4911e: 720e moveq #14,%d1 <== NOT EXECUTED 49120: 2040 moveal %d0,%a0 <== NOT EXECUTED 49122: 70ff moveq #-1,%d0 <== NOT EXECUTED 49124: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 49126: 6032 bras 4915a <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 49128: 203c 0000 0700 movel #1792,%d0 4912e: 40c2 movew %sr,%d2 49130: 8082 orl %d2,%d0 49132: 46c0 movew %d0,%sr _TOD_Get( &now ); 49134: 486e fff8 pea %fp@(-8) 49138: 4eb9 0004 a1d8 jsr 4a1d8 <_TOD_Get> _ISR_Enable(level); 4913e: 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; 49140: 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; 49146: 588f addql #4,%sp 49148: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4914a: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4914e: 4c43 1801 remsl %d3,%d1,%d1 49152: 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; 49156: 24ae fff8 movel %fp@(-8),%a2@ } 4915a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 49160: 4e5e unlk %fp <== NOT EXECUTED 000505bc : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 505bc: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 505be: 4e56 0000 linkw %fp,#0 505c2: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 505c6: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 505ca: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 505cc: b0a9 0048 cmpl %a1@(72),%d0 505d0: 6704 beqs 505d6 <== ALWAYS TAKEN 505d2: 70ff moveq #-1,%d0 <== NOT EXECUTED 505d4: 600e bras 505e4 <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 505d6: 4280 clrl %d0 505d8: 4281 clrl %d1 505da: 4282 clrl %d2 505dc: 2141 000c movel %d1,%a0@(12) 505e0: 2142 0010 movel %d2,%a0@(16) return 0; } 505e4: 241f movel %sp@+,%d2 505e6: 4e5e unlk %fp <== NOT EXECUTED 00050710 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 50710: 4e56 fff8 linkw %fp,#-8 50714: 2f0b movel %a3,%sp@- 50716: 266e 000c moveal %fp@(12),%a3 5071a: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 5071c: 2453 moveal %a3@,%a2 5071e: 200a movel %a2,%d0 50720: 0680 0000 0050 addil #80,%d0 50726: b0aa 004c cmpl %a2@(76),%d0 5072a: 6712 beqs 5073e /* * 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 ); 5072c: 4eb9 0005 1550 jsr 51550 <__errno> 50732: 72ff moveq #-1,%d1 50734: 2040 moveal %d0,%a0 50736: 705a moveq #90,%d0 50738: 2080 movel %d0,%a0@ 5073a: 6000 0086 braw 507c2 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 5073e: 206b 0010 moveal %a3@(16),%a0 50742: b5e8 001c cmpal %a0@(28),%a2 50746: 6706 beqs 5074e /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 50748: 4aaa 0058 tstl %a2@(88) 5074c: 6710 beqs 5075e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 5074e: 4eb9 0005 1550 jsr 51550 <__errno> 50754: 72ff moveq #-1,%d1 50756: 2040 moveal %d0,%a0 50758: 7010 moveq #16,%d0 5075a: 2080 movel %d0,%a0@ 5075c: 6064 bras 507c2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 5075e: 4aaa 0008 tstl %a2@(8) 50762: 670e beqs 50772 50764: 2f0a movel %a2,%sp@- 50766: 4eb9 0004 7198 jsr 47198 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 5076c: 588f addql #4,%sp 5076e: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 50772: 302a 0032 movew %a2@(50),%d0 50776: 5380 subql #1,%d0 50778: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 5077c: 42a7 clrl %sp@- 5077e: 486e fff8 pea %fp@(-8) 50782: 4eb9 0004 35bc jsr 435bc 50788: 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) ) { 5078e: 2f0a movel %a2,%sp@- 50790: 4eb9 0004 d946 jsr 4d946 50796: 4fef 000c lea %sp@(12),%sp 5079a: 4a80 tstl %d0 5079c: 6622 bnes 507c0 5079e: 4a6a 0032 tstw %a2@(50) 507a2: 661c bnes 507c0 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 507a4: 2079 0006 091c moveal 6091c ,%a0 507aa: 2653 moveal %a3@,%a3 507ac: b7e8 0004 cmpal %a0@(4),%a3 507b0: 6604 bnes 507b6 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 507b2: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 507b6: 2f0a movel %a2,%sp@- 507b8: 4eb9 0004 3534 jsr 43534 507be: 588f addql #4,%sp 507c0: 4281 clrl %d1 } return 0; } 507c2: 246e fff0 moveal %fp@(-16),%a2 507c6: 2001 movel %d1,%d0 507c8: 266e fff4 moveal %fp@(-12),%a3 507cc: 4e5e unlk %fp <== NOT EXECUTED 00042e24 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 42e24: 4e56 0000 linkw %fp,#0 42e28: 2f0a movel %a2,%sp@- 42e2a: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 42e2c: 4a39 0005 f6bc tstb 5f6bc 42e32: 6600 00c4 bnew 42ef8 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 42e36: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 42e3a: 45f9 0004 eee4 lea 4eee4 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 42e40: 4879 0005 d4d0 pea 5d4d0 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 42e46: 7001 moveq #1,%d0 42e48: 13c0 0005 f6bc moveb %d0,5f6bc mkdir("/etc", 0777); 42e4e: 4eb9 0004 3570 jsr 43570 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 42e54: 4879 0005 e067 pea 5e067 <_global_impure_ptr+0xbf> 42e5a: 4879 0005 d4d5 pea 5d4d5 42e60: 4e92 jsr %a2@ 42e62: 4fef 0010 lea %sp@(16),%sp 42e66: 4a80 tstl %d0 42e68: 670c beqs 42e76 <== ALWAYS TAKEN fclose(fp); 42e6a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e6c: 4eb9 0004 e862 jsr 4e862 <== NOT EXECUTED 42e72: 588f addql #4,%sp <== NOT EXECUTED 42e74: 602e bras 42ea4 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 42e76: 4879 0005 cbf2 pea 5cbf2 <_rodata_start+0xf2> 42e7c: 4879 0005 d4d5 pea 5d4d5 42e82: 4e92 jsr %a2@ 42e84: 508f addql #8,%sp 42e86: 2400 movel %d0,%d2 42e88: 671a beqs 42ea4 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 42e8a: 2f00 movel %d0,%sp@- 42e8c: 4879 0005 d4e1 pea 5d4e1 42e92: 4eb9 0004 efc4 jsr 4efc4 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 42e98: 2f02 movel %d2,%sp@- 42e9a: 4eb9 0004 e862 jsr 4e862 42ea0: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 42ea4: 4879 0005 e067 pea 5e067 <_global_impure_ptr+0xbf> 42eaa: 45f9 0004 eee4 lea 4eee4 ,%a2 42eb0: 4879 0005 d548 pea 5d548 42eb6: 4e92 jsr %a2@ 42eb8: 508f addql #8,%sp 42eba: 4a80 tstl %d0 42ebc: 670c beqs 42eca <== ALWAYS TAKEN fclose(fp); 42ebe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42ec0: 4eb9 0004 e862 jsr 4e862 <== NOT EXECUTED 42ec6: 588f addql #4,%sp <== NOT EXECUTED 42ec8: 602e bras 42ef8 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 42eca: 4879 0005 cbf2 pea 5cbf2 <_rodata_start+0xf2> 42ed0: 4879 0005 d548 pea 5d548 42ed6: 4e92 jsr %a2@ 42ed8: 508f addql #8,%sp 42eda: 2400 movel %d0,%d2 42edc: 671a beqs 42ef8 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 42ede: 2f00 movel %d0,%sp@- 42ee0: 4879 0005 d553 pea 5d553 42ee6: 4eb9 0004 efc4 jsr 4efc4 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 42eec: 2f02 movel %d2,%sp@- 42eee: 4eb9 0004 e862 jsr 4e862 42ef4: 4fef 000c lea %sp@(12),%sp } } 42ef8: 242e fff8 movel %fp@(-8),%d2 42efc: 246e fffc moveal %fp@(-4),%a2 42f00: 4e5e unlk %fp <== NOT EXECUTED 000456b8 : int ioctl( int fd, ioctl_command_t command, ... ) { 456b8: 4e56 0000 linkw %fp,#0 456bc: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 456c0: b0b9 0006 0a74 cmpl 60a74 ,%d0 456c6: 6422 bccs 456ea iop = rtems_libio_iop( fd ); 456c8: 2079 0006 2248 moveal 62248 ,%a0 456ce: ed88 lsll #6,%d0 456d0: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 456d2: 2028 0014 movel %a0@(20),%d0 456d6: 0280 0000 0100 andil #256,%d0 456dc: 670c beqs 456ea <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 456de: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 456e2: 2268 003c moveal %a0@(60),%a1 456e6: 4a89 tstl %a1 456e8: 6610 bnes 456fa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 456ea: 4eb9 0005 1758 jsr 51758 <__errno> 456f0: 72ff moveq #-1,%d1 456f2: 2040 moveal %d0,%a0 456f4: 7009 moveq #9,%d0 456f6: 2080 movel %d0,%a0@ 456f8: 602a bras 45724 if ( !iop->handlers->ioctl_h ) 456fa: 2269 0010 moveal %a1@(16),%a1 456fe: 4a89 tstl %a1 45700: 6612 bnes 45714 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 45702: 4eb9 0005 1758 jsr 51758 <__errno> <== NOT EXECUTED 45708: 72ff moveq #-1,%d1 <== NOT EXECUTED 4570a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4570c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 45712: 6010 bras 45724 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 45714: 2f00 movel %d0,%sp@- 45716: 2f2e 000c movel %fp@(12),%sp@- 4571a: 2f08 movel %a0,%sp@- 4571c: 4e91 jsr %a1@ return rc; 4571e: 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 ); 45722: 2200 movel %d0,%d1 return rc; } 45724: 2001 movel %d1,%d0 45726: 4e5e unlk %fp ... 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 b67c moveal 5b67c <__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 b5a4 movel 5b5a4 ,%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 0004c5b4 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4c5b4: 4e56 ffd0 linkw %fp,#-48 4c5b8: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4c5bc: 242e 000c movel %fp@(12),%d2 4c5c0: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 4c5c4: 4eb9 0004 b788 jsr 4b788 4c5ca: b0ae 0008 cmpl %fp@(8),%d0 4c5ce: 6712 beqs 4c5e2 rtems_set_errno_and_return_minus_one( ESRCH ); 4c5d0: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4c5d6: 7603 moveq #3,%d3 4c5d8: 72ff moveq #-1,%d1 4c5da: 2040 moveal %d0,%a0 4c5dc: 2083 movel %d3,%a0@ 4c5de: 6000 01ec braw 4c7cc /* * Validate the signal passed. */ if ( !sig ) 4c5e2: 4a82 tstl %d2 4c5e4: 670a beqs 4c5f0 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 4c5e6: 2202 movel %d2,%d1 4c5e8: 5381 subql #1,%d1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4c5ea: 701f moveq #31,%d0 4c5ec: b081 cmpl %d1,%d0 4c5ee: 6412 bccs 4c602 rtems_set_errno_and_return_minus_one( EINVAL ); 4c5f0: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4c5f6: 7416 moveq #22,%d2 4c5f8: 72ff moveq #-1,%d1 4c5fa: 2040 moveal %d0,%a0 4c5fc: 2082 movel %d2,%a0@ 4c5fe: 6000 01cc braw 4c7cc /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 4c602: 2602 movel %d2,%d3 4c604: 2002 movel %d2,%d0 4c606: e58b lsll #2,%d3 4c608: e988 lsll #4,%d0 4c60a: 9083 subl %d3,%d0 4c60c: 0680 0005 d1be addil #381374,%d0 4c612: 7601 moveq #1,%d3 4c614: 2040 moveal %d0,%a0 4c616: b690 cmpl %a0@,%d3 4c618: 6700 01b0 beqw 4c7ca /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 4c61c: 7008 moveq #8,%d0 4c61e: b082 cmpl %d2,%d0 4c620: 670e beqs 4c630 4c622: 7604 moveq #4,%d3 4c624: b682 cmpl %d2,%d3 4c626: 6708 beqs 4c630 4c628: 103c 000b moveb #11,%d0 4c62c: b082 cmpl %d2,%d0 4c62e: 6618 bnes 4c648 return pthread_kill( pthread_self(), sig ); 4c630: 4eb9 0004 ca2c jsr 4ca2c 4c636: 2f02 movel %d2,%sp@- 4c638: 2f00 movel %d0,%sp@- 4c63a: 4eb9 0004 c96c jsr 4c96c 4c640: 508f addql #8,%sp 4c642: 2200 movel %d0,%d1 4c644: 6000 0186 braw 4c7cc static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4c648: 7601 moveq #1,%d3 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 4c64a: 7001 moveq #1,%d0 4c64c: e3ab lsll %d1,%d3 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4c64e: 2d42 fff4 movel %d2,%fp@(-12) siginfo->si_code = SI_USER; 4c652: 2d40 fff8 movel %d0,%fp@(-8) if ( !value ) { 4c656: 4a8a tstl %a2 4c658: 6606 bnes 4c660 siginfo->si_value.sival_int = 0; 4c65a: 42ae fffc clrl %fp@(-4) 4c65e: 6004 bras 4c664 } else { siginfo->si_value = *value; 4c660: 2d52 fffc movel %a2@,%fp@(-4) 4c664: 2039 0005 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0 4c66a: 5280 addql #1,%d0 4c66c: 23c0 0005 cd08 movel %d0,5cd08 <_Thread_Dispatch_disable_level> /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 4c672: 2279 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c678: 2069 010e moveal %a1@(270),%a0 4c67c: 2028 00cc movel %a0@(204),%d0 4c680: 4680 notl %d0 4c682: c083 andl %d3,%d0 4c684: 6600 00b2 bnew 4c738 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4c688: 2079 0005 d342 moveal 5d342 <_POSIX_signals_Wait_queue>,%a0 4c68e: 601c bras 4c6ac #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4c690: 2003 movel %d3,%d0 4c692: c0a8 0030 andl %a0@(48),%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c696: 2468 010e moveal %a0@(270),%a2 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4c69a: 6600 009c bnew 4c738 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 4c69e: 202a 00cc movel %a2@(204),%d0 4c6a2: 4680 notl %d0 4c6a4: c083 andl %d3,%d0 4c6a6: 6600 0090 bnew 4c738 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 4c6aa: 2050 moveal %a0@,%a0 the_thread = (Thread_Control *)the_node; 4c6ac: 2248 moveal %a0,%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c6ae: b1fc 0005 d346 cmpal #381766,%a0 4c6b4: 66da bnes 4c690 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4c6b6: 4280 clrl %d0 4c6b8: 1039 0005 b552 moveb 5b552 ,%d0 4c6be: 45f9 0005 ccc8 lea 5ccc8 <_Objects_Information_table+0x8>,%a2 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4c6c4: 93c9 subal %a1,%a1 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4c6c6: 5280 addql #1,%d0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 4c6c8: 2052 moveal %a2@,%a0 4c6ca: 4a88 tstl %a0 4c6cc: 675c beqs 4c72a continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4c6ce: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 4c6d2: 4287 clrl %d7 4c6d4: 7801 moveq #1,%d4 4c6d6: 2668 0018 moveal %a0@(24),%a3 4c6da: 588b addql #4,%a3 4c6dc: 3e28 000e movew %a0@(14),%d7 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4c6e0: 6044 bras 4c726 the_thread = (Thread_Control *) object_table[ index ]; 4c6e2: 2053 moveal %a3@,%a0 if ( !the_thread ) 4c6e4: 4a88 tstl %a0 4c6e6: 6732 beqs 4c71a /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4c6e8: 2228 0014 movel %a0@(20),%d1 4c6ec: b081 cmpl %d1,%d0 4c6ee: 652a bcss 4c71a DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c6f0: 2868 010e moveal %a0@(270),%a4 4c6f4: 2a2c 00cc movel %a4@(204),%d5 4c6f8: 4685 notl %d5 4c6fa: ca83 andl %d3,%d5 4c6fc: 671c beqs 4c71a * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 4c6fe: b081 cmpl %d1,%d0 4c700: 621c bhis 4c71e * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 4c702: 2c29 0010 movel %a1@(16),%d6 4c706: 6712 beqs 4c71a <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4c708: 2a28 0010 movel %a0@(16),%d5 4c70c: 6710 beqs 4c71e continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4c70e: 0806 001c btst #28,%d6 4c712: 6606 bnes 4c71a DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4c714: 0805 001c btst #28,%d5 4c718: 6604 bnes 4c71e 4c71a: 2200 movel %d0,%d1 4c71c: 6002 bras 4c720 4c71e: 2248 moveal %a0,%a1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4c720: 5284 addql #1,%d4 4c722: 588b addql #4,%a3 4c724: 2001 movel %d1,%d0 4c726: be84 cmpl %d4,%d7 4c728: 64b8 bccs 4c6e2 4c72a: 588a addql #4,%a2 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 4c72c: b5fc 0005 ccd4 cmpal #380116,%a2 4c732: 6694 bnes 4c6c8 } } } } if ( interested ) { 4c734: 4a89 tstl %a1 4c736: 671c beqs 4c754 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4c738: 7001 moveq #1,%d0 4c73a: 1340 0074 moveb %d0,%a1@(116) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 4c73e: 486e fff4 pea %fp@(-12) 4c742: 2f02 movel %d2,%sp@- 4c744: 2f09 movel %a1,%sp@- 4c746: 4eb9 0004 c870 jsr 4c870 <_POSIX_signals_Unblock_thread> 4c74c: 4fef 000c lea %sp@(12),%sp 4c750: 4a00 tstb %d0 4c752: 6670 bnes 4c7c4 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 4c754: 2f03 movel %d3,%sp@- if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4c756: 2602 movel %d2,%d3 4c758: e58a lsll #2,%d2 4c75a: e98b lsll #4,%d3 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 4c75c: 4eb9 0004 c840 jsr 4c840 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4c762: 588f addql #4,%sp 4c764: 9682 subl %d2,%d3 4c766: 41f9 0005 d1b6 lea 5d1b6 <_POSIX_signals_Vectors>,%a0 4c76c: 7002 moveq #2,%d0 4c76e: b0b0 3800 cmpl %a0@(00000000,%d3:l),%d0 4c772: 6650 bnes 4c7c4 psiginfo = (POSIX_signals_Siginfo_node *) 4c774: 4879 0005 d336 pea 5d336 <_POSIX_signals_Inactive_siginfo> 4c77a: 4eb9 0004 a070 jsr 4a070 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4c780: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4c782: 2440 moveal %d0,%a2 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4c784: 4a80 tstl %d0 4c786: 6616 bnes 4c79e _Thread_Enable_dispatch(); 4c788: 4eb9 0004 6ce2 jsr 46ce2 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 4c78e: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4c794: 72ff moveq #-1,%d1 4c796: 2040 moveal %d0,%a0 4c798: 700b moveq #11,%d0 4c79a: 2080 movel %d0,%a0@ 4c79c: 602e bras 4c7cc } psiginfo->Info = *siginfo; 4c79e: 4878 000c pea c _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4c7a2: 0683 0005 d3ae addil #381870,%d3 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4c7a8: 486e fff4 pea %fp@(-12) 4c7ac: 486a 0008 pea %a2@(8) 4c7b0: 4eb9 0004 d2a8 jsr 4d2a8 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4c7b6: 2f0a movel %a2,%sp@- 4c7b8: 2f03 movel %d3,%sp@- 4c7ba: 4eb9 0004 58d0 jsr 458d0 <_Chain_Append> 4c7c0: 4fef 0014 lea %sp@(20),%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4c7c4: 4eb9 0004 6ce2 jsr 46ce2 <_Thread_Enable_dispatch> 4c7ca: 4281 clrl %d1 return 0; } 4c7cc: 2001 movel %d1,%d0 4c7ce: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4c7d4: 4e5e unlk %fp <== NOT EXECUTED 0004398c : int link( const char *existing, const char *new ) { 4398c: 4e56 ffc8 linkw %fp,#-56 43990: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43994: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 43998: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 4399a: 246e 000c moveal %fp@(12),%a2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 4399e: 4eb9 0005 04e4 jsr 504e4 439a4: 7201 moveq #1,%d1 439a6: 2e81 movel %d1,%sp@ 439a8: 486e ffe8 pea %fp@(-24) 439ac: 42a7 clrl %sp@- 439ae: 2f00 movel %d0,%sp@- 439b0: 2f02 movel %d2,%sp@- 439b2: 4eb9 0004 34c2 jsr 434c2 0, &existing_loc, true ); if ( result != 0 ) 439b8: 4fef 0014 lea %sp@(20),%sp 439bc: 4a80 tstl %d0 439be: 6706 beqs 439c6 439c0: 74ff moveq #-1,%d2 439c2: 6000 01a6 braw 43b6a /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 439c6: 742f moveq #47,%d2 439c8: 1012 moveb %a2@,%d0 439ca: 1200 moveb %d0,%d1 439cc: 49c1 extbl %d1 439ce: b481 cmpl %d1,%d2 439d0: 670c beqs 439de 439d2: 143c 005c moveb #92,%d2 439d6: b481 cmpl %d1,%d2 439d8: 6704 beqs 439de <== NEVER TAKEN 439da: 4a00 tstb %d0 439dc: 6622 bnes 43a00 <== ALWAYS TAKEN 439de: 4878 0014 pea 14 439e2: 2079 0005 f6d8 moveal 5f6d8 ,%a0 439e8: 41e8 0018 lea %a0@(24),%a0 439ec: 2f08 movel %a0,%sp@- 439ee: 486e ffd4 pea %fp@(-44) 439f2: 4eb9 0004 f858 jsr 4f858 439f8: 4fef 000c lea %sp@(12),%sp 439fc: 7001 moveq #1,%d0 439fe: 601e bras 43a1e 43a00: 4878 0014 pea 14 43a04: 2039 0005 f6d8 movel 5f6d8 ,%d0 43a0a: 5880 addql #4,%d0 43a0c: 2f00 movel %d0,%sp@- 43a0e: 486e ffd4 pea %fp@(-44) 43a12: 4eb9 0004 f858 jsr 4f858 43a18: 4fef 000c lea %sp@(12),%sp 43a1c: 4280 clrl %d0 if ( !parent_loc.ops->evalformake_h ) { 43a1e: 206e ffe0 moveal %fp@(-32),%a0 43a22: 2068 0004 moveal %a0@(4),%a0 43a26: 4a88 tstl %a0 43a28: 661c bnes 43a46 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 43a2a: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 43a2e: 4a88 tstl %a0 <== NOT EXECUTED 43a30: 6700 00e0 beqw 43b12 <== NOT EXECUTED 43a34: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43a38: 4a88 tstl %a0 <== NOT EXECUTED 43a3a: 6700 00d6 beqw 43b12 <== NOT EXECUTED 43a3e: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 43a42: 6000 00ca braw 43b0e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 43a46: 486e fffc pea %fp@(-4) 43a4a: 240e movel %fp,%d2 43a4c: 0682 ffff ffd4 addil #-44,%d2 43a52: 2f02 movel %d2,%sp@- 43a54: 4872 0800 pea %a2@(00000000,%d0:l) 43a58: 4e90 jsr %a0@ if ( result != 0 ) { 43a5a: 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 ); 43a5e: 2600 movel %d0,%d3 if ( result != 0 ) { 43a60: 6728 beqs 43a8a rtems_filesystem_freenode( &existing_loc ); 43a62: 206e fff4 moveal %fp@(-12),%a0 43a66: 4a88 tstl %a0 43a68: 6710 beqs 43a7a <== NEVER TAKEN 43a6a: 2068 001c moveal %a0@(28),%a0 43a6e: 4a88 tstl %a0 43a70: 6708 beqs 43a7a <== NEVER TAKEN 43a72: 486e ffe8 pea %fp@(-24) 43a76: 4e90 jsr %a0@ 43a78: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 43a7a: 4eb9 0004 f038 jsr 4f038 <__errno> 43a80: 74ff moveq #-1,%d2 43a82: 2040 moveal %d0,%a0 43a84: 2083 movel %d3,%a0@ 43a86: 6000 00e2 braw 43b6a /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 43a8a: 202e fff8 movel %fp@(-8),%d0 43a8e: b0ae ffe4 cmpl %fp@(-28),%d0 43a92: 6742 beqs 43ad6 rtems_filesystem_freenode( &existing_loc ); 43a94: 206e fff4 moveal %fp@(-12),%a0 43a98: 4a88 tstl %a0 43a9a: 6710 beqs 43aac <== NEVER TAKEN 43a9c: 2068 001c moveal %a0@(28),%a0 43aa0: 4a88 tstl %a0 43aa2: 6708 beqs 43aac <== NEVER TAKEN 43aa4: 486e ffe8 pea %fp@(-24) 43aa8: 4e90 jsr %a0@ 43aaa: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 43aac: 206e ffe0 moveal %fp@(-32),%a0 43ab0: 4a88 tstl %a0 43ab2: 6710 beqs 43ac4 <== NEVER TAKEN 43ab4: 2068 001c moveal %a0@(28),%a0 43ab8: 4a88 tstl %a0 43aba: 6708 beqs 43ac4 <== NEVER TAKEN 43abc: 486e ffd4 pea %fp@(-44) 43ac0: 4e90 jsr %a0@ 43ac2: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 43ac4: 4eb9 0004 f038 jsr 4f038 <__errno> 43aca: 74ff moveq #-1,%d2 43acc: 2040 moveal %d0,%a0 43ace: 7012 moveq #18,%d0 43ad0: 2080 movel %d0,%a0@ 43ad2: 6000 0096 braw 43b6a } if ( !parent_loc.ops->link_h ) { 43ad6: 206e ffe0 moveal %fp@(-32),%a0 43ada: 2068 0008 moveal %a0@(8),%a0 43ade: 4a88 tstl %a0 43ae0: 6642 bnes 43b24 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 43ae2: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 43ae6: 4a88 tstl %a0 <== NOT EXECUTED 43ae8: 6710 beqs 43afa <== NOT EXECUTED 43aea: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43aee: 4a88 tstl %a0 <== NOT EXECUTED 43af0: 6708 beqs 43afa <== NOT EXECUTED 43af2: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 43af6: 4e90 jsr %a0@ <== NOT EXECUTED 43af8: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 43afa: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 43afe: 4a88 tstl %a0 <== NOT EXECUTED 43b00: 6710 beqs 43b12 <== NOT EXECUTED 43b02: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 43b06: 4a88 tstl %a0 <== NOT EXECUTED 43b08: 6708 beqs 43b12 <== NOT EXECUTED 43b0a: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 43b0e: 4e90 jsr %a0@ <== NOT EXECUTED 43b10: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 43b12: 4eb9 0004 f038 jsr 4f038 <__errno> <== NOT EXECUTED 43b18: 74ff moveq #-1,%d2 <== NOT EXECUTED 43b1a: 2040 moveal %d0,%a0 <== NOT EXECUTED 43b1c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 43b22: 6046 bras 43b6a <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 43b24: 2f2e fffc movel %fp@(-4),%sp@- 43b28: 260e movel %fp,%d3 43b2a: 0683 ffff ffe8 addil #-24,%d3 43b30: 2f02 movel %d2,%sp@- 43b32: 2f03 movel %d3,%sp@- 43b34: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 43b36: 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 ); 43b3a: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 43b3c: 4fef 000c lea %sp@(12),%sp 43b40: 4a88 tstl %a0 43b42: 670e beqs 43b52 <== NEVER TAKEN 43b44: 2068 001c moveal %a0@(28),%a0 43b48: 4a88 tstl %a0 43b4a: 6706 beqs 43b52 <== NEVER TAKEN 43b4c: 2f03 movel %d3,%sp@- 43b4e: 4e90 jsr %a0@ 43b50: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 43b52: 206e ffe0 moveal %fp@(-32),%a0 43b56: 4a88 tstl %a0 43b58: 6710 beqs 43b6a <== NEVER TAKEN 43b5a: 2068 001c moveal %a0@(28),%a0 43b5e: 4a88 tstl %a0 43b60: 6708 beqs 43b6a <== NEVER TAKEN 43b62: 486e ffd4 pea %fp@(-44) 43b66: 4e90 jsr %a0@ 43b68: 588f addql #4,%sp return result; } 43b6a: 2002 movel %d2,%d0 43b6c: 4cee 040c ffc8 moveml %fp@(-56),%d2-%d3/%a2 43b72: 4e5e unlk %fp <== NOT EXECUTED 0005935c : off_t lseek( int fd, off_t offset, int whence ) { 5935c: 4e56 ffec linkw %fp,#-20 59360: 206e 0014 moveal %fp@(20),%a0 59364: 48d7 043c moveml %d2-%d5/%a2,%sp@ 59368: 242e 0008 movel %fp@(8),%d2 5936c: 202e 000c movel %fp@(12),%d0 59370: 222e 0010 movel %fp@(16),%d1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 59374: b4b9 0005 b4a4 cmpl 5b4a4 ,%d2 5937a: 6416 bccs 59392 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 5937c: 2479 0005 cba8 moveal 5cba8 ,%a2 59382: ed8a lsll #6,%d2 59384: d5c2 addal %d2,%a2 rtems_libio_check_is_open(iop); 59386: 242a 0014 movel %a2@(20),%d2 5938a: 0282 0000 0100 andil #256,%d2 59390: 660e bnes 593a0 <== ALWAYS TAKEN 59392: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 59398: 7209 moveq #9,%d1 <== NOT EXECUTED 5939a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5939c: 2081 movel %d1,%a0@ <== NOT EXECUTED 5939e: 6068 bras 59408 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 593a0: 226a 003c moveal %a2@(60),%a1 593a4: 4aa9 0014 tstl %a1@(20) 593a8: 6610 bnes 593ba <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 593aa: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 593b0: 2040 moveal %d0,%a0 <== NOT EXECUTED 593b2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 593b8: 604e bras 59408 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 593ba: 7801 moveq #1,%d4 /* * Now process the lseek(). */ old_offset = iop->offset; 593bc: 242a 000c movel %a2@(12),%d2 593c0: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 593c4: b888 cmpl %a0,%d4 593c6: 6714 beqs 593dc 593c8: 7a02 moveq #2,%d5 593ca: ba88 cmpl %a0,%d5 593cc: 6718 beqs 593e6 593ce: 4a88 tstl %a0 593d0: 662a bnes 593fc case SEEK_SET: iop->offset = offset; 593d2: 2540 000c movel %d0,%a2@(12) 593d6: 2541 0010 movel %d1,%a2@(16) break; 593da: 6032 bras 5940e case SEEK_CUR: iop->offset += offset; 593dc: 2800 movel %d0,%d4 593de: 2a01 movel %d1,%d5 593e0: da83 addl %d3,%d5 593e2: d982 addxl %d2,%d4 593e4: 600c bras 593f2 break; case SEEK_END: iop->offset = iop->size + offset; 593e6: 282a 0004 movel %a2@(4),%d4 593ea: 2a2a 0008 movel %a2@(8),%d5 593ee: da81 addl %d1,%d5 593f0: d980 addxl %d0,%d4 593f2: 2544 000c movel %d4,%a2@(12) 593f6: 2545 0010 movel %d5,%a2@(16) break; 593fa: 6012 bras 5940e default: rtems_set_errno_and_return_minus_one( EINVAL ); 593fc: 4eb9 0004 ca88 jsr 4ca88 <__errno> 59402: 2040 moveal %d0,%a0 59404: 7016 moveq #22,%d0 59406: 2080 movel %d0,%a0@ 59408: 78ff moveq #-1,%d4 5940a: 7aff moveq #-1,%d5 5940c: 602c bras 5943a /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5940e: 226a 003c moveal %a2@(60),%a1 59412: 2f08 movel %a0,%sp@- 59414: 2f01 movel %d1,%sp@- 59416: 2f00 movel %d0,%sp@- 59418: 2f0a movel %a2,%sp@- 5941a: 2069 0014 moveal %a1@(20),%a0 5941e: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 59420: 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 ); 59424: 2800 movel %d0,%d4 59426: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 59428: 70ff moveq #-1,%d0 5942a: 72ff moveq #-1,%d1 5942c: 9285 subl %d5,%d1 5942e: 9184 subxl %d4,%d0 59430: 6608 bnes 5943a iop->offset = old_offset; 59432: 2542 000c movel %d2,%a2@(12) 59436: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5943a: 2205 movel %d5,%d1 5943c: 2004 movel %d4,%d0 5943e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 59444: 4e5e unlk %fp <== NOT EXECUTED 00049484 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 49484: 4e56 fff4 linkw %fp,#-12 49488: 52b9 0005 cbb8 addql #1,5cbb8 4948e: 48d7 001c moveml %d2-%d4,%sp@ 49492: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 49496: 4eb9 0004 944c jsr 4944c /* * Validate the parameters */ if ( !size ) 4949c: 4a83 tstl %d3 4949e: 6700 0088 beqw 49528 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 494a2: 7003 moveq #3,%d0 494a4: b0b9 0005 ce90 cmpl 5ce90 <_System_state_Current>,%d0 494aa: 660a bnes 494b6 494ac: 4eb9 0004 93f4 jsr 493f4 494b2: 4a00 tstb %d0 494b4: 6772 beqs 49528 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 494b6: 42a7 clrl %sp@- 494b8: 42a7 clrl %sp@- 494ba: 2f03 movel %d3,%sp@- 494bc: 2f39 0005 b4b0 movel 5b4b0 ,%sp@- 494c2: 4eb9 0004 a598 jsr 4a598 <_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 ) { 494c8: 4fef 0010 lea %sp@(16),%sp 494cc: 2400 movel %d0,%d2 494ce: 6626 bnes 494f6 if (rtems_malloc_sbrk_helpers) 494d0: 2079 0005 bb3a moveal 5bb3a ,%a0 494d6: 4a88 tstl %a0 494d8: 670e beqs 494e8 <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 494da: 2f03 movel %d3,%sp@- <== NOT EXECUTED 494dc: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 494e0: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 494e2: 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 ); 494e4: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 494e6: 6610 bnes 494f8 <== NOT EXECUTED errno = ENOMEM; 494e8: 4eb9 0004 ca88 jsr 4ca88 <__errno> 494ee: 2040 moveal %d0,%a0 494f0: 700c moveq #12,%d0 494f2: 2080 movel %d0,%a0@ return (void *) 0; 494f4: 6034 bras 4952a 494f6: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 494f8: 2079 0005 bb3e moveal 5bb3e ,%a0 494fe: 4a88 tstl %a0 49500: 670a beqs 4950c <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 49502: 2f03 movel %d3,%sp@- <== NOT EXECUTED 49504: 2f04 movel %d4,%sp@- <== NOT EXECUTED 49506: 2050 moveal %a0@,%a0 <== NOT EXECUTED 49508: 4e90 jsr %a0@ <== NOT EXECUTED 4950a: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4950c: 2079 0005 bb36 moveal 5bb36 ,%a0 49512: 4a88 tstl %a0 49514: 6604 bnes 4951a <== NEVER TAKEN 49516: 2404 movel %d4,%d2 49518: 6010 bras 4952a (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4951a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4951c: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 49520: 2404 movel %d4,%d2 <== NOT EXECUTED 49522: 4e90 jsr %a0@ <== NOT EXECUTED 49524: 588f addql #4,%sp <== NOT EXECUTED 49526: 6002 bras 4952a <== NOT EXECUTED 49528: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4952a: 2002 movel %d2,%d0 4952c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 49532: 4e5e unlk %fp ... 00049432 : } void malloc_deferred_free( void *pointer ) { 49432: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49436: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4943a: 4879 0005 d1aa pea 5d1aa <== NOT EXECUTED 49440: 4eb9 0004 58d0 jsr 458d0 <_Chain_Append> <== NOT EXECUTED 49446: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 49448: 4e5e unlk %fp <== NOT EXECUTED 0004944c : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4944c: 4e56 0000 linkw %fp,#0 49450: 2f0b movel %a3,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 49452: 47f9 0004 a070 lea 4a070 <_Chain_Get>,%a3 49458: 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); 4945a: 45f9 0004 8f80 lea 48f80 ,%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) 49460: 6006 bras 49468 free(to_be_freed); 49462: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49464: 4e92 jsr %a2@ <== NOT EXECUTED 49466: 588f addql #4,%sp <== NOT EXECUTED 49468: 4879 0005 d1aa pea 5d1aa 4946e: 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) 49470: 588f addql #4,%sp 49472: 4a80 tstl %d0 49474: 66ec bnes 49462 <== NEVER TAKEN free(to_be_freed); } 49476: 246e fff8 moveal %fp@(-8),%a2 4947a: 266e fffc moveal %fp@(-4),%a3 4947e: 4e5e unlk %fp ... 000493f4 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 493f4: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 493f8: 2039 0005 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0 493fe: 6704 beqs 49404 <== ALWAYS TAKEN 49400: 4200 clrb %d0 <== NOT EXECUTED 49402: 600a bras 4940e <== NOT EXECUTED return false; if ( _ISR_Nest_level > 0 ) 49404: 2039 0005 cda2 movel 5cda2 <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4940a: 57c0 seq %d0 4940c: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4940e: 4e5e unlk %fp <== NOT EXECUTED 0004f650 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4f650: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4f654: 2f39 0006 1754 movel 61754 ,%sp@- 4f65a: 4878 0001 pea 1 4f65e: 4eb9 0004 30fc jsr 430fc if ( memory ) 4f664: 508f addql #8,%sp 4f666: 4a80 tstl %d0 4f668: 6706 beqs 4f670 <== NEVER TAKEN memfile_blocks_allocated++; 4f66a: 52b9 0006 18f0 addql #1,618f0 return memory; } 4f670: 4e5e unlk %fp <== NOT EXECUTED 0004f9da : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4f9da: 4e56 0000 linkw %fp,#0 4f9de: 2f0a movel %a2,%sp@- 4f9e0: 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) ) { 4f9e4: 2f0a movel %a2,%sp@- 4f9e6: 4eb9 0004 d946 jsr 4d946 4f9ec: 588f addql #4,%sp 4f9ee: 4a80 tstl %d0 4f9f0: 6632 bnes 4fa24 4f9f2: 4a6a 0032 tstw %a2@(50) 4f9f6: 662c bnes 4fa24 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4f9f8: 2079 0006 091c moveal 6091c ,%a0 4f9fe: b5e8 0004 cmpal %a0@(4),%a2 4fa02: 6604 bnes 4fa08 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 4fa04: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4fa08: 7006 moveq #6,%d0 4fa0a: b0aa 0048 cmpl %a2@(72),%d0 4fa0e: 670a beqs 4fa1a <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 4fa10: 2f0a movel %a2,%sp@- 4fa12: 4eb9 0004 f8c0 jsr 4f8c0 4fa18: 588f addql #4,%sp free( the_jnode ); 4fa1a: 2f0a movel %a2,%sp@- 4fa1c: 4eb9 0004 3534 jsr 43534 4fa22: 588f addql #4,%sp } return 0; } 4fa24: 246e fffc moveal %fp@(-4),%a2 4fa28: 4280 clrl %d0 4fa2a: 4e5e unlk %fp <== NOT EXECUTED 0004f80e : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4f80e: 4e56 ffec linkw %fp,#-20 4f812: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4f816: 246e 0008 moveal %fp@(8),%a2 4f81a: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 4f81e: 4a8a tstl %a2 4f820: 661c bnes 4f83e <== ALWAYS TAKEN 4f822: 4879 0005 fcd2 pea 5fcd2 <== NOT EXECUTED 4f828: 4879 0005 fdb9 pea 5fdb9 <__FUNCTION__.6063> <== NOT EXECUTED 4f82e: 4878 01b3 pea 1b3 <== NOT EXECUTED 4f832: 4879 0005 fc68 pea 5fc68 <== NOT EXECUTED 4f838: 4eb9 0004 d68c jsr 4d68c <__assert_func> <== NOT EXECUTED 4f83e: 2652 moveal %a2@,%a3 4f840: 4282 clrl %d2 b = *block_table; for ( i=0 ; i,%a4 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i if ( b[i] ) { 4f84a: 2013 movel %a3@,%d0 4f84c: 6708 beqs 4f856 memfile_free_block( b[i] ); 4f84e: 2f00 movel %d0,%sp@- 4f850: 4e94 jsr %a4@ b[i] = 0; 4f852: 588f addql #4,%sp 4f854: 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 ); 4f85e: 2f12 movel %a2@,%sp@- 4f860: 4eb9 0004 f636 jsr 4f636 *block_table = 0; 4f866: 588f addql #4,%sp 4f868: 4292 clrl %a2@ } 4f86a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4f870: 4e5e unlk %fp <== NOT EXECUTED 0004fc52 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4fc52: 4e56 ffec linkw %fp,#-20 4fc56: 206e 0008 moveal %fp@(8),%a0 4fc5a: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4fc5e: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4fc62: 202e 000c movel %fp@(12),%d0 4fc66: 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 ) 4fc6a: 242a 004c movel %a2@(76),%d2 4fc6e: 262a 0050 movel %a2@(80),%d3 4fc72: 9681 subl %d1,%d3 4fc74: 9580 subxl %d0,%d2 4fc76: 6c12 bges 4fc8a <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 4fc78: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4fc7a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4fc7c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fc7e: 4eb9 0004 fb2a jsr 4fb2a <== NOT EXECUTED 4fc84: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fc88: 6026 bras 4fcb0 <== 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; 4fc8a: 2540 004c movel %d0,%a2@(76) 4fc8e: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 4fc92: 2140 0004 movel %d0,%a0@(4) 4fc96: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 4fc9a: 42a7 clrl %sp@- 4fc9c: 486e fff8 pea %fp@(-8) 4fca0: 4eb9 0004 35bc jsr 435bc 4fca6: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 4fcac: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 4fcae: 4280 clrl %d0 return 0; } 4fcb0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4fcb6: 4e5e unlk %fp <== NOT EXECUTED 0004fcba : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 4fcba: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4fcbc: 4e56 fff0 linkw %fp,#-16 4fcc0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4fcc4: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4fcc8: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4fccc: b0ab 0048 cmpl %a3@(72),%d0 4fcd0: 6620 bnes 4fcf2 <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) 4fcd2: 202b 004c movel %a3@(76),%d0 <== NOT EXECUTED 4fcd6: 222b 0050 movel %a3@(80),%d1 <== NOT EXECUTED 4fcda: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED 4fcde: 262a 0010 movel %a2@(16),%d3 <== NOT EXECUTED 4fce2: 9681 subl %d1,%d3 <== NOT EXECUTED 4fce4: 9580 subxl %d0,%d2 <== NOT EXECUTED 4fce6: 6f48 bles 4fd30 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 4fce8: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4fcec: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4fcf0: 603e bras 4fd30 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4fcf2: 2f2a 0010 movel %a2@(16),%sp@- 4fcf6: 2f2a 000c movel %a2@(12),%sp@- 4fcfa: 2f0b movel %a3,%sp@- 4fcfc: 4eb9 0004 fb2a jsr 4fb2a 4fd02: 4fef 000c lea %sp@(12),%sp 4fd06: 4a80 tstl %d0 4fd08: 6716 beqs 4fd20 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4fd0a: 4eb9 0005 1550 jsr 51550 <__errno> <== NOT EXECUTED 4fd10: 761c moveq #28,%d3 <== NOT EXECUTED 4fd12: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fd14: 2083 movel %d3,%a0@ <== NOT EXECUTED 4fd16: 307c ffff moveaw #-1,%a0 <== NOT EXECUTED 4fd1a: 327c ffff moveaw #-1,%a1 <== NOT EXECUTED 4fd1e: 6018 bras 4fd38 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 4fd20: 202b 004c movel %a3@(76),%d0 4fd24: 222b 0050 movel %a3@(80),%d1 4fd28: 2540 0004 movel %d0,%a2@(4) 4fd2c: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4fd30: 206a 000c moveal %a2@(12),%a0 4fd34: 226a 0010 moveal %a2@(16),%a1 } 4fd38: 2209 movel %a1,%d1 4fd3a: 2008 movel %a0,%d0 4fd3c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4fd42: 4e5e unlk %fp <== NOT EXECUTED 0004ff92 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4ff92: 4e56 fff0 linkw %fp,#-16 4ff96: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4ff9a: 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)) 4ff9e: 202b 0014 movel %a3@(20),%d0 4ffa2: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4ffa8: 246b 0038 moveal %a3@(56),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4ffac: 6750 beqs 4fffe && (the_jnode->type == IMFS_LINEAR_FILE)) { 4ffae: 7006 moveq #6,%d0 4ffb0: b0aa 0048 cmpl %a2@(72),%d0 4ffb4: 6648 bnes 4fffe <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 4ffb6: 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; 4ffba: 4282 clrl %d2 <== NOT EXECUTED 4ffbc: 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; 4ffbe: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4ffc2: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 4ffc6: 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; 4ffca: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 4ffcc: 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; 4ffd0: 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; 4ffd4: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4ffd8: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 4ffdc: 4a80 tstl %d0 <== NOT EXECUTED 4ffde: 671e beqs 4fffe <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4ffe0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ffe2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ffe4: 42a7 clrl %sp@- <== NOT EXECUTED 4ffe6: 42a7 clrl %sp@- <== NOT EXECUTED 4ffe8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ffea: 4eb9 0004 fd46 jsr 4fd46 <== 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) 4fff0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4fff4: 72ff moveq #-1,%d1 <== NOT EXECUTED 4fff6: b280 cmpl %d0,%d1 <== NOT EXECUTED 4fff8: 6604 bnes 4fffe <== NOT EXECUTED 4fffa: 70ff moveq #-1,%d0 <== NOT EXECUTED 4fffc: 602e bras 5002c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4fffe: 202b 0014 movel %a3@(20),%d0 50002: 0280 0000 0200 andil #512,%d0 50008: 6710 beqs 5001a iop->offset = the_jnode->info.file.size; 5000a: 242a 004c movel %a2@(76),%d2 5000e: 262a 0050 movel %a2@(80),%d3 50012: 2742 000c movel %d2,%a3@(12) 50016: 2743 0010 movel %d3,%a3@(16) iop->size = the_jnode->info.file.size; 5001a: 4280 clrl %d0 5001c: 222a 004c movel %a2@(76),%d1 50020: 242a 0050 movel %a2@(80),%d2 50024: 2741 0004 movel %d1,%a3@(4) 50028: 2742 0008 movel %d2,%a3@(8) return 0; } 5002c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 50032: 4e5e unlk %fp <== NOT EXECUTED 0004fa2e : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4fa2e: 4e56 fff8 linkw %fp,#-8 4fa32: 206e 000c moveal %fp@(12),%a0 4fa36: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4fa38: 2450 moveal %a0@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4fa3a: 4aaa 0008 tstl %a2@(8) 4fa3e: 670e beqs 4fa4e <== NEVER TAKEN 4fa40: 2f0a movel %a2,%sp@- 4fa42: 4eb9 0004 7198 jsr 47198 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4fa48: 588f addql #4,%sp 4fa4a: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4fa4e: 302a 0032 movew %a2@(50),%d0 4fa52: 5380 subql #1,%d0 4fa54: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4fa58: 42a7 clrl %sp@- 4fa5a: 486e fff8 pea %fp@(-8) 4fa5e: 4eb9 0004 35bc jsr 435bc 4fa64: 256e fff8 0044 movel %fp@(-8),%a2@(68) return memfile_check_rmnod( the_jnode ); 4fa6a: 2f0a movel %a2,%sp@- 4fa6c: 4eb9 0004 f9da jsr 4f9da } 4fa72: 246e fff4 moveal %fp@(-12),%a2 4fa76: 4e5e unlk %fp <== NOT EXECUTED 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 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42486: 4eb9 0004 ca88 jsr 4ca88 <__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 <== NEVER TAKEN 424ac: 4a00 tstb %d0 424ae: 6622 bnes 424d2 <== ALWAYS TAKEN 424b0: 4878 0014 pea 14 424b4: 2079 0005 b5b4 moveal 5b5b4 ,%a0 424ba: 41e8 0018 lea %a0@(24),%a0 424be: 2f08 movel %a0,%sp@- 424c0: 486e ffe8 pea %fp@(-24) 424c4: 4eb9 0004 d2a8 jsr 4d2a8 424ca: 4fef 000c lea %sp@(12),%sp 424ce: 7001 moveq #1,%d0 424d0: 601e bras 424f0 424d2: 4878 0014 pea 14 424d6: 2039 0005 b5b4 movel 5b5b4 ,%d0 424dc: 5880 addql #4,%d0 424de: 2f00 movel %d0,%sp@- 424e0: 486e ffe8 pea %fp@(-24) 424e4: 4eb9 0004 d2a8 jsr 4d2a8 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 <== NEVER 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 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 <== ALWAYS 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 ca88 jsr 4ca88 <__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 <== NEVER 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 ... 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 ca88 jsr 4ca88 <__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 <== ALWAYS TAKEN errno = ENOTSUP; 425e4: 4eb9 0004 ca88 jsr 4ca88 <__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 <== NEVER TAKEN 425f6: 706c moveq #108,%d0 425f8: 6010 bras 4260a size += strlen( device ) + 1; 425fa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 425fc: 4eb9 0004 de54 jsr 4de54 <== 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 9484 jsr 49484 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 <== ALWAYS TAKEN errno = ENOMEM; 4261a: 4eb9 0004 ca88 jsr 4ca88 <__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 <== ALWAYS 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 da08 jsr 4da08 <== 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 de54 jsr 4de54 * 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 /* * 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 <== ALWAYS TAKEN errno = ENOTSUP; 42692: 4eb9 0004 ca88 jsr 4ca88 <__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 ca88 jsr 4ca88 <__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 cbe0 moveal 5cbe0 ,%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 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 cbe4 cmpal #379876,%a0 426da: 66f0 bnes 426cc 426dc: 6000 00be braw 4279c /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 426e0: 4eb9 0004 ca88 jsr 4ca88 <__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 * 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 ca88 jsr 4ca88 <__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 <== ALWAYS 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 <== ALWAYS 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 cbe0 pea 5cbe0 42756: 4eb9 0004 58d0 jsr 458d0 <_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 <== NEVER TAKEN *mt_entry = temp_mt_entry; 42762: 2a8a movel %a2,%a5@ 42764: 4281 clrl %d1 42766: 6028 bras 42790 42768: 97cb subal %a3,%a3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4276a: 2f03 movel %d3,%sp@- 4276c: 4eb9 0004 8f80 jsr 48f80 if ( loc_to_free ) 42772: 588f addql #4,%sp 42774: 4a8b tstl %a3 42776: 6716 beqs 4278e <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 42778: 206b 000c moveal %a3@(12),%a0 4277c: 4a88 tstl %a0 4277e: 670e beqs 4278e <== NEVER TAKEN 42780: 2068 001c moveal %a0@(28),%a0 42784: 4a88 tstl %a0 42786: 6706 beqs 4278e <== NEVER 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 427be: 6000 ff32 braw 426f2 <== NOT EXECUTED ... 0005a070 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 5a070: 4e56 fff4 linkw %fp,#-12 5a074: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5a078: 266e 0008 moveal %fp@(8),%a3 5a07c: 246e 000c moveal %fp@(12),%a2 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 5a080: 2f0b movel %a3,%sp@- 5a082: 4eb9 0005 a1c0 jsr 5a1c0 <_Timespec_Is_valid> 5a088: 588f addql #4,%sp 5a08a: 4a00 tstb %d0 5a08c: 670a beqs 5a098 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 5a08e: 4a93 tstl %a3@ 5a090: 6d06 blts 5a098 <== NEVER TAKEN 5a092: 4aab 0004 tstl %a3@(4) 5a096: 6c12 bges 5a0aa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 5a098: 4eb9 0004 cec8 jsr 4cec8 <__errno> 5a09e: 7416 moveq #22,%d2 5a0a0: 72ff moveq #-1,%d1 5a0a2: 2040 moveal %d0,%a0 5a0a4: 2082 movel %d2,%a0@ 5a0a6: 6000 00ce braw 5a176 ticks = _Timespec_To_ticks( rqtp ); 5a0aa: 2f0b movel %a3,%sp@- 5a0ac: 47f9 0004 70ea lea 470ea <_Thread_Enable_dispatch>,%a3 5a0b2: 4eb9 0004 ae04 jsr 4ae04 <_Timespec_To_ticks> * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 5a0b8: 588f addql #4,%sp * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 5a0ba: 2400 movel %d0,%d2 * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 5a0bc: 6628 bnes 5a0e6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 5a0be: 2039 0005 db40 movel 5db40 <_Thread_Dispatch_disable_level>,%d0 5a0c4: 5280 addql #1,%d0 5a0c6: 23c0 0005 db40 movel %d0,5db40 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _Thread_Yield_processor(); 5a0cc: 4eb9 0004 7cf4 jsr 47cf4 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 5a0d2: 4e93 jsr %a3@ if ( rmtp ) { 5a0d4: 4a8a tstl %a2 5a0d6: 6700 009c beqw 5a174 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 5a0da: 42aa 0004 clrl %a2@(4) 5a0de: 4281 clrl %d1 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 5a0e0: 4292 clrl %a2@ 5a0e2: 6000 0092 braw 5a176 5a0e6: 2039 0005 db40 movel 5db40 <_Thread_Dispatch_disable_level>,%d0 5a0ec: 5280 addql #1,%d0 5a0ee: 23c0 0005 db40 movel %d0,5db40 <_Thread_Dispatch_disable_level> /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 5a0f4: 2f3c 1000 0008 movel #268435464,%sp@- 5a0fa: 2f39 0005 dbfa movel 5dbfa <_Thread_Executing>,%sp@- 5a100: 4eb9 0004 7918 jsr 47918 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 5a106: 2079 0005 dbfa moveal 5dbfa <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 5a10c: 203c 0004 6f5c movel #290652,%d0 5a112: 2140 0064 movel %d0,%a0@(100) _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 5a116: 2028 0008 movel %a0@(8),%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5a11a: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; 5a11e: 2140 0068 movel %d0,%a0@(104) the_watchdog->user_data = user_data; 5a122: 42a8 006c clrl %a0@(108) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 5a126: 2142 0054 movel %d2,%a0@(84) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 5a12a: 4868 0048 pea %a0@(72) 5a12e: 4879 0005 dc18 pea 5dc18 <_Watchdog_Ticks_chain> 5a134: 4eb9 0004 80d8 jsr 480d8 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 5a13a: 4e93 jsr %a3@ /* calculate time remaining */ if ( rmtp ) { 5a13c: 4fef 0010 lea %sp@(16),%sp 5a140: 4a8a tstl %a2 5a142: 6730 beqs 5a174 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 5a144: 2079 0005 dbfa moveal 5dbfa <_Thread_Executing>,%a0 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 5a14a: 2028 005c movel %a0@(92),%d0 5a14e: 90a8 0060 subl %a0@(96),%d0 5a152: d480 addl %d0,%d2 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 5a154: 2f0a movel %a2,%sp@- 5a156: 2f02 movel %d2,%sp@- 5a158: 4eb9 0005 a184 jsr 5a184 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 5a15e: 508f addql #8,%sp 5a160: 4a82 tstl %d2 5a162: 6710 beqs 5a174 rtems_set_errno_and_return_minus_one( EINTR ); 5a164: 4eb9 0004 cec8 jsr 4cec8 <__errno> 5a16a: 72ff moveq #-1,%d1 5a16c: 2040 moveal %d0,%a0 5a16e: 7004 moveq #4,%d0 5a170: 2080 movel %d0,%a0@ 5a172: 6002 bras 5a176 5a174: 4281 clrl %d1 #endif } return 0; } 5a176: 2001 movel %d1,%d0 5a178: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5a17e: 4e5e unlk %fp ... 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 b680 movel 5b680 <_impure_ptr>,%d2 4286a: 6004 bras 42870 } else { ptr = deleted_task->libc_reent; 4286c: 242a 0106 movel %a2@(262),%d2 } if (ptr && ptr != _global_impure_ptr) { 42870: 4a82 tstl %d2 42872: 6722 beqs 42896 <== NEVER TAKEN 42874: b4b9 0005 ac98 cmpl 5ac98 <_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 d22e jsr 4d22e <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 4288a: 2f02 movel %d2,%sp@- 4288c: 4eb9 0004 7eb4 jsr 47eb4 <_Workspace_Free> 42892: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 42896: 42aa 0106 clrl %a2@(262) /* * 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 b680 clrl 5b680 <_impure_ptr> } } 428a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 428aa: 4e5e unlk %fp <== NOT EXECUTED 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 ce1c jsr 4ce1c 428c0: 588f addql #4,%sp 428c2: 7202 moveq #2,%d1 428c4: b280 cmpl %d0,%d1 428c6: 652a bcss 428f2 <== NEVER 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 <== ALWAYS TAKEN free( fp->_bf._base ); 428d2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 428d6: 4eb9 0004 8f80 jsr 48f80 <== 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 cbc6 jsr 4cbc6 <== 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 <== NOT EXECUTED 000427f8 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 427f8: 4e56 0000 linkw %fp,#0 427fc: 2f02 movel %d2,%sp@- 427fe: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 42802: 4a39 0005 d67c tstb 5d67c 42808: 662e bnes 42838 initialized = 1; status = rtems_io_register_name( 4280a: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 4280c: 7001 moveq #1,%d0 status = rtems_io_register_name( 4280e: 2f02 movel %d2,%sp@- 42810: 4879 0005 b1d4 pea 5b1d4 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 42816: 13c0 0005 d67c moveb %d0,5d67c status = rtems_io_register_name( 4281c: 4eb9 0004 2918 jsr 42918 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 42822: 4fef 000c lea %sp@(12),%sp 42826: 4a80 tstl %d0 42828: 6708 beqs 42832 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); 4282a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4282c: 4eb9 0004 60a8 jsr 460a8 <== NOT EXECUTED NULL_major = major; 42832: 23c2 0005 dea0 movel %d2,5dea0 } return RTEMS_SUCCESSFUL; } 42838: 242e fffc movel %fp@(-4),%d2 4283c: 4280 clrl %d0 4283e: 4e5e unlk %fp ... 000427d6 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 427d6: 4e56 0000 linkw %fp,#0 427da: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 427de: 4a88 tstl %a0 427e0: 6706 beqs 427e8 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 427e2: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED return NULL_SUCCESSFUL; } 427e8: 4280 clrl %d0 427ea: 4e5e unlk %fp <== NOT EXECUTED 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 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 9314 jsr 49314 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 /* * 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 de54 movel #319060,%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 ca88 lea 4ca88 <__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 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 <== ALWAYS TAKEN rc = errno; 42bb8: 4e94 jsr %a4@ 42bba: 97cb subal %a3,%a3 42bbc: 6000 009c braw 42c5a 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 <== ALWAYS 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 * 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 93b4 jsr 493b4 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 d2a8 jsr 4d2a8 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 42c3a: 2050 moveal %a0@,%a0 42c3c: 4a88 tstl %a0 42c3e: 6700 00c0 beqw 42d00 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 ca88 jsr 4ca88 <__errno> 42c5a: 2040 moveal %d0,%a0 42c5c: 2410 movel %a0@,%d2 goto done; 42c5e: 6052 bras 42cb2 /* * 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 cba8 subl 5cba8 ,%d0 42c72: ec80 asrl #6,%d0 42c74: 42a7 clrl %sp@- 42c76: 2f00 movel %d0,%sp@- 42c78: 4eb9 0004 9008 jsr 49008 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 <== ALWAYS TAKEN if(errno) rc = errno; 42c86: 47f9 0004 ca88 lea 4ca88 <__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 cba8 subl 5cba8 ,%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 8eec jsr 48eec <== NOT EXECUTED 42cb0: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 42cb2: 4a82 tstl %d2 42cb4: 6736 beqs 42cec <== NEVER TAKEN if ( iop ) 42cb6: 4a8a tstl %a2 42cb8: 670a beqs 42cc4 <== NEVER TAKEN rtems_libio_free( iop ); 42cba: 2f0a movel %a2,%sp@- 42cbc: 4eb9 0004 92b6 jsr 492b6 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 <== NEVER TAKEN 42cd0: 2068 001c moveal %a0@(28),%a0 42cd4: 4a88 tstl %a0 42cd6: 6706 beqs 42cde <== NEVER 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 ca88 jsr 4ca88 <__errno> 42ce4: 2040 moveal %d0,%a0 42ce6: 70ff moveq #-1,%d0 42ce8: 2082 movel %d2,%a0@ 42cea: 600a bras 42cf6 } return iop - rtems_libio_iops; 42cec: 200a movel %a2,%d0 42cee: 90b9 0005 cba8 subl 5cba8 ,%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 9ecc pea 59ecc 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 9ecc pea 59ecc 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 <== ALWAYS 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 9ecc pea 59ecc 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 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 42afa: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 42b00: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED } 42b06: 246e fffc moveal %fp@(-4),%a2 42b0a: 4e5e unlk %fp ... 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 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 <== ALWAYS 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 434a2: 602c bras 434d0 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 434a4: 0800 0005 btst #5,%d0 434a8: 6704 beqs 434ae <== ALWAYS 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 rtems_termios_puts ("\r", 1, tty); 434b8: 2f0a movel %a2,%sp@- 434ba: 4878 0001 pea 1 434be: 4879 0005 a3e0 pea 5a3e0 434c4: 4eb9 0004 335e jsr 4335e tty->column = 0; 434ca: 4fef 000c lea %sp@(12),%sp 434ce: 6020 bras 434f0 } 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 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 <== NEVER 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 a3e2 pea 5a3e2 43524: 6066 bras 4358c 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 <== ALWAYS 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 b67c moveal 5b67c <__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 b67c moveal 5b67c <__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 <== NEVER 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 <== NOT EXECUTED 0004c1e4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4c1e4: 4e56 ffd0 linkw %fp,#-48 4c1e8: 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) 4c1ec: 4878 0001 pea 1 4c1f0: 240e movel %fp,%d2 4c1f2: 0682 ffff ffdc addil #-36,%d2 4c1f8: 2f02 movel %d2,%sp@- 4c1fa: 4878 0007 pea 7 4c1fe: 4878 0003 pea 3 4c202: 4879 0005 aa90 pea 5aa90 <__FUNCTION__.5853+0x11> * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4c208: 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) 4c20c: 4eb9 0004 223e jsr 4223e 4c212: 4fef 0014 lea %sp@(20),%sp 4c216: 4a80 tstl %d0 4c218: 672a beqs 4c244 <== NEVER TAKEN != 0) { if (errno != ENOENT) 4c21a: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4c220: 7202 moveq #2,%d1 4c222: 2040 moveal %d0,%a0 4c224: b290 cmpl %a0@,%d1 4c226: 6600 010e bnew 4c336 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4c22a: 4878 03ff pea 3ff 4c22e: 4879 0005 aa90 pea 5aa90 <__FUNCTION__.5853+0x11> 4c234: 4eb9 0004 244c jsr 4244c 4c23a: 508f addql #8,%sp 4c23c: 4a80 tstl %d0 4c23e: 671a beqs 4c25a <== ALWAYS TAKEN 4c240: 6000 00f4 braw 4c336 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 4c244: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4c248: 4a88 tstl %a0 <== NOT EXECUTED 4c24a: 670e beqs 4c25a <== NOT EXECUTED 4c24c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c250: 4a88 tstl %a0 <== NOT EXECUTED 4c252: 6706 beqs 4c25a <== NOT EXECUTED 4c254: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c256: 4e90 jsr %a0@ <== NOT EXECUTED 4c258: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4c25a: 4878 000a pea a 4c25e: 240e movel %fp,%d2 4c260: 4879 0005 aa95 pea 5aa95 <__FUNCTION__.5853+0x16> 4c266: 0682 ffff fff1 addil #-15,%d2 4c26c: 2f02 movel %d2,%sp@- 4c26e: 4eb9 0004 d2a8 jsr 4d2a8 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4c274: 3039 0005 c4bc movew 5c4bc ,%d0 4c27a: 2200 movel %d0,%d1 4c27c: 5281 addql #1,%d1 4c27e: 3f00 movew %d0,%sp@- 4c280: 33c1 0005 c4bc movew %d1,5c4bc 4c286: 4267 clrw %sp@- 4c288: 4879 0005 aaa0 pea 5aaa0 <__FUNCTION__.5853+0x21> 4c28e: 486e fffb pea %fp@(-5) 4c292: 4eb9 0004 d780 jsr 4d780 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4c298: 4878 0180 pea 180 4c29c: 2f02 movel %d2,%sp@- 4c29e: 4eb9 0004 c398 jsr 4c398 4c2a4: 4fef 0020 lea %sp@(32),%sp 4c2a8: 4a80 tstl %d0 4c2aa: 670a beqs 4c2b6 <== ALWAYS TAKEN if (errno != EEXIST){ 4c2ac: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 4c2b2: 6000 0082 braw 4c336 <== 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); 4c2b6: 4878 4000 pea 4000 4c2ba: 2f02 movel %d2,%sp@- 4c2bc: 4eb9 0004 2b10 jsr 42b10 if (filsdes[0] < 0) { 4c2c2: 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); 4c2c4: 2480 movel %d0,%a2@ if (filsdes[0] < 0) { 4c2c6: 6c0e bges 4c2d6 <== NEVER TAKEN err = errno; 4c2c8: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4c2ce: 2040 moveal %d0,%a0 4c2d0: 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); 4c2d2: 2f02 movel %d2,%sp@- 4c2d4: 604e bras 4c324 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4c2d6: b0b9 0005 b4a4 cmpl 5b4a4 ,%d0 <== NOT EXECUTED 4c2dc: 6504 bcss 4c2e2 <== NOT EXECUTED 4c2de: 91c8 subal %a0,%a0 <== NOT EXECUTED 4c2e0: 600a bras 4c2ec <== NOT EXECUTED 4c2e2: 2079 0005 cba8 moveal 5cba8 ,%a0 <== NOT EXECUTED 4c2e8: ed88 lsll #6,%d0 <== NOT EXECUTED 4c2ea: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4c2ec: 70fe moveq #-2,%d0 <== NOT EXECUTED 4c2ee: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4c2f2: 4878 0001 pea 1 <== NOT EXECUTED 4c2f6: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4c2fa: 4eb9 0004 2b10 jsr 42b10 <== NOT EXECUTED if (filsdes[1] < 0) { 4c300: 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); 4c302: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4c306: 6d04 blts 4c30c <== NOT EXECUTED 4c308: 4283 clrl %d3 <== NOT EXECUTED 4c30a: 6014 bras 4c320 <== NOT EXECUTED err = errno; 4c30c: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 4c312: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c314: 2610 movel %a0@,%d3 <== NOT EXECUTED close(filsdes[0]); 4c316: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c318: 4eb9 0004 8eec jsr 48eec <== NOT EXECUTED 4c31e: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4c320: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4c324: 4eb9 0004 c3b8 jsr 4c3b8 4c32a: 588f addql #4,%sp } rtems_set_errno_and_return_minus_one(err); 4c32c: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4c332: 2040 moveal %d0,%a0 4c334: 2083 movel %d3,%a0@ } 4c336: 70ff moveq #-1,%d0 4c338: 4cee 040c ffd0 moveml %fp@(-48),%d2-%d3/%a2 4c33e: 4e5e unlk %fp ... 0004afdc : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4afdc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4afe0: 2f0b movel %a3,%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4afe2: 47f9 0004 bb68 lea 4bb68 ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4afe8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4afea: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4afee: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4aff2: 4e93 jsr %a3@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4aff4: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4aff8: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4affa: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4affe: 4eb9 0004 4e94 jsr 44e94 <== NOT EXECUTED free(pipe->Buffer); 4b004: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4b006: 4eb9 0004 8f80 jsr 48f80 <== NOT EXECUTED free(pipe); } 4b00c: 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); 4b010: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b014: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } 4b018: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4b01c: 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); 4b01e: 4ef9 0004 8f80 jmp 48f80 <== NOT EXECUTED 0004ac86 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4ac86: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 4ac8a: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4ac90: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4ac92: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED 4ac96: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ac98: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED if (cmd == FIONREAD) { 4ac9c: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4aca0: 6704 beqs 4aca6 <== NOT EXECUTED 4aca2: 70ea moveq #-22,%d0 <== NOT EXECUTED 4aca4: 6034 bras 4acda <== NOT EXECUTED if (buffer == NULL) 4aca6: 4a8b tstl %a3 <== NOT EXECUTED 4aca8: 6604 bnes 4acae <== NOT EXECUTED 4acaa: 70f2 moveq #-14,%d0 <== NOT EXECUTED 4acac: 602c bras 4acda <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4acae: 42a7 clrl %sp@- <== NOT EXECUTED 4acb0: 42a7 clrl %sp@- <== NOT EXECUTED 4acb2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4acb6: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4acbc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4acc0: 4a80 tstl %d0 <== NOT EXECUTED 4acc2: 6704 beqs 4acc8 <== NOT EXECUTED 4acc4: 70fc moveq #-4,%d0 <== NOT EXECUTED 4acc6: 6012 bras 4acda <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4acc8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4accc: 26aa 000c movel %a2@(12),%a3@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 4acd0: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return 0; 4acd6: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4acd8: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 4acda: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4acde: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 4ace2: 4e5e unlk %fp <== NOT EXECUTED 0004ac2c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4ac2c: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 4ac2e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 4ac32: 4e5e unlk %fp <== NOT EXECUTED 0004ace6 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4ace6: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4acea: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4acee: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4acf0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4acf4: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED 4acfa: 42a7 clrl %sp@- <== NOT EXECUTED 4acfc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4ad00: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED 4ad04: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED 4ad08: 2e2e 0014 movel %fp@(20),%d7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4ad0c: 4e93 jsr %a3@ <== NOT EXECUTED 4ad0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ad12: 4a80 tstl %d0 <== NOT EXECUTED 4ad14: 6706 beqs 4ad1c <== NOT EXECUTED 4ad16: 74fc moveq #-4,%d2 <== NOT EXECUTED 4ad18: 6000 0128 braw 4ae42 <== NOT EXECUTED 4ad1c: 4282 clrl %d2 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4ad1e: 2c3c 0004 5034 movel #282676,%d6 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4ad24: 4bf9 0004 bc38 lea 4bc38 ,%a5 <== NOT EXECUTED 4ad2a: 6000 00fc braw 4ae28 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4ad2e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4ad32: 6700 00fa beqw 4ae2e <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4ad36: 7001 moveq #1,%d0 <== NOT EXECUTED 4ad38: 2047 moveal %d7,%a0 <== NOT EXECUTED 4ad3a: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4ad3e: 6706 beqs 4ad46 <== NOT EXECUTED 4ad40: 78f5 moveq #-11,%d4 <== NOT EXECUTED 4ad42: 6000 00ec braw 4ae30 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4ad46: 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 ++; 4ad4a: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4ad4e: 2246 moveal %d6,%a1 <== NOT EXECUTED 4ad50: 4e91 jsr %a1@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4ad52: 42a7 clrl %sp@- <== NOT EXECUTED 4ad54: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4ad58: 4e95 jsr %a5@ <== NOT EXECUTED 4ad5a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ad5e: 4a80 tstl %d0 <== NOT EXECUTED 4ad60: 6602 bnes 4ad64 <== NOT EXECUTED 4ad62: 4284 clrl %d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4ad64: 42a7 clrl %sp@- <== NOT EXECUTED 4ad66: 42a7 clrl %sp@- <== NOT EXECUTED 4ad68: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ad6c: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4ad72: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ad76: 4a80 tstl %d0 <== NOT EXECUTED 4ad78: 6706 beqs 4ad80 <== NOT EXECUTED 4ad7a: 78fc moveq #-4,%d4 <== NOT EXECUTED 4ad7c: 6000 00be braw 4ae3c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4ad80: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4ad84: 4a84 tstl %d4 <== NOT EXECUTED 4ad86: 6600 00a8 bnew 4ae30 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4ad8a: 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)) 4ad8e: 78fc moveq #-4,%d4 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4ad90: 4a83 tstl %d3 <== NOT EXECUTED 4ad92: 679a beqs 4ad2e <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4ad94: 2005 movel %d5,%d0 <== NOT EXECUTED 4ad96: 9082 subl %d2,%d0 <== NOT EXECUTED 4ad98: b083 cmpl %d3,%d0 <== NOT EXECUTED 4ad9a: 6402 bccs 4ad9e <== NOT EXECUTED 4ad9c: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4ad9e: 206a 0008 moveal %a2@(8),%a0 <== NOT EXECUTED 4ada2: 200c movel %a4,%d0 <== NOT EXECUTED 4ada4: d082 addl %d2,%d0 <== NOT EXECUTED 4ada6: 47f9 0004 d2a8 lea 4d2a8 ,%a3 <== NOT EXECUTED 4adac: 2212 movel %a2@,%d1 <== NOT EXECUTED 4adae: d288 addl %a0,%d1 <== NOT EXECUTED 4adb0: 226a 0004 moveal %a2@(4),%a1 <== NOT EXECUTED 4adb4: 93c8 subal %a0,%a1 <== NOT EXECUTED if (chunk > chunk1) { 4adb6: b3c3 cmpal %d3,%a1 <== NOT EXECUTED 4adb8: 6c28 bges 4ade2 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4adba: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4adbc: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4adbe: 2d49 fff8 movel %a1,%fp@(-8) <== NOT EXECUTED 4adc2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4adc4: 4e93 jsr %a3@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4adc6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4adca: 2203 movel %d3,%d1 <== NOT EXECUTED 4adcc: 9288 subl %a0,%d1 <== NOT EXECUTED 4adce: 2002 movel %d2,%d0 <== NOT EXECUTED 4add0: d088 addl %a0,%d0 <== NOT EXECUTED 4add2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4add4: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4add6: 4874 0800 pea %a4@(00000000,%d0:l) <== NOT EXECUTED 4adda: 4e93 jsr %a3@ <== NOT EXECUTED 4addc: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4ade0: 600c bras 4adee <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4ade2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ade4: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ade6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ade8: 4e93 jsr %a3@ <== NOT EXECUTED 4adea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4adee: 2203 movel %d3,%d1 <== NOT EXECUTED 4adf0: d2aa 0008 addl %a2@(8),%d1 <== NOT EXECUTED pipe->Start %= pipe->Size; pipe->Length -= chunk; 4adf4: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 4adf8: 9083 subl %d3,%d0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4adfa: 4c6a 1004 0004 remul %a2@(4),%d4,%d1 <== NOT EXECUTED pipe->Length -= chunk; 4ae00: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4ae04: 2544 0008 movel %d4,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4ae08: 4a80 tstl %d0 <== NOT EXECUTED 4ae0a: 6604 bnes 4ae10 <== NOT EXECUTED pipe->Start = 0; 4ae0c: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4ae10: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4ae14: 6710 beqs 4ae26 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4ae16: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4ae1a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4ae1e: 4eb9 0004 bbd4 jsr 4bbd4 <== NOT EXECUTED 4ae24: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4ae26: d483 addl %d3,%d2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4ae28: ba82 cmpl %d2,%d5 <== NOT EXECUTED 4ae2a: 6200 ff5e bhiw 4ad8a <== NOT EXECUTED 4ae2e: 4284 clrl %d4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4ae30: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ae34: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 4ae3a: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4ae3c: 4a82 tstl %d2 <== NOT EXECUTED 4ae3e: 6e02 bgts 4ae42 <== NOT EXECUTED 4ae40: 2404 movel %d4,%d2 <== NOT EXECUTED return read; return ret; } 4ae42: 2002 movel %d2,%d0 <== NOT EXECUTED 4ae44: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ae4a: 4e5e unlk %fp <== NOT EXECUTED 0004b024 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b024: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 4b028: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4b02c: 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, 4b030: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4b032: 2453 moveal %a3@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4b034: 42a7 clrl %sp@- <== NOT EXECUTED 4b036: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b03a: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4b040: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b044: 4a80 tstl %d0 <== NOT EXECUTED 4b046: 6634 bnes 4b07c <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4b048: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4b04c: 7406 moveq #6,%d2 <== NOT EXECUTED 4b04e: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4b052: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4b056: 6704 beqs 4b05c <== NOT EXECUTED pipe->Readers --; 4b058: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4b05c: 44c2 movew %d2,%ccr <== NOT EXECUTED 4b05e: 6604 bnes 4b064 <== NOT EXECUTED pipe->Writers --; 4b060: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4b064: 42a7 clrl %sp@- <== NOT EXECUTED 4b066: 42a7 clrl %sp@- <== NOT EXECUTED 4b068: 2f39 0005 c4b4 movel 5c4b4 ,%sp@- <== NOT EXECUTED 4b06e: 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) 4b074: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b078: 4a80 tstl %d0 <== NOT EXECUTED 4b07a: 6708 beqs 4b084 <== NOT EXECUTED rtems_fatal_error_occurred(sc); 4b07c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b07e: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED PIPE_UNLOCK(pipe); 4b084: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b088: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4b08e: 588f addql #4,%sp <== NOT EXECUTED 4b090: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b094: 6622 bnes 4b0b8 <== NOT EXECUTED 4b096: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b09a: 660c bnes 4b0a8 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 4b09c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b09e: 4eba ff3c jsr %pc@(4afdc ) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4b0a2: 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; 4b0a4: 4293 clrl %a3@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4b0a6: 602c bras 4b0d4 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4b0a8: 7004 moveq #4,%d0 <== NOT EXECUTED 4b0aa: b082 cmpl %d2,%d0 <== NOT EXECUTED 4b0ac: 670a beqs 4b0b8 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4b0ae: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b0b2: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b0b6: 6014 bras 4b0cc <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4b0b8: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b0bc: 6616 bnes 4b0d4 <== NOT EXECUTED 4b0be: 7002 moveq #2,%d0 <== NOT EXECUTED 4b0c0: b082 cmpl %d2,%d0 <== NOT EXECUTED 4b0c2: 6710 beqs 4b0d4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b0c4: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b0c8: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b0cc: 4eb9 0004 bbd4 jsr 4bbd4 <== NOT EXECUTED 4b0d2: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4b0d4: 2f39 0005 c4b4 movel 5c4b4 ,%sp@- <== NOT EXECUTED 4b0da: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4b0e0: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4b0e6: 4280 clrl %d0 <== NOT EXECUTED 4b0e8: 4e5e unlk %fp <== NOT EXECUTED 0004ae4e : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4ae4e: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4ae52: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4ae56: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4ae5a: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED 4ae5e: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4ae62: 6606 bnes 4ae6a <== NOT EXECUTED 4ae64: 4282 clrl %d2 <== NOT EXECUTED 4ae66: 6000 0168 braw 4afd0 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 4ae6a: 42a7 clrl %sp@- <== NOT EXECUTED 4ae6c: 42a7 clrl %sp@- <== NOT EXECUTED 4ae6e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ae72: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4ae78: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ae7c: 4a80 tstl %d0 <== NOT EXECUTED 4ae7e: 6706 beqs 4ae86 <== NOT EXECUTED 4ae80: 74fc moveq #-4,%d2 <== NOT EXECUTED 4ae82: 6000 014c braw 4afd0 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4ae86: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4ae8a: 6608 bnes 4ae94 <== NOT EXECUTED 4ae8c: 76e0 moveq #-32,%d3 <== NOT EXECUTED 4ae8e: 4282 clrl %d2 <== NOT EXECUTED 4ae90: 6000 0112 braw 4afa4 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4ae94: b8aa 0004 cmpl %a2@(4),%d4 <== NOT EXECUTED 4ae98: 6304 blss 4ae9e <== NOT EXECUTED 4ae9a: 7c01 moveq #1,%d6 <== NOT EXECUTED 4ae9c: 6002 bras 4aea0 <== NOT EXECUTED 4ae9e: 2c04 movel %d4,%d6 <== NOT EXECUTED 4aea0: 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)) 4aea2: 4bf9 0004 bc38 lea 4bc38 ,%a5 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4aea8: 49f9 0004 4f30 lea 44f30 ,%a4 <== NOT EXECUTED 4aeae: 6000 00ec braw 4af9c <== 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)) { 4aeb2: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4aeb6: 7001 moveq #1,%d0 <== NOT EXECUTED 4aeb8: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4aebc: 6706 beqs 4aec4 <== NOT EXECUTED 4aebe: 76f5 moveq #-11,%d3 <== NOT EXECUTED 4aec0: 6000 00e2 braw 4afa4 <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4aec4: 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 ++; 4aec8: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4aecc: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4aed2: 42a7 clrl %sp@- <== NOT EXECUTED 4aed4: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4aed8: 4e95 jsr %a5@ <== NOT EXECUTED 4aeda: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4aede: 4a80 tstl %d0 <== NOT EXECUTED 4aee0: 6602 bnes 4aee4 <== NOT EXECUTED 4aee2: 4283 clrl %d3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4aee4: 42a7 clrl %sp@- <== NOT EXECUTED 4aee6: 42a7 clrl %sp@- <== NOT EXECUTED 4aee8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4aeec: 4e94 jsr %a4@ <== NOT EXECUTED 4aeee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4aef2: 4a80 tstl %d0 <== NOT EXECUTED 4aef4: 6706 beqs 4aefc <== NOT EXECUTED 4aef6: 76fc moveq #-4,%d3 <== NOT EXECUTED 4aef8: 6000 00d0 braw 4afca <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4aefc: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 4af00: 4a83 tstl %d3 <== NOT EXECUTED 4af02: 6600 00a0 bnew 4afa4 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4af06: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4af0a: 6606 bnes 4af12 <== NOT EXECUTED 4af0c: 76e0 moveq #-32,%d3 <== NOT EXECUTED 4af0e: 6000 0094 braw 4afa4 <== 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) { 4af12: 2a2a 0004 movel %a2@(4),%d5 <== NOT EXECUTED 4af16: 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)) 4af18: 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) { 4af1a: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 4af1e: 9088 subl %a0,%d0 <== NOT EXECUTED 4af20: bc80 cmpl %d0,%d6 <== NOT EXECUTED 4af22: 628e bhis 4aeb2 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4af24: 2600 movel %d0,%d3 <== NOT EXECUTED 4af26: 2004 movel %d4,%d0 <== NOT EXECUTED 4af28: 9082 subl %d2,%d0 <== NOT EXECUTED 4af2a: b083 cmpl %d3,%d0 <== NOT EXECUTED 4af2c: 6402 bccs 4af30 <== NOT EXECUTED 4af2e: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4af30: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED 4af34: 220b movel %a3,%d1 <== NOT EXECUTED 4af36: 2e08 movel %a0,%d7 <== NOT EXECUTED 4af38: 2c3c 0004 d2a8 movel #316072,%d6 <== NOT EXECUTED 4af3e: d282 addl %d2,%d1 <== NOT EXECUTED 4af40: 4c45 7000 remul %d5,%d0,%d7 <== NOT EXECUTED 4af44: 9a80 subl %d0,%d5 <== NOT EXECUTED 4af46: d092 addl %a2@,%d0 <== NOT EXECUTED if (chunk > chunk1) { 4af48: ba83 cmpl %d3,%d5 <== NOT EXECUTED 4af4a: 6c24 bges 4af70 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4af4c: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4af4e: 2046 moveal %d6,%a0 <== NOT EXECUTED 4af50: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4af52: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4af54: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4af56: 2203 movel %d3,%d1 <== NOT EXECUTED 4af58: 9285 subl %d5,%d1 <== NOT EXECUTED 4af5a: 2005 movel %d5,%d0 <== NOT EXECUTED 4af5c: d082 addl %d2,%d0 <== NOT EXECUTED 4af5e: 2046 moveal %d6,%a0 <== NOT EXECUTED 4af60: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4af62: 4873 0800 pea %a3@(00000000,%d0:l) <== NOT EXECUTED 4af66: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4af68: 4e90 jsr %a0@ <== NOT EXECUTED 4af6a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4af6e: 600e bras 4af7e <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4af70: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4af72: 2046 moveal %d6,%a0 <== NOT EXECUTED 4af74: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4af76: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4af78: 4e90 jsr %a0@ <== NOT EXECUTED 4af7a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4af7e: d7aa 000c addl %d3,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4af82: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4af86: 6710 beqs 4af98 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4af88: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4af8c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4af90: 4eb9 0004 bbd4 jsr 4bbd4 <== NOT EXECUTED 4af96: 508f addql #8,%sp <== NOT EXECUTED written += chunk; 4af98: d483 addl %d3,%d2 <== NOT EXECUTED 4af9a: 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) { 4af9c: b882 cmpl %d2,%d4 <== NOT EXECUTED 4af9e: 6200 ff72 bhiw 4af12 <== NOT EXECUTED 4afa2: 4283 clrl %d3 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4afa4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4afa8: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 4afae: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4afb0: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4afb2: b083 cmpl %d3,%d0 <== NOT EXECUTED 4afb4: 6614 bnes 4afca <== NOT EXECUTED kill(getpid(), SIGPIPE); 4afb6: 4eb9 0004 b788 jsr 4b788 <== NOT EXECUTED 4afbc: 4878 000d pea d <== NOT EXECUTED 4afc0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4afc2: 4eb9 0004 b888 jsr 4b888 <== NOT EXECUTED 4afc8: 508f addql #8,%sp <== NOT EXECUTED #endif if (written > 0) 4afca: 4a82 tstl %d2 <== NOT EXECUTED 4afcc: 6e02 bgts 4afd0 <== NOT EXECUTED 4afce: 2403 movel %d3,%d2 <== NOT EXECUTED return written; return ret; } 4afd0: 2002 movel %d2,%d0 <== NOT EXECUTED 4afd2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4afd8: 4e5e unlk %fp <== NOT EXECUTED 0004635c : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 4635c: 4e56 0000 linkw %fp,#0 46360: 202e 000c movel %fp@(12),%d0 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46364: 2200 movel %d0,%d1 46366: 5381 subql #1,%d1 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 46368: 52b9 0006 1f38 addql #1,61f38 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 4636e: c280 andl %d0,%d1 46370: 6610 bnes 46382 <== NEVER TAKEN 46372: 123c 0003 moveb #3,%d1 46376: b280 cmpl %d0,%d1 46378: 6408 bccs 46382 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 4637a: 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 ); 4637c: 4ef9 0004 6498 jmp 46498 } 46382: 7016 moveq #22,%d0 46384: 4e5e unlk %fp <== NOT EXECUTED 00049160 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 49160: 4e56 0000 linkw %fp,#0 49164: 206e 0008 moveal %fp@(8),%a0 49168: 222e 000c movel %fp@(12),%d1 4916c: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 4916e: 4a88 tstl %a0 49170: 6726 beqs 49198 49172: 4a90 tstl %a0@ 49174: 6722 beqs 49198 return EINVAL; switch ( policy ) { 49176: 7004 moveq #4,%d0 49178: b081 cmpl %d1,%d0 4917a: 650c bcss 49188 4917c: 103c 0001 moveb #1,%d0 49180: 7417 moveq #23,%d2 49182: e3a8 lsll %d1,%d0 49184: c082 andl %d2,%d0 49186: 6608 bnes 49190 <== ALWAYS TAKEN 49188: 203c 0000 0086 movel #134,%d0 4918e: 600a bras 4919a case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 49190: 2141 0014 movel %d1,%a0@(20) 49194: 4280 clrl %d0 return 0; 49196: 6002 bras 4919a 49198: 7016 moveq #22,%d0 default: return ENOTSUP; } } 4919a: 241f movel %sp@+,%d2 4919c: 4e5e unlk %fp <== NOT EXECUTED 000452b4 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 452b4: 4e56 ffe0 linkw %fp,#-32 452b8: 206e 000c moveal %fp@(12),%a0 452bc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 452c0: 266e 0008 moveal %fp@(8),%a3 452c4: 246e 0010 moveal %fp@(16),%a2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 452c8: 4a8b tstl %a3 452ca: 6700 008e beqw 4535a return EINVAL; if ( count == 0 ) 452ce: 4a8a tstl %a2 452d0: 6700 0088 beqw 4535a return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 452d4: 4a88 tstl %a0 452d6: 6614 bnes 452ec the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 452d8: 240e movel %fp,%d2 452da: 0682 ffff fff0 addil #-16,%d2 452e0: 2f02 movel %d2,%sp@- 452e2: 4eb9 0004 51f8 jsr 451f8 452e8: 588f addql #4,%sp 452ea: 2042 moveal %d2,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 452ec: 4a90 tstl %a0@ 452ee: 676a beqs 4535a return EINVAL; switch ( the_attr->process_shared ) { 452f0: 4aa8 0004 tstl %a0@(4) 452f4: 6664 bnes 4535a <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 452f6: 2039 0005 e1dc movel 5e1dc <_Thread_Dispatch_disable_level>,%d0 452fc: 5280 addql #1,%d0 /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 452fe: 2d4a fffc movel %a2,%fp@(-4) 45302: 23c0 0005 e1dc movel %d0,5e1dc <_Thread_Dispatch_disable_level> } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 45308: 42ae fff8 clrl %fp@(-8) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 4530c: 4879 0005 e51e pea 5e51e <_POSIX_Barrier_Information> 45312: 45f9 0004 7ca2 lea 47ca2 <_Thread_Enable_dispatch>,%a2 45318: 4eb9 0004 70cc jsr 470cc <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 4531e: 588f addql #4,%sp 45320: 2840 moveal %d0,%a4 45322: 4a80 tstl %d0 45324: 6606 bnes 4532c _Thread_Enable_dispatch(); 45326: 4e92 jsr %a2@ 45328: 700b moveq #11,%d0 return EAGAIN; 4532a: 6030 bras 4535c } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4532c: 486e fff8 pea %fp@(-8) 45330: 486c 0010 pea %a4@(16) 45334: 4eb9 0004 6868 jsr 46868 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4533a: 202c 0008 movel %a4@(8),%d0 4533e: 4281 clrl %d1 45340: 2079 0005 e536 moveal 5e536 <_POSIX_Barrier_Information+0x18>,%a0 45346: 3200 movew %d0,%d1 45348: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 4534c: 42ac 000c clrl %a4@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 45350: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 45352: 4e92 jsr %a2@ return 0; 45354: 508f addql #8,%sp /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); 45356: 4280 clrl %d0 return 0; 45358: 6002 bras 4535c 4535a: 7016 moveq #22,%d0 } 4535c: 4cee 1c04 ffe0 moveml %fp@(-32),%d2/%a2-%a4 45362: 4e5e unlk %fp ... 00044cf8 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 44cf8: 4e56 0000 linkw %fp,#0 44cfc: 2f03 movel %d3,%sp@- 44cfe: 262e 000c movel %fp@(12),%d3 44d02: 2f02 movel %d2,%sp@- 44d04: 242e 0008 movel %fp@(8),%d2 /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 44d08: 6754 beqs 44d5e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44d0a: 2039 0005 dc44 movel 5dc44 <_Thread_Dispatch_disable_level>,%d0 44d10: 5280 addql #1,%d0 44d12: 23c0 0005 dc44 movel %d0,5dc44 <_Thread_Dispatch_disable_level> return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 44d18: 4878 0010 pea 10 44d1c: 4eb9 0004 8974 jsr 48974 <_Workspace_Allocate> if ( handler ) { 44d22: 588f addql #4,%sp 44d24: 4a80 tstl %d0 44d26: 6726 beqs 44d4e <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 44d28: 2079 0005 dcfe moveal 5dcfe <_Thread_Executing>,%a0 44d2e: 2228 010e movel %a0@(270),%d1 handler->routine = routine; 44d32: 2040 moveal %d0,%a0 handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 44d34: 0681 0000 00e0 addil #224,%d1 handler->routine = routine; 44d3a: 2142 0008 movel %d2,%a0@(8) handler->arg = arg; 44d3e: 2143 000c movel %d3,%a0@(12) _Chain_Append( handler_stack, &handler->Node ); 44d42: 2f00 movel %d0,%sp@- 44d44: 2f01 movel %d1,%sp@- 44d46: 4eb9 0004 6388 jsr 46388 <_Chain_Append> 44d4c: 508f addql #8,%sp } _Thread_Enable_dispatch(); } 44d4e: 242e fff8 movel %fp@(-8),%d2 44d52: 262e fffc movel %fp@(-4),%d3 44d56: 4e5e unlk %fp handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 44d58: 4ef9 0004 772a jmp 4772a <_Thread_Enable_dispatch> } 44d5e: 242e fff8 movel %fp@(-8),%d2 44d62: 262e fffc movel %fp@(-4),%d3 44d66: 4e5e unlk %fp ... 00045a40 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 45a40: 4e56 fff4 linkw %fp,#-12 45a44: 202e 000c movel %fp@(12),%d0 45a48: 48d7 1c00 moveml %a2-%a4,%sp@ POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 45a4c: 45f9 0005 c91c lea 5c91c <_POSIX_Condition_variables_Default_attributes>,%a2 45a52: 4a80 tstl %d0 45a54: 6702 beqs 45a58 45a56: 2440 moveal %d0,%a2 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 45a58: 7001 moveq #1,%d0 45a5a: b0aa 0004 cmpl %a2@(4),%d0 45a5e: 6776 beqs 45ad6 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 45a60: 4a92 tstl %a2@ 45a62: 6772 beqs 45ad6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45a64: 2039 0005 f248 movel 5f248 <_Thread_Dispatch_disable_level>,%d0 45a6a: 5280 addql #1,%d0 45a6c: 23c0 0005 f248 movel %d0,5f248 <_Thread_Dispatch_disable_level> */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 45a72: 4879 0005 f616 pea 5f616 <_POSIX_Condition_variables_Information> 45a78: 47f9 0004 89a6 lea 489a6 <_Thread_Enable_dispatch>,%a3 45a7e: 4eb9 0004 7dd0 jsr 47dd0 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 45a84: 588f addql #4,%sp 45a86: 2840 moveal %d0,%a4 45a88: 4a80 tstl %d0 45a8a: 6606 bnes 45a92 _Thread_Enable_dispatch(); 45a8c: 4e93 jsr %a3@ 45a8e: 700c moveq #12,%d0 return ENOMEM; 45a90: 6046 bras 45ad8 } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 45a92: 42ac 0014 clrl %a4@(20) if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 45a96: 296a 0004 0010 movel %a2@(4),%a4@(16) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 45a9c: 4878 0074 pea 74 45aa0: 4878 0800 pea 800 45aa4: 42a7 clrl %sp@- 45aa6: 486c 0018 pea %a4@(24) 45aaa: 4eb9 0004 90c8 jsr 490c8 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45ab0: 202c 0008 movel %a4@(8),%d0 45ab4: 4281 clrl %d1 45ab6: 2079 0005 f62e moveal 5f62e <_POSIX_Condition_variables_Information+0x18>,%a0 45abc: 3200 movew %d0,%d1 45abe: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45ac2: 42ac 000c clrl %a4@(12) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 45ac6: 206e 0008 moveal %fp@(8),%a0 45aca: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 45acc: 4e93 jsr %a3@ return 0; 45ace: 4fef 0010 lea %sp@(16),%sp 0 ); *cond = the_cond->Object.id; _Thread_Enable_dispatch(); 45ad2: 4280 clrl %d0 return 0; 45ad4: 6002 bras 45ad8 45ad6: 7016 moveq #22,%d0 } 45ad8: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 45ade: 4e5e unlk %fp ... 000458d8 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 458d8: 4e56 0000 linkw %fp,#0 458dc: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 458e0: 4a88 tstl %a0 458e2: 670a beqs 458ee 458e4: 4a90 tstl %a0@ 458e6: 6706 beqs 458ee <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 458e8: 4290 clrl %a0@ 458ea: 4280 clrl %d0 return 0; 458ec: 6002 bras 458f0 458ee: 7016 moveq #22,%d0 } 458f0: 4e5e unlk %fp <== NOT EXECUTED 0004ba98 : } void pthread_exit( void *value_ptr ) { 4ba98: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4ba9c: 2f2e 0008 movel %fp@(8),%sp@- 4baa0: 2f39 0005 cdc2 movel 5cdc2 <_Thread_Executing>,%sp@- 4baa6: 4eb9 0004 ba28 jsr 4ba28 <_POSIX_Thread_Exit> 4baac: 508f addql #8,%sp <== NOT EXECUTED } 4baae: 4e5e unlk %fp <== NOT EXECUTED ... 00044b58 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 44b58: 4e56 0000 linkw %fp,#0 44b5c: 206e 0008 moveal %fp@(8),%a0 44b60: 226e 000c moveal %fp@(12),%a1 if ( !attr ) 44b64: 4a88 tstl %a0 44b66: 6710 beqs 44b78 return EINVAL; if ( !attr->is_initialized ) 44b68: 4a90 tstl %a0@ 44b6a: 670c beqs 44b78 return EINVAL; if ( !type ) 44b6c: 4a89 tstl %a1 44b6e: 6708 beqs 44b78 <== NEVER TAKEN return EINVAL; *type = attr->type; 44b70: 22a8 0010 movel %a0@(16),%a1@ 44b74: 4280 clrl %d0 return 0; 44b76: 6002 bras 44b7a 44b78: 7016 moveq #22,%d0 } 44b7a: 4e5e unlk %fp ... 00046978 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 46978: 4e56 0000 linkw %fp,#0 4697c: 206e 0008 moveal %fp@(8),%a0 46980: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 46984: 4a88 tstl %a0 46986: 6712 beqs 4699a 46988: 4a90 tstl %a0@ 4698a: 670e beqs 4699a return EINVAL; switch ( pshared ) { 4698c: 7201 moveq #1,%d1 4698e: b280 cmpl %d0,%d1 46990: 6508 bcss 4699a <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 46992: 2140 0004 movel %d0,%a0@(4) 46996: 4280 clrl %d0 return 0; 46998: 6002 bras 4699c 4699a: 7016 moveq #22,%d0 default: return EINVAL; } } 4699c: 4e5e unlk %fp <== NOT EXECUTED 00044bac : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 44bac: 4e56 0000 linkw %fp,#0 44bb0: 206e 0008 moveal %fp@(8),%a0 44bb4: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 44bb8: 4a88 tstl %a0 44bba: 6712 beqs 44bce 44bbc: 4a90 tstl %a0@ 44bbe: 670e beqs 44bce <== NEVER TAKEN return EINVAL; switch ( type ) { 44bc0: 7203 moveq #3,%d1 44bc2: b280 cmpl %d0,%d1 44bc4: 6508 bcss 44bce case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 44bc6: 2140 0010 movel %d0,%a0@(16) 44bca: 4280 clrl %d0 return 0; 44bcc: 6002 bras 44bd0 44bce: 7016 moveq #22,%d0 default: return EINVAL; } } 44bd0: 4e5e unlk %fp <== NOT EXECUTED 0004562c : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 4562c: 4e56 fffc linkw %fp,#-4 45630: 2f0b movel %a3,%sp@- 45632: 266e 000c moveal %fp@(12),%a3 45636: 2f0a movel %a2,%sp@- 45638: 246e 0008 moveal %fp@(8),%a2 if ( !once_control || !init_routine ) 4563c: 4a8a tstl %a2 4563e: 674a beqs 4568a 45640: 4a8b tstl %a3 45642: 6746 beqs 4568a return EINVAL; if ( !once_control->init_executed ) { 45644: 4aaa 0004 tstl %a2@(4) 45648: 663c bnes 45686 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 4564a: 486e fffc pea %fp@(-4) 4564e: 4878 0100 pea 100 45652: 4878 0100 pea 100 45656: 4eb9 0004 6134 jsr 46134 if ( !once_control->init_executed ) { 4565c: 4fef 000c lea %sp@(12),%sp 45660: 4aaa 0004 tstl %a2@(4) 45664: 660a bnes 45670 <== NEVER TAKEN once_control->is_initialized = true; once_control->init_executed = true; 45666: 7001 moveq #1,%d0 45668: 2540 0004 movel %d0,%a2@(4) if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; 4566c: 2480 movel %d0,%a2@ once_control->init_executed = true; (*init_routine)(); 4566e: 4e93 jsr %a3@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 45670: 486e fffc pea %fp@(-4) 45674: 4878 0100 pea 100 45678: 2f2e fffc movel %fp@(-4),%sp@- 4567c: 4eb9 0004 6134 jsr 46134 45682: 4fef 000c lea %sp@(12),%sp 45686: 4280 clrl %d0 45688: 6002 bras 4568c 4568a: 7016 moveq #22,%d0 } return 0; } 4568c: 246e fff4 moveal %fp@(-12),%a2 45690: 266e fff8 moveal %fp@(-8),%a3 45694: 4e5e unlk %fp <== NOT EXECUTED 00045bf4 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 45bf4: 4e56 ffe8 linkw %fp,#-24 45bf8: 48d7 1c00 moveml %a2-%a4,%sp@ 45bfc: 266e 0008 moveal %fp@(8),%a3 45c00: 246e 000c moveal %fp@(12),%a2 const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 45c04: 4a8b tstl %a3 45c06: 6778 beqs 45c80 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 45c08: 4a8a tstl %a2 45c0a: 660e bnes 45c1a the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 45c0c: 45ee fff4 lea %fp@(-12),%a2 45c10: 2f0a movel %a2,%sp@- 45c12: 4eb9 0004 6500 jsr 46500 45c18: 588f addql #4,%sp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 45c1a: 4a92 tstl %a2@ 45c1c: 6762 beqs 45c80 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 45c1e: 4aaa 0004 tstl %a2@(4) 45c22: 665c bnes 45c80 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45c24: 2039 0005 f6ac movel 5f6ac <_Thread_Dispatch_disable_level>,%d0 45c2a: 5280 addql #1,%d0 45c2c: 23c0 0005 f6ac movel %d0,5f6ac <_Thread_Dispatch_disable_level> * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 45c32: 4879 0005 f858 pea 5f858 <_POSIX_RWLock_Information> 45c38: 45f9 0004 8b66 lea 48b66 <_Thread_Enable_dispatch>,%a2 45c3e: 4eb9 0004 7f90 jsr 47f90 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 45c44: 588f addql #4,%sp 45c46: 2840 moveal %d0,%a4 45c48: 4a80 tstl %d0 45c4a: 6606 bnes 45c52 _Thread_Enable_dispatch(); 45c4c: 4e92 jsr %a2@ 45c4e: 700b moveq #11,%d0 return EAGAIN; 45c50: 6030 bras 45c82 } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 45c52: 486e fffc pea %fp@(-4) 45c56: 486c 0010 pea %a4@(16) 45c5a: 4eb9 0004 77c4 jsr 477c4 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45c60: 202c 0008 movel %a4@(8),%d0 45c64: 4281 clrl %d1 45c66: 2079 0005 f870 moveal 5f870 <_POSIX_RWLock_Information+0x18>,%a0 45c6c: 3200 movew %d0,%d1 45c6e: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45c72: 42ac 000c clrl %a4@(12) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 45c76: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 45c78: 4e92 jsr %a2@ return 0; 45c7a: 508f addql #8,%sp 0 ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); 45c7c: 4280 clrl %d0 return 0; 45c7e: 6002 bras 45c82 45c80: 7016 moveq #22,%d0 } 45c82: 4cee 1c00 ffe8 moveml %fp@(-24),%a2-%a4 45c88: 4e5e unlk %fp <== NOT EXECUTED 00045cf4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 45cf4: 4e56 ffec linkw %fp,#-20 45cf8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45cfc: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 45d00: 4a8a tstl %a2 45d02: 6700 008e beqw 45d92 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 45d06: 486e fff8 pea %fp@(-8) 45d0a: 2f2e 000c movel %fp@(12),%sp@- 45d0e: 4eb9 0004 b83c jsr 4b83c <_POSIX_Absolute_timeout_to_ticks> 45d14: 486e fffc pea %fp@(-4) 45d18: 2400 movel %d0,%d2 45d1a: 2f12 movel %a2@,%sp@- 45d1c: 4879 0005 f858 pea 5f858 <_POSIX_RWLock_Information> 45d22: 4eb9 0004 83dc jsr 483dc <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45d28: 4fef 0014 lea %sp@(20),%sp 45d2c: 4aae fffc tstl %fp@(-4) 45d30: 6660 bnes 45d92 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 45d32: 7203 moveq #3,%d1 45d34: b282 cmpl %d2,%d1 45d36: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 45d38: 42a7 clrl %sp@- 45d3a: 2f2e fff8 movel %fp@(-8),%sp@- 45d3e: 4483 negl %d3 45d40: 4281 clrl %d1 45d42: 1203 moveb %d3,%d1 45d44: 2040 moveal %d0,%a0 45d46: 2f01 movel %d1,%sp@- 45d48: 2f12 movel %a2@,%sp@- 45d4a: 4868 0010 pea %a0@(16) 45d4e: 4eb9 0004 77f8 jsr 477f8 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 45d54: 4eb9 0004 8b66 jsr 48b66 <_Thread_Enable_dispatch> if ( !do_wait ) { 45d5a: 4fef 0014 lea %sp@(20),%sp 45d5e: 4a03 tstb %d3 45d60: 661c bnes 45d7e if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 45d62: 2079 0005 f766 moveal 5f766 <_Thread_Executing>,%a0 45d68: 7002 moveq #2,%d0 45d6a: b0a8 0034 cmpl %a0@(52),%d0 45d6e: 660e bnes 45d7e switch (status) { 45d70: 4a82 tstl %d2 45d72: 671e beqs 45d92 <== NEVER TAKEN 45d74: b082 cmpl %d2,%d0 45d76: 6506 bcss 45d7e <== NEVER TAKEN 45d78: 103c 0074 moveb #116,%d0 45d7c: 6016 bras 45d94 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 45d7e: 2079 0005 f766 moveal 5f766 <_Thread_Executing>,%a0 45d84: 2f28 0034 movel %a0@(52),%sp@- 45d88: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45d8e: 588f addql #4,%sp 45d90: 6002 bras 45d94 45d92: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45d94: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 45d9a: 4e5e unlk %fp ... 00045da0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 45da0: 4e56 ffec linkw %fp,#-20 45da4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45da8: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 45dac: 4a8a tstl %a2 45dae: 6700 008e beqw 45e3e * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 45db2: 486e fff8 pea %fp@(-8) 45db6: 2f2e 000c movel %fp@(12),%sp@- 45dba: 4eb9 0004 b83c jsr 4b83c <_POSIX_Absolute_timeout_to_ticks> 45dc0: 486e fffc pea %fp@(-4) 45dc4: 2400 movel %d0,%d2 45dc6: 2f12 movel %a2@,%sp@- 45dc8: 4879 0005 f858 pea 5f858 <_POSIX_RWLock_Information> 45dce: 4eb9 0004 83dc jsr 483dc <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45dd4: 4fef 0014 lea %sp@(20),%sp 45dd8: 4aae fffc tstl %fp@(-4) 45ddc: 6660 bnes 45e3e (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 45dde: 7203 moveq #3,%d1 45de0: b282 cmpl %d2,%d1 45de2: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 45de4: 42a7 clrl %sp@- 45de6: 2f2e fff8 movel %fp@(-8),%sp@- 45dea: 4483 negl %d3 45dec: 4281 clrl %d1 45dee: 1203 moveb %d3,%d1 45df0: 2040 moveal %d0,%a0 45df2: 2f01 movel %d1,%sp@- 45df4: 2f12 movel %a2@,%sp@- 45df6: 4868 0010 pea %a0@(16) 45dfa: 4eb9 0004 78a8 jsr 478a8 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 45e00: 4eb9 0004 8b66 jsr 48b66 <_Thread_Enable_dispatch> if ( !do_wait && 45e06: 4fef 0014 lea %sp@(20),%sp 45e0a: 4a03 tstb %d3 45e0c: 661c bnes 45e2a (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 45e0e: 2079 0005 f766 moveal 5f766 <_Thread_Executing>,%a0 45e14: 7002 moveq #2,%d0 45e16: b0a8 0034 cmpl %a0@(52),%d0 45e1a: 660e bnes 45e2a switch (status) { 45e1c: 4a82 tstl %d2 45e1e: 671e beqs 45e3e <== NEVER TAKEN 45e20: b082 cmpl %d2,%d0 45e22: 6506 bcss 45e2a <== NEVER TAKEN 45e24: 103c 0074 moveb #116,%d0 45e28: 6016 bras 45e40 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 45e2a: 2079 0005 f766 moveal 5f766 <_Thread_Executing>,%a0 45e30: 2f28 0034 movel %a0@(52),%sp@- 45e34: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45e3a: 588f addql #4,%sp 45e3c: 6002 bras 45e40 45e3e: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45e40: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 45e46: 4e5e unlk %fp ... 00046520 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 46520: 4e56 0000 linkw %fp,#0 46524: 206e 0008 moveal %fp@(8),%a0 46528: 202e 000c movel %fp@(12),%d0 if ( !attr ) 4652c: 4a88 tstl %a0 4652e: 6712 beqs 46542 return EINVAL; if ( !attr->is_initialized ) 46530: 4a90 tstl %a0@ 46532: 670e beqs 46542 return EINVAL; switch ( pshared ) { 46534: 7201 moveq #1,%d1 46536: b280 cmpl %d0,%d1 46538: 6508 bcss 46542 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 4653a: 2140 0004 movel %d0,%a0@(4) 4653e: 4280 clrl %d0 return 0; 46540: 6002 bras 46544 46542: 7016 moveq #22,%d0 default: return EINVAL; } } 46544: 4e5e unlk %fp <== NOT EXECUTED 00044bcc : int pthread_setcanceltype( int type, int *oldtype ) { 44bcc: 4e56 0000 linkw %fp,#0 44bd0: 202e 0008 movel %fp@(8),%d0 44bd4: 226e 000c moveal %fp@(12),%a1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 44bd8: 2239 0005 d436 movel 5d436 <_ISR_Nest_level>,%d1 44bde: 6704 beqs 44be4 44be0: 7047 moveq #71,%d0 44be2: 603e bras 44c22 return EPROTO; if ( !oldtype ) 44be4: 4a89 tstl %a1 44be6: 6738 beqs 44c20 <== NEVER TAKEN return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 44be8: 7201 moveq #1,%d1 44bea: b280 cmpl %d0,%d1 44bec: 6532 bcss 44c20 <== NEVER TAKEN 44bee: 2239 0005 d39c movel 5d39c <_Thread_Dispatch_disable_level>,%d1 44bf4: 5281 addql #1,%d1 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 44bf6: 2079 0005 d456 moveal 5d456 <_Thread_Executing>,%a0 44bfc: 23c1 0005 d39c movel %d1,5d39c <_Thread_Dispatch_disable_level> 44c02: 2068 010e moveal %a0@(270),%a0 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 44c06: 22a8 00d8 movel %a0@(216),%a1@ thread_support->cancelability_type = type; 44c0a: 2140 00d8 movel %d0,%a0@(216) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44c0e: 2f39 0005 d456 movel 5d456 <_Thread_Executing>,%sp@- 44c14: 4eb9 0004 9864 jsr 49864 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44c1a: 588f addql #4,%sp _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44c1c: 4280 clrl %d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44c1e: 6002 bras 44c22 44c20: 7016 moveq #22,%d0 } 44c22: 4e5e unlk %fp ... 00047504 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 47504: 4e56 ffe0 linkw %fp,#-32 47508: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4750c: 282e 000c movel %fp@(12),%d4 47510: 262e 0010 movel %fp@(16),%d3 int rc; /* * Check all the parameters */ if ( !param ) 47514: 6606 bnes 4751c 47516: 7416 moveq #22,%d2 47518: 6000 00e6 braw 47600 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 4751c: 486e fff8 pea %fp@(-8) 47520: 486e fffc pea %fp@(-4) 47524: 2f03 movel %d3,%sp@- 47526: 2f04 movel %d4,%sp@- 47528: 4eb9 0004 c734 jsr 4c734 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 4752e: 4fef 0010 lea %sp@(16),%sp * Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 47532: 2400 movel %d0,%d2 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 47534: 6600 00ca bnew 47600 47538: 486e fff4 pea %fp@(-12) 4753c: 2f2e 0008 movel %fp@(8),%sp@- 47540: 4879 0006 19ee pea 619ee <_POSIX_Threads_Information> 47546: 4eb9 0004 9238 jsr 49238 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4754c: 4fef 000c lea %sp@(12),%sp 47550: 2640 moveal %d0,%a3 47552: 4aae fff4 tstl %fp@(-12) 47556: 6708 beqs 47560 47558: 143c 0003 moveb #3,%d2 4755c: 6000 00a2 braw 47600 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 47560: 246b 010e moveal %a3@(270),%a2 if ( api->schedpolicy == SCHED_SPORADIC ) 47564: 7004 moveq #4,%d0 47566: b0aa 0080 cmpl %a2@(128),%d0 4756a: 660c bnes 47578 (void) _Watchdog_Remove( &api->Sporadic_timer ); 4756c: 486a 00a4 pea %a2@(164) 47570: 4eb9 0004 abb8 jsr 4abb8 <_Watchdog_Remove> 47576: 588f addql #4,%sp api->schedpolicy = policy; 47578: 2544 0080 movel %d4,%a2@(128) api->schedparam = *param; 4757c: 4878 001c pea 1c 47580: 2f03 movel %d3,%sp@- 47582: 486a 0084 pea %a2@(132) 47586: 4eb9 0004 fd44 jsr 4fd44 the_thread->budget_algorithm = budget_algorithm; 4758c: 276e fffc 007a movel %fp@(-4),%a3@(122) the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 47592: 4fef 000c lea %sp@(12),%sp (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 47596: 276e fff8 007e movel %fp@(-8),%a3@(126) switch ( api->schedpolicy ) { 4759c: 202a 0080 movel %a2@(128),%d0 475a0: 6d58 blts 475fa <== NEVER TAKEN 475a2: 7202 moveq #2,%d1 475a4: b280 cmpl %d0,%d1 475a6: 6c0a bges 475b2 475a8: 123c 0004 moveb #4,%d1 475ac: b280 cmpl %d0,%d1 475ae: 664a bnes 475fa <== NEVER TAKEN 475b0: 602a bras 475dc 475b2: 4280 clrl %d0 475b4: 1039 0006 0016 moveb 60016 ,%d0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 475ba: 41f9 0006 17b8 lea 617b8 <_Thread_Ticks_per_timeslice>,%a0 475c0: 90aa 0084 subl %a2@(132),%d0 475c4: 2750 0076 movel %a0@,%a3@(118) the_thread->real_priority = 475c8: 2740 0018 movel %d0,%a3@(24) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 475cc: 4878 0001 pea 1 475d0: 2f00 movel %d0,%sp@- 475d2: 2f0b movel %a3,%sp@- 475d4: 4eb9 0004 94c8 jsr 494c8 <_Thread_Change_priority> 475da: 601a bras 475f6 true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 475dc: 256a 0084 00a0 movel %a2@(132),%a2@(160) _Watchdog_Remove( &api->Sporadic_timer ); 475e2: 486a 00a4 pea %a2@(164) 475e6: 4eb9 0004 abb8 jsr 4abb8 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 475ec: 2f0b movel %a3,%sp@- 475ee: 42a7 clrl %sp@- 475f0: 4eb9 0004 7470 jsr 47470 <_POSIX_Threads_Sporadic_budget_TSR> 475f6: 4fef 000c lea %sp@(12),%sp break; } _Thread_Enable_dispatch(); 475fa: 4eb9 0004 99c2 jsr 499c2 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 47600: 2002 movel %d2,%d0 47602: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 47608: 4e5e unlk %fp <== NOT EXECUTED 00045420 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 45420: 4e56 0000 linkw %fp,#0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 45424: 2039 0005 dcde movel 5dcde <_ISR_Nest_level>,%d0 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 4542a: 2f02 movel %d2,%sp@- * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 4542c: 4a80 tstl %d0 4542e: 6646 bnes 45476 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 45430: 2079 0005 dcfe moveal 5dcfe <_Thread_Executing>,%a0 45436: 2039 0005 dc44 movel 5dc44 <_Thread_Dispatch_disable_level>,%d0 4543c: 5280 addql #1,%d0 4543e: 2068 010e moveal %a0@(270),%a0 45442: 23c0 0005 dc44 movel %d0,5dc44 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 45448: 4aa8 00d4 tstl %a0@(212) 4544c: 6704 beqs 45452 <== ALWAYS TAKEN 4544e: 4202 clrb %d2 <== NOT EXECUTED 45450: 6008 bras 4545a <== NOT EXECUTED /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 45452: 4aa8 00dc tstl %a0@(220) 45456: 56c2 sne %d2 45458: 4482 negl %d2 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4545a: 4eb9 0004 772a jsr 4772a <_Thread_Enable_dispatch> if ( cancel ) 45460: 4a02 tstb %d2 45462: 6712 beqs 45476 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 45464: 4878 ffff pea ffffffff 45468: 2f39 0005 dcfe movel 5dcfe <_Thread_Executing>,%sp@- 4546e: 4eb9 0004 a5fc jsr 4a5fc <_POSIX_Thread_Exit> 45474: 508f addql #8,%sp <== NOT EXECUTED } 45476: 242e fffc movel %fp@(-4),%d2 4547a: 4e5e unlk %fp ... 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 bbc0 moveal 5bbc0 ,%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 ... 0005948c : ssize_t read( int fd, void *buffer, size_t count ) { 5948c: 4e56 fff4 linkw %fp,#-12 59490: 202e 000c movel %fp@(12),%d0 59494: 48d7 040c moveml %d2-%d3/%a2,%sp@ 59498: 242e 0008 movel %fp@(8),%d2 5949c: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 594a0: b4b9 0005 b4a4 cmpl 5b4a4 ,%d2 594a6: 6414 bccs 594bc <== NEVER TAKEN iop = rtems_libio_iop( fd ); 594a8: 2479 0005 cba8 moveal 5cba8 ,%a2 594ae: ed8a lsll #6,%d2 594b0: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 594b2: 242a 0014 movel %a2@(20),%d2 594b6: 0802 0008 btst #8,%d2 594ba: 6610 bnes 594cc 594bc: 4eb9 0004 ca88 jsr 4ca88 <__errno> 594c2: 7409 moveq #9,%d2 594c4: 72ff moveq #-1,%d1 594c6: 2040 moveal %d0,%a0 594c8: 2082 movel %d2,%a0@ 594ca: 6060 bras 5952c rtems_libio_check_buffer( buffer ); 594cc: 4a80 tstl %d0 594ce: 670a beqs 594da <== NEVER TAKEN rtems_libio_check_count( count ); 594d0: 4a81 tstl %d1 594d2: 6758 beqs 5952c <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 594d4: 0802 0001 btst #1,%d2 594d8: 6610 bnes 594ea <== ALWAYS TAKEN 594da: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 594e0: 72ff moveq #-1,%d1 <== NOT EXECUTED 594e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 594e4: 7016 moveq #22,%d0 <== NOT EXECUTED 594e6: 2080 movel %d0,%a0@ <== NOT EXECUTED 594e8: 6042 bras 5952c <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 594ea: 206a 003c moveal %a2@(60),%a0 594ee: 2068 0008 moveal %a0@(8),%a0 594f2: 4a88 tstl %a0 594f4: 6612 bnes 59508 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 594f6: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 594fc: 72ff moveq #-1,%d1 <== NOT EXECUTED 594fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 59500: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 59506: 6024 bras 5952c <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 59508: 2f01 movel %d1,%sp@- 5950a: 2f00 movel %d0,%sp@- 5950c: 2f0a movel %a2,%sp@- 5950e: 4e90 jsr %a0@ if ( rc > 0 ) 59510: 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 ); 59514: 2200 movel %d0,%d1 if ( rc > 0 ) 59516: 6f14 bles 5952c iop->offset += rc; 59518: 2600 movel %d0,%d3 5951a: 5bc2 smi %d2 5951c: 49c2 extbl %d2 5951e: d7aa 0010 addl %d3,%a2@(16) 59522: 202a 000c movel %a2@(12),%d0 59526: d182 addxl %d2,%d0 59528: 2540 000c movel %d0,%a2@(12) return rc; } 5952c: 2001 movel %d1,%d0 5952e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 59534: 4e5e unlk %fp <== NOT EXECUTED 00045304 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 45304: 4e56 ffe0 linkw %fp,#-32 45308: 48d7 001c moveml %d2-%d4,%sp@ 4530c: 282e 0008 movel %fp@(8),%d4 45310: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t loc; int result; if (!buf) 45314: 6612 bnes 45328 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 45316: 4eb9 0005 0568 jsr 50568 <__errno> <== NOT EXECUTED 4531c: 76ff moveq #-1,%d3 <== NOT EXECUTED 4531e: 720e moveq #14,%d1 <== NOT EXECUTED 45320: 2040 moveal %d0,%a0 <== NOT EXECUTED 45322: 2081 movel %d1,%a0@ <== NOT EXECUTED 45324: 6000 00c2 braw 453e8 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 45328: 2f04 movel %d4,%sp@- 4532a: 240e movel %fp,%d2 4532c: 0682 ffff ffec addil #-20,%d2 45332: 4eb9 0005 1fcc jsr 51fcc 45338: 4297 clrl %sp@ 4533a: 2f02 movel %d2,%sp@- 4533c: 42a7 clrl %sp@- 4533e: 2f00 movel %d0,%sp@- 45340: 2f04 movel %d4,%sp@- 45342: 4eb9 0004 42ba jsr 442ba 0, &loc, false ); if ( result != 0 ) 45348: 4fef 0014 lea %sp@(20),%sp 4534c: 4a80 tstl %d0 4534e: 6706 beqs 45356 <== ALWAYS TAKEN 45350: 76ff moveq #-1,%d3 <== NOT EXECUTED 45352: 6000 0094 braw 453e8 <== NOT EXECUTED return -1; if ( !loc.ops->node_type_h ){ 45356: 226e fff8 moveal %fp@(-8),%a1 4535a: 2069 0010 moveal %a1@(16),%a0 4535e: 4a88 tstl %a0 45360: 6606 bnes 45368 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 45362: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 45366: 603e bras 453a6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 45368: 2f02 movel %d2,%sp@- 4536a: 4e90 jsr %a0@ 4536c: 206e fff8 moveal %fp@(-8),%a0 45370: 588f addql #4,%sp 45372: 7204 moveq #4,%d1 45374: b280 cmpl %d0,%d1 45376: 6722 beqs 4539a rtems_filesystem_freenode( &loc ); 45378: 4a88 tstl %a0 4537a: 670e beqs 4538a <== NEVER TAKEN 4537c: 2068 001c moveal %a0@(28),%a0 45380: 4a88 tstl %a0 45382: 6706 beqs 4538a <== NEVER TAKEN 45384: 2f02 movel %d2,%sp@- 45386: 4e90 jsr %a0@ 45388: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 4538a: 4eb9 0005 0568 jsr 50568 <__errno> 45390: 76ff moveq #-1,%d3 45392: 2040 moveal %d0,%a0 45394: 7016 moveq #22,%d0 45396: 2080 movel %d0,%a0@ 45398: 604e bras 453e8 } if ( !loc.ops->readlink_h ){ 4539a: 2268 003c moveal %a0@(60),%a1 4539e: 4a89 tstl %a1 453a0: 6620 bnes 453c2 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 453a2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 453a6: 4a88 tstl %a0 <== NOT EXECUTED 453a8: 6706 beqs 453b0 <== NOT EXECUTED 453aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 453ac: 4e90 jsr %a0@ <== NOT EXECUTED 453ae: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 453b0: 4eb9 0005 0568 jsr 50568 <__errno> <== NOT EXECUTED 453b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 453b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 453ba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 453c0: 6026 bras 453e8 <== NOT EXECUTED } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 453c2: 2f2e 0010 movel %fp@(16),%sp@- 453c6: 2f03 movel %d3,%sp@- 453c8: 2f02 movel %d2,%sp@- 453ca: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 453cc: 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 ); 453d0: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 453d2: 4fef 000c lea %sp@(12),%sp 453d6: 4a88 tstl %a0 453d8: 670e beqs 453e8 <== NEVER TAKEN 453da: 2068 001c moveal %a0@(28),%a0 453de: 4a88 tstl %a0 453e0: 6706 beqs 453e8 <== NEVER TAKEN 453e2: 2f02 movel %d2,%sp@- 453e4: 4e90 jsr %a0@ 453e6: 588f addql #4,%sp return result; } 453e8: 2003 movel %d3,%d0 453ea: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 453f0: 4e5e unlk %fp <== NOT EXECUTED 00044060 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44060: 4e56 ffe4 linkw %fp,#-28 44064: 202e 0008 movel %fp@(8),%d0 44068: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4406c: 266e 000c moveal %fp@(12),%a3 44070: 262e 0010 movel %fp@(16),%d3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 44074: b0b9 0005 ecd4 cmpl 5ecd4 ,%d0 4407a: 6414 bccs 44090 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 4407c: 2479 0006 0bac moveal 60bac ,%a2 44082: ed88 lsll #6,%d0 44084: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 44086: 202a 0014 movel %a2@(20),%d0 4408a: 0800 0008 btst #8,%d0 4408e: 6612 bnes 440a2 <== ALWAYS TAKEN 44090: 4eb9 0004 eb44 jsr 4eb44 <__errno> <== NOT EXECUTED 44096: 74ff moveq #-1,%d2 <== NOT EXECUTED 44098: 7209 moveq #9,%d1 <== NOT EXECUTED 4409a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4409c: 2081 movel %d1,%a0@ <== NOT EXECUTED 4409e: 6000 00c2 braw 44162 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 440a2: 0800 0001 btst #1,%d0 440a6: 674a beqs 440f2 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 440a8: 4a8b tstl %a3 440aa: 6746 beqs 440f2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 440ac: 4a83 tstl %d3 440ae: 6f42 bles 440f2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 440b0: 0c83 0000 0400 cmpil #1024,%d3 440b6: 6e3a bgts 440f2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 440b8: 206a 003c moveal %a2@(60),%a0 440bc: 4aa8 0008 tstl %a0@(8) 440c0: 6614 bnes 440d6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 440c2: 4eb9 0004 eb44 jsr 4eb44 <__errno> <== NOT EXECUTED 440c8: 74ff moveq #-1,%d2 <== NOT EXECUTED 440ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 440cc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 440d2: 6000 008e braw 44162 <== NOT EXECUTED 440d6: 204b moveal %a3,%a0 440d8: 4281 clrl %d1 440da: 4280 clrl %d0 440dc: 7801 moveq #1,%d4 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 440de: 5281 addql #1,%d1 ssize_t old; if ( !iov[v].iov_base ) 440e0: 4a90 tstl %a0@ 440e2: 670e beqs 440f2 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 440e4: 2428 0004 movel %a0@(4),%d2 440e8: 2240 moveal %d0,%a1 440ea: 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++ ) { 440ec: 5088 addql #8,%a0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 440ee: b089 cmpl %a1,%d0 440f0: 6f10 bles 44102 rtems_set_errno_and_return_minus_one( EINVAL ); 440f2: 4eb9 0004 eb44 jsr 4eb44 <__errno> 440f8: 74ff moveq #-1,%d2 440fa: 2040 moveal %d0,%a0 440fc: 7016 moveq #22,%d0 440fe: 2080 movel %d0,%a0@ 44100: 6060 bras 44162 if ( iov[v].iov_len ) 44102: 4a82 tstl %d2 44104: 57c2 seq %d2 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44106: 2009 movel %a1,%d0 old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 44108: c484 andl %d4,%d2 4410a: 1802 moveb %d2,%d4 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4410c: b681 cmpl %d1,%d3 4410e: 6ece bgts 440de /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 44110: 4a02 tstb %d2 44112: 6704 beqs 44118 44114: 4282 clrl %d2 44116: 604a bras 44162 44118: 588b addql #4,%a3 4411a: 4284 clrl %d4 4411c: 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 ); 4411e: 206a 003c moveal %a2@(60),%a0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44122: 5284 addql #1,%d4 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 44124: 2f13 movel %a3@,%sp@- 44126: 2f2b fffc movel %a3@(-4),%sp@- 4412a: 2f0a movel %a2,%sp@- 4412c: 2068 0008 moveal %a0@(8),%a0 44130: 4e90 jsr %a0@ if ( bytes < 0 ) 44132: 4fef 000c lea %sp@(12),%sp 44136: 4a80 tstl %d0 44138: 6c04 bges 4413e <== ALWAYS TAKEN 4413a: 74ff moveq #-1,%d2 <== NOT EXECUTED 4413c: 6024 bras 44162 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 4413e: 4a80 tstl %d0 44140: 6716 beqs 44158 <== NEVER TAKEN iop->offset += bytes; total += bytes; 44142: d480 addl %d0,%d2 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 44144: 2c00 movel %d0,%d6 44146: 5bc5 smi %d5 44148: 49c5 extbl %d5 4414a: ddaa 0010 addl %d6,%a2@(16) 4414e: 222a 000c movel %a2@(12),%d1 44152: d385 addxl %d5,%d1 44154: 2541 000c movel %d1,%a2@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 44158: b093 cmpl %a3@,%d0 4415a: 6606 bnes 44162 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4415c: 508b addql #8,%a3 4415e: b684 cmpl %d4,%d3 44160: 6ebc bgts 4411e if (bytes != iov[ v ].iov_len) break; } return total; } 44162: 2002 movel %d2,%d0 44164: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4416a: 4e5e unlk %fp ... 000595b8 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 595b8: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 595ba: 4e56 fff0 linkw %fp,#-16 595be: 52b9 0005 cbc4 addql #1,5cbc4 595c4: 48d7 001c moveml %d2-%d4,%sp@ 595c8: 242e 0008 movel %fp@(8),%d2 595cc: 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())) { 595d0: b0b9 0005 ce90 cmpl 5ce90 <_System_state_Current>,%d0 595d6: 6614 bnes 595ec <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) 595d8: 2039 0005 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0 595de: 6600 00aa bnew 5968a return (void *) 0; if (_ISR_Nest_level > 0) 595e2: 2039 0005 cda2 movel 5cda2 <_ISR_Nest_level>,%d0 595e8: 6600 00a0 bnew 5968a } /* * Continue with realloc(). */ if ( !ptr ) 595ec: 4a82 tstl %d2 595ee: 660c bnes 595fc return malloc( size ); 595f0: 2f03 movel %d3,%sp@- 595f2: 4eb9 0004 9484 jsr 49484 595f8: 2400 movel %d0,%d2 595fa: 600e bras 5960a if ( !size ) { 595fc: 4a83 tstl %d3 595fe: 660e bnes 5960e <== ALWAYS TAKEN free( ptr ); 59600: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59602: 4282 clrl %d2 <== NOT EXECUTED 59604: 4eb9 0004 8f80 jsr 48f80 <== NOT EXECUTED return (void *) 0; 5960a: 588f addql #4,%sp 5960c: 607e bras 5968c } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 5960e: 486e fffc pea %fp@(-4) 59612: 2f02 movel %d2,%sp@- 59614: 2f39 0005 b4b0 movel 5b4b0 ,%sp@- 5961a: 4eb9 0005 9744 jsr 59744 <_Protected_heap_Get_block_size> 59620: 4fef 000c lea %sp@(12),%sp 59624: 4a00 tstb %d0 59626: 6610 bnes 59638 errno = EINVAL; 59628: 4eb9 0004 ca88 jsr 4ca88 <__errno> 5962e: 4282 clrl %d2 59630: 2040 moveal %d0,%a0 59632: 7016 moveq #22,%d0 59634: 2080 movel %d0,%a0@ return (void *) 0; 59636: 6054 bras 5968c #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 ) ) { 59638: 2f03 movel %d3,%sp@- 5963a: 2f02 movel %d2,%sp@- 5963c: 2f39 0005 b4b0 movel 5b4b0 ,%sp@- 59642: 4eb9 0005 9780 jsr 59780 <_Protected_heap_Resize_block> 59648: 4fef 000c lea %sp@(12),%sp 5964c: 4a00 tstb %d0 5964e: 663c bnes 5968c * 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 ); 59650: 2f03 movel %d3,%sp@- 59652: 4eb9 0004 9484 jsr 49484 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 59658: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 5965a: 53b9 0005 cbb8 subql #1,5cbb8 * 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 ); 59660: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 59662: 6726 beqs 5968a return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 59664: 202e fffc movel %fp@(-4),%d0 59668: b083 cmpl %d3,%d0 5966a: 6402 bccs 5966e <== NEVER TAKEN 5966c: 2600 movel %d0,%d3 5966e: 2f03 movel %d3,%sp@- 59670: 2f02 movel %d2,%sp@- 59672: 2f04 movel %d4,%sp@- 59674: 4eb9 0004 d2a8 jsr 4d2a8 free( ptr ); 5967a: 2f02 movel %d2,%sp@- 5967c: 2404 movel %d4,%d2 5967e: 4eb9 0004 8f80 jsr 48f80 return new_area; 59684: 4fef 0010 lea %sp@(16),%sp 59688: 6002 bras 5968c 5968a: 4282 clrl %d2 } 5968c: 2002 movel %d2,%d0 5968e: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 59694: 4e5e unlk %fp <== NOT EXECUTED 000460ac : #include int rmdir( const char *pathname ) { 460ac: 4e56 ffc0 linkw %fp,#-64 460b0: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 460b4: 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 ); 460b8: 2f0a movel %a2,%sp@- 460ba: 4eb9 0004 4ac0 jsr 44ac0 if ( parentpathlen == 0 ) 460c0: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 460c2: 2a00 movel %d0,%d5 if ( parentpathlen == 0 ) 460c4: 664a bnes 46110 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 460c6: 742f moveq #47,%d2 460c8: 1012 moveb %a2@,%d0 460ca: 1200 moveb %d0,%d1 460cc: 49c1 extbl %d1 460ce: b481 cmpl %d1,%d2 460d0: 670c beqs 460de <== ALWAYS TAKEN 460d2: 143c 005c moveb #92,%d2 <== NOT EXECUTED 460d6: b481 cmpl %d1,%d2 <== NOT EXECUTED 460d8: 6704 beqs 460de <== NOT EXECUTED 460da: 4a00 tstb %d0 <== NOT EXECUTED 460dc: 6612 bnes 460f0 <== NOT EXECUTED 460de: 4878 0014 pea 14 460e2: 2079 0006 2694 moveal 62694 ,%a0 460e8: 41e8 0018 lea %a0@(24),%a0 460ec: 2f08 movel %a0,%sp@- 460ee: 600e bras 460fe 460f0: 4878 0014 pea 14 <== NOT EXECUTED 460f4: 2039 0006 2694 movel 62694 ,%d0 <== NOT EXECUTED 460fa: 5880 addql #4,%d0 <== NOT EXECUTED 460fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 460fe: 486e ffec pea %fp@(-20) 46102: 4203 clrb %d3 46104: 4eb9 0005 2648 jsr 52648 4610a: 4fef 000c lea %sp@(12),%sp 4610e: 6020 bras 46130 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 46110: 42a7 clrl %sp@- 46112: 486e ffec pea %fp@(-20) 46116: 4878 0002 pea 2 4611a: 2f00 movel %d0,%sp@- 4611c: 2f0a movel %a2,%sp@- 4611e: 4eb9 0004 4bd6 jsr 44bd6 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 46124: 4fef 0014 lea %sp@(20),%sp 46128: 4a80 tstl %d0 4612a: 6600 0168 bnew 46294 4612e: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 46130: 4878 0014 pea 14 46134: 280e movel %fp,%d4 46136: 0684 ffff ffec addil #-20,%d4 4613c: 240e movel %fp,%d2 4613e: 0682 ffff ffd8 addil #-40,%d2 name = pathname + parentpathlen; 46144: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46146: 47f9 0005 3dc4 lea 53dc4 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4614c: 2f04 movel %d4,%sp@- 4614e: 2f02 movel %d2,%sp@- 46150: 4eb9 0005 2648 jsr 52648 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 46156: 2f0a movel %a2,%sp@- 46158: 4e93 jsr %a3@ 4615a: 2e80 movel %d0,%sp@ 4615c: 2f0a movel %a2,%sp@- 4615e: 4eb9 0004 4a88 jsr 44a88 46164: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 46166: 2f0a movel %a2,%sp@- 46168: 4e93 jsr %a3@ 4616a: 4297 clrl %sp@ 4616c: 2f02 movel %d2,%sp@- 4616e: 42a7 clrl %sp@- 46170: 2f00 movel %d0,%sp@- 46172: 2f0a movel %a2,%sp@- 46174: 4eb9 0004 4b06 jsr 44b06 0, &loc, false ); if ( result != 0 ) { 4617a: 4fef 0028 lea %sp@(40),%sp 4617e: 4a80 tstl %d0 46180: 6722 beqs 461a4 if ( free_parentloc ) 46182: 4a03 tstb %d3 46184: 6700 010e beqw 46294 rtems_filesystem_freenode( &parentloc ); 46188: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4618c: 4a88 tstl %a0 <== NOT EXECUTED 4618e: 6700 0104 beqw 46294 <== NOT EXECUTED 46192: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 46196: 4a88 tstl %a0 <== NOT EXECUTED 46198: 6700 00fa beqw 46294 <== NOT EXECUTED 4619c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4619e: 78ff moveq #-1,%d4 <== NOT EXECUTED 461a0: 6000 00ec braw 4628e <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 461a4: 226e ffe4 moveal %fp@(-28),%a1 461a8: 2069 0010 moveal %a1@(16),%a0 461ac: 4a88 tstl %a0 461ae: 6606 bnes 461b6 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 461b0: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 461b4: 6068 bras 4621e <== 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 ){ 461b6: 2f02 movel %d2,%sp@- 461b8: 4e90 jsr %a0@ 461ba: 588f addql #4,%sp 461bc: 7201 moveq #1,%d1 461be: b280 cmpl %d0,%d1 461c0: 6744 beqs 46206 rtems_filesystem_freenode( &loc ); 461c2: 206e ffe4 moveal %fp@(-28),%a0 461c6: 4a88 tstl %a0 461c8: 670e beqs 461d8 <== NEVER TAKEN 461ca: 2068 001c moveal %a0@(28),%a0 461ce: 4a88 tstl %a0 461d0: 6706 beqs 461d8 <== NEVER TAKEN 461d2: 2f02 movel %d2,%sp@- 461d4: 4e90 jsr %a0@ 461d6: 588f addql #4,%sp if ( free_parentloc ) 461d8: 4a03 tstb %d3 461da: 6718 beqs 461f4 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 461dc: 206e fff8 moveal %fp@(-8),%a0 461e0: 4a88 tstl %a0 461e2: 6710 beqs 461f4 <== NEVER TAKEN 461e4: 2068 001c moveal %a0@(28),%a0 461e8: 4a88 tstl %a0 461ea: 6708 beqs 461f4 <== NEVER TAKEN 461ec: 486e ffec pea %fp@(-20) 461f0: 4e90 jsr %a0@ 461f2: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 461f4: 4eb9 0005 0e18 jsr 50e18 <__errno> 461fa: 78ff moveq #-1,%d4 461fc: 2040 moveal %d0,%a0 461fe: 7014 moveq #20,%d0 46200: 2080 movel %d0,%a0@ 46202: 6000 0092 braw 46296 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 46206: 206e ffe0 moveal %fp@(-32),%a0 4620a: 2068 0034 moveal %a0@(52),%a0 4620e: 4a88 tstl %a0 46210: 6644 bnes 46256 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 46212: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 46216: 4a88 tstl %a0 <== NOT EXECUTED 46218: 670e beqs 46228 <== NOT EXECUTED 4621a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4621e: 4a88 tstl %a0 <== NOT EXECUTED 46220: 6706 beqs 46228 <== NOT EXECUTED 46222: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46224: 4e90 jsr %a0@ <== NOT EXECUTED 46226: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 46228: 4a03 tstb %d3 <== NOT EXECUTED 4622a: 6718 beqs 46244 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4622c: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 46230: 4a88 tstl %a0 <== NOT EXECUTED 46232: 6710 beqs 46244 <== NOT EXECUTED 46234: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 46238: 4a88 tstl %a0 <== NOT EXECUTED 4623a: 6708 beqs 46244 <== NOT EXECUTED 4623c: 486e ffec pea %fp@(-20) <== NOT EXECUTED 46240: 4e90 jsr %a0@ <== NOT EXECUTED 46242: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 46244: 4eb9 0005 0e18 jsr 50e18 <__errno> <== NOT EXECUTED 4624a: 78ff moveq #-1,%d4 <== NOT EXECUTED 4624c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4624e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 46254: 6040 bras 46296 <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 46256: 2f02 movel %d2,%sp@- 46258: 2f04 movel %d4,%sp@- 4625a: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4625c: 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 ); 46260: 2800 movel %d0,%d4 rtems_filesystem_freenode( &loc ); 46262: 508f addql #8,%sp 46264: 4a88 tstl %a0 46266: 670e beqs 46276 <== NEVER TAKEN 46268: 2068 001c moveal %a0@(28),%a0 4626c: 4a88 tstl %a0 4626e: 6706 beqs 46276 <== NEVER TAKEN 46270: 2f02 movel %d2,%sp@- 46272: 4e90 jsr %a0@ 46274: 588f addql #4,%sp if ( free_parentloc ) 46276: 4a03 tstb %d3 46278: 671c beqs 46296 rtems_filesystem_freenode( &parentloc ); 4627a: 206e fff8 moveal %fp@(-8),%a0 4627e: 4a88 tstl %a0 46280: 6714 beqs 46296 <== NEVER TAKEN 46282: 2068 001c moveal %a0@(28),%a0 46286: 4a88 tstl %a0 46288: 670c beqs 46296 <== NEVER TAKEN 4628a: 486e ffec pea %fp@(-20) 4628e: 4e90 jsr %a0@ 46290: 588f addql #4,%sp 46292: 6002 bras 46296 46294: 78ff moveq #-1,%d4 return result; } 46296: 2004 movel %d4,%d0 46298: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 4629e: 4e5e unlk %fp ... 0004b728 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4b728: 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; } 4b72c: 203c 0005 b644 movel #374340,%d0 <== NOT EXECUTED 4b732: 4e5e unlk %fp <== NOT EXECUTED ... 00048e18 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 48e18: 4e56 0000 linkw %fp,#0 48e1c: 2f02 movel %d2,%sp@- 48e1e: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 48e22: 2f02 movel %d2,%sp@- 48e24: 2f2e 0008 movel %fp@(8),%sp@- 48e28: 4eb9 0004 8e50 jsr 48e50 if (nap) 48e2e: 508f addql #8,%sp 48e30: 4a80 tstl %d0 48e32: 670c beqs 48e40 <== NEVER TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } 48e34: 2040 moveal %d0,%a0 48e36: 242e fffc movel %fp@(-4),%d2 48e3a: 4e5e unlk %fp 48e3c: 2010 movel %a0@,%d0 48e3e: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 48e40: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 48e44: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48e48: 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); 48e4a: 4ef9 0004 b728 jmp 4b728 <== NOT EXECUTED 00048e50 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 48e50: 4e56 0000 linkw %fp,#0 48e54: 2f0a movel %a2,%sp@- 48e56: 246e 0008 moveal %fp@(8),%a2 48e5a: 2f02 movel %d2,%sp@- 48e5c: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 48e60: 2012 movel %a2@,%d0 48e62: 6718 beqs 48e7c <== NEVER TAKEN 48e64: 4879 0005 a736 pea 5a736 48e6a: 2f00 movel %d0,%sp@- 48e6c: 4eb9 0004 d990 jsr 4d990 48e72: 508f addql #8,%sp 48e74: 4a80 tstl %d0 48e76: 6604 bnes 48e7c <== ALWAYS TAKEN default_ap = ap++; 48e78: 200a movel %a2,%d0 <== NOT EXECUTED 48e7a: 600a bras 48e86 <== NOT EXECUTED 48e7c: 4280 clrl %d0 48e7e: 600a bras 48e8a for ( ; ap->name; ap++) if (ap->local_value == local_value) 48e80: b4aa 0004 cmpl %a2@(4),%d2 48e84: 670a beqs 48e90 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 48e86: 45ea 000c lea %a2@(12),%a2 48e8a: 4a92 tstl %a2@ 48e8c: 66f2 bnes 48e80 48e8e: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 48e90: 200a movel %a2,%d0 48e92: 242e fff8 movel %fp@(-8),%d2 48e96: 246e fffc moveal %fp@(-4),%a2 48e9a: 4e5e unlk %fp ... 0004b738 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4b738: 4e56 0000 linkw %fp,#0 4b73c: 2f0a movel %a2,%sp@- 4b73e: 246e 0008 moveal %fp@(8),%a2 4b742: 2f02 movel %d2,%sp@- 4b744: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4b748: 2012 movel %a2@,%d0 4b74a: 6718 beqs 4b764 <== NEVER TAKEN 4b74c: 4879 0005 a736 pea 5a736 4b752: 2f00 movel %d0,%sp@- 4b754: 4eb9 0004 d990 jsr 4d990 4b75a: 508f addql #8,%sp 4b75c: 4a80 tstl %d0 4b75e: 6604 bnes 4b764 <== ALWAYS TAKEN default_ap = ap++; 4b760: 200a movel %a2,%d0 <== NOT EXECUTED 4b762: 600a bras 4b76e <== NOT EXECUTED 4b764: 4280 clrl %d0 4b766: 600a bras 4b772 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4b768: b4aa 0008 cmpl %a2@(8),%d2 4b76c: 670a beqs 4b778 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4b76e: 45ea 000c lea %a2@(12),%a2 4b772: 4a92 tstl %a2@ 4b774: 66f2 bnes 4b768 4b776: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4b778: 200a movel %a2,%d0 4b77a: 242e fff8 movel %fp@(-8),%d2 4b77e: 246e fffc moveal %fp@(-4),%a2 4b782: 4e5e unlk %fp ... 0004c374 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4c374: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4c378: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4c37c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4c380: 4eb9 0004 8e50 jsr 48e50 <== NOT EXECUTED if (nap) 4c386: 508f addql #8,%sp <== NOT EXECUTED 4c388: 4a80 tstl %d0 <== NOT EXECUTED 4c38a: 6706 beqs 4c392 <== NOT EXECUTED return nap->remote_value; 4c38c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c38e: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4c392: 4e5e unlk %fp <== NOT EXECUTED ... 00042140 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42140: 4e56 ffe8 linkw %fp,#-24 42144: 202e 0008 movel %fp@(8),%d0 42148: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4214c: 246e 000c moveal %fp@(12),%a2 42150: 242e 0010 movel %fp@(16),%d2 const char *p; if ( !name ) 42154: 4a80 tstl %d0 42156: 6756 beqs 421ae return NULL; if ( !value ) 42158: 4a8a tstl %a2 4215a: 6754 beqs 421b0 return NULL; if ( !length ) 4215c: 4a82 tstl %d2 4215e: 674e beqs 421ae return NULL; value[0] = '\0'; 42160: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 42162: 2f00 movel %d0,%sp@- 42164: 4eb9 0004 21bc jsr 421bc if ( !p ) 4216a: 588f addql #4,%sp 4216c: 4a80 tstl %d0 4216e: 673e beqs 421ae int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; 4217e: 5283 addql #1,%d3 42180: 600c bras 4218e } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42182: 0803 0000 btst #0,%d3 42186: 6606 bnes 4218e 42188: 7c20 moveq #32,%d6 4218a: bc85 cmpl %d5,%d6 4218c: 6722 beqs 421b0 break; value[i++] = *p++; 4218e: 1584 1800 moveb %d4,%a2@(00000000,%d1:l) value[i] = '\0'; 42192: 4204 clrb %d4 for (i=0 ; *p && i 421a8: b481 cmpl %d1,%d2 421aa: 62cc bhis 42178 <== ALWAYS TAKEN 421ac: 6002 bras 421b0 <== NOT EXECUTED 421ae: 95ca subal %a2,%a2 return NULL; copy_string( p, value, length ); return value; } 421b0: 200a movel %a2,%d0 421b2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 421b8: 4e5e unlk %fp <== NOT EXECUTED 000421e4 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421e4: 4e56 fff4 linkw %fp,#-12 421e8: 48d7 001c moveml %d2-%d4,%sp@ const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 421ec: 2f2e 0010 movel %fp@(16),%sp@- const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421f0: 242e 000c movel %fp@(12),%d2 421f4: 282e 0008 movel %fp@(8),%d4 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 421f8: 2f02 movel %d2,%sp@- 421fa: 2f04 movel %d4,%sp@- 421fc: 4eb9 0004 2140 jsr 42140 if ( !p ) 42202: 4fef 000c lea %sp@(12),%sp { const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 42206: 2600 movel %d0,%d3 if ( !p ) 42208: 6746 beqs 42250 return NULL; rhs = &p[strlen(name)]; 4220a: 2f04 movel %d4,%sp@- 4220c: 4eb9 0004 e23c jsr 4e23c 42212: 588f addql #4,%sp 42214: 2043 moveal %d3,%a0 42216: d1c0 addal %d0,%a0 if ( *rhs != '=' ) 42218: 723d moveq #61,%d1 4221a: 1010 moveb %a0@,%d0 4221c: 49c0 extbl %d0 4221e: b280 cmpl %d0,%d1 42220: 662e bnes 42250 <== NEVER TAKEN return NULL; rhs++; 42222: 5288 addql #1,%a0 if ( *rhs == '\"' ) 42224: 123c 0022 moveb #34,%d1 42228: 1010 moveb %a0@,%d0 4222a: 49c0 extbl %d0 4222c: b280 cmpl %d0,%d1 4222e: 6602 bnes 42232 rhs++; 42230: 5288 addql #1,%a0 42232: 2242 moveal %d2,%a1 42234: 6002 bras 42238 for ( d=value ; *rhs ; ) *d++ = *rhs++; 42236: 12c0 moveb %d0,%a1@+ return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42238: 1010 moveb %a0@,%d0 *d++ = *rhs++; 4223a: 5288 addql #1,%a0 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 4223c: 66f8 bnes 42236 *d++ = *rhs++; if ( *(d-1) == '\"' ) 4223e: 2049 moveal %a1,%a0 42240: 7222 moveq #34,%d1 42242: 1020 moveb %a0@-,%d0 42244: 49c0 extbl %d0 42246: b280 cmpl %d0,%d1 42248: 6602 bnes 4224c 4224a: 2248 moveal %a0,%a1 d--; *d = '\0'; 4224c: 4211 clrb %a1@ return value; 4224e: 6002 bras 42252 42250: 4282 clrl %d2 } 42252: 2002 movel %d2,%d0 42254: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4225a: 4e5e unlk %fp ... 0004c344 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4c344: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4c348: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4c34a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4c34e: 4879 0005 ab12 pea 5ab12 <== NOT EXECUTED 4c354: 4eb9 0004 c374 jsr 4c374 <== NOT EXECUTED 4c35a: 508f addql #8,%sp <== NOT EXECUTED 4c35c: 2400 movel %d0,%d2 <== NOT EXECUTED 4c35e: 670a beqs 4c36a <== NOT EXECUTED { errno = rc; 4c360: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 4c366: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c368: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4c36a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4c36e: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c370: 4e5e unlk %fp <== NOT EXECUTED 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 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 de54 jsr 4de54 4213c: 588f addql #4,%sp 4213e: 41f2 08ff lea %a2@(ffffffff,%d0:l),%a0 while ( len ) { 42142: 601c bras 42160 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 <== NEVER TAKEN 4215c: 4a01 tstb %d1 4215e: 6704 beqs 42164 <== NEVER TAKEN const char *pathname ) { int len = strlen( pathname ); while ( len ) { 42160: 4a80 tstl %d0 42162: 66e0 bnes 42144 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 42164: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4216a: 4e5e unlk %fp <== NOT EXECUTED 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 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 4225e: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 42264: 760e moveq #14,%d3 <== NOT EXECUTED 42266: 2040 moveal %d0,%a0 <== NOT EXECUTED 42268: 2083 movel %d3,%a0@ <== NOT EXECUTED 4226a: 6000 008e braw 422fa <== NOT EXECUTED if ( !pathloc ) 4226e: 4a82 tstl %d2 42270: 660e bnes 42280 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 42272: 4eb9 0004 ca88 jsr 4ca88 <__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 <== NEVER TAKEN 42294: 4a00 tstb %d0 42296: 6620 bnes 422b8 <== ALWAYS TAKEN 42298: 4878 0014 pea 14 4229c: 2079 0005 b5b4 moveal 5b5b4 ,%a0 422a2: 41e8 0018 lea %a0@(24),%a0 422a6: 2f08 movel %a0,%sp@- 422a8: 2f02 movel %d2,%sp@- 422aa: 4eb9 0004 d2a8 jsr 4d2a8 422b0: 4fef 000c lea %sp@(12),%sp 422b4: 7001 moveq #1,%d0 422b6: 601c bras 422d4 422b8: 4878 0014 pea 14 422bc: 2039 0005 b5b4 movel 5b5b4 ,%d0 422c2: 5880 addql #4,%d0 422c4: 2f00 movel %d0,%sp@- 422c6: 2f02 movel %d2,%sp@- 422c8: 4eb9 0004 d2a8 jsr 4d2a8 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 <== NOT EXECUTED 422fc: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 42302: 4e5e unlk %fp <== NOT EXECUTED ... 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 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 4218e: 4eb9 0004 ca88 jsr 4ca88 <__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 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 421a4: 4eb9 0004 ca88 jsr 4ca88 <__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 <== NEVER 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 <== ALWAYS 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 <== ALWAYS 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 ca88 jsr 4ca88 <__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 <== NOT EXECUTED 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 b5b4 moveal 5b5b4 ,%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 9bf8 tstl 59bf8 41e2c: 6608 bnes 41e36 <== ALWAYS 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 b4ac moveal 5b4ac ,%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 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 41e5e: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 41e64: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED rtems_filesystem_link_counts = 0; 41e6a: 2079 0005 b5b4 moveal 5b5b4 ,%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 d2a8 lea 4d2a8 ,%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 9f62 pea 59f62 41eae: 4e93 jsr %a3@ rtems_filesystem_root = loc; 41eb0: 4fef 0020 lea %sp@(32),%sp 41eb4: 4878 0014 pea 14 41eb8: 2079 0005 b5b4 moveal 5b5b4 ,%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 9f62 pea 59f62 41ed8: 4e93 jsr %a3@ rtems_filesystem_current = loc; 41eda: 4fef 0020 lea %sp@(32),%sp 41ede: 4878 0014 pea 14 41ee2: 2279 0005 b5b4 moveal 5b5b4 ,%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 9f64 pea 59f64 41efa: 4eb9 0004 244c jsr 4244c if ( status != 0 ) 41f00: 4fef 0014 lea %sp@(20),%sp 41f04: 4a80 tstl %d0 41f06: 670a beqs 41f12 <== ALWAYS 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 <== NOT EXECUTED 00047f58 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 47f58: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 47f5c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 47f60: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 47f64: 4e5e unlk %fp <== NOT EXECUTED ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 47f66: 2050 moveal %a0@,%a0 <== NOT EXECUTED 47f68: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 47f6a: 57c0 seq %d0 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 47f6c: 4480 negl %d0 <== NOT EXECUTED 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 { 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 <== NEVER TAKEN 42110: b088 cmpl %a0,%d0 42112: 670e beqs 42122 <== NEVER 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 <== NEVER TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 42122: 241f movel %sp@+,%d2 42124: 4e5e unlk %fp <== NOT EXECUTED 000454b2 : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 454b2: 4e56 0000 linkw %fp,#0 454b6: 42b9 0005 ce90 clrl 5ce90 <_System_state_Current> #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 454bc: 4eb9 0004 7ff4 jsr 47ff4 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 454c2: 4eb9 0004 9fa4 jsr 49fa4 <_Debug_Manager_initialization> _API_extensions_Initialization(); 454c8: 4eb9 0004 5740 jsr 45740 <_API_extensions_Initialization> * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 454ce: 7001 moveq #1,%d0 454d0: 23c0 0005 cd08 movel %d0,5cd08 <_Thread_Dispatch_disable_level> /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); 454d6: 4eb9 0004 7ecc jsr 47ecc <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 454dc: 4eb9 0004 79e8 jsr 479e8 <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 454e2: 4eb9 0004 6034 jsr 46034 <_ISR_Handler_initialization> /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; _API_Mutex_Initialization( 1 ); 454e8: 4878 0001 pea 1 _ISR_Handler_initialization(); /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 454ec: 203c 0005 cd1e movel #380190,%d0 454f2: 23c0 0005 ccc4 movel %d0,5ccc4 <_Objects_Information_table+0x4> _API_Mutex_Initialization( 1 ); 454f8: 4eb9 0004 5870 jsr 45870 <_API_Mutex_Initialization> _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 454fe: 4879 0005 cdba pea 5cdba <_RTEMS_Allocator_Mutex> 45504: 4eb9 0004 57d0 jsr 457d0 <_API_Mutex_Allocate> #include #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) 4550a: 508f addql #8,%sp RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 4550c: 41f9 0005 ce28 lea 5ce28 <_Priority_Bit_map>,%a0 45512: 4240 clrw %d0 45514: 33c0 0005 cdb8 movew %d0,5cdb8 <_Priority_Major_bit_map> for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 4551a: 4258 clrw %a0@+ RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 4551c: b1fc 0005 ce48 cmpal #380488,%a0 45522: 66f6 bnes 4551a _API_Mutex_Initialization( 1 ); _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 45524: 4eb9 0004 7d20 jsr 47d20 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 4552a: 4eb9 0004 5c5c jsr 45c5c <_TOD_Handler_initialization> _Thread_Handler_initialization(); 45530: 4eb9 0004 6f60 jsr 46f60 <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 45536: 4eb9 0004 56ec jsr 456ec <_RTEMS_API_Initialize> _Extension_Manager_initialization(); 4553c: 4eb9 0004 558c jsr 4558c <_Extension_Manager_initialization> _IO_Manager_initialization(); 45542: 4eb9 0004 5604 jsr 45604 <_IO_Manager_initialization> #ifdef RTEMS_POSIX_API _POSIX_API_Initialize(); 45548: 4eb9 0004 5698 jsr 45698 <_POSIX_API_Initialize> _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 4554e: 4e5e unlk %fp 45550: 7001 moveq #1,%d0 45552: 23c0 0005 ce90 movel %d0,5ce90 <_System_state_Current> * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 45558: 4ef9 0004 6aa4 jmp 46aa4 <_Thread_Create_idle> ... 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 de54 lea 4de54 ,%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 ca88 jsr 4ca88 <__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 00046da4 : 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 ) { 46da4: 4e56 0000 linkw %fp,#0 46da8: 206e 000c moveal %fp@(12),%a0 46dac: 2f0a movel %a2,%sp@- 46dae: 226e 0010 moveal %fp@(16),%a1 46db2: 2f02 movel %d2,%sp@- 46db4: 242e 0008 movel %fp@(8),%d2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 46db8: 2039 0006 2a0a movel 62a0a <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 46dbe: 2239 0006 21ea movel 621ea <_ISR_Nest_level>,%d1 46dc4: 6706 beqs 46dcc 46dc6: 7012 moveq #18,%d0 46dc8: 6000 00d6 braw 46ea0 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 46dcc: 4a89 tstl %a1 46dce: 6700 00ce beqw 46e9e return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 46dd2: 2280 movel %d0,%a1@ if ( driver_table == NULL ) 46dd4: 4a88 tstl %a0 46dd6: 6700 00c6 beqw 46e9e static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46dda: 4a90 tstl %a0@ 46ddc: 6600 00ce bnew 46eac 46de0: 4aa8 0004 tstl %a0@(4) 46de4: 6600 00c6 bnew 46eac 46de8: 6000 00b4 braw 46e9e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46dec: 2039 0006 2150 movel 62150 <_Thread_Dispatch_disable_level>,%d0 46df2: 5280 addql #1,%d0 46df4: 23c0 0006 2150 movel %d0,62150 <_Thread_Dispatch_disable_level> if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 46dfa: 4a82 tstl %d2 46dfc: 662c bnes 46e2a static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 46dfe: 2039 0006 2a0a movel 62a0a <_IO_Number_of_drivers>,%d0 46e04: 2479 0006 2a0e moveal 62a0e <_IO_Driver_address_table>,%a2 46e0a: 6010 bras 46e1c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46e0c: 4a92 tstl %a2@ 46e0e: 6600 00a6 bnew 46eb6 46e12: 4aaa 0004 tstl %a2@(4) 46e16: 6600 009e bnew 46eb6 46e1a: 6004 bras 46e20 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 ) { 46e1c: b082 cmpl %d2,%d0 46e1e: 62ec bhis 46e0c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 46e20: 2282 movel %d2,%a1@ if ( m != n ) 46e22: b082 cmpl %d2,%d0 46e24: 6634 bnes 46e5a 46e26: 6000 0098 braw 46ec0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 46e2a: 2202 movel %d2,%d1 46e2c: 2002 movel %d2,%d0 46e2e: e789 lsll #3,%d1 46e30: eb88 lsll #5,%d0 46e32: 2479 0006 2a0e moveal 62a0e <_IO_Driver_address_table>,%a2 46e38: 9081 subl %d1,%d0 46e3a: 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; 46e3c: 4a92 tstl %a2@ 46e3e: 660e bnes 46e4e 46e40: 4aaa 0004 tstl %a2@(4) 46e44: 57c0 seq %d0 46e46: 49c0 extbl %d0 46e48: 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 ) ) { 46e4a: 4a00 tstb %d0 46e4c: 660a bnes 46e58 _Thread_Enable_dispatch(); 46e4e: 4eb9 0004 86ca jsr 486ca <_Thread_Enable_dispatch> 46e54: 700c moveq #12,%d0 return RTEMS_RESOURCE_IN_USE; 46e56: 6048 bras 46ea0 } *registered_major = major; 46e58: 2282 movel %d2,%a1@ } _IO_Driver_address_table [major] = *driver_table; 46e5a: 4878 0018 pea 18 46e5e: 2202 movel %d2,%d1 46e60: 2002 movel %d2,%d0 46e62: e789 lsll #3,%d1 46e64: eb88 lsll #5,%d0 46e66: 2f08 movel %a0,%sp@- 46e68: 9081 subl %d1,%d0 46e6a: d0b9 0006 2a0e addl 62a0e <_IO_Driver_address_table>,%d0 46e70: 2f00 movel %d0,%sp@- 46e72: 4eb9 0005 1d70 jsr 51d70 _Thread_Enable_dispatch(); 46e78: 4eb9 0004 86ca jsr 486ca <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } 46e7e: 246e fffc moveal %fp@(-4),%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e82: 4fef 000c lea %sp@(12),%sp 46e86: 2d42 0008 movel %d2,%fp@(8) } 46e8a: 242e fff8 movel %fp@(-8),%d2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e8e: 42ae 0010 clrl %fp@(16) 46e92: 42ae 000c clrl %fp@(12) } 46e96: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e98: 4ef9 0004 ea34 jmp 4ea34 46e9e: 7009 moveq #9,%d0 } 46ea0: 242e fff8 movel %fp@(-8),%d2 46ea4: 246e fffc moveal %fp@(-4),%a2 46ea8: 4e5e unlk %fp 46eaa: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 46eac: b082 cmpl %d2,%d0 46eae: 6200 ff3c bhiw 46dec 46eb2: 700a moveq #10,%d0 46eb4: 60ea bras 46ea0 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 ) { 46eb6: 5282 addql #1,%d2 46eb8: 45ea 0018 lea %a2@(24),%a2 46ebc: 6000 ff5e braw 46e1c if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 46ec0: 4eb9 0004 86ca jsr 486ca <_Thread_Enable_dispatch> 46ec6: 7005 moveq #5,%d0 return sc; 46ec8: 60d6 bras 46ea0 ... 00047394 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 47394: 4e56 fff0 linkw %fp,#-16 47398: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4739c: 286e 0008 moveal %fp@(8),%a4 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 473a0: 4a8c tstl %a4 473a2: 6740 beqs 473e4 <== NEVER TAKEN 473a4: 45f9 0006 6be4 lea 66be4 <_Objects_Information_table+0x4>,%a2 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 473aa: 2052 moveal %a2@,%a0 473ac: 4a88 tstl %a0 473ae: 672a beqs 473da continue; information = _Objects_Information_table[ api_index ][ 1 ]; 473b0: 2668 0004 moveal %a0@(4),%a3 if ( !information ) 473b4: 4a8b tstl %a3 473b6: 6722 beqs 473da 473b8: 7401 moveq #1,%d2 473ba: 6014 bras 473d0 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 473bc: 206b 0018 moveal %a3@(24),%a0 473c0: 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++ ) { 473c4: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 473c6: 4a80 tstl %d0 473c8: 6706 beqs 473d0 <== NEVER TAKEN continue; (*routine)(the_thread); 473ca: 2f00 movel %d0,%sp@- 473cc: 4e94 jsr %a4@ 473ce: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 473d0: 4280 clrl %d0 473d2: 302b 000e movew %a3@(14),%d0 473d6: b082 cmpl %d2,%d0 473d8: 64e2 bccs 473bc 473da: 588a addql #4,%a2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 473dc: b5fc 0006 6bf4 cmpal #420852,%a2 473e2: 66c6 bnes 473aa (*routine)(the_thread); } } } 473e4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 473ea: 4e5e unlk %fp ... 00049314 : * 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 ) { 49314: 4e56 fffc linkw %fp,#-4 49318: 2f0a movel %a2,%sp@- 4931a: 2f02 movel %d2,%sp@- rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4931c: 42a7 clrl %sp@- 4931e: 42a7 clrl %sp@- 49320: 2f39 0005 cbb0 movel 5cbb0 ,%sp@- 49326: 4eb9 0004 4f30 jsr 44f30 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 4932c: 2039 0005 cbac movel 5cbac ,%d0 49332: 4fef 000c lea %sp@(12),%sp 49336: 6760 beqs 49398 rc = rtems_semaphore_create( 49338: 486e fffc pea %fp@(-4) 4933c: 90b9 0005 cba8 subl 5cba8 ,%d0 49342: ec80 asrl #6,%d0 49344: 42a7 clrl %sp@- 49346: 4878 0054 pea 54 4934a: 4878 0001 pea 1 4934e: 0080 4c42 4900 oril #1279412480,%d0 49354: 2f00 movel %d0,%sp@- 49356: 4eb9 0004 4cf8 jsr 44cf8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 4935c: 4fef 0014 lea %sp@(20),%sp 49360: 4a80 tstl %d0 49362: 6634 bnes 49398 <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 49364: 2479 0005 cbac moveal 5cbac ,%a2 next = iop->data1; 4936a: 242a 0034 movel %a2@(52),%d2 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4936e: 4878 0040 pea 40 49372: 42a7 clrl %sp@- 49374: 2f0a movel %a2,%sp@- 49376: 4eb9 0004 d318 jsr 4d318 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4937c: 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; 49382: 203c 0000 0100 movel #256,%d0 iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 49388: 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; 4938c: 23c2 0005 cbac movel %d2,5cbac 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; 49392: 2540 0014 movel %d0,%a2@(20) iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 49396: 6002 bras 4939a 49398: 95ca subal %a2,%a2 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4939a: 2f39 0005 cbb0 movel 5cbb0 ,%sp@- 493a0: 4eb9 0004 5034 jsr 45034 iop = 0; done: rtems_libio_unlock(); return iop; } 493a6: 242e fff4 movel %fp@(-12),%d2 493aa: 200a movel %a2,%d0 493ac: 246e fff8 moveal %fp@(-8),%a2 493b0: 4e5e unlk %fp <== NOT EXECUTED 000492b6 : */ void rtems_libio_free( rtems_libio_t *iop ) { 492b6: 4e56 0000 linkw %fp,#0 492ba: 2f0a movel %a2,%sp@- rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 492bc: 42a7 clrl %sp@- 492be: 246e 0008 moveal %fp@(8),%a2 492c2: 42a7 clrl %sp@- 492c4: 2f39 0005 cbb0 movel 5cbb0 ,%sp@- 492ca: 4eb9 0004 4f30 jsr 44f30 rtems_libio_lock(); if (iop->sem) 492d0: 202a 002c movel %a2@(44),%d0 492d4: 4fef 000c lea %sp@(12),%sp 492d8: 670a beqs 492e4 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 492da: 2f00 movel %d0,%sp@- 492dc: 4eb9 0004 4e94 jsr 44e94 492e2: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 492e4: 41f9 0005 cbac lea 5cbac ,%a0 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 492ea: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 492f0: 2550 0034 movel %a0@,%a2@(52) } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 492f4: 41f9 0005 cbb0 lea 5cbb0 ,%a0 492fa: 2d50 0008 movel %a0@,%fp@(8) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 492fe: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 49302: 23ca 0005 cbac movel %a2,5cbac rtems_libio_unlock(); } 49308: 246e fffc moveal %fp@(-4),%a2 4930c: 4e5e unlk %fp 4930e: 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 b4a4 movel 5b4a4 ,%d0 42312: 6742 beqs 42356 <== NEVER 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 8ea0 jsr 48ea0 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 cba8 movel %d0,5cba8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42328: 6606 bnes 42330 <== ALWAYS 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 cbac movel %d0,5cbac for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42336: 2040 moveal %d0,%a0 42338: 4280 clrl %d0 4233a: 2239 0005 b4a4 movel 5b4a4 ,%d1 42340: 6004 bras 42346 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 cbb0 pea 5cbb0 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 <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); 4237a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4237c: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 42382: 2279 0005 b4a0 moveal 5b4a0 ,%a1 42388: 4a89 tstl %a1 4238a: 6704 beqs 42390 <== NEVER 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 00043be6 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 43be6: 4e56 ffd4 linkw %fp,#-44 43bea: 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); 43bee: 486e fffc pea %fp@(-4) 43bf2: 42a7 clrl %sp@- 43bf4: 42a7 clrl %sp@- 43bf6: 4eb9 0004 632c jsr 4632c if (sc != RTEMS_SUCCESSFUL) return sc; 43bfc: 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); 43c00: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) return sc; 43c02: 6600 00f0 bnew 43cf4 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 43c06: 203c 0005 f278 movel #389752,%d0 43c0c: b0b9 0005 dc1c cmpl 5dc1c ,%d0 43c12: 6648 bnes 43c5c rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 43c14: 4878 0048 pea 48 43c18: 4eb9 0004 3140 jsr 43140 if (!tmp) 43c1e: 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)); 43c20: 2600 movel %d0,%d3 if (!tmp) 43c22: 6608 bnes 43c2c <== ALWAYS TAKEN 43c24: 143c 001a moveb #26,%d2 <== NOT EXECUTED 43c28: 6000 00ca braw 43cf4 <== 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); 43c2c: 487a fec2 pea %pc@(43af0 ) 43c30: 4879 0005 dc1c pea 5dc1c 43c36: 42a7 clrl %sp@- 43c38: 4eb9 0004 64a4 jsr 464a4 if (sc != RTEMS_SUCCESSFUL) { 43c3e: 4fef 000c lea %sp@(12),%sp 43c42: 4a80 tstl %d0 43c44: 6710 beqs 43c56 <== ALWAYS TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 43c46: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43c48: 2400 movel %d0,%d2 <== NOT EXECUTED 43c4a: 4eb9 0004 2bf8 jsr 42bf8 <== NOT EXECUTED return sc; 43c50: 588f addql #4,%sp <== NOT EXECUTED 43c52: 6000 00a0 braw 43cf4 <== NOT EXECUTED } rtems_current_user_env = tmp; 43c56: 23c3 0005 dc1c movel %d3,5dc1c }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 43c5c: 4878 0048 pea 48 43c60: 45f9 0004 eee8 lea 4eee8 ,%a2 43c66: 4879 0005 f278 pea 5f278 * 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); 43c6c: 260e movel %fp,%d3 43c6e: 0683 ffff ffe8 addil #-24,%d3 43c74: 49f9 0004 2b2e lea 42b2e ,%a4 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 43c7a: 2679 0005 dc1c moveal 5dc1c ,%a3 43c80: 2f0b movel %a3,%sp@- 43c82: 4e92 jsr %a2@ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 43c84: 26ae fffc movel %fp@(-4),%a3@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 43c88: 4878 0014 pea 14 43c8c: 2079 0005 f260 moveal 5f260 ,%a0 43c92: 41e8 001c lea %a0@(28),%a0 43c96: 2f08 movel %a0,%sp@- 43c98: 486b 0018 pea %a3@(24) 43c9c: 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); 43c9e: 42a7 clrl %sp@- 43ca0: 2f03 movel %d3,%sp@- 43ca2: 42a7 clrl %sp@- 43ca4: 4878 0001 pea 1 43ca8: 4879 0005 c43c pea 5c43c 43cae: 4e94 jsr %a4@ rtems_filesystem_root = loc; 43cb0: 4fef 002c lea %sp@(44),%sp 43cb4: 4878 0014 pea 14 43cb8: 2079 0005 dc1c moveal 5dc1c ,%a0 43cbe: 41e8 0018 lea %a0@(24),%a0 43cc2: 2f03 movel %d3,%sp@- 43cc4: 2f08 movel %a0,%sp@- 43cc6: 4e92 jsr %a2@ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 43cc8: 42a7 clrl %sp@- 43cca: 2f03 movel %d3,%sp@- 43ccc: 42a7 clrl %sp@- 43cce: 4878 0001 pea 1 43cd2: 4879 0005 c43c pea 5c43c 43cd8: 4e94 jsr %a4@ rtems_filesystem_current = loc; 43cda: 4fef 0020 lea %sp@(32),%sp 43cde: 4878 0014 pea 14 43ce2: 2039 0005 dc1c movel 5dc1c ,%d0 43ce8: 5880 addql #4,%d0 43cea: 2f03 movel %d3,%sp@- 43cec: 2f00 movel %d0,%sp@- 43cee: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 43cf0: 4fef 000c lea %sp@(12),%sp } 43cf4: 2002 movel %d2,%d0 43cf6: 4cee 1c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a4 43cfc: 4e5e unlk %fp <== NOT EXECUTED 00043b4a : * 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) { 43b4a: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 43b4e: 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); 43b50: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 43b54: 42a7 clrl %sp@- <== NOT EXECUTED 43b56: 42a7 clrl %sp@- <== NOT EXECUTED 43b58: 4eb9 0004 632c jsr 4632c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 43b5e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43b62: 4a80 tstl %d0 <== NOT EXECUTED 43b64: 6678 bnes 43bde <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 43b66: 2479 0005 dc1c moveal 5dc1c ,%a2 <== NOT EXECUTED 43b6c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 43b70: b092 cmpl %a2@,%d0 <== NOT EXECUTED 43b72: 661c bnes 43b90 <== 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); 43b74: 4879 0005 dc1c pea 5dc1c <== NOT EXECUTED 43b7a: 42a7 clrl %sp@- <== NOT EXECUTED 43b7c: 4eb9 0004 6538 jsr 46538 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 43b82: 508f addql #8,%sp <== NOT EXECUTED 43b84: 4a80 tstl %d0 <== NOT EXECUTED 43b86: 6656 bnes 43bde <== NOT EXECUTED free_user_env(tmp); 43b88: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43b8a: 4eba ff64 jsr %pc@(43af0 ) <== NOT EXECUTED 43b8e: 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, 43b90: 486e fffc pea %fp@(-4) <== NOT EXECUTED 43b94: 4879 0005 dc1c pea 5dc1c <== NOT EXECUTED 43b9a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 43b9e: 4eb9 0004 65ac jsr 465ac <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 43ba4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43ba8: 4a80 tstl %d0 <== NOT EXECUTED 43baa: 6626 bnes 43bd2 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 43bac: 487a ff42 pea %pc@(43af0 ) <== NOT EXECUTED 43bb0: 4879 0005 dc1c pea 5dc1c <== NOT EXECUTED 43bb6: 42a7 clrl %sp@- <== NOT EXECUTED 43bb8: 4eb9 0004 64a4 jsr 464a4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 43bbe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43bc2: 4a80 tstl %d0 <== NOT EXECUTED 43bc4: 660c bnes 43bd2 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 43bc6: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED 43bca: 23d0 0005 dc1c movel %a0@,5dc1c <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 43bd0: 600c bras 43bde <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 43bd2: 223c 0005 f278 movel #389752,%d1 <== NOT EXECUTED 43bd8: 23c1 0005 dc1c movel %d1,5dc1c <== NOT EXECUTED return sc; } 43bde: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 43be2: 4e5e unlk %fp <== NOT EXECUTED 0004918c : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4918c: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4918e: 4e56 0000 linkw %fp,#0 49192: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49196: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 49198: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4919a: 7406 moveq #6,%d2 4919c: b480 cmpl %d0,%d2 4919e: 6604 bnes 491a4 <== ALWAYS TAKEN 491a0: 7002 moveq #2,%d0 <== NOT EXECUTED 491a2: 6012 bras 491b6 <== NOT EXECUTED fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 491a4: 0801 0001 btst #1,%d1 491a8: 6704 beqs 491ae <== NEVER TAKEN 491aa: 4280 clrl %d0 491ac: 6008 bras 491b6 491ae: 2001 movel %d1,%d0 <== NOT EXECUTED 491b0: e488 lsrl #2,%d0 <== NOT EXECUTED 491b2: 7401 moveq #1,%d2 <== NOT EXECUTED 491b4: 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 ) { 491b6: 0801 0000 btst #0,%d1 491ba: 6704 beqs 491c0 fcntl_flags |= O_NONBLOCK; 491bc: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 491c0: 0801 0009 btst #9,%d1 491c4: 6704 beqs 491ca fcntl_flags |= O_APPEND; 491c6: 7408 moveq #8,%d2 491c8: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 491ca: 0801 000a btst #10,%d1 491ce: 6704 beqs 491d4 fcntl_flags |= O_CREAT; 491d0: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 491d4: 241f movel %sp@+,%d2 491d6: 4e5e unlk %fp <== NOT EXECUTED 0004db60 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4db60: 4e56 0000 linkw %fp,#0 4db64: 2f0a movel %a2,%sp@- 4db66: 246e 0008 moveal %fp@(8),%a2 4db6a: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 4db6c: 4a8a tstl %a2 4db6e: 6758 beqs 4dbc8 return EINVAL; *pointer = NULL; 4db70: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4db72: 7003 moveq #3,%d0 4db74: b0b9 0006 22d8 cmpl 622d8 <_System_state_Current>,%d0 4db7a: 660a bnes 4db86 <== NEVER TAKEN 4db7c: 4eb9 0004 36cc jsr 436cc 4db82: 4a00 tstb %d0 4db84: 6742 beqs 4dbc8 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4db86: 4eb9 0004 3724 jsr 43724 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 4db8c: 42a7 clrl %sp@- 4db8e: 2f2e 000c movel %fp@(12),%sp@- 4db92: 2f2e 0010 movel %fp@(16),%sp@- 4db96: 2f39 0006 0830 movel 60830 ,%sp@- 4db9c: 4eb9 0004 8070 jsr 48070 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4dba2: 4fef 0010 lea %sp@(16),%sp 4dba6: 2400 movel %d0,%d2 4dba8: 6604 bnes 4dbae 4dbaa: 700c moveq #12,%d0 4dbac: 601c bras 4dbca return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4dbae: 2079 0006 0ed6 moveal 60ed6 ,%a0 4dbb4: 4a88 tstl %a0 4dbb6: 670a beqs 4dbc2 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4dbb8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4dbba: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4dbbe: 4e90 jsr %a0@ <== NOT EXECUTED 4dbc0: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 4dbc2: 2482 movel %d2,%a2@ 4dbc4: 4280 clrl %d0 return 0; 4dbc6: 6002 bras 4dbca 4dbc8: 7016 moveq #22,%d0 } 4dbca: 242e fff8 movel %fp@(-8),%d2 4dbce: 246e fffc moveal %fp@(-4),%a2 4dbd2: 4e5e unlk %fp ... 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 0004f390 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 4f390: 4e56 fffc linkw %fp,#-4 4f394: 2f0a movel %a2,%sp@- 4f396: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4f398: 486e fffc pea %fp@(-4) 4f39c: 2f2e 0008 movel %fp@(8),%sp@- 4f3a0: 4879 0007 52e6 pea 752e6 <_Partition_Information> 4f3a6: 242e 000c movel %fp@(12),%d2 4f3aa: 4eb9 0005 378c jsr 5378c <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4f3b0: 4fef 000c lea %sp@(12),%sp 4f3b4: 2440 moveal %d0,%a2 4f3b6: 4aae fffc tstl %fp@(-4) 4f3ba: 6704 beqs 4f3c0 4f3bc: 7004 moveq #4,%d0 4f3be: 603c bras 4f3fc ) { void *starting; void *ending; starting = the_partition->starting_address; 4f3c0: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 4f3c4: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 4f3c8: b082 cmpl %d2,%d0 4f3ca: 623c bhis 4f408 <== NEVER TAKEN 4f3cc: d280 addl %d0,%d1 4f3ce: b282 cmpl %d2,%d1 4f3d0: 6536 bcss 4f408 <== NEVER TAKEN return ( 4f3d2: 2202 movel %d2,%d1 4f3d4: 9280 subl %d0,%d1 4f3d6: 2001 movel %d1,%d0 4f3d8: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 4f3de: 4a81 tstl %d1 4f3e0: 6626 bnes 4f408 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 4f3e2: 2f02 movel %d2,%sp@- 4f3e4: 486a 0024 pea %a2@(36) 4f3e8: 4eb9 0005 1fdc jsr 51fdc <_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; 4f3ee: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 4f3f2: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4f3f8: 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(); 4f3fa: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4f3fc: 242e fff4 movel %fp@(-12),%d2 4f400: 246e fff8 moveal %fp@(-8),%a2 4f404: 4e5e unlk %fp 4f406: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4f408: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 4f40e: 7009 moveq #9,%d0 return RTEMS_INVALID_ADDRESS; 4f410: 60ea bras 4f3fc ... 0004ac36 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4ac36: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 4ac3a: 4a39 0005 bb34 tstb 5bb34 4ac40: 6740 beqs 4ac82 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 4ac42: 4ab9 0005 c4b4 tstl 5c4b4 <== NOT EXECUTED 4ac48: 6638 bnes 4ac82 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4ac4a: 4879 0005 c4b4 pea 5c4b4 <== NOT EXECUTED 4ac50: 42a7 clrl %sp@- <== NOT EXECUTED 4ac52: 4878 0054 pea 54 <== NOT EXECUTED 4ac56: 4878 0001 pea 1 <== NOT EXECUTED 4ac5a: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4ac60: 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) 4ac66: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4ac6a: 4a80 tstl %d0 <== NOT EXECUTED 4ac6c: 6708 beqs 4ac76 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4ac6e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ac70: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4ac76: 4eb9 0004 4910 jsr 44910 <== NOT EXECUTED rtems_pipe_no = now; 4ac7c: 33c0 0005 c4bc movew %d0,5c4bc <== NOT EXECUTED } 4ac82: 4e5e unlk %fp <== NOT EXECUTED 00045c30 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 45c30: 4e56 ffec linkw %fp,#-20 45c34: 48d7 041c moveml %d2-%d4/%a2,%sp@ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 45c38: 486e fffc pea %fp@(-4) 45c3c: 262e 0008 movel %fp@(8),%d3 45c40: 2f03 movel %d3,%sp@- 45c42: 4879 0005 e840 pea 5e840 <_Rate_monotonic_Information> 45c48: 242e 000c movel %fp@(12),%d2 45c4c: 4eb9 0004 7ac4 jsr 47ac4 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 45c52: 4fef 000c lea %sp@(12),%sp 45c56: 2440 moveal %d0,%a2 45c58: 4aae fffc tstl %fp@(-4) 45c5c: 6600 0138 bnew 45d96 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 45c60: 2039 0005 e9fe movel 5e9fe <_Thread_Executing>,%d0 45c66: b0aa 0040 cmpl %a2@(64),%d0 45c6a: 670c beqs 45c78 _Thread_Enable_dispatch(); 45c6c: 4eb9 0004 82be jsr 482be <_Thread_Enable_dispatch> 45c72: 7817 moveq #23,%d4 return RTEMS_NOT_OWNER_OF_RESOURCE; 45c74: 6000 0122 braw 45d98 } if ( length == RTEMS_PERIOD_STATUS ) { 45c78: 4a82 tstl %d2 45c7a: 6622 bnes 45c9e switch ( the_period->state ) { 45c7c: 202a 0038 movel %a2@(56),%d0 45c80: 7204 moveq #4,%d1 45c82: b280 cmpl %d0,%d1 45c84: 6404 bccs 45c8a <== ALWAYS TAKEN 45c86: 4284 clrl %d4 <== NOT EXECUTED 45c88: 600a bras 45c94 <== NOT EXECUTED 45c8a: 41f9 0005 bdf2 lea 5bdf2 ,%a0 45c90: 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(); 45c94: 4eb9 0004 82be jsr 482be <_Thread_Enable_dispatch> return( return_value ); 45c9a: 6000 00fc braw 45d98 } _ISR_Disable( level ); 45c9e: 203c 0000 0700 movel #1792,%d0 45ca4: 40c4 movew %sr,%d4 45ca6: 8084 orl %d4,%d0 45ca8: 46c0 movew %d0,%sr switch ( the_period->state ) { 45caa: 202a 0038 movel %a2@(56),%d0 45cae: 7202 moveq #2,%d1 45cb0: b280 cmpl %d0,%d1 45cb2: 6740 beqs 45cf4 45cb4: 123c 0004 moveb #4,%d1 45cb8: b280 cmpl %d0,%d1 45cba: 6700 00a4 beqw 45d60 45cbe: 4a80 tstl %d0 45cc0: 6600 00d4 bnew 45d96 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 45cc4: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 45cc6: 2f0a movel %a2,%sp@- ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 45cc8: 4284 clrl %d4 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 45cca: 4eb9 0004 5a1c jsr 45a1c <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 45cd0: 203c 0004 5fdc movel #286684,%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 45cd6: 7202 moveq #2,%d1 45cd8: 2540 002c movel %d0,%a2@(44) the_watchdog->id = id; 45cdc: 2543 0030 movel %d3,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 45ce0: 2542 001c movel %d2,%a2@(28) 45ce4: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45ce8: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 45cec: 42aa 0034 clrl %a2@(52) 45cf0: 6000 0084 braw 45d76 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 45cf4: 2f0a movel %a2,%sp@- 45cf6: 4eb9 0004 5b3c jsr 45b3c <_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; 45cfc: 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; 45d00: 7401 moveq #1,%d2 45d02: 2542 0038 movel %d2,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 45d06: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 45d08: 2079 0005 e9fe moveal 5e9fe <_Thread_Executing>,%a0 45d0e: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 45d14: 4878 4000 pea 4000 45d18: 2f08 movel %a0,%sp@- 45d1a: 4eb9 0004 8b1c jsr 48b1c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 45d20: 203c 0000 0700 movel #1792,%d0 45d26: 40c1 movew %sr,%d1 45d28: 8081 orl %d1,%d0 45d2a: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 45d2c: 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; 45d30: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 45d34: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 45d38: 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 ) 45d3a: 7203 moveq #3,%d1 45d3c: 4fef 000c lea %sp@(12),%sp 45d40: b280 cmpl %d0,%d1 45d42: 6612 bnes 45d56 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 45d44: 4878 4000 pea 4000 45d48: 2f39 0005 e9fe movel 5e9fe <_Thread_Executing>,%sp@- 45d4e: 4eb9 0004 7f04 jsr 47f04 <_Thread_Clear_state> 45d54: 508f addql #8,%sp _Thread_Enable_dispatch(); 45d56: 4eb9 0004 82be jsr 482be <_Thread_Enable_dispatch> 45d5c: 4284 clrl %d4 return RTEMS_SUCCESSFUL; 45d5e: 6038 bras 45d98 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 45d60: 2f0a movel %a2,%sp@- 45d62: 4eb9 0004 5b3c jsr 45b3c <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 45d68: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 45d6a: 7002 moveq #2,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 45d6c: 7806 moveq #6,%d4 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 45d6e: 2542 001c movel %d2,%a2@(28) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 45d72: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; 45d76: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45d7a: 486a 0010 pea %a2@(16) 45d7e: 4879 0005 ea1c pea 5ea1c <_Watchdog_Ticks_chain> 45d84: 4eb9 0004 934c jsr 4934c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 45d8a: 4eb9 0004 82be jsr 482be <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 45d90: 4fef 000c lea %sp@(12),%sp 45d94: 6002 bras 45d98 45d96: 7804 moveq #4,%d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45d98: 2004 movel %d4,%d0 45d9a: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 45da0: 4e5e unlk %fp <== NOT EXECUTED 0004ff88 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 4ff88: 4e56 fffc linkw %fp,#-4 4ff8c: 2f03 movel %d3,%sp@- 4ff8e: 262e 0010 movel %fp@(16),%d3 4ff92: 2f02 movel %d2,%sp@- 4ff94: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 4ff98: 6766 beqs 50000 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !size ) 4ff9a: 4a83 tstl %d3 4ff9c: 6762 beqs 50000 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4ff9e: 2f39 0007 550e movel 7550e <_RTEMS_Allocator_Mutex>,%sp@- 4ffa4: 4eb9 0005 1f48 jsr 51f48 <_API_Mutex_Lock> 4ffaa: 486e fffc pea %fp@(-4) 4ffae: 2f2e 0008 movel %fp@(8),%sp@- 4ffb2: 4879 0007 535a pea 7535a <_Region_Information> 4ffb8: 4eb9 0005 3754 jsr 53754 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4ffbe: 222e fffc movel %fp@(-4),%d1 4ffc2: 4fef 0010 lea %sp@(16),%sp 4ffc6: 670a beqs 4ffd2 4ffc8: 7001 moveq #1,%d0 4ffca: b081 cmpl %d1,%d0 4ffcc: 6620 bnes 4ffee <== NEVER TAKEN 4ffce: 7404 moveq #4,%d2 4ffd0: 601e bras 4fff0 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 4ffd2: 2f03 movel %d3,%sp@- 4ffd4: 2040 moveal %d0,%a0 4ffd6: 2f02 movel %d2,%sp@- 4ffd8: 4868 0068 pea %a0@(104) 4ffdc: 4eb9 0005 31d4 jsr 531d4 <_Heap_Size_of_alloc_area> 4ffe2: 4fef 000c lea %sp@(12),%sp 4ffe6: 4a00 tstb %d0 4ffe8: 6604 bnes 4ffee <== ALWAYS TAKEN 4ffea: 7409 moveq #9,%d2 <== NOT EXECUTED 4ffec: 6002 bras 4fff0 <== NOT EXECUTED 4ffee: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4fff0: 2f39 0007 550e movel 7550e <_RTEMS_Allocator_Mutex>,%sp@- 4fff6: 4eb9 0005 1fa8 jsr 51fa8 <_API_Mutex_Unlock> return return_status; 4fffc: 588f addql #4,%sp 4fffe: 6002 bras 50002 50000: 7409 moveq #9,%d2 } 50002: 2002 movel %d2,%d0 50004: 242e fff4 movel %fp@(-12),%d2 50008: 262e fff8 movel %fp@(-8),%d3 5000c: 4e5e unlk %fp <== NOT EXECUTED 00050620 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 50620: 4e56 fffc linkw %fp,#-4 50624: 2f03 movel %d3,%sp@- 50626: 2f02 movel %d2,%sp@- 50628: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 5062c: 6606 bnes 50634 5062e: 700a moveq #10,%d0 50630: 6000 0084 braw 506b6 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 50634: 486e fffc pea %fp@(-4) 50638: 2f2e 0008 movel %fp@(8),%sp@- 5063c: 4eb9 0005 4068 jsr 54068 <_Thread_Get> switch ( location ) { 50642: 508f addql #8,%sp 50644: 4aae fffc tstl %fp@(-4) 50648: 6704 beqs 5064e 5064a: 7004 moveq #4,%d0 5064c: 6068 bras 506b6 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 5064e: 2240 moveal %d0,%a1 50650: 2069 010a moveal %a1@(266),%a0 asr = &api->Signal; 50654: 4aa8 000a tstl %a0@(10) 50658: 6754 beqs 506ae if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 5065a: 4a28 0008 tstb %a0@(8) 5065e: 6732 beqs 50692 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 50660: 223c 0000 0700 movel #1792,%d1 50666: 40c3 movew %sr,%d3 50668: 8283 orl %d3,%d1 5066a: 46c1 movew %d1,%sr *signal_set |= signals; 5066c: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 50670: 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 ) ) 50672: 2239 0007 54f6 movel 754f6 <_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; 50678: 7401 moveq #1,%d2 5067a: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5067e: 4a81 tstl %d1 50680: 6722 beqs 506a4 50682: b0b9 0007 5516 cmpl 75516 <_Thread_Executing>,%d0 50688: 661a bnes 506a4 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 5068a: 13c2 0007 55a4 moveb %d2,755a4 <_ISR_Signals_to_thread_executing> 50690: 6012 bras 506a4 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 50692: 203c 0000 0700 movel #1792,%d0 50698: 40c1 movew %sr,%d1 5069a: 8081 orl %d1,%d0 5069c: 46c0 movew %d0,%sr *signal_set |= signals; 5069e: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 506a2: 46c1 movew %d1,%sr } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 506a4: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 506aa: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 506ac: 6008 bras 506b6 } _Thread_Enable_dispatch(); 506ae: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 506b4: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 506b6: 242e fff4 movel %fp@(-12),%d2 506ba: 262e fff8 movel %fp@(-8),%d3 506be: 4e5e unlk %fp ... 00041ce0 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 41ce0: 4e56 0000 linkw %fp,#0 41ce4: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 41ce8: 4aa8 0008 tstl %a0@(8) 41cec: 671c beqs 41d0a <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 41cee: 4878 0010 pea 10 41cf2: 4879 0005 d1b0 pea 5d1b0 41cf8: 2068 00c2 moveal %a0@(194),%a0 41cfc: 5088 addql #8,%a0 41cfe: 2f08 movel %a0,%sp@- 41d00: 4eb9 0004 d7bc jsr 4d7bc 41d06: 4fef 000c lea %sp@(12),%sp } 41d0a: 4e5e unlk %fp <== NOT EXECUTED 000420cc : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 420cc: 4e56 0000 linkw %fp,#0 420d0: 2f0a movel %a2,%sp@- 420d2: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 420d6: 4eb9 0004 2066 jsr 42066 if (the_thread) 420dc: 4a8a tstl %a2 420de: 6716 beqs 420f6 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 420e0: 2f2a 00be movel %a2@(190),%sp@- 420e4: 4878 00a5 pea a5 420e8: 2f2a 00c2 movel %a2@(194),%sp@- 420ec: 4eb9 0004 d82c jsr 4d82c 420f2: 4fef 000c lea %sp@(12),%sp return true; } 420f6: 246e fffc moveal %fp@(-4),%a2 420fa: 4e5e unlk %fp 420fc: 7001 moveq #1,%d0 <== NOT EXECUTED 00041f78 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 41f78: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 41f7c: 2279 0005 d3e6 moveal 5d3e6 <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 41f82: 2069 00c2 moveal %a1@(194),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 41f86: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 41f88: b1ce cmpal %fp,%a0 41f8a: 6304 blss 41f90 <== ALWAYS TAKEN 41f8c: 4202 clrb %d2 <== NOT EXECUTED 41f8e: 600c bras 41f9c <== NOT EXECUTED } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 41f90: 2008 movel %a0,%d0 41f92: d0a9 00be addl %a1@(190),%d0 41f96: b08e cmpl %fp,%d0 41f98: 54c2 scc %d2 41f9a: 4482 negl %d2 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 41f9c: 4ab9 0005 c9a4 tstl 5c9a4 41fa2: 6604 bnes 41fa8 <== ALWAYS TAKEN 41fa4: 7001 moveq #1,%d0 <== NOT EXECUTED 41fa6: 601e bras 41fc6 <== NOT EXECUTED pattern_ok = (!memcmp( 41fa8: 4878 0010 pea 10 41fac: 4879 0005 d1b0 pea 5d1b0 41fb2: 4868 0008 pea %a0@(8) 41fb6: 4eb9 0004 d744 jsr 4d744 41fbc: 4fef 000c lea %sp@(12),%sp 41fc0: 4a80 tstl %d0 41fc2: 57c0 seq %d0 41fc4: 4480 negl %d0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 41fc6: 4a02 tstb %d2 41fc8: 6708 beqs 41fd2 <== NEVER TAKEN 41fca: 4a00 tstb %d0 41fcc: 6704 beqs 41fd2 <== NEVER TAKEN 41fce: 4200 clrb %d0 41fd0: 6018 bras 41fea return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 41fd2: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 41fd8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fda: 2f39 0005 d3e6 movel 5d3e6 <_Thread_Executing>,%sp@- <== NOT EXECUTED 41fe0: 4eb9 0004 1ed2 jsr 41ed2 <== NOT EXECUTED return true; 41fe6: 508f addql #8,%sp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 41fe8: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 41fea: 242e fffc movel %fp@(-4),%d2 41fee: 4e5e unlk %fp <== NOT EXECUTED 00041eba : void rtems_stack_checker_report_usage( void ) { 41eba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 41ebe: 4879 0004 313c pea 4313c <== NOT EXECUTED 41ec4: 42a7 clrl %sp@- <== NOT EXECUTED 41ec6: 4eb9 0004 1e58 jsr 41e58 <== NOT EXECUTED 41ecc: 508f addql #8,%sp <== NOT EXECUTED } 41ece: 4e5e unlk %fp <== NOT EXECUTED 00041e58 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 41e58: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 41e5c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 41e5e: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 41e62: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 41e64: 4879 0005 a412 pea 5a412 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 41e6a: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 41e6e: 23ca 0005 c9ac movel %a2,5c9ac <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 41e74: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 41e76: 23c2 0005 c9a8 movel %d2,5c9a8 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 41e7c: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 41e7e: 4879 0005 a429 pea 5a429 <== NOT EXECUTED 41e84: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41e86: 4e92 jsr %a2@ <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 41e88: 4879 0004 1d3e pea 41d3e <== NOT EXECUTED 41e8e: 4eb9 0004 6468 jsr 46468 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 41e94: 4878 ffff pea ffffffff <== NOT EXECUTED 41e98: 4eb9 0004 1d3e jsr 41d3e <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 41e9e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; print_handler = NULL; 41ea2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 41ea6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 41eaa: 4e5e unlk %fp <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 41eac: 42b9 0005 c9a8 clrl 5c9a8 <== NOT EXECUTED print_handler = NULL; 41eb2: 42b9 0005 c9ac clrl 5c9ac <== NOT EXECUTED } 00041ff2 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 41ff2: 4e56 0000 linkw %fp,#0 41ff6: 2f0a movel %a2,%sp@- 41ff8: 246e 0008 moveal %fp@(8),%a2 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 41ffc: 206a 00c2 moveal %a2@(194),%a0 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 42000: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 42002: b1ce cmpal %fp,%a0 42004: 6304 blss 4200a <== ALWAYS TAKEN 42006: 4202 clrb %d2 <== NOT EXECUTED 42008: 600c bras 42016 <== NOT EXECUTED } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 4200a: 2008 movel %a0,%d0 4200c: d0aa 00be addl %a2@(190),%d0 42010: b08e cmpl %fp,%d0 42012: 54c2 scc %d2 42014: 4482 negl %d2 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 42016: 4878 0010 pea 10 4201a: 4879 0005 d1b0 pea 5d1b0 42020: 4868 0008 pea %a0@(8) 42024: 4eb9 0004 d744 jsr 4d744 4202a: 4fef 000c lea %sp@(12),%sp 4202e: 4a80 tstl %d0 42030: 57c0 seq %d0 42032: 4480 negl %d0 42034: 1200 moveb %d0,%d1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 42036: 4a02 tstb %d2 42038: 6704 beqs 4203e <== NEVER TAKEN 4203a: 4a00 tstb %d0 4203c: 661c bnes 4205a <== ALWAYS TAKEN Stack_check_report_blown_task( running, pattern_ok ); 4203e: 4280 clrl %d0 <== NOT EXECUTED 42040: 1001 moveb %d1,%d0 <== NOT EXECUTED 42042: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 42046: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4204a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 4204e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 42052: 4e5e unlk %fp <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 42054: 4ef9 0004 1ed2 jmp 41ed2 <== NOT EXECUTED } } 4205a: 242e fff8 movel %fp@(-8),%d2 4205e: 246e fffc moveal %fp@(-4),%a2 42062: 4e5e unlk %fp <== NOT EXECUTED 0004b5dc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b5dc: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4b5e0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 4b5e4: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4b5e8: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4b5ec: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b5f0: 4a8a tstl %a2 <== NOT EXECUTED 4b5f2: 6604 bnes 4b5f8 <== NOT EXECUTED 4b5f4: 7009 moveq #9,%d0 <== NOT EXECUTED 4b5f6: 606e bras 4b666 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4b5f8: 4eb9 0004 deac jsr 4deac <__errno> <== NOT EXECUTED *n = 0; 4b5fe: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b600: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4b602: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b604: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b606: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b60a: 2480 movel %d0,%a2@ <== NOT EXECUTED 4b60c: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b610: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b612: 4eb9 0005 0900 jsr 50900 <== 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 ) 4b618: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b61a: 2600 movel %d0,%d3 <== NOT EXECUTED 4b61c: 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 ) 4b61e: 4a8b tstl %a3 <== NOT EXECUTED 4b620: 6704 beqs 4b626 <== NOT EXECUTED *endptr = end; 4b622: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4b626: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4b62a: 6604 bnes 4b630 <== NOT EXECUTED 4b62c: 700b moveq #11,%d0 <== NOT EXECUTED 4b62e: 6036 bras 4b666 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b630: 4878 ffff pea ffffffff <== NOT EXECUTED 4b634: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4b63a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b63c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b63e: 4eb9 0005 b7a8 jsr 5b7a8 <__gtdf2> <== NOT EXECUTED 4b644: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b648: 4a80 tstl %d0 <== NOT EXECUTED 4b64a: 6f12 bles 4b65e <== NOT EXECUTED 4b64c: 4eb9 0004 deac jsr 4deac <__errno> <== NOT EXECUTED 4b652: 7222 moveq #34,%d1 <== NOT EXECUTED 4b654: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b656: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b658: 6604 bnes 4b65e <== NOT EXECUTED 4b65a: 700a moveq #10,%d0 <== NOT EXECUTED 4b65c: 6008 bras 4b666 <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b65e: 4280 clrl %d0 <== NOT EXECUTED 4b660: 2483 movel %d3,%a2@ <== NOT EXECUTED 4b662: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 4b666: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4b66c: 4e5e unlk %fp <== NOT EXECUTED 0004b670 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b670: 4e56 ffec linkw %fp,#-20 4b674: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b678: 262e 0008 movel %fp@(8),%d3 4b67c: 246e 000c moveal %fp@(12),%a2 4b680: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b684: 4a8a tstl %a2 4b686: 6604 bnes 4b68c 4b688: 7009 moveq #9,%d0 4b68a: 605c bras 4b6e8 return RTEMS_INVALID_ADDRESS; errno = 0; 4b68c: 4eb9 0004 deac jsr 4deac <__errno> 4b692: 2040 moveal %d0,%a0 4b694: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b696: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b69a: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b6a0: 2f03 movel %d3,%sp@- 4b6a2: 4eb9 0005 08a2 jsr 508a2 #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 ) 4b6a8: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b6aa: 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 ) 4b6ac: 4a8b tstl %a3 4b6ae: 6704 beqs 4b6b4 *endptr = end; 4b6b0: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b6b4: b6ae fffc cmpl %fp@(-4),%d3 4b6b8: 6604 bnes 4b6be 4b6ba: 700b moveq #11,%d0 4b6bc: 602a bras 4b6e8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b6be: 2f3c 7f7f ffff movel #2139095039,%sp@- 4b6c4: 2f02 movel %d2,%sp@- 4b6c6: 4eb9 0005 b838 jsr 5b838 <__gtsf2> 4b6cc: 508f addql #8,%sp 4b6ce: 4a80 tstl %d0 4b6d0: 6f12 bles 4b6e4 <== ALWAYS TAKEN 4b6d2: 4eb9 0004 deac jsr 4deac <__errno> <== NOT EXECUTED 4b6d8: 7222 moveq #34,%d1 <== NOT EXECUTED 4b6da: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b6dc: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b6de: 6604 bnes 4b6e4 <== NOT EXECUTED 4b6e0: 700a moveq #10,%d0 <== NOT EXECUTED 4b6e2: 6004 bras 4b6e8 <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b6e4: 2482 movel %d2,%a2@ 4b6e6: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4b6e8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b6ee: 4e5e unlk %fp ... 0004b6f4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b6f4: 4e56 ffec linkw %fp,#-20 4b6f8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b6fc: 262e 0008 movel %fp@(8),%d3 4b700: 246e 000c moveal %fp@(12),%a2 4b704: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b708: 4a8a tstl %a2 4b70a: 6604 bnes 4b710 4b70c: 7009 moveq #9,%d0 4b70e: 6052 bras 4b762 return RTEMS_INVALID_ADDRESS; errno = 0; 4b710: 4eb9 0004 deac jsr 4deac <__errno> 4b716: 2040 moveal %d0,%a0 4b718: 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 ); 4b71a: 2f2e 0014 movel %fp@(20),%sp@- 4b71e: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b722: 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 ); 4b724: 2f03 movel %d3,%sp@- 4b726: 4eb9 0005 0ae2 jsr 50ae2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b72c: 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 ); 4b730: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b732: 4a8b tstl %a3 4b734: 6704 beqs 4b73a *endptr = end; 4b736: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b73a: b6ae fffc cmpl %fp@(-4),%d3 4b73e: 6604 bnes 4b744 4b740: 700b moveq #11,%d0 4b742: 601e bras 4b762 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b744: 0c82 7fff ffff cmpil #2147483647,%d2 4b74a: 6612 bnes 4b75e 4b74c: 4eb9 0004 deac jsr 4deac <__errno> 4b752: 7222 moveq #34,%d1 4b754: 2040 moveal %d0,%a0 4b756: b290 cmpl %a0@,%d1 4b758: 6604 bnes 4b75e <== NEVER TAKEN 4b75a: 700a moveq #10,%d0 4b75c: 6004 bras 4b762 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b75e: 2482 movel %d2,%a2@ 4b760: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4b762: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b768: 4e5e unlk %fp <== NOT EXECUTED 0004b808 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b808: 4e56 ffec linkw %fp,#-20 4b80c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b810: 262e 0008 movel %fp@(8),%d3 4b814: 246e 000c moveal %fp@(12),%a2 4b818: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b81c: 4a8a tstl %a2 4b81e: 6604 bnes 4b824 4b820: 7009 moveq #9,%d0 4b822: 605a bras 4b87e return RTEMS_INVALID_ADDRESS; errno = 0; 4b824: 4eb9 0004 deac jsr 4deac <__errno> 4b82a: 2040 moveal %d0,%a0 4b82c: 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 ); 4b82e: 2f2e 0014 movel %fp@(20),%sp@- 4b832: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b836: 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 ); 4b838: 2f03 movel %d3,%sp@- 4b83a: 4eb9 0005 0ae2 jsr 50ae2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b840: 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 ); 4b844: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b846: 4a8b tstl %a3 4b848: 6704 beqs 4b84e *endptr = end; 4b84a: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b84e: b6ae fffc cmpl %fp@(-4),%d3 4b852: 6604 bnes 4b858 4b854: 700b moveq #11,%d0 4b856: 6026 bras 4b87e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b858: 0c82 7fff ffff cmpil #2147483647,%d2 4b85e: 6708 beqs 4b868 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b860: 0c82 8000 0000 cmpil #-2147483648,%d2 4b866: 660e bnes 4b876 4b868: 4eb9 0004 deac jsr 4deac <__errno> 4b86e: 7222 moveq #34,%d1 4b870: 2040 moveal %d0,%a0 4b872: b290 cmpl %a0@,%d1 4b874: 6706 beqs 4b87c <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b876: 2482 movel %d2,%a2@ 4b878: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; 4b87a: 6002 bras 4b87e 4b87c: 700a moveq #10,%d0 } 4b87e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b884: 4e5e unlk %fp <== NOT EXECUTED 0004b76c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b76c: 4e56 ffe8 linkw %fp,#-24 4b770: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b774: 242e 0008 movel %fp@(8),%d2 4b778: 246e 000c moveal %fp@(12),%a2 4b77c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b780: 4a8a tstl %a2 4b782: 6604 bnes 4b788 4b784: 7009 moveq #9,%d0 4b786: 6074 bras 4b7fc return RTEMS_INVALID_ADDRESS; errno = 0; 4b788: 4eb9 0004 deac jsr 4deac <__errno> 4b78e: 2040 moveal %d0,%a0 *n = 0; 4b790: 4280 clrl %d0 4b792: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b794: 4290 clrl %a0@ *n = 0; 4b796: 2480 movel %d0,%a2@ 4b798: 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 ); 4b79c: 2f2e 0014 movel %fp@(20),%sp@- 4b7a0: 486e fffc pea %fp@(-4) 4b7a4: 2f02 movel %d2,%sp@- 4b7a6: 4eb9 0005 0b04 jsr 50b04 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b7ac: 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 ); 4b7b0: 2600 movel %d0,%d3 4b7b2: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b7b4: 4a8b tstl %a3 4b7b6: 6704 beqs 4b7bc *endptr = end; 4b7b8: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b7bc: b4ae fffc cmpl %fp@(-4),%d2 4b7c0: 6604 bnes 4b7c6 4b7c2: 700b moveq #11,%d0 4b7c4: 6036 bras 4b7fc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b7c6: 203c 7fff ffff movel #2147483647,%d0 4b7cc: 72ff moveq #-1,%d1 4b7ce: 9284 subl %d4,%d1 4b7d0: 9183 subxl %d3,%d0 4b7d2: 670e beqs 4b7e2 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b7d4: 203c 8000 0000 movel #-2147483648,%d0 4b7da: 4281 clrl %d1 4b7dc: 9284 subl %d4,%d1 4b7de: 9183 subxl %d3,%d0 4b7e0: 660e bnes 4b7f0 4b7e2: 4eb9 0004 deac jsr 4deac <__errno> 4b7e8: 7222 moveq #34,%d1 4b7ea: 2040 moveal %d0,%a0 4b7ec: b290 cmpl %a0@,%d1 4b7ee: 670a beqs 4b7fa <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b7f0: 4280 clrl %d0 4b7f2: 2483 movel %d3,%a2@ 4b7f4: 2544 0004 movel %d4,%a2@(4) #endif return RTEMS_SUCCESSFUL; 4b7f8: 6002 bras 4b7fc 4b7fa: 700a moveq #10,%d0 } 4b7fc: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4b802: 4e5e unlk %fp ... 0004b888 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b888: 4e56 ffec linkw %fp,#-20 4b88c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b890: 262e 0008 movel %fp@(8),%d3 4b894: 246e 000c moveal %fp@(12),%a2 4b898: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b89c: 4a8a tstl %a2 4b89e: 6604 bnes 4b8a4 4b8a0: 7009 moveq #9,%d0 4b8a2: 6050 bras 4b8f4 return RTEMS_INVALID_ADDRESS; errno = 0; 4b8a4: 4eb9 0004 deac jsr 4deac <__errno> 4b8aa: 2040 moveal %d0,%a0 4b8ac: 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 ); 4b8ae: 4878 0010 pea 10 4b8b2: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b8b6: 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 ); 4b8b8: 2f03 movel %d3,%sp@- 4b8ba: 4eb9 0005 0f14 jsr 50f14 #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 ) 4b8c0: 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 ); 4b8c4: 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 ) 4b8c6: 4a8b tstl %a3 4b8c8: 6704 beqs 4b8ce *endptr = end; 4b8ca: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b8ce: b6ae fffc cmpl %fp@(-4),%d3 4b8d2: 6604 bnes 4b8d8 4b8d4: 700b moveq #11,%d0 4b8d6: 601c bras 4b8f4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b8d8: 70ff moveq #-1,%d0 4b8da: b082 cmpl %d2,%d0 4b8dc: 6612 bnes 4b8f0 <== ALWAYS TAKEN 4b8de: 4eb9 0004 deac jsr 4deac <__errno> <== NOT EXECUTED 4b8e4: 7222 moveq #34,%d1 <== NOT EXECUTED 4b8e6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b8e8: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b8ea: 6604 bnes 4b8f0 <== NOT EXECUTED 4b8ec: 700a moveq #10,%d0 <== NOT EXECUTED 4b8ee: 6004 bras 4b8f4 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 4b8f0: 2482 movel %d2,%a2@ 4b8f2: 4280 clrl %d0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4b8f4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b8fa: 4e5e unlk %fp ... 0004b960 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b960: 4e56 ffec linkw %fp,#-20 4b964: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b968: 262e 0008 movel %fp@(8),%d3 4b96c: 246e 000c moveal %fp@(12),%a2 4b970: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b974: 4a8a tstl %a2 4b976: 6604 bnes 4b97c 4b978: 7009 moveq #9,%d0 4b97a: 6050 bras 4b9cc return RTEMS_INVALID_ADDRESS; errno = 0; 4b97c: 4eb9 0004 deac jsr 4deac <__errno> 4b982: 2040 moveal %d0,%a0 4b984: 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 ); 4b986: 2f2e 0014 movel %fp@(20),%sp@- 4b98a: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b98e: 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 ); 4b990: 2f03 movel %d3,%sp@- 4b992: 4eb9 0005 0f14 jsr 50f14 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b998: 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 ); 4b99c: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b99e: 4a8b tstl %a3 4b9a0: 6704 beqs 4b9a6 *endptr = end; 4b9a2: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b9a6: b6ae fffc cmpl %fp@(-4),%d3 4b9aa: 6604 bnes 4b9b0 4b9ac: 700b moveq #11,%d0 4b9ae: 601c bras 4b9cc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b9b0: 70ff moveq #-1,%d0 4b9b2: b082 cmpl %d2,%d0 4b9b4: 6612 bnes 4b9c8 4b9b6: 4eb9 0004 deac jsr 4deac <__errno> 4b9bc: 7222 moveq #34,%d1 4b9be: 2040 moveal %d0,%a0 4b9c0: b290 cmpl %a0@,%d1 4b9c2: 6604 bnes 4b9c8 <== NEVER TAKEN 4b9c4: 700a moveq #10,%d0 4b9c6: 6004 bras 4b9cc #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4b9c8: 2482 movel %d2,%a2@ 4b9ca: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4b9cc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b9d2: 4e5e unlk %fp ... 0004ba60 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4ba60: 4e56 ffec linkw %fp,#-20 4ba64: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4ba68: 262e 0008 movel %fp@(8),%d3 4ba6c: 246e 000c moveal %fp@(12),%a2 4ba70: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4ba74: 4a8a tstl %a2 4ba76: 6604 bnes 4ba7c 4ba78: 7009 moveq #9,%d0 4ba7a: 6050 bras 4bacc return RTEMS_INVALID_ADDRESS; errno = 0; 4ba7c: 4eb9 0004 deac jsr 4deac <__errno> 4ba82: 2040 moveal %d0,%a0 4ba84: 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 ); 4ba86: 2f2e 0014 movel %fp@(20),%sp@- 4ba8a: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4ba8e: 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 ); 4ba90: 2f03 movel %d3,%sp@- 4ba92: 4eb9 0005 0f14 jsr 50f14 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4ba98: 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 ); 4ba9c: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4ba9e: 4a8b tstl %a3 4baa0: 6704 beqs 4baa6 *endptr = end; 4baa2: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4baa6: b6ae fffc cmpl %fp@(-4),%d3 4baaa: 6604 bnes 4bab0 4baac: 700b moveq #11,%d0 4baae: 601c bras 4bacc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4bab0: 70ff moveq #-1,%d0 4bab2: b082 cmpl %d2,%d0 4bab4: 6612 bnes 4bac8 4bab6: 4eb9 0004 deac jsr 4deac <__errno> 4babc: 7222 moveq #34,%d1 4babe: 2040 moveal %d0,%a0 4bac0: b290 cmpl %a0@,%d1 4bac2: 6604 bnes 4bac8 <== NEVER TAKEN 4bac4: 700a moveq #10,%d0 4bac6: 6004 bras 4bacc #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4bac8: 2482 movel %d2,%a2@ 4baca: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4bacc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4bad2: 4e5e unlk %fp ... 0004b9d8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b9d8: 4e56 ffe8 linkw %fp,#-24 4b9dc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b9e0: 242e 0008 movel %fp@(8),%d2 4b9e4: 246e 000c moveal %fp@(12),%a2 4b9e8: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b9ec: 4a8a tstl %a2 4b9ee: 6604 bnes 4b9f4 4b9f0: 7009 moveq #9,%d0 4b9f2: 6062 bras 4ba56 return RTEMS_INVALID_ADDRESS; errno = 0; 4b9f4: 4eb9 0004 deac jsr 4deac <__errno> 4b9fa: 2040 moveal %d0,%a0 *n = 0; 4b9fc: 4280 clrl %d0 4b9fe: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4ba00: 4290 clrl %a0@ *n = 0; 4ba02: 2480 movel %d0,%a2@ 4ba04: 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 ); 4ba08: 2f2e 0014 movel %fp@(20),%sp@- 4ba0c: 486e fffc pea %fp@(-4) 4ba10: 2f02 movel %d2,%sp@- 4ba12: 4eb9 0005 0f34 jsr 50f34 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4ba18: 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 ); 4ba1c: 2600 movel %d0,%d3 4ba1e: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4ba20: 4a8b tstl %a3 4ba22: 6704 beqs 4ba28 *endptr = end; 4ba24: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4ba28: b4ae fffc cmpl %fp@(-4),%d2 4ba2c: 6604 bnes 4ba32 4ba2e: 700b moveq #11,%d0 4ba30: 6024 bras 4ba56 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4ba32: 70ff moveq #-1,%d0 4ba34: 72ff moveq #-1,%d1 4ba36: 9284 subl %d4,%d1 4ba38: 9183 subxl %d3,%d0 4ba3a: 6612 bnes 4ba4e 4ba3c: 4eb9 0004 deac jsr 4deac <__errno> 4ba42: 7222 moveq #34,%d1 4ba44: 2040 moveal %d0,%a0 4ba46: b290 cmpl %a0@,%d1 4ba48: 6604 bnes 4ba4e <== NEVER TAKEN 4ba4a: 700a moveq #10,%d0 4ba4c: 6008 bras 4ba56 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4ba4e: 4280 clrl %d0 4ba50: 2483 movel %d3,%a2@ 4ba52: 2544 0004 movel %d4,%a2@(4) #endif return RTEMS_SUCCESSFUL; } 4ba56: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4ba5c: 4e5e unlk %fp <== NOT EXECUTED 0004bc9c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4bc9c: 4e56 ffe4 linkw %fp,#-28 4bca0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4bca4: 262e 0008 movel %fp@(8),%d3 4bca8: 282e 000c movel %fp@(12),%d4 4bcac: 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 ) 4bcb0: 4a8c tstl %a4 4bcb2: 6606 bnes 4bcba 4bcb4: 7009 moveq #9,%d0 4bcb6: 6000 00fc braw 4bdb4 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4bcba: 2479 0005 cdc2 moveal 5cdc2 <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4bcc0: 4a2a 0075 tstb %a2@(117) 4bcc4: 57c0 seq %d0 4bcc6: 243c 0000 0100 movel #256,%d2 4bccc: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4bcce: 266a 010a moveal %a2@(266),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4bcd2: c480 andl %d0,%d2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4bcd4: 4aaa 007a tstl %a2@(122) 4bcd8: 6704 beqs 4bcde old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4bcda: 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; 4bcde: 4a2b 0008 tstb %a3@(8) 4bce2: 57c0 seq %d0 4bce4: 2a3c 0000 0400 movel #1024,%d5 4bcea: 49c0 extbl %d0 4bcec: 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(); 4bcee: 4eb9 0004 7ffc jsr 47ffc <_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; 4bcf4: 8085 orl %d5,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4bcf6: 8082 orl %d2,%d0 4bcf8: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4bcfa: 0804 0008 btst #8,%d4 4bcfe: 670e beqs 4bd0e executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4bd00: 2003 movel %d3,%d0 4bd02: 7201 moveq #1,%d1 4bd04: e088 lsrl #8,%d0 4bd06: b380 eorl %d1,%d0 4bd08: c081 andl %d1,%d0 4bd0a: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4bd0e: 0804 0009 btst #9,%d4 4bd12: 671c beqs 4bd30 if ( _Modes_Is_timeslice(mode_set) ) { 4bd14: 0803 0009 btst #9,%d3 4bd18: 6712 beqs 4bd2c executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4bd1a: 41f9 0005 ccb8 lea 5ccb8 <_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; 4bd20: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4bd22: 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; 4bd26: 2540 007a movel %d0,%a2@(122) 4bd2a: 6004 bras 4bd30 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4bd2c: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4bd30: 7007 moveq #7,%d0 4bd32: c084 andl %d4,%d0 4bd34: 6712 beqs 4bd48 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4bd36: 40c0 movew %sr,%d0 4bd38: 7207 moveq #7,%d1 4bd3a: c283 andl %d3,%d1 4bd3c: 0280 0000 f8ff andil #63743,%d0 4bd42: e189 lsll #8,%d1 4bd44: 8081 orl %d1,%d0 4bd46: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4bd48: 0804 000a btst #10,%d4 4bd4c: 6744 beqs 4bd92 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4bd4e: 700a moveq #10,%d0 4bd50: e0ab lsrl %d0,%d3 4bd52: 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; 4bd54: 4280 clrl %d0 4bd56: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4bd5a: b383 eorl %d1,%d3 4bd5c: 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; 4bd5e: b083 cmpl %d3,%d0 4bd60: 6730 beqs 4bd92 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4bd62: 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; 4bd68: 1743 0008 moveb %d3,%a3@(8) 4bd6c: 40c1 movew %sr,%d1 4bd6e: 8081 orl %d1,%d0 4bd70: 46c0 movew %d0,%sr _signals = information->signals_pending; 4bd72: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4bd76: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4bd7c: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4bd80: 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; 4bd82: 4aab 0012 tstl %a3@(18) 4bd86: 670a beqs 4bd92 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; 4bd88: 7001 moveq #1,%d0 4bd8a: 7401 moveq #1,%d2 4bd8c: 1540 0074 moveb %d0,%a2@(116) 4bd90: 6002 bras 4bd94 4bd92: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4bd94: 7203 moveq #3,%d1 4bd96: b2b9 0005 ce90 cmpl 5ce90 <_System_state_Current>,%d1 4bd9c: 6614 bnes 4bdb2 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4bd9e: 4eb9 0004 c094 jsr 4c094 <_Thread_Evaluate_mode> 4bda4: 4a00 tstb %d0 4bda6: 6604 bnes 4bdac 4bda8: 4a02 tstb %d2 4bdaa: 6706 beqs 4bdb2 _Thread_Dispatch(); 4bdac: 4eb9 0004 6b90 jsr 46b90 <_Thread_Dispatch> 4bdb2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4bdb4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4bdba: 4e5e unlk %fp ... 000494cc : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 494cc: 4e56 fffc linkw %fp,#-4 494d0: 2f0a movel %a2,%sp@- 494d2: 246e 0010 moveal %fp@(16),%a2 494d6: 2f02 movel %d2,%sp@- 494d8: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 494dc: 6710 beqs 494ee 494de: 4280 clrl %d0 494e0: 1039 0006 0c82 moveb 60c82 ,%d0 494e6: b082 cmpl %d2,%d0 494e8: 6404 bccs 494ee 494ea: 7013 moveq #19,%d0 494ec: 6054 bras 49542 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 494ee: 4a8a tstl %a2 494f0: 6604 bnes 494f6 494f2: 7009 moveq #9,%d0 494f4: 604c bras 49542 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 494f6: 486e fffc pea %fp@(-4) 494fa: 2f2e 0008 movel %fp@(8),%sp@- 494fe: 4eb9 0004 b1d8 jsr 4b1d8 <_Thread_Get> switch ( location ) { 49504: 508f addql #8,%sp return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 49506: 2040 moveal %d0,%a0 switch ( location ) { 49508: 4aae fffc tstl %fp@(-4) 4950c: 6704 beqs 49512 4950e: 7004 moveq #4,%d0 49510: 6030 bras 49542 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 49512: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 49516: 4a82 tstl %d2 49518: 6720 beqs 4953a the_thread->real_priority = new_priority; 4951a: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4951e: 4aa8 001c tstl %a0@(28) 49522: 6706 beqs 4952a the_thread->current_priority > new_priority ) 49524: b4a8 0014 cmpl %a0@(20),%d2 49528: 6410 bccs 4953a <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 4952a: 42a7 clrl %sp@- 4952c: 2f02 movel %d2,%sp@- 4952e: 2f08 movel %a0,%sp@- 49530: 4eb9 0004 ac88 jsr 4ac88 <_Thread_Change_priority> 49536: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4953a: 4eb9 0004 b182 jsr 4b182 <_Thread_Enable_dispatch> 49540: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 49542: 242e fff4 movel %fp@(-12),%d2 49546: 246e fff8 moveal %fp@(-8),%a2 4954a: 4e5e unlk %fp ... 00043e80 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 43e80: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 43e82: 4e56 0000 linkw %fp,#0 43e86: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 43e8a: b280 cmpl %d0,%d1 43e8c: 6700 00ce beqw 43f5c 43e90: 6d54 blts 43ee6 <== NEVER TAKEN 43e92: 123c 0004 moveb #4,%d1 43e96: b280 cmpl %d0,%d1 43e98: 6700 00ae beqw 43f48 43e9c: 6d2a blts 43ec8 <== NEVER TAKEN 43e9e: 123c 0001 moveb #1,%d1 43ea2: b280 cmpl %d0,%d1 43ea4: 6700 0092 beqw 43f38 43ea8: 6d0a blts 43eb4 <== NEVER TAKEN 43eaa: 4a80 tstl %d0 43eac: 6700 008e beqw 43f3c 43eb0: 6000 00d6 braw 43f88 43eb4: 7202 moveq #2,%d1 <== NOT EXECUTED 43eb6: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eb8: 6700 0086 beqw 43f40 <== NOT EXECUTED 43ebc: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 43ec0: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ec2: 6600 00c4 bnew 43f88 <== NOT EXECUTED 43ec6: 607c bras 43f44 <== NOT EXECUTED 43ec8: 7206 moveq #6,%d1 <== NOT EXECUTED 43eca: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ecc: 6700 0082 beqw 43f50 <== NOT EXECUTED 43ed0: 6e7a bgts 43f4c <== NOT EXECUTED 43ed2: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 43ed6: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ed8: 677a beqs 43f54 <== NOT EXECUTED 43eda: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 43ede: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ee0: 6600 00a6 bnew 43f88 <== NOT EXECUTED 43ee4: 6072 bras 43f58 <== NOT EXECUTED 43ee6: 720e moveq #14,%d1 <== NOT EXECUTED 43ee8: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eea: 6700 0084 beqw 43f70 <== NOT EXECUTED 43eee: 6d1c blts 43f0c <== NOT EXECUTED 43ef0: 123c 000b moveb #11,%d1 <== NOT EXECUTED 43ef4: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ef6: 676c beqs 43f64 <== NOT EXECUTED 43ef8: 6e66 bgts 43f60 <== NOT EXECUTED 43efa: 123c 000c moveb #12,%d1 <== NOT EXECUTED 43efe: b280 cmpl %d0,%d1 <== NOT EXECUTED 43f00: 6766 beqs 43f68 <== NOT EXECUTED 43f02: 123c 000d moveb #13,%d1 <== NOT EXECUTED 43f06: b280 cmpl %d0,%d1 <== NOT EXECUTED 43f08: 667e bnes 43f88 <== NOT EXECUTED 43f0a: 6060 bras 43f6c <== NOT EXECUTED 43f0c: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 43f12: 6768 beqs 43f7c <== NOT EXECUTED 43f14: 6e10 bgts 43f26 <== NOT EXECUTED 43f16: 720f moveq #15,%d1 <== NOT EXECUTED 43f18: b280 cmpl %d0,%d1 <== NOT EXECUTED 43f1a: 6758 beqs 43f74 <== NOT EXECUTED 43f1c: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 43f22: 6664 bnes 43f88 <== NOT EXECUTED 43f24: 6052 bras 43f78 <== NOT EXECUTED 43f26: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 43f2c: 6752 beqs 43f80 <== NOT EXECUTED 43f2e: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 43f34: 6652 bnes 43f88 <== NOT EXECUTED 43f36: 604c bras 43f84 <== NOT EXECUTED 43f38: 7001 moveq #1,%d0 <== NOT EXECUTED 43f3a: 604e bras 43f8a <== NOT EXECUTED 43f3c: 4280 clrl %d0 <== NOT EXECUTED 43f3e: 604a bras 43f8a <== NOT EXECUTED 43f40: 7002 moveq #2,%d0 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 43f42: 6046 bras 43f8a <== NOT EXECUTED 43f44: 7003 moveq #3,%d0 <== NOT EXECUTED case B110: baud_index = 3; break; 43f46: 6042 bras 43f8a <== NOT EXECUTED 43f48: 7004 moveq #4,%d0 <== NOT EXECUTED case B134: baud_index = 4; break; 43f4a: 603e bras 43f8a <== NOT EXECUTED 43f4c: 7005 moveq #5,%d0 <== NOT EXECUTED case B150: baud_index = 5; break; 43f4e: 603a bras 43f8a <== NOT EXECUTED 43f50: 7006 moveq #6,%d0 <== NOT EXECUTED case B200: baud_index = 6; break; 43f52: 6036 bras 43f8a <== NOT EXECUTED 43f54: 7007 moveq #7,%d0 <== NOT EXECUTED case B300: baud_index = 7; break; 43f56: 6032 bras 43f8a <== NOT EXECUTED 43f58: 7008 moveq #8,%d0 <== NOT EXECUTED case B600: baud_index = 8; break; 43f5a: 602e bras 43f8a <== NOT EXECUTED 43f5c: 7009 moveq #9,%d0 <== NOT EXECUTED case B1200: baud_index = 9; break; 43f5e: 602a bras 43f8a <== NOT EXECUTED 43f60: 700a moveq #10,%d0 <== NOT EXECUTED case B1800: baud_index = 10; break; 43f62: 6026 bras 43f8a <== NOT EXECUTED 43f64: 700b moveq #11,%d0 <== NOT EXECUTED case B2400: baud_index = 11; break; 43f66: 6022 bras 43f8a <== NOT EXECUTED 43f68: 700c moveq #12,%d0 <== NOT EXECUTED case B4800: baud_index = 12; break; 43f6a: 601e bras 43f8a <== NOT EXECUTED 43f6c: 700d moveq #13,%d0 <== NOT EXECUTED case B9600: baud_index = 13; break; 43f6e: 601a bras 43f8a <== NOT EXECUTED 43f70: 700e moveq #14,%d0 <== NOT EXECUTED case B19200: baud_index = 14; break; 43f72: 6016 bras 43f8a <== NOT EXECUTED 43f74: 700f moveq #15,%d0 <== NOT EXECUTED case B38400: baud_index = 15; break; 43f76: 6012 bras 43f8a <== NOT EXECUTED 43f78: 7010 moveq #16,%d0 <== NOT EXECUTED case B57600: baud_index = 16; break; 43f7a: 600e bras 43f8a <== NOT EXECUTED 43f7c: 7011 moveq #17,%d0 <== NOT EXECUTED case B115200: baud_index = 17; break; 43f7e: 600a bras 43f8a <== NOT EXECUTED 43f80: 7012 moveq #18,%d0 <== NOT EXECUTED case B230400: baud_index = 18; break; 43f82: 6006 bras 43f8a <== NOT EXECUTED 43f84: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; 43f86: 6002 bras 43f8a <== NOT EXECUTED 43f88: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 43f8a: 4e5e unlk %fp ... 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 42d60: 6d6c blts 42dce <== NEVER 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 42d70: 6d2a blts 42d9c 42d72: 103c 0001 moveb #1,%d0 42d76: b081 cmpl %d1,%d0 42d78: 6700 00da beqw 42e54 42d7c: 6d0a blts 42d88 42d7e: 4a81 tstl %d1 42d80: 6700 00d6 beqw 42e58 42d84: 6000 00de braw 42e64 42d88: 7402 moveq #2,%d2 42d8a: b481 cmpl %d1,%d2 42d8c: 6700 00ce beqw 42e5c 42d90: 7003 moveq #3,%d0 42d92: b081 cmpl %d1,%d0 42d94: 6600 00ce bnew 42e64 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 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 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 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 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 <== NEVER TAKEN 42e0a: 605a bras 42e66 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 <== NEVER TAKEN 42e34: 6030 bras 42e66 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 <== NEVER TAKEN 42e52: 6012 bras 42e66 42e54: 7032 moveq #50,%d0 42e56: 600e bras 42e66 42e58: 4280 clrl %d0 42e5a: 600a bras 42e66 42e5c: 704b moveq #75,%d0 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 42e5e: 6006 bras 42e66 42e60: 706e moveq #110,%d0 case B110: baud = 110; break; 42e62: 6002 bras 42e66 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 <== NOT EXECUTED 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 b5a4 movel %a0@,5b5a4 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 42eb8: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 42ebc: 23d0 0005 b5a8 movel %a0@,5b5a8 <== 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 b5ac movel %a0@,5b5ac <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 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 cbec movel 5cbec ,%sp@- 440b2: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 440b4: 4fef 000c lea %sp@(12),%sp 440b8: 4a80 tstl %d0 440ba: 6670 bnes 4412c <== NEVER 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 c3a4 lea 5c3a4 ,%a0 440d4: e788 lsll #3,%d0 440d6: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 440da: 4a88 tstl %a0 440dc: 6706 beqs 440e4 <== ALWAYS 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 <== NEVER 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 <== ALWAYS 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 55bc jsr 455bc <== 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 cbf0 movel %a0,5cbf0 if ( rtems_termios_ttyTail != NULL ) { 4415c: 670a beqs 44168 <== ALWAYS 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 <== NEVER TAKEN rtems_termios_ttyHead = tty->forw; 44170: 2052 moveal %a2@,%a0 44172: 23c8 0005 cbf4 movel %a0,5cbf4 if ( rtems_termios_ttyHead != NULL ) { 44178: 6708 beqs 44182 rtems_termios_ttyHead->back = NULL; 4417a: 42a8 0004 clrl %a0@(4) 4417e: 6002 bras 44182 } } 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 <== ALWAYS 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 8f80 lea 48f80 ,%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 cbec movel 5cbec ,%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 <== NOT EXECUTED 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 <== ALWAYS 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 55bc jsr 455bc <== 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 <== ALWAYS TAKEN /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 430e2: 2279 0005 c458 moveal 5c458 ,%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 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 c3a4 lea 5c3a4 ,%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 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 cbec tstl 5cbec 42e76: 662c bnes 42ea4 sc = rtems_semaphore_create ( 42e78: 4879 0005 cbec pea 5cbec 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 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 42e9c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e9e: 4eb9 0004 55bc jsr 455bc <== NOT EXECUTED } } 42ea4: 4e5e unlk %fp <== NOT EXECUTED 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 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 43db8: 6514 bcss 43dce <== NEVER 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 <== NEVER TAKEN 43dcc: 6050 bras 43e1e 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 c3bc addil #377788,%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 d2a8 jsr 4d2a8 break; 43e30: 4fef 000c lea %sp@(12),%sp 43e34: 6000 023e braw 44074 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 d2a8 jsr 4d2a8 /* * 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 <== ALWAYS 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 <== ALWAYS 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 <== ALWAYS 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 <== ALWAYS 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 <== ALWAYS 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 <== NEVER 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 <== ALWAYS TAKEN tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 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 } 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 (*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 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 c3a4 lea 5c3a4 ,%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 c3a4 lea 5c3a4 ,%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 } 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 <== NOT EXECUTED 000440f0 : #include int rtems_termios_number_to_baud( int32_t baud ) { 440f0: 4e56 0000 linkw %fp,#0 440f4: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 440f8: 0c81 0000 04b0 cmpil #1200,%d1 440fe: 6700 0106 beqw 44206 44102: 6e68 bgts 4416c 44104: 0c81 0000 0086 cmpil #134,%d1 4410a: 6700 00e6 beqw 441f2 4410e: 6e2a bgts 4413a 44110: 7032 moveq #50,%d0 44112: b081 cmpl %d1,%d0 44114: 6700 00cc beqw 441e2 44118: 6d0a blts 44124 4411a: 4a81 tstl %d1 4411c: 6700 00c8 beqw 441e6 44120: 6000 0100 braw 44222 44124: 704b moveq #75,%d0 44126: b081 cmpl %d1,%d0 44128: 6700 00c0 beqw 441ea 4412c: 103c 006e moveb #110,%d0 44130: b081 cmpl %d1,%d0 44132: 6600 00ee bnew 44222 44136: 6000 00b6 braw 441ee 4413a: 0c81 0000 00c8 cmpil #200,%d1 44140: 6700 00b8 beqw 441fa 44144: 6e0e bgts 44154 44146: 0c81 0000 0096 cmpil #150,%d1 4414c: 6600 00d4 bnew 44222 44150: 6000 00a4 braw 441f6 44154: 0c81 0000 012c cmpil #300,%d1 4415a: 6700 00a2 beqw 441fe 4415e: 0c81 0000 0258 cmpil #600,%d1 44164: 6600 00bc bnew 44222 44168: 6000 0098 braw 44202 4416c: 0c81 0000 4b00 cmpil #19200,%d1 44172: 6700 00a6 beqw 4421a 44176: 6e2c bgts 441a4 44178: 0c81 0000 0960 cmpil #2400,%d1 4417e: 6700 008e beqw 4420e 44182: 6e0c bgts 44190 44184: 0c81 0000 0708 cmpil #1800,%d1 4418a: 6600 0096 bnew 44222 4418e: 607a bras 4420a 44190: 0c81 0000 12c0 cmpil #4800,%d1 44196: 677a beqs 44212 44198: 0c81 0000 2580 cmpil #9600,%d1 4419e: 6600 0082 bnew 44222 441a2: 6072 bras 44216 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; 441a4: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441aa: 0c81 0001 c200 cmpil #115200,%d1 441b0: 6772 beqs 44224 441b2: 6e14 bgts 441c8 441b4: 0c81 0000 9600 cmpil #38400,%d1 441ba: 6762 beqs 4421e 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; 441bc: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441be: 0c81 0000 e100 cmpil #57600,%d1 441c4: 665c bnes 44222 <== NEVER TAKEN 441c6: 605c bras 44224 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; 441c8: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441ce: 0c81 0003 8400 cmpil #230400,%d1 441d4: 674e beqs 44224 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; 441d6: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441d8: 0c81 0007 0800 cmpil #460800,%d1 441de: 6642 bnes 44222 <== NEVER TAKEN 441e0: 6042 bras 44224 441e2: 7001 moveq #1,%d0 441e4: 603e bras 44224 441e6: 4280 clrl %d0 441e8: 603a bras 44224 441ea: 7002 moveq #2,%d0 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 441ec: 6036 bras 44224 441ee: 7003 moveq #3,%d0 case 110: termios_baud = B110; break; 441f0: 6032 bras 44224 441f2: 7004 moveq #4,%d0 case 134: termios_baud = B134; break; 441f4: 602e bras 44224 441f6: 7005 moveq #5,%d0 case 150: termios_baud = B150; break; 441f8: 602a bras 44224 441fa: 7006 moveq #6,%d0 case 200: termios_baud = B200; break; 441fc: 6026 bras 44224 441fe: 7007 moveq #7,%d0 case 300: termios_baud = B300; break; 44200: 6022 bras 44224 44202: 7008 moveq #8,%d0 case 600: termios_baud = B600; break; 44204: 601e bras 44224 44206: 7009 moveq #9,%d0 case 1200: termios_baud = B1200; break; 44208: 601a bras 44224 4420a: 700a moveq #10,%d0 case 1800: termios_baud = B1800; break; 4420c: 6016 bras 44224 4420e: 700b moveq #11,%d0 case 2400: termios_baud = B2400; break; 44210: 6012 bras 44224 44212: 700c moveq #12,%d0 case 4800: termios_baud = B4800; break; 44214: 600e bras 44224 44216: 700d moveq #13,%d0 case 9600: termios_baud = B9600; break; 44218: 600a bras 44224 4421a: 700e moveq #14,%d0 case 19200: termios_baud = B19200; break; 4421c: 6006 bras 44224 4421e: 700f moveq #15,%d0 case 38400: termios_baud = B38400; break; 44220: 6002 bras 44224 case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 44222: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 44224: 4e5e unlk %fp <== NOT EXECUTED 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 cbec movel 5cbec ,%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 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4421e: 2479 0005 cbf4 moveal 5cbf4 ,%a2 44224: 6010 bras 44236 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 */ 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 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 4423e: 2f39 0005 cbec movel 5cbec ,%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 b5a8 lea 5b5a8 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44250: 49f9 0004 9484 lea 49484 ,%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 <== ALWAYS 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 8f80 jsr 48f80 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 44274: 2f39 0005 cbec movel 5cbec ,%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 b5ac lea 5b5ac ,%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 <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); 442a0: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 442a4: 47f9 0004 8f80 lea 48f80 ,%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 cbec movel 5cbec ,%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 b5a4 movel 5b5a4 ,%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 <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); 442d6: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 442da: 47f9 0004 8f80 lea 48f80 ,%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 cbec movel 5cbec ,%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 cbf4 moveal 5cbf4 ,%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 cbf4 movel %a3,5cbf4 if (rtems_termios_ttyTail == NULL) 44330: 4ab9 0005 cbf0 tstl 5cbf0 44336: 6606 bnes 4433e rtems_termios_ttyTail = tty; 44338: 23cb 0005 cbf0 movel %a3,5cbf0 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 b5b0 moveb 5b5b0 ,%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 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44376: 486b 0018 pea %a3@(24) 4437a: 1039 0005 b5b0 moveb 5b5b0 ,%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 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 443a0: 486b 008c pea %a3@(140) 443a4: 1039 0005 b5b0 moveb 5b5b0 ,%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 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 d2a8 jsr 4d2a8 /* * 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 <== ALWAYS 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 b5b0 moveb 5b5b0 ,%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 b5b0 moveb 5b5b0 ,%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 sc = rtems_semaphore_create ( 4445a: 486b 0068 pea %a3@(104) 4445e: 1039 0005 b5b0 moveb 5b5b0 ,%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 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 b5b0 moveb 5b5b0 ,%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 b5b0 moveb %d5,5b5b0 4452e: b081 cmpl %d1,%d0 44530: 6608 bnes 4453a <== ALWAYS TAKEN c = 'a'; 44532: 7261 moveq #97,%d1 <== NOT EXECUTED 44534: 13c1 0005 b5b0 moveb %d1,5b5b0 <== 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 <== ALWAYS 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 55bc jsr 455bc <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 445a2: 2f39 0005 cbec movel 5cbec ,%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 8ea0 jsr 48ea0 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 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 <== ALWAYS 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 * 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 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 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 433da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 433dc: 4eb9 0004 55bc jsr 455bc <== 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 <== NEVER 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 (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 <== NOT EXECUTED 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 c3a4 lea 5c3a4 ,%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 b5a4 movel 5b5a4 ,%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 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 <== ALWAYS 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 <== ALWAYS TAKEN * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 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 <== ALWAYS 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 <== NEVER TAKEN 4300a: 4282 clrl %d2 4300c: 6000 0088 braw 43096 (*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 <== ALWAYS TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 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 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 <== ALWAYS 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 <== NOT EXECUTED 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 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 c3b8 addil #377784,%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 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 c3b0 addil #377776,%d0 439b8: 2240 moveal %d0,%a1 439ba: 2051 moveal %a1@,%a0 439bc: 4a88 tstl %a0 439be: 6718 beqs 439d8 <== ALWAYS 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 <== NEVER 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 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 } 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 <== NOT EXECUTED 00050ea8 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 50ea8: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 50eac: 486e fffc pea %fp@(-4) 50eb0: 2f2e 0008 movel %fp@(8),%sp@- 50eb4: 4879 0007 5cf0 pea 75cf0 <_Timer_Information> 50eba: 4eb9 0005 378c jsr 5378c <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50ec0: 4fef 000c lea %sp@(12),%sp 50ec4: 4aae fffc tstl %fp@(-4) 50ec8: 6704 beqs 50ece 50eca: 7004 moveq #4,%d0 50ecc: 601e bras 50eec case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 50ece: 7204 moveq #4,%d1 50ed0: 2040 moveal %d0,%a0 50ed2: b2a8 0038 cmpl %a0@(56),%d1 50ed6: 670c beqs 50ee4 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 50ed8: 4868 0010 pea %a0@(16) 50edc: 4eb9 0005 53a8 jsr 553a8 <_Watchdog_Remove> 50ee2: 588f addql #4,%sp _Thread_Enable_dispatch(); 50ee4: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> 50eea: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50eec: 4e5e unlk %fp <== NOT EXECUTED 0005132c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 5132c: 4e56 ffe8 linkw %fp,#-24 51330: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 51334: 282e 0008 movel %fp@(8),%d4 51338: 262e 000c movel %fp@(12),%d3 5133c: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 51340: 2679 0007 5d2a moveal 75d2a <_Timer_server>,%a3 if ( !timer_server ) 51346: 4a8b tstl %a3 51348: 6606 bnes 51350 5134a: 700e moveq #14,%d0 5134c: 6000 00a4 braw 513f2 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 51350: 4a39 0007 5470 tstb 75470 <_TOD_Is_set> 51356: 6606 bnes 5135e <== ALWAYS TAKEN 51358: 700b moveq #11,%d0 <== NOT EXECUTED 5135a: 6000 0096 braw 513f2 <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !routine ) 5135e: 4a82 tstl %d2 51360: 6606 bnes 51368 51362: 7009 moveq #9,%d0 51364: 6000 008c braw 513f2 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 51368: 2f03 movel %d3,%sp@- 5136a: 4eb9 0004 e7a8 jsr 4e7a8 <_TOD_Validate> 51370: 588f addql #4,%sp 51372: 4a00 tstb %d0 51374: 677a beqs 513f0 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 51376: 2f03 movel %d3,%sp@- 51378: 4eb9 0004 e708 jsr 4e708 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5137e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 51380: 2600 movel %d0,%d3 if ( seconds <= _TOD_Seconds_since_epoch() ) 51382: b0b9 0007 54ee cmpl 754ee <_TOD_Now>,%d0 51388: 6366 blss 513f0 5138a: 486e fffc pea %fp@(-4) 5138e: 2f04 movel %d4,%sp@- 51390: 4879 0007 5cf0 pea 75cf0 <_Timer_Information> 51396: 4eb9 0005 378c jsr 5378c <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5139c: 4fef 000c lea %sp@(12),%sp 513a0: 2440 moveal %d0,%a2 513a2: 4aae fffc tstl %fp@(-4) 513a6: 6704 beqs 513ac 513a8: 7004 moveq #4,%d0 513aa: 6046 bras 513f2 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 513ac: 486a 0010 pea %a2@(16) 513b0: 4eb9 0005 53a8 jsr 553a8 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 513b6: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 513bc: 7003 moveq #3,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 513be: 2544 0030 movel %d4,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 513c2: 96b9 0007 54ee subl 754ee <_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; 513c8: 2540 0038 movel %d0,%a2@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 513cc: 2543 001c movel %d3,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 513d0: 2542 002c movel %d2,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 513d4: 42aa 0018 clrl %a2@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 513d8: 2f0a movel %a2,%sp@- 513da: 2f0b movel %a3,%sp@- 513dc: 206b 0004 moveal %a3@(4),%a0 513e0: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 513e2: 4eb9 0005 4012 jsr 54012 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 513e8: 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(); 513ec: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 513ee: 6002 bras 513f2 513f0: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 513f2: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 513f8: 4e5e unlk %fp <== NOT EXECUTED 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 cba4 movel 5cba4 ,%d0 <== NOT EXECUTED 41f50: 2200 movel %d0,%d1 <== NOT EXECUTED 41f52: 5281 addql #1,%d1 <== NOT EXECUTED 41f54: 23c1 0005 cba4 movel %d1,5cba4 <== 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 cd08 movel 5cd08 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 41f64: 5280 addql #1,%d0 <== NOT EXECUTED 41f66: 23c0 0005 cd08 movel %d0,5cd08 <_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 cba4 cmpl 5cba4 ,%d0 <== NOT EXECUTED 41f74: 6d00 0138 bltw 420ae <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 41f78: 2079 0005 b680 moveal 5b680 <_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 cde4 jsr 4cde4 <== 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 ca88 jsr 4ca88 <__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 b680 moveal 5b680 <_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 3310 jsr 53310 <== 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 b680 moveal 5b680 <_impure_ptr>,%a0 <== NOT EXECUTED 41fd6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fd8: 4879 0005 9f69 pea 59f69 <== NOT EXECUTED 41fde: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 41fe2: 4eb9 0004 d170 jsr 4d170 <== 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 da24 lea 4da24 ,%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 b680 moveal 5b680 <_impure_ptr>,%a0 <== NOT EXECUTED 42010: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42012: 4879 0005 9f77 pea 59f77 <== NOT EXECUTED 42018: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4201c: 4eb9 0004 d170 jsr 4d170 <== 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 9f84 pea 59f84 <== NOT EXECUTED 42030: 2079 0005 b680 moveal 5b680 <_impure_ptr>,%a0 <== NOT EXECUTED 42036: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4203a: 4eb9 0004 d170 jsr 4d170 <== 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 a776 pea 5a776 <== NOT EXECUTED 4204c: 2079 0005 b680 moveal 5b680 <_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 d170 jsr 4d170 <== NOT EXECUTED (void) fflush(stderr); 42062: 2079 0005 b680 moveal 5b680 <_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 cde4 jsr 4cde4 <== 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 9f98 pea 59f98 <== 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 9fad pea 59fad <== NOT EXECUTED 420a4: 42a7 clrl %sp@- <== NOT EXECUTED 420a6: 4e90 jsr %a0@ <== NOT EXECUTED abort(); 420a8: 4eb9 0004 ca58 jsr 4ca58 <== 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 00042a84 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 42a84: 4e56 ffe4 linkw %fp,#-28 42a88: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 42a8c: 246e 0008 moveal %fp@(8),%a2 42a90: 4283 clrl %d3 42a92: 283c 7fff ffff movel #2147483647,%d4 42a98: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 42a9a: 47f9 0005 02c4 lea 502c4 <__srget_r>,%a3 42aa0: 202a 0004 movel %a2@(4),%d0 42aa4: 5380 subql #1,%d0 42aa6: 2540 0004 movel %d0,%a2@(4) 42aaa: 6c0e bges 42aba <== ALWAYS TAKEN 42aac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42aae: 2f39 0005 e990 movel 5e990 <_impure_ptr>,%sp@- <== NOT EXECUTED 42ab4: 4e93 jsr %a3@ <== NOT EXECUTED 42ab6: 508f addql #8,%sp <== NOT EXECUTED 42ab8: 600a bras 42ac4 <== NOT EXECUTED 42aba: 2052 moveal %a2@,%a0 42abc: 4280 clrl %d0 42abe: 1010 moveb %a0@,%d0 42ac0: 5288 addql #1,%a0 42ac2: 2488 movel %a0,%a2@ if (c == ':') 42ac4: 723a moveq #58,%d1 42ac6: b280 cmpl %d0,%d1 42ac8: 6750 beqs 42b1a break; if (sign == 0) { 42aca: 4a83 tstl %d3 42acc: 660e bnes 42adc <== NEVER TAKEN if (c == '-') { 42ace: 7c2d moveq #45,%d6 42ad0: bc80 cmpl %d0,%d6 42ad2: 6606 bnes 42ada <== ALWAYS TAKEN sign = -1; limit++; 42ad4: 5284 addql #1,%d4 <== NOT EXECUTED 42ad6: 76ff moveq #-1,%d3 <== NOT EXECUTED continue; 42ad8: 60c6 bras 42aa0 <== NOT EXECUTED 42ada: 7601 moveq #1,%d3 } sign = 1; } if (!isdigit(c)) 42adc: 2079 0005 e98c moveal 5e98c <__ctype_ptr__>,%a0 42ae2: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 42ae6: 49c1 extbl %d1 42ae8: 44c1 movew %d1,%ccr 42aea: 6640 bnes 42b2c <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 42aec: 2204 movel %d4,%d1 42aee: 7c0a moveq #10,%d6 42af0: 4c46 1005 remul %d6,%d5,%d1 42af4: 4c46 1001 remul %d6,%d1,%d1 42af8: b282 cmpl %d2,%d1 42afa: 6530 bcss 42b2c <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 42afc: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 42b02: b282 cmpl %d2,%d1 42b04: 6604 bnes 42b0a <== ALWAYS TAKEN 42b06: ba80 cmpl %d0,%d5 <== NOT EXECUTED 42b08: 6522 bcss 42b2c <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 42b0a: 2202 movel %d2,%d1 42b0c: e789 lsll #3,%d1 42b0e: 2241 moveal %d1,%a1 42b10: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 42b14: 2400 movel %d0,%d2 42b16: d488 addl %a0,%d2 42b18: 6086 bras 42aa0 } if (sign == 0) 42b1a: 4a83 tstl %d3 42b1c: 670e beqs 42b2c <== NEVER TAKEN return 0; *val = i * sign; 42b1e: 4c02 3800 mulsl %d2,%d3 42b22: 7001 moveq #1,%d0 42b24: 206e 000c moveal %fp@(12),%a0 42b28: 2083 movel %d3,%a0@ return 1; 42b2a: 6002 bras 42b2e 42b2c: 4280 clrl %d0 <== NOT EXECUTED } 42b2e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 42b34: 4e5e unlk %fp <== NOT EXECUTED 00042b38 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 42b38: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 42b3c: 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) { 42b40: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 42b44: 246e 0010 moveal %fp@(16),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 42b48: 4bf9 0005 02c4 lea 502c4 <__srget_r>,%a5 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 42b4e: 286e 0008 moveal %fp@(8),%a4 42b52: 266e 0014 moveal %fp@(20),%a3 42b56: 242e 0018 movel %fp@(24),%d2 int c; *name = *bufp; 42b5a: 2092 movel %a2@,%a0@ for (;;) { c = getc(fp); 42b5c: 202c 0004 movel %a4@(4),%d0 42b60: 5380 subql #1,%d0 42b62: 2940 0004 movel %d0,%a4@(4) 42b66: 6c0e bges 42b76 42b68: 2f0c movel %a4,%sp@- 42b6a: 2f39 0005 e990 movel 5e990 <_impure_ptr>,%sp@- 42b70: 4e95 jsr %a5@ 42b72: 508f addql #8,%sp 42b74: 600a bras 42b80 42b76: 2054 moveal %a4@,%a0 42b78: 4280 clrl %d0 42b7a: 1010 moveb %a0@,%d0 42b7c: 5288 addql #1,%a0 42b7e: 2888 movel %a0,%a4@ if (c == ':') { 42b80: 723a moveq #58,%d1 42b82: b280 cmpl %d0,%d1 42b84: 6606 bnes 42b8c if (nlFlag) 42b86: 4a82 tstl %d2 42b88: 6724 beqs 42bae <== ALWAYS TAKEN 42b8a: 602e bras 42bba <== NOT EXECUTED return 0; break; } if (c == '\n') { 42b8c: 720a moveq #10,%d1 42b8e: b280 cmpl %d0,%d1 42b90: 6606 bnes 42b98 if (!nlFlag) 42b92: 4a82 tstl %d2 42b94: 6618 bnes 42bae <== ALWAYS TAKEN 42b96: 6022 bras 42bba <== NOT EXECUTED return 0; break; } if (c == EOF) 42b98: 72ff moveq #-1,%d1 42b9a: b280 cmpl %d0,%d1 42b9c: 671c beqs 42bba <== NEVER TAKEN return 0; if (*nleft < 2) 42b9e: 7201 moveq #1,%d1 42ba0: b293 cmpl %a3@,%d1 42ba2: 6416 bccs 42bba <== NEVER TAKEN return 0; **bufp = c; 42ba4: 2052 moveal %a2@,%a0 42ba6: 1080 moveb %d0,%a0@ ++(*bufp); 42ba8: 5292 addql #1,%a2@ --(*nleft); 42baa: 5393 subql #1,%a3@ } 42bac: 60ae bras 42b5c **bufp = '\0'; 42bae: 2052 moveal %a2@,%a0 ++(*bufp); --(*nleft); 42bb0: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 42bb2: 4210 clrb %a0@ ++(*bufp); 42bb4: 5292 addql #1,%a2@ --(*nleft); 42bb6: 5393 subql #1,%a3@ return 1; 42bb8: 6002 bras 42bbc 42bba: 4280 clrl %d0 <== NOT EXECUTED } 42bbc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 42bc2: 4e5e unlk %fp <== NOT EXECUTED 00042bc6 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42bc6: 4e56 ffe4 linkw %fp,#-28 42bca: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42bce: 42a7 clrl %sp@- 42bd0: 280e movel %fp,%d4 42bd2: 0684 0000 0014 addil #20,%d4 42bd8: 260e movel %fp,%d3 42bda: 0683 0000 0010 addil #16,%d3 42be0: 47fa ff56 lea %pc@(42b38 ),%a3 42be4: 2f04 movel %d4,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42be6: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42bea: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 42bec: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42bf0: 2f0a movel %a2,%sp@- 42bf2: 2f02 movel %d2,%sp@- 42bf4: 4e93 jsr %a3@ 42bf6: 4fef 0014 lea %sp@(20),%sp 42bfa: 4a80 tstl %d0 42bfc: 6700 00c2 beqw 42cc0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 42c00: 42a7 clrl %sp@- 42c02: 2f04 movel %d4,%sp@- 42c04: 2f03 movel %d3,%sp@- 42c06: 486a 0004 pea %a2@(4) 42c0a: 2f02 movel %d2,%sp@- 42c0c: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42c0e: 4fef 0014 lea %sp@(20),%sp 42c12: 4a80 tstl %d0 42c14: 6700 00aa beqw 42cc0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 42c18: 486e fffc pea %fp@(-4) 42c1c: 2f02 movel %d2,%sp@- 42c1e: 4eba fe64 jsr %pc@(42a84 ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42c22: 508f addql #8,%sp 42c24: 4a80 tstl %d0 42c26: 6700 0098 beqw 42cc0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 42c2a: 4878 0001 pea 1 42c2e: 2f04 movel %d4,%sp@- 42c30: 2f03 movel %d3,%sp@- 42c32: 486e fff8 pea %fp@(-8) 42c36: 2f02 movel %d2,%sp@- 42c38: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 42c3a: 4fef 0014 lea %sp@(20),%sp 42c3e: 4a80 tstl %d0 42c40: 677e beqs 42cc0 <== NEVER TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c42: 226e fff8 moveal %fp@(-8),%a1 42c46: 7001 moveq #1,%d0 42c48: 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; 42c4a: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c50: 6008 bras 42c5a if(*cp == ',') 42c52: 722c moveq #44,%d1 42c54: b282 cmpl %d2,%d1 42c56: 6602 bnes 42c5a <== ALWAYS TAKEN memcount++; 42c58: 5280 addql #1,%d0 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c5a: 1210 moveb %a0@,%d1 42c5c: 5288 addql #1,%a0 if(*cp == ',') 42c5e: 1401 moveb %d1,%d2 42c60: 49c2 extbl %d2 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c62: 4a01 tstb %d1 42c64: 66ec bnes 42c52 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 42c66: e588 lsll #2,%d0 42c68: 0680 0000 0013 addil #19,%d0 42c6e: b0ae 0014 cmpl %fp@(20),%d0 42c72: 624c bhis 42cc0 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 42c74: 202e 0010 movel %fp@(16),%d0 42c78: 74f0 moveq #-16,%d2 42c7a: 0680 0000 000f addil #15,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c80: 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); 42c82: c082 andl %d2,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 42c84: 2040 moveal %d0,%a0 42c86: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c88: 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); 42c8c: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42c90: 6018 bras 42caa if(*cp == ',') { 42c92: 702c moveq #44,%d0 42c94: b082 cmpl %d2,%d0 42c96: 6610 bnes 42ca8 <== ALWAYS TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 42c98: 2408 movel %a0,%d2 <== NOT EXECUTED 42c9a: 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'; 42c9c: 4210 clrb %a0@ <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 42c9e: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 42ca2: 2382 1c00 movel %d2,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 42ca6: 5281 addql #1,%d1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42ca8: 5288 addql #1,%a0 42caa: 1010 moveb %a0@,%d0 if(*cp == ',') { 42cac: 1400 moveb %d0,%d2 42cae: 49c2 extbl %d2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 42cb0: 4a00 tstb %d0 42cb2: 66de bnes 42c92 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 42cb4: 206a 000a moveal %a2@(10),%a0 42cb8: 7001 moveq #1,%d0 42cba: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) return 1; 42cbe: 6002 bras 42cc2 42cc0: 4280 clrl %d0 <== NOT EXECUTED } 42cc2: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 42cc8: 4e5e unlk %fp <== NOT EXECUTED 00042d04 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 42d04: 4e56 ffe0 linkw %fp,#-32 42d08: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d0c: 42a7 clrl %sp@- 42d0e: 280e movel %fp,%d4 42d10: 0684 0000 0014 addil #20,%d4 42d16: 260e movel %fp,%d3 42d18: 0683 0000 0010 addil #16,%d3 42d1e: 47fa fe18 lea %pc@(42b38 ),%a3 42d22: 2f04 movel %d4,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 42d24: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d28: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 42d2a: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d2e: 2f0a movel %a2,%sp@- 42d30: 2f02 movel %d2,%sp@- 42d32: 4e93 jsr %a3@ 42d34: 4fef 0014 lea %sp@(20),%sp 42d38: 4a80 tstl %d0 42d3a: 6700 00a4 beqw 42de0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 42d3e: 42a7 clrl %sp@- 42d40: 2f04 movel %d4,%sp@- 42d42: 2f03 movel %d3,%sp@- 42d44: 486a 0004 pea %a2@(4) 42d48: 2f02 movel %d2,%sp@- 42d4a: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d4c: 4fef 0014 lea %sp@(20),%sp 42d50: 4a80 tstl %d0 42d52: 6700 008c beqw 42de0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 42d56: 486e fffc pea %fp@(-4) 42d5a: 49fa fd28 lea %pc@(42a84 ),%a4 42d5e: 2f02 movel %d2,%sp@- 42d60: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d62: 508f addql #8,%sp 42d64: 4a80 tstl %d0 42d66: 6778 beqs 42de0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 42d68: 486e fff8 pea %fp@(-8) 42d6c: 2f02 movel %d2,%sp@- 42d6e: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d70: 508f addql #8,%sp 42d72: 4a80 tstl %d0 42d74: 676a beqs 42de0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 42d76: 42a7 clrl %sp@- 42d78: 2f04 movel %d4,%sp@- 42d7a: 2f03 movel %d3,%sp@- 42d7c: 486a 000c pea %a2@(12) 42d80: 2f02 movel %d2,%sp@- 42d82: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d84: 4fef 0014 lea %sp@(20),%sp 42d88: 4a80 tstl %d0 42d8a: 6754 beqs 42de0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 42d8c: 42a7 clrl %sp@- 42d8e: 2f04 movel %d4,%sp@- 42d90: 2f03 movel %d3,%sp@- 42d92: 486a 0010 pea %a2@(16) 42d96: 2f02 movel %d2,%sp@- 42d98: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42d9a: 4fef 0014 lea %sp@(20),%sp 42d9e: 4a80 tstl %d0 42da0: 673e beqs 42de0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 42da2: 42a7 clrl %sp@- 42da4: 2f04 movel %d4,%sp@- 42da6: 2f03 movel %d3,%sp@- 42da8: 486a 0014 pea %a2@(20) 42dac: 2f02 movel %d2,%sp@- 42dae: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42db0: 4fef 0014 lea %sp@(20),%sp 42db4: 4a80 tstl %d0 42db6: 6728 beqs 42de0 <== NEVER TAKEN || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 42db8: 4878 0001 pea 1 42dbc: 2f04 movel %d4,%sp@- 42dbe: 2f03 movel %d3,%sp@- 42dc0: 486a 0018 pea %a2@(24) 42dc4: 2f02 movel %d2,%sp@- 42dc6: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 42dc8: 4fef 0014 lea %sp@(20),%sp 42dcc: 4a80 tstl %d0 42dce: 6710 beqs 42de0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 42dd0: 7001 moveq #1,%d0 42dd2: 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; 42dd8: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; 42dde: 6002 bras 42de2 42de0: 4280 clrl %d0 <== NOT EXECUTED } 42de2: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 42de8: 4e5e unlk %fp <== NOT EXECUTED 000456ac : int sched_get_priority_max( int policy ) { switch ( policy ) { 456ac: 7004 moveq #4,%d0 #include int sched_get_priority_max( int policy ) { 456ae: 4e56 0000 linkw %fp,#0 456b2: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 456b6: b081 cmpl %d1,%d0 456b8: 650c bcss 456c6 456ba: 103c 0001 moveb #1,%d0 456be: e3a8 lsll %d1,%d0 456c0: 7217 moveq #23,%d1 456c2: c081 andl %d1,%d0 456c4: 6610 bnes 456d6 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 456c6: 4eb9 0004 d60c jsr 4d60c <__errno> 456cc: 7216 moveq #22,%d1 456ce: 2040 moveal %d0,%a0 456d0: 70ff moveq #-1,%d0 456d2: 2081 movel %d1,%a0@ 456d4: 600a bras 456e0 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 456d6: 4280 clrl %d0 456d8: 1039 0005 c596 moveb 5c596 ,%d0 456de: 5380 subql #1,%d0 } 456e0: 4e5e unlk %fp <== NOT EXECUTED 000456e4 : int sched_get_priority_min( int policy ) { switch ( policy ) { 456e4: 7004 moveq #4,%d0 #include int sched_get_priority_min( int policy ) { 456e6: 4e56 0000 linkw %fp,#0 456ea: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 456ee: b081 cmpl %d1,%d0 456f0: 6510 bcss 45702 456f2: 103c 0001 moveb #1,%d0 456f6: e3a8 lsll %d1,%d0 456f8: 7217 moveq #23,%d1 456fa: c081 andl %d1,%d0 456fc: 6704 beqs 45702 <== NEVER TAKEN 456fe: 7001 moveq #1,%d0 45700: 600e bras 45710 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 45702: 4eb9 0004 d60c jsr 4d60c <__errno> 45708: 7216 moveq #22,%d1 4570a: 2040 moveal %d0,%a0 4570c: 70ff moveq #-1,%d0 4570e: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 45710: 4e5e unlk %fp <== NOT EXECUTED 00045714 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 45714: 4e56 0000 linkw %fp,#0 45718: 2f03 movel %d3,%sp@- 4571a: 262e 0008 movel %fp@(8),%d3 4571e: 2f02 movel %d2,%sp@- 45720: 242e 000c movel %fp@(12),%d2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 45724: 4a83 tstl %d3 45726: 671a beqs 45742 <== NEVER TAKEN 45728: 4eb9 0004 2994 jsr 42994 4572e: b083 cmpl %d3,%d0 45730: 6710 beqs 45742 rtems_set_errno_and_return_minus_one( ESRCH ); 45732: 4eb9 0004 d60c jsr 4d60c <__errno> 45738: 7403 moveq #3,%d2 4573a: 72ff moveq #-1,%d1 4573c: 2040 moveal %d0,%a0 4573e: 2082 movel %d2,%a0@ 45740: 6026 bras 45768 if ( !interval ) 45742: 4a82 tstl %d2 45744: 6610 bnes 45756 rtems_set_errno_and_return_minus_one( EINVAL ); 45746: 4eb9 0004 d60c jsr 4d60c <__errno> 4574c: 72ff moveq #-1,%d1 4574e: 2040 moveal %d0,%a0 45750: 7016 moveq #22,%d0 45752: 2080 movel %d0,%a0@ 45754: 6012 bras 45768 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 45756: 2f02 movel %d2,%sp@- 45758: 2f39 0005 dcd8 movel 5dcd8 <_Thread_Ticks_per_timeslice>,%sp@- 4575e: 4eb9 0004 8858 jsr 48858 <_Timespec_From_ticks> return 0; 45764: 508f addql #8,%sp rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 45766: 4281 clrl %d1 return 0; } 45768: 242e fff8 movel %fp@(-8),%d2 4576c: 2001 movel %d1,%d0 4576e: 262e fffc movel %fp@(-4),%d3 45772: 4e5e unlk %fp ... 00047ce8 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 47ce8: 4e56 ffe0 linkw %fp,#-32 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47cec: 2039 0006 1b04 movel 61b04 <_Thread_Dispatch_disable_level>,%d0 47cf2: 5280 addql #1,%d0 47cf4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 47cf8: 23c0 0006 1b04 movel %d0,61b04 <_Thread_Dispatch_disable_level> 47cfe: 242e 0008 movel %fp@(8),%d2 47d02: 282e 000c movel %fp@(12),%d4 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 47d06: 2a04 movel %d4,%d5 47d08: 0285 0000 0200 andil #512,%d5 47d0e: 6604 bnes 47d14 47d10: 4283 clrl %d3 47d12: 6004 bras 47d18 va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 47d14: 262e 0014 movel %fp@(20),%d3 va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 47d18: 486e fffc pea %fp@(-4) 47d1c: 2f02 movel %d2,%sp@- 47d1e: 4eb9 0004 d5f8 jsr 4d5f8 <_POSIX_Semaphore_Name_to_id> * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 47d24: 508f addql #8,%sp mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 47d26: 2440 moveal %d0,%a2 * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 47d28: 4a80 tstl %d0 47d2a: 671e beqs 47d4a /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 47d2c: 7002 moveq #2,%d0 47d2e: b08a cmpl %a2,%d0 47d30: 6604 bnes 47d36 <== NEVER TAKEN 47d32: 4a85 tstl %d5 47d34: 6662 bnes 47d98 _Thread_Enable_dispatch(); 47d36: 4eb9 0004 a2f2 jsr 4a2f2 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 47d3c: 4eb9 0005 080c jsr 5080c <__errno> 47d42: 72ff moveq #-1,%d1 47d44: 2040 moveal %d0,%a0 47d46: 208a movel %a2,%a0@ 47d48: 607a bras 47dc4 47d4a: 45f9 0004 a2f2 lea 4a2f2 <_Thread_Enable_dispatch>,%a2 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 47d50: 0284 0000 0a00 andil #2560,%d4 47d56: 0c84 0000 0a00 cmpil #2560,%d4 47d5c: 6612 bnes 47d70 _Thread_Enable_dispatch(); 47d5e: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 47d60: 4eb9 0005 080c jsr 5080c <__errno> 47d66: 72ff moveq #-1,%d1 47d68: 2040 moveal %d0,%a0 47d6a: 7011 moveq #17,%d0 47d6c: 2080 movel %d0,%a0@ 47d6e: 6054 bras 47dc4 47d70: 486e fff4 pea %fp@(-12) 47d74: 2f2e fffc movel %fp@(-4),%sp@- 47d78: 4879 0006 1d5e pea 61d5e <_POSIX_Semaphore_Information> 47d7e: 4eb9 0004 9aa0 jsr 49aa0 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 47d84: 2040 moveal %d0,%a0 47d86: 52a8 0016 addql #1,%a0@(22) if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 47d8a: 2d40 fff8 movel %d0,%fp@(-8) the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 47d8e: 4e92 jsr %a2@ _Thread_Enable_dispatch(); 47d90: 4e92 jsr %a2@ goto return_id; 47d92: 4fef 000c lea %sp@(12),%sp 47d96: 6026 bras 47dbe /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 47d98: 486e fff8 pea %fp@(-8) 47d9c: 2f03 movel %d3,%sp@- 47d9e: 42a7 clrl %sp@- 47da0: 2f02 movel %d2,%sp@- 47da2: 4eb9 0004 d4b0 jsr 4d4b0 <_POSIX_Semaphore_Create_support> 47da8: 2400 movel %d0,%d2 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 47daa: 4eb9 0004 a2f2 jsr 4a2f2 <_Thread_Enable_dispatch> if ( status == -1 ) 47db0: 4fef 0010 lea %sp@(16),%sp 47db4: 70ff moveq #-1,%d0 47db6: b082 cmpl %d2,%d0 47db8: 6604 bnes 47dbe 47dba: 72ff moveq #-1,%d1 47dbc: 6006 bras 47dc4 return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 47dbe: 222e fff8 movel %fp@(-8),%d1 47dc2: 5081 addql #8,%d1 #endif return id; } 47dc4: 2001 movel %d1,%d0 47dc6: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 47dcc: 4e5e unlk %fp <== NOT EXECUTED 00042f04 : return NULL; return &grent; } void setgrent(void) { 42f04: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 42f08: 4eb9 0004 2e24 jsr 42e24 <== NOT EXECUTED if (group_fp != NULL) 42f0e: 2039 0005 f7a6 movel 5f7a6 ,%d0 <== NOT EXECUTED 42f14: 670a beqs 42f20 <== NOT EXECUTED fclose(group_fp); 42f16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42f18: 4eb9 0004 e862 jsr 4e862 <== NOT EXECUTED 42f1e: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 42f20: 4879 0005 e067 pea 5e067 <_global_impure_ptr+0xbf> <== NOT EXECUTED 42f26: 4879 0005 d548 pea 5d548 <== NOT EXECUTED 42f2c: 4eb9 0004 eee4 jsr 4eee4 <== NOT EXECUTED 42f32: 508f addql #8,%sp <== NOT EXECUTED } 42f34: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 42f36: 23c0 0005 f7a6 movel %d0,5f7a6 <== NOT EXECUTED } 000430b4 : return NULL; return &pwent; } void setpwent(void) { 430b4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 430b8: 4eb9 0004 2e24 jsr 42e24 <== NOT EXECUTED if (passwd_fp != NULL) 430be: 2039 0005 f6be movel 5f6be ,%d0 <== NOT EXECUTED 430c4: 670a beqs 430d0 <== NOT EXECUTED fclose(passwd_fp); 430c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 430c8: 4eb9 0004 e862 jsr 4e862 <== NOT EXECUTED 430ce: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 430d0: 4879 0005 e067 pea 5e067 <_global_impure_ptr+0xbf> <== NOT EXECUTED 430d6: 4879 0005 d4d5 pea 5d4d5 <== NOT EXECUTED 430dc: 4eb9 0004 eee4 jsr 4eee4 <== NOT EXECUTED 430e2: 508f addql #8,%sp <== NOT EXECUTED } 430e4: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 430e6: 23c0 0005 f6be movel %d0,5f6be <== NOT EXECUTED } 000455e4 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 455e4: 4e56 ffec linkw %fp,#-20 455e8: 222e 0010 movel %fp@(16),%d1 455ec: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 455f0: 242e 0008 movel %fp@(8),%d2 455f4: 246e 000c moveal %fp@(12),%a2 ISR_Level level; if ( oact ) 455f8: 4a81 tstl %d1 455fa: 6722 beqs 4561e *oact = _POSIX_signals_Vectors[ sig ]; 455fc: 2602 movel %d2,%d3 455fe: 2002 movel %d2,%d0 45600: 4878 000c pea c 45604: e58b lsll #2,%d3 45606: e988 lsll #4,%d0 45608: 9083 subl %d3,%d0 4560a: 0680 0005 edb6 addil #388534,%d0 45610: 2f00 movel %d0,%sp@- 45612: 2f01 movel %d1,%sp@- 45614: 4eb9 0004 dfb8 jsr 4dfb8 4561a: 4fef 000c lea %sp@(12),%sp if ( !sig ) 4561e: 4a82 tstl %d2 45620: 6710 beqs 45632 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 45622: 2002 movel %d2,%d0 45624: 5380 subql #1,%d0 45626: 721f moveq #31,%d1 45628: b280 cmpl %d0,%d1 4562a: 6506 bcss 45632 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 4562c: 7009 moveq #9,%d0 4562e: b082 cmpl %d2,%d0 45630: 6610 bnes 45642 rtems_set_errno_and_return_minus_one( EINVAL ); 45632: 4eb9 0004 d780 jsr 4d780 <__errno> 45638: 72ff moveq #-1,%d1 4563a: 2040 moveal %d0,%a0 4563c: 7016 moveq #22,%d0 4563e: 2080 movel %d0,%a0@ 45640: 6060 bras 456a2 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 45642: 4a8a tstl %a2 45644: 675a beqs 456a0 <== NEVER TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 45646: 203c 0000 0700 movel #1792,%d0 4564c: 40c3 movew %sr,%d3 4564e: 8083 orl %d3,%d0 45650: 46c0 movew %d0,%sr 45652: 780c moveq #12,%d4 45654: 47f9 0004 dfb8 lea 4dfb8 ,%a3 4565a: 4c02 4800 mulsl %d2,%d4 if ( act->sa_handler == SIG_DFL ) { 4565e: 4aaa 0008 tstl %a2@(8) 45662: 661e bnes 45682 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 45664: 4878 000c pea c 45668: 2004 movel %d4,%d0 4566a: 0680 0005 c304 addil #377604,%d0 45670: 2f00 movel %d0,%sp@- 45672: 0684 0005 edb6 addil #388534,%d4 45678: 2f04 movel %d4,%sp@- 4567a: 4e93 jsr %a3@ 4567c: 4fef 000c lea %sp@(12),%sp 45680: 601c bras 4569e } else { _POSIX_signals_Clear_process_signals( sig ); 45682: 2f02 movel %d2,%sp@- _POSIX_signals_Vectors[ sig ] = *act; 45684: 0684 0005 edb6 addil #388534,%d4 _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 4568a: 4eb9 0004 a748 jsr 4a748 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 45690: 4878 000c pea c 45694: 2f0a movel %a2,%sp@- 45696: 2f04 movel %d4,%sp@- 45698: 4e93 jsr %a3@ 4569a: 4fef 0010 lea %sp@(16),%sp } _ISR_Enable( level ); 4569e: 46c3 movew %d3,%sr 456a0: 4281 clrl %d1 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 456a2: 2001 movel %d1,%d0 456a4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 456aa: 4e5e unlk %fp ... 00047364 : #include int sigsuspend( const sigset_t *sigmask ) { 47364: 4e56 ffec linkw %fp,#-20 47368: 48d7 040c moveml %d2-%d3/%a2,%sp@ int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 4736c: 240e movel %fp,%d2 4736e: 5982 subql #4,%d2 47370: 45f9 0004 733c lea 4733c ,%a2 (void) sigfillset( &all_signals ); 47376: 260e movel %fp,%d3 47378: 5183 subql #8,%d3 int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 4737a: 2f02 movel %d2,%sp@- 4737c: 2f2e 0008 movel %fp@(8),%sp@- 47380: 4878 0001 pea 1 47384: 4e92 jsr %a2@ (void) sigfillset( &all_signals ); 47386: 2f03 movel %d3,%sp@- 47388: 4eb9 0004 729c jsr 4729c status = sigtimedwait( &all_signals, NULL, NULL ); 4738e: 42a7 clrl %sp@- 47390: 42a7 clrl %sp@- 47392: 2f03 movel %d3,%sp@- 47394: 4eb9 0004 7414 jsr 47414 4739a: 2600 movel %d0,%d3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 4739c: 42a7 clrl %sp@- 4739e: 2f02 movel %d2,%sp@- 473a0: 42a7 clrl %sp@- 473a2: 4e92 jsr %a2@ /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 473a4: 4fef 0028 lea %sp@(40),%sp 473a8: 70ff moveq #-1,%d0 473aa: b083 cmpl %d3,%d0 473ac: 670c beqs 473ba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); 473ae: 4eb9 0004 f2a4 jsr 4f2a4 <__errno> 473b4: 2040 moveal %d0,%a0 473b6: 7004 moveq #4,%d0 473b8: 2080 movel %d0,%a0@ return status; } 473ba: 70ff moveq #-1,%d0 473bc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 473c2: 4e5e unlk %fp ... 000459cc : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 459cc: 4e56 ffd8 linkw %fp,#-40 459d0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 459d4: 286e 0008 moveal %fp@(8),%a4 459d8: 246e 000c moveal %fp@(12),%a2 459dc: 242e 0010 movel %fp@(16),%d2 ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 459e0: 4a8c tstl %a4 459e2: 6732 beqs 45a16 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 459e4: 4a82 tstl %d2 459e6: 6740 beqs 45a28 if ( !_Timespec_Is_valid( timeout ) ) 459e8: 2f02 movel %d2,%sp@- 459ea: 4eb9 0004 8ba4 jsr 48ba4 <_Timespec_Is_valid> 459f0: 588f addql #4,%sp 459f2: 4a00 tstb %d0 459f4: 6612 bnes 45a08 rtems_set_errno_and_return_minus_one( EINVAL ); 459f6: 4eb9 0004 da74 jsr 4da74 <__errno> 459fc: 7816 moveq #22,%d4 459fe: 74ff moveq #-1,%d2 45a00: 2240 moveal %d0,%a1 45a02: 2284 movel %d4,%a1@ 45a04: 6000 012e braw 45b34 interval = _Timespec_To_ticks( timeout ); 45a08: 2f02 movel %d2,%sp@- 45a0a: 4eb9 0004 8c14 jsr 48c14 <_Timespec_To_ticks> if ( !interval ) 45a10: 588f addql #4,%sp 45a12: 4a80 tstl %d0 45a14: 6614 bnes 45a2a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 45a16: 4eb9 0004 da74 jsr 4da74 <__errno> 45a1c: 7616 moveq #22,%d3 45a1e: 74ff moveq #-1,%d2 45a20: 2040 moveal %d0,%a0 45a22: 2083 movel %d3,%a0@ 45a24: 6000 010e braw 45b34 45a28: 4280 clrl %d0 /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 45a2a: 4a8a tstl %a2 45a2c: 6604 bnes 45a32 45a2e: 45ee fff4 lea %fp@(-12),%a2 the_thread = _Thread_Executing; 45a32: 2079 0005 ed42 moveal 5ed42 <_Thread_Executing>,%a0 * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 45a38: 223c 0000 0700 movel #1792,%d1 the_info = ( info ) ? info : &signal_information; the_thread = _Thread_Executing; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 45a3e: 2668 010e moveal %a0@(270),%a3 * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 45a42: 40c3 movew %sr,%d3 45a44: 8283 orl %d3,%d1 45a46: 46c1 movew %d1,%sr if ( *set & api->signals_pending ) { 45a48: 2414 movel %a4@,%d2 45a4a: 2802 movel %d2,%d4 45a4c: 222b 00d0 movel %a3@(208),%d1 45a50: c881 andl %d1,%d4 45a52: 6730 beqs 45a84 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 45a54: 2f01 movel %d1,%sp@- 45a56: 4eb9 0004 5980 jsr 45980 <_POSIX_signals_Get_highest> 45a5c: 2480 movel %d0,%a2@ _POSIX_signals_Clear_signals( 45a5e: 42a7 clrl %sp@- 45a60: 42a7 clrl %sp@- 45a62: 2f0a movel %a2,%sp@- 45a64: 2f00 movel %d0,%sp@- 45a66: 2f0b movel %a3,%sp@- 45a68: 4eb9 0004 ad80 jsr 4ad80 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 45a6e: 46c3 movew %d3,%sr the_info->si_code = SI_USER; 45a70: 7001 moveq #1,%d0 the_info->si_value.sival_int = 0; return the_info->si_signo; 45a72: 4fef 0018 lea %sp@(24),%sp false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; 45a76: 2540 0004 movel %d0,%a2@(4) the_info->si_value.sival_int = 0; return the_info->si_signo; 45a7a: 2412 movel %a2@,%d2 false ); _ISR_Enable( level ); the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 45a7c: 42aa 0008 clrl %a2@(8) return the_info->si_signo; 45a80: 6000 00b2 braw 45b34 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 45a84: 2239 0005 f32a movel 5f32a <_POSIX_signals_Pending>,%d1 45a8a: 4bf9 0004 ad80 lea 4ad80 <_POSIX_signals_Clear_signals>,%a5 45a90: c481 andl %d1,%d2 45a92: 672c beqs 45ac0 signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 45a94: 2f01 movel %d1,%sp@- 45a96: 4eb9 0004 5980 jsr 45980 <_POSIX_signals_Get_highest> 45a9c: 2400 movel %d0,%d2 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 45a9e: 42a7 clrl %sp@- 45aa0: 4878 0001 pea 1 45aa4: 2f0a movel %a2,%sp@- 45aa6: 2f00 movel %d0,%sp@- 45aa8: 2f0b movel %a3,%sp@- 45aaa: 4e95 jsr %a5@ _ISR_Enable( level ); 45aac: 46c3 movew %d3,%sr the_info->si_signo = signo; the_info->si_code = SI_USER; 45aae: 7201 moveq #1,%d1 the_info->si_value.sival_int = 0; return signo; 45ab0: 4fef 0018 lea %sp@(24),%sp _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 45ab4: 42aa 0008 clrl %a2@(8) if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; 45ab8: 2482 movel %d2,%a2@ the_info->si_code = SI_USER; 45aba: 2541 0004 movel %d1,%a2@(4) the_info->si_value.sival_int = 0; return signo; 45abe: 6074 bras 45b34 45ac0: 2239 0005 ec88 movel 5ec88 <_Thread_Dispatch_disable_level>,%d1 45ac6: 5281 addql #1,%d1 45ac8: 23c1 0005 ec88 movel %d1,5ec88 <_Thread_Dispatch_disable_level> } the_info->si_signo = -1; 45ace: 72ff moveq #-1,%d1 45ad0: 2481 movel %d1,%a2@ _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 45ad2: 7204 moveq #4,%d1 } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 45ad4: 43f9 0005 f2c2 lea 5f2c2 <_POSIX_signals_Wait_queue>,%a1 the_thread->Wait.return_code = EINTR; 45ada: 2141 0034 movel %d1,%a0@(52) the_thread->Wait.option = *set; 45ade: 2154 0030 movel %a4@,%a0@(48) 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; 45ae2: 123c 0001 moveb #1,%d1 the_thread->Wait.return_argument = the_info; 45ae6: 214a 0028 movel %a2,%a0@(40) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 45aea: 2149 0044 movel %a1,%a0@(68) 45aee: 23c1 0005 f2f2 movel %d1,5f2f2 <_POSIX_signals_Wait_queue+0x30> the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 45af4: 46c3 movew %d3,%sr _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 45af6: 4879 0004 866c pea 4866c <_Thread_queue_Timeout> 45afc: 2f00 movel %d0,%sp@- 45afe: 4879 0005 f2c2 pea 5f2c2 <_POSIX_signals_Wait_queue> 45b04: 4eb9 0004 8380 jsr 48380 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 45b0a: 4eb9 0004 7ee6 jsr 47ee6 <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); 45b10: 42a7 clrl %sp@- 45b12: 42a7 clrl %sp@- 45b14: 2f0a movel %a2,%sp@- 45b16: 2f12 movel %a2@,%sp@- 45b18: 2f0b movel %a3,%sp@- 45b1a: 4e95 jsr %a5@ errno = _Thread_Executing->Wait.return_code; 45b1c: 4fef 0020 lea %sp@(32),%sp 45b20: 4eb9 0004 da74 jsr 4da74 <__errno> 45b26: 2079 0005 ed42 moveal 5ed42 <_Thread_Executing>,%a0 45b2c: 2240 moveal %d0,%a1 45b2e: 22a8 0034 movel %a0@(52),%a1@ return the_info->si_signo; 45b32: 2412 movel %a2@,%d2 } 45b34: 2002 movel %d2,%d0 45b36: 4cee 3c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a5 45b3c: 4e5e unlk %fp <== NOT EXECUTED 000475a0 : int sigwait( const sigset_t *set, int *sig ) { 475a0: 4e56 0000 linkw %fp,#0 475a4: 2f0a movel %a2,%sp@- 475a6: 246e 000c moveal %fp@(12),%a2 int status; status = sigtimedwait( set, NULL, NULL ); 475aa: 42a7 clrl %sp@- 475ac: 42a7 clrl %sp@- 475ae: 2f2e 0008 movel %fp@(8),%sp@- 475b2: 4eb9 0004 7414 jsr 47414 if ( status != -1 ) { 475b8: 4fef 000c lea %sp@(12),%sp 475bc: 72ff moveq #-1,%d1 475be: b280 cmpl %d0,%d1 475c0: 670a beqs 475cc if ( sig ) 475c2: 4a8a tstl %a2 475c4: 6702 beqs 475c8 <== NEVER TAKEN *sig = status; 475c6: 2480 movel %d0,%a2@ 475c8: 4280 clrl %d0 475ca: 600a bras 475d6 return 0; } return errno; 475cc: 4eb9 0004 f2a4 jsr 4f2a4 <__errno> 475d2: 2040 moveal %d0,%a0 475d4: 2010 movel %a0@,%d0 } 475d6: 246e fffc moveal %fp@(-4),%a2 475da: 4e5e unlk %fp ... 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 00044614 : int _STAT_NAME( const char *path, struct stat *buf ) { 44614: 4e56 ffe0 linkw %fp,#-32 44618: 48d7 001c moveml %d2-%d4,%sp@ 4461c: 282e 0008 movel %fp@(8),%d4 44620: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 44624: 6612 bnes 44638 rtems_set_errno_and_return_minus_one( EFAULT ); 44626: 4eb9 0004 ee58 jsr 4ee58 <__errno> 4462c: 760e moveq #14,%d3 4462e: 74ff moveq #-1,%d2 44630: 2040 moveal %d0,%a0 44632: 2083 movel %d3,%a0@ 44634: 6000 009a braw 446d0 status = rtems_filesystem_evaluate_path( path, strlen( path ), 44638: 2f04 movel %d4,%sp@- 4463a: 260e movel %fp,%d3 4463c: 0683 ffff ffec addil #-20,%d3 44642: 4eb9 0005 0f3c jsr 50f3c 44648: 7201 moveq #1,%d1 4464a: 2e81 movel %d1,%sp@ 4464c: 2f03 movel %d3,%sp@- 4464e: 42a7 clrl %sp@- 44650: 2f00 movel %d0,%sp@- 44652: 2f04 movel %d4,%sp@- 44654: 4eb9 0004 30c2 jsr 430c2 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 4465a: 4fef 0014 lea %sp@(20),%sp 4465e: 4a80 tstl %d0 44660: 6704 beqs 44666 44662: 74ff moveq #-1,%d2 44664: 606a bras 446d0 return -1; if ( !loc.handlers->fstat_h ){ 44666: 206e fff4 moveal %fp@(-12),%a0 4466a: 4aa8 0018 tstl %a0@(24) 4466e: 6628 bnes 44698 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 44670: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44674: 4a88 tstl %a0 <== NOT EXECUTED 44676: 670e beqs 44686 <== NOT EXECUTED 44678: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4467c: 4a88 tstl %a0 <== NOT EXECUTED 4467e: 6706 beqs 44686 <== NOT EXECUTED 44680: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44682: 4e90 jsr %a0@ <== NOT EXECUTED 44684: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44686: 4eb9 0004 ee58 jsr 4ee58 <__errno> <== NOT EXECUTED 4468c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4468e: 2040 moveal %d0,%a0 <== NOT EXECUTED 44690: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 44696: 6038 bras 446d0 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 44698: 4878 0046 pea 46 4469c: 42a7 clrl %sp@- 4469e: 2f02 movel %d2,%sp@- 446a0: 4eb9 0005 00f8 jsr 500f8 status = (*loc.handlers->fstat_h)( &loc, buf ); 446a6: 206e fff4 moveal %fp@(-12),%a0 446aa: 2f02 movel %d2,%sp@- 446ac: 2f03 movel %d3,%sp@- 446ae: 2068 0018 moveal %a0@(24),%a0 446b2: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 446b4: 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 ); 446b8: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 446ba: 4fef 0014 lea %sp@(20),%sp 446be: 4a88 tstl %a0 446c0: 670e beqs 446d0 <== NEVER TAKEN 446c2: 2068 001c moveal %a0@(28),%a0 446c6: 4a88 tstl %a0 446c8: 6706 beqs 446d0 <== NEVER TAKEN 446ca: 2f03 movel %d3,%sp@- 446cc: 4e90 jsr %a0@ 446ce: 588f addql #4,%sp return status; } 446d0: 2002 movel %d2,%d0 446d2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 446d8: 4e5e unlk %fp <== NOT EXECUTED 0004476c : int symlink( const char *actualpath, const char *sympath ) { 4476c: 4e56 ffdc linkw %fp,#-36 44770: 48d7 040c moveml %d2-%d3/%a2,%sp@ 44774: 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 ); 44778: 742f moveq #47,%d2 4477a: 1012 moveb %a2@,%d0 4477c: 1200 moveb %d0,%d1 4477e: 49c1 extbl %d1 44780: b481 cmpl %d1,%d2 44782: 670c beqs 44790 44784: 143c 005c moveb #92,%d2 44788: b481 cmpl %d1,%d2 4478a: 6704 beqs 44790 <== NEVER TAKEN 4478c: 4a00 tstb %d0 4478e: 6622 bnes 447b2 <== ALWAYS TAKEN 44790: 4878 0014 pea 14 44794: 2079 0005 f6d8 moveal 5f6d8 ,%a0 4479a: 41e8 0018 lea %a0@(24),%a0 4479e: 2f08 movel %a0,%sp@- 447a0: 486e ffe8 pea %fp@(-24) 447a4: 4eb9 0004 f858 jsr 4f858 447aa: 4fef 000c lea %sp@(12),%sp 447ae: 7001 moveq #1,%d0 447b0: 601e bras 447d0 447b2: 4878 0014 pea 14 447b6: 2039 0005 f6d8 movel 5f6d8 ,%d0 447bc: 5880 addql #4,%d0 447be: 2f00 movel %d0,%sp@- 447c0: 486e ffe8 pea %fp@(-24) 447c4: 4eb9 0004 f858 jsr 4f858 447ca: 4fef 000c lea %sp@(12),%sp 447ce: 4280 clrl %d0 if ( !loc.ops->evalformake_h ) { 447d0: 206e fff4 moveal %fp@(-12),%a0 447d4: 2068 0004 moveal %a0@(4),%a0 447d8: 4a88 tstl %a0 447da: 673a beqs 44816 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 447dc: 486e fffc pea %fp@(-4) 447e0: 260e movel %fp,%d3 447e2: 0683 ffff ffe8 addil #-24,%d3 447e8: 2f03 movel %d3,%sp@- 447ea: 4872 0800 pea %a2@(00000000,%d0:l) 447ee: 4e90 jsr %a0@ if ( result != 0 ) 447f0: 4fef 000c lea %sp@(12),%sp 447f4: 4a80 tstl %d0 447f6: 6704 beqs 447fc 447f8: 74ff moveq #-1,%d2 447fa: 6054 bras 44850 return -1; if ( !loc.ops->symlink_h ) { 447fc: 226e fff4 moveal %fp@(-12),%a1 44800: 2069 0038 moveal %a1@(56),%a0 44804: 4a88 tstl %a0 44806: 6620 bnes 44828 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 44808: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4480c: 4a88 tstl %a0 <== NOT EXECUTED 4480e: 6706 beqs 44816 <== NOT EXECUTED 44810: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44812: 4e90 jsr %a0@ <== NOT EXECUTED 44814: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 44816: 4eb9 0004 f038 jsr 4f038 <__errno> <== NOT EXECUTED 4481c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4481e: 2040 moveal %d0,%a0 <== NOT EXECUTED 44820: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 44826: 6028 bras 44850 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 44828: 2f2e fffc movel %fp@(-4),%sp@- 4482c: 2f2e 0008 movel %fp@(8),%sp@- 44830: 2f03 movel %d3,%sp@- 44832: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 44834: 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); 44838: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 4483a: 4fef 000c lea %sp@(12),%sp 4483e: 4a88 tstl %a0 44840: 670e beqs 44850 <== NEVER TAKEN 44842: 2068 001c moveal %a0@(28),%a0 44846: 4a88 tstl %a0 44848: 6706 beqs 44850 <== NEVER TAKEN 4484a: 2f03 movel %d3,%sp@- 4484c: 4e90 jsr %a0@ 4484e: 588f addql #4,%sp return result; } 44850: 2002 movel %d2,%d0 44852: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 44858: 4e5e unlk %fp <== NOT EXECUTED 000446f8 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 446f8: 4e56 0000 linkw %fp,#0 446fc: 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; 44700: 2028 0106 movel %a0@(262),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 44704: 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 ) { 44706: 4a80 tstl %d0 44708: 6728 beqs 44732 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 4470a: 2279 0006 0792 moveal 60792 <_Thread_Executing>,%a1 44710: 2429 0106 movel %a1@(262),%d2 _Thread_Executing->libc_reent = this_reent; 44714: 2340 0106 movel %d0,%a1@(262) _fwalk (t->libc_reent, sync_wrapper); 44718: 487a 0046 pea %pc@(44760 ) 4471c: 2f28 0106 movel %a0@(262),%sp@- 44720: 4eb9 0004 fdd6 jsr 4fdd6 <_fwalk> _Thread_Executing->libc_reent = current_reent; 44726: 2079 0006 0792 moveal 60792 <_Thread_Executing>,%a0 4472c: 508f addql #8,%sp 4472e: 2142 0106 movel %d2,%a0@(262) } } 44732: 242e fffc movel %fp@(-4),%d2 44736: 4e5e unlk %fp <== NOT EXECUTED 00043e10 : int tcsetattr( int fd, int opt, struct termios *tp ) { 43e10: 4e56 0000 linkw %fp,#0 43e14: 202e 000c movel %fp@(12),%d0 43e18: 2f03 movel %d3,%sp@- 43e1a: 262e 0010 movel %fp@(16),%d3 43e1e: 2f02 movel %d2,%sp@- 43e20: 242e 0008 movel %fp@(8),%d2 switch (opt) { 43e24: 4a80 tstl %d0 43e26: 672c beqs 43e54 <== ALWAYS TAKEN 43e28: 7201 moveq #1,%d1 <== NOT EXECUTED 43e2a: b280 cmpl %d0,%d1 <== NOT EXECUTED 43e2c: 6710 beqs 43e3e <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 43e2e: 4eb9 0004 dc2c jsr 4dc2c <__errno> <== NOT EXECUTED 43e34: 2040 moveal %d0,%a0 <== NOT EXECUTED 43e36: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 43e3c: 6034 bras 43e72 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 43e3e: 42a7 clrl %sp@- <== NOT EXECUTED 43e40: 4878 0003 pea 3 <== NOT EXECUTED 43e44: 2f02 movel %d2,%sp@- <== NOT EXECUTED 43e46: 4eb9 0004 a5dc jsr 4a5dc <== NOT EXECUTED 43e4c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43e50: 4a80 tstl %d0 <== NOT EXECUTED 43e52: 6d1e blts 43e72 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 43e54: 2d43 0010 movel %d3,%fp@(16) 43e58: 7002 moveq #2,%d0 43e5a: 2d42 0008 movel %d2,%fp@(8) } } 43e5e: 242e fff8 movel %fp@(-8),%d2 43e62: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 43e66: 2d40 000c movel %d0,%fp@(12) } } 43e6a: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 43e6c: 4ef9 0004 a5dc jmp 4a5dc } } 43e72: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 43e76: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e78: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 43e7c: 4e5e unlk %fp <== NOT EXECUTED 00044bd0 : timer_t *timerid ) { POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 44bd0: 7001 moveq #1,%d0 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 44bd2: 4e56 0000 linkw %fp,#0 44bd6: 2f0b movel %a3,%sp@- 44bd8: 266e 0010 moveal %fp@(16),%a3 44bdc: 2f0a movel %a2,%sp@- 44bde: 246e 000c moveal %fp@(12),%a2 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 44be2: b0ae 0008 cmpl %fp@(8),%d0 44be6: 6620 bnes 44c08 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 44be8: 4a8b tstl %a3 44bea: 671c beqs 44c08 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 44bec: 4a8a tstl %a2 44bee: 672a beqs 44c1a <== NEVER TAKEN /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 44bf0: 2012 movel %a2@,%d0 44bf2: 7201 moveq #1,%d1 44bf4: 5380 subql #1,%d0 44bf6: b280 cmpl %d0,%d1 44bf8: 650e bcss 44c08 <== NEVER TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 44bfa: 202a 0004 movel %a2@(4),%d0 44bfe: 6708 beqs 44c08 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 44c00: 5380 subql #1,%d0 44c02: 721f moveq #31,%d1 44c04: b280 cmpl %d0,%d1 44c06: 6412 bccs 44c1a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 44c08: 4eb9 0004 d1a0 jsr 4d1a0 <__errno> 44c0e: 72ff moveq #-1,%d1 44c10: 2040 moveal %d0,%a0 44c12: 7016 moveq #22,%d0 44c14: 2080 movel %d0,%a0@ 44c16: 6000 00a4 braw 44cbc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44c1a: 2039 0005 d878 movel 5d878 <_Thread_Dispatch_disable_level>,%d0 44c20: 5280 addql #1,%d0 44c22: 23c0 0005 d878 movel %d0,5d878 <_Thread_Dispatch_disable_level> * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 44c28: 4879 0005 db0c pea 5db0c <_POSIX_Timer_Information> 44c2e: 4eb9 0004 67f4 jsr 467f4 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 44c34: 588f addql #4,%sp 44c36: 2040 moveal %d0,%a0 44c38: 4a80 tstl %d0 44c3a: 6616 bnes 44c52 _Thread_Enable_dispatch(); 44c3c: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 44c42: 4eb9 0004 d1a0 jsr 4d1a0 <__errno> 44c48: 72ff moveq #-1,%d1 44c4a: 2040 moveal %d0,%a0 44c4c: 700b moveq #11,%d0 44c4e: 2080 movel %d0,%a0@ 44c50: 606a bras 44cbc } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 44c52: 7002 moveq #2,%d0 44c54: 1140 003c moveb %d0,%a0@(60) ptimer->thread_id = _Thread_Executing->Object.id; 44c58: 2279 0005 d932 moveal 5d932 <_Thread_Executing>,%a1 44c5e: 2169 0008 0038 movel %a1@(8),%a0@(56) if ( evp != NULL ) { 44c64: 4a8a tstl %a2 44c66: 6710 beqs 44c78 ptimer->inf.sigev_notify = evp->sigev_notify; 44c68: 2152 003e movel %a2@,%a0@(62) ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 44c6c: 216a 0008 0046 movel %a2@(8),%a0@(70) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; 44c72: 216a 0004 0042 movel %a2@(4),%a0@(66) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 44c78: 2028 0008 movel %a0@(8),%d0 44c7c: 4281 clrl %d1 44c7e: 2279 0005 db24 moveal 5db24 <_POSIX_Timer_Information+0x18>,%a1 44c84: 3200 movew %d0,%d1 ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0; 44c86: 42a8 0066 clrl %a0@(102) 44c8a: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) ptimer->timer_data.it_value.tv_sec = 0; 44c8e: 42a8 005a clrl %a0@(90) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 44c92: 42a8 000c clrl %a0@(12) ptimer->timer_data.it_value.tv_nsec = 0; 44c96: 42a8 005e clrl %a0@(94) ptimer->timer_data.it_interval.tv_sec = 0; 44c9a: 42a8 0052 clrl %a0@(82) ptimer->timer_data.it_interval.tv_nsec = 0; 44c9e: 42a8 0056 clrl %a0@(86) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 44ca2: 42a8 0030 clrl %a0@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44ca6: 42a8 0018 clrl %a0@(24) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 44caa: 2680 movel %d0,%a3@ the_watchdog->routine = routine; 44cac: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 44cb0: 42a8 0034 clrl %a0@(52) _Thread_Enable_dispatch(); 44cb4: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> 44cba: 4281 clrl %d1 return 0; } 44cbc: 246e fff8 moveal %fp@(-8),%a2 44cc0: 2001 movel %d1,%d0 44cc2: 266e fffc moveal %fp@(-4),%a3 44cc6: 4e5e unlk %fp ... 00044d60 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 44d60: 4e56 ffe8 linkw %fp,#-24 44d64: 48d7 041c moveml %d2-%d4/%a2,%sp@ 44d68: 262e 0008 movel %fp@(8),%d3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 44d6c: 4ab9 0005 ecfa tstl 5ecfa <_POSIX_signals_Ualarm_timer+0x1c> 44d72: 6622 bnes 44d96 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44d74: 42b9 0005 ece6 clrl 5ece6 <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 44d7a: 4282 clrl %d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44d7c: 203c 0004 4e4c movel #282188,%d0 the_watchdog->id = id; 44d82: 42b9 0005 ecfe clrl 5ecfe <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44d88: 23c0 0005 ecfa movel %d0,5ecfa <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 44d8e: 42b9 0005 ed02 clrl 5ed02 <_POSIX_signals_Ualarm_timer+0x24> 44d94: 6058 bras 44dee _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 44d96: 4879 0005 ecde pea 5ecde <_POSIX_signals_Ualarm_timer> 44d9c: 4eb9 0004 8338 jsr 48338 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 44da2: 588f addql #4,%sp 44da4: 7201 moveq #1,%d1 44da6: 5580 subql #2,%d0 44da8: b280 cmpl %d0,%d1 44daa: 6404 bccs 44db0 <== ALWAYS TAKEN 44dac: 4282 clrl %d2 <== NOT EXECUTED 44dae: 603e bras 44dee <== NOT EXECUTED * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 44db0: 2039 0005 ecf2 movel 5ecf2 <_POSIX_signals_Ualarm_timer+0x14>,%d0 44db6: d0b9 0005 ecea addl 5ecea <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 44dbc: 486e fff8 pea %fp@(-8) 44dc0: 90b9 0005 ecf6 subl 5ecf6 <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 44dc6: 283c 000f 4240 movel #1000000,%d4 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 44dcc: 2f00 movel %d0,%sp@- 44dce: 4eb9 0004 7e60 jsr 47e60 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 44dd4: 202e fff8 movel %fp@(-8),%d0 44dd8: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 44ddc: 283c 0000 03e8 movel #1000,%d4 44de2: 508f addql #8,%sp 44de4: 242e fffc movel %fp@(-4),%d2 44de8: 4c44 2802 remsl %d4,%d2,%d2 44dec: d480 addl %d0,%d2 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 44dee: 4a83 tstl %d3 44df0: 674e beqs 44e40 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44df2: 280e movel %fp,%d4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 44df4: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44dfa: 5184 subql #8,%d4 44dfc: 45f9 0004 7ee4 lea 47ee4 <_Timespec_To_ticks>,%a2 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 44e02: 4c41 3000 remul %d1,%d0,%d3 44e06: 4c41 3003 remul %d1,%d3,%d3 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 44e0a: 223c 0000 03e8 movel #1000,%d1 44e10: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 44e14: 2f04 movel %d4,%sp@- */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 44e16: 2d41 fffc movel %d1,%fp@(-4) * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 44e1a: 2d43 fff8 movel %d3,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 44e1e: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 44e20: 2f04 movel %d4,%sp@- 44e22: 4e92 jsr %a2@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44e24: 4879 0005 ecde pea 5ecde <_POSIX_signals_Ualarm_timer> 44e2a: 4879 0005 e590 pea 5e590 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 44e30: 23c0 0005 ecea movel %d0,5ecea <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44e36: 4eb9 0004 821c jsr 4821c <_Watchdog_Insert> 44e3c: 4fef 0010 lea %sp@(16),%sp } return remaining; } 44e40: 2002 movel %d2,%d0 44e42: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 44e48: 4e5e unlk %fp <== NOT EXECUTED 0004c3b8 : #include int unlink( const char *path ) { 4c3b8: 4e56 ffc0 linkw %fp,#-64 4c3bc: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4c3c0: 246e 0008 moveal %fp@(8),%a2 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4c3c4: 2f0a movel %a2,%sp@- 4c3c6: 4eb9 0004 2128 jsr 42128 if ( parentpathlen == 0 ) 4c3cc: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4c3ce: 2a00 movel %d0,%d5 if ( parentpathlen == 0 ) 4c3d0: 664a bnes 4c41c rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4c3d2: 742f moveq #47,%d2 4c3d4: 1012 moveb %a2@,%d0 4c3d6: 1200 moveb %d0,%d1 4c3d8: 49c1 extbl %d1 4c3da: b481 cmpl %d1,%d2 4c3dc: 670c beqs 4c3ea 4c3de: 143c 005c moveb #92,%d2 4c3e2: b481 cmpl %d1,%d2 4c3e4: 6704 beqs 4c3ea <== NEVER TAKEN 4c3e6: 4a00 tstb %d0 4c3e8: 6612 bnes 4c3fc <== ALWAYS TAKEN 4c3ea: 4878 0014 pea 14 4c3ee: 2079 0005 b5b4 moveal 5b5b4 ,%a0 4c3f4: 41e8 0018 lea %a0@(24),%a0 4c3f8: 2f08 movel %a0,%sp@- 4c3fa: 600e bras 4c40a 4c3fc: 4878 0014 pea 14 4c400: 2039 0005 b5b4 movel 5b5b4 ,%d0 4c406: 5880 addql #4,%d0 4c408: 2f00 movel %d0,%sp@- 4c40a: 486e ffec pea %fp@(-20) 4c40e: 4203 clrb %d3 4c410: 4eb9 0004 d2a8 jsr 4d2a8 4c416: 4fef 000c lea %sp@(12),%sp 4c41a: 6020 bras 4c43c else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4c41c: 42a7 clrl %sp@- 4c41e: 486e ffec pea %fp@(-20) 4c422: 4878 0002 pea 2 4c426: 2f00 movel %d0,%sp@- 4c428: 2f0a movel %a2,%sp@- 4c42a: 4eb9 0004 223e jsr 4223e RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4c430: 4fef 0014 lea %sp@(20),%sp 4c434: 4a80 tstl %d0 4c436: 6600 015c bnew 4c594 4c43a: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4c43c: 4878 0014 pea 14 4c440: 280e movel %fp,%d4 4c442: 0684 ffff ffec addil #-20,%d4 4c448: 240e movel %fp,%d2 4c44a: 0682 ffff ffd8 addil #-40,%d2 name = path + parentpathlen; 4c450: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4c452: 47f9 0004 de54 lea 4de54 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4c458: 2f04 movel %d4,%sp@- 4c45a: 2f02 movel %d2,%sp@- 4c45c: 4eb9 0004 d2a8 jsr 4d2a8 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4c462: 2f0a movel %a2,%sp@- 4c464: 4e93 jsr %a3@ 4c466: 2e80 movel %d0,%sp@ 4c468: 2f0a movel %a2,%sp@- 4c46a: 4eb9 0004 20f0 jsr 420f0 4c470: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4c472: 2f0a movel %a2,%sp@- 4c474: 4e93 jsr %a3@ 4c476: 4297 clrl %sp@ 4c478: 2f02 movel %d2,%sp@- 4c47a: 42a7 clrl %sp@- 4c47c: 2f00 movel %d0,%sp@- 4c47e: 2f0a movel %a2,%sp@- 4c480: 4eb9 0004 216e jsr 4216e 0, &loc, false ); if ( result != 0 ) { 4c486: 4fef 0028 lea %sp@(40),%sp 4c48a: 4a80 tstl %d0 4c48c: 6722 beqs 4c4b0 if ( free_parentloc ) 4c48e: 4a03 tstb %d3 4c490: 6700 0102 beqw 4c594 rtems_filesystem_freenode( &parentloc ); 4c494: 206e fff8 moveal %fp@(-8),%a0 4c498: 4a88 tstl %a0 4c49a: 6700 00f8 beqw 4c594 4c49e: 2068 001c moveal %a0@(28),%a0 4c4a2: 4a88 tstl %a0 4c4a4: 6700 00ee beqw 4c594 4c4a8: 2f04 movel %d4,%sp@- 4c4aa: 78ff moveq #-1,%d4 4c4ac: 6000 00e0 braw 4c58e return -1; } if ( !loc.ops->node_type_h ) { 4c4b0: 226e ffe4 moveal %fp@(-28),%a1 4c4b4: 2069 0010 moveal %a1@(16),%a0 4c4b8: 4a88 tstl %a0 4c4ba: 6606 bnes 4c4c2 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4c4bc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4c4c0: 605c bras 4c51e <== 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 ) { 4c4c2: 2f02 movel %d2,%sp@- 4c4c4: 4e90 jsr %a0@ 4c4c6: 206e ffe4 moveal %fp@(-28),%a0 4c4ca: 588f addql #4,%sp 4c4cc: 7201 moveq #1,%d1 4c4ce: b280 cmpl %d0,%d1 4c4d0: 6640 bnes 4c512 rtems_filesystem_freenode( &loc ); 4c4d2: 4a88 tstl %a0 4c4d4: 670e beqs 4c4e4 <== NEVER TAKEN 4c4d6: 2068 001c moveal %a0@(28),%a0 4c4da: 4a88 tstl %a0 4c4dc: 6706 beqs 4c4e4 <== NEVER TAKEN 4c4de: 2f02 movel %d2,%sp@- 4c4e0: 4e90 jsr %a0@ 4c4e2: 588f addql #4,%sp if ( free_parentloc ) 4c4e4: 4a03 tstb %d3 4c4e6: 6718 beqs 4c500 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4c4e8: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4c4ec: 4a88 tstl %a0 <== NOT EXECUTED 4c4ee: 6710 beqs 4c500 <== NOT EXECUTED 4c4f0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c4f4: 4a88 tstl %a0 <== NOT EXECUTED 4c4f6: 6708 beqs 4c500 <== NOT EXECUTED 4c4f8: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4c4fc: 4e90 jsr %a0@ <== NOT EXECUTED 4c4fe: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4c500: 4eb9 0004 ca88 jsr 4ca88 <__errno> 4c506: 78ff moveq #-1,%d4 4c508: 2040 moveal %d0,%a0 4c50a: 7015 moveq #21,%d0 4c50c: 2080 movel %d0,%a0@ 4c50e: 6000 0086 braw 4c596 } if ( !loc.ops->unlink_h ) { 4c512: 2268 000c moveal %a0@(12),%a1 4c516: 4a89 tstl %a1 4c518: 663c bnes 4c556 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 4c51a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c51e: 4a88 tstl %a0 <== NOT EXECUTED 4c520: 6706 beqs 4c528 <== NOT EXECUTED 4c522: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c524: 4e90 jsr %a0@ <== NOT EXECUTED 4c526: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4c528: 4a03 tstb %d3 <== NOT EXECUTED 4c52a: 6718 beqs 4c544 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4c52c: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4c530: 4a88 tstl %a0 <== NOT EXECUTED 4c532: 6710 beqs 4c544 <== NOT EXECUTED 4c534: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c538: 4a88 tstl %a0 <== NOT EXECUTED 4c53a: 6708 beqs 4c544 <== NOT EXECUTED 4c53c: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4c540: 4e90 jsr %a0@ <== NOT EXECUTED 4c542: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4c544: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 4c54a: 78ff moveq #-1,%d4 <== NOT EXECUTED 4c54c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c54e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4c554: 6040 bras 4c596 <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4c556: 2f02 movel %d2,%sp@- 4c558: 2f04 movel %d4,%sp@- 4c55a: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 4c55c: 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 ); 4c560: 2800 movel %d0,%d4 rtems_filesystem_freenode( &loc ); 4c562: 508f addql #8,%sp 4c564: 4a88 tstl %a0 4c566: 670e beqs 4c576 <== NEVER TAKEN 4c568: 2068 001c moveal %a0@(28),%a0 4c56c: 4a88 tstl %a0 4c56e: 6706 beqs 4c576 <== NEVER TAKEN 4c570: 2f02 movel %d2,%sp@- 4c572: 4e90 jsr %a0@ 4c574: 588f addql #4,%sp if ( free_parentloc ) 4c576: 4a03 tstb %d3 4c578: 671c beqs 4c596 rtems_filesystem_freenode( &parentloc ); 4c57a: 206e fff8 moveal %fp@(-8),%a0 4c57e: 4a88 tstl %a0 4c580: 6714 beqs 4c596 <== NEVER TAKEN 4c582: 2068 001c moveal %a0@(28),%a0 4c586: 4a88 tstl %a0 4c588: 670c beqs 4c596 <== NEVER TAKEN 4c58a: 486e ffec pea %fp@(-20) 4c58e: 4e90 jsr %a0@ 4c590: 588f addql #4,%sp 4c592: 6002 bras 4c596 4c594: 78ff moveq #-1,%d4 <== NOT EXECUTED return result; } 4c596: 2004 movel %d4,%d0 4c598: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 4c59e: 4e5e unlk %fp <== NOT EXECUTED 00047f9e : */ int unmount( const char *path ) { 47f9e: 4e56 ffec linkw %fp,#-20 47fa2: 2f0a movel %a2,%sp@- 47fa4: 246e 0008 moveal %fp@(8),%a2 47fa8: 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 ) ) 47faa: 240e movel %fp,%d2 47fac: 0682 ffff ffec addil #-20,%d2 47fb2: 2f0a movel %a2,%sp@- 47fb4: 4eb9 0005 3dc4 jsr 53dc4 47fba: 7201 moveq #1,%d1 47fbc: 2e81 movel %d1,%sp@ 47fbe: 2f02 movel %d2,%sp@- 47fc0: 42a7 clrl %sp@- 47fc2: 2f00 movel %d0,%sp@- 47fc4: 2f0a movel %a2,%sp@- 47fc6: 4eb9 0004 4bd6 jsr 44bd6 47fcc: 4fef 0014 lea %sp@(20),%sp 47fd0: 4a80 tstl %d0 47fd2: 6600 011c bnew 480f0 return -1; mt_entry = loc.mt_entry; 47fd6: 246e fffc moveal %fp@(-4),%a2 47fda: 206e fff8 moveal %fp@(-8),%a0 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 47fde: 202e ffec movel %fp@(-20),%d0 47fe2: b0aa 001c cmpl %a2@(28),%d0 47fe6: 6724 beqs 4800c /* * 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 ); 47fe8: 4a88 tstl %a0 47fea: 670e beqs 47ffa <== NEVER TAKEN 47fec: 2068 001c moveal %a0@(28),%a0 47ff0: 4a88 tstl %a0 47ff2: 6706 beqs 47ffa <== NEVER TAKEN 47ff4: 2f02 movel %d2,%sp@- 47ff6: 4e90 jsr %a0@ 47ff8: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 47ffa: 4eb9 0005 0e18 jsr 50e18 <__errno> 48000: 740d moveq #13,%d2 48002: 72ff moveq #-1,%d1 48004: 2040 moveal %d0,%a0 48006: 2082 movel %d2,%a0@ 48008: 6000 00e8 braw 480f2 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4800c: 4a88 tstl %a0 4800e: 670e beqs 4801e <== NEVER TAKEN 48010: 2068 001c moveal %a0@(28),%a0 48014: 4a88 tstl %a0 48016: 6706 beqs 4801e <== NEVER TAKEN 48018: 2f02 movel %d2,%sp@- 4801a: 4e90 jsr %a0@ 4801c: 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; 4801e: 206a 0014 moveal %a2@(20),%a0 48022: 4aa8 0028 tstl %a0@(40) 48026: 670a beqs 48032 <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; 48028: 206a 0028 moveal %a2@(40),%a0 4802c: 4aa8 002c tstl %a0@(44) 48030: 6614 bnes 48046 <== ALWAYS TAKEN if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 48032: 4eb9 0005 0e18 jsr 50e18 <__errno> <== NOT EXECUTED 48038: 72ff moveq #-1,%d1 <== NOT EXECUTED 4803a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4803c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 48042: 6000 00ae braw 480f2 <== 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 ) 48046: 2079 0006 2694 moveal 62694 ,%a0 4804c: b5e8 0014 cmpal %a0@(20),%a2 48050: 6720 beqs 48072 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 48052: 2079 0006 45b8 moveal 645b8 ,%a0 48058: 600c bras 48066 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; 4805a: 202a 002c movel %a2@(44),%d0 4805e: b0a8 0018 cmpl %a0@(24),%d0 48062: 670e beqs 48072 * 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 ) { 48064: 2050 moveal %a0@,%a0 48066: b1fc 0006 45bc cmpal #411068,%a0 4806c: 66ec bnes 4805a 4806e: 6000 0090 braw 48100 * 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 ); 48072: 4eb9 0005 0e18 jsr 50e18 <__errno> 48078: 72ff moveq #-1,%d1 4807a: 2040 moveal %d0,%a0 4807c: 7010 moveq #16,%d0 4807e: 2080 movel %d0,%a0@ 48080: 6070 bras 480f2 * 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 ) 48082: 206a 0014 moveal %a2@(20),%a0 48086: 2f0a movel %a2,%sp@- 48088: 2068 0028 moveal %a0@(40),%a0 4808c: 4e90 jsr %a0@ 4808e: 588f addql #4,%sp 48090: 4a80 tstl %d0 48092: 665c bnes 480f0 <== NEVER TAKEN * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 48094: 206a 0028 moveal %a2@(40),%a0 48098: 2f0a movel %a2,%sp@- 4809a: 2068 002c moveal %a0@(44),%a0 4809e: 4e90 jsr %a0@ 480a0: 588f addql #4,%sp 480a2: 4a80 tstl %d0 480a4: 671a beqs 480c0 <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 480a6: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 480aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 480ac: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 480b0: 4e90 jsr %a0@ <== NOT EXECUTED 480b2: 588f addql #4,%sp <== NOT EXECUTED 480b4: 4a80 tstl %d0 <== NOT EXECUTED 480b6: 6738 beqs 480f0 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 480b8: 42a7 clrl %sp@- <== NOT EXECUTED 480ba: 4eb9 0004 9220 jsr 49220 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 480c0: 2f0a movel %a2,%sp@- 480c2: 4eb9 0004 956c jsr 4956c <_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 ); 480c8: 206a 0014 moveal %a2@(20),%a0 480cc: 588f addql #4,%sp 480ce: 4a88 tstl %a0 480d0: 6710 beqs 480e2 <== NEVER TAKEN 480d2: 2068 001c moveal %a0@(28),%a0 480d6: 4a88 tstl %a0 480d8: 6708 beqs 480e2 <== NEVER TAKEN 480da: 486a 0008 pea %a2@(8) 480de: 4e90 jsr %a0@ 480e0: 588f addql #4,%sp free( mt_entry ); 480e2: 2f0a movel %a2,%sp@- 480e4: 4eb9 0004 4ca0 jsr 44ca0 return 0; 480ea: 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 ); 480ec: 4281 clrl %d1 return 0; 480ee: 6002 bras 480f2 480f0: 72ff moveq #-1,%d1 } 480f2: 242e ffe4 movel %fp@(-28),%d2 480f6: 2001 movel %d1,%d0 480f8: 246e ffe8 moveal %fp@(-24),%a2 480fc: 4e5e unlk %fp 480fe: 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 ) 48100: 2f0a movel %a2,%sp@- 48102: 4eb9 0004 4ef4 jsr 44ef4 48108: 588f addql #4,%sp 4810a: 7201 moveq #1,%d1 4810c: b280 cmpl %d0,%d1 4810e: 6600 ff72 bnew 48082 48112: 6000 ff5e braw 48072 ... 00046110 : int utime( const char *path, const struct utimbuf *times ) { 46110: 4e56 ffe0 linkw %fp,#-32 46114: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46118: 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 ) ) 4611c: 240e movel %fp,%d2 4611e: 0682 ffff ffec addil #-20,%d2 46124: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 46126: 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 ) ) 4612a: 4eb9 0005 0f3c jsr 50f3c 46130: 7201 moveq #1,%d1 46132: 2e81 movel %d1,%sp@ 46134: 2f02 movel %d2,%sp@- 46136: 42a7 clrl %sp@- 46138: 2f00 movel %d0,%sp@- 4613a: 2f03 movel %d3,%sp@- 4613c: 4eb9 0004 30c2 jsr 430c2 46142: 4fef 0014 lea %sp@(20),%sp 46146: 4a80 tstl %d0 46148: 6704 beqs 4614e 4614a: 76ff moveq #-1,%d3 4614c: 6052 bras 461a0 return -1; if ( !temp_loc.ops->utime_h ){ 4614e: 226e fff8 moveal %fp@(-8),%a1 46152: 2069 0030 moveal %a1@(48),%a0 46156: 4a88 tstl %a0 46158: 6620 bnes 4617a <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 4615a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4615e: 4a88 tstl %a0 <== NOT EXECUTED 46160: 6706 beqs 46168 <== NOT EXECUTED 46162: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46164: 4e90 jsr %a0@ <== NOT EXECUTED 46166: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 46168: 4eb9 0004 ee58 jsr 4ee58 <__errno> <== NOT EXECUTED 4616e: 76ff moveq #-1,%d3 <== NOT EXECUTED 46170: 2040 moveal %d0,%a0 <== NOT EXECUTED 46172: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 46178: 6026 bras 461a0 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 4617a: 2f2a 0004 movel %a2@(4),%sp@- 4617e: 2f12 movel %a2@,%sp@- 46180: 2f02 movel %d2,%sp@- 46182: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 46184: 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 ); 46188: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 4618a: 4fef 000c lea %sp@(12),%sp 4618e: 4a88 tstl %a0 46190: 670e beqs 461a0 <== NEVER TAKEN 46192: 2068 001c moveal %a0@(28),%a0 46196: 4a88 tstl %a0 46198: 6706 beqs 461a0 <== NEVER TAKEN 4619a: 2f02 movel %d2,%sp@- 4619c: 4e90 jsr %a0@ 4619e: 588f addql #4,%sp return result; } 461a0: 2003 movel %d3,%d0 461a2: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 461a8: 4e5e unlk %fp <== NOT EXECUTED 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 a3ef movel #369647,%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 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 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 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 minus = true; fmt++; 44702: 528a addql #1,%a2 44704: 7c01 moveq #1,%d6 44706: 4282 clrl %d2 44708: 6008 bras 44712 } 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 /* 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 4474c: 49c0 extbl %d0 lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 4474e: 588b addql #4,%a3 BSP_output_char(chr); 44750: 2f00 movel %d0,%sp@- 44752: 6000 00da braw 4482e 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 a3ee lea 5a3ee ,%a4 4476a: 4283 clrl %d3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 4476c: 6002 bras 44770 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 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 <== NEVER 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 BSP_output_char(*str); 4479e: 49c0 extbl %d0 447a0: 2079 0005 b59c moveal 5b59c ,%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 for ( i=len ; i for ( i=0 ; i,%a0 447c6: 4e90 jsr %a0@ for ( i=0 ; i 447ce: 6000 0116 braw 448e6 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 <== NEVER TAKEN 447d8: 163c 004f moveb #79,%d3 447dc: b680 cmpl %d0,%d3 447de: 675c beqs 4483c <== NEVER 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 <== NEVER TAKEN 447e8: 163c 0049 moveb #73,%d3 447ec: b680 cmpl %d0,%d3 447ee: 6750 beqs 44840 <== NEVER 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 <== NEVER 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 <== NEVER 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 <== NEVER 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 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 4482c: 2f01 movel %d1,%sp@- 4482e: 2079 0005 b59c moveal 5b59c ,%a0 44834: 4e90 jsr %a0@ continue; 44836: 588f addql #4,%sp 44838: 6000 00ac braw 448e6 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 44846: 760a moveq #10,%d3 44848: 6002 bras 4484c 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 <== ALWAYS TAKEN BSP_output_char('-'); 44862: 4878 002d pea 2d <== NOT EXECUTED 44866: 2079 0005 b59c moveal 5b59c ,%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 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 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 448ac: 2f06 movel %d6,%sp@- 448ae: 2079 0005 b59c moveal 5b59c ,%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 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 b59c moveal 5b59c ,%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 <== NOT EXECUTED 00059698 : ssize_t write( int fd, const void *buffer, size_t count ) { 59698: 4e56 fff4 linkw %fp,#-12 5969c: 202e 000c movel %fp@(12),%d0 596a0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 596a4: 242e 0008 movel %fp@(8),%d2 596a8: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 596ac: b4b9 0005 b4a4 cmpl 5b4a4 ,%d2 596b2: 6414 bccs 596c8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 596b4: 2479 0005 cba8 moveal 5cba8 ,%a2 596ba: ed8a lsll #6,%d2 596bc: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 596be: 242a 0014 movel %a2@(20),%d2 596c2: 0802 0008 btst #8,%d2 596c6: 6610 bnes 596d8 <== ALWAYS TAKEN 596c8: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 596ce: 7409 moveq #9,%d2 <== NOT EXECUTED 596d0: 72ff moveq #-1,%d1 <== NOT EXECUTED 596d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 596d4: 2082 movel %d2,%a0@ <== NOT EXECUTED 596d6: 605e bras 59736 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 596d8: 4a80 tstl %d0 596da: 6708 beqs 596e4 <== NEVER TAKEN rtems_libio_check_count( count ); 596dc: 4a81 tstl %d1 596de: 6756 beqs 59736 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 596e0: 44c2 movew %d2,%ccr 596e2: 6710 beqs 596f4 <== ALWAYS TAKEN 596e4: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 596ea: 72ff moveq #-1,%d1 <== NOT EXECUTED 596ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 596ee: 7016 moveq #22,%d0 <== NOT EXECUTED 596f0: 2080 movel %d0,%a0@ <== NOT EXECUTED 596f2: 6042 bras 59736 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 596f4: 206a 003c moveal %a2@(60),%a0 596f8: 2068 000c moveal %a0@(12),%a0 596fc: 4a88 tstl %a0 596fe: 6612 bnes 59712 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 59700: 4eb9 0004 ca88 jsr 4ca88 <__errno> <== NOT EXECUTED 59706: 72ff moveq #-1,%d1 <== NOT EXECUTED 59708: 2040 moveal %d0,%a0 <== NOT EXECUTED 5970a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 59710: 6024 bras 59736 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 59712: 2f01 movel %d1,%sp@- 59714: 2f00 movel %d0,%sp@- 59716: 2f0a movel %a2,%sp@- 59718: 4e90 jsr %a0@ if ( rc > 0 ) 5971a: 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 ); 5971e: 2200 movel %d0,%d1 if ( rc > 0 ) 59720: 6f14 bles 59736 <== NEVER TAKEN iop->offset += rc; 59722: 2600 movel %d0,%d3 59724: 5bc2 smi %d2 59726: 49c2 extbl %d2 59728: d7aa 0010 addl %d3,%a2@(16) 5972c: 202a 000c movel %a2@(12),%d0 59730: d182 addxl %d2,%d0 59732: 2540 000c movel %d0,%a2@(12) return rc; } 59736: 2001 movel %d1,%d0 59738: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5973e: 4e5e unlk %fp ... 00045f1c : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 45f1c: 4e56 ffe4 linkw %fp,#-28 45f20: 202e 0008 movel %fp@(8),%d0 45f24: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 45f28: 266e 000c moveal %fp@(12),%a3 45f2c: 262e 0010 movel %fp@(16),%d3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 45f30: b0b9 0005 ecd4 cmpl 5ecd4 ,%d0 45f36: 6414 bccs 45f4c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 45f38: 2479 0006 0bac moveal 60bac ,%a2 45f3e: ed88 lsll #6,%d0 45f40: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 45f42: 202a 0014 movel %a2@(20),%d0 45f46: 0800 0008 btst #8,%d0 45f4a: 6612 bnes 45f5e 45f4c: 4eb9 0004 eb44 jsr 4eb44 <__errno> 45f52: 74ff moveq #-1,%d2 45f54: 7209 moveq #9,%d1 45f56: 2040 moveal %d0,%a0 45f58: 2081 movel %d1,%a0@ 45f5a: 6000 00ce braw 4602a rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 45f5e: 44c0 movew %d0,%ccr 45f60: 665c bnes 45fbe <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 45f62: 4a8b tstl %a3 45f64: 6758 beqs 45fbe rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 45f66: 4a83 tstl %d3 45f68: 6f54 bles 45fbe rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 45f6a: 0c83 0000 0400 cmpil #1024,%d3 45f70: 6e4c bgts 45fbe <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 45f72: 206a 003c moveal %a2@(60),%a0 45f76: 4aa8 000c tstl %a0@(12) 45f7a: 6614 bnes 45f90 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 45f7c: 4eb9 0004 eb44 jsr 4eb44 <__errno> <== NOT EXECUTED 45f82: 74ff moveq #-1,%d2 <== NOT EXECUTED 45f84: 2040 moveal %d0,%a0 <== NOT EXECUTED 45f86: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 45f8c: 6000 009c braw 4602a <== NOT EXECUTED 45f90: 204b moveal %a3,%a0 45f92: 4281 clrl %d1 45f94: 4280 clrl %d0 45f96: 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++ ) { 45f98: 5281 addql #1,%d1 if ( !iov[v].iov_base ) 45f9a: 4a90 tstl %a0@ 45f9c: 6720 beqs 45fbe 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 ) 45f9e: 2268 0004 moveal %a0@(4),%a1 45fa2: 4a89 tstl %a1 45fa4: 57c2 seq %d2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 45fa6: 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++ ) { 45faa: 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 ) 45fac: c484 andl %d4,%d2 45fae: 1802 moveb %d2,%d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 45fb0: b089 cmpl %a1,%d0 45fb2: 6e0a bgts 45fbe * 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++ ) { 45fb4: 2009 movel %a1,%d0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 45fb6: b3fc 0000 7fff cmpal #32767,%a1 45fbc: 6f10 bles 45fce <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 45fbe: 4eb9 0004 eb44 jsr 4eb44 <__errno> 45fc4: 74ff moveq #-1,%d2 45fc6: 2040 moveal %d0,%a0 45fc8: 7016 moveq #22,%d0 45fca: 2080 movel %d0,%a0@ 45fcc: 605c bras 4602a * 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++ ) { 45fce: b681 cmpl %d1,%d3 45fd0: 6ec6 bgts 45f98 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 45fd2: 4a02 tstb %d2 45fd4: 6704 beqs 45fda 45fd6: 4282 clrl %d2 45fd8: 6050 bras 4602a 45fda: 588b addql #4,%a3 45fdc: 4284 clrl %d4 45fde: 4282 clrl %d2 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 45fe0: 2013 movel %a3@,%d0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 45fe2: 5284 addql #1,%d4 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 45fe4: 4a80 tstl %d0 45fe6: 673c beqs 46024 <== NEVER TAKEN continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 45fe8: 206a 003c moveal %a2@(60),%a0 45fec: 2f00 movel %d0,%sp@- 45fee: 2f2b fffc movel %a3@(-4),%sp@- 45ff2: 2f0a movel %a2,%sp@- 45ff4: 2068 000c moveal %a0@(12),%a0 45ff8: 4e90 jsr %a0@ if ( bytes < 0 ) 45ffa: 4fef 000c lea %sp@(12),%sp 45ffe: 4a80 tstl %d0 46000: 6c04 bges 46006 <== ALWAYS TAKEN 46002: 74ff moveq #-1,%d2 <== NOT EXECUTED 46004: 6024 bras 4602a <== NOT EXECUTED return -1; if ( bytes > 0 ) { 46006: 4a80 tstl %d0 46008: 6716 beqs 46020 <== NEVER TAKEN iop->offset += bytes; total += bytes; 4600a: d480 addl %d0,%d2 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 4600c: 2c00 movel %d0,%d6 4600e: 5bc5 smi %d5 46010: 49c5 extbl %d5 46012: ddaa 0010 addl %d6,%a2@(16) 46016: 222a 000c movel %a2@(12),%d1 4601a: d385 addxl %d5,%d1 4601c: 2541 000c movel %d1,%a2@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 46020: b093 cmpl %a3@,%d0 46022: 6606 bnes 4602a <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46024: 508b addql #8,%a3 46026: b684 cmpl %d4,%d3 46028: 6eb6 bgts 45fe0 <== NEVER TAKEN if (bytes != iov[ v ].iov_len) break; } return total; } 4602a: 2002 movel %d2,%d0 4602c: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46032: 4e5e unlk %fp ...