=============================================================================== 02009848 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 2009848: c4 02 00 00 ld [ %o0 ], %g2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200984c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 switch( node->type ) { 2009850: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 2009854: 84 00 bf ff add %g2, -1, %g2 2009858: 80 a0 a0 06 cmp %g2, 6 200985c: 18 80 00 15 bgu 20098b0 <== NEVER TAKEN 2009860: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2009864: 85 28 a0 02 sll %g2, 2, %g2 2009868: 07 00 80 26 sethi %hi(0x2009800), %g3 200986c: 86 10 e0 2c or %g3, 0x2c, %g3 ! 200982c 2009870: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 2009874: 81 c0 80 00 jmp %g2 2009878: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200987c: 10 80 00 0c b 20098ac 2009880: c2 00 60 0c ld [ %g1 + 0xc ], %g1 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 2009884: 03 00 80 69 sethi %hi(0x201a400), %g1 2009888: 10 80 00 09 b 20098ac 200988c: 82 10 60 60 or %g1, 0x60, %g1 ! 201a460 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 2009890: 03 00 80 69 sethi %hi(0x201a400), %g1 2009894: 10 80 00 06 b 20098ac 2009898: 82 10 60 98 or %g1, 0x98, %g1 ! 201a498 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200989c: 10 80 00 04 b 20098ac 20098a0: c2 00 60 08 ld [ %g1 + 8 ], %g1 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 20098a4: 03 00 80 68 sethi %hi(0x201a000), %g1 20098a8: 82 10 63 8c or %g1, 0x38c, %g1 ! 201a38c 20098ac: c2 22 20 08 st %g1, [ %o0 + 8 ] break; } return 0; } 20098b0: 81 c3 e0 08 retl 20098b4: 90 10 20 00 clr %o0 =============================================================================== 0200d4ec : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 200d4ec: 9d e3 bf 98 save %sp, -104, %sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 200d4f0: 92 10 20 68 mov 0x68, %o1 200d4f4: 7f ff f4 c7 call 200a810 200d4f8: 90 10 20 01 mov 1, %o0 IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 200d4fc: 92 10 00 19 mov %i1, %o1 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); if ( !node ) 200d500: 80 a2 20 00 cmp %o0, 0 200d504: 02 80 00 14 be 200d554 <== NEVER TAKEN 200d508: a0 10 00 08 mov %o0, %l0 return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 200d50c: 82 10 20 01 mov 1, %g1 node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 200d510: 94 10 20 20 mov 0x20, %o2 return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 200d514: c2 32 20 34 sth %g1, [ %o0 + 0x34 ] node->type = type; 200d518: f0 22 20 4c st %i0, [ %o0 + 0x4c ] strncpy( node->name, name, IMFS_NAME_MAX ); 200d51c: 40 00 0a 4a call 200fe44 200d520: 90 02 20 0c add %o0, 0xc, %o0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 200d524: 7f ff f5 6a call 200aacc 200d528: f4 24 20 30 st %i2, [ %l0 + 0x30 ] node->st_gid = getegid(); 200d52c: 7f ff f5 64 call 200aabc 200d530: d0 34 20 3c sth %o0, [ %l0 + 0x3c ] #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200d534: 92 10 20 00 clr %o1 * 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(); 200d538: d0 34 20 3e sth %o0, [ %l0 + 0x3e ] #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200d53c: 7f ff f5 68 call 200aadc 200d540: 90 07 bf f8 add %fp, -8, %o0 node->stat_atime = (time_t) tv.tv_sec; 200d544: c2 07 bf f8 ld [ %fp + -8 ], %g1 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 200d548: c2 24 20 48 st %g1, [ %l0 + 0x48 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 200d54c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] node->stat_mtime = (time_t) tv.tv_sec; 200d550: c2 24 20 44 st %g1, [ %l0 + 0x44 ] node->stat_ctime = (time_t) tv.tv_sec; return node; } 200d554: 81 c7 e0 08 ret 200d558: 91 e8 00 10 restore %g0, %l0, %o0 =============================================================================== 0200ebcc : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 200ebcc: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200ebd0: 40 00 04 bb call 200febc 200ebd4: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 200ebd8: 91 2a 20 10 sll %o0, 0x10, %o0 200ebdc: 91 32 20 10 srl %o0, 0x10, %o0 200ebe0: 80 a2 20 00 cmp %o0, 0 200ebe4: 22 80 00 0c be,a 200ec14 <== ALWAYS TAKEN 200ebe8: f2 34 20 3c sth %i1, [ %l0 + 0x3c ] 200ebec: c2 14 20 3c lduh [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 200ebf0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 200ebf4: 22 80 00 08 be,a 200ec14 <== NOT EXECUTED 200ebf8: f2 34 20 3c sth %i1, [ %l0 + 0x3c ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 200ebfc: 40 00 16 a4 call 201468c <__errno> <== NOT EXECUTED 200ec00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200ec04: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200ec08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200ec0c: 81 c7 e0 08 ret <== NOT EXECUTED 200ec10: 81 e8 00 00 restore <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; 200ec14: f4 34 20 3e sth %i2, [ %l0 + 0x3e ] IMFS_update_ctime( jnode ); 200ec18: 90 07 bf f8 add %fp, -8, %o0 200ec1c: 7f ff d4 52 call 2003d64 200ec20: 92 10 20 00 clr %o1 200ec24: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ec28: c2 24 20 48 st %g1, [ %l0 + 0x48 ] return 0; } 200ec2c: 81 c7 e0 08 ret 200ec30: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d59c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200d59c: 9d e3 bf a0 save %sp, -96, %sp 200d5a0: a0 10 00 18 mov %i0, %l0 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 200d5a4: 80 a6 20 00 cmp %i0, 0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200d5a8: 92 10 00 1a mov %i2, %o1 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 200d5ac: 02 80 00 3e be 200d6a4 <== NEVER TAKEN 200d5b0: b0 10 20 00 clr %i0 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 200d5b4: 03 00 80 6c sethi %hi(0x201b000), %g1 200d5b8: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 201b310 200d5bc: 90 10 00 19 mov %i1, %o0 200d5c0: d4 00 60 2c ld [ %g1 + 0x2c ], %o2 200d5c4: 7f ff ff ca call 200d4ec 200d5c8: 94 2e c0 0a andn %i3, %o2, %o2 if ( !node ) 200d5cc: b0 92 20 00 orcc %o0, 0, %i0 200d5d0: 02 80 00 35 be 200d6a4 <== NEVER TAKEN 200d5d4: b2 06 7f ff add %i1, -1, %i1 return NULL; /* * Set the type specific information */ switch (type) { 200d5d8: 80 a6 60 06 cmp %i1, 6 200d5dc: 38 80 00 20 bgu,a 200d65c <== NEVER TAKEN 200d5e0: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200d5e4: b3 2e 60 02 sll %i1, 2, %i1 200d5e8: 03 00 80 35 sethi %hi(0x200d400), %g1 200d5ec: 82 10 60 d0 or %g1, 0xd0, %g1 ! 200d4d0 200d5f0: c2 00 40 19 ld [ %g1 + %i1 ], %g1 200d5f4: 81 c0 40 00 jmp %g1 200d5f8: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200d5fc: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 200d600: c0 26 20 54 clr [ %i0 + 0x54 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200d604: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200d608: 82 06 20 50 add %i0, 0x50, %g1 200d60c: 10 80 00 1b b 200d678 200d610: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 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; 200d614: 10 80 00 05 b 200d628 200d618: c2 07 00 00 ld [ %i4 ], %g1 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 200d61c: c4 07 20 04 ld [ %i4 + 4 ], %g2 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 200d620: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 200d624: c4 26 20 54 st %g2, [ %i0 + 0x54 ] break; 200d628: 10 80 00 14 b 200d678 200d62c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 200d630: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED 200d634: c0 26 20 54 clr [ %i0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 200d638: c0 26 20 58 clr [ %i0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 200d63c: c0 26 20 50 clr [ %i0 + 0x50 ] 200d640: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 200d644: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 200d648: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; break; 200d64c: 10 80 00 0b b 200d678 200d650: c0 26 20 60 clr [ %i0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 200d654: 10 80 00 09 b 200d678 200d658: c0 26 20 50 clr [ %i0 + 0x50 ] default: assert(0); 200d65c: 15 00 80 6a sethi %hi(0x201a800), %o2 <== NOT EXECUTED 200d660: 17 00 80 6a sethi %hi(0x201a800), %o3 <== NOT EXECUTED 200d664: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED 200d668: 94 12 a0 88 or %o2, 0x88, %o2 <== NOT EXECUTED 200d66c: 96 12 e0 80 or %o3, 0x80, %o3 <== NOT EXECUTED 200d670: 7f ff f4 56 call 200a7c8 <__assert_func> <== NOT EXECUTED 200d674: 92 10 20 5c mov 0x5c, %o1 <== 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; 200d678: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 200d67c: d0 04 00 00 ld [ %l0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 200d680: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 200d684: d0 26 20 08 st %o0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 200d688: c2 00 a0 04 ld [ %g2 + 4 ], %g1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 200d68c: 90 02 20 50 add %o0, 0x50, %o0 200d690: 82 00 60 01 inc %g1 200d694: c2 20 a0 04 st %g1, [ %g2 + 4 ] 200d698: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 200d69c: 7f ff e3 7a call 2006484 <_Chain_Append> 200d6a0: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200d6a4: 81 c7 e0 08 ret 200d6a8: 81 e8 00 00 restore =============================================================================== 0200d55c : IMFS_jnode_t *IMFS_create_root_node(void) { 200d55c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 200d560: 90 10 20 01 mov 1, %o0 200d564: 13 00 80 6a sethi %hi(0x201a800), %o1 200d568: 15 00 00 10 sethi %hi(0x4000), %o2 200d56c: 92 12 60 28 or %o1, 0x28, %o1 200d570: 7f ff ff df call 200d4ec 200d574: 94 12 a1 ed or %o2, 0x1ed, %o2 if ( !node ) 200d578: 80 a2 20 00 cmp %o0, 0 200d57c: 02 80 00 06 be 200d594 <== NEVER TAKEN 200d580: 82 02 20 54 add %o0, 0x54, %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 200d584: c0 22 20 54 clr [ %o0 + 0x54 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200d588: c2 22 20 50 st %g1, [ %o0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200d58c: 82 02 20 50 add %o0, 0x50, %g1 200d590: c2 22 20 58 st %g1, [ %o0 + 0x58 ] * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 200d594: 81 c7 e0 08 ret 200d598: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02004a48 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2004a48: 9d e3 bf a0 save %sp, -96, %sp rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2004a4c: 80 a6 20 00 cmp %i0, 0 2004a50: 12 80 00 0a bne 2004a78 <== ALWAYS TAKEN 2004a54: 80 a6 60 00 cmp %i1, 0 2004a58: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED 2004a5c: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED 2004a60: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED 2004a64: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED 2004a68: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED 2004a6c: 96 12 e1 10 or %o3, 0x110, %o3 <== NOT EXECUTED 2004a70: 10 80 00 0b b 2004a9c <== NOT EXECUTED 2004a74: 92 10 20 84 mov 0x84, %o1 <== NOT EXECUTED assert( level >= 0 ); 2004a78: 36 80 00 0b bge,a 2004aa4 <== ALWAYS TAKEN 2004a7c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 2004a80: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED 2004a84: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED 2004a88: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED 2004a8c: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED 2004a90: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED 2004a94: 96 12 e1 20 or %o3, 0x120, %o3 <== NOT EXECUTED 2004a98: 92 10 20 86 mov 0x86, %o1 <== NOT EXECUTED 2004a9c: 40 00 02 26 call 2005334 <__assert_func> <== NOT EXECUTED 2004aa0: 01 00 00 00 nop <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 2004aa4: 80 a0 60 01 cmp %g1, 1 2004aa8: 02 80 00 0a be 2004ad0 <== ALWAYS TAKEN 2004aac: 29 00 80 9b sethi %hi(0x2026c00), %l4 2004ab0: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED 2004ab4: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED 2004ab8: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED 2004abc: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED 2004ac0: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED 2004ac4: 96 12 e1 30 or %o3, 0x130, %o3 <== NOT EXECUTED 2004ac8: 10 bf ff f5 b 2004a9c <== NOT EXECUTED 2004acc: 92 10 20 88 mov 0x88, %o1 <== NOT EXECUTED the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2004ad0: 27 00 80 93 sethi %hi(0x2024c00), %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2004ad4: aa 06 20 54 add %i0, 0x54, %l5 2004ad8: a8 15 20 38 or %l4, 0x38, %l4 2004adc: a6 14 e1 58 or %l3, 0x158, %l3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2004ae0: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 2004ae4: 10 80 00 14 b 2004b34 2004ae8: a4 06 60 01 add %i1, 1, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2004aec: c2 05 00 00 ld [ %l4 ], %g1 2004af0: 90 10 00 13 mov %l3, %o0 2004af4: d2 00 60 08 ld [ %g1 + 8 ], %o1 2004af8: 40 00 40 b2 call 2014dc0 2004afc: a2 04 60 01 inc %l1 !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++ ) 2004b00: 80 a4 40 19 cmp %l1, %i1 2004b04: 24 bf ff fb ble,a 2004af0 2004b08: c2 05 00 00 ld [ %l4 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2004b0c: 7f ff ff 71 call 20048d0 2004b10: 90 10 00 10 mov %l0, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 2004b14: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2004b18: 80 a0 60 01 cmp %g1, 1 2004b1c: 32 80 00 06 bne,a 2004b34 2004b20: e0 04 00 00 ld [ %l0 ], %l0 IMFS_dump_directory( the_jnode, level + 1 ); 2004b24: 90 10 00 10 mov %l0, %o0 2004b28: 7f ff ff c8 call 2004a48 2004b2c: 92 10 00 12 mov %l2, %o1 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 ) { 2004b30: e0 04 00 00 ld [ %l0 ], %l0 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2004b34: 80 a4 00 15 cmp %l0, %l5 2004b38: 12 bf ff ed bne 2004aec 2004b3c: a2 10 20 00 clr %l1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 2004b40: 81 c7 e0 08 ret 2004b44: 81 e8 00 00 restore =============================================================================== 02009a58 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 2009a58: 9d e3 bf 60 save %sp, -160, %sp case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 2009a5c: 2b 00 80 6c sethi %hi(0x201b000), %l5 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 2009a60: a0 10 00 18 mov %i0, %l0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 2009a64: aa 15 63 10 or %l5, 0x310, %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 2009a68: e2 06 c0 00 ld [ %i3 ], %l1 2009a6c: ac 10 20 01 mov 1, %l6 2009a70: a4 10 20 00 clr %l2 * 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 ); 2009a74: a6 07 bf c0 add %fp, -64, %l3 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 2009a78: 10 80 00 6a b 2009c20 2009a7c: a8 07 bf fc add %fp, -4, %l4 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 2009a80: 90 04 00 12 add %l0, %l2, %o0 2009a84: 92 10 00 19 mov %i1, %o1 2009a88: 94 10 00 13 mov %l3, %o2 2009a8c: 40 00 02 3f call 200a388 2009a90: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 2009a94: c2 06 c0 00 ld [ %i3 ], %g1 * 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 ); 2009a98: ac 10 00 08 mov %o0, %l6 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 2009a9c: 80 a0 60 00 cmp %g1, 0 2009aa0: 02 80 00 56 be 2009bf8 <== NEVER TAKEN 2009aa4: f0 07 bf fc ld [ %fp + -4 ], %i0 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 2009aa8: 80 a2 20 00 cmp %o0, 0 2009aac: 22 80 00 10 be,a 2009aec 2009ab0: a4 04 80 18 add %l2, %i0, %l2 if ( node->type == IMFS_DIRECTORY ) 2009ab4: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 2009ab8: 80 a0 60 01 cmp %g1, 1 2009abc: 32 80 00 0c bne,a 2009aec 2009ac0: a4 04 80 18 add %l2, %i0, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 2009ac4: 90 10 00 1b mov %i3, %o0 2009ac8: 7f ff ff 7c call 20098b8 2009acc: 92 10 20 01 mov 1, %o1 2009ad0: 80 a2 20 00 cmp %o0, 0 2009ad4: 32 80 00 06 bne,a 2009aec 2009ad8: a4 04 80 18 add %l2, %i0, %l2 rtems_set_errno_and_return_minus_one( EACCES ); 2009adc: 40 00 14 ed call 200ee90 <__errno> 2009ae0: b0 10 3f ff mov -1, %i0 2009ae4: 10 80 00 4c b 2009c14 2009ae8: 82 10 20 0d mov 0xd, %g1 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 2009aec: b2 26 40 18 sub %i1, %i0, %i1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 2009af0: 80 a5 a0 03 cmp %l6, 3 2009af4: 02 80 00 1b be 2009b60 2009af8: e2 06 c0 00 ld [ %i3 ], %l1 2009afc: 80 a5 a0 04 cmp %l6, 4 2009b00: 02 80 00 42 be 2009c08 2009b04: 80 a5 a0 02 cmp %l6, 2 2009b08: 12 80 00 47 bne 2009c24 2009b0c: 80 a5 a0 04 cmp %l6, 4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 2009b10: c2 05 40 00 ld [ %l5 ], %g1 2009b14: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2009b18: 80 a4 40 01 cmp %l1, %g1 2009b1c: 02 bf ff da be 2009a84 2009b20: 90 04 00 12 add %l0, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 2009b24: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 2009b28: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 2009b2c: 80 a4 40 01 cmp %l1, %g1 2009b30: 32 80 00 04 bne,a 2009b40 2009b34: e2 04 60 08 ld [ %l1 + 8 ], %l1 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 2009b38: 10 80 00 47 b 2009c54 2009b3c: 92 02 60 08 add %o1, 8, %o1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 2009b40: 80 a4 60 00 cmp %l1, 0 2009b44: 32 bf ff cf bne,a 2009a80 2009b48: e2 26 c0 00 st %l1, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 2009b4c: 40 00 14 d1 call 200ee90 <__errno> 2009b50: b0 10 3f ff mov -1, %i0 2009b54: ec 22 00 00 st %l6, [ %o0 ] 2009b58: 81 c7 e0 08 ret 2009b5c: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 2009b60: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 2009b64: 80 a0 60 03 cmp %g1, 3 2009b68: 12 80 00 0a bne 2009b90 2009b6c: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 2009b70: 90 10 00 1b mov %i3, %o0 2009b74: 7f ff ff 69 call 2009918 2009b78: 92 10 20 00 clr %o1 node = pathloc->node_access; 2009b7c: e2 06 c0 00 ld [ %i3 ], %l1 if ( !node ) 2009b80: 80 a4 60 00 cmp %l1, 0 2009b84: 32 80 00 0d bne,a 2009bb8 <== ALWAYS TAKEN 2009b88: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 2009b8c: 30 80 00 0e b,a 2009bc4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 2009b90: 32 80 00 0a bne,a 2009bb8 2009b94: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 2009b98: 90 10 00 1b mov %i3, %o0 2009b9c: 7f ff ff 77 call 2009978 2009ba0: 92 10 20 00 clr %o1 node = pathloc->node_access; 2009ba4: e2 06 c0 00 ld [ %i3 ], %l1 if ( result == -1 ) 2009ba8: 80 a2 3f ff cmp %o0, -1 2009bac: 02 bf ff eb be 2009b58 <== NEVER TAKEN 2009bb0: b0 10 00 08 mov %o0, %i0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 2009bb4: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 2009bb8: 80 a0 60 01 cmp %g1, 1 2009bbc: 22 80 00 06 be,a 2009bd4 2009bc0: d2 04 60 5c ld [ %l1 + 0x5c ], %o1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2009bc4: 40 00 14 b3 call 200ee90 <__errno> 2009bc8: b0 10 3f ff mov -1, %i0 2009bcc: 10 80 00 12 b 2009c14 2009bd0: 82 10 20 14 mov 0x14, %g1 /* * 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 ) { 2009bd4: 80 a2 60 00 cmp %o1, 0 2009bd8: 12 80 00 1f bne 2009c54 2009bdc: 92 02 60 1c add %o1, 0x1c, %o1 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 2009be0: 90 10 00 11 mov %l1, %o0 2009be4: 40 00 01 be call 200a2dc 2009be8: 92 10 00 13 mov %l3, %o1 if ( !node ) 2009bec: a2 92 20 00 orcc %o0, 0, %l1 2009bf0: 32 bf ff a4 bne,a 2009a80 2009bf4: e2 26 c0 00 st %l1, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 2009bf8: 40 00 14 a6 call 200ee90 <__errno> 2009bfc: b0 10 3f ff mov -1, %i0 2009c00: 10 80 00 05 b 2009c14 2009c04: 82 10 20 02 mov 2, %g1 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 2009c08: 40 00 14 a2 call 200ee90 <__errno> 2009c0c: b0 10 3f ff mov -1, %i0 2009c10: 82 10 20 5b mov 0x5b, %g1 2009c14: c2 22 00 00 st %g1, [ %o0 ] 2009c18: 81 c7 e0 08 ret 2009c1c: 81 e8 00 00 restore /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 2009c20: 80 a5 a0 04 cmp %l6, 4 2009c24: 02 80 00 04 be 2009c34 <== NEVER TAKEN 2009c28: 80 a5 a0 00 cmp %l6, 0 2009c2c: 12 bf ff 96 bne 2009a84 2009c30: 90 04 00 12 add %l0, %l2, %o0 * 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 ) { 2009c34: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 2009c38: 80 a0 60 01 cmp %g1, 1 2009c3c: 12 80 00 19 bne 2009ca0 2009c40: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 2009c44: d2 04 60 5c ld [ %l1 + 0x5c ], %o1 2009c48: 80 a2 60 00 cmp %o1, 0 2009c4c: 02 80 00 15 be 2009ca0 2009c50: 92 02 60 1c add %o1, 0x1c, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 2009c54: a2 07 bf e8 add %fp, -24, %l1 2009c58: 94 10 20 14 mov 0x14, %o2 2009c5c: 40 00 16 c9 call 200f780 2009c60: 90 10 00 11 mov %l1, %o0 *pathloc = newloc; 2009c64: 92 10 00 11 mov %l1, %o1 2009c68: 94 10 20 14 mov 0x14, %o2 2009c6c: 40 00 16 c5 call 200f780 2009c70: 90 10 00 1b mov %i3, %o0 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 2009c74: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 2009c78: d0 07 bf fc ld [ %fp + -4 ], %o0 2009c7c: c2 00 40 00 ld [ %g1 ], %g1 2009c80: 92 06 40 08 add %i1, %o0, %o1 2009c84: 94 10 00 1a mov %i2, %o2 2009c88: 90 24 80 08 sub %l2, %o0, %o0 2009c8c: 96 10 00 1b mov %i3, %o3 2009c90: 9f c0 40 00 call %g1 2009c94: 90 04 00 08 add %l0, %o0, %o0 2009c98: 81 c7 e0 08 ret 2009c9c: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 2009ca0: 7f ff fe ea call 2009848 2009ca4: 90 10 00 1b mov %i3, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 2009ca8: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 2009cac: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 2009cb0: 7f ff ff 02 call 20098b8 2009cb4: 90 10 00 1b mov %i3, %o0 2009cb8: 80 a2 20 00 cmp %o0, 0 2009cbc: 12 80 00 06 bne 2009cd4 2009cc0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 2009cc4: 40 00 14 73 call 200ee90 <__errno> 2009cc8: b0 10 3f ff mov -1, %i0 ! ffffffff 2009ccc: 82 10 20 0d mov 0xd, %g1 2009cd0: c2 22 00 00 st %g1, [ %o0 ] return result; } 2009cd4: 81 c7 e0 08 ret 2009cd8: 81 e8 00 00 restore =============================================================================== 02009d98 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 2009d98: 9d e3 bf 60 save %sp, -160, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 2009d9c: e0 06 40 00 ld [ %i1 ], %l0 /* * Get the path length. */ pathlen = strlen( path ); 2009da0: 90 10 00 18 mov %i0, %o0 2009da4: 40 00 17 f3 call 200fd70 2009da8: 2b 00 80 6c sethi %hi(0x201b000), %l5 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 2009dac: a2 10 00 18 mov %i0, %l1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 2009db0: a4 10 20 00 clr %l2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 2009db4: a8 07 bf c0 add %fp, -64, %l4 2009db8: ac 07 bf fc add %fp, -4, %l6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 2009dbc: a6 10 00 08 mov %o0, %l3 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 2009dc0: aa 15 63 10 or %l5, 0x310, %l5 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 2009dc4: 92 10 00 13 mov %l3, %o1 2009dc8: 90 04 40 12 add %l1, %l2, %o0 2009dcc: 94 10 00 14 mov %l4, %o2 2009dd0: 40 00 01 6e call 200a388 2009dd4: 96 10 00 16 mov %l6, %o3 pathlen -= len; i += len; if ( !pathloc->node_access ) 2009dd8: c2 06 40 00 ld [ %i1 ], %g1 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 2009ddc: f0 07 bf fc ld [ %fp + -4 ], %i0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 2009de0: ae 10 00 08 mov %o0, %l7 pathlen -= len; i += len; if ( !pathloc->node_access ) 2009de4: 80 a0 60 00 cmp %g1, 0 2009de8: 02 80 00 83 be 2009ff4 <== NEVER TAKEN 2009dec: a6 24 c0 18 sub %l3, %i0, %l3 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 2009df0: 80 a2 20 00 cmp %o0, 0 2009df4: 22 80 00 10 be,a 2009e34 2009df8: a4 04 80 18 add %l2, %i0, %l2 if ( node->type == IMFS_DIRECTORY ) 2009dfc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2009e00: 80 a0 60 01 cmp %g1, 1 2009e04: 32 80 00 0c bne,a 2009e34 2009e08: a4 04 80 18 add %l2, %i0, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 2009e0c: 90 10 00 19 mov %i1, %o0 2009e10: 7f ff fe aa call 20098b8 2009e14: 92 10 20 01 mov 1, %o1 2009e18: 80 a2 20 00 cmp %o0, 0 2009e1c: 32 80 00 06 bne,a 2009e34 2009e20: a4 04 80 18 add %l2, %i0, %l2 rtems_set_errno_and_return_minus_one( EACCES ); 2009e24: 40 00 14 1b call 200ee90 <__errno> 2009e28: b0 10 3f ff mov -1, %i0 2009e2c: 10 80 00 84 b 200a03c 2009e30: 82 10 20 0d mov 0xd, %g1 node = pathloc->node_access; switch( type ) { 2009e34: 80 a5 e0 02 cmp %l7, 2 2009e38: 02 80 00 0f be 2009e74 2009e3c: e0 06 40 00 ld [ %i1 ], %l0 2009e40: 80 a5 e0 02 cmp %l7, 2 2009e44: 18 80 00 07 bgu 2009e60 2009e48: 80 a5 e0 03 cmp %l7, 3 2009e4c: 80 a5 e0 00 cmp %l7, 0 2009e50: 02 80 00 56 be 2009fa8 2009e54: 92 10 00 13 mov %l3, %o1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 2009e58: 10 bf ff dd b 2009dcc 2009e5c: 90 04 40 12 add %l1, %l2, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 2009e60: 02 80 00 19 be 2009ec4 2009e64: 80 a5 e0 04 cmp %l7, 4 2009e68: 12 bf ff d8 bne 2009dc8 <== NEVER TAKEN 2009e6c: 92 10 00 13 mov %l3, %o1 2009e70: 30 80 00 52 b,a 2009fb8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 2009e74: c2 05 40 00 ld [ %l5 ], %g1 2009e78: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2009e7c: 80 a4 00 01 cmp %l0, %g1 2009e80: 02 bf ff d2 be 2009dc8 2009e84: 92 10 00 13 mov %l3, %o1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 2009e88: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 2009e8c: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 2009e90: 80 a4 00 01 cmp %l0, %g1 2009e94: 32 80 00 04 bne,a 2009ea4 2009e98: e0 04 20 08 ld [ %l0 + 8 ], %l0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 2009e9c: 10 80 00 2a b 2009f44 2009ea0: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 2009ea4: 80 a4 20 00 cmp %l0, 0 2009ea8: 32 bf ff c7 bne,a 2009dc4 2009eac: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 2009eb0: 40 00 13 f8 call 200ee90 <__errno> 2009eb4: b0 10 3f ff mov -1, %i0 2009eb8: ee 22 00 00 st %l7, [ %o0 ] 2009ebc: 81 c7 e0 08 ret 2009ec0: 81 e8 00 00 restore pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 2009ec4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2009ec8: 80 a0 60 03 cmp %g1, 3 2009ecc: 12 80 00 0a bne 2009ef4 2009ed0: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); 2009ed4: 90 10 00 19 mov %i1, %o0 2009ed8: 7f ff ff 81 call 2009cdc 2009edc: 92 10 20 00 clr %o1 if ( result == -1 ) 2009ee0: 80 a2 3f ff cmp %o0, -1 2009ee4: 12 80 00 0c bne 2009f14 <== ALWAYS TAKEN 2009ee8: b0 10 00 08 mov %o0, %i0 2009eec: 81 c7 e0 08 ret <== NOT EXECUTED 2009ef0: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 2009ef4: 32 80 00 09 bne,a 2009f18 2009ef8: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 2009efc: 90 10 00 19 mov %i1, %o0 2009f00: 7f ff ff 77 call 2009cdc 2009f04: 92 10 20 00 clr %o1 if ( result == -1 ) 2009f08: 80 a2 3f ff cmp %o0, -1 2009f0c: 02 bf ff ec be 2009ebc <== NEVER TAKEN 2009f10: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 2009f14: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 2009f18: 80 a2 20 00 cmp %o0, 0 2009f1c: 02 80 00 45 be 200a030 <== NEVER TAKEN 2009f20: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 2009f24: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 2009f28: 80 a0 60 01 cmp %g1, 1 2009f2c: 12 80 00 41 bne 200a030 2009f30: 01 00 00 00 nop /* * 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 ) { 2009f34: d2 02 20 5c ld [ %o0 + 0x5c ], %o1 2009f38: 80 a2 60 00 cmp %o1, 0 2009f3c: 02 80 00 14 be 2009f8c 2009f40: 92 02 60 1c add %o1, 0x1c, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 2009f44: a0 07 bf e8 add %fp, -24, %l0 2009f48: 94 10 20 14 mov 0x14, %o2 2009f4c: 40 00 16 0d call 200f780 2009f50: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 2009f54: 92 10 00 10 mov %l0, %o1 2009f58: 94 10 20 14 mov 0x14, %o2 2009f5c: 40 00 16 09 call 200f780 2009f60: 90 10 00 19 mov %i1, %o0 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 2009f64: c2 06 60 0c ld [ %i1 + 0xc ], %g1 2009f68: c4 07 bf fc ld [ %fp + -4 ], %g2 2009f6c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2009f70: a4 24 80 02 sub %l2, %g2, %l2 2009f74: 92 10 00 19 mov %i1, %o1 2009f78: 90 04 40 12 add %l1, %l2, %o0 2009f7c: 9f c0 40 00 call %g1 2009f80: 94 10 00 1a mov %i2, %o2 2009f84: 81 c7 e0 08 ret 2009f88: 91 e8 00 08 restore %g0, %o0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 2009f8c: 40 00 00 d4 call 200a2dc 2009f90: 92 10 00 14 mov %l4, %o1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 2009f94: a0 92 20 00 orcc %o0, 0, %l0 2009f98: 02 80 00 0c be 2009fc8 2009f9c: c4 07 bf fc ld [ %fp + -4 ], %g2 done = true; else pathloc->node_access = node; 2009fa0: 10 bf ff 89 b 2009dc4 2009fa4: e0 26 40 00 st %l0, [ %i1 ] break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 2009fa8: 40 00 13 ba call 200ee90 <__errno> 2009fac: b0 10 3f ff mov -1, %i0 2009fb0: 10 80 00 23 b 200a03c 2009fb4: 82 10 20 11 mov 0x11, %g1 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 2009fb8: 40 00 13 b6 call 200ee90 <__errno> 2009fbc: b0 10 3f ff mov -1, %i0 2009fc0: 10 80 00 1f b 200a03c 2009fc4: 82 10 20 5b mov 0x5b, %g1 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 2009fc8: 82 04 40 12 add %l1, %l2, %g1 2009fcc: a4 24 80 02 sub %l2, %g2, %l2 2009fd0: a2 04 40 12 add %l1, %l2, %l1 /* * 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++) { 2009fd4: 10 80 00 0c b 200a004 2009fd8: e2 26 80 00 st %l1, [ %i2 ] if ( !IMFS_is_separator( path[ i ] ) ) 2009fdc: 80 a0 a0 5c cmp %g2, 0x5c 2009fe0: 22 80 00 0a be,a 200a008 2009fe4: c4 48 40 00 ldsb [ %g1 ], %g2 2009fe8: 80 a0 a0 2f cmp %g2, 0x2f 2009fec: 22 80 00 07 be,a 200a008 2009ff0: c4 48 40 00 ldsb [ %g1 ], %g2 rtems_set_errno_and_return_minus_one( ENOENT ); 2009ff4: 40 00 13 a7 call 200ee90 <__errno> 2009ff8: b0 10 3f ff mov -1, %i0 2009ffc: 10 80 00 10 b 200a03c 200a000: 82 10 20 02 mov 2, %g1 /* * 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++) { 200a004: c4 48 40 00 ldsb [ %g1 ], %g2 200a008: 80 a0 a0 00 cmp %g2, 0 200a00c: 12 bf ff f4 bne 2009fdc 200a010: 82 00 60 01 inc %g1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 200a014: 7f ff fe 0d call 2009848 200a018: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 200a01c: c2 06 40 00 ld [ %i1 ], %g1 200a020: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200a024: 80 a0 60 01 cmp %g1, 1 200a028: 02 80 00 08 be 200a048 <== ALWAYS TAKEN 200a02c: b0 10 00 08 mov %o0, %i0 if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 200a030: 40 00 13 98 call 200ee90 <__errno> 200a034: b0 10 3f ff mov -1, %i0 200a038: 82 10 20 14 mov 0x14, %g1 200a03c: c2 22 00 00 st %g1, [ %o0 ] 200a040: 81 c7 e0 08 ret 200a044: 81 e8 00 00 restore /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 200a048: 90 10 00 19 mov %i1, %o0 200a04c: 7f ff fe 1b call 20098b8 200a050: 92 10 20 03 mov 3, %o1 200a054: 80 a2 20 00 cmp %o0, 0 200a058: 12 80 00 06 bne 200a070 200a05c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200a060: 40 00 13 8c call 200ee90 <__errno> 200a064: b0 10 3f ff mov -1, %i0 ! ffffffff 200a068: 82 10 20 0d mov 0xd, %g1 200a06c: c2 22 00 00 st %g1, [ %o0 ] return result; } 200a070: 81 c7 e0 08 ret 200a074: 81 e8 00 00 restore =============================================================================== 02009918 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 2009918: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 200991c: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 2009920: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2009924: 80 a0 a0 03 cmp %g2, 3 2009928: 22 80 00 04 be,a 2009938 <== ALWAYS TAKEN 200992c: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 rtems_fatal_error_occurred (0xABCD0000); 2009930: 7f ff f1 fa call 2006118 <== NOT EXECUTED 2009934: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; IMFS_Set_handlers( node ); 2009938: 90 10 00 18 mov %i0, %o0 200993c: 7f ff ff c3 call 2009848 2009940: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 2009944: 90 10 00 18 mov %i0, %o0 2009948: 92 10 00 19 mov %i1, %o1 200994c: 7f ff ff db call 20098b8 2009950: b0 10 20 00 clr %i0 2009954: 80 a2 20 00 cmp %o0, 0 2009958: 12 80 00 06 bne 2009970 <== ALWAYS TAKEN 200995c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 2009960: 40 00 15 4c call 200ee90 <__errno> <== NOT EXECUTED 2009964: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2009968: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 200996c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 2009970: 81 c7 e0 08 ret 2009974: 81 e8 00 00 restore =============================================================================== 020098b8 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 20098b8: 9d e3 bf a0 save %sp, -96, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 20098bc: 40 00 04 84 call 200aacc 20098c0: e0 06 00 00 ld [ %i0 ], %l0 st_gid = getegid(); 20098c4: 40 00 04 7e call 200aabc 20098c8: a2 10 00 08 mov %o0, %l1 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 20098cc: c2 14 20 3c lduh [ %l0 + 0x3c ], %g1 20098d0: a3 2c 60 10 sll %l1, 0x10, %l1 20098d4: a3 34 60 10 srl %l1, 0x10, %l1 20098d8: 80 a4 40 01 cmp %l1, %g1 20098dc: 02 80 00 09 be 2009900 20098e0: 83 2e 60 06 sll %i1, 6, %g1 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 20098e4: c2 14 20 3e lduh [ %l0 + 0x3e ], %g1 20098e8: 91 2a 20 10 sll %o0, 0x10, %o0 20098ec: 91 32 20 10 srl %o0, 0x10, %o0 20098f0: 80 a2 00 01 cmp %o0, %g1 20098f4: 02 80 00 03 be 2009900 <== ALWAYS TAKEN 20098f8: 83 2e 60 03 sll %i1, 3, %g1 20098fc: 82 10 00 19 mov %i1, %g1 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 2009900: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 2009904: 82 28 40 02 andn %g1, %g2, %g1 return 1; return 0; } 2009908: 80 a0 00 01 cmp %g0, %g1 200990c: b0 60 3f ff subx %g0, -1, %i0 2009910: 81 c7 e0 08 ret 2009914: 81 e8 00 00 restore =============================================================================== 02009978 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 2009978: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 200997c: e2 06 00 00 ld [ %i0 ], %l1 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 2009980: a0 10 00 18 mov %i0, %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 2009984: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 2009988: 80 a0 60 04 cmp %g1, 4 200998c: 12 80 00 07 bne 20099a8 <== NEVER TAKEN 2009990: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 2009994: c2 04 60 08 ld [ %l1 + 8 ], %g1 2009998: 80 a0 60 00 cmp %g1, 0 200999c: 32 80 00 05 bne,a 20099b0 <== ALWAYS TAKEN 20099a0: c2 26 00 00 st %g1, [ %i0 ] rtems_fatal_error_occurred( 0xBAD00000 ); 20099a4: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 20099a8: 7f ff f1 dc call 2006118 <== NOT EXECUTED 20099ac: 01 00 00 00 nop <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 20099b0: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 20099b4: c2 48 40 00 ldsb [ %g1 ], %g1 20099b8: 80 a0 60 5c cmp %g1, 0x5c 20099bc: 22 80 00 09 be,a 20099e0 <== NEVER TAKEN 20099c0: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 20099c4: 80 a0 60 2f cmp %g1, 0x2f 20099c8: 22 80 00 06 be,a 20099e0 20099cc: 03 00 80 6c sethi %hi(0x201b000), %g1 20099d0: 80 a0 60 00 cmp %g1, 0 20099d4: 12 80 00 09 bne 20099f8 <== ALWAYS TAKEN 20099d8: 82 10 20 00 clr %g1 20099dc: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 20099e0: d2 00 63 10 ld [ %g1 + 0x310 ], %o1 ! 201b310 20099e4: 90 10 00 10 mov %l0, %o0 20099e8: 92 02 60 18 add %o1, 0x18, %o1 20099ec: 40 00 17 65 call 200f780 20099f0: 94 10 20 14 mov 0x14, %o2 20099f4: 82 10 20 01 mov 1, %g1 * 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] ), 20099f8: e2 04 60 50 ld [ %l1 + 0x50 ], %l1 20099fc: a2 04 40 01 add %l1, %g1, %l1 2009a00: 40 00 18 dc call 200fd70 2009a04: 90 10 00 11 mov %l1, %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 2009a08: 94 10 00 19 mov %i1, %o2 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 2009a0c: 92 10 00 08 mov %o0, %o1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 2009a10: 96 10 00 10 mov %l0, %o3 2009a14: 40 00 00 11 call 2009a58 2009a18: 90 10 00 11 mov %l1, %o0 2009a1c: b0 10 00 08 mov %o0, %i0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 2009a20: 7f ff ff 8a call 2009848 2009a24: 90 10 00 10 mov %l0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 2009a28: 90 10 00 10 mov %l0, %o0 2009a2c: 7f ff ff a3 call 20098b8 2009a30: 92 10 00 19 mov %i1, %o1 2009a34: 80 a2 20 00 cmp %o0, 0 2009a38: 12 80 00 06 bne 2009a50 <== ALWAYS TAKEN 2009a3c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 2009a40: 40 00 15 14 call 200ee90 <__errno> <== NOT EXECUTED 2009a44: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2009a48: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 2009a4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 2009a50: 81 c7 e0 08 ret 2009a54: 81 e8 00 00 restore =============================================================================== 0200d6ac : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 200d6ac: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200d6b0: 7f ff f5 07 call 200aacc 200d6b4: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 200d6b8: 91 2a 20 10 sll %o0, 0x10, %o0 200d6bc: 91 32 20 10 srl %o0, 0x10, %o0 200d6c0: 80 a2 20 00 cmp %o0, 0 200d6c4: 22 80 00 0c be,a 200d6f4 <== ALWAYS TAKEN 200d6c8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 200d6cc: c2 14 20 3c lduh [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 200d6d0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 200d6d4: 22 80 00 08 be,a 200d6f4 <== NOT EXECUTED 200d6d8: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 200d6dc: 40 00 05 ed call 200ee90 <__errno> <== NOT EXECUTED 200d6e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200d6e4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200d6e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200d6ec: 81 c7 e0 08 ret <== NOT EXECUTED 200d6f0: 81 e8 00 00 restore <== NOT EXECUTED */ 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 ); 200d6f4: 90 07 bf f8 add %fp, -8, %o0 /* * 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); 200d6f8: 82 08 70 00 and %g1, -4096, %g1 IMFS_update_ctime( jnode ); 200d6fc: 92 10 20 00 clr %o1 /* * 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); 200d700: b2 0e 6f ff and %i1, 0xfff, %i1 200d704: b2 16 40 01 or %i1, %g1, %i1 IMFS_update_ctime( jnode ); 200d708: 7f ff f4 f5 call 200aadc 200d70c: f2 24 20 30 st %i1, [ %l0 + 0x30 ] 200d710: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d714: c2 24 20 48 st %g1, [ %l0 + 0x48 ] return 0; } 200d718: 81 c7 e0 08 ret 200d71c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200a220 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 200a220: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 200a224: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 200a228: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 200a22c: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 200a230: 40 00 0b 69 call 200cfd4 <== NOT EXECUTED 200a234: 90 04 20 50 add %l0, 0x50, %o0 <== NOT EXECUTED if (! err) { 200a238: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200a23c: 12 80 00 12 bne 200a284 <== NOT EXECUTED 200a240: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 200a244: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 <== 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) 200a248: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 200a24c: 82 08 7e ff and %g1, -257, %g1 <== 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) 200a250: 40 00 02 5b call 200abbc <== NOT EXECUTED 200a254: c2 24 60 18 st %g1, [ %l1 + 0x18 ] <== NOT EXECUTED 200a258: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200a25c: 12 80 00 10 bne 200a29c <== NOT EXECUTED 200a260: 01 00 00 00 nop <== NOT EXECUTED 200a264: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED 200a268: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200a26c: 12 80 00 0c bne 200a29c <== NOT EXECUTED 200a270: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 200a274: 40 00 01 ad call 200a928 <== NOT EXECUTED 200a278: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 200a27c: 81 c7 e0 08 ret <== NOT EXECUTED 200a280: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 200a284: 16 80 00 06 bge 200a29c <== NOT EXECUTED 200a288: 01 00 00 00 nop <== NOT EXECUTED 200a28c: 40 00 13 01 call 200ee90 <__errno> <== NOT EXECUTED 200a290: b0 20 00 18 neg %i0 <== NOT EXECUTED 200a294: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 200a298: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 200a29c: 81 c7 e0 08 ret <== NOT EXECUTED 200a2a0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200a0d0 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 200a0d0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 200a0d4: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 200a0d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED int err; if (command == FIONBIO) { 200a0dc: 82 10 62 7e or %g1, 0x27e, %g1 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 200a0e0: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED int err; if (command == FIONBIO) { 200a0e4: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200a0e8: 12 80 00 0f bne 200a124 <== NOT EXECUTED 200a0ec: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (buffer == NULL) 200a0f0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 200a0f4: 02 80 00 12 be 200a13c <== NOT EXECUTED 200a0f8: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 200a0fc: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 200a100: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200a104: 02 80 00 04 be 200a114 <== NOT EXECUTED 200a108: c2 02 e0 18 ld [ %o3 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 200a10c: 10 80 00 03 b 200a118 <== NOT EXECUTED 200a110: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 200a114: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 200a118: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 200a11c: 81 c7 e0 08 ret <== NOT EXECUTED 200a120: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 200a124: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 200a128: 40 00 0a a8 call 200cbc8 <== NOT EXECUTED 200a12c: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 200a130: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200a134: 16 80 00 06 bge 200a14c <== NOT EXECUTED 200a138: 01 00 00 00 nop <== NOT EXECUTED 200a13c: 40 00 13 55 call 200ee90 <__errno> <== NOT EXECUTED 200a140: b0 20 00 18 neg %i0 <== NOT EXECUTED 200a144: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 200a148: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 200a14c: 81 c7 e0 08 ret <== NOT EXECUTED 200a150: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200a078 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200a078: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 200a07c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200a080: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 200a084: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 200a088: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 200a08c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200a090: 40 00 0a b1 call 200cb54 <== NOT EXECUTED 200a094: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 200a098: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 200a09c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 200a0a0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200a0a4: 16 80 00 08 bge 200a0c4 <== NOT EXECUTED 200a0a8: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED 200a0ac: 40 00 13 79 call 200ee90 <__errno> <== NOT EXECUTED 200a0b0: a0 20 00 10 neg %l0 <== NOT EXECUTED 200a0b4: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 200a0b8: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 200a0bc: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 200a0c0: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED } 200a0c4: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 200a0c8: 81 c7 e0 08 ret <== NOT EXECUTED 200a0cc: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED =============================================================================== 0200a2a4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200a2a4: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 200a2a8: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200a2ac: 92 10 00 18 mov %i0, %o1 IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 200a2b0: 40 00 0b 8d call 200d0e4 200a2b4: 90 02 20 50 add %o0, 0x50, %o0 IMFS_FIFO_RETURN(err); 200a2b8: b0 92 20 00 orcc %o0, 0, %i0 200a2bc: 16 80 00 06 bge 200a2d4 <== NEVER TAKEN 200a2c0: 01 00 00 00 nop 200a2c4: 40 00 12 f3 call 200ee90 <__errno> 200a2c8: b0 20 00 18 neg %i0 200a2cc: f0 22 00 00 st %i0, [ %o0 ] 200a2d0: b0 10 3f ff mov -1, %i0 } 200a2d4: 81 c7 e0 08 ret 200a2d8: 81 e8 00 00 restore =============================================================================== 0200a1bc : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200a1bc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 200a1c0: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200a1c4: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 200a1c8: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 200a1cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200a1d0: 40 00 0a 97 call 200cc2c <== NOT EXECUTED 200a1d4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 200a1d8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200a1dc: 04 80 00 08 ble 200a1fc <== NOT EXECUTED 200a1e0: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 200a1e4: 40 00 02 3e call 200aadc <== NOT EXECUTED 200a1e8: 92 10 20 00 clr %o1 <== NOT EXECUTED 200a1ec: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200a1f0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 200a1f4: 81 c7 e0 08 ret <== NOT EXECUTED 200a1f8: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 200a1fc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200a200: 02 80 00 06 be 200a218 <== NOT EXECUTED 200a204: 01 00 00 00 nop <== NOT EXECUTED 200a208: 40 00 13 22 call 200ee90 <__errno> <== NOT EXECUTED 200a20c: b0 20 00 18 neg %i0 <== NOT EXECUTED 200a210: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 200a214: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 200a218: 81 c7 e0 08 ret <== NOT EXECUTED 200a21c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200a154 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200a154: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 200a158: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200a15c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 200a160: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 200a164: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200a168: 40 00 0b 18 call 200cdc8 <== NOT EXECUTED 200a16c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 200a170: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200a174: 04 80 00 09 ble 200a198 <== NOT EXECUTED 200a178: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 200a17c: 40 00 02 58 call 200aadc <== NOT EXECUTED 200a180: 92 10 20 00 clr %o1 <== NOT EXECUTED 200a184: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200a188: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 200a18c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 200a190: 81 c7 e0 08 ret <== NOT EXECUTED 200a194: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 200a198: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200a19c: 02 80 00 06 be 200a1b4 <== NOT EXECUTED 200a1a0: 01 00 00 00 nop <== NOT EXECUTED 200a1a4: 40 00 13 3b call 200ee90 <__errno> <== NOT EXECUTED 200a1a8: b0 20 00 18 neg %i0 <== NOT EXECUTED 200a1ac: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 200a1b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 200a1b4: 81 c7 e0 08 ret <== NOT EXECUTED 200a1b8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200a2dc : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200a2dc: 9d e3 bf a0 save %sp, -96, %sp /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 200a2e0: 80 a6 20 00 cmp %i0, 0 200a2e4: 12 80 00 0a bne 200a30c <== ALWAYS TAKEN 200a2e8: 80 a6 60 00 cmp %i1, 0 200a2ec: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED 200a2f0: 15 00 80 69 sethi %hi(0x201a400), %o2 <== NOT EXECUTED 200a2f4: 17 00 80 69 sethi %hi(0x201a400), %o3 <== NOT EXECUTED 200a2f8: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 200a2fc: 94 12 a0 38 or %o2, 0x38, %o2 <== NOT EXECUTED 200a300: 96 12 e0 18 or %o3, 0x18, %o3 <== NOT EXECUTED 200a304: 40 00 01 31 call 200a7c8 <__assert_func> <== NOT EXECUTED 200a308: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 200a30c: 02 80 00 1c be 200a37c <== NEVER TAKEN 200a310: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200a314: 13 00 80 69 sethi %hi(0x201a400), %o1 200a318: 40 00 16 45 call 200fc2c 200a31c: 92 12 60 28 or %o1, 0x28, %o1 ! 201a428 200a320: 80 a2 20 00 cmp %o0, 0 200a324: 02 80 00 09 be 200a348 <== NEVER TAKEN 200a328: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200a32c: 13 00 80 69 sethi %hi(0x201a400), %o1 200a330: 40 00 16 3f call 200fc2c 200a334: 92 12 60 30 or %o1, 0x30, %o1 ! 201a430 200a338: 80 a2 20 00 cmp %o0, 0 200a33c: 12 80 00 05 bne 200a350 <== ALWAYS TAKEN 200a340: a0 06 20 54 add %i0, 0x54, %l0 return directory->Parent; 200a344: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200a348: 81 c7 e0 08 ret <== NOT EXECUTED 200a34c: 81 e8 00 00 restore <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 200a350: 10 80 00 08 b 200a370 200a354: f0 06 20 50 ld [ %i0 + 0x50 ], %i0 !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 ) ) 200a358: 40 00 16 35 call 200fc2c 200a35c: 92 06 20 0c add %i0, 0xc, %o1 200a360: 80 a2 20 00 cmp %o0, 0 200a364: 02 80 00 07 be 200a380 200a368: 01 00 00 00 nop 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 ) { 200a36c: f0 06 00 00 ld [ %i0 ], %i0 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 200a370: 80 a6 00 10 cmp %i0, %l0 200a374: 12 bf ff f9 bne 200a358 200a378: 90 10 00 19 mov %i1, %o0 200a37c: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 200a380: 81 c7 e0 08 ret 200a384: 81 e8 00 00 restore =============================================================================== 0200f8c8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200f8c8: 9d e3 bf 88 save %sp, -120, %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; 200f8cc: 94 10 20 14 mov 0x14, %o2 200f8d0: 90 07 bf ec add %fp, -20, %o0 /* * 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; 200f8d4: e0 06 20 1c ld [ %i0 + 0x1c ], %l0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 200f8d8: a2 10 00 08 mov %o0, %l1 * 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; 200f8dc: 40 00 15 a8 call 2014f7c 200f8e0: 92 06 20 1c add %i0, 0x1c, %o1 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 200f8e4: c0 26 20 1c clr [ %i0 + 0x1c ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 200f8e8: e0 27 bf ec st %l0, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 200f8ec: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 200f8f0: 7f ff fd 4f call 200ee2c 200f8f4: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 200f8f8: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 200f8fc: 80 a0 a0 01 cmp %g2, 1 200f900: 12 80 00 06 bne 200f918 200f904: 82 04 20 54 add %l0, 0x54, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200f908: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 200f90c: 80 a0 80 01 cmp %g2, %g1 200f910: 12 80 00 09 bne 200f934 200f914: 80 a4 20 00 cmp %l0, 0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 200f918: 90 10 20 00 clr %o0 200f91c: 7f ff cf 63 call 20036a8 200f920: 92 10 00 11 mov %l1, %o1 if (result != 0) 200f924: 80 a2 20 00 cmp %o0, 0 200f928: 12 80 00 13 bne 200f974 <== NEVER TAKEN 200f92c: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 200f930: 80 a4 20 00 cmp %l0, 0 200f934: 22 80 00 11 be,a 200f978 200f938: b0 10 20 00 clr %i0 if ( jnode->type == IMFS_DIRECTORY ) { 200f93c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200f940: 80 a0 60 01 cmp %g1, 1 200f944: 32 bf ff ea bne,a 200f8ec <== NEVER TAKEN 200f948: e0 27 bf ec st %l0, [ %fp + -20 ] <== NOT EXECUTED 200f94c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 200f950: 84 04 20 54 add %l0, 0x54, %g2 200f954: 80 a0 40 02 cmp %g1, %g2 200f958: 22 bf ff e5 be,a 200f8ec 200f95c: e0 27 bf ec st %l0, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200f960: a0 90 60 00 orcc %g1, 0, %l0 200f964: 32 bf ff e2 bne,a 200f8ec <== ALWAYS TAKEN 200f968: e0 27 bf ec st %l0, [ %fp + -20 ] 200f96c: 81 c7 e0 08 ret <== NOT EXECUTED 200f970: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 200f974: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return 0; } 200f978: 81 c7 e0 08 ret 200f97c: 81 e8 00 00 restore =============================================================================== 0200a388 : const char *path, int pathlen, char *token, int *token_len ) { 200a388: 9d e3 bf a0 save %sp, -96, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 200a38c: 82 10 20 00 clr %g1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 200a390: 10 80 00 08 b 200a3b0 200a394: c4 0e 00 00 ldub [ %i0 ], %g2 token[i] = c; if ( i == IMFS_NAME_MAX ) 200a398: 80 a0 60 20 cmp %g1, 0x20 200a39c: 12 80 00 04 bne 200a3ac 200a3a0: 82 00 60 01 inc %g1 200a3a4: 81 c7 e0 08 ret 200a3a8: 91 e8 20 04 restore %g0, 4, %o0 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 200a3ac: c4 0e 00 01 ldub [ %i0 + %g1 ], %g2 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 200a3b0: 87 28 a0 18 sll %g2, 0x18, %g3 200a3b4: 87 38 e0 18 sra %g3, 0x18, %g3 200a3b8: 80 a0 e0 5c cmp %g3, 0x5c 200a3bc: 02 80 00 08 be 200a3dc 200a3c0: 80 a0 e0 2f cmp %g3, 0x2f 200a3c4: 02 80 00 06 be 200a3dc 200a3c8: 80 a0 40 19 cmp %g1, %i1 200a3cc: 16 80 00 04 bge 200a3dc 200a3d0: 80 a0 e0 00 cmp %g3, 0 200a3d4: 32 bf ff f1 bne,a 200a398 <== ALWAYS TAKEN 200a3d8: c4 2e 80 01 stb %g2, [ %i2 + %g1 ] /* * Copy a seperator into token. */ if ( i == 0 ) { 200a3dc: 80 a0 60 00 cmp %g1, 0 200a3e0: 32 80 00 0d bne,a 200a414 200a3e4: 84 06 80 01 add %i2, %g1, %g2 token[i] = c; 200a3e8: c4 2e 80 00 stb %g2, [ %i2 ] if ( (token[i] != '\0') && pathlen ) { 200a3ec: 85 28 a0 18 sll %g2, 0x18, %g2 200a3f0: 80 a0 a0 00 cmp %g2, 0 200a3f4: 02 80 00 0d be 200a428 200a3f8: b0 10 20 00 clr %i0 200a3fc: 80 a6 60 00 cmp %i1, 0 200a400: 02 80 00 0b be 200a42c 200a404: 80 a6 20 03 cmp %i0, 3 200a408: b0 10 20 01 mov 1, %i0 200a40c: 10 80 00 07 b 200a428 200a410: 82 10 20 01 mov 1, %g1 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 200a414: c4 48 bf ff ldsb [ %g2 + -1 ], %g2 200a418: 80 a0 a0 00 cmp %g2, 0 200a41c: 02 80 00 03 be 200a428 <== NEVER TAKEN 200a420: b0 10 20 03 mov 3, %i0 token[i] = '\0'; 200a424: c0 2e 80 01 clrb [ %i2 + %g1 ] /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 200a428: 80 a6 20 03 cmp %i0, 3 200a42c: 12 80 00 11 bne 200a470 200a430: c2 26 c0 00 st %g1, [ %i3 ] if ( strcmp( token, "..") == 0 ) 200a434: 90 10 00 1a mov %i2, %o0 200a438: 13 00 80 69 sethi %hi(0x201a400), %o1 200a43c: 40 00 15 fc call 200fc2c 200a440: 92 12 60 50 or %o1, 0x50, %o1 ! 201a450 <__FUNCTION__.5473+0x18> 200a444: 80 a2 20 00 cmp %o0, 0 200a448: 12 80 00 04 bne 200a458 200a44c: 90 10 00 1a mov %i2, %o0 200a450: 81 c7 e0 08 ret 200a454: 91 e8 20 02 restore %g0, 2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 200a458: 13 00 80 69 sethi %hi(0x201a400), %o1 200a45c: 40 00 15 f4 call 200fc2c 200a460: 92 12 60 58 or %o1, 0x58, %o1 ! 201a458 <__FUNCTION__.5473+0x20> 200a464: 80 a2 20 00 cmp %o0, 0 200a468: 22 80 00 02 be,a 200a470 200a46c: b0 10 20 01 mov 1, %i0 type = IMFS_CURRENT_DIR; } return type; } 200a470: 81 c7 e0 08 ret 200a474: 81 e8 00 00 restore =============================================================================== 0200a478 : 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 ) { 200a478: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 200a47c: 03 00 80 6c sethi %hi(0x201b000), %g1 200a480: c2 00 61 58 ld [ %g1 + 0x158 ], %g1 ! 201b158 200a484: 86 10 20 00 clr %g3 200a488: 84 10 20 10 mov 0x10, %g2 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 200a48c: 80 a0 80 01 cmp %g2, %g1 200a490: 02 80 00 06 be 200a4a8 200a494: 86 00 e0 01 inc %g3 200a498: 80 a0 e0 06 cmp %g3, 6 200a49c: 12 bf ff fc bne 200a48c <== ALWAYS TAKEN 200a4a0: 85 28 a0 01 sll %g2, 1, %g2 200a4a4: 84 10 20 80 mov 0x80, %g2 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 200a4a8: 03 00 80 6e sethi %hi(0x201b800), %g1 /* * 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(); 200a4ac: 40 00 0c 2c call 200d55c 200a4b0: c4 20 61 cc st %g2, [ %g1 + 0x1cc ] ! 201b9cc 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; 200a4b4: 94 10 20 30 mov 0x30, %o2 /* * 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(); 200a4b8: d0 26 20 1c st %o0, [ %i0 + 0x1c ] temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 200a4bc: f2 26 20 28 st %i1, [ %i0 + 0x28 ] * 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(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 200a4c0: f6 26 20 24 st %i3, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 200a4c4: 13 00 80 69 sethi %hi(0x201a400), %o1 200a4c8: 90 06 20 38 add %i0, 0x38, %o0 200a4cc: 40 00 14 ad call 200f780 200a4d0: 92 12 63 f4 or %o1, 0x3f4, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 200a4d4: 90 10 20 01 mov 1, %o0 200a4d8: 40 00 00 ce call 200a810 200a4dc: 92 10 20 10 mov 0x10, %o1 if ( !fs_info ) { 200a4e0: 82 92 20 00 orcc %o0, 0, %g1 200a4e4: 12 80 00 0a bne 200a50c <== ALWAYS TAKEN 200a4e8: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 free(temp_mt_entry->mt_fs_root.node_access); 200a4ec: 40 00 01 0f call 200a928 <== NOT EXECUTED 200a4f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 200a4f4: 40 00 12 67 call 200ee90 <__errno> <== NOT EXECUTED 200a4f8: 01 00 00 00 nop <== NOT EXECUTED 200a4fc: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 200a500: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a504: 81 c7 e0 08 ret <== NOT EXECUTED 200a508: 81 e8 00 00 restore <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 200a50c: 07 00 80 6e sethi %hi(0x201b800), %g3 200a510: c4 00 e1 d0 ld [ %g3 + 0x1d0 ], %g2 ! 201b9d0 fs_info->ino_count = 1; 200a514: 88 10 20 01 mov 1, %g4 200a518: c8 20 60 04 st %g4, [ %g1 + 4 ] 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; 200a51c: c8 22 20 38 st %g4, [ %o0 + 0x38 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 200a520: 88 00 a0 01 add %g2, 1, %g4 200a524: c8 20 e1 d0 st %g4, [ %g3 + 0x1d0 ] 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; 200a528: c2 26 20 34 st %g1, [ %i0 + 0x34 ] */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 200a52c: f6 20 60 0c st %i3, [ %g1 + 0xc ] * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 200a530: f4 20 60 08 st %i2, [ %g1 + 8 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 200a534: c4 20 40 00 st %g2, [ %g1 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 200a538: 40 00 09 89 call 200cb5c 200a53c: b0 10 20 00 clr %i0 return 0; } 200a540: 81 c7 e0 08 ret 200a544: 81 e8 00 00 restore =============================================================================== 0200337c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 200337c: 9d e3 bf 50 save %sp, -176, %sp int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 2003380: c2 06 00 00 ld [ %i0 ], %g1 2003384: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 2003388: c2 10 60 34 lduh [ %g1 + 0x34 ], %g1 200338c: 80 a0 60 07 cmp %g1, 7 2003390: 08 80 00 06 bleu 20033a8 2003394: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMLINK ); 2003398: 40 00 44 bd call 201468c <__errno> 200339c: 01 00 00 00 nop 20033a0: 10 80 00 17 b 20033fc 20033a4: 82 10 20 1f mov 0x1f, %g1 ! 1f /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 20033a8: 40 00 48 58 call 2015508 20033ac: 90 10 00 1a mov %i2, %o0 20033b0: a0 07 bf b0 add %fp, -80, %l0 20033b4: 92 10 00 08 mov %o0, %o1 20033b8: 96 07 bf fc add %fp, -4, %o3 20033bc: 94 10 00 10 mov %l0, %o2 20033c0: 40 00 31 9b call 200fa2c 20033c4: 90 10 00 1a mov %i2, %o0 * 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( 20033c8: 90 10 00 19 mov %i1, %o0 20033cc: 94 10 00 10 mov %l0, %o2 20033d0: 92 10 20 03 mov 3, %o1 20033d4: 17 00 00 28 sethi %hi(0xa000), %o3 20033d8: 98 07 bf d8 add %fp, -40, %o4 20033dc: 40 00 2e 49 call 200ed00 20033e0: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 20033e4: 80 a2 20 00 cmp %o0, 0 20033e8: 12 80 00 08 bne 2003408 <== ALWAYS TAKEN 20033ec: c2 07 bf d8 ld [ %fp + -40 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 20033f0: 40 00 44 a7 call 201468c <__errno> <== NOT EXECUTED 20033f4: 01 00 00 00 nop <== NOT EXECUTED 20033f8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20033fc: c2 22 00 00 st %g1, [ %o0 ] 2003400: 81 c7 e0 08 ret 2003404: 91 e8 3f ff restore %g0, -1, %o0 /* * 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 ); 2003408: 90 07 bf f4 add %fp, -12, %o0 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 200340c: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 2003410: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 2003414: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 2003418: 40 00 02 53 call 2003d64 200341c: c4 30 60 34 sth %g2, [ %g1 + 0x34 ] 2003420: c4 07 bf f4 ld [ %fp + -12 ], %g2 2003424: c2 07 bf d8 ld [ %fp + -40 ], %g1 2003428: c4 20 60 48 st %g2, [ %g1 + 0x48 ] return 0; } 200342c: 81 c7 e0 08 ret 2003430: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02012778 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 2012778: 9d e3 bf a0 save %sp, -96, %sp 201277c: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 2012780: 80 a6 20 00 cmp %i0, 0 2012784: 12 80 00 0a bne 20127ac <== ALWAYS TAKEN 2012788: 92 10 00 19 mov %i1, %o1 201278c: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012790: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012794: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012798: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 201279c: 94 12 a3 b0 or %o2, 0x3b0, %o2 <== NOT EXECUTED 20127a0: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 20127a4: 10 80 00 0c b 20127d4 <== NOT EXECUTED 20127a8: 92 10 21 69 mov 0x169, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 20127ac: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 20127b0: 80 a0 60 05 cmp %g1, 5 20127b4: 02 80 00 0a be 20127dc <== ALWAYS TAKEN 20127b8: 15 00 80 81 sethi %hi(0x2020400), %o2 20127bc: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 20127c0: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 20127c4: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 20127c8: 94 12 a3 b0 or %o2, 0x3b0, %o2 <== NOT EXECUTED 20127cc: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 20127d0: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 20127d4: 7f ff f5 3a call 200fcbc <__assert_func> <== NOT EXECUTED 20127d8: 01 00 00 00 nop <== 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 ); 20127dc: 7f ff fe 6c call 201218c 20127e0: 94 10 20 01 mov 1, %o2 ! 1 if ( *block_entry_ptr ) 20127e4: c2 02 00 00 ld [ %o0 ], %g1 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 ); 20127e8: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 20127ec: 80 a0 60 00 cmp %g1, 0 20127f0: 12 80 00 09 bne 2012814 20127f4: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 20127f8: 7f ff fe 58 call 2012158 20127fc: b0 10 20 01 mov 1, %i0 if ( !memory ) 2012800: 80 a2 20 00 cmp %o0, 0 2012804: 02 80 00 04 be 2012814 <== NEVER TAKEN 2012808: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 201280c: d0 24 00 00 st %o0, [ %l0 ] 2012810: b0 10 20 00 clr %i0 return 0; } 2012814: 81 c7 e0 08 ret 2012818: 81 e8 00 00 restore =============================================================================== 0201281c : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 201281c: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2012820: 80 a6 20 00 cmp %i0, 0 2012824: 32 80 00 0a bne,a 201284c <== ALWAYS TAKEN 2012828: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 201282c: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012830: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012834: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012838: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 201283c: 94 12 a3 c8 or %o2, 0x3c8, %o2 <== NOT EXECUTED 2012840: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 2012844: 10 80 00 0c b 2012874 <== NOT EXECUTED 2012848: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 201284c: 80 a0 60 05 cmp %g1, 5 2012850: 02 80 00 0b be 201287c <== ALWAYS TAKEN 2012854: 03 00 80 86 sethi %hi(0x2021800), %g1 2012858: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 201285c: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012860: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012864: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012868: 94 12 a3 c8 or %o2, 0x3c8, %o2 <== NOT EXECUTED 201286c: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 2012870: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 2012874: 7f ff f5 12 call 200fcbc <__assert_func> <== NOT EXECUTED 2012878: 01 00 00 00 nop <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 201287c: e0 00 60 34 ld [ %g1 + 0x34 ], %l0 2012880: a3 34 20 02 srl %l0, 2, %l1 2012884: 92 10 00 11 mov %l1, %o1 2012888: 40 00 2c 1f call 201d904 <.umul> 201288c: 90 04 60 01 add %l1, 1, %o0 2012890: 92 10 00 11 mov %l1, %o1 2012894: 40 00 2c 1c call 201d904 <.umul> 2012898: 90 02 20 01 inc %o0 201289c: 92 10 00 10 mov %l0, %o1 20128a0: 40 00 2c 19 call 201d904 <.umul> 20128a4: 90 02 3f ff add %o0, -1, %o0 20128a8: 82 10 20 00 clr %g1 20128ac: 80 a0 40 19 cmp %g1, %i1 20128b0: 34 80 00 0b bg,a 20128dc <== NEVER TAKEN 20128b4: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 <== NOT EXECUTED 20128b8: 80 a0 40 19 cmp %g1, %i1 20128bc: 12 80 00 04 bne 20128cc <== NEVER TAKEN 20128c0: 80 a2 00 1a cmp %o0, %i2 20128c4: 38 80 00 06 bgu,a 20128dc <== ALWAYS TAKEN 20128c8: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 20128cc: 40 00 07 70 call 201468c <__errno> <== NOT EXECUTED 20128d0: 01 00 00 00 nop <== NOT EXECUTED 20128d4: 10 80 00 2b b 2012980 <== NOT EXECUTED 20128d8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 20128dc: 80 a6 40 11 cmp %i1, %l1 20128e0: 14 80 00 09 bg 2012904 <== NEVER TAKEN 20128e4: e6 06 20 54 ld [ %i0 + 0x54 ], %l3 20128e8: 80 a6 40 11 cmp %i1, %l1 20128ec: 12 80 00 04 bne 20128fc <== NEVER TAKEN 20128f0: 80 a6 80 13 cmp %i2, %l3 20128f4: 18 80 00 05 bgu 2012908 20128f8: a5 3c 20 1f sra %l0, 0x1f, %l2 20128fc: 81 c7 e0 08 ret 2012900: 91 e8 20 00 restore %g0, 0, %o0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012904: a5 3c 20 1f sra %l0, 0x1f, %l2 <== NOT EXECUTED 2012908: 96 10 00 10 mov %l0, %o3 201290c: 94 10 00 12 mov %l2, %o2 2012910: 90 10 00 19 mov %i1, %o0 2012914: 40 00 2d c1 call 201e018 <__divdi3> 2012918: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 201291c: 90 10 00 11 mov %l1, %o0 2012920: 96 10 00 10 mov %l0, %o3 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012924: a8 10 00 09 mov %o1, %l4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012928: 94 10 00 12 mov %l2, %o2 201292c: 40 00 2d bb call 201e018 <__divdi3> 2012930: 92 10 00 13 mov %l3, %o1 2012934: a2 10 00 09 mov %o1, %l1 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 2012938: 10 80 00 15 b 201298c 201293c: a0 10 00 09 mov %o1, %l0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 2012940: 7f ff ff 8e call 2012778 2012944: 92 10 00 10 mov %l0, %o1 2012948: 80 a2 20 00 cmp %o0, 0 201294c: 22 80 00 10 be,a 201298c <== ALWAYS TAKEN 2012950: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 2012954: 10 80 00 06 b 201296c <== NOT EXECUTED 2012958: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 201295c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012960: 7f ff fe d7 call 20124bc <== NOT EXECUTED 2012964: a0 04 3f ff add %l0, -1, %l0 <== 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-- ) { 2012968: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 201296c: 1a bf ff fc bcc 201295c <== NOT EXECUTED 2012970: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 2012974: 40 00 07 46 call 201468c <__errno> <== NOT EXECUTED 2012978: 01 00 00 00 nop <== NOT EXECUTED 201297c: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 2012980: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012984: 81 c7 e0 08 ret <== NOT EXECUTED 2012988: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 201298c: 80 a4 00 14 cmp %l0, %l4 2012990: 08 bf ff ec bleu 2012940 2012994: 90 10 00 18 mov %i0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 2012998: f4 26 20 54 st %i2, [ %i0 + 0x54 ] 201299c: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 20129a0: 81 c7 e0 08 ret 20129a4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0201218c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 201218c: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2012190: 80 a6 20 00 cmp %i0, 0 2012194: 32 80 00 0a bne,a 20121bc <== ALWAYS TAKEN 2012198: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 201219c: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 20121a0: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 20121a4: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 20121a8: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 20121ac: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 20121b0: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 20121b4: 10 80 00 0c b 20121e4 <== NOT EXECUTED 20121b8: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 20121bc: 80 a0 60 05 cmp %g1, 5 20121c0: 02 80 00 0b be 20121ec <== ALWAYS TAKEN 20121c4: 03 00 80 86 sethi %hi(0x2021800), %g1 20121c8: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 20121cc: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 20121d0: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 20121d4: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 20121d8: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 20121dc: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 20121e0: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED 20121e4: 7f ff f6 b6 call 200fcbc <__assert_func> <== NOT EXECUTED 20121e8: 01 00 00 00 nop <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 20121ec: e0 00 60 34 ld [ %g1 + 0x34 ], %l0 20121f0: a1 34 20 02 srl %l0, 2, %l0 20121f4: 82 04 3f ff add %l0, -1, %g1 20121f8: 80 a6 40 01 cmp %i1, %g1 20121fc: 18 80 00 16 bgu 2012254 <== NEVER TAKEN 2012200: 90 04 20 01 add %l0, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 2012204: 80 a6 a0 00 cmp %i2, 0 2012208: 02 80 00 0f be 2012244 201220c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 2012210: 80 a0 60 00 cmp %g1, 0 2012214: 32 80 00 09 bne,a 2012238 2012218: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 p = memfile_alloc_block(); 201221c: 7f ff ff cf call 2012158 2012220: 01 00 00 00 nop if ( !p ) 2012224: 80 a2 20 00 cmp %o0, 0 2012228: 22 80 00 86 be,a 2012440 <== NEVER TAKEN 201222c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 2012230: d0 26 20 58 st %o0, [ %i0 + 0x58 ] } return &info->indirect[ my_block ]; 2012234: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 2012238: b3 2e 60 02 sll %i1, 2, %i1 201223c: 81 c7 e0 08 ret 2012240: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) return 0; return &info->indirect[ my_block ]; 2012244: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 2012248: 80 a0 60 00 cmp %g1, 0 return 0; return &info->indirect[ my_block ]; 201224c: 10 80 00 32 b 2012314 2012250: b0 00 40 19 add %g1, %i1, %i0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 2012254: 40 00 2d ac call 201d904 <.umul> <== NOT EXECUTED 2012258: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201225c: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 2012260: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 2012264: 18 80 00 30 bgu 2012324 <== NOT EXECUTED 2012268: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 201226c: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2012270: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2012274: 40 00 2e 8a call 201dc9c <.urem> <== NOT EXECUTED 2012278: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 201227c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2012280: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2012284: 40 00 2d da call 201d9ec <.udiv> <== NOT EXECUTED 2012288: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 201228c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2012290: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 2012294: 02 80 00 18 be 20122f4 <== NOT EXECUTED 2012298: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 201229c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20122a0: 12 80 00 08 bne 20122c0 <== NOT EXECUTED 20122a4: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED p = memfile_alloc_block(); 20122a8: 7f ff ff ac call 2012158 <== NOT EXECUTED 20122ac: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 20122b0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 20122b4: 22 80 00 63 be,a 2012440 <== NOT EXECUTED 20122b8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 20122bc: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 20122c0: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 20122c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20122c8: 12 80 00 08 bne 20122e8 <== NOT EXECUTED 20122cc: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 20122d0: 7f ff ff a2 call 2012158 <== NOT EXECUTED 20122d4: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 20122d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20122dc: 22 80 00 59 be,a 2012440 <== NOT EXECUTED 20122e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 20122e4: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 20122e8: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 20122ec: 81 c7 e0 08 ret <== NOT EXECUTED 20122f0: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED } if ( !p ) 20122f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20122f8: 02 80 00 52 be 2012440 <== NOT EXECUTED 20122fc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 2012300: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 2012304: c2 00 40 10 ld [ %g1 + %l0 ], %g1 <== 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 ]; 2012308: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 201230c: 80 a0 60 00 cmp %g1, 0 <== 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 ]; 2012310: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 2012314: 12 80 00 4b bne 2012440 <== ALWAYS TAKEN 2012318: 01 00 00 00 nop p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 201231c: 81 c7 e0 08 ret <== NOT EXECUTED 2012320: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 2012324: 90 02 20 01 inc %o0 <== NOT EXECUTED 2012328: 40 00 2d 77 call 201d904 <.umul> <== NOT EXECUTED 201232c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2012330: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 2012334: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 2012338: 18 80 00 41 bgu 201243c <== NOT EXECUTED 201233c: b2 26 40 11 sub %i1, %l1, %i1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2012340: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2012344: 40 00 2e 56 call 201dc9c <.urem> <== NOT EXECUTED 2012348: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 201234c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2012350: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2012354: 40 00 2d a6 call 201d9ec <.udiv> <== NOT EXECUTED 2012358: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 201235c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2012360: 40 00 2d a3 call 201d9ec <.udiv> <== NOT EXECUTED 2012364: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 2012368: 92 10 00 10 mov %l0, %o1 <== 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; 201236c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 2012370: 40 00 2e 4b call 201dc9c <.urem> <== NOT EXECUTED 2012374: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 2012378: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 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; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 201237c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 2012380: 02 80 00 23 be 201240c <== NOT EXECUTED 2012384: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 2012388: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201238c: 12 80 00 08 bne 20123ac <== NOT EXECUTED 2012390: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED p = memfile_alloc_block(); 2012394: 7f ff ff 71 call 2012158 <== NOT EXECUTED 2012398: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 201239c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 20123a0: 22 80 00 28 be,a 2012440 <== NOT EXECUTED 20123a4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 20123a8: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 20123ac: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 20123b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20123b4: 12 80 00 08 bne 20123d4 <== NOT EXECUTED 20123b8: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED p1 = memfile_alloc_block(); 20123bc: 7f ff ff 67 call 2012158 <== NOT EXECUTED 20123c0: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 20123c4: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 20123c8: 02 80 00 1e be 2012440 <== NOT EXECUTED 20123cc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 20123d0: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 20123d4: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 20123d8: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 20123dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20123e0: 12 80 00 08 bne 2012400 <== NOT EXECUTED 20123e4: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 20123e8: 7f ff ff 5c call 2012158 <== NOT EXECUTED 20123ec: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 20123f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20123f4: 22 80 00 13 be,a 2012440 <== NOT EXECUTED 20123f8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 20123fc: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 2012400: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 2012404: 81 c7 e0 08 ret <== NOT EXECUTED 2012408: 91 ea 00 12 restore %o0, %l2, %o0 <== NOT EXECUTED } if ( !p ) 201240c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012410: 02 80 00 0c be 2012440 <== NOT EXECUTED 2012414: b0 10 20 00 clr %i0 <== 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 ]; 2012418: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 201241c: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 2012420: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012424: 02 80 00 07 be 2012440 <== NOT EXECUTED 2012428: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 201242c: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 2012430: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 2012434: 81 c7 e0 08 ret <== NOT EXECUTED 2012438: 91 ee 00 12 restore %i0, %l2, %o0 <== NOT EXECUTED 201243c: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 2012440: 81 c7 e0 08 ret 2012444: 81 e8 00 00 restore =============================================================================== 02012e28 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 2012e28: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2012e2c: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 2012e30: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 2012e34: 12 80 00 0a bne 2012e5c <== ALWAYS TAKEN 2012e38: a6 10 00 1a mov %i2, %l3 2012e3c: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012e40: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012e44: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012e48: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012e4c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 2012e50: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 2012e54: 10 80 00 0e b 2012e8c <== NOT EXECUTED 2012e58: 92 10 22 4c mov 0x24c, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 2012e5c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2012e60: 84 00 7f fb add %g1, -5, %g2 2012e64: 80 a0 a0 01 cmp %g2, 1 2012e68: 08 80 00 0b bleu 2012e94 <== ALWAYS TAKEN 2012e6c: 80 a6 e0 00 cmp %i3, 0 2012e70: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012e74: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012e78: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012e7c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012e80: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 2012e84: 96 12 e2 b0 or %o3, 0x2b0, %o3 <== NOT EXECUTED 2012e88: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED 2012e8c: 7f ff f3 8c call 200fcbc <__assert_func> <== NOT EXECUTED 2012e90: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 2012e94: 32 80 00 0a bne,a 2012ebc <== ALWAYS TAKEN 2012e98: 80 a7 20 00 cmp %i4, 0 2012e9c: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012ea0: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012ea4: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012ea8: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012eac: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 2012eb0: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 2012eb4: 10 bf ff f6 b 2012e8c <== NOT EXECUTED 2012eb8: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 2012ebc: 12 80 00 08 bne 2012edc <== ALWAYS TAKEN 2012ec0: 80 a0 60 06 cmp %g1, 6 rtems_set_errno_and_return_minus_one( EINVAL ); 2012ec4: 40 00 05 f2 call 201468c <__errno> <== NOT EXECUTED 2012ec8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012ecc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2012ed0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012ed4: 81 c7 e0 08 ret <== NOT EXECUTED 2012ed8: 81 e8 00 00 restore <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 2012edc: 32 80 00 1c bne,a 2012f4c <== ALWAYS TAKEN 2012ee0: c6 04 20 50 ld [ %l0 + 0x50 ], %g3 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 2012ee4: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 2012ee8: 82 10 20 00 clr %g1 <== NOT EXECUTED 2012eec: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 2012ef0: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 2012ef4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2012ef8: 14 80 00 09 bg 2012f1c <== NOT EXECUTED 2012efc: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED 2012f00: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2012f04: 12 80 00 04 bne 2012f14 <== NOT EXECUTED 2012f08: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 2012f0c: 38 80 00 05 bgu,a 2012f20 <== NOT EXECUTED 2012f10: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED 2012f14: 10 80 00 03 b 2012f20 <== NOT EXECUTED 2012f18: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 2012f1c: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 2012f20: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 2012f24: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 2012f28: 40 00 08 15 call 2014f7c <== NOT EXECUTED 2012f2c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 2012f30: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 2012f34: 7f ff c3 8c call 2003d64 <== NOT EXECUTED 2012f38: 92 10 20 00 clr %o1 <== NOT EXECUTED 2012f3c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 2012f40: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED return my_length; 2012f44: 81 c7 e0 08 ret <== NOT EXECUTED 2012f48: 81 e8 00 00 restore <== 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 ) 2012f4c: 88 10 20 00 clr %g4 /* * 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; 2012f50: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 2012f54: 80 a1 00 03 cmp %g4, %g3 2012f58: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 2012f5c: 14 80 00 08 bg 2012f7c <== NEVER TAKEN 2012f60: 9a 07 00 1a add %i4, %i2, %o5 2012f64: 80 a1 00 03 cmp %g4, %g3 2012f68: 32 80 00 07 bne,a 2012f84 <== NEVER TAKEN 2012f6c: 03 00 80 86 sethi %hi(0x2021800), %g1 <== NOT EXECUTED 2012f70: 80 a3 40 02 cmp %o5, %g2 2012f74: 28 80 00 04 bleu,a 2012f84 2012f78: 03 00 80 86 sethi %hi(0x2021800), %g1 my_length = the_jnode->info.file.size - start; 2012f7c: b8 20 80 01 sub %g2, %g1, %i4 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2012f80: 03 00 80 86 sethi %hi(0x2021800), %g1 2012f84: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 ! 2021834 2012f88: 90 10 00 12 mov %l2, %o0 2012f8c: ab 3c 60 1f sra %l1, 0x1f, %l5 2012f90: 96 10 00 11 mov %l1, %o3 2012f94: 94 10 00 15 mov %l5, %o2 2012f98: 40 00 2d 07 call 201e3b4 <__moddi3> 2012f9c: 92 10 00 13 mov %l3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012fa0: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2012fa4: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012fa8: 94 10 00 15 mov %l5, %o2 2012fac: 92 10 00 13 mov %l3, %o1 2012fb0: 40 00 2c 1a call 201e018 <__divdi3> 2012fb4: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 2012fb8: 80 a5 20 00 cmp %l4, 0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012fbc: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 2012fc0: aa 10 00 1b mov %i3, %l5 2012fc4: 02 80 00 1c be 2013034 2012fc8: b0 10 20 00 clr %i0 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 ); 2012fcc: 90 10 00 10 mov %l0, %o0 2012fd0: 7f ff fc 6f call 201218c 2012fd4: 94 10 20 00 clr %o2 assert( block_ptr ); 2012fd8: 80 a2 20 00 cmp %o0, 0 2012fdc: 32 80 00 0a bne,a 2013004 <== ALWAYS TAKEN 2012fe0: a2 24 40 14 sub %l1, %l4, %l1 2012fe4: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012fe8: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012fec: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012ff0: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012ff4: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 2012ff8: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 2012ffc: 10 bf ff a4 b 2012e8c <== NOT EXECUTED 2013000: 92 10 22 96 mov 0x296, %o1 <== 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; 2013004: 80 a7 00 11 cmp %i4, %l1 2013008: 08 80 00 03 bleu 2013014 201300c: 94 10 00 1c mov %i4, %o2 2013010: 94 10 00 11 mov %l1, %o2 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 ); 2013014: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 2013018: aa 06 c0 0a add %i3, %o2, %l5 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 ); 201301c: 92 02 40 14 add %o1, %l4, %o1 dest += to_copy; block++; 2013020: a4 04 a0 01 inc %l2 my_length -= to_copy; 2013024: b8 27 00 0a sub %i4, %o2, %i4 2013028: b0 10 00 0a mov %o2, %i0 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 ); 201302c: 40 00 07 d4 call 2014f7c 2013030: 90 10 00 1b mov %i3, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2013034: 03 00 80 86 sethi %hi(0x2021800), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 2013038: a8 10 60 34 or %g1, 0x34, %l4 ! 2021834 201303c: 10 80 00 17 b 2013098 2013040: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2013044: 92 10 00 12 mov %l2, %o1 2013048: 7f ff fc 51 call 201218c 201304c: 94 10 20 00 clr %o2 assert( block_ptr ); 2013050: 80 a2 20 00 cmp %o0, 0 2013054: 32 80 00 0a bne,a 201307c <== ALWAYS TAKEN 2013058: d2 02 00 00 ld [ %o0 ], %o1 201305c: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2013060: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2013064: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2013068: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 201306c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 2013070: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 2013074: 10 bf ff 86 b 2012e8c <== NOT EXECUTED 2013078: 92 10 22 a7 mov 0x2a7, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 201307c: a4 04 a0 01 inc %l2 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 ); 2013080: 90 10 00 15 mov %l5, %o0 dest += to_copy; block++; my_length -= to_copy; 2013084: b8 27 00 11 sub %i4, %l1, %i4 copied += to_copy; 2013088: b0 06 00 11 add %i0, %l1, %i0 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 ); dest += to_copy; 201308c: aa 05 40 11 add %l5, %l1, %l5 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 ); 2013090: 40 00 07 bb call 2014f7c 2013094: 94 10 00 11 mov %l1, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 2013098: c2 05 00 00 ld [ %l4 ], %g1 201309c: 80 a7 00 01 cmp %i4, %g1 20130a0: 1a bf ff e9 bcc 2013044 20130a4: 90 10 00 10 mov %l0, %o0 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 20130a8: 80 a7 20 00 cmp %i4, 0 20130ac: 02 80 00 16 be 2013104 20130b0: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 20130b4: 92 10 00 12 mov %l2, %o1 20130b8: 90 10 00 10 mov %l0, %o0 20130bc: 7f ff fc 34 call 201218c 20130c0: 94 10 20 00 clr %o2 assert( block_ptr ); 20130c4: 80 a2 20 00 cmp %o0, 0 20130c8: 32 80 00 0a bne,a 20130f0 <== ALWAYS TAKEN 20130cc: d2 02 00 00 ld [ %o0 ], %o1 20130d0: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 20130d4: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 20130d8: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 20130dc: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 20130e0: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 20130e4: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 20130e8: 10 bf ff 69 b 2012e8c <== NOT EXECUTED 20130ec: 92 10 22 b9 mov 0x2b9, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 20130f0: b0 07 00 18 add %i4, %i0, %i0 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 ); 20130f4: 90 10 00 15 mov %l5, %o0 20130f8: 40 00 07 a1 call 2014f7c 20130fc: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 2013100: 90 07 bf f8 add %fp, -8, %o0 2013104: 7f ff c3 18 call 2003d64 2013108: 92 10 20 00 clr %o1 201310c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2013110: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 2013114: 81 c7 e0 08 ret 2013118: 81 e8 00 00 restore =============================================================================== 02012510 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 2012510: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2012514: 80 a6 20 00 cmp %i0, 0 2012518: 32 80 00 0a bne,a 2012540 <== ALWAYS TAKEN 201251c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 2012520: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012524: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012528: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 201252c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012530: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 2012534: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 2012538: 10 80 00 0c b 2012568 <== NOT EXECUTED 201253c: 92 10 21 ee mov 0x1ee, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 2012540: 80 a0 60 05 cmp %g1, 5 2012544: 02 80 00 0b be 2012570 <== ALWAYS TAKEN 2012548: 03 00 80 86 sethi %hi(0x2021800), %g1 201254c: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012550: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012554: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012558: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 201255c: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 2012560: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 2012564: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 2012568: 7f ff f5 d5 call 200fcbc <__assert_func> <== NOT EXECUTED 201256c: 01 00 00 00 nop <== 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; 2012570: e0 00 60 34 ld [ %g1 + 0x34 ], %l0 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 2012574: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 2012578: 80 a0 60 00 cmp %g1, 0 201257c: 02 80 00 05 be 2012590 2012580: a1 34 20 02 srl %l0, 2, %l0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 2012584: 90 06 20 58 add %i0, 0x58, %o0 2012588: 7f ff ff b0 call 2012448 201258c: 92 10 00 10 mov %l0, %o1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 2012590: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 2012594: 80 a0 60 00 cmp %g1, 0 2012598: 22 80 00 17 be,a 20125f4 <== ALWAYS TAKEN 201259c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; iinfo.file; 20125a4: a2 10 20 00 clr %l1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 20125ac: a4 14 a0 34 or %l2, 0x34, %l2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 20125b0: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 20125b4: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 20125b8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20125bc: 02 80 00 04 be 20125cc <== NOT EXECUTED 20125c0: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 20125c4: 7f ff ff a1 call 2012448 <== NOT EXECUTED 20125c8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 20125e0: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== 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 ); 20125e4: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 20125e8: 7f ff ff 98 call 2012448 <== NOT EXECUTED 20125ec: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 20125f0: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED 20125f4: 80 a0 60 00 cmp %g1, 0 20125f8: 02 80 00 25 be 201268c <== ALWAYS TAKEN 20125fc: 29 00 80 86 sethi %hi(0x2021800), %l4 2012600: a2 10 20 00 clr %l1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 2012608: a8 15 20 34 or %l4, 0x34, %l4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 201260c: ab 2c 60 02 sll %l1, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 2012610: e4 00 40 15 ld [ %g1 + %l5 ], %l2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 2012614: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2012618: 02 80 00 1b be 2012684 <== NOT EXECUTED 201261c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 2012620: 10 80 00 09 b 2012644 <== NOT EXECUTED 2012624: a6 10 20 00 clr %l3 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 2012630: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 2012634: 7f ff ff 85 call 2012448 <== NOT EXECUTED 2012638: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 2012654: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 2012658: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 2012668: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 201267c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 2012680: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 2012684: 7f ff ff 71 call 2012448 <== NOT EXECUTED 2012688: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 201268c: 81 c7 e0 08 ret 2012690: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020124bc : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 20124bc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 20124c0: 94 10 20 00 clr %o2 <== NOT EXECUTED 20124c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20124c8: 7f ff ff 31 call 201218c <== NOT EXECUTED 20124cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 20124d0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 20124d4: 32 80 00 0a bne,a 20124fc <== NOT EXECUTED 20124d8: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED 20124dc: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 20124e0: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 20124e4: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 20124e8: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 20124ec: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED 20124f0: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 20124f4: 7f ff f5 f2 call 200fcbc <__assert_func> <== NOT EXECUTED 20124f8: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED *block_ptr = 0; memfile_free_block( ptr ); } return 1; } 20124fc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; memfile_free_block( ptr ); 2012500: 7f ff ff 0d call 2012134 <== NOT EXECUTED 2012504: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } return 1; } 2012508: 81 c7 e0 08 ret <== NOT EXECUTED 201250c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012ac4 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 2012ac4: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2012ac8: a0 96 20 00 orcc %i0, 0, %l0 2012acc: 32 80 00 0a bne,a 2012af4 <== ALWAYS TAKEN 2012ad0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2012ad4: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012ad8: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012adc: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012ae0: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012ae4: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 2012ae8: 96 12 e2 20 or %o3, 0x220, %o3 <== NOT EXECUTED 2012aec: 10 80 00 8c b 2012d1c <== NOT EXECUTED 2012af0: 92 10 22 e3 mov 0x2e3, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 2012af4: 80 a0 60 05 cmp %g1, 5 2012af8: 02 80 00 0a be 2012b20 <== ALWAYS TAKEN 2012afc: 80 a6 e0 00 cmp %i3, 0 2012b00: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012b04: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012b08: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012b0c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012b10: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 2012b14: 96 12 e2 30 or %o3, 0x230, %o3 <== NOT EXECUTED 2012b18: 10 80 00 81 b 2012d1c <== NOT EXECUTED 2012b1c: 92 10 22 e7 mov 0x2e7, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 2012b20: 12 80 00 0a bne 2012b48 <== ALWAYS TAKEN 2012b24: 80 a7 20 00 cmp %i4, 0 2012b28: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012b2c: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012b30: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012b34: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012b38: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 2012b3c: 96 12 e2 78 or %o3, 0x278, %o3 <== NOT EXECUTED 2012b40: 10 80 00 77 b 2012d1c <== NOT EXECUTED 2012b44: 92 10 22 ef mov 0x2ef, %o1 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 2012b48: 32 80 00 06 bne,a 2012b60 <== ALWAYS TAKEN 2012b4c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 2012b50: 40 00 06 cf call 201468c <__errno> <== NOT EXECUTED 2012b54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012b58: 10 80 00 15 b 2012bac <== NOT EXECUTED 2012b5c: 82 10 20 16 mov 0x16, %g1 <== 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 ) { 2012b60: 80 a0 60 00 cmp %g1, 0 2012b64: 06 80 00 09 bl 2012b88 <== NEVER TAKEN 2012b68: 94 07 00 1a add %i4, %i2, %o2 2012b6c: 80 a0 60 00 cmp %g1, 0 2012b70: 12 80 00 12 bne 2012bb8 <== NEVER TAKEN 2012b74: 03 00 80 86 sethi %hi(0x2021800), %g1 2012b78: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 2012b7c: 80 a0 40 0a cmp %g1, %o2 2012b80: 1a 80 00 0e bcc 2012bb8 <== NEVER TAKEN 2012b84: 03 00 80 86 sethi %hi(0x2021800), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 2012b88: 90 10 00 10 mov %l0, %o0 2012b8c: 7f ff ff 24 call 201281c 2012b90: 92 10 20 00 clr %o1 if ( status ) 2012b94: 80 a2 20 00 cmp %o0, 0 2012b98: 02 80 00 08 be 2012bb8 <== ALWAYS TAKEN 2012b9c: 03 00 80 86 sethi %hi(0x2021800), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 2012ba0: 40 00 06 bb call 201468c <__errno> <== NOT EXECUTED 2012ba4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012ba8: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2012bac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012bb0: 81 c7 e0 08 ret <== NOT EXECUTED 2012bb4: 81 e8 00 00 restore <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2012bb8: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 2012bbc: 92 10 00 1a mov %i2, %o1 2012bc0: a7 3c 60 1f sra %l1, 0x1f, %l3 2012bc4: 96 10 00 11 mov %l1, %o3 2012bc8: 94 10 00 13 mov %l3, %o2 2012bcc: 40 00 2d fa call 201e3b4 <__moddi3> 2012bd0: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012bd4: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2012bd8: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012bdc: 90 10 00 19 mov %i1, %o0 2012be0: 92 10 00 1a mov %i2, %o1 2012be4: 40 00 2d 0d call 201e018 <__divdi3> 2012be8: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 2012bec: b4 10 00 1b mov %i3, %i2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2012bf0: a6 10 00 09 mov %o1, %l3 if ( start_offset ) { 2012bf4: 80 a4 a0 00 cmp %l2, 0 2012bf8: 02 80 00 1b be 2012c64 2012bfc: b0 10 20 00 clr %i0 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 ); 2012c00: 90 10 00 10 mov %l0, %o0 2012c04: 7f ff fd 62 call 201218c 2012c08: 94 10 20 00 clr %o2 assert( block_ptr ); 2012c0c: 80 a2 20 00 cmp %o0, 0 2012c10: 32 80 00 0a bne,a 2012c38 <== ALWAYS TAKEN 2012c14: 94 24 40 12 sub %l1, %l2, %o2 2012c18: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012c1c: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012c20: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012c24: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012c28: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 2012c2c: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 2012c30: 10 80 00 3b b 2012d1c <== NOT EXECUTED 2012c34: 92 10 23 1c mov 0x31c, %o1 <== 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; 2012c38: 80 a2 80 1c cmp %o2, %i4 2012c3c: 38 80 00 02 bgu,a 2012c44 2012c40: 94 10 00 1c mov %i4, %o2 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 ); 2012c44: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 2012c48: b4 06 c0 0a add %i3, %o2, %i2 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 ); 2012c4c: 90 02 00 12 add %o0, %l2, %o0 src += to_copy; block++; 2012c50: a6 04 e0 01 inc %l3 my_length -= to_copy; 2012c54: b8 27 00 0a sub %i4, %o2, %i4 copied += to_copy; 2012c58: b0 10 00 0a mov %o2, %i0 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 ); 2012c5c: 40 00 08 c8 call 2014f7c 2012c60: 92 10 00 1b mov %i3, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2012c64: 03 00 80 86 sethi %hi(0x2021800), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 2012c68: a4 10 60 34 or %g1, 0x34, %l2 ! 2021834 2012c6c: 10 80 00 17 b 2012cc8 2012c70: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2012c74: 92 10 00 13 mov %l3, %o1 2012c78: 7f ff fd 45 call 201218c 2012c7c: 94 10 20 00 clr %o2 assert( block_ptr ); 2012c80: 80 a2 20 00 cmp %o0, 0 2012c84: 32 80 00 0a bne,a 2012cac <== ALWAYS TAKEN 2012c88: d0 02 00 00 ld [ %o0 ], %o0 2012c8c: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012c90: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012c94: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012c98: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012c9c: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 2012ca0: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 2012ca4: 10 80 00 1e b 2012d1c <== NOT EXECUTED 2012ca8: 92 10 23 30 mov 0x330, %o1 <== 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 ); 2012cac: 92 10 00 1a mov %i2, %o1 src += to_copy; block++; 2012cb0: a6 04 e0 01 inc %l3 my_length -= to_copy; 2012cb4: b8 27 00 11 sub %i4, %l1, %i4 * * 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( 2012cb8: b0 06 00 11 add %i0, %l1, %i0 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 ); src += to_copy; 2012cbc: b4 06 80 11 add %i2, %l1, %i2 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 ); 2012cc0: 40 00 08 af call 2014f7c 2012cc4: 94 10 00 11 mov %l1, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 2012cc8: c2 04 80 00 ld [ %l2 ], %g1 2012ccc: 80 a7 00 01 cmp %i4, %g1 2012cd0: 1a bf ff e9 bcc 2012c74 2012cd4: 90 10 00 10 mov %l0, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 2012cd8: 80 a7 20 00 cmp %i4, 0 2012cdc: 02 80 00 17 be 2012d38 2012ce0: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2012ce4: 92 10 00 13 mov %l3, %o1 2012ce8: 90 10 00 10 mov %l0, %o0 2012cec: 7f ff fd 28 call 201218c 2012cf0: 94 10 20 00 clr %o2 assert( block_ptr ); 2012cf4: 80 a2 20 00 cmp %o0, 0 2012cf8: 32 80 00 0b bne,a 2012d24 <== ALWAYS TAKEN 2012cfc: d0 02 00 00 ld [ %o0 ], %o0 2012d00: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 2012d04: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012d08: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012d0c: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012d10: 94 12 a3 28 or %o2, 0x328, %o2 <== NOT EXECUTED 2012d14: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 2012d18: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED 2012d1c: 7f ff f3 e8 call 200fcbc <__assert_func> <== NOT EXECUTED 2012d20: 01 00 00 00 nop <== NOT EXECUTED #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; 2012d24: b0 06 00 1c add %i0, %i4, %i0 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 ); 2012d28: 92 10 00 1a mov %i2, %o1 2012d2c: 40 00 08 94 call 2014f7c 2012d30: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 2012d34: 90 07 bf f8 add %fp, -8, %o0 2012d38: 7f ff c4 0b call 2003d64 2012d3c: 92 10 20 00 clr %o1 2012d40: c2 07 bf f8 ld [ %fp + -8 ], %g1 2012d44: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 2012d48: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return copied; } 2012d4c: 81 c7 e0 08 ret 2012d50: 81 e8 00 00 restore =============================================================================== 0200a548 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200a548: 9d e3 bf 58 save %sp, -168, %sp 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 ); 200a54c: 40 00 16 09 call 200fd70 200a550: 90 10 00 18 mov %i0, %o0 200a554: 96 07 bf fc add %fp, -4, %o3 200a558: 92 10 00 08 mov %o0, %o1 200a55c: 94 07 bf b8 add %fp, -72, %o2 200a560: 7f ff ff 8a call 200a388 200a564: 90 10 00 18 mov %i0, %o0 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 200a568: 03 00 00 3c sethi %hi(0xf000), %g1 200a56c: 05 00 00 10 sethi %hi(0x4000), %g2 200a570: 82 0e 40 01 and %i1, %g1, %g1 const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200a574: 96 10 00 19 mov %i1, %o3 IMFS_get_token( token, strlen( token ), new_name, &result ); /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 200a578: 80 a0 40 02 cmp %g1, %g2 200a57c: 02 80 00 1a be 200a5e4 200a580: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 200a584: 05 00 00 20 sethi %hi(0x8000), %g2 200a588: 80 a0 40 02 cmp %g1, %g2 200a58c: 02 80 00 17 be 200a5e8 200a590: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 200a594: 05 00 00 08 sethi %hi(0x2000), %g2 200a598: 80 a0 40 02 cmp %g1, %g2 200a59c: 22 80 00 07 be,a 200a5b8 200a5a0: f4 3f bf e0 std %i2, [ %fp + -32 ] 200a5a4: 05 00 00 18 sethi %hi(0x6000), %g2 200a5a8: 80 a0 40 02 cmp %g1, %g2 200a5ac: 12 80 00 05 bne 200a5c0 200a5b0: 05 00 00 04 sethi %hi(0x1000), %g2 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 200a5b4: f4 3f bf e0 std %i2, [ %fp + -32 ] 200a5b8: 10 80 00 0c b 200a5e8 200a5bc: 92 10 20 02 mov 2, %o1 } else if (S_ISFIFO(mode)) 200a5c0: 80 a0 40 02 cmp %g1, %g2 200a5c4: 02 80 00 09 be 200a5e8 <== ALWAYS TAKEN 200a5c8: 92 10 20 07 mov 7, %o1 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 200a5cc: 40 00 12 31 call 200ee90 <__errno> <== NOT EXECUTED 200a5d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a5d4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200a5d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a5dc: 81 c7 e0 08 ret <== NOT EXECUTED 200a5e0: 81 e8 00 00 restore <== NOT EXECUTED 200a5e4: 92 10 20 01 mov 1, %o1 * 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( 200a5e8: 94 07 bf b8 add %fp, -72, %o2 200a5ec: 98 07 bf e0 add %fp, -32, %o4 200a5f0: 40 00 0b eb call 200d59c 200a5f4: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 200a5f8: 80 a2 20 00 cmp %o0, 0 200a5fc: 12 80 00 06 bne 200a614 <== ALWAYS TAKEN 200a600: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 200a604: 40 00 12 23 call 200ee90 <__errno> <== NOT EXECUTED 200a608: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 200a60c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 200a610: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 200a614: 81 c7 e0 08 ret 200a618: 81 e8 00 00 restore =============================================================================== 02003508 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003508: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 200350c: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2003510: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2003514: 80 a0 a0 01 cmp %g2, 1 2003518: 22 80 00 08 be,a 2003538 <== ALWAYS TAKEN 200351c: f0 20 60 5c st %i0, [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 2003520: 40 00 44 5b call 201468c <__errno> <== NOT EXECUTED 2003524: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003528: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 200352c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003530: 81 c7 e0 08 ret <== NOT EXECUTED 2003534: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 2003538: 81 c7 e0 08 ret 200353c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020048d0 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 20048d0: 9d e3 bf a0 save %sp, -96, %sp assert( the_jnode ); 20048d4: 80 a6 20 00 cmp %i0, 0 20048d8: 12 80 00 0a bne 2004900 <== ALWAYS TAKEN 20048dc: 21 00 80 9b sethi %hi(0x2026c00), %l0 20048e0: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED 20048e4: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED 20048e8: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED 20048ec: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED 20048f0: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 20048f4: 96 12 e0 78 or %o3, 0x78, %o3 <== NOT EXECUTED 20048f8: 10 80 00 3b b 20049e4 <== NOT EXECUTED 20048fc: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 2004900: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 2004904: 90 06 20 0c add %i0, 0xc, %o0 2004908: 40 00 41 2e call 2014dc0 200490c: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 2004910: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 2004914: 82 02 bf ff add %o2, -1, %g1 2004918: 80 a0 60 06 cmp %g1, 6 200491c: 38 80 00 42 bgu,a 2004a24 <== NEVER TAKEN 2004920: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 2004924: 83 28 60 02 sll %g1, 2, %g1 2004928: 05 00 80 12 sethi %hi(0x2004800), %g2 200492c: 84 10 a0 78 or %g2, 0x78, %g2 ! 2004878 2004930: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2004934: 81 c0 40 00 jmp %g1 2004938: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 200493c: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 2004940: 90 10 20 2f mov 0x2f, %o0 2004944: 40 00 40 db call 2014cb0 2004948: d2 00 60 08 ld [ %g1 + 8 ], %o1 break; 200494c: 10 80 00 3c b 2004a3c 2004950: 31 00 80 93 sethi %hi(0x2024c00), %i0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2004954: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 2004958: 13 00 80 93 sethi %hi(0x2024c00), %o1 200495c: d6 06 20 54 ld [ %i0 + 0x54 ], %o3 2004960: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004964: d4 06 20 50 ld [ %i0 + 0x50 ], %o2 2004968: 10 80 00 08 b 2004988 200496c: 92 12 60 88 or %o1, 0x88, %o1 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2004970: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 2004974: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 <== NOT EXECUTED 2004978: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 200497c: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 <== NOT EXECUTED 2004980: 13 00 80 93 sethi %hi(0x2024c00), %o1 <== NOT EXECUTED 2004984: 92 12 60 a0 or %o1, 0xa0, %o1 ! 2024ca0 <== NOT EXECUTED 2004988: 40 00 40 b0 call 2014c48 200498c: 31 00 80 93 sethi %hi(0x2024c00), %i0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 2004990: 30 80 00 2b b,a 2004a3c the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2004994: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 2004998: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 200499c: d0 00 60 08 ld [ %g1 + 8 ], %o0 20049a0: 13 00 80 93 sethi %hi(0x2024c00), %o1 20049a4: 40 00 40 a9 call 2014c48 20049a8: 92 12 60 b0 or %o1, 0xb0, %o1 ! 2024cb0 (uint32_t)the_jnode->info.file.size ); #endif break; 20049ac: 10 80 00 24 b 2004a3c 20049b0: 31 00 80 93 sethi %hi(0x2024c00), %i0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 20049b4: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 20049b8: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED 20049bc: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 20049c0: 40 00 41 00 call 2014dc0 <== NOT EXECUTED 20049c4: 90 12 20 c0 or %o0, 0xc0, %o0 <== NOT EXECUTED assert(0); 20049c8: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED 20049cc: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED 20049d0: 15 00 80 93 sethi %hi(0x2024c00), %o2 <== NOT EXECUTED 20049d4: 17 00 80 93 sethi %hi(0x2024c00), %o3 <== NOT EXECUTED 20049d8: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED 20049dc: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 20049e0: 96 12 e0 d8 or %o3, 0xd8, %o3 <== NOT EXECUTED 20049e4: 40 00 02 54 call 2005334 <__assert_func> <== NOT EXECUTED 20049e8: 01 00 00 00 nop <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 20049ec: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 20049f0: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED 20049f4: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 20049f8: 40 00 40 f2 call 2014dc0 <== NOT EXECUTED 20049fc: 90 12 20 c0 or %o0, 0xc0, %o0 <== NOT EXECUTED assert(0); 2004a00: 10 bf ff f3 b 20049cc <== NOT EXECUTED 2004a04: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2004a08: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 2004a0c: 11 00 80 93 sethi %hi(0x2024c00), %o0 <== NOT EXECUTED 2004a10: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 2004a14: 40 00 40 eb call 2014dc0 <== NOT EXECUTED 2004a18: 90 12 20 e0 or %o0, 0xe0, %o0 <== NOT EXECUTED assert(0); 2004a1c: 10 bf ff ec b 20049cc <== NOT EXECUTED 2004a20: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2004a24: 13 00 80 93 sethi %hi(0x2024c00), %o1 <== NOT EXECUTED 2004a28: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 2004a2c: 40 00 40 87 call 2014c48 <== NOT EXECUTED 2004a30: 92 12 60 f8 or %o1, 0xf8, %o1 <== NOT EXECUTED assert(0); 2004a34: 10 bf ff e6 b 20049cc <== NOT EXECUTED 2004a38: 92 10 20 6c mov 0x6c, %o1 <== NOT EXECUTED break; } puts(""); 2004a3c: 40 00 47 d1 call 2016980 2004a40: 91 ee 21 08 restore %i0, 0x108, %o0 =============================================================================== 0200354c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 200354c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 2003550: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 2003554: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2003558: 80 a0 a0 04 cmp %g2, 4 200355c: 02 80 00 0a be 2003584 <== ALWAYS TAKEN 2003560: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 2003564: 40 00 44 4a call 201468c <__errno> <== NOT EXECUTED 2003568: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200356c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2003570: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003574: 81 c7 e0 08 ret <== NOT EXECUTED 2003578: 81 e8 00 00 restore <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 200357c: c4 2e 40 18 stb %g2, [ %i1 + %i0 ] 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++ ) 2003580: b0 06 20 01 inc %i0 2003584: 80 a6 00 1a cmp %i0, %i2 2003588: 1a 80 00 07 bcc 20035a4 200358c: 01 00 00 00 nop 2003590: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 2003594: c6 48 80 18 ldsb [ %g2 + %i0 ], %g3 2003598: 80 a0 e0 00 cmp %g3, 0 200359c: 12 bf ff f8 bne 200357c 20035a0: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; return i; } 20035a4: 81 c7 e0 08 ret 20035a8: 81 e8 00 00 restore =============================================================================== 020035ac : 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 */ ) { 20035ac: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 20035b0: e0 06 40 00 ld [ %i1 ], %l0 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 20035b4: 92 10 00 1b mov %i3, %o1 20035b8: 90 04 20 0c add %l0, 0xc, %o0 20035bc: 40 00 48 08 call 20155dc 20035c0: 94 10 20 20 mov 0x20, %o2 if ( the_jnode->Parent != NULL ) 20035c4: c2 04 20 08 ld [ %l0 + 8 ], %g1 20035c8: 80 a0 60 00 cmp %g1, 0 20035cc: 22 80 00 05 be,a 20035e0 <== NEVER TAKEN 20035d0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 20035d4: 40 00 13 4b call 2008300 <_Chain_Extract> 20035d8: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 20035dc: c2 06 80 00 ld [ %i2 ], %g1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 20035e0: 92 10 00 10 mov %l0, %o1 20035e4: 90 00 60 50 add %g1, 0x50, %o0 20035e8: 40 00 13 3a call 20082d0 <_Chain_Append> 20035ec: c2 24 20 08 st %g1, [ %l0 + 8 ] rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 20035f0: 90 07 bf f8 add %fp, -8, %o0 20035f4: 40 00 01 dc call 2003d64 20035f8: 92 10 20 00 clr %o1 20035fc: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003600: c2 24 20 48 st %g1, [ %l0 + 0x48 ] return 0; } 2003604: 81 c7 e0 08 ret 2003608: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200a628 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200a628: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200a62c: e0 06 40 00 ld [ %i1 ], %l0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 200a630: c2 04 20 08 ld [ %l0 + 8 ], %g1 200a634: 80 a0 60 00 cmp %g1, 0 200a638: 22 80 00 06 be,a 200a650 <== NEVER TAKEN 200a63c: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 200a640: 40 00 05 c8 call 200bd60 <_Chain_Extract> 200a644: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 200a648: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 200a64c: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 200a650: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 200a654: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 200a658: 90 07 bf f8 add %fp, -8, %o0 200a65c: 40 00 01 20 call 200aadc 200a660: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 200a664: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * 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) ) { 200a668: 90 10 00 10 mov %l0, %o0 200a66c: 40 00 01 54 call 200abbc 200a670: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 200a674: 80 a2 20 00 cmp %o0, 0 200a678: 12 80 00 18 bne 200a6d8 <== NEVER TAKEN 200a67c: 01 00 00 00 nop 200a680: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 200a684: 80 a0 60 00 cmp %g1, 0 200a688: 12 80 00 14 bne 200a6d8 <== NEVER TAKEN 200a68c: 03 00 80 6c sethi %hi(0x201b000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 200a690: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 201b310 200a694: c4 06 40 00 ld [ %i1 ], %g2 200a698: c6 00 60 04 ld [ %g1 + 4 ], %g3 200a69c: 80 a0 c0 02 cmp %g3, %g2 200a6a0: 22 80 00 02 be,a 200a6a8 <== NEVER TAKEN 200a6a4: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 200a6a8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 200a6ac: 80 a0 60 04 cmp %g1, 4 200a6b0: 12 80 00 08 bne 200a6d0 200a6b4: 01 00 00 00 nop if ( the_jnode->info.sym_link.name ) 200a6b8: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 200a6bc: 80 a2 20 00 cmp %o0, 0 200a6c0: 02 80 00 04 be 200a6d0 <== NEVER TAKEN 200a6c4: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 200a6c8: 40 00 00 98 call 200a928 200a6cc: 01 00 00 00 nop } free( the_jnode ); 200a6d0: 40 00 00 96 call 200a928 200a6d4: 90 10 00 10 mov %l0, %o0 } return 0; } 200a6d8: 81 c7 e0 08 ret 200a6dc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200a6f8 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200a6f8: 9d e3 bf a0 save %sp, -96, %sp IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 200a6fc: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 200a700: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200a704: 84 00 bf fe add %g2, -2, %g2 200a708: 80 a0 a0 05 cmp %g2, 5 200a70c: 18 80 00 10 bgu 200a74c <== NEVER TAKEN 200a710: 85 28 a0 02 sll %g2, 2, %g2 200a714: 07 00 80 29 sethi %hi(0x200a400), %g3 200a718: 86 10 e2 e0 or %g3, 0x2e0, %g3 ! 200a6e0 200a71c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200a720: 81 c0 80 00 jmp %g2 200a724: 01 00 00 00 nop rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200a728: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; 200a72c: 10 80 00 0e b 200a764 200a730: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 200a734: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 200a738: 10 80 00 0b b 200a764 200a73c: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 200a740: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED break; 200a744: 10 80 00 08 b 200a764 <== NOT EXECUTED 200a748: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 200a74c: 40 00 11 d1 call 200ee90 <__errno> <== NOT EXECUTED 200a750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a754: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200a758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a75c: 81 c7 e0 08 ret <== NOT EXECUTED 200a760: 81 e8 00 00 restore <== NOT EXECUTED */ 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; 200a764: c6 00 60 30 ld [ %g1 + 0x30 ], %g3 buf->st_nlink = the_jnode->st_nlink; 200a768: c8 10 60 34 lduh [ %g1 + 0x34 ], %g4 */ 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; 200a76c: c6 26 60 0c st %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 200a770: c6 00 60 38 ld [ %g1 + 0x38 ], %g3 * 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 ); 200a774: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 200a778: c6 26 60 08 st %g3, [ %i1 + 8 ] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 200a77c: c6 00 60 40 ld [ %g1 + 0x40 ], %g3 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 200a780: c8 36 60 10 sth %g4, [ %i1 + 0x10 ] 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; 200a784: c6 26 60 28 st %g3, [ %i1 + 0x28 ] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 200a788: c8 10 60 3c lduh [ %g1 + 0x3c ], %g4 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 200a78c: c6 00 60 44 ld [ %g1 + 0x44 ], %g3 * 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 ); 200a790: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 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; 200a794: c8 36 60 12 sth %g4, [ %i1 + 0x12 ] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 200a798: c6 26 60 30 st %g3, [ %i1 + 0x30 ] * 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 ); 200a79c: c4 00 80 00 ld [ %g2 ], %g2 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; 200a7a0: c6 00 60 48 ld [ %g1 + 0x48 ], %g3 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; 200a7a4: c2 10 60 3e lduh [ %g1 + 0x3e ], %g1 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 200a7a8: c6 26 60 38 st %g3, [ %i1 + 0x38 ] 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; 200a7ac: c2 36 60 14 sth %g1, [ %i1 + 0x14 ] /* * 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 = 200a7b0: c4 26 60 04 st %g2, [ %i1 + 4 ] 200a7b4: 03 00 00 3f sethi %hi(0xfc00), %g1 200a7b8: 82 10 63 fe or %g1, 0x3fe, %g1 ! fffe 200a7bc: c2 26 40 00 st %g1, [ %i1 ] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 200a7c0: 81 c7 e0 08 ret 200a7c4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200360c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 200360c: 9d e3 bf 58 save %sp, -168, %sp int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 2003610: 40 00 47 be call 2015508 2003614: 90 10 00 1a mov %i2, %o0 2003618: 96 07 bf fc add %fp, -4, %o3 200361c: 92 10 00 08 mov %o0, %o1 2003620: a0 07 bf b8 add %fp, -72, %l0 2003624: 90 10 00 1a mov %i2, %o0 2003628: 40 00 31 01 call 200fa2c 200362c: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 2003630: 40 00 47 a1 call 20154b4 2003634: 90 10 00 19 mov %i1, %o0 2003638: d0 27 bf e0 st %o0, [ %fp + -32 ] if (info.sym_link.name == NULL) { 200363c: 80 a2 20 00 cmp %o0, 0 2003640: 12 80 00 08 bne 2003660 <== ALWAYS TAKEN 2003644: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one(ENOMEM); 2003648: 40 00 44 11 call 201468c <__errno> <== NOT EXECUTED 200364c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003650: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2003654: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003658: 81 c7 e0 08 ret 200365c: 81 e8 00 00 restore * 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( 2003660: 94 10 00 10 mov %l0, %o2 2003664: 92 10 20 04 mov 4, %o1 2003668: 17 00 00 28 sethi %hi(0xa000), %o3 200366c: 98 07 bf e0 add %fp, -32, %o4 2003670: 96 12 e1 ff or %o3, 0x1ff, %o3 2003674: 40 00 2d a3 call 200ed00 2003678: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 200367c: 80 a2 20 00 cmp %o0, 0 2003680: 12 bf ff f6 bne 2003658 <== ALWAYS TAKEN 2003684: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 2003688: 40 00 01 8d call 2003cbc <== NOT EXECUTED 200368c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2003690: 40 00 43 ff call 201468c <__errno> <== NOT EXECUTED 2003694: 01 00 00 00 nop <== NOT EXECUTED 2003698: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 200369c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 20036a0: 81 c7 e0 08 ret <== NOT EXECUTED 20036a4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020036a8 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 20036a8: 9d e3 bf 80 save %sp, -128, %sp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 20036ac: e0 06 40 00 ld [ %i1 ], %l0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 20036b0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 20036b4: 80 a0 60 03 cmp %g1, 3 20036b8: 12 80 00 29 bne 200375c 20036bc: a4 10 00 18 mov %i0, %l2 if ( !node->info.hard_link.link_node ) 20036c0: e6 04 20 50 ld [ %l0 + 0x50 ], %l3 20036c4: 80 a4 e0 00 cmp %l3, 0 20036c8: 12 80 00 08 bne 20036e8 <== ALWAYS TAKEN 20036cc: a2 07 bf e4 add %fp, -28, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 20036d0: 40 00 43 ef call 201468c <__errno> <== NOT EXECUTED 20036d4: 01 00 00 00 nop <== NOT EXECUTED 20036d8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20036dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20036e0: 10 80 00 24 b 2003770 <== NOT EXECUTED 20036e4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 20036e8: 92 10 00 19 mov %i1, %o1 20036ec: 94 10 20 14 mov 0x14, %o2 20036f0: 40 00 46 23 call 2014f7c 20036f4: 90 10 00 11 mov %l1, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20036f8: 90 10 00 11 mov %l1, %o0 20036fc: 40 00 2d cc call 200ee2c 2003700: e6 27 bf e4 st %l3, [ %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) 2003704: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 2003708: c6 10 60 34 lduh [ %g1 + 0x34 ], %g3 200370c: 80 a0 e0 01 cmp %g3, 1 2003710: 12 80 00 0c bne 2003740 2003714: 84 00 ff ff add %g3, -1, %g2 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 2003718: c2 07 bf ec ld [ %fp + -20 ], %g1 200371c: 92 10 00 11 mov %l1, %o1 2003720: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2003724: 9f c0 40 00 call %g1 2003728: 90 10 00 18 mov %i0, %o0 if ( result != 0 ) 200372c: 80 a2 20 00 cmp %o0, 0 2003730: 02 80 00 0b be 200375c 2003734: 90 10 3f ff mov -1, %o0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 2003738: 81 c7 e0 08 ret 200373c: 91 e8 00 08 restore %g0, %o0, %o0 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 2003740: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 2003744: c4 30 60 34 sth %g2, [ %g1 + 0x34 ] IMFS_update_ctime( node->info.hard_link.link_node ); 2003748: 40 00 01 87 call 2003d64 200374c: 92 10 20 00 clr %o1 2003750: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 2003754: c4 07 bf f8 ld [ %fp + -8 ], %g2 2003758: c4 20 60 48 st %g2, [ %g1 + 0x48 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 200375c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2003760: 90 10 00 12 mov %l2, %o0 2003764: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2003768: 9f c0 40 00 call %g1 200376c: 92 10 00 19 mov %i1, %o1 return result; } 2003770: b0 10 00 08 mov %o0, %i0 2003774: 81 c7 e0 08 ret 2003778: 81 e8 00 00 restore =============================================================================== 0200377c : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 200377c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2003780: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2003784: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2003788: 80 a0 a0 01 cmp %g2, 1 200378c: 22 80 00 06 be,a 20037a4 <== ALWAYS TAKEN 2003790: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2003794: 40 00 43 be call 201468c <__errno> <== NOT EXECUTED 2003798: 01 00 00 00 nop <== NOT EXECUTED 200379c: 10 80 00 08 b 20037bc <== NOT EXECUTED 20037a0: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 20037a4: 80 a0 a0 00 cmp %g2, 0 20037a8: 32 80 00 08 bne,a 20037c8 <== ALWAYS TAKEN 20037ac: c0 20 60 5c clr [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 20037b0: 40 00 43 b7 call 201468c <__errno> <== NOT EXECUTED 20037b4: 01 00 00 00 nop <== NOT EXECUTED 20037b8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20037bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20037c0: 81 c7 e0 08 ret <== NOT EXECUTED 20037c4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 20037c8: 81 c7 e0 08 ret 20037cc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200270c : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 200270c: 9d e3 bf a0 save %sp, -96, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2002710: 03 00 80 6e sethi %hi(0x201b800), %g1 2002714: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201b878 2002718: 80 a0 60 00 cmp %g1, 0 200271c: 02 80 00 05 be 2002730 <== ALWAYS TAKEN 2002720: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 2002724: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 2002728: 9f c0 40 00 call %g1 <== NOT EXECUTED 200272c: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 2002730: 40 00 21 c5 call 200ae44 2002734: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 2002738: 03 00 80 6e sethi %hi(0x201b800), %g1 200273c: c2 00 60 7c ld [ %g1 + 0x7c ], %g1 ! 201b87c 2002740: 80 a0 60 00 cmp %g1, 0 2002744: 02 80 00 08 be 2002764 <== ALWAYS TAKEN 2002748: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 200274c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2002750: b2 06 00 19 add %i0, %i1, %i1 <== 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)( 2002754: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002758: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 200275c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 2002760: b2 26 40 08 sub %i1, %o0, %i1 <== 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 ( 2002764: 03 00 80 6e sethi %hi(0x201b800), %g1 2002768: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 ! 201b875 200276c: 80 a0 60 00 cmp %g1, 0 2002770: 12 80 00 0c bne 20027a0 2002774: 03 00 80 6e sethi %hi(0x201b800), %g1 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 2002778: 03 00 80 6c sethi %hi(0x201b000), %g1 200277c: c2 08 62 30 ldub [ %g1 + 0x230 ], %g1 ! 201b230 2002780: 80 a0 60 00 cmp %g1, 0 2002784: 02 80 00 07 be 20027a0 2002788: 03 00 80 6e sethi %hi(0x201b800), %g1 ) { memset( heap_begin, 0, heap_size ); 200278c: 90 10 00 18 mov %i0, %o0 2002790: 92 10 20 00 clr %o1 2002794: 40 00 34 3a call 200f87c 2002798: 94 10 00 19 mov %i1, %o2 * 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 ) { 200279c: 03 00 80 6e sethi %hi(0x201b800), %g1 20027a0: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 ! 201b875 20027a4: 80 a0 60 00 cmp %g1, 0 20027a8: 12 80 00 0c bne 20027d8 20027ac: 03 00 80 6c sethi %hi(0x201b000), %g1 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 20027b0: d0 00 61 60 ld [ %g1 + 0x160 ], %o0 ! 201b160 20027b4: 92 10 00 18 mov %i0, %o1 20027b8: 94 10 00 19 mov %i1, %o2 20027bc: 40 00 10 66 call 2006954 <_Heap_Initialize> 20027c0: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 20027c4: 80 a2 20 00 cmp %o0, 0 20027c8: 12 80 00 05 bne 20027dc <== ALWAYS TAKEN 20027cc: 33 00 80 6e sethi %hi(0x201b800), %i1 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 20027d0: 40 00 0e 52 call 2006118 <== NOT EXECUTED 20027d4: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 20027d8: 33 00 80 6e sethi %hi(0x201b800), %i1 20027dc: 03 00 80 6c sethi %hi(0x201b000), %g1 20027e0: f0 06 63 60 ld [ %i1 + 0x360 ], %i0 20027e4: 40 00 13 75 call 20075b8 <_Protected_heap_Get_size> 20027e8: d0 00 61 60 ld [ %g1 + 0x160 ], %o0 20027ec: 90 02 00 18 add %o0, %i0, %o0 20027f0: d0 26 63 60 st %o0, [ %i1 + 0x360 ] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 20027f4: 81 c7 e0 08 ret 20027f8: 81 e8 00 00 restore =============================================================================== 020020c8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 20020c8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 20020cc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 20020d0: 02 80 00 49 be 20021f4 <== NOT EXECUTED 20020d4: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED return; if ( !print_handler ) 20020d8: e4 00 62 7c ld [ %g1 + 0x27c ], %l2 ! 201ba7c <== NOT EXECUTED 20020dc: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 20020e0: 02 80 00 45 be 20021f4 <== NOT EXECUTED 20020e4: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 20020e8: 32 80 00 0a bne,a 2002110 <== NOT EXECUTED 20020ec: e8 06 21 50 ld [ %i0 + 0x150 ], %l4 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 20020f0: 23 00 80 6f sethi %hi(0x201bc00), %l1 <== NOT EXECUTED 20020f4: a2 14 61 18 or %l1, 0x118, %l1 ! 201bd18 <== NOT EXECUTED 20020f8: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED 20020fc: a8 10 20 00 clr %l4 <== NOT EXECUTED 2002100: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002104: 12 80 00 04 bne 2002114 <== NOT EXECUTED 2002108: b0 10 20 00 clr %i0 <== NOT EXECUTED 200210c: 30 80 00 41 b,a 2002210 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 2002110: a2 06 20 c4 add %i0, 0xc4, %l1 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2002114: ea 04 60 04 ld [ %l1 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2002118: e6 04 40 00 ld [ %l1 ], %l3 <== 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); 200211c: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2002120: a6 04 ff f0 add %l3, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 2002124: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 2002128: 7f ff ff d8 call 2002088 <== NOT EXECUTED 200212c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED if ( high_water_mark ) 2002130: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 2002134: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 2002138: a0 05 40 13 add %l5, %l3, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 200213c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); 2002140: a0 24 00 08 sub %l0, %o0, %l0 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 2002144: a0 0c 00 01 and %l0, %g1, %l0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 2002148: 02 80 00 10 be 2002188 <== NOT EXECUTED 200214c: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED (*print_handler)( 2002150: ea 06 20 08 ld [ %i0 + 8 ], %l5 <== NOT EXECUTED 2002154: ec 00 62 78 ld [ %g1 + 0x278 ], %l6 <== NOT EXECUTED 2002158: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 200215c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 2002160: 40 00 0e 5b call 2005acc <== NOT EXECUTED 2002164: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 2002168: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 200216c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 2002170: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED 2002174: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED 2002178: 9f c4 80 00 call %l2 <== NOT EXECUTED 200217c: 92 12 61 10 or %o1, 0x110, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 2002180: 10 80 00 08 b 20021a0 <== NOT EXECUTED 2002184: d6 04 40 00 ld [ %l1 ], %o3 <== 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 ); 2002188: d0 00 62 78 ld [ %g1 + 0x278 ], %o0 <== NOT EXECUTED 200218c: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED 2002190: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 2002194: 9f c4 80 00 call %l2 <== NOT EXECUTED 2002198: 92 12 61 20 or %o1, 0x120, %o1 <== NOT EXECUTED } (*print_handler)( 200219c: d6 04 40 00 ld [ %l1 ], %o3 <== NOT EXECUTED 20021a0: d4 04 60 04 ld [ %l1 + 4 ], %o2 <== NOT EXECUTED 20021a4: 25 00 80 6e sethi %hi(0x201b800), %l2 <== NOT EXECUTED 20021a8: 23 00 80 6e sethi %hi(0x201b800), %l1 <== NOT EXECUTED 20021ac: c2 04 a2 7c ld [ %l2 + 0x27c ], %g1 <== NOT EXECUTED 20021b0: d0 04 62 78 ld [ %l1 + 0x278 ], %o0 <== NOT EXECUTED 20021b4: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 20021b8: 98 10 00 14 mov %l4, %o4 <== NOT EXECUTED 20021bc: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 20021c0: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 20021c4: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED 20021c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20021cc: 92 12 61 30 or %o1, 0x130, %o1 ! 201a130 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20021d0: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 20021d4: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 201ba74 <== NOT EXECUTED 20021d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20021dc: 12 80 00 08 bne 20021fc <== NOT EXECUTED 20021e0: c2 04 a2 7c ld [ %l2 + 0x27c ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 20021e4: d0 04 62 78 ld [ %l1 + 0x278 ], %o0 <== NOT EXECUTED 20021e8: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED 20021ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 20021f0: 92 12 61 50 or %o1, 0x150, %o1 ! 201a150 <== NOT EXECUTED 20021f4: 81 c7 e0 08 ret <== NOT EXECUTED 20021f8: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 20021fc: d0 04 62 78 ld [ %l1 + 0x278 ], %o0 <== NOT EXECUTED 2002200: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED 2002204: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 2002208: 9f c0 40 00 call %g1 <== NOT EXECUTED 200220c: 92 12 61 60 or %o1, 0x160, %o1 <== NOT EXECUTED 2002210: 81 c7 e0 08 ret <== NOT EXECUTED 2002214: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002428 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 2002428: 9d e3 bf a0 save %sp, -96, %sp static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 200242c: 03 00 80 6e sethi %hi(0x201b800), %g1 2002430: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 201ba74 2002434: 80 a0 60 00 cmp %g1, 0 2002438: 12 80 00 21 bne 20024bc 200243c: 07 00 80 6f sethi %hi(0x201bc00), %g3 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 2002440: 05 00 80 68 sethi %hi(0x201a000), %g2 2002444: 86 10 e1 08 or %g3, 0x108, %g3 2002448: 84 10 a2 b8 or %g2, 0x2b8, %g2 200244c: 88 08 60 03 and %g1, 3, %g4 2002450: 89 29 20 02 sll %g4, 2, %g4 2002454: da 00 80 04 ld [ %g2 + %g4 ], %o5 2002458: 89 28 60 02 sll %g1, 2, %g4 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 200245c: 82 00 60 01 inc %g1 2002460: 80 a0 60 04 cmp %g1, 4 2002464: 12 bf ff fa bne 200244c 2002468: da 20 c0 04 st %o5, [ %g3 + %g4 ] /* * 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) { 200246c: 03 00 80 6f sethi %hi(0x201bc00), %g1 2002470: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 201bf00 <_CPU_Interrupt_stack_low> 2002474: 80 a0 60 00 cmp %g1, 0 2002478: 02 80 00 0e be 20024b0 <== NEVER TAKEN 200247c: 05 00 80 6f sethi %hi(0x201bc00), %g2 2002480: c6 00 a2 4c ld [ %g2 + 0x24c ], %g3 ! 201be4c <_CPU_Interrupt_stack_high> 2002484: 80 a0 e0 00 cmp %g3, 0 2002488: 02 80 00 0a be 20024b0 <== NEVER TAKEN 200248c: 86 20 c0 01 sub %g3, %g1, %g3 Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 2002490: 05 00 80 6f sethi %hi(0x201bc00), %g2 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 2002494: c6 20 a1 18 st %g3, [ %g2 + 0x118 ] ! 201bd18 * 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; 2002498: 84 10 a1 18 or %g2, 0x118, %g2 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 200249c: 90 10 00 01 mov %g1, %o0 20024a0: 94 10 00 03 mov %g3, %o2 * 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; 20024a4: c2 20 a0 04 st %g1, [ %g2 + 4 ] Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 20024a8: 40 00 35 62 call 200fa30 20024ac: 92 10 20 a5 mov 0xa5, %o1 } #endif Stack_check_Initialized = 1; 20024b0: 84 10 20 01 mov 1, %g2 20024b4: 03 00 80 6e sethi %hi(0x201b800), %g1 20024b8: c4 20 62 74 st %g2, [ %g1 + 0x274 ] ! 201ba74 20024bc: 81 c7 e0 08 ret 20024c0: 81 e8 00 00 restore =============================================================================== 02002088 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 2002088: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 200208c: 84 0a 7f fc and %o1, -4, %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 2002090: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== 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++) 2002094: 84 02 00 02 add %o0, %g2, %g2 <== NOT EXECUTED 2002098: 10 80 00 06 b 20020b0 <== NOT EXECUTED 200209c: 82 10 61 a5 or %g1, 0x1a5, %g1 <== NOT EXECUTED if (*base != U32_PATTERN) 20020a0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 20020a4: 12 80 00 07 bne 20020c0 <== NOT EXECUTED 20020a8: 01 00 00 00 nop <== 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++) 20020ac: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 20020b0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 20020b4: 2a bf ff fb bcs,a 20020a0 <== NOT EXECUTED 20020b8: c6 02 00 00 ld [ %o0 ], %g3 <== NOT EXECUTED 20020bc: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 20020c0: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 0200228c : * * 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) { 200228c: 9d e3 bf 80 save %sp, -128, %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"); 2002290: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 2002294: e0 06 20 c8 ld [ %i0 + 0xc8 ], %l0 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 2002298: 40 00 04 9e call 2003510 <== NOT EXECUTED 200229c: 90 12 21 d0 or %o0, 0x1d0, %o0 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 20022a0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 20022a4: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED 20022a8: 40 00 04 9a call 2003510 <== NOT EXECUTED 20022ac: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 201a1e0 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 20022b0: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED 20022b4: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED 20022b8: 40 00 04 96 call 2003510 <== NOT EXECUTED 20022bc: 90 12 22 00 or %o0, 0x200, %o0 ! 201a200 <== NOT EXECUTED printk( 20022c0: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 20022c4: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED 20022c8: 40 00 04 92 call 2003510 <== NOT EXECUTED 20022cc: 90 12 22 18 or %o0, 0x218, %o0 ! 201a218 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 20022d0: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 20022d4: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED 20022d8: 40 00 0d fd call 2005acc <== NOT EXECUTED 20022dc: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED 20022e0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 20022e4: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED 20022e8: 40 00 04 8a call 2003510 <== NOT EXECUTED 20022ec: 90 12 22 30 or %o0, 0x230, %o0 ! 201a230 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 20022f0: d2 06 20 c4 ld [ %i0 + 0xc4 ], %o1 <== NOT EXECUTED 20022f4: d4 06 20 c8 ld [ %i0 + 0xc8 ], %o2 <== NOT EXECUTED 20022f8: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED 20022fc: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED 2002300: 40 00 04 84 call 2003510 <== NOT EXECUTED 2002304: 90 12 22 48 or %o0, 0x248, %o0 <== 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) { 2002308: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 200230c: 12 80 00 07 bne 2002328 <== NOT EXECUTED 2002310: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED printk( 2002314: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED 2002318: 90 12 22 80 or %o0, 0x280, %o0 <== NOT EXECUTED 200231c: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 2002320: 40 00 04 7c call 2003510 <== NOT EXECUTED 2002324: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 2002328: 40 00 10 20 call 20063a8 <== NOT EXECUTED 200232c: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED =============================================================================== 0200a8ac : *************************************************************************/ int Untar_FromFile( const char *tar_name ) { 200a8ac: 9d e3 be d0 save %sp, -304, %sp <== NOT EXECUTED unsigned long size; unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); 200a8b0: 7f ff e3 af call 200376c <== NOT EXECUTED 200a8b4: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED if (bufr == NULL) 200a8b8: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED unsigned long size; unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); 200a8bc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (bufr == NULL) 200a8c0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 200a8c4: 02 80 00 95 be 200ab18 <== NOT EXECUTED 200a8c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED { return(UNTAR_FAIL); } fd = open(tar_name, O_RDONLY); 200a8cc: 92 10 20 00 clr %o1 <== NOT EXECUTED 200a8d0: 7f ff e5 c3 call 2003fdc <== NOT EXECUTED 200a8d4: 33 00 80 81 sethi %hi(0x2020400), %i1 <== NOT EXECUTED if ((n = read(fd, bufr, 512)) != 512) { break; } if (strncmp(&bufr[257], "ustar ", 7)) 200a8d8: b0 04 21 01 add %l0, 0x101, %i0 <== NOT EXECUTED if (bufr == NULL) { return(UNTAR_FAIL); } fd = open(tar_name, O_RDONLY); 200a8dc: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED if ((n = read(fd, bufr, 512)) != 512) { break; } if (strncmp(&bufr[257], "ustar ", 7)) 200a8e0: b2 16 63 10 or %i1, 0x310, %i1 <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 200a8e4: a6 07 bf 98 add %fp, -104, %l3 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 200a8e8: b4 04 20 0c add %l0, 0xc, %i2 <== NOT EXECUTED 200a8ec: b6 04 20 08 add %l0, 8, %i3 <== NOT EXECUTED * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 200a8f0: ae 07 bf 30 add %fp, -208, %l7 <== NOT EXECUTED 200a8f4: b8 04 20 9d add %l0, 0x9d, %i4 <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) 200a8f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 200a8fc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200a900: 7f ff e6 89 call 2004324 <== NOT EXECUTED 200a904: 94 10 22 00 mov 0x200, %o2 <== NOT EXECUTED 200a908: 80 a2 22 00 cmp %o0, 0x200 <== NOT EXECUTED 200a90c: 12 80 00 7e bne 200ab04 <== NOT EXECUTED 200a910: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED { break; } if (strncmp(&bufr[257], "ustar ", 7)) 200a914: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200a918: 40 00 22 d4 call 2013468 <== NOT EXECUTED 200a91c: 94 10 20 07 mov 7, %o2 <== NOT EXECUTED 200a920: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200a924: 12 80 00 78 bne 200ab04 <== NOT EXECUTED 200a928: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 200a92c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200a930: 40 00 23 2a call 20135d8 <== NOT EXECUTED 200a934: 94 10 20 63 mov 0x63, %o2 <== NOT EXECUTED fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; 200a938: c8 0c 20 9c ldub [ %l0 + 0x9c ], %g4 <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; 200a93c: c0 2f bf fb clrb [ %fp + -5 ] <== NOT EXECUTED linkflag = bufr[156]; 200a940: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 200a944: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED 200a948: a2 10 20 00 clr %l1 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200a94c: c6 08 a0 7c ldub [ %g2 + 0x7c ], %g3 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200a950: 9b 2c 60 03 sll %l1, 3, %o5 <== NOT EXECUTED 200a954: 99 28 e0 18 sll %g3, 0x18, %o4 <== NOT EXECUTED 200a958: 84 00 a0 01 inc %g2 <== NOT EXECUTED 200a95c: 99 3b 20 18 sra %o4, 0x18, %o4 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200a960: 86 00 ff d0 add %g3, -48, %g3 <== NOT EXECUTED 200a964: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED 200a968: 80 a0 e0 09 cmp %g3, 9 <== NOT EXECUTED 200a96c: 18 80 00 03 bgu 200a978 <== NOT EXECUTED 200a970: 98 03 3f d0 add %o4, -48, %o4 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200a974: a2 03 00 0d add %o4, %o5, %l1 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 200a978: 80 a0 80 1a cmp %g2, %i2 <== NOT EXECUTED 200a97c: 32 bf ff f5 bne,a 200a950 <== NOT EXECUTED 200a980: c6 08 a0 7c ldub [ %g2 + 0x7c ], %g3 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( 200a984: 86 10 20 00 clr %g3 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200a988: c4 08 60 94 ldub [ %g1 + 0x94 ], %g2 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200a98c: 9b 28 e0 03 sll %g3, 3, %o5 <== NOT EXECUTED 200a990: 99 28 a0 18 sll %g2, 0x18, %o4 <== NOT EXECUTED 200a994: 82 00 60 01 inc %g1 <== NOT EXECUTED 200a998: 99 3b 20 18 sra %o4, 0x18, %o4 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200a99c: 84 00 bf d0 add %g2, -48, %g2 <== NOT EXECUTED 200a9a0: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 200a9a4: 80 a0 a0 09 cmp %g2, 9 <== NOT EXECUTED 200a9a8: 18 80 00 03 bgu 200a9b4 <== NOT EXECUTED 200a9ac: 98 03 3f d0 add %o4, -48, %o4 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200a9b0: 86 03 00 0d add %o4, %o5, %g3 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 200a9b4: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 200a9b8: 32 bf ff f5 bne,a 200a98c <== NOT EXECUTED 200a9bc: c4 08 60 94 ldub [ %g1 + 0x94 ], %g2 <== NOT EXECUTED 200a9c0: 82 10 20 00 clr %g1 <== NOT EXECUTED 200a9c4: 84 10 20 00 clr %g2 <== NOT EXECUTED int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) 200a9c8: 9a 00 bf 6c add %g2, -148, %o5 <== NOT EXECUTED 200a9cc: 80 a3 60 07 cmp %o5, 7 <== NOT EXECUTED 200a9d0: 38 80 00 04 bgu,a 200a9e0 <== NOT EXECUTED 200a9d4: da 0c 00 02 ldub [ %l0 + %g2 ], %o5 <== NOT EXECUTED sum += 0xff & ' '; 200a9d8: 10 80 00 03 b 200a9e4 <== NOT EXECUTED 200a9dc: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED else sum += 0xff & bufr[i]; 200a9e0: 82 00 40 0d add %g1, %o5, %g1 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) 200a9e4: 84 00 a0 01 inc %g2 <== NOT EXECUTED 200a9e8: 80 a0 a2 00 cmp %g2, 0x200 <== NOT EXECUTED 200a9ec: 12 bf ff f8 bne 200a9cc <== NOT EXECUTED 200a9f0: 9a 00 bf 6c add %g2, -148, %o5 <== NOT EXECUTED * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) 200a9f4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 200a9f8: 02 80 00 04 be 200aa08 <== NOT EXECUTED 200a9fc: 82 09 20 ff and %g4, 0xff, %g1 <== NOT EXECUTED 200aa00: 10 80 00 42 b 200ab08 <== NOT EXECUTED 200aa04: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED /****************************************************************** * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) 200aa08: 80 a0 60 32 cmp %g1, 0x32 <== NOT EXECUTED 200aa0c: 12 80 00 0c bne 200aa3c <== NOT EXECUTED 200aa10: 80 a0 60 30 cmp %g1, 0x30 <== NOT EXECUTED { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 200aa14: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 200aa18: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 200aa1c: 40 00 22 ef call 20135d8 <== NOT EXECUTED 200aa20: 94 10 20 63 mov 0x63, %o2 <== NOT EXECUTED linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname,fname); 200aa24: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; 200aa28: c0 2f bf 93 clrb [ %fp + -109 ] <== NOT EXECUTED symlink(linkname,fname); 200aa2c: 40 00 08 1e call 200caa4 <== NOT EXECUTED 200aa30: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) 200aa34: 10 bf ff b2 b 200a8fc <== NOT EXECUTED 200aa38: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname,fname); } else if (linkflag == REGTYPE) 200aa3c: 12 80 00 2b bne 200aae8 <== NOT EXECUTED 200aa40: 80 a0 60 35 cmp %g1, 0x35 <== NOT EXECUTED /****************************************************************** * Read out the data. There are nblocks of data where nblocks * is the size rounded to the nearest 512-byte boundary. *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; 200aa44: ba 04 61 ff add %l1, 0x1ff, %i5 <== NOT EXECUTED if ((out_fd = creat(fname, 0644)) == -1) 200aa48: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 200aa4c: 92 10 21 a4 mov 0x1a4, %o1 <== NOT EXECUTED 200aa50: 40 00 19 7c call 2011040 <== NOT EXECUTED 200aa54: bb 37 60 09 srl %i5, 9, %i5 <== NOT EXECUTED 200aa58: aa 10 20 00 clr %l5 <== NOT EXECUTED 200aa5c: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED 200aa60: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200aa64: 12 80 00 18 bne 200aac4 <== NOT EXECUTED 200aa68: ac 10 20 00 clr %l6 <== NOT EXECUTED { for (i=0; i <== NOT EXECUTED 200aa70: 80 a5 80 1d cmp %l6, %i5 <== NOT EXECUTED { n = read(fd, bufr, 512); 200aa74: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 200aa78: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 200aa7c: 7f ff e6 2a call 2004324 <== NOT EXECUTED 200aa80: 94 10 22 00 mov 0x200, %o2 <== NOT EXECUTED *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) { for (i=0; i <== NOT EXECUTED 200aa8c: ac 05 a0 01 inc %l6 <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) 200aa90: 10 bf ff 9b b 200a8fc <== NOT EXECUTED 200aa94: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED } else { for (i=0; i <== NOT EXECUTED 200aa9c: 01 00 00 00 nop <== NOT EXECUTED n = MIN(n, size - i*512); write(out_fd, bufr, n); 200aaa0: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 200aaa4: 08 80 00 03 bleu 200aab0 <== NOT EXECUTED 200aaa8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 200aaac: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED n = read(fd, bufr, 512); } } else { for (i=0; i <== NOT EXECUTED 200aac0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED } else { for (i=0; i <== NOT EXECUTED 200aad4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED { n = read(fd, bufr, 512); n = MIN(n, size - i*512); write(out_fd, bufr, n); } close(out_fd); 200aad8: 7f ff e0 05 call 2002aec <== NOT EXECUTED 200aadc: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) 200aae0: 10 bf ff 87 b 200a8fc <== NOT EXECUTED 200aae4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED write(out_fd, bufr, n); } close(out_fd); } } else if (linkflag == DIRTYPE) 200aae8: 32 bf ff 85 bne,a 200a8fc <== NOT EXECUTED 200aaec: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); 200aaf0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 200aaf4: 7f ff e3 60 call 2003874 <== NOT EXECUTED 200aaf8: 92 10 21 ff mov 0x1ff, %o1 <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) 200aafc: 10 bf ff 80 b 200a8fc <== NOT EXECUTED 200ab00: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED close(out_fd); } } else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); 200ab04: a2 10 20 00 clr %l1 <== NOT EXECUTED } } free(bufr); 200ab08: 7f ff e1 3f call 2003004 <== NOT EXECUTED 200ab0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED close(fd); 200ab10: 7f ff df f7 call 2002aec <== NOT EXECUTED 200ab14: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return(retval); } 200ab18: 81 c7 e0 08 ret <== NOT EXECUTED 200ab1c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED =============================================================================== 0200ab20 : int Untar_FromMemory( void *tar_buf, size_t size ) { 200ab20: 9d e3 be d0 save %sp, -304, %sp symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) 200ab24: 35 00 80 81 sethi %hi(0x2020400), %i2 int Untar_FromMemory( void *tar_buf, size_t size ) { 200ab28: f2 27 a0 48 st %i1, [ %fp + 0x48 ] else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) { printk("Untar: failed to create file %s\n", fname); 200ab2c: 37 00 80 81 sethi %hi(0x2020400), %i3 } /* Read the header */ bufr = &tar_ptr[ptr]; ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) 200ab30: 33 00 80 81 sethi %hi(0x2020400), %i1 { len = ((sizeToGo < 512L)?(sizeToGo):(512L)); n = fwrite(&tar_ptr[ptr], 1, len, fp); if (n != len) { printk("untar: Error during write\n"); 200ab34: 39 00 80 81 sethi %hi(0x2020400), %i4 } /* Read the header */ bufr = &tar_ptr[ptr]; ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) 200ab38: b2 16 63 10 or %i1, 0x310, %i1 symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) 200ab3c: b4 16 a3 18 or %i2, 0x318, %i2 { printk("Untar: failed to create file %s\n", fname); 200ab40: b6 16 e3 20 or %i3, 0x320, %i3 { len = ((sizeToGo < 512L)?(sizeToGo):(512L)); n = fwrite(&tar_ptr[ptr], 1, len, fp); if (n != len) { printk("untar: Error during write\n"); 200ab44: b8 17 23 48 or %i4, 0x348, %i4 void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 200ab48: a6 10 20 00 clr %l3 { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 200ab4c: a2 07 bf 98 add %fp, -104, %l1 * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 200ab50: 10 80 00 03 b 200ab5c 200ab54: ae 07 bf 30 add %fp, -208, %l7 void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 200ab58: a6 10 00 10 mov %l0, %l3 <== NOT EXECUTED ptr = 0; while (1) { if (ptr + 512 > size) 200ab5c: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 200ab60: a0 04 e2 00 add %l3, 0x200, %l0 200ab64: 80 a4 00 01 cmp %l0, %g1 200ab68: 18 80 00 80 bgu 200ad68 <== NEVER TAKEN 200ab6c: a6 06 00 13 add %i0, %l3, %l3 } /* Read the header */ bufr = &tar_ptr[ptr]; ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) 200ab70: 92 10 00 19 mov %i1, %o1 200ab74: 90 04 e1 01 add %l3, 0x101, %o0 200ab78: 40 00 22 3c call 2013468 200ab7c: 94 10 20 07 mov 7, %o2 200ab80: 80 a2 20 00 cmp %o0, 0 200ab84: 12 80 00 79 bne 200ad68 200ab88: 90 10 00 11 mov %l1, %o0 { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); 200ab8c: 92 10 00 13 mov %l3, %o1 200ab90: 40 00 22 92 call 20135d8 200ab94: 94 10 20 63 mov 0x63, %o2 fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; 200ab98: c8 0c e0 9c ldub [ %l3 + 0x9c ], %g4 200ab9c: 82 10 00 13 mov %l3, %g1 retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; 200aba0: c0 2f bf fb clrb [ %fp + -5 ] * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( 200aba4: 9a 04 e0 0c add %l3, 0xc, %o5 200aba8: 84 10 00 13 mov %l3, %g2 200abac: a4 10 20 00 clr %l2 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200abb0: c6 08 a0 7c ldub [ %g2 + 0x7c ], %g3 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200abb4: 99 2c a0 03 sll %l2, 3, %o4 200abb8: 97 28 e0 18 sll %g3, 0x18, %o3 200abbc: 84 00 a0 01 inc %g2 200abc0: 97 3a e0 18 sra %o3, 0x18, %o3 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200abc4: 86 00 ff d0 add %g3, -48, %g3 200abc8: 86 08 e0 ff and %g3, 0xff, %g3 200abcc: 80 a0 e0 09 cmp %g3, 9 200abd0: 18 80 00 03 bgu 200abdc 200abd4: 96 02 ff d0 add %o3, -48, %o3 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200abd8: a4 02 c0 0c add %o3, %o4, %l2 { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 200abdc: 80 a0 80 0d cmp %g2, %o5 200abe0: 32 bf ff f5 bne,a 200abb4 200abe4: c6 08 a0 7c ldub [ %g2 + 0x7c ], %g3 * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( 200abe8: 9a 04 e0 08 add %l3, 8, %o5 200abec: 86 10 20 00 clr %g3 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200abf0: c4 08 60 94 ldub [ %g1 + 0x94 ], %g2 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200abf4: 99 28 e0 03 sll %g3, 3, %o4 200abf8: 97 28 a0 18 sll %g2, 0x18, %o3 200abfc: 82 00 60 01 inc %g1 200ac00: 97 3a e0 18 sra %o3, 0x18, %o3 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200ac04: 84 00 bf d0 add %g2, -48, %g2 200ac08: 84 08 a0 ff and %g2, 0xff, %g2 200ac0c: 80 a0 a0 09 cmp %g2, 9 200ac10: 18 80 00 03 bgu 200ac1c 200ac14: 96 02 ff d0 add %o3, -48, %o3 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200ac18: 86 02 c0 0c add %o3, %o4, %g3 { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 200ac1c: 80 a0 40 0d cmp %g1, %o5 200ac20: 32 bf ff f5 bne,a 200abf4 200ac24: c4 08 60 94 ldub [ %g1 + 0x94 ], %g2 200ac28: 82 10 20 00 clr %g1 200ac2c: 84 10 20 00 clr %g2 int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) 200ac30: 9a 00 bf 6c add %g2, -148, %o5 200ac34: 80 a3 60 07 cmp %o5, 7 200ac38: 38 80 00 04 bgu,a 200ac48 200ac3c: da 0c c0 02 ldub [ %l3 + %g2 ], %o5 sum += 0xff & ' '; 200ac40: 10 80 00 03 b 200ac4c 200ac44: 82 00 60 20 add %g1, 0x20, %g1 else sum += 0xff & bufr[i]; 200ac48: 82 00 40 0d add %g1, %o5, %g1 ) { int i, sum; sum = 0; for (i=0; i<512; i++) 200ac4c: 84 00 a0 01 inc %g2 200ac50: 80 a0 a2 00 cmp %g2, 0x200 200ac54: 12 bf ff f8 bne 200ac34 200ac58: 9a 00 bf 6c add %g2, -148, %o5 * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) 200ac5c: 80 a0 40 03 cmp %g1, %g3 200ac60: 02 80 00 04 be 200ac70 <== ALWAYS TAKEN 200ac64: 82 09 20 ff and %g4, 0xff, %g1 200ac68: 81 c7 e0 08 ret <== NOT EXECUTED 200ac6c: 91 e8 20 02 restore %g0, 2, %o0 <== NOT EXECUTED /****************************************************************** * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) 200ac70: 80 a0 60 32 cmp %g1, 0x32 200ac74: 12 80 00 0c bne 200aca4 200ac78: 80 a0 60 30 cmp %g1, 0x30 { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); 200ac7c: 92 04 e0 9d add %l3, 0x9d, %o1 200ac80: 90 10 00 17 mov %l7, %o0 200ac84: 40 00 22 55 call 20135d8 200ac88: 94 10 20 63 mov 0x63, %o2 linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); 200ac8c: 90 10 00 17 mov %l7, %o0 * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; 200ac90: c0 2f bf 93 clrb [ %fp + -109 ] symlink(linkname, fname); 200ac94: 40 00 07 84 call 200caa4 200ac98: 92 10 00 11 mov %l1, %o1 void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 200ac9c: 10 bf ff b0 b 200ab5c 200aca0: a6 10 00 10 mov %l0, %l3 { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) 200aca4: 12 80 00 2a bne 200ad4c 200aca8: 80 a0 60 35 cmp %g1, 0x35 { nblocks = (((file_size) + 511) & ~511) / 512; 200acac: ba 04 a1 ff add %l2, 0x1ff, %i5 if ((fp = fopen(fname, "w")) == NULL) 200acb0: 90 10 00 11 mov %l1, %o0 200acb4: 92 10 00 1a mov %i2, %o1 200acb8: 40 00 1b 16 call 2011910 200acbc: bb 37 60 09 srl %i5, 9, %i5 200acc0: a8 92 20 00 orcc %o0, 0, %l4 200acc4: 02 80 00 04 be 200acd4 <== NEVER TAKEN 200acc8: ac 06 00 10 add %i0, %l0, %l6 200accc: 10 80 00 19 b 200ad30 200acd0: aa 10 20 00 clr %l5 { printk("Untar: failed to create file %s\n", fname); 200acd4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200acd8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 200acdc: 7f ff e5 86 call 20042f4 <== NOT EXECUTED 200ace0: bb 2f 60 09 sll %i5, 9, %i5 <== NOT EXECUTED ptr += 512 * nblocks; 200ace4: 10 bf ff 9d b 200ab58 <== NOT EXECUTED 200ace8: a0 04 00 1d add %l0, %i5, %l0 <== NOT EXECUTED /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i <== ALWAYS TAKEN 200acf4: a6 10 00 12 mov %l2, %l3 200acf8: a6 10 22 00 mov 0x200, %l3 <== NOT EXECUTED n = fwrite(&tar_ptr[ptr], 1, len, fp); 200acfc: 90 10 00 16 mov %l6, %o0 200ad00: 92 10 20 01 mov 1, %o1 200ad04: 94 10 00 13 mov %l3, %o2 200ad08: 96 10 00 14 mov %l4, %o3 200ad0c: 40 00 1d 0d call 2012140 200ad10: a4 24 80 13 sub %l2, %l3, %l2 if (n != len) 200ad14: 80 a2 00 13 cmp %o0, %l3 200ad18: 02 80 00 05 be 200ad2c <== ALWAYS TAKEN 200ad1c: ac 05 a2 00 add %l6, 0x200, %l6 { printk("untar: Error during write\n"); 200ad20: 7f ff e5 75 call 20042f4 <== NOT EXECUTED 200ad24: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED break; 200ad28: 30 80 00 05 b,a 200ad3c <== NOT EXECUTED } ptr += 512; 200ad2c: a0 04 22 00 add %l0, 0x200, %l0 /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i 200ad38: 80 a4 a2 00 cmp %l2, 0x200 break; } ptr += 512; sizeToGo -= n; } fclose(fp); 200ad3c: 40 00 19 1f call 20111b8 200ad40: 90 10 00 14 mov %l4, %o0 void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 200ad44: 10 bf ff 86 b 200ab5c 200ad48: a6 10 00 10 mov %l0, %l3 sizeToGo -= n; } fclose(fp); } } else if (linkflag == DIRTYPE) 200ad4c: 32 bf ff 84 bne,a 200ab5c <== NEVER TAKEN 200ad50: a6 10 00 10 mov %l0, %l3 <== NOT EXECUTED { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); 200ad54: 90 10 00 11 mov %l1, %o0 200ad58: 7f ff e2 c7 call 2003874 200ad5c: 92 10 21 ff mov 0x1ff, %o1 void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; 200ad60: 10 bf ff 7f b 200ab5c 200ad64: a6 10 00 10 mov %l0, %l3 mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); } } return(retval); } 200ad68: 81 c7 e0 08 ret 200ad6c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020089a4 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 20089a4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 20089a8: 03 00 80 7b sethi %hi(0x201ec00), %g1 * 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 ); 20089ac: 7f ff eb 99 call 2003810 20089b0: e0 00 63 10 ld [ %g1 + 0x310 ], %l0 ! 201ef10 <_Thread_Executing> 20089b4: a2 10 00 08 mov %o0, %l1 switch ( the_rwlock->current_state ) { 20089b8: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 20089bc: 80 a0 60 00 cmp %g1, 0 20089c0: 22 80 00 06 be,a 20089d8 <_CORE_RWLock_Obtain_for_reading+0x34> 20089c4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 20089c8: 80 a0 60 01 cmp %g1, 1 20089cc: 12 80 00 16 bne 2008a24 <_CORE_RWLock_Obtain_for_reading+0x80> 20089d0: 80 8e a0 ff btst 0xff, %i2 20089d4: 30 80 00 06 b,a 20089ec <_CORE_RWLock_Obtain_for_reading+0x48> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 20089d8: 84 10 20 01 mov 1, %g2 the_rwlock->number_of_readers += 1; 20089dc: 82 00 60 01 inc %g1 */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 20089e0: c4 26 20 44 st %g2, [ %i0 + 0x44 ] the_rwlock->number_of_readers += 1; 20089e4: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 20089e8: 30 80 00 0a b,a 2008a10 <_CORE_RWLock_Obtain_for_reading+0x6c> 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 ); 20089ec: 40 00 07 e4 call 200a97c <_Thread_queue_First> 20089f0: 90 10 00 18 mov %i0, %o0 if ( !waiter ) { 20089f4: 80 a2 20 00 cmp %o0, 0 20089f8: 12 80 00 0b bne 2008a24 <_CORE_RWLock_Obtain_for_reading+0x80><== NEVER TAKEN 20089fc: 80 8e a0 ff btst 0xff, %i2 the_rwlock->number_of_readers += 1; 2008a00: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2008a04: 82 00 60 01 inc %g1 2008a08: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 2008a0c: 90 10 00 11 mov %l1, %o0 2008a10: 7f ff eb 84 call 2003820 2008a14: 01 00 00 00 nop executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2008a18: c0 24 20 34 clr [ %l0 + 0x34 ] return; 2008a1c: 81 c7 e0 08 ret 2008a20: 81 e8 00 00 restore /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 2008a24: 32 80 00 08 bne,a 2008a44 <_CORE_RWLock_Obtain_for_reading+0xa0> 2008a28: f2 24 20 20 st %i1, [ %l0 + 0x20 ] _ISR_Enable( level ); 2008a2c: 7f ff eb 7d call 2003820 2008a30: 90 10 00 11 mov %l1, %o0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 2008a34: 82 10 20 02 mov 2, %g1 2008a38: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 2008a3c: 81 c7 e0 08 ret 2008a40: 81 e8 00 00 restore _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2008a44: c0 24 20 34 clr [ %l0 + 0x34 ] /* * 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; 2008a48: f0 24 20 44 st %i0, [ %l0 + 0x44 ] executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 2008a4c: c0 24 20 30 clr [ %l0 + 0x30 ] 2008a50: 82 10 20 01 mov 1, %g1 2008a54: c2 26 20 30 st %g1, [ %i0 + 0x30 ] executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 2008a58: 90 10 00 11 mov %l1, %o0 2008a5c: 7f ff eb 71 call 2003820 2008a60: 35 00 80 22 sethi %hi(0x2008800), %i2 _Thread_queue_Enqueue_with_handler( 2008a64: b2 10 00 1b mov %i3, %i1 2008a68: 40 00 06 e5 call 200a5fc <_Thread_queue_Enqueue_with_handler> 2008a6c: 95 ee a3 f4 restore %i2, 0x3f4, %o2 =============================================================================== 02008afc <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 2008afc: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 2008b00: 03 00 80 7b sethi %hi(0x201ec00), %g1 * 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 ); 2008b04: 7f ff eb 43 call 2003810 2008b08: e0 00 63 10 ld [ %g1 + 0x310 ], %l0 ! 201ef10 <_Thread_Executing> 2008b0c: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 2008b10: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2008b14: 80 a0 60 00 cmp %g1, 0 2008b18: 12 80 00 08 bne 2008b38 <_CORE_RWLock_Release+0x3c> 2008b1c: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 2008b20: 7f ff eb 40 call 2003820 2008b24: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 2008b28: 82 10 20 02 mov 2, %g1 2008b2c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 2008b30: 81 c7 e0 08 ret 2008b34: 81 e8 00 00 restore return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 2008b38: 32 80 00 0b bne,a 2008b64 <_CORE_RWLock_Release+0x68> 2008b3c: c0 24 20 34 clr [ %l0 + 0x34 ] the_rwlock->number_of_readers -= 1; 2008b40: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2008b44: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 2008b48: 80 a0 60 00 cmp %g1, 0 2008b4c: 02 80 00 05 be 2008b60 <_CORE_RWLock_Release+0x64> 2008b50: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 2008b54: 7f ff eb 33 call 2003820 2008b58: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 2008b5c: 30 80 00 24 b,a 2008bec <_CORE_RWLock_Release+0xf0> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 2008b60: c0 24 20 34 clr [ %l0 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 2008b64: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 2008b68: 7f ff eb 2e call 2003820 2008b6c: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 2008b70: 40 00 06 40 call 200a470 <_Thread_queue_Dequeue> 2008b74: 90 10 00 18 mov %i0, %o0 if ( next ) { 2008b78: 80 a2 20 00 cmp %o0, 0 2008b7c: 22 80 00 1c be,a 2008bec <_CORE_RWLock_Release+0xf0> 2008b80: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 2008b84: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 2008b88: 80 a0 60 01 cmp %g1, 1 2008b8c: 32 80 00 05 bne,a 2008ba0 <_CORE_RWLock_Release+0xa4> 2008b90: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 2008b94: 82 10 20 02 mov 2, %g1 return CORE_RWLOCK_SUCCESSFUL; 2008b98: 10 80 00 14 b 2008be8 <_CORE_RWLock_Release+0xec> 2008b9c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 2008ba0: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2008ba4: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 2008ba8: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2008bac: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 2008bb0: 40 00 07 73 call 200a97c <_Thread_queue_First> 2008bb4: 90 10 00 18 mov %i0, %o0 if ( !next || 2008bb8: 92 92 20 00 orcc %o0, 0, %o1 2008bbc: 22 80 00 0c be,a 2008bec <_CORE_RWLock_Release+0xf0> 2008bc0: b0 10 20 00 clr %i0 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 2008bc4: c2 02 60 30 ld [ %o1 + 0x30 ], %g1 2008bc8: 80 a0 60 01 cmp %g1, 1 2008bcc: 02 80 00 07 be 2008be8 <_CORE_RWLock_Release+0xec> <== NEVER TAKEN 2008bd0: 90 10 00 18 mov %i0, %o0 return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 2008bd4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2008bd8: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2008bdc: 40 00 07 18 call 200a83c <_Thread_queue_Extract> 2008be0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] } 2008be4: 30 bf ff f3 b,a 2008bb0 <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 2008be8: b0 10 20 00 clr %i0 2008bec: 81 c7 e0 08 ret 2008bf0: 81 e8 00 00 restore =============================================================================== 02008bf4 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 2008bf4: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008bf8: 90 10 00 18 mov %i0, %o0 2008bfc: 40 00 05 28 call 200a09c <_Thread_Get> 2008c00: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008c04: c2 07 bf fc ld [ %fp + -4 ], %g1 2008c08: 80 a0 60 00 cmp %g1, 0 2008c0c: 12 80 00 08 bne 2008c2c <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN 2008c10: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2008c14: 40 00 07 96 call 200aa6c <_Thread_queue_Process_timeout> 2008c18: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2008c1c: 03 00 80 7b sethi %hi(0x201ec00), %g1 2008c20: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 201ee50 <_Thread_Dispatch_disable_level> 2008c24: 84 00 bf ff add %g2, -1, %g2 2008c28: c4 20 62 50 st %g2, [ %g1 + 0x250 ] 2008c2c: 81 c7 e0 08 ret 2008c30: 81 e8 00 00 restore =============================================================================== 0201607c <_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 ) { 201607c: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 2016080: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 2016084: a0 10 00 18 mov %i0, %l0 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 2016088: 80 a6 80 01 cmp %i2, %g1 201608c: 18 80 00 17 bgu 20160e8 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN 2016090: b0 10 20 01 mov 1, %i0 * 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 ) { 2016094: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2016098: 80 a0 60 00 cmp %g1, 0 201609c: 02 80 00 0a be 20160c4 <_CORE_message_queue_Broadcast+0x48> 20160a0: a2 10 20 00 clr %l1 *count = 0; 20160a4: c0 27 40 00 clr [ %i5 ] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 20160a8: 81 c7 e0 08 ret 20160ac: 91 e8 20 00 restore %g0, 0, %o0 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 20160b0: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 20160b4: 40 00 28 25 call 2020148 20160b8: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 20160bc: c2 04 a0 28 ld [ %l2 + 0x28 ], %g1 20160c0: f4 20 40 00 st %i2, [ %g1 ] * 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))) { 20160c4: 40 00 0a 5d call 2018a38 <_Thread_queue_Dequeue> 20160c8: 90 10 00 10 mov %l0, %o0 20160cc: 92 10 00 19 mov %i1, %o1 20160d0: a4 10 00 08 mov %o0, %l2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 20160d4: 80 a2 20 00 cmp %o0, 0 20160d8: 12 bf ff f6 bne 20160b0 <_CORE_message_queue_Broadcast+0x34> 20160dc: 94 10 00 1a mov %i2, %o2 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 20160e0: e2 27 40 00 st %l1, [ %i5 ] 20160e4: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 20160e8: 81 c7 e0 08 ret 20160ec: 81 e8 00 00 restore =============================================================================== 0200fbd0 <_CORE_message_queue_Initialize>: 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 ) { 200fbd0: 9d e3 bf a0 save %sp, -96, %sp size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 200fbd4: c0 26 20 48 clr [ %i0 + 0x48 ] ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 200fbd8: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; 200fbdc: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 200fbe0: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 200fbe4: c0 26 20 64 clr [ %i0 + 0x64 ] /* * 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)) { 200fbe8: 80 8e e0 03 btst 3, %i3 200fbec: 02 80 00 07 be 200fc08 <_CORE_message_queue_Initialize+0x38> 200fbf0: a2 10 00 1b mov %i3, %l1 allocated_message_size += sizeof(uint32_t); 200fbf4: a2 06 e0 04 add %i3, 4, %l1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 200fbf8: a2 0c 7f fc and %l1, -4, %l1 } if (allocated_message_size < maximum_message_size) 200fbfc: 80 a4 40 1b cmp %l1, %i3 200fc00: 0a 80 00 23 bcs 200fc8c <_CORE_message_queue_Initialize+0xbc><== NEVER TAKEN 200fc04: 01 00 00 00 nop /* * 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)); 200fc08: a0 04 60 14 add %l1, 0x14, %l0 /* * 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 * 200fc0c: 92 10 00 1a mov %i2, %o1 200fc10: 40 00 50 6c call 2023dc0 <.umul> 200fc14: 90 10 00 10 mov %l0, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 200fc18: 80 a2 00 11 cmp %o0, %l1 200fc1c: 0a 80 00 1c bcs 200fc8c <_CORE_message_queue_Initialize+0xbc><== NEVER TAKEN 200fc20: 01 00 00 00 nop return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 200fc24: 40 00 0c 06 call 2012c3c <_Workspace_Allocate> 200fc28: 01 00 00 00 nop 200fc2c: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 200fc30: 80 a2 20 00 cmp %o0, 0 200fc34: 02 80 00 16 be 200fc8c <_CORE_message_queue_Initialize+0xbc> 200fc38: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 200fc3c: 90 06 20 68 add %i0, 0x68, %o0 200fc40: 94 10 00 1a mov %i2, %o2 200fc44: 40 00 16 74 call 2015614 <_Chain_Initialize> 200fc48: 96 10 00 10 mov %l0, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 200fc4c: c2 06 40 00 ld [ %i1 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 200fc50: c0 26 20 54 clr [ %i0 + 0x54 ] 200fc54: 82 18 60 01 xor %g1, 1, %g1 200fc58: 80 a0 00 01 cmp %g0, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 200fc5c: 82 06 20 54 add %i0, 0x54, %g1 200fc60: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200fc64: 82 06 20 50 add %i0, 0x50, %g1 200fc68: 90 10 00 18 mov %i0, %o0 200fc6c: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 200fc70: 92 60 3f ff subx %g0, -1, %o1 200fc74: 94 10 20 80 mov 0x80, %o2 200fc78: 96 10 20 06 mov 6, %o3 200fc7c: 40 00 08 cb call 2011fa8 <_Thread_queue_Initialize> 200fc80: b0 10 20 01 mov 1, %i0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 200fc84: 81 c7 e0 08 ret 200fc88: 81 e8 00 00 restore } 200fc8c: 81 c7 e0 08 ret 200fc90: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200fc94 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 200fc94: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 200fc98: 23 00 80 aa sethi %hi(0x202a800), %l1 200fc9c: e0 04 61 e0 ld [ %l1 + 0x1e0 ], %l0 ! 202a9e0 <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 200fca0: a4 10 00 19 mov %i1, %l2 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; 200fca4: c0 24 20 34 clr [ %l0 + 0x34 ] _ISR_Disable( level ); 200fca8: 7f ff de b7 call 2007784 200fcac: a6 10 00 18 mov %i0, %l3 200fcb0: 82 10 00 08 mov %o0, %g1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200fcb4: f2 06 20 50 ld [ %i0 + 0x50 ], %i1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200fcb8: 84 06 20 54 add %i0, 0x54, %g2 200fcbc: 80 a6 40 02 cmp %i1, %g2 200fcc0: 02 80 00 24 be 200fd50 <_CORE_message_queue_Seize+0xbc> 200fcc4: 86 06 20 50 add %i0, 0x50, %g3 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 200fcc8: c4 06 40 00 ld [ %i1 ], %g2 the_chain->first = new_first; 200fccc: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 200fcd0: 80 a6 60 00 cmp %i1, 0 200fcd4: 02 80 00 1f be 200fd50 <_CORE_message_queue_Seize+0xbc> <== NEVER TAKEN 200fcd8: c6 20 a0 04 st %g3, [ %g2 + 4 ] the_message_queue->number_of_pending_messages -= 1; 200fcdc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200fce0: 82 00 7f ff add %g1, -1, %g1 200fce4: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 200fce8: 7f ff de ab call 2007794 200fcec: a0 06 60 10 add %i1, 0x10, %l0 *size_p = the_message->Contents.size; 200fcf0: d4 06 60 0c ld [ %i1 + 0xc ], %o2 _Thread_Executing->Wait.count = 200fcf4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 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; 200fcf8: d4 26 c0 00 st %o2, [ %i3 ] _Thread_Executing->Wait.count = 200fcfc: c4 06 60 08 ld [ %i1 + 8 ], %g2 200fd00: c4 20 60 24 st %g2, [ %g1 + 0x24 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 200fd04: 92 10 00 10 mov %l0, %o1 200fd08: 40 00 24 12 call 2018d50 200fd0c: 90 10 00 1a mov %i2, %o0 * 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 ); 200fd10: 40 00 07 9e call 2011b88 <_Thread_queue_Dequeue> 200fd14: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) { 200fd18: 80 a2 20 00 cmp %o0, 0 200fd1c: 32 80 00 04 bne,a 200fd2c <_CORE_message_queue_Seize+0x98> 200fd20: d4 02 20 30 ld [ %o0 + 0x30 ], %o2 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 ); 200fd24: 7f ff ff 7a call 200fb0c <_Chain_Append> 200fd28: 91 ee 20 68 restore %i0, 0x68, %o0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 200fd2c: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 200fd30: d4 26 60 0c st %o2, [ %i1 + 0xc ] 200fd34: c2 26 60 08 st %g1, [ %i1 + 8 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 200fd38: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 200fd3c: 40 00 24 05 call 2018d50 200fd40: 90 10 00 10 mov %l0, %o0 the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 200fd44: f4 06 60 08 ld [ %i1 + 8 ], %i2 200fd48: 40 00 16 41 call 201564c <_CORE_message_queue_Insert_message> 200fd4c: 81 e8 00 00 restore return; } #endif } if ( !wait ) { 200fd50: 80 8f 20 ff btst 0xff, %i4 200fd54: 12 80 00 08 bne 200fd74 <_CORE_message_queue_Seize+0xe0> 200fd58: 84 10 20 01 mov 1, %g2 _ISR_Enable( level ); 200fd5c: 7f ff de 8e call 2007794 200fd60: 90 10 00 01 mov %g1, %o0 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 200fd64: 82 10 20 04 mov 4, %g1 200fd68: c2 24 20 34 st %g1, [ %l0 + 0x34 ] 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 ); } 200fd6c: 81 c7 e0 08 ret 200fd70: 81 e8 00 00 restore 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; 200fd74: c4 24 e0 30 st %g2, [ %l3 + 0x30 ] _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; 200fd78: f6 24 20 28 st %i3, [ %l0 + 0x28 ] return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 200fd7c: e4 24 20 20 st %l2, [ %l0 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 200fd80: f4 24 20 2c st %i2, [ %l0 + 0x2c ] 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; 200fd84: e6 24 20 44 st %l3, [ %l0 + 0x44 ] 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 ); 200fd88: 90 10 00 01 mov %g1, %o0 200fd8c: 7f ff de 82 call 2007794 200fd90: 35 00 80 48 sethi %hi(0x2012000), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 200fd94: b0 10 00 13 mov %l3, %i0 200fd98: b2 10 00 1d mov %i5, %i1 200fd9c: 40 00 07 de call 2011d14 <_Thread_queue_Enqueue_with_handler> 200fda0: 95 ee a0 74 restore %i2, 0x74, %o2 =============================================================================== 020065dc <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 20065dc: 9d e3 bf a0 save %sp, -96, %sp _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 20065e0: 03 00 80 6f sethi %hi(0x201bc00), %g1 20065e4: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 201bd20 <_Thread_Dispatch_disable_level> 20065e8: 80 a0 60 00 cmp %g1, 0 20065ec: 02 80 00 0d be 2006620 <_CORE_mutex_Seize+0x44> 20065f0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20065f4: 80 8e a0 ff btst 0xff, %i2 20065f8: 02 80 00 0b be 2006624 <_CORE_mutex_Seize+0x48> <== NEVER TAKEN 20065fc: 90 10 00 18 mov %i0, %o0 2006600: 03 00 80 6f sethi %hi(0x201bc00), %g1 2006604: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 201bec0 <_System_state_Current> 2006608: 80 a0 60 01 cmp %g1, 1 200660c: 08 80 00 05 bleu 2006620 <_CORE_mutex_Seize+0x44> 2006610: 90 10 20 00 clr %o0 2006614: 92 10 20 00 clr %o1 2006618: 40 00 01 b4 call 2006ce8 <_Internal_error_Occurred> 200661c: 94 10 20 13 mov 0x13, %o2 2006620: 90 10 00 18 mov %i0, %o0 2006624: 40 00 15 f7 call 200be00 <_CORE_mutex_Seize_interrupt_trylock> 2006628: 92 07 a0 54 add %fp, 0x54, %o1 200662c: 80 a2 20 00 cmp %o0, 0 2006630: 02 80 00 09 be 2006654 <_CORE_mutex_Seize+0x78> 2006634: 80 8e a0 ff btst 0xff, %i2 2006638: 12 80 00 09 bne 200665c <_CORE_mutex_Seize+0x80> 200663c: 35 00 80 6f sethi %hi(0x201bc00), %i2 2006640: 7f ff ee e0 call 20021c0 2006644: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 2006648: c2 06 a1 e0 ld [ %i2 + 0x1e0 ], %g1 200664c: 84 10 20 01 mov 1, %g2 2006650: c4 20 60 34 st %g2, [ %g1 + 0x34 ] 2006654: 81 c7 e0 08 ret 2006658: 81 e8 00 00 restore 200665c: c4 06 a1 e0 ld [ %i2 + 0x1e0 ], %g2 2006660: 03 00 80 6f sethi %hi(0x201bc00), %g1 2006664: c6 00 61 20 ld [ %g1 + 0x120 ], %g3 ! 201bd20 <_Thread_Dispatch_disable_level> 2006668: f2 20 a0 20 st %i1, [ %g2 + 0x20 ] 200666c: f0 20 a0 44 st %i0, [ %g2 + 0x44 ] 2006670: 84 00 e0 01 add %g3, 1, %g2 2006674: c4 20 61 20 st %g2, [ %g1 + 0x120 ] 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; 2006678: 82 10 20 01 mov 1, %g1 200667c: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 2006680: 7f ff ee d0 call 20021c0 2006684: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 2006688: 90 10 00 18 mov %i0, %o0 200668c: 7f ff ff bb call 2006578 <_CORE_mutex_Seize_interrupt_blocking> 2006690: 92 10 00 1b mov %i3, %o1 2006694: 81 c7 e0 08 ret 2006698: 81 e8 00 00 restore =============================================================================== 02006840 <_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 ) { 2006840: 9d e3 bf a0 save %sp, -96, %sp 2006844: a0 10 00 18 mov %i0, %l0 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 2006848: b0 10 20 00 clr %i0 200684c: 40 00 05 ff call 2008048 <_Thread_queue_Dequeue> 2006850: 90 10 00 10 mov %l0, %o0 2006854: 80 a2 20 00 cmp %o0, 0 2006858: 12 80 00 0e bne 2006890 <_CORE_semaphore_Surrender+0x50> 200685c: 01 00 00 00 nop if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 2006860: 7f ff ee 54 call 20021b0 2006864: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 2006868: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 200686c: c4 04 20 40 ld [ %l0 + 0x40 ], %g2 2006870: 80 a0 40 02 cmp %g1, %g2 2006874: 1a 80 00 05 bcc 2006888 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN 2006878: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 200687c: 82 00 60 01 inc %g1 2006880: b0 10 20 00 clr %i0 2006884: c2 24 20 48 st %g1, [ %l0 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2006888: 7f ff ee 4e call 20021c0 200688c: 01 00 00 00 nop } return status; } 2006890: 81 c7 e0 08 ret 2006894: 81 e8 00 00 restore =============================================================================== 02005464 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 2005464: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 2005468: 03 00 80 6f sethi %hi(0x201bc00), %g1 200546c: e0 00 61 e0 ld [ %g1 + 0x1e0 ], %l0 ! 201bde0 <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 2005470: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 2005474: 7f ff f3 4f call 20021b0 2005478: e4 04 21 68 ld [ %l0 + 0x168 ], %l2 pending_events = api->pending_events; 200547c: c2 04 80 00 ld [ %l2 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 2005480: a2 8e 00 01 andcc %i0, %g1, %l1 2005484: 02 80 00 0e be 20054bc <_Event_Seize+0x58> 2005488: 80 8e 60 01 btst 1, %i1 200548c: 80 a4 40 18 cmp %l1, %i0 2005490: 02 80 00 04 be 20054a0 <_Event_Seize+0x3c> 2005494: 80 8e 60 02 btst 2, %i1 2005498: 02 80 00 09 be 20054bc <_Event_Seize+0x58> <== NEVER TAKEN 200549c: 80 8e 60 01 btst 1, %i1 (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 20054a0: 82 28 40 11 andn %g1, %l1, %g1 20054a4: c2 24 80 00 st %g1, [ %l2 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 20054a8: 7f ff f3 46 call 20021c0 20054ac: 01 00 00 00 nop 20054b0: e2 26 c0 00 st %l1, [ %i3 ] 20054b4: 81 c7 e0 08 ret 20054b8: 81 e8 00 00 restore *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 20054bc: 22 80 00 09 be,a 20054e0 <_Event_Seize+0x7c> 20054c0: f2 24 20 30 st %i1, [ %l0 + 0x30 ] _ISR_Enable( level ); 20054c4: 7f ff f3 3f call 20021c0 20054c8: 01 00 00 00 nop executing->Wait.return_code = RTEMS_UNSATISFIED; 20054cc: 82 10 20 0d mov 0xd, %g1 ! d 20054d0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 20054d4: e2 26 c0 00 st %l1, [ %i3 ] 20054d8: 81 c7 e0 08 ret 20054dc: 81 e8 00 00 restore * * 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; 20054e0: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 20054e4: f6 24 20 28 st %i3, [ %l0 + 0x28 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 20054e8: 84 10 20 01 mov 1, %g2 20054ec: 03 00 80 71 sethi %hi(0x201c400), %g1 20054f0: c4 20 62 54 st %g2, [ %g1 + 0x254 ] ! 201c654 <_Event_Sync_state> _ISR_Enable( level ); 20054f4: 7f ff f3 33 call 20021c0 20054f8: 01 00 00 00 nop if ( ticks ) { 20054fc: 80 a6 a0 00 cmp %i2, 0 2005500: 02 80 00 0f be 200553c <_Event_Seize+0xd8> 2005504: 90 10 00 10 mov %l0, %o0 _Watchdog_Initialize( 2005508: c2 04 20 08 ld [ %l0 + 8 ], %g1 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200550c: 11 00 80 6f sethi %hi(0x201bc00), %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2005510: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005514: 03 00 80 15 sethi %hi(0x2005400), %g1 2005518: 82 10 63 10 or %g1, 0x310, %g1 ! 2005710 <_Event_Timeout> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200551c: f4 24 20 54 st %i2, [ %l0 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2005520: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2005524: c0 24 20 6c clr [ %l0 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005528: c2 24 20 64 st %g1, [ %l0 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200552c: 90 12 22 00 or %o0, 0x200, %o0 2005530: 40 00 0e 35 call 2008e04 <_Watchdog_Insert> 2005534: 92 04 20 48 add %l0, 0x48, %o1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 2005538: 90 10 00 10 mov %l0, %o0 200553c: 40 00 0c 28 call 20085dc <_Thread_Set_state> 2005540: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 2005544: 7f ff f3 1b call 20021b0 2005548: 01 00 00 00 nop sync_state = _Event_Sync_state; 200554c: 03 00 80 71 sethi %hi(0x201c400), %g1 2005550: f0 00 62 54 ld [ %g1 + 0x254 ], %i0 ! 201c654 <_Event_Sync_state> _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 2005554: c0 20 62 54 clr [ %g1 + 0x254 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 2005558: 80 a6 20 01 cmp %i0, 1 200555c: 12 80 00 04 bne 200556c <_Event_Seize+0x108> 2005560: b2 10 00 10 mov %l0, %i1 _ISR_Enable( level ); 2005564: 7f ff f3 17 call 20021c0 2005568: 91 e8 00 08 restore %g0, %o0, %o0 * 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 ); 200556c: 40 00 08 15 call 20075c0 <_Thread_blocking_operation_Cancel> 2005570: 95 e8 00 08 restore %g0, %o0, %o2 =============================================================================== 020055d0 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 20055d0: 9d e3 bf a0 save %sp, -96, %sp 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 ]; 20055d4: e2 06 21 68 ld [ %i0 + 0x168 ], %l1 option_set = (rtems_option) the_thread->Wait.option; 20055d8: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 _ISR_Disable( level ); 20055dc: 7f ff f2 f5 call 20021b0 20055e0: a0 10 00 18 mov %i0, %l0 20055e4: b0 10 00 08 mov %o0, %i0 pending_events = api->pending_events; 20055e8: c4 04 40 00 ld [ %l1 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 20055ec: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 20055f0: 82 88 c0 02 andcc %g3, %g2, %g1 20055f4: 12 80 00 03 bne 2005600 <_Event_Surrender+0x30> 20055f8: 09 00 80 6f sethi %hi(0x201bc00), %g4 _ISR_Enable( level ); 20055fc: 30 80 00 42 b,a 2005704 <_Event_Surrender+0x134> /* * 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() && 2005600: c8 01 21 bc ld [ %g4 + 0x1bc ], %g4 ! 201bdbc <_ISR_Nest_level> 2005604: 80 a1 20 00 cmp %g4, 0 2005608: 22 80 00 1e be,a 2005680 <_Event_Surrender+0xb0> 200560c: c8 04 20 10 ld [ %l0 + 0x10 ], %g4 2005610: 09 00 80 6f sethi %hi(0x201bc00), %g4 2005614: c8 01 21 e0 ld [ %g4 + 0x1e0 ], %g4 ! 201bde0 <_Thread_Executing> 2005618: 80 a4 00 04 cmp %l0, %g4 200561c: 32 80 00 19 bne,a 2005680 <_Event_Surrender+0xb0> 2005620: c8 04 20 10 ld [ %l0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2005624: 09 00 80 71 sethi %hi(0x201c400), %g4 2005628: da 01 22 54 ld [ %g4 + 0x254 ], %o5 ! 201c654 <_Event_Sync_state> /* * 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() && 200562c: 80 a3 60 02 cmp %o5, 2 2005630: 02 80 00 07 be 200564c <_Event_Surrender+0x7c> <== NEVER TAKEN 2005634: 80 a0 40 03 cmp %g1, %g3 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 2005638: c8 01 22 54 ld [ %g4 + 0x254 ], %g4 /* * 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() && 200563c: 80 a1 20 01 cmp %g4, 1 2005640: 32 80 00 10 bne,a 2005680 <_Event_Surrender+0xb0> 2005644: c8 04 20 10 ld [ %l0 + 0x10 ], %g4 _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) ) { 2005648: 80 a0 40 03 cmp %g1, %g3 200564c: 02 80 00 04 be 200565c <_Event_Surrender+0x8c> 2005650: 80 8c a0 02 btst 2, %l2 2005654: 02 80 00 0a be 200567c <_Event_Surrender+0xac> <== NEVER TAKEN 2005658: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 200565c: 84 28 80 01 andn %g2, %g1, %g2 2005660: c4 24 40 00 st %g2, [ %l1 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005664: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 _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; 2005668: c0 24 20 24 clr [ %l0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 200566c: c2 20 80 00 st %g1, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005670: 84 10 20 03 mov 3, %g2 2005674: 03 00 80 71 sethi %hi(0x201c400), %g1 2005678: c4 20 62 54 st %g2, [ %g1 + 0x254 ] ! 201c654 <_Event_Sync_state> } _ISR_Enable( level ); 200567c: 30 80 00 22 b,a 2005704 <_Event_Surrender+0x134> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005680: 80 89 21 00 btst 0x100, %g4 2005684: 02 80 00 20 be 2005704 <_Event_Surrender+0x134> 2005688: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 200568c: 02 80 00 04 be 200569c <_Event_Surrender+0xcc> 2005690: 80 8c a0 02 btst 2, %l2 2005694: 02 80 00 1c be 2005704 <_Event_Surrender+0x134> <== NEVER TAKEN 2005698: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 200569c: 84 28 80 01 andn %g2, %g1, %g2 20056a0: c4 24 40 00 st %g2, [ %l1 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20056a4: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 * 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; 20056a8: c0 24 20 24 clr [ %l0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20056ac: c2 20 80 00 st %g1, [ %g2 ] _ISR_Flash( level ); 20056b0: 7f ff f2 c4 call 20021c0 20056b4: 90 10 00 18 mov %i0, %o0 20056b8: 7f ff f2 be call 20021b0 20056bc: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 20056c0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 20056c4: 80 a0 60 02 cmp %g1, 2 20056c8: 02 80 00 06 be 20056e0 <_Event_Surrender+0x110> 20056cc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 20056d0: 7f ff f2 bc call 20021c0 20056d4: 90 10 00 18 mov %i0, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 20056d8: 10 80 00 08 b 20056f8 <_Event_Surrender+0x128> 20056dc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 20056e0: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 20056e4: 7f ff f2 b7 call 20021c0 20056e8: 90 10 00 18 mov %i0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 20056ec: 40 00 0e 23 call 2008f78 <_Watchdog_Remove> 20056f0: 90 04 20 48 add %l0, 0x48, %o0 20056f4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 20056f8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 20056fc: 40 00 08 3f call 20077f8 <_Thread_Clear_state> 2005700: 91 e8 00 10 restore %g0, %l0, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2005704: 7f ff f2 af call 20021c0 2005708: 81 e8 00 00 restore =============================================================================== 02005710 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 2005710: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2005714: 90 10 00 18 mov %i0, %o0 2005718: 40 00 09 57 call 2007c74 <_Thread_Get> 200571c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2005720: c2 07 bf fc ld [ %fp + -4 ], %g1 2005724: 80 a0 60 00 cmp %g1, 0 2005728: 12 80 00 1c bne 2005798 <_Event_Timeout+0x88> <== NEVER TAKEN 200572c: a0 10 00 08 mov %o0, %l0 * * 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 ); 2005730: 7f ff f2 a0 call 20021b0 2005734: 01 00 00 00 nop return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005738: 03 00 80 6f sethi %hi(0x201bc00), %g1 200573c: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 201bde0 <_Thread_Executing> 2005740: 80 a4 00 01 cmp %l0, %g1 2005744: 12 80 00 09 bne 2005768 <_Event_Timeout+0x58> 2005748: c0 24 20 24 clr [ %l0 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 200574c: 03 00 80 71 sethi %hi(0x201c400), %g1 2005750: c4 00 62 54 ld [ %g1 + 0x254 ], %g2 ! 201c654 <_Event_Sync_state> 2005754: 80 a0 a0 01 cmp %g2, 1 2005758: 32 80 00 05 bne,a 200576c <_Event_Timeout+0x5c> 200575c: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2005760: 84 10 20 02 mov 2, %g2 2005764: c4 20 62 54 st %g2, [ %g1 + 0x254 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2005768: 82 10 20 06 mov 6, %g1 200576c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] _ISR_Enable( level ); 2005770: 7f ff f2 94 call 20021c0 2005774: 01 00 00 00 nop 2005778: 90 10 00 10 mov %l0, %o0 200577c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005780: 40 00 08 1e call 20077f8 <_Thread_Clear_state> 2005784: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2005788: 03 00 80 6f sethi %hi(0x201bc00), %g1 200578c: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201bd20 <_Thread_Dispatch_disable_level> 2005790: 84 00 bf ff add %g2, -1, %g2 2005794: c4 20 61 20 st %g2, [ %g1 + 0x120 ] 2005798: 81 c7 e0 08 ret 200579c: 81 e8 00 00 restore =============================================================================== 0200c02c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200c02c: 9d e3 bf 90 save %sp, -112, %sp 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; 200c030: ac 06 60 04 add %i1, 4, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200c034: e4 06 20 08 ld [ %i0 + 8 ], %l2 uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 200c038: 80 a5 80 19 cmp %l6, %i1 200c03c: 0a 80 00 6d bcs 200c1f0 <_Heap_Allocate_aligned_with_boundary+0x1c4> 200c040: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200c044: 80 a6 e0 00 cmp %i3, 0 200c048: 02 80 00 08 be 200c068 <_Heap_Allocate_aligned_with_boundary+0x3c> 200c04c: 82 10 20 04 mov 4, %g1 if ( boundary < alloc_size ) { 200c050: 80 a6 c0 19 cmp %i3, %i1 200c054: 0a 80 00 67 bcs 200c1f0 <_Heap_Allocate_aligned_with_boundary+0x1c4> 200c058: 80 a6 a0 00 cmp %i2, 0 return NULL; } if ( alignment == 0 ) { 200c05c: 22 80 00 03 be,a 200c068 <_Heap_Allocate_aligned_with_boundary+0x3c> 200c060: b4 10 00 14 mov %l4, %i2 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; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200c064: 82 10 20 04 mov 4, %g1 200c068: 82 20 40 19 sub %g1, %i1, %g1 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 200c06c: a2 10 20 00 clr %l1 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; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200c070: c2 27 bf f4 st %g1, [ %fp + -12 ] /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 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; 200c074: b8 10 3f f8 mov -8, %i4 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; 200c078: 82 05 20 07 add %l4, 7, %g1 200c07c: 10 80 00 4b b 200c1a8 <_Heap_Allocate_aligned_with_boundary+0x17c> 200c080: c2 27 bf f8 st %g1, [ %fp + -8 ] /* * 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 ) { 200c084: 80 a4 c0 16 cmp %l3, %l6 200c088: 08 80 00 47 bleu 200c1a4 <_Heap_Allocate_aligned_with_boundary+0x178> 200c08c: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 200c090: 80 a6 a0 00 cmp %i2, 0 200c094: 12 80 00 04 bne 200c0a4 <_Heap_Allocate_aligned_with_boundary+0x78> 200c098: aa 04 a0 08 add %l2, 8, %l5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 200c09c: 10 80 00 3f b 200c198 <_Heap_Allocate_aligned_with_boundary+0x16c> 200c0a0: a0 10 00 15 mov %l5, %l0 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; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200c0a4: c4 07 bf f4 ld [ %fp + -12 ], %g2 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 200c0a8: ee 06 20 14 ld [ %i0 + 0x14 ], %l7 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; 200c0ac: a6 0c ff fe and %l3, -2, %l3 200c0b0: a6 04 80 13 add %l2, %l3, %l3 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; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 200c0b4: a0 00 80 13 add %g2, %l3, %l0 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; 200c0b8: c4 07 bf f8 ld [ %fp + -8 ], %g2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200c0bc: 90 10 00 10 mov %l0, %o0 200c0c0: 82 20 80 17 sub %g2, %l7, %g1 200c0c4: 92 10 00 1a mov %i2, %o1 200c0c8: 40 00 31 52 call 2018610 <.urem> 200c0cc: a6 00 40 13 add %g1, %l3, %l3 200c0d0: a0 24 00 08 sub %l0, %o0, %l0 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 ) { 200c0d4: 80 a4 00 13 cmp %l0, %l3 200c0d8: 08 80 00 07 bleu 200c0f4 <_Heap_Allocate_aligned_with_boundary+0xc8> 200c0dc: 80 a6 e0 00 cmp %i3, 0 200c0e0: 90 10 00 13 mov %l3, %o0 200c0e4: 40 00 31 4b call 2018610 <.urem> 200c0e8: 92 10 00 1a mov %i2, %o1 200c0ec: a0 24 c0 08 sub %l3, %o0, %l0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200c0f0: 80 a6 e0 00 cmp %i3, 0 200c0f4: 02 80 00 1d be 200c168 <_Heap_Allocate_aligned_with_boundary+0x13c> 200c0f8: 80 a4 00 15 cmp %l0, %l5 /* 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; 200c0fc: a6 04 00 19 add %l0, %i1, %l3 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 200c100: 82 05 40 19 add %l5, %i1, %g1 200c104: 92 10 00 1b mov %i3, %o1 200c108: 90 10 00 13 mov %l3, %o0 200c10c: 10 80 00 0b b 200c138 <_Heap_Allocate_aligned_with_boundary+0x10c> 200c110: c2 27 bf fc st %g1, [ %fp + -4 ] uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 200c114: 80 a0 40 02 cmp %g1, %g2 200c118: 2a 80 00 24 bcs,a 200c1a8 <_Heap_Allocate_aligned_with_boundary+0x17c> 200c11c: e4 04 a0 08 ld [ %l2 + 8 ], %l2 200c120: 40 00 31 3c call 2018610 <.urem> 200c124: 01 00 00 00 nop 200c128: 92 10 00 1b mov %i3, %o1 200c12c: a0 27 40 08 sub %i5, %o0, %l0 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200c130: a6 04 00 19 add %l0, %i1, %l3 200c134: 90 10 00 13 mov %l3, %o0 200c138: 40 00 31 36 call 2018610 <.urem> 200c13c: 01 00 00 00 nop 200c140: 92 10 00 1a mov %i2, %o1 200c144: 82 24 c0 08 sub %l3, %o0, %g1 while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; 200c148: ba 20 40 19 sub %g1, %i1, %i5 /* 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 ) { 200c14c: 80 a0 40 13 cmp %g1, %l3 200c150: 1a 80 00 05 bcc 200c164 <_Heap_Allocate_aligned_with_boundary+0x138> 200c154: 90 10 00 1d mov %i5, %o0 200c158: 80 a4 00 01 cmp %l0, %g1 200c15c: 0a bf ff ee bcs 200c114 <_Heap_Allocate_aligned_with_boundary+0xe8> 200c160: c4 07 bf fc ld [ %fp + -4 ], %g2 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 ) { 200c164: 80 a4 00 15 cmp %l0, %l5 200c168: 0a 80 00 0f bcs 200c1a4 <_Heap_Allocate_aligned_with_boundary+0x178> 200c16c: a6 27 00 12 sub %i4, %l2, %l3 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; 200c170: 90 10 00 10 mov %l0, %o0 200c174: a6 04 c0 10 add %l3, %l0, %l3 200c178: 40 00 31 26 call 2018610 <.urem> 200c17c: 92 10 00 14 mov %l4, %o1 if ( free_size >= min_block_size || free_size == 0 ) { 200c180: 90 a4 c0 08 subcc %l3, %o0, %o0 200c184: 02 80 00 06 be 200c19c <_Heap_Allocate_aligned_with_boundary+0x170> 200c188: 80 a4 20 00 cmp %l0, 0 200c18c: 80 a2 00 17 cmp %o0, %l7 200c190: 2a 80 00 06 bcs,a 200c1a8 <_Heap_Allocate_aligned_with_boundary+0x17c> 200c194: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 200c198: 80 a4 20 00 cmp %l0, 0 200c19c: 32 80 00 08 bne,a 200c1bc <_Heap_Allocate_aligned_with_boundary+0x190><== ALWAYS TAKEN 200c1a0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 break; } block = block->next; 200c1a4: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 200c1a8: 80 a4 80 18 cmp %l2, %i0 200c1ac: 32 bf ff b6 bne,a 200c084 <_Heap_Allocate_aligned_with_boundary+0x58> 200c1b0: e6 04 a0 04 ld [ %l2 + 4 ], %l3 200c1b4: 10 80 00 09 b 200c1d8 <_Heap_Allocate_aligned_with_boundary+0x1ac> 200c1b8: a0 10 20 00 clr %l0 if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c1bc: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c1c0: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c1c4: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 200c1c8: c2 26 20 4c st %g1, [ %i0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200c1cc: 90 10 00 18 mov %i0, %o0 200c1d0: 7f ff ea 75 call 2006ba4 <_Heap_Block_allocate> 200c1d4: 94 10 00 10 mov %l0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 200c1d8: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 200c1dc: 80 a0 40 11 cmp %g1, %l1 200c1e0: 2a 80 00 02 bcs,a 200c1e8 <_Heap_Allocate_aligned_with_boundary+0x1bc> 200c1e4: e2 26 20 44 st %l1, [ %i0 + 0x44 ] /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; 200c1e8: 81 c7 e0 08 ret 200c1ec: 91 e8 00 10 restore %g0, %l0, %o0 } 200c1f0: 81 c7 e0 08 ret 200c1f4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020108fc <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 20108fc: 9d e3 bf a0 save %sp, -96, %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; uintptr_t const heap_area_end = heap->area_end; 2010900: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 2010904: a0 10 00 18 mov %i0, %l0 * 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 ) { 2010908: 80 a6 40 01 cmp %i1, %g1 201090c: 1a 80 00 07 bcc 2010928 <_Heap_Extend+0x2c> 2010910: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 uintptr_t *amount_extended ) { 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; 2010914: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 2010918: 80 a6 40 02 cmp %i1, %g2 201091c: 1a 80 00 28 bcc 20109bc <_Heap_Extend+0xc0> 2010920: b0 10 20 01 mov 1, %i0 * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 2010924: 80 a6 40 01 cmp %i1, %g1 2010928: 12 80 00 25 bne 20109bc <_Heap_Extend+0xc0> 201092c: b0 10 20 02 mov 2, %i0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 2010930: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 { 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; 2010934: b4 06 40 1a add %i1, %i2, %i2 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 2010938: b2 26 80 11 sub %i2, %l1, %i1 * 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; 201093c: f4 24 20 1c st %i2, [ %l0 + 0x1c ] extend_size = new_heap_area_end 2010940: b2 06 7f f8 add %i1, -8, %i1 2010944: 7f ff ce 03 call 2004150 <.urem> 2010948: 90 10 00 19 mov %i1, %o0 201094c: 90 26 40 08 sub %i1, %o0, %o0 - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 2010950: d0 26 c0 00 st %o0, [ %i3 ] if( extend_size >= heap->min_block_size ) { 2010954: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2010958: 80 a2 00 01 cmp %o0, %g1 201095c: 0a 80 00 18 bcs 20109bc <_Heap_Extend+0xc0> <== NEVER TAKEN 2010960: b0 10 20 00 clr %i0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 2010964: c2 04 60 04 ld [ %l1 + 4 ], %g1 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 = 2010968: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 201096c: 82 08 60 01 and %g1, 1, %g1 2010970: 82 12 00 01 or %o0, %g1, %g1 2010974: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2010978: 82 02 00 11 add %o0, %l1, %g1 201097c: 84 20 80 01 sub %g2, %g1, %g2 2010980: 84 10 a0 01 or %g2, 1, %g2 2010984: c4 20 60 04 st %g2, [ %g1 + 4 ] heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2010988: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 201098c: f2 04 20 2c ld [ %l0 + 0x2c ], %i1 ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 2010990: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 2010994: c2 24 20 24 st %g1, [ %l0 + 0x24 ] /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 2010998: 82 00 e0 01 add %g3, 1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 201099c: 90 06 40 08 add %i1, %o0, %o0 ++stats->used_blocks; 20109a0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] --stats->frees; /* Do not count subsequent call as actual free() */ 20109a4: 82 00 bf ff add %g2, -1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 20109a8: d0 24 20 2c st %o0, [ %l0 + 0x2c ] ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 20109ac: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 20109b0: 90 10 00 10 mov %l0, %o0 20109b4: 7f ff e8 07 call 200a9d0 <_Heap_Free> 20109b8: 92 04 60 08 add %l1, 8, %o1 } return HEAP_EXTEND_SUCCESSFUL; } 20109bc: 81 c7 e0 08 ret 20109c0: 81 e8 00 00 restore =============================================================================== 0200c1f8 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200c1f8: 9d e3 bf a0 save %sp, -96, %sp 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 ) 200c1fc: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200c200: 40 00 31 04 call 2018610 <.urem> 200c204: 90 10 00 19 mov %i1, %o0 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; 200c208: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 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 ) 200c20c: b2 06 7f f8 add %i1, -8, %i1 200c210: 90 26 40 08 sub %i1, %o0, %o0 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 200c214: 80 a2 00 01 cmp %o0, %g1 200c218: 0a 80 00 05 bcs 200c22c <_Heap_Free+0x34> 200c21c: 84 10 20 00 clr %g2 200c220: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200c224: 80 a0 80 08 cmp %g2, %o0 200c228: 84 60 3f ff subx %g0, -1, %g2 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 200c22c: 80 a0 a0 00 cmp %g2, 0 200c230: 02 80 00 6a be 200c3d8 <_Heap_Free+0x1e0> 200c234: 01 00 00 00 nop - 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; 200c238: c8 02 20 04 ld [ %o0 + 4 ], %g4 200c23c: 86 09 3f fe and %g4, -2, %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200c240: 84 02 00 03 add %o0, %g3, %g2 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 200c244: 80 a0 80 01 cmp %g2, %g1 200c248: 0a 80 00 05 bcs 200c25c <_Heap_Free+0x64> <== NEVER TAKEN 200c24c: 9a 10 20 00 clr %o5 200c250: da 06 20 24 ld [ %i0 + 0x24 ], %o5 200c254: 80 a3 40 02 cmp %o5, %g2 200c258: 9a 60 3f ff subx %g0, -1, %o5 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 200c25c: 80 a3 60 00 cmp %o5, 0 200c260: 02 80 00 5e be 200c3d8 <_Heap_Free+0x1e0> <== NEVER TAKEN 200c264: 01 00 00 00 nop 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; 200c268: da 00 a0 04 ld [ %g2 + 4 ], %o5 _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200c26c: 80 8b 60 01 btst 1, %o5 200c270: 02 80 00 5a be 200c3d8 <_Heap_Free+0x1e0> <== NEVER TAKEN 200c274: 9a 0b 7f fe and %o5, -2, %o5 return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200c278: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 200c27c: 80 a0 80 09 cmp %g2, %o1 200c280: 02 80 00 06 be 200c298 <_Heap_Free+0xa0> 200c284: 96 10 20 00 clr %o3 200c288: 98 00 80 0d add %g2, %o5, %o4 200c28c: d6 03 20 04 ld [ %o4 + 4 ], %o3 200c290: 96 0a e0 01 and %o3, 1, %o3 200c294: 96 1a e0 01 xor %o3, 1, %o3 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 200c298: 80 89 20 01 btst 1, %g4 200c29c: 12 80 00 26 bne 200c334 <_Heap_Free+0x13c> 200c2a0: 80 a2 e0 00 cmp %o3, 0 uintptr_t const prev_size = block->prev_size; 200c2a4: d8 02 00 00 ld [ %o0 ], %o4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200c2a8: 88 22 00 0c sub %o0, %o4, %g4 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 200c2ac: 80 a1 00 01 cmp %g4, %g1 200c2b0: 0a 80 00 04 bcs 200c2c0 <_Heap_Free+0xc8> <== NEVER TAKEN 200c2b4: 94 10 20 00 clr %o2 200c2b8: 80 a2 40 04 cmp %o1, %g4 200c2bc: 94 60 3f ff subx %g0, -1, %o2 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 200c2c0: 80 a2 a0 00 cmp %o2, 0 200c2c4: 02 80 00 45 be 200c3d8 <_Heap_Free+0x1e0> <== NEVER TAKEN 200c2c8: 01 00 00 00 nop return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 200c2cc: c2 01 20 04 ld [ %g4 + 4 ], %g1 200c2d0: 80 88 60 01 btst 1, %g1 200c2d4: 02 80 00 41 be 200c3d8 <_Heap_Free+0x1e0> <== NEVER TAKEN 200c2d8: 80 a2 e0 00 cmp %o3, 0 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200c2dc: 22 80 00 0f be,a 200c318 <_Heap_Free+0x120> 200c2e0: 98 00 c0 0c add %g3, %o4, %o4 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200c2e4: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 200c2e8: d6 00 a0 0c ld [ %g2 + 0xc ], %o3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200c2ec: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200c2f0: 82 00 7f ff add %g1, -1, %g1 200c2f4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 200c2f8: 9a 00 c0 0d add %g3, %o5, %o5 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 200c2fc: d6 20 a0 0c st %o3, [ %g2 + 0xc ] 200c300: 98 03 40 0c add %o5, %o4, %o4 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 200c304: c4 22 e0 08 st %g2, [ %o3 + 8 ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 200c308: d8 21 00 0c st %o4, [ %g4 + %o4 ] if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200c30c: 98 13 20 01 or %o4, 1, %o4 200c310: 10 80 00 27 b 200c3ac <_Heap_Free+0x1b4> 200c314: d8 21 20 04 st %o4, [ %g4 + 4 ] next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200c318: 82 13 20 01 or %o4, 1, %g1 200c31c: c2 21 20 04 st %g1, [ %g4 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c320: c2 00 a0 04 ld [ %g2 + 4 ], %g1 next_block->prev_size = size; 200c324: d8 22 00 03 st %o4, [ %o0 + %g3 ] _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c328: 82 08 7f fe and %g1, -2, %g1 200c32c: 10 80 00 20 b 200c3ac <_Heap_Free+0x1b4> 200c330: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200c334: 02 80 00 0d be 200c368 <_Heap_Free+0x170> 200c338: 82 10 e0 01 or %g3, 1, %g1 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 200c33c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 200c340: c4 00 a0 08 ld [ %g2 + 8 ], %g2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 200c344: c2 22 20 0c st %g1, [ %o0 + 0xc ] ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 200c348: c4 22 20 08 st %g2, [ %o0 + 8 ] new_block->prev = prev; next->prev = new_block; prev->next = new_block; 200c34c: d0 20 60 08 st %o0, [ %g1 + 8 ] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 200c350: d0 20 a0 0c st %o0, [ %g2 + 0xc ] uintptr_t const size = block_size + next_block_size; 200c354: 82 03 40 03 add %o5, %g3, %g1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200c358: c2 22 00 01 st %g1, [ %o0 + %g1 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200c35c: 82 10 60 01 or %g1, 1, %g1 200c360: 10 80 00 13 b 200c3ac <_Heap_Free+0x1b4> 200c364: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 200c368: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c36c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 200c370: c8 06 20 08 ld [ %i0 + 8 ], %g4 200c374: 82 08 7f fe and %g1, -2, %g1 next_block->prev_size = block_size; 200c378: c6 22 00 03 st %g3, [ %o0 + %g3 ] } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200c37c: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200c380: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 new_block->next = next; 200c384: c8 22 20 08 st %g4, [ %o0 + 8 ] new_block->prev = block_before; 200c388: f0 22 20 0c st %i0, [ %o0 + 0xc ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 200c38c: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200c390: 82 00 60 01 inc %g1 block_before->next = new_block; next->prev = new_block; 200c394: d0 21 20 0c st %o0, [ %g4 + 0xc ] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 200c398: d0 26 20 08 st %o0, [ %i0 + 8 ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 200c39c: 80 a0 80 01 cmp %g2, %g1 200c3a0: 1a 80 00 03 bcc 200c3ac <_Heap_Free+0x1b4> 200c3a4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 200c3a8: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200c3ac: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 200c3b0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 200c3b4: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200c3b8: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; stats->free_size += block_size; 200c3bc: 86 01 00 03 add %g4, %g3, %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200c3c0: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; stats->free_size += block_size; 200c3c4: c6 26 20 30 st %g3, [ %i0 + 0x30 ] } } /* Statistics */ --stats->used_blocks; ++stats->frees; 200c3c8: 82 00 60 01 inc %g1 200c3cc: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; return( true ); 200c3d0: 81 c7 e0 08 ret 200c3d4: 91 e8 20 01 restore %g0, 1, %o0 } 200c3d8: 81 c7 e0 08 ret 200c3dc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0201993c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 201993c: 9d e3 bf a0 save %sp, -96, %sp 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 ) 2019940: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2019944: 7f ff fb 33 call 2018610 <.urem> 2019948: 90 10 00 19 mov %i1, %o0 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; 201994c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 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 ) 2019950: 84 06 7f f8 add %i1, -8, %g2 2019954: 90 20 80 08 sub %g2, %o0, %o0 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 2019958: 80 a2 00 01 cmp %o0, %g1 201995c: 0a 80 00 05 bcs 2019970 <_Heap_Size_of_alloc_area+0x34> 2019960: 84 10 20 00 clr %g2 2019964: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 2019968: 80 a0 80 08 cmp %g2, %o0 201996c: 84 60 3f ff subx %g0, -1, %g2 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 ) ) { 2019970: 80 a0 a0 00 cmp %g2, 0 2019974: 02 80 00 16 be 20199cc <_Heap_Size_of_alloc_area+0x90> 2019978: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 201997c: c4 02 20 04 ld [ %o0 + 4 ], %g2 2019980: 84 08 bf fe and %g2, -2, %g2 2019984: 84 02 00 02 add %o0, %g2, %g2 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 2019988: 80 a0 80 01 cmp %g2, %g1 201998c: 0a 80 00 05 bcs 20199a0 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 2019990: 86 10 20 00 clr %g3 2019994: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2019998: 80 a0 40 02 cmp %g1, %g2 201999c: 86 60 3f ff subx %g0, -1, %g3 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 20199a0: 80 a0 e0 00 cmp %g3, 0 20199a4: 02 80 00 0a be 20199cc <_Heap_Size_of_alloc_area+0x90> <== NEVER TAKEN 20199a8: 01 00 00 00 nop 20199ac: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20199b0: 80 88 60 01 btst 1, %g1 20199b4: 02 80 00 06 be 20199cc <_Heap_Size_of_alloc_area+0x90> <== NEVER TAKEN 20199b8: 84 20 80 19 sub %g2, %i1, %g2 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 20199bc: 84 00 a0 04 add %g2, 4, %g2 20199c0: c4 26 80 00 st %g2, [ %i2 ] return true; 20199c4: 81 c7 e0 08 ret 20199c8: 91 e8 20 01 restore %g0, 1, %o0 } 20199cc: 81 c7 e0 08 ret 20199d0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02007b24 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2007b24: 9d e3 bf 88 save %sp, -120, %sp 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; 2007b28: 23 00 80 1f sethi %hi(0x2007c00), %l1 2007b2c: 80 8e a0 ff btst 0xff, %i2 2007b30: a2 14 63 fc or %l1, 0x3fc, %l1 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2007b34: e4 06 20 10 ld [ %i0 + 0x10 ], %l2 uintptr_t const min_block_size = heap->min_block_size; 2007b38: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 2007b3c: e8 06 20 24 ld [ %i0 + 0x24 ], %l4 Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 2007b40: 12 80 00 04 bne 2007b50 <_Heap_Walk+0x2c> 2007b44: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 2007b48: 23 00 80 1e sethi %hi(0x2007800), %l1 2007b4c: a2 14 63 1c or %l1, 0x31c, %l1 ! 2007b1c <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2007b50: 03 00 80 79 sethi %hi(0x201e400), %g1 2007b54: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 201e590 <_System_state_Current> 2007b58: 80 a0 60 03 cmp %g1, 3 2007b5c: 12 80 01 1e bne 2007fd4 <_Heap_Walk+0x4b0> 2007b60: 90 10 00 19 mov %i1, %o0 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)( 2007b64: da 06 20 18 ld [ %i0 + 0x18 ], %o5 2007b68: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2007b6c: c4 06 20 08 ld [ %i0 + 8 ], %g2 2007b70: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2007b74: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2007b78: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2007b7c: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2007b80: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 2007b84: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 2007b88: 92 10 20 00 clr %o1 2007b8c: 15 00 80 6d sethi %hi(0x201b400), %o2 2007b90: 96 10 00 12 mov %l2, %o3 2007b94: 94 12 a0 f0 or %o2, 0xf0, %o2 2007b98: 9f c4 40 00 call %l1 2007b9c: 98 10 00 13 mov %l3, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 2007ba0: 80 a4 a0 00 cmp %l2, 0 2007ba4: 12 80 00 07 bne 2007bc0 <_Heap_Walk+0x9c> 2007ba8: 80 8c a0 07 btst 7, %l2 (*printer)( source, true, "page size is zero\n" ); 2007bac: 15 00 80 6d sethi %hi(0x201b400), %o2 2007bb0: 90 10 00 19 mov %i1, %o0 2007bb4: 92 10 20 01 mov 1, %o1 2007bb8: 10 80 00 27 b 2007c54 <_Heap_Walk+0x130> 2007bbc: 94 12 a1 88 or %o2, 0x188, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2007bc0: 22 80 00 08 be,a 2007be0 <_Heap_Walk+0xbc> 2007bc4: 90 10 00 13 mov %l3, %o0 (*printer)( 2007bc8: 15 00 80 6d sethi %hi(0x201b400), %o2 2007bcc: 90 10 00 19 mov %i1, %o0 2007bd0: 96 10 00 12 mov %l2, %o3 2007bd4: 92 10 20 01 mov 1, %o1 2007bd8: 10 80 01 05 b 2007fec <_Heap_Walk+0x4c8> 2007bdc: 94 12 a1 a0 or %o2, 0x1a0, %o2 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2007be0: 7f ff e7 be call 2001ad8 <.urem> 2007be4: 92 10 00 12 mov %l2, %o1 2007be8: 80 a2 20 00 cmp %o0, 0 2007bec: 22 80 00 08 be,a 2007c0c <_Heap_Walk+0xe8> 2007bf0: 90 04 20 08 add %l0, 8, %o0 (*printer)( 2007bf4: 15 00 80 6d sethi %hi(0x201b400), %o2 2007bf8: 90 10 00 19 mov %i1, %o0 2007bfc: 96 10 00 13 mov %l3, %o3 2007c00: 92 10 20 01 mov 1, %o1 2007c04: 10 80 00 fa b 2007fec <_Heap_Walk+0x4c8> 2007c08: 94 12 a1 c0 or %o2, 0x1c0, %o2 ); return false; } if ( 2007c0c: 7f ff e7 b3 call 2001ad8 <.urem> 2007c10: 92 10 00 12 mov %l2, %o1 2007c14: 80 a2 20 00 cmp %o0, 0 2007c18: 22 80 00 08 be,a 2007c38 <_Heap_Walk+0x114> 2007c1c: c2 04 20 04 ld [ %l0 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2007c20: 15 00 80 6d sethi %hi(0x201b400), %o2 2007c24: 90 10 00 19 mov %i1, %o0 2007c28: 96 10 00 10 mov %l0, %o3 2007c2c: 92 10 20 01 mov 1, %o1 2007c30: 10 80 00 ef b 2007fec <_Heap_Walk+0x4c8> 2007c34: 94 12 a1 e8 or %o2, 0x1e8, %o2 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2007c38: 80 88 60 01 btst 1, %g1 2007c3c: 32 80 00 09 bne,a 2007c60 <_Heap_Walk+0x13c> 2007c40: ea 04 00 00 ld [ %l0 ], %l5 (*printer)( 2007c44: 15 00 80 6d sethi %hi(0x201b400), %o2 2007c48: 90 10 00 19 mov %i1, %o0 2007c4c: 92 10 20 01 mov 1, %o1 2007c50: 94 12 a2 20 or %o2, 0x220, %o2 2007c54: 9f c4 40 00 call %l1 2007c58: b0 10 20 00 clr %i0 2007c5c: 30 80 00 e6 b,a 2007ff4 <_Heap_Walk+0x4d0> ); return false; } if ( first_block->prev_size != page_size ) { 2007c60: 80 a5 40 12 cmp %l5, %l2 2007c64: 22 80 00 09 be,a 2007c88 <_Heap_Walk+0x164> 2007c68: c2 05 20 04 ld [ %l4 + 4 ], %g1 (*printer)( 2007c6c: 15 00 80 6d sethi %hi(0x201b400), %o2 2007c70: 90 10 00 19 mov %i1, %o0 2007c74: 96 10 00 15 mov %l5, %o3 2007c78: 98 10 00 12 mov %l2, %o4 2007c7c: 92 10 20 01 mov 1, %o1 2007c80: 10 80 00 88 b 2007ea0 <_Heap_Walk+0x37c> 2007c84: 94 12 a2 50 or %o2, 0x250, %o2 ); return false; } if ( _Heap_Is_free( last_block ) ) { 2007c88: 82 08 7f fe and %g1, -2, %g1 2007c8c: 82 05 00 01 add %l4, %g1, %g1 2007c90: c2 00 60 04 ld [ %g1 + 4 ], %g1 2007c94: 80 88 60 01 btst 1, %g1 2007c98: 32 80 00 07 bne,a 2007cb4 <_Heap_Walk+0x190> 2007c9c: d6 06 20 08 ld [ %i0 + 8 ], %o3 (*printer)( 2007ca0: 15 00 80 6d sethi %hi(0x201b400), %o2 2007ca4: 90 10 00 19 mov %i1, %o0 2007ca8: 92 10 20 01 mov 1, %o1 2007cac: 10 bf ff ea b 2007c54 <_Heap_Walk+0x130> 2007cb0: 94 12 a2 80 or %o2, 0x280, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 2007cb4: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2007cb8: a4 10 00 18 mov %i0, %l2 2007cbc: 10 80 00 32 b 2007d84 <_Heap_Walk+0x260> 2007cc0: ae 10 00 0b mov %o3, %l7 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 2007cc4: 80 a0 80 17 cmp %g2, %l7 2007cc8: 18 80 00 05 bgu 2007cdc <_Heap_Walk+0x1b8> 2007ccc: 82 10 20 00 clr %g1 2007cd0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2007cd4: 80 a0 40 17 cmp %g1, %l7 2007cd8: 82 60 3f ff subx %g0, -1, %g1 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 ) ) { 2007cdc: 80 a0 60 00 cmp %g1, 0 2007ce0: 32 80 00 08 bne,a 2007d00 <_Heap_Walk+0x1dc> 2007ce4: 90 05 e0 08 add %l7, 8, %o0 (*printer)( 2007ce8: 15 00 80 6d sethi %hi(0x201b400), %o2 2007cec: 96 10 00 17 mov %l7, %o3 2007cf0: 90 10 00 19 mov %i1, %o0 2007cf4: 92 10 20 01 mov 1, %o1 2007cf8: 10 80 00 bd b 2007fec <_Heap_Walk+0x4c8> 2007cfc: 94 12 a2 98 or %o2, 0x298, %o2 ); return false; } if ( 2007d00: 7f ff e7 76 call 2001ad8 <.urem> 2007d04: 92 10 00 16 mov %l6, %o1 2007d08: 80 a2 20 00 cmp %o0, 0 2007d0c: 22 80 00 08 be,a 2007d2c <_Heap_Walk+0x208> 2007d10: c2 05 e0 04 ld [ %l7 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 2007d14: 15 00 80 6d sethi %hi(0x201b400), %o2 2007d18: 96 10 00 17 mov %l7, %o3 2007d1c: 90 10 00 19 mov %i1, %o0 2007d20: 92 10 20 01 mov 1, %o1 2007d24: 10 80 00 b2 b 2007fec <_Heap_Walk+0x4c8> 2007d28: 94 12 a2 b8 or %o2, 0x2b8, %o2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2007d2c: 82 08 7f fe and %g1, -2, %g1 2007d30: 82 05 c0 01 add %l7, %g1, %g1 2007d34: c2 00 60 04 ld [ %g1 + 4 ], %g1 2007d38: 80 88 60 01 btst 1, %g1 2007d3c: 22 80 00 08 be,a 2007d5c <_Heap_Walk+0x238> 2007d40: d8 05 e0 0c ld [ %l7 + 0xc ], %o4 (*printer)( 2007d44: 15 00 80 6d sethi %hi(0x201b400), %o2 2007d48: 96 10 00 17 mov %l7, %o3 2007d4c: 90 10 00 19 mov %i1, %o0 2007d50: 92 10 20 01 mov 1, %o1 2007d54: 10 80 00 a6 b 2007fec <_Heap_Walk+0x4c8> 2007d58: 94 12 a2 e8 or %o2, 0x2e8, %o2 ); return false; } if ( free_block->prev != prev_block ) { 2007d5c: 80 a3 00 12 cmp %o4, %l2 2007d60: 02 80 00 08 be 2007d80 <_Heap_Walk+0x25c> 2007d64: a4 10 00 17 mov %l7, %l2 (*printer)( 2007d68: 15 00 80 6d sethi %hi(0x201b400), %o2 2007d6c: 96 10 00 17 mov %l7, %o3 2007d70: 90 10 00 19 mov %i1, %o0 2007d74: 92 10 20 01 mov 1, %o1 2007d78: 10 80 00 4a b 2007ea0 <_Heap_Walk+0x37c> 2007d7c: 94 12 a3 08 or %o2, 0x308, %o2 return false; } prev_block = free_block; free_block = free_block->next; 2007d80: ee 05 e0 08 ld [ %l7 + 8 ], %l7 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 ) { 2007d84: 80 a5 c0 18 cmp %l7, %i0 2007d88: 32 bf ff cf bne,a 2007cc4 <_Heap_Walk+0x1a0> 2007d8c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007d90: 10 80 00 89 b 2007fb4 <_Heap_Walk+0x490> 2007d94: 37 00 80 6d sethi %hi(0x201b400), %i3 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 ) { 2007d98: 80 8d a0 01 btst 1, %l6 - 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; 2007d9c: ac 0d bf fe and %l6, -2, %l6 2007da0: 02 80 00 0a be 2007dc8 <_Heap_Walk+0x2a4> 2007da4: a4 04 00 16 add %l0, %l6, %l2 (*printer)( 2007da8: 90 10 00 19 mov %i1, %o0 2007dac: 92 10 20 00 clr %o1 2007db0: 94 10 00 1a mov %i2, %o2 2007db4: 96 10 00 10 mov %l0, %o3 2007db8: 9f c4 40 00 call %l1 2007dbc: 98 10 00 16 mov %l6, %o4 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 2007dc0: 10 80 00 0a b 2007de8 <_Heap_Walk+0x2c4> 2007dc4: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007dc8: da 04 00 00 ld [ %l0 ], %o5 2007dcc: 90 10 00 19 mov %i1, %o0 2007dd0: 92 10 20 00 clr %o1 2007dd4: 94 10 00 1b mov %i3, %o2 2007dd8: 96 10 00 10 mov %l0, %o3 2007ddc: 9f c4 40 00 call %l1 2007de0: 98 10 00 16 mov %l6, %o4 2007de4: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2007de8: 80 a0 80 12 cmp %g2, %l2 2007dec: 18 80 00 05 bgu 2007e00 <_Heap_Walk+0x2dc> <== NEVER TAKEN 2007df0: 82 10 20 00 clr %g1 2007df4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2007df8: 80 a0 40 12 cmp %g1, %l2 2007dfc: 82 60 3f ff subx %g0, -1, %g1 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 2007e00: 80 a0 60 00 cmp %g1, 0 2007e04: 32 80 00 09 bne,a 2007e28 <_Heap_Walk+0x304> 2007e08: 90 10 00 16 mov %l6, %o0 (*printer)( 2007e0c: 15 00 80 6d sethi %hi(0x201b400), %o2 2007e10: 90 10 00 19 mov %i1, %o0 2007e14: 96 10 00 10 mov %l0, %o3 2007e18: 98 10 00 12 mov %l2, %o4 2007e1c: 92 10 20 01 mov 1, %o1 2007e20: 10 80 00 20 b 2007ea0 <_Heap_Walk+0x37c> 2007e24: 94 12 a3 80 or %o2, 0x380, %o2 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 2007e28: 7f ff e7 2c call 2001ad8 <.urem> 2007e2c: 92 10 00 15 mov %l5, %o1 2007e30: 80 a2 20 00 cmp %o0, 0 2007e34: 02 80 00 09 be 2007e58 <_Heap_Walk+0x334> 2007e38: 80 a5 80 13 cmp %l6, %l3 (*printer)( 2007e3c: 15 00 80 6d sethi %hi(0x201b400), %o2 2007e40: 90 10 00 19 mov %i1, %o0 2007e44: 96 10 00 10 mov %l0, %o3 2007e48: 98 10 00 16 mov %l6, %o4 2007e4c: 92 10 20 01 mov 1, %o1 2007e50: 10 80 00 14 b 2007ea0 <_Heap_Walk+0x37c> 2007e54: 94 12 a3 b0 or %o2, 0x3b0, %o2 ); return false; } if ( block_size < min_block_size ) { 2007e58: 1a 80 00 0a bcc 2007e80 <_Heap_Walk+0x35c> 2007e5c: 80 a4 80 10 cmp %l2, %l0 (*printer)( 2007e60: 15 00 80 6d sethi %hi(0x201b400), %o2 2007e64: 90 10 00 19 mov %i1, %o0 2007e68: 96 10 00 10 mov %l0, %o3 2007e6c: 98 10 00 16 mov %l6, %o4 2007e70: 9a 10 00 13 mov %l3, %o5 2007e74: 92 10 20 01 mov 1, %o1 2007e78: 10 80 00 3b b 2007f64 <_Heap_Walk+0x440> 2007e7c: 94 12 a3 e0 or %o2, 0x3e0, %o2 ); return false; } if ( next_block_begin <= block_begin ) { 2007e80: 38 80 00 0b bgu,a 2007eac <_Heap_Walk+0x388> 2007e84: c2 04 a0 04 ld [ %l2 + 4 ], %g1 (*printer)( 2007e88: 15 00 80 6e sethi %hi(0x201b800), %o2 2007e8c: 90 10 00 19 mov %i1, %o0 2007e90: 96 10 00 10 mov %l0, %o3 2007e94: 98 10 00 12 mov %l2, %o4 2007e98: 92 10 20 01 mov 1, %o1 2007e9c: 94 12 a0 10 or %o2, 0x10, %o2 2007ea0: 9f c4 40 00 call %l1 2007ea4: b0 10 20 00 clr %i0 2007ea8: 30 80 00 53 b,a 2007ff4 <_Heap_Walk+0x4d0> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2007eac: 80 88 60 01 btst 1, %g1 2007eb0: 32 80 00 46 bne,a 2007fc8 <_Heap_Walk+0x4a4> 2007eb4: a0 10 00 12 mov %l2, %l0 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; 2007eb8: fa 04 20 04 ld [ %l0 + 4 ], %i5 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)( 2007ebc: d8 04 20 0c ld [ %l0 + 0xc ], %o4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2007ec0: c2 06 20 08 ld [ %i0 + 8 ], %g1 - 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; 2007ec4: ac 0f 7f fe and %i5, -2, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2007ec8: 1b 00 80 6e sethi %hi(0x201b800), %o5 2007ecc: 80 a3 00 01 cmp %o4, %g1 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 2007ed0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2007ed4: ae 04 00 16 add %l0, %l6, %l7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2007ed8: 02 80 00 07 be 2007ef4 <_Heap_Walk+0x3d0> 2007edc: 9a 13 60 48 or %o5, 0x48, %o5 "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)" : ""), 2007ee0: 1b 00 80 6e sethi %hi(0x201b800), %o5 2007ee4: 80 a3 00 18 cmp %o4, %i0 2007ee8: 02 80 00 03 be 2007ef4 <_Heap_Walk+0x3d0> 2007eec: 9a 13 60 60 or %o5, 0x60, %o5 2007ef0: 9a 10 00 1c mov %i4, %o5 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)( 2007ef4: c4 04 20 08 ld [ %l0 + 8 ], %g2 2007ef8: 03 00 80 6e sethi %hi(0x201b800), %g1 2007efc: 80 a0 80 03 cmp %g2, %g3 2007f00: 02 80 00 07 be 2007f1c <_Heap_Walk+0x3f8> 2007f04: 82 10 60 70 or %g1, 0x70, %g1 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2007f08: 03 00 80 6e sethi %hi(0x201b800), %g1 2007f0c: 80 a0 80 18 cmp %g2, %i0 2007f10: 02 80 00 03 be 2007f1c <_Heap_Walk+0x3f8> 2007f14: 82 10 60 80 or %g1, 0x80, %g1 2007f18: 82 10 00 1c mov %i4, %g1 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)( 2007f1c: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 2007f20: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 2007f24: 90 10 00 19 mov %i1, %o0 2007f28: 92 10 20 00 clr %o1 2007f2c: 15 00 80 6e sethi %hi(0x201b800), %o2 2007f30: 96 10 00 10 mov %l0, %o3 2007f34: 9f c4 40 00 call %l1 2007f38: 94 12 a0 90 or %o2, 0x90, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 2007f3c: da 05 c0 00 ld [ %l7 ], %o5 2007f40: 80 a5 80 0d cmp %l6, %o5 2007f44: 02 80 00 0b be 2007f70 <_Heap_Walk+0x44c> 2007f48: 15 00 80 6e sethi %hi(0x201b800), %o2 (*printer)( 2007f4c: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 2007f50: 90 10 00 19 mov %i1, %o0 2007f54: 96 10 00 10 mov %l0, %o3 2007f58: 98 10 00 16 mov %l6, %o4 2007f5c: 92 10 20 01 mov 1, %o1 2007f60: 94 12 a0 c0 or %o2, 0xc0, %o2 2007f64: 9f c4 40 00 call %l1 2007f68: b0 10 20 00 clr %i0 2007f6c: 30 80 00 22 b,a 2007ff4 <_Heap_Walk+0x4d0> ); return false; } if ( !prev_used ) { 2007f70: 80 8f 60 01 btst 1, %i5 2007f74: 32 80 00 0b bne,a 2007fa0 <_Heap_Walk+0x47c> 2007f78: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 2007f7c: 15 00 80 6e sethi %hi(0x201b800), %o2 2007f80: 90 10 00 19 mov %i1, %o0 2007f84: 96 10 00 10 mov %l0, %o3 2007f88: 92 10 20 01 mov 1, %o1 2007f8c: 10 80 00 18 b 2007fec <_Heap_Walk+0x4c8> 2007f90: 94 12 a1 00 or %o2, 0x100, %o2 { 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 ) { 2007f94: 22 80 00 0d be,a 2007fc8 <_Heap_Walk+0x4a4> 2007f98: a0 10 00 12 mov %l2, %l0 return true; } free_block = free_block->next; 2007f9c: c2 00 60 08 ld [ %g1 + 8 ], %g1 ) { 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 ) { 2007fa0: 80 a0 40 18 cmp %g1, %i0 2007fa4: 12 bf ff fc bne 2007f94 <_Heap_Walk+0x470> 2007fa8: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2007fac: 10 80 00 0c b 2007fdc <_Heap_Walk+0x4b8> 2007fb0: 15 00 80 6e sethi %hi(0x201b800), %o2 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 ) { (*printer)( 2007fb4: 35 00 80 6d sethi %hi(0x201b400), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2007fb8: 39 00 80 6e sethi %hi(0x201b800), %i4 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2007fbc: b6 16 e3 58 or %i3, 0x358, %i3 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 ) { (*printer)( 2007fc0: b4 16 a3 40 or %i2, 0x340, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 2007fc4: b8 17 20 58 or %i4, 0x58, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 2007fc8: 80 a4 00 14 cmp %l0, %l4 2007fcc: 32 bf ff 73 bne,a 2007d98 <_Heap_Walk+0x274> 2007fd0: ec 04 20 04 ld [ %l0 + 4 ], %l6 block = next_block; } return true; } 2007fd4: 81 c7 e0 08 ret 2007fd8: 91 e8 20 01 restore %g0, 1, %o0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2007fdc: 90 10 00 19 mov %i1, %o0 2007fe0: 96 10 00 10 mov %l0, %o3 2007fe4: 92 10 20 01 mov 1, %o1 2007fe8: 94 12 a1 30 or %o2, 0x130, %o2 2007fec: 9f c4 40 00 call %l1 2007ff0: b0 10 20 00 clr %i0 2007ff4: 81 c7 e0 08 ret 2007ff8: 81 e8 00 00 restore =============================================================================== 02006da0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006da0: 9d e3 bf a0 save %sp, -96, %sp * 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 ) 2006da4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006da8: a0 10 00 18 mov %i0, %l0 * 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 ) 2006dac: 80 a0 60 00 cmp %g1, 0 2006db0: 02 80 00 20 be 2006e30 <_Objects_Allocate+0x90> <== NEVER TAKEN 2006db4: b0 10 20 00 clr %i0 /* * 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 ); 2006db8: a2 04 20 20 add %l0, 0x20, %l1 2006dbc: 40 00 13 f3 call 200bd88 <_Chain_Get> 2006dc0: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 2006dc4: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 2006dc8: 80 a0 60 00 cmp %g1, 0 2006dcc: 02 80 00 19 be 2006e30 <_Objects_Allocate+0x90> 2006dd0: b0 10 00 08 mov %o0, %i0 /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 2006dd4: 80 a2 20 00 cmp %o0, 0 2006dd8: 32 80 00 0a bne,a 2006e00 <_Objects_Allocate+0x60> 2006ddc: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 _Objects_Extend_information( information ); 2006de0: 40 00 00 1e call 2006e58 <_Objects_Extend_information> 2006de4: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2006de8: 40 00 13 e8 call 200bd88 <_Chain_Get> 2006dec: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 2006df0: b0 92 20 00 orcc %o0, 0, %i0 2006df4: 02 80 00 0f be 2006e30 <_Objects_Allocate+0x90> 2006df8: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2006dfc: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 2006e00: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006e04: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1 2006e08: 40 00 45 56 call 2018360 <.udiv> 2006e0c: 90 22 00 01 sub %o0, %g1, %o0 2006e10: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 2006e14: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 2006e18: c6 14 20 2c lduh [ %l0 + 0x2c ], %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006e1c: c4 00 40 08 ld [ %g1 + %o0 ], %g2 information->inactive--; 2006e20: 86 00 ff ff add %g3, -1, %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006e24: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 2006e28: c6 34 20 2c sth %g3, [ %l0 + 0x2c ] block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006e2c: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; } } return the_object; } 2006e30: 81 c7 e0 08 ret 2006e34: 81 e8 00 00 restore =============================================================================== 02006e58 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2006e58: 9d e3 bf 90 save %sp, -112, %sp minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 2006e5c: e4 06 20 34 ld [ %i0 + 0x34 ], %l2 2006e60: 80 a4 a0 00 cmp %l2, 0 2006e64: 12 80 00 06 bne 2006e7c <_Objects_Extend_information+0x24> 2006e68: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 2006e6c: a0 10 00 13 mov %l3, %l0 2006e70: a2 10 20 00 clr %l1 2006e74: 10 80 00 15 b 2006ec8 <_Objects_Extend_information+0x70> 2006e78: a8 10 20 00 clr %l4 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006e7c: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 2006e80: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 2006e84: 40 00 45 37 call 2018360 <.udiv> 2006e88: 92 10 00 11 mov %l1, %o1 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 2006e8c: 82 10 00 11 mov %l1, %g1 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006e90: 91 2a 20 10 sll %o0, 0x10, %o0 2006e94: a0 10 00 13 mov %l3, %l0 2006e98: a9 32 20 10 srl %o0, 0x10, %l4 for ( ; block < block_count; block++ ) { 2006e9c: 10 80 00 08 b 2006ebc <_Objects_Extend_information+0x64> 2006ea0: a2 10 20 00 clr %l1 if ( information->object_blocks[ block ] == NULL ) 2006ea4: c4 04 80 02 ld [ %l2 + %g2 ], %g2 2006ea8: 80 a0 a0 00 cmp %g2, 0 2006eac: 22 80 00 08 be,a 2006ecc <_Objects_Extend_information+0x74> 2006eb0: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 2006eb4: a0 04 00 01 add %l0, %g1, %l0 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2006eb8: a2 04 60 01 inc %l1 2006ebc: 80 a4 40 14 cmp %l1, %l4 2006ec0: 0a bf ff f9 bcs 2006ea4 <_Objects_Extend_information+0x4c> 2006ec4: 85 2c 60 02 sll %l1, 2, %g2 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2006ec8: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 2006ecc: ec 16 20 10 lduh [ %i0 + 0x10 ], %l6 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 2006ed0: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 2006ed4: ac 02 00 16 add %o0, %l6, %l6 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 2006ed8: 82 10 63 ff or %g1, 0x3ff, %g1 2006edc: 80 a5 80 01 cmp %l6, %g1 2006ee0: 18 80 00 88 bgu 2007100 <_Objects_Extend_information+0x2a8><== NEVER TAKEN 2006ee4: 01 00 00 00 nop /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 2006ee8: 40 00 44 e4 call 2018278 <.umul> 2006eec: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 2006ef0: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006ef4: 80 a0 60 00 cmp %g1, 0 2006ef8: 02 80 00 09 be 2006f1c <_Objects_Extend_information+0xc4> 2006efc: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); 2006f00: 40 00 08 7f call 20090fc <_Workspace_Allocate> 2006f04: 01 00 00 00 nop if ( !new_object_block ) 2006f08: a4 92 20 00 orcc %o0, 0, %l2 2006f0c: 32 80 00 08 bne,a 2006f2c <_Objects_Extend_information+0xd4> 2006f10: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006f14: 81 c7 e0 08 ret 2006f18: 81 e8 00 00 restore return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 2006f1c: 40 00 08 6a call 20090c4 <_Workspace_Allocate_or_fatal_error> 2006f20: 01 00 00 00 nop 2006f24: a4 10 00 08 mov %o0, %l2 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2006f28: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006f2c: 80 a4 00 01 cmp %l0, %g1 2006f30: 2a 80 00 53 bcs,a 200707c <_Objects_Extend_information+0x224> 2006f34: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 2006f38: 82 05 80 13 add %l6, %l3, %g1 */ /* * Up the block count and maximum */ block_count++; 2006f3c: ae 05 20 01 add %l4, 1, %l7 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 2006f40: 91 2d e0 01 sll %l7, 1, %o0 2006f44: 90 02 00 17 add %o0, %l7, %o0 2006f48: 90 00 40 08 add %g1, %o0, %o0 2006f4c: 40 00 08 6c call 20090fc <_Workspace_Allocate> 2006f50: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 2006f54: aa 92 20 00 orcc %o0, 0, %l5 2006f58: 32 80 00 06 bne,a 2006f70 <_Objects_Extend_information+0x118> 2006f5c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 _Workspace_Free( new_object_block ); 2006f60: 40 00 08 70 call 2009120 <_Workspace_Free> 2006f64: 90 10 00 12 mov %l2, %o0 return; 2006f68: 81 c7 e0 08 ret 2006f6c: 81 e8 00 00 restore } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006f70: af 2d e0 02 sll %l7, 2, %l7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006f74: 80 a0 40 13 cmp %g1, %l3 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 2006f78: ba 05 40 17 add %l5, %l7, %i5 2006f7c: 82 10 20 00 clr %g1 2006f80: 08 80 00 14 bleu 2006fd0 <_Objects_Extend_information+0x178> 2006f84: ae 07 40 17 add %i5, %l7, %l7 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 2006f88: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 2006f8c: b9 2d 20 02 sll %l4, 2, %i4 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 2006f90: 40 00 21 fc call 200f780 2006f94: 94 10 00 1c mov %i4, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2006f98: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2006f9c: 94 10 00 1c mov %i4, %o2 2006fa0: 40 00 21 f8 call 200f780 2006fa4: 90 10 00 1d mov %i5, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006fa8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006fac: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2006fb0: a6 04 c0 01 add %l3, %g1, %l3 2006fb4: 90 10 00 17 mov %l7, %o0 2006fb8: 40 00 21 f2 call 200f780 2006fbc: 95 2c e0 02 sll %l3, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006fc0: 10 80 00 08 b 2006fe0 <_Objects_Extend_information+0x188> 2006fc4: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006fc8: 82 00 60 01 inc %g1 local_table[ index ] = NULL; 2006fcc: c0 20 80 17 clr [ %g2 + %l7 ] } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 2006fd0: 80 a0 40 13 cmp %g1, %l3 2006fd4: 2a bf ff fd bcs,a 2006fc8 <_Objects_Extend_information+0x170> 2006fd8: 85 28 60 02 sll %g1, 2, %g2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006fdc: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2006fe0: a9 2d 20 02 sll %l4, 2, %l4 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006fe4: 85 2c 20 02 sll %l0, 2, %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 2006fe8: c0 27 40 14 clr [ %i5 + %l4 ] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2006fec: c0 25 40 14 clr [ %l5 + %l4 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006ff0: 86 04 00 03 add %l0, %g3, %g3 2006ff4: 84 05 c0 02 add %l7, %g2, %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2006ff8: 10 80 00 04 b 2007008 <_Objects_Extend_information+0x1b0> 2006ffc: 82 10 00 10 mov %l0, %g1 index < ( information->allocation_size + index_base ); index++ ) { 2007000: 82 00 60 01 inc %g1 2007004: 84 00 a0 04 add %g2, 4, %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2007008: 80 a0 40 03 cmp %g1, %g3 200700c: 2a bf ff fd bcs,a 2007000 <_Objects_Extend_information+0x1a8> 2007010: c0 20 80 00 clr [ %g2 ] index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2007014: 7f ff ec 67 call 20021b0 2007018: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 200701c: c8 06 00 00 ld [ %i0 ], %g4 2007020: c4 16 20 04 lduh [ %i0 + 4 ], %g2 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 2007024: ec 36 20 10 sth %l6, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 2007028: ad 2d a0 10 sll %l6, 0x10, %l6 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 200702c: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2007030: 83 35 a0 10 srl %l6, 0x10, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 2007034: fa 26 20 30 st %i5, [ %i0 + 0x30 ] information->local_table = local_table; 2007038: ee 26 20 1c st %l7, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 200703c: 89 29 20 18 sll %g4, 0x18, %g4 2007040: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2007044: ea 26 20 34 st %l5, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 2007048: 07 00 00 40 sethi %hi(0x10000), %g3 200704c: ac 11 00 03 or %g4, %g3, %l6 2007050: ac 15 80 02 or %l6, %g2, %l6 2007054: ac 15 80 01 or %l6, %g1, %l6 2007058: ec 26 20 0c st %l6, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 200705c: 7f ff ec 59 call 20021c0 2007060: 01 00 00 00 nop if ( old_tables ) 2007064: 80 a4 e0 00 cmp %l3, 0 2007068: 22 80 00 05 be,a 200707c <_Objects_Extend_information+0x224> 200706c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 2007070: 40 00 08 2c call 2009120 <_Workspace_Free> 2007074: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2007078: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 200707c: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 2007080: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 2007084: 92 10 00 12 mov %l2, %o1 2007088: 90 07 bf f4 add %fp, -12, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 200708c: a3 2c 60 02 sll %l1, 2, %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2007090: a8 06 20 20 add %i0, 0x20, %l4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 2007094: e4 20 40 11 st %l2, [ %g1 + %l1 ] */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 2007098: 27 00 00 40 sethi %hi(0x10000), %l3 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 200709c: 40 00 13 4b call 200bdc8 <_Chain_Initialize> 20070a0: a4 10 00 08 mov %o0, %l2 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 20070a4: 30 80 00 0c b,a 20070d4 <_Objects_Extend_information+0x27c> the_object->id = _Objects_Build_id( 20070a8: c4 16 20 04 lduh [ %i0 + 4 ], %g2 20070ac: 83 28 60 18 sll %g1, 0x18, %g1 20070b0: 85 28 a0 1b sll %g2, 0x1b, %g2 20070b4: 82 10 40 13 or %g1, %l3, %g1 20070b8: 82 10 40 02 or %g1, %g2, %g1 20070bc: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20070c0: 92 10 00 08 mov %o0, %o1 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 20070c4: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 20070c8: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 20070cc: 7f ff fc ee call 2006484 <_Chain_Append> 20070d0: 90 10 00 14 mov %l4, %o0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 20070d4: 40 00 13 2d call 200bd88 <_Chain_Get> 20070d8: 90 10 00 12 mov %l2, %o0 20070dc: 80 a2 20 00 cmp %o0, 0 20070e0: 32 bf ff f2 bne,a 20070a8 <_Objects_Extend_information+0x250> 20070e4: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 20070e8: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20070ec: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 20070f0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 20070f4: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 20070f8: c8 20 80 11 st %g4, [ %g2 + %l1 ] information->inactive = 20070fc: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2007100: 81 c7 e0 08 ret 2007104: 81 e8 00 00 restore =============================================================================== 020071b0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 20071b0: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 20071b4: 80 a6 60 00 cmp %i1, 0 20071b8: 22 80 00 1a be,a 2007220 <_Objects_Get_information+0x70> 20071bc: b0 10 20 00 clr %i0 /* * 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 ); 20071c0: 40 00 14 88 call 200c3e0 <_Objects_API_maximum_class> 20071c4: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 20071c8: 80 a2 20 00 cmp %o0, 0 20071cc: 22 80 00 15 be,a 2007220 <_Objects_Get_information+0x70> 20071d0: b0 10 20 00 clr %i0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 20071d4: 80 a6 40 08 cmp %i1, %o0 20071d8: 38 80 00 12 bgu,a 2007220 <_Objects_Get_information+0x70> 20071dc: b0 10 20 00 clr %i0 return NULL; if ( !_Objects_Information_table[ the_api ] ) 20071e0: b1 2e 20 02 sll %i0, 2, %i0 20071e4: 03 00 80 6f sethi %hi(0x201bc00), %g1 20071e8: 82 10 60 80 or %g1, 0x80, %g1 ! 201bc80 <_Objects_Information_table> 20071ec: c2 00 40 18 ld [ %g1 + %i0 ], %g1 20071f0: 80 a0 60 00 cmp %g1, 0 20071f4: 02 80 00 0b be 2007220 <_Objects_Get_information+0x70> <== NEVER TAKEN 20071f8: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 20071fc: b3 2e 60 02 sll %i1, 2, %i1 2007200: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 2007204: 80 a6 20 00 cmp %i0, 0 2007208: 02 80 00 06 be 2007220 <_Objects_Get_information+0x70> <== NEVER TAKEN 200720c: 01 00 00 00 nop * 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 ) 2007210: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2007214: 80 a0 60 00 cmp %g1, 0 2007218: 22 80 00 02 be,a 2007220 <_Objects_Get_information+0x70> 200721c: b0 10 20 00 clr %i0 return NULL; #endif return info; } 2007220: 81 c7 e0 08 ret 2007224: 81 e8 00 00 restore =============================================================================== 02017b40 <_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; 2017b40: c4 02 20 08 ld [ %o0 + 8 ], %g2 if ( information->maximum >= index ) { 2017b44: c2 12 20 10 lduh [ %o0 + 0x10 ], %g1 /* * 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; 2017b48: 84 22 40 02 sub %o1, %g2, %g2 2017b4c: 84 00 a0 01 inc %g2 if ( information->maximum >= index ) { 2017b50: 80 a0 40 02 cmp %g1, %g2 2017b54: 0a 80 00 09 bcs 2017b78 <_Objects_Get_no_protection+0x38> 2017b58: 85 28 a0 02 sll %g2, 2, %g2 if ( (the_object = information->local_table[ index ]) != NULL ) { 2017b5c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2017b60: d0 00 40 02 ld [ %g1 + %g2 ], %o0 2017b64: 80 a2 20 00 cmp %o0, 0 2017b68: 02 80 00 05 be 2017b7c <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 2017b6c: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 2017b70: 81 c3 e0 08 retl 2017b74: c0 22 80 00 clr [ %o2 ] /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 2017b78: 82 10 20 01 mov 1, %g1 2017b7c: 90 10 20 00 clr %o0 return NULL; } 2017b80: 81 c3 e0 08 retl 2017b84: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 02008924 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 2008924: 9d e3 bf 98 save %sp, -104, %sp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2008928: 92 96 20 00 orcc %i0, 0, %o1 200892c: 12 80 00 06 bne 2008944 <_Objects_Id_to_name+0x20> 2008930: 83 32 60 18 srl %o1, 0x18, %g1 2008934: 03 00 80 85 sethi %hi(0x2021400), %g1 2008938: c2 00 62 00 ld [ %g1 + 0x200 ], %g1 ! 2021600 <_Thread_Executing> 200893c: d2 00 60 08 ld [ %g1 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 2008940: 83 32 60 18 srl %o1, 0x18, %g1 2008944: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 2008948: 84 00 7f ff add %g1, -1, %g2 200894c: 80 a0 a0 03 cmp %g2, 3 2008950: 18 80 00 18 bgu 20089b0 <_Objects_Id_to_name+0x8c> 2008954: 83 28 60 02 sll %g1, 2, %g1 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 2008958: 10 80 00 18 b 20089b8 <_Objects_Id_to_name+0x94> 200895c: 05 00 80 85 sethi %hi(0x2021400), %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 2008960: 85 28 a0 02 sll %g2, 2, %g2 2008964: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 2008968: 80 a2 20 00 cmp %o0, 0 200896c: 02 80 00 11 be 20089b0 <_Objects_Id_to_name+0x8c> <== NEVER TAKEN 2008970: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 2008974: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 2008978: 80 a0 60 00 cmp %g1, 0 200897c: 12 80 00 0d bne 20089b0 <_Objects_Id_to_name+0x8c> <== NEVER TAKEN 2008980: 01 00 00 00 nop return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 2008984: 7f ff ff cb call 20088b0 <_Objects_Get> 2008988: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 200898c: 80 a2 20 00 cmp %o0, 0 2008990: 02 80 00 08 be 20089b0 <_Objects_Id_to_name+0x8c> 2008994: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 2008998: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 200899c: b0 10 20 00 clr %i0 20089a0: 40 00 02 58 call 2009300 <_Thread_Enable_dispatch> 20089a4: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 20089a8: 81 c7 e0 08 ret 20089ac: 81 e8 00 00 restore } 20089b0: 81 c7 e0 08 ret 20089b4: 91 e8 20 03 restore %g0, 3, %o0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 20089b8: 84 10 a0 a0 or %g2, 0xa0, %g2 20089bc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 20089c0: 80 a0 60 00 cmp %g1, 0 20089c4: 12 bf ff e7 bne 2008960 <_Objects_Id_to_name+0x3c> 20089c8: 85 32 60 1b srl %o1, 0x1b, %g2 20089cc: 30 bf ff f9 b,a 20089b0 <_Objects_Id_to_name+0x8c> =============================================================================== 02007b4c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 2007b4c: 9d e3 bf a0 save %sp, -96, %sp size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 2007b50: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1 2007b54: 40 00 25 bb call 2011240 2007b58: 90 10 00 1a mov %i2, %o0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 2007b5c: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1 2007b60: 80 a0 60 00 cmp %g1, 0 2007b64: 02 80 00 17 be 2007bc0 <_Objects_Set_name+0x74> 2007b68: a0 10 00 08 mov %o0, %l0 char *d; d = _Workspace_Allocate( length + 1 ); 2007b6c: 90 02 20 01 inc %o0 2007b70: 40 00 07 2e call 2009828 <_Workspace_Allocate> 2007b74: b0 10 20 00 clr %i0 if ( !d ) 2007b78: a2 92 20 00 orcc %o0, 0, %l1 2007b7c: 02 80 00 24 be 2007c0c <_Objects_Set_name+0xc0> <== NEVER TAKEN 2007b80: 01 00 00 00 nop return false; if ( the_object->name.name_p ) { 2007b84: d0 06 60 0c ld [ %i1 + 0xc ], %o0 2007b88: 80 a2 20 00 cmp %o0, 0 2007b8c: 02 80 00 06 be 2007ba4 <_Objects_Set_name+0x58> 2007b90: 92 10 00 1a mov %i2, %o1 _Workspace_Free( (void *)the_object->name.name_p ); 2007b94: 40 00 07 2e call 200984c <_Workspace_Free> 2007b98: 01 00 00 00 nop the_object->name.name_p = NULL; 2007b9c: c0 26 60 0c clr [ %i1 + 0xc ] } strncpy( d, name, length ); 2007ba0: 92 10 00 1a mov %i2, %o1 2007ba4: 90 10 00 11 mov %l1, %o0 2007ba8: 40 00 25 6b call 2011154 2007bac: 94 10 00 10 mov %l0, %o2 d[length] = '\0'; 2007bb0: c0 2c 40 10 clrb [ %l1 + %l0 ] the_object->name.name_p = d; 2007bb4: e2 26 60 0c st %l1, [ %i1 + 0xc ] 2007bb8: 81 c7 e0 08 ret 2007bbc: 91 e8 20 01 restore %g0, 1, %o0 } else #endif { the_object->name.name_u32 = _Objects_Build_name( 2007bc0: 80 a2 20 01 cmp %o0, 1 2007bc4: 08 80 00 14 bleu 2007c14 <_Objects_Set_name+0xc8> 2007bc8: c8 0e 80 00 ldub [ %i2 ], %g4 2007bcc: c6 4e a0 01 ldsb [ %i2 + 1 ], %g3 2007bd0: 80 a2 20 02 cmp %o0, 2 2007bd4: 08 80 00 11 bleu 2007c18 <_Objects_Set_name+0xcc> 2007bd8: 87 28 e0 10 sll %g3, 0x10, %g3 2007bdc: c4 4e a0 02 ldsb [ %i2 + 2 ], %g2 2007be0: 80 a2 20 03 cmp %o0, 3 2007be4: 85 28 a0 08 sll %g2, 8, %g2 2007be8: 08 80 00 03 bleu 2007bf4 <_Objects_Set_name+0xa8> 2007bec: 82 10 20 20 mov 0x20, %g1 2007bf0: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1 2007bf4: 89 29 20 18 sll %g4, 0x18, %g4 2007bf8: b0 10 20 01 mov 1, %i0 2007bfc: 86 10 c0 04 or %g3, %g4, %g3 2007c00: 84 10 c0 02 or %g3, %g2, %g2 2007c04: 82 10 80 01 or %g2, %g1, %g1 2007c08: c2 26 60 0c st %g1, [ %i1 + 0xc ] ); } return true; } 2007c0c: 81 c7 e0 08 ret 2007c10: 81 e8 00 00 restore d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 2007c14: 07 00 08 00 sethi %hi(0x200000), %g3 2007c18: 05 00 00 08 sethi %hi(0x2000), %g2 2007c1c: 10 bf ff f6 b 2007bf4 <_Objects_Set_name+0xa8> 2007c20: 82 10 20 20 mov 0x20, %g1 =============================================================================== 02006a28 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 2006a28: 9d e3 bf 98 save %sp, -104, %sp register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 2006a2c: a0 07 bf fc add %fp, -4, %l0 2006a30: 90 10 00 19 mov %i1, %o0 2006a34: 40 00 00 7e call 2006c2c <_POSIX_Mutex_Get> 2006a38: 92 10 00 10 mov %l0, %o1 2006a3c: 80 a2 20 00 cmp %o0, 0 2006a40: 22 80 00 18 be,a 2006aa0 <_POSIX_Condition_variables_Wait_support+0x78> 2006a44: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2006a48: 03 00 80 7a sethi %hi(0x201e800), %g1 2006a4c: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 201e930 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 2006a50: 92 10 00 10 mov %l0, %o1 2006a54: 84 00 bf ff add %g2, -1, %g2 2006a58: 90 10 00 18 mov %i0, %o0 2006a5c: c4 20 61 30 st %g2, [ %g1 + 0x130 ] 2006a60: 7f ff ff 74 call 2006830 <_POSIX_Condition_variables_Get> 2006a64: 01 00 00 00 nop switch ( location ) { 2006a68: c2 07 bf fc ld [ %fp + -4 ], %g1 2006a6c: 80 a0 60 00 cmp %g1, 0 2006a70: 12 80 00 34 bne 2006b40 <_POSIX_Condition_variables_Wait_support+0x118> 2006a74: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 2006a78: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2006a7c: 80 a0 60 00 cmp %g1, 0 2006a80: 02 80 00 0a be 2006aa8 <_POSIX_Condition_variables_Wait_support+0x80> 2006a84: 01 00 00 00 nop 2006a88: c4 06 40 00 ld [ %i1 ], %g2 2006a8c: 80 a0 40 02 cmp %g1, %g2 2006a90: 02 80 00 06 be 2006aa8 <_POSIX_Condition_variables_Wait_support+0x80> 2006a94: 01 00 00 00 nop _Thread_Enable_dispatch(); 2006a98: 40 00 0c ba call 2009d80 <_Thread_Enable_dispatch> 2006a9c: b0 10 20 16 mov 0x16, %i0 ! 16 return EINVAL; 2006aa0: 81 c7 e0 08 ret 2006aa4: 81 e8 00 00 restore } (void) pthread_mutex_unlock( mutex ); 2006aa8: 40 00 00 f2 call 2006e70 2006aac: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 2006ab0: 80 8e e0 ff btst 0xff, %i3 2006ab4: 12 80 00 1c bne 2006b24 <_POSIX_Condition_variables_Wait_support+0xfc> 2006ab8: 23 00 80 7a sethi %hi(0x201e800), %l1 the_cond->Mutex = *mutex; 2006abc: c4 06 40 00 ld [ %i1 ], %g2 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 2006ac0: c2 04 61 f0 ld [ %l1 + 0x1f0 ], %g1 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 2006ac4: c4 24 20 14 st %g2, [ %l0 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 2006ac8: c0 20 60 34 clr [ %g1 + 0x34 ] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 2006acc: c6 06 00 00 ld [ %i0 ], %g3 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; 2006ad0: 84 04 20 18 add %l0, 0x18, %g2 _Thread_Executing->Wait.id = *cond; 2006ad4: c6 20 60 20 st %g3, [ %g1 + 0x20 ] 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; 2006ad8: c4 20 60 44 st %g2, [ %g1 + 0x44 ] _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 2006adc: 92 10 00 1a mov %i2, %o1 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; 2006ae0: 82 10 20 01 mov 1, %g1 2006ae4: 90 10 00 02 mov %g2, %o0 2006ae8: 15 00 80 29 sethi %hi(0x200a400), %o2 2006aec: 94 12 a2 ec or %o2, 0x2ec, %o2 ! 200a6ec <_Thread_queue_Timeout> 2006af0: 40 00 0e 09 call 200a314 <_Thread_queue_Enqueue_with_handler> 2006af4: c2 24 20 48 st %g1, [ %l0 + 0x48 ] _Thread_Enable_dispatch(); 2006af8: 40 00 0c a2 call 2009d80 <_Thread_Enable_dispatch> 2006afc: 01 00 00 00 nop /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 2006b00: c2 04 61 f0 ld [ %l1 + 0x1f0 ], %g1 2006b04: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 2006b08: 80 a6 20 74 cmp %i0, 0x74 2006b0c: 02 80 00 08 be 2006b2c <_POSIX_Condition_variables_Wait_support+0x104> 2006b10: 80 a6 20 00 cmp %i0, 0 2006b14: 02 80 00 06 be 2006b2c <_POSIX_Condition_variables_Wait_support+0x104><== ALWAYS TAKEN 2006b18: 01 00 00 00 nop 2006b1c: 81 c7 e0 08 ret <== NOT EXECUTED 2006b20: 81 e8 00 00 restore <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 2006b24: 40 00 0c 97 call 2009d80 <_Thread_Enable_dispatch> 2006b28: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 2006b2c: 40 00 00 b0 call 2006dec 2006b30: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 2006b34: 80 a2 20 00 cmp %o0, 0 2006b38: 02 80 00 03 be 2006b44 <_POSIX_Condition_variables_Wait_support+0x11c> 2006b3c: 01 00 00 00 nop 2006b40: b0 10 20 16 mov 0x16, %i0 ! 16 case OBJECTS_ERROR: break; } return EINVAL; } 2006b44: 81 c7 e0 08 ret 2006b48: 81 e8 00 00 restore =============================================================================== 0200a85c <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200a85c: 9d e3 bf 98 save %sp, -104, %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( 200a860: 11 00 80 97 sethi %hi(0x2025c00), %o0 200a864: 94 07 bf fc add %fp, -4, %o2 200a868: 90 12 22 3c or %o0, 0x23c, %o0 200a86c: 40 00 0c 61 call 200d9f0 <_Objects_Get> 200a870: 92 10 00 18 mov %i0, %o1 Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200a874: c2 07 bf fc ld [ %fp + -4 ], %g1 size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200a878: 94 10 00 19 mov %i1, %o2 Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200a87c: 80 a0 60 00 cmp %g1, 0 200a880: 12 80 00 3b bne 200a96c <_POSIX_Message_queue_Receive_support+0x110> 200a884: 9a 10 00 1d mov %i5, %o5 case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 200a888: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200a88c: 84 08 60 03 and %g1, 3, %g2 200a890: 80 a0 a0 01 cmp %g2, 1 200a894: 32 80 00 08 bne,a 200a8b4 <_POSIX_Message_queue_Receive_support+0x58> 200a898: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 _Thread_Enable_dispatch(); 200a89c: 40 00 0e bc call 200e38c <_Thread_Enable_dispatch> 200a8a0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 200a8a4: 40 00 2b e9 call 2015848 <__errno> 200a8a8: 01 00 00 00 nop 200a8ac: 10 80 00 0b b 200a8d8 <_POSIX_Message_queue_Receive_support+0x7c> 200a8b0: 82 10 20 09 mov 9, %g1 ! 9 } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 200a8b4: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 200a8b8: 80 a6 80 02 cmp %i2, %g2 200a8bc: 1a 80 00 09 bcc 200a8e0 <_POSIX_Message_queue_Receive_support+0x84> 200a8c0: 80 8f 20 ff btst 0xff, %i4 _Thread_Enable_dispatch(); 200a8c4: 40 00 0e b2 call 200e38c <_Thread_Enable_dispatch> 200a8c8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200a8cc: 40 00 2b df call 2015848 <__errno> 200a8d0: 01 00 00 00 nop 200a8d4: 82 10 20 7a mov 0x7a, %g1 ! 7a 200a8d8: 10 80 00 23 b 200a964 <_POSIX_Message_queue_Receive_support+0x108> 200a8dc: c2 22 00 00 st %g1, [ %o0 ] length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200a8e0: 02 80 00 05 be 200a8f4 <_POSIX_Message_queue_Receive_support+0x98><== NEVER TAKEN 200a8e4: 98 10 20 00 clr %o4 do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 200a8e8: 99 30 60 0e srl %g1, 0xe, %o4 200a8ec: 98 1b 20 01 xor %o4, 1, %o4 200a8f0: 98 0b 20 01 and %o4, 1, %o4 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 200a8f4: 82 10 3f ff mov -1, %g1 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200a8f8: 90 02 20 1c add %o0, 0x1c, %o0 200a8fc: 92 10 00 18 mov %i0, %o1 200a900: 98 0b 20 01 and %o4, 1, %o4 200a904: 96 07 bf f8 add %fp, -8, %o3 200a908: 40 00 08 0e call 200c940 <_CORE_message_queue_Seize> 200a90c: c2 27 bf f8 st %g1, [ %fp + -8 ] &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200a910: 40 00 0e 9f call 200e38c <_Thread_Enable_dispatch> 200a914: 35 00 80 96 sethi %hi(0x2025800), %i2 *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 200a918: c2 06 a1 e0 ld [ %i2 + 0x1e0 ], %g1 ! 20259e0 <_Thread_Executing> do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 200a91c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 200a920: c6 00 60 34 ld [ %g1 + 0x34 ], %g3 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 200a924: 83 38 a0 1f sra %g2, 0x1f, %g1 200a928: 84 18 40 02 xor %g1, %g2, %g2 200a92c: 82 20 80 01 sub %g2, %g1, %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 200a930: 80 a0 e0 00 cmp %g3, 0 200a934: 12 80 00 05 bne 200a948 <_POSIX_Message_queue_Receive_support+0xec> 200a938: c2 26 c0 00 st %g1, [ %i3 ] return length_out; 200a93c: f0 07 bf f8 ld [ %fp + -8 ], %i0 200a940: 81 c7 e0 08 ret 200a944: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( 200a948: 40 00 2b c0 call 2015848 <__errno> 200a94c: 01 00 00 00 nop 200a950: c2 06 a1 e0 ld [ %i2 + 0x1e0 ], %g1 200a954: b6 10 00 08 mov %o0, %i3 200a958: 40 00 00 9b call 200abc4 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200a95c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200a960: d0 26 c0 00 st %o0, [ %i3 ] 200a964: 81 c7 e0 08 ret 200a968: 91 e8 3f ff restore %g0, -1, %o0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200a96c: 40 00 2b b7 call 2015848 <__errno> 200a970: b0 10 3f ff mov -1, %i0 200a974: 82 10 20 09 mov 9, %g1 200a978: c2 22 00 00 st %g1, [ %o0 ] } 200a97c: 81 c7 e0 08 ret 200a980: 81 e8 00 00 restore =============================================================================== 0200b4e0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: Thread_Control *the_thread ) { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b4e0: c2 02 21 6c ld [ %o0 + 0x16c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200b4e4: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 200b4e8: 80 a0 a0 00 cmp %g2, 0 200b4ec: 12 80 00 12 bne 200b534 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54><== NEVER TAKEN 200b4f0: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 200b4f4: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200b4f8: 80 a0 a0 01 cmp %g2, 1 200b4fc: 12 80 00 0e bne 200b534 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54> 200b500: 01 00 00 00 nop thread_support->cancelation_requested ) { 200b504: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 200b508: 80 a0 60 00 cmp %g1, 0 200b50c: 02 80 00 0a be 200b534 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54> 200b510: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 200b514: 03 00 80 74 sethi %hi(0x201d000), %g1 200b518: c4 00 61 80 ld [ %g1 + 0x180 ], %g2 ! 201d180 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200b51c: 92 10 3f ff mov -1, %o1 200b520: 84 00 bf ff add %g2, -1, %g2 200b524: c4 20 61 80 st %g2, [ %g1 + 0x180 ] 200b528: 82 13 c0 00 mov %o7, %g1 200b52c: 40 00 01 ab call 200bbd8 <_POSIX_Thread_Exit> 200b530: 9e 10 40 00 mov %g1, %o7 } else _Thread_Enable_dispatch(); 200b534: 82 13 c0 00 mov %o7, %g1 200b538: 7f ff f2 a1 call 2007fbc <_Thread_Enable_dispatch> 200b53c: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200c854 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200c854: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200c858: 7f ff ff f4 call 200c828 <_POSIX_Priority_Is_valid> 200c85c: d0 06 40 00 ld [ %i1 ], %o0 200c860: 80 8a 20 ff btst 0xff, %o0 200c864: 02 80 00 37 be 200c940 <_POSIX_Thread_Translate_sched_param+0xec><== NEVER TAKEN 200c868: 80 a6 20 00 cmp %i0, 0 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200c86c: c0 26 80 00 clr [ %i2 ] *budget_callout = NULL; if ( policy == SCHED_OTHER ) { 200c870: 12 80 00 06 bne 200c888 <_POSIX_Thread_Translate_sched_param+0x34> 200c874: c0 26 c0 00 clr [ %i3 ] *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200c878: 82 10 20 01 mov 1, %g1 200c87c: c2 26 80 00 st %g1, [ %i2 ] return 0; 200c880: 81 c7 e0 08 ret 200c884: 81 e8 00 00 restore } if ( policy == SCHED_FIFO ) { 200c888: 80 a6 20 01 cmp %i0, 1 200c88c: 12 80 00 04 bne 200c89c <_POSIX_Thread_Translate_sched_param+0x48> 200c890: 80 a6 20 02 cmp %i0, 2 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200c894: 10 80 00 29 b 200c938 <_POSIX_Thread_Translate_sched_param+0xe4> 200c898: c0 26 80 00 clr [ %i2 ] return 0; } if ( policy == SCHED_RR ) { 200c89c: 12 80 00 04 bne 200c8ac <_POSIX_Thread_Translate_sched_param+0x58> 200c8a0: 80 a6 20 04 cmp %i0, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 200c8a4: 10 80 00 25 b 200c938 <_POSIX_Thread_Translate_sched_param+0xe4> 200c8a8: f0 26 80 00 st %i0, [ %i2 ] return 0; } if ( policy == SCHED_SPORADIC ) { 200c8ac: 12 80 00 25 bne 200c940 <_POSIX_Thread_Translate_sched_param+0xec> 200c8b0: 01 00 00 00 nop if ( (param->sched_ss_repl_period.tv_sec == 0) && 200c8b4: c2 06 60 08 ld [ %i1 + 8 ], %g1 200c8b8: 80 a0 60 00 cmp %g1, 0 200c8bc: 32 80 00 07 bne,a 200c8d8 <_POSIX_Thread_Translate_sched_param+0x84> 200c8c0: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 (param->sched_ss_repl_period.tv_nsec == 0) ) 200c8c4: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200c8c8: 80 a0 60 00 cmp %g1, 0 200c8cc: 02 80 00 1d be 200c940 <_POSIX_Thread_Translate_sched_param+0xec> 200c8d0: 01 00 00 00 nop return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200c8d4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200c8d8: 80 a0 60 00 cmp %g1, 0 200c8dc: 12 80 00 06 bne 200c8f4 <_POSIX_Thread_Translate_sched_param+0xa0> 200c8e0: 01 00 00 00 nop (param->sched_ss_init_budget.tv_nsec == 0) ) 200c8e4: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200c8e8: 80 a0 60 00 cmp %g1, 0 200c8ec: 02 80 00 15 be 200c940 <_POSIX_Thread_Translate_sched_param+0xec> 200c8f0: 01 00 00 00 nop return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200c8f4: 7f ff f4 e8 call 2009c94 <_Timespec_To_ticks> 200c8f8: 90 06 60 08 add %i1, 8, %o0 200c8fc: b0 10 00 08 mov %o0, %i0 200c900: 7f ff f4 e5 call 2009c94 <_Timespec_To_ticks> 200c904: 90 06 60 10 add %i1, 0x10, %o0 200c908: 80 a6 00 08 cmp %i0, %o0 200c90c: 0a 80 00 0d bcs 200c940 <_POSIX_Thread_Translate_sched_param+0xec> 200c910: 01 00 00 00 nop _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 200c914: 7f ff ff c5 call 200c828 <_POSIX_Priority_Is_valid> 200c918: d0 06 60 04 ld [ %i1 + 4 ], %o0 200c91c: 80 8a 20 ff btst 0xff, %o0 200c920: 02 80 00 08 be 200c940 <_POSIX_Thread_Translate_sched_param+0xec> 200c924: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200c928: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 200c92c: 03 00 80 18 sethi %hi(0x2006000), %g1 200c930: 82 10 61 d8 or %g1, 0x1d8, %g1 ! 20061d8 <_POSIX_Threads_Sporadic_budget_callout> 200c934: c2 26 c0 00 st %g1, [ %i3 ] return 0; 200c938: 81 c7 e0 08 ret 200c93c: 91 e8 20 00 restore %g0, 0, %o0 } return EINVAL; } 200c940: 81 c7 e0 08 ret 200c944: 91 e8 20 16 restore %g0, 0x16, %o0 =============================================================================== 02005f3c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 2005f3c: 9d e3 bf 60 save %sp, -160, %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; 2005f40: 03 00 80 71 sethi %hi(0x201c400), %g1 2005f44: 82 10 61 4c or %g1, 0x14c, %g1 ! 201c54c maximum = Configuration_POSIX_API.number_of_initialization_threads; 2005f48: e6 00 60 30 ld [ %g1 + 0x30 ], %l3 if ( !user_threads || maximum == 0 ) 2005f4c: 80 a4 e0 00 cmp %l3, 0 2005f50: 02 80 00 1d be 2005fc4 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN 2005f54: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 2005f58: 80 a4 60 00 cmp %l1, 0 2005f5c: 02 80 00 1a be 2005fc4 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN 2005f60: a4 10 20 00 clr %l2 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 2005f64: a0 07 bf c0 add %fp, -64, %l0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); status = pthread_create( 2005f68: a8 07 bf fc add %fp, -4, %l4 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 2005f6c: 40 00 1a 77 call 200c948 2005f70: 90 10 00 10 mov %l0, %o0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 2005f74: 92 10 20 02 mov 2, %o1 2005f78: 40 00 1a 7f call 200c974 2005f7c: 90 10 00 10 mov %l0, %o0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 2005f80: d2 04 60 04 ld [ %l1 + 4 ], %o1 2005f84: 40 00 1a 8c call 200c9b4 2005f88: 90 10 00 10 mov %l0, %o0 status = pthread_create( 2005f8c: d4 04 40 00 ld [ %l1 ], %o2 2005f90: 90 10 00 14 mov %l4, %o0 2005f94: 92 10 00 10 mov %l0, %o1 2005f98: 7f ff ff 34 call 2005c68 2005f9c: 96 10 20 00 clr %o3 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 2005fa0: 94 92 20 00 orcc %o0, 0, %o2 2005fa4: 22 80 00 05 be,a 2005fb8 <_POSIX_Threads_Initialize_user_threads_body+0x7c> 2005fa8: a4 04 a0 01 inc %l2 _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 2005fac: 90 10 20 02 mov 2, %o0 2005fb0: 40 00 07 a6 call 2007e48 <_Internal_error_Occurred> 2005fb4: 92 10 20 01 mov 1, %o1 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 2005fb8: 80 a4 80 13 cmp %l2, %l3 2005fbc: 0a bf ff ec bcs 2005f6c <_POSIX_Threads_Initialize_user_threads_body+0x30><== NEVER TAKEN 2005fc0: a2 04 60 08 add %l1, 8, %l1 2005fc4: 81 c7 e0 08 ret 2005fc8: 81 e8 00 00 restore =============================================================================== 0200b75c <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200b75c: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b760: e0 06 61 6c ld [ %i1 + 0x16c ], %l0 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 200b764: 40 00 04 69 call 200c908 <_Timespec_To_ticks> 200b768: 90 04 20 94 add %l0, 0x94, %o0 200b76c: 03 00 80 6c sethi %hi(0x201b000), %g1 200b770: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 200b774: d2 08 62 04 ldub [ %g1 + 0x204 ], %o1 */ #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 ) { 200b778: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200b77c: 92 22 40 02 sub %o1, %g2, %o1 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; 200b780: d0 26 60 78 st %o0, [ %i1 + 0x78 ] */ #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 ) { 200b784: 80 a0 60 00 cmp %g1, 0 200b788: 12 80 00 08 bne 200b7a8 <_POSIX_Threads_Sporadic_budget_TSR+0x4c><== NEVER TAKEN 200b78c: d2 26 60 18 st %o1, [ %i1 + 0x18 ] /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 200b790: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200b794: 80 a0 40 09 cmp %g1, %o1 200b798: 08 80 00 04 bleu 200b7a8 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 200b79c: 90 10 00 19 mov %i1, %o0 _Thread_Change_priority( the_thread, new_priority, true ); 200b7a0: 7f ff ef 9d call 2007614 <_Thread_Change_priority> 200b7a4: 94 10 20 01 mov 1, %o2 #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 200b7a8: 40 00 04 58 call 200c908 <_Timespec_To_ticks> 200b7ac: 90 04 20 8c add %l0, 0x8c, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200b7b0: 31 00 80 6f sethi %hi(0x201bc00), %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200b7b4: d0 24 20 b0 st %o0, [ %l0 + 0xb0 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200b7b8: b2 04 20 a4 add %l0, 0xa4, %i1 200b7bc: 7f ff f5 92 call 2008e04 <_Watchdog_Insert> 200b7c0: 91 ee 22 00 restore %i0, 0x200, %o0 =============================================================================== 0200b70c <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b70c: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 200b710: c6 00 a0 88 ld [ %g2 + 0x88 ], %g3 200b714: 05 00 80 6c sethi %hi(0x201b000), %g2 200b718: d2 08 a2 04 ldub [ %g2 + 0x204 ], %o1 ! 201b204 */ #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 ) { 200b71c: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200b720: 92 22 40 03 sub %o1, %g3, %o1 /* * 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 */ 200b724: 86 10 3f ff mov -1, %g3 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 200b728: d2 22 20 18 st %o1, [ %o0 + 0x18 ] */ #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 ) { 200b72c: 80 a0 a0 00 cmp %g2, 0 200b730: 12 80 00 09 bne 200b754 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200b734: c6 22 20 78 st %g3, [ %o0 + 0x78 ] /* * 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 ) { 200b738: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200b73c: 80 a0 40 09 cmp %g1, %o1 200b740: 1a 80 00 05 bcc 200b754 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200b744: 94 10 20 01 mov 1, %o2 _Thread_Change_priority( the_thread, new_priority, true ); 200b748: 82 13 c0 00 mov %o7, %g1 200b74c: 7f ff ef b2 call 2007614 <_Thread_Change_priority> 200b750: 9e 10 40 00 mov %g1, %o7 200b754: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02005c48 <_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) { 2005c48: 9d e3 bf a0 save %sp, -96, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2005c4c: c4 06 60 68 ld [ %i1 + 0x68 ], %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2005c50: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2005c54: 84 00 a0 01 inc %g2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2005c58: 80 a0 60 00 cmp %g1, 0 2005c5c: 12 80 00 06 bne 2005c74 <_POSIX_Timer_TSR+0x2c> 2005c60: c4 26 60 68 st %g2, [ %i1 + 0x68 ] ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 2005c64: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 2005c68: 80 a0 60 00 cmp %g1, 0 2005c6c: 02 80 00 0f be 2005ca8 <_POSIX_Timer_TSR+0x60> <== NEVER TAKEN 2005c70: 82 10 20 04 mov 4, %g1 activated = _POSIX_Timer_Insert_helper( 2005c74: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2005c78: d4 06 60 08 ld [ %i1 + 8 ], %o2 2005c7c: 90 06 60 10 add %i1, 0x10, %o0 2005c80: 17 00 80 17 sethi %hi(0x2005c00), %o3 2005c84: 98 10 00 19 mov %i1, %o4 2005c88: 40 00 1a 24 call 200c518 <_POSIX_Timer_Insert_helper> 2005c8c: 96 12 e0 48 or %o3, 0x48, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2005c90: 80 8a 20 ff btst 0xff, %o0 2005c94: 02 80 00 0a be 2005cbc <_POSIX_Timer_TSR+0x74> <== NEVER TAKEN 2005c98: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 2005c9c: 40 00 05 ac call 200734c <_TOD_Get> 2005ca0: 90 06 60 6c add %i1, 0x6c, %o0 2005ca4: 82 10 20 03 mov 3, %g1 /* * 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 ) ) { 2005ca8: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 2005cac: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 2005cb0: 40 00 19 04 call 200c0c0 2005cb4: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 2005cb8: c0 26 60 68 clr [ %i1 + 0x68 ] 2005cbc: 81 c7 e0 08 ret 2005cc0: 81 e8 00 00 restore =============================================================================== 0200d944 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 200d944: 9d e3 bf 90 save %sp, -112, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 200d948: 98 10 20 01 mov 1, %o4 200d94c: 96 0e a0 ff and %i2, 0xff, %o3 200d950: a0 07 bf f4 add %fp, -12, %l0 200d954: 90 10 00 18 mov %i0, %o0 200d958: 92 10 00 19 mov %i1, %o1 200d95c: 40 00 00 22 call 200d9e4 <_POSIX_signals_Clear_signals> 200d960: 94 10 00 10 mov %l0, %o2 200d964: 80 8a 20 ff btst 0xff, %o0 200d968: 02 80 00 1d be 200d9dc <_POSIX_signals_Check_signal+0x98> 200d96c: 83 2e 60 02 sll %i1, 2, %g1 #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 200d970: 07 00 80 70 sethi %hi(0x201c000), %g3 200d974: 85 2e 60 04 sll %i1, 4, %g2 200d978: 86 10 e2 b4 or %g3, 0x2b4, %g3 200d97c: 84 20 80 01 sub %g2, %g1, %g2 200d980: 88 00 c0 02 add %g3, %g2, %g4 200d984: c2 01 20 08 ld [ %g4 + 8 ], %g1 200d988: 80 a0 60 01 cmp %g1, 1 200d98c: 02 80 00 14 be 200d9dc <_POSIX_signals_Check_signal+0x98> <== NEVER TAKEN 200d990: 01 00 00 00 nop /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200d994: c8 01 20 04 ld [ %g4 + 4 ], %g4 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 200d998: e2 06 20 cc ld [ %i0 + 0xcc ], %l1 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 200d99c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200d9a0: 86 11 00 11 or %g4, %l1, %g3 /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 200d9a4: 80 a0 a0 02 cmp %g2, 2 200d9a8: 12 80 00 08 bne 200d9c8 <_POSIX_signals_Check_signal+0x84> 200d9ac: c6 26 20 cc st %g3, [ %i0 + 0xcc ] case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 200d9b0: 90 10 00 19 mov %i1, %o0 200d9b4: 92 10 00 10 mov %l0, %o1 200d9b8: 9f c0 40 00 call %g1 200d9bc: 94 10 20 00 clr %o2 signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 200d9c0: 10 80 00 05 b 200d9d4 <_POSIX_signals_Check_signal+0x90> 200d9c4: e2 26 20 cc st %l1, [ %i0 + 0xcc ] default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 200d9c8: 9f c0 40 00 call %g1 200d9cc: 90 10 00 19 mov %i1, %o0 } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 200d9d0: e2 26 20 cc st %l1, [ %i0 + 0xcc ] return true; 200d9d4: 81 c7 e0 08 ret 200d9d8: 91 e8 20 01 restore %g0, 1, %o0 } 200d9dc: 81 c7 e0 08 ret 200d9e0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200eafc <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 200eafc: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 200eb00: 7f ff cd ac call 20021b0 200eb04: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200eb08: 85 2e 20 04 sll %i0, 4, %g2 200eb0c: 83 2e 20 02 sll %i0, 2, %g1 200eb10: 82 20 80 01 sub %g2, %g1, %g1 200eb14: 05 00 80 70 sethi %hi(0x201c000), %g2 200eb18: 84 10 a2 b4 or %g2, 0x2b4, %g2 ! 201c2b4 <_POSIX_signals_Vectors> 200eb1c: c4 00 80 01 ld [ %g2 + %g1 ], %g2 200eb20: 80 a0 a0 02 cmp %g2, 2 200eb24: 12 80 00 0a bne 200eb4c <_POSIX_signals_Clear_process_signals+0x50> 200eb28: 05 00 80 71 sethi %hi(0x201c400), %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200eb2c: 05 00 80 71 sethi %hi(0x201c400), %g2 200eb30: 84 10 a0 ac or %g2, 0xac, %g2 ! 201c4ac <_POSIX_signals_Siginfo> 200eb34: c6 00 40 02 ld [ %g1 + %g2 ], %g3 200eb38: 82 00 40 02 add %g1, %g2, %g1 200eb3c: 82 00 60 04 add %g1, 4, %g1 200eb40: 80 a0 c0 01 cmp %g3, %g1 200eb44: 12 80 00 0e bne 200eb7c <_POSIX_signals_Clear_process_signals+0x80><== NEVER TAKEN 200eb48: 05 00 80 71 sethi %hi(0x201c400), %g2 clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 200eb4c: c6 00 a0 a8 ld [ %g2 + 0xa8 ], %g3 ! 201c4a8 <_POSIX_signals_Pending> 200eb50: b0 06 3f ff add %i0, -1, %i0 200eb54: 82 10 20 01 mov 1, %g1 200eb58: 83 28 40 18 sll %g1, %i0, %g1 200eb5c: 82 28 c0 01 andn %g3, %g1, %g1 if ( !_POSIX_signals_Pending ) 200eb60: 80 a0 60 00 cmp %g1, 0 200eb64: 12 80 00 06 bne 200eb7c <_POSIX_signals_Clear_process_signals+0x80><== NEVER TAKEN 200eb68: c2 20 a0 a8 st %g1, [ %g2 + 0xa8 ] _Thread_Do_post_task_switch_extension--; 200eb6c: 03 00 80 6f sethi %hi(0x201bc00), %g1 200eb70: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 ! 201bdc4 <_Thread_Do_post_task_switch_extension> 200eb74: 84 00 bf ff add %g2, -1, %g2 200eb78: c4 20 61 c4 st %g2, [ %g1 + 0x1c4 ] } _ISR_Enable( level ); 200eb7c: 7f ff cd 91 call 20021c0 200eb80: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020066e4 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 20066e4: 82 10 20 1b mov 0x1b, %g1 ! 1b int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 20066e8: 84 10 20 01 mov 1, %g2 20066ec: 86 00 7f ff add %g1, -1, %g3 20066f0: 87 28 80 03 sll %g2, %g3, %g3 20066f4: 80 88 c0 08 btst %g3, %o0 20066f8: 12 80 00 11 bne 200673c <_POSIX_signals_Get_highest+0x58> <== NEVER TAKEN 20066fc: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2006700: 82 00 60 01 inc %g1 2006704: 80 a0 60 20 cmp %g1, 0x20 2006708: 12 bf ff fa bne 20066f0 <_POSIX_signals_Get_highest+0xc> 200670c: 86 00 7f ff add %g1, -1, %g3 2006710: 82 10 20 01 mov 1, %g1 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2006714: 84 10 20 01 mov 1, %g2 2006718: 86 00 7f ff add %g1, -1, %g3 200671c: 87 28 80 03 sll %g2, %g3, %g3 2006720: 80 88 c0 08 btst %g3, %o0 2006724: 12 80 00 06 bne 200673c <_POSIX_signals_Get_highest+0x58> 2006728: 01 00 00 00 nop */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 200672c: 82 00 60 01 inc %g1 2006730: 80 a0 60 1b cmp %g1, 0x1b 2006734: 12 bf ff fa bne 200671c <_POSIX_signals_Get_highest+0x38> <== ALWAYS TAKEN 2006738: 86 00 7f ff add %g1, -1, %g3 * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 200673c: 81 c3 e0 08 retl 2006740: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200ebcc <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 200ebcc: 9d e3 bf a0 save %sp, -96, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 200ebd0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200ebd4: 09 04 00 20 sethi %hi(0x10008000), %g4 200ebd8: 86 06 7f ff add %i1, -1, %g3 200ebdc: 9a 08 40 04 and %g1, %g4, %o5 200ebe0: 84 10 20 01 mov 1, %g2 200ebe4: 80 a3 40 04 cmp %o5, %g4 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 200ebe8: 92 10 00 1a mov %i2, %o1 200ebec: 87 28 80 03 sll %g2, %g3, %g3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 200ebf0: 12 80 00 1a bne 200ec58 <_POSIX_signals_Unblock_thread+0x8c> 200ebf4: c8 06 21 6c ld [ %i0 + 0x16c ], %g4 if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 200ebf8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200ebfc: 80 88 c0 01 btst %g3, %g1 200ec00: 12 80 00 06 bne 200ec18 <_POSIX_signals_Unblock_thread+0x4c> 200ec04: 82 10 20 04 mov 4, %g1 200ec08: c2 01 20 cc ld [ %g4 + 0xcc ], %g1 200ec0c: 80 a8 c0 01 andncc %g3, %g1, %g0 200ec10: 02 80 00 38 be 200ecf0 <_POSIX_signals_Unblock_thread+0x124> 200ec14: 82 10 20 04 mov 4, %g1 the_thread->Wait.return_code = EINTR; 200ec18: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 200ec1c: 80 a2 60 00 cmp %o1, 0 200ec20: 12 80 00 07 bne 200ec3c <_POSIX_signals_Unblock_thread+0x70> 200ec24: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 200ec28: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 200ec2c: f2 22 00 00 st %i1, [ %o0 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 200ec30: c0 22 20 08 clr [ %o0 + 8 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 200ec34: 10 80 00 04 b 200ec44 <_POSIX_signals_Unblock_thread+0x78> 200ec38: c2 22 20 04 st %g1, [ %o0 + 4 ] the_info->si_value.sival_int = 0; } else { *the_info = *info; 200ec3c: 40 00 02 d1 call 200f780 200ec40: 94 10 20 0c mov 0xc, %o2 } _Thread_queue_Extract_with_proxy( the_thread ); 200ec44: 90 10 00 18 mov %i0, %o0 200ec48: 7f ff e5 f3 call 2008414 <_Thread_queue_Extract_with_proxy> 200ec4c: b0 10 20 01 mov 1, %i0 return true; 200ec50: 81 c7 e0 08 ret 200ec54: 81 e8 00 00 restore } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 200ec58: c8 01 20 cc ld [ %g4 + 0xcc ], %g4 200ec5c: 80 a8 c0 04 andncc %g3, %g4, %g0 200ec60: 02 80 00 24 be 200ecf0 <_POSIX_signals_Unblock_thread+0x124> 200ec64: 07 04 00 00 sethi %hi(0x10000000), %g3 * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 200ec68: 80 88 40 03 btst %g1, %g3 200ec6c: 02 80 00 12 be 200ecb4 <_POSIX_signals_Unblock_thread+0xe8> 200ec70: c4 2e 20 74 stb %g2, [ %i0 + 0x74 ] the_thread->Wait.return_code = EINTR; 200ec74: 84 10 20 04 mov 4, %g2 #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) ){ 200ec78: 80 88 60 08 btst 8, %g1 200ec7c: 02 80 00 1d be 200ecf0 <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN 200ec80: c4 26 20 34 st %g2, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200ec84: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200ec88: 80 a0 60 02 cmp %g1, 2 200ec8c: 12 80 00 05 bne 200eca0 <_POSIX_signals_Unblock_thread+0xd4><== NEVER TAKEN 200ec90: 90 10 00 18 mov %i0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 200ec94: 7f ff e8 b9 call 2008f78 <_Watchdog_Remove> 200ec98: 90 06 20 48 add %i0, 0x48, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 200ec9c: 90 10 00 18 mov %i0, %o0 200eca0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200eca4: 7f ff e2 d5 call 20077f8 <_Thread_Clear_state> 200eca8: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 200ecac: 81 c7 e0 08 ret 200ecb0: 91 e8 20 00 restore %g0, 0, %o0 if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 200ecb4: 80 a0 60 00 cmp %g1, 0 200ecb8: 12 80 00 0e bne 200ecf0 <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN 200ecbc: 03 00 80 6f sethi %hi(0x201bc00), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 200ecc0: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 201bdbc <_ISR_Nest_level> 200ecc4: 80 a0 60 00 cmp %g1, 0 200ecc8: 02 80 00 0a be 200ecf0 <_POSIX_signals_Unblock_thread+0x124> 200eccc: 03 00 80 6f sethi %hi(0x201bc00), %g1 200ecd0: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 201bde0 <_Thread_Executing> 200ecd4: 80 a6 00 01 cmp %i0, %g1 200ecd8: 12 bf ff de bne 200ec50 <_POSIX_signals_Unblock_thread+0x84><== NEVER TAKEN 200ecdc: b0 10 20 00 clr %i0 _ISR_Signals_to_thread_executing = true; 200ece0: 03 00 80 6f sethi %hi(0x201bc00), %g1 200ece4: c4 28 62 78 stb %g2, [ %g1 + 0x278 ] ! 201be78 <_ISR_Signals_to_thread_executing> 200ece8: 81 c7 e0 08 ret 200ecec: 81 e8 00 00 restore 200ecf0: b0 10 20 00 clr %i0 } } return false; } 200ecf4: 81 c7 e0 08 ret 200ecf8: 81 e8 00 00 restore =============================================================================== 0200bb20 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200bb20: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 200bb24: e0 06 21 68 ld [ %i0 + 0x168 ], %l0 if ( !api ) 200bb28: 80 a4 20 00 cmp %l0, 0 200bb2c: 02 80 00 1d be 200bba0 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN 200bb30: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200bb34: 7f ff d9 9f call 20021b0 200bb38: 01 00 00 00 nop signal_set = asr->signals_posted; 200bb3c: e6 04 20 14 ld [ %l0 + 0x14 ], %l3 asr->signals_posted = 0; 200bb40: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 200bb44: 7f ff d9 9f call 20021c0 200bb48: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200bb4c: 80 a4 e0 00 cmp %l3, 0 200bb50: 02 80 00 14 be 200bba0 <_RTEMS_tasks_Post_switch_extension+0x80> 200bb54: a2 07 bf fc add %fp, -4, %l1 return; asr->nest_level += 1; 200bb58: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb5c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200bb60: 82 00 60 01 inc %g1 200bb64: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb68: 94 10 00 11 mov %l1, %o2 200bb6c: 25 00 00 3f sethi %hi(0xfc00), %l2 200bb70: 40 00 08 7d call 200dd64 200bb74: 92 14 a3 ff or %l2, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200bb78: c2 04 20 0c ld [ %l0 + 0xc ], %g1 200bb7c: 9f c0 40 00 call %g1 200bb80: 90 10 00 13 mov %l3, %o0 asr->nest_level -= 1; 200bb84: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb88: d0 07 bf fc ld [ %fp + -4 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 200bb8c: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb90: 92 14 a3 ff or %l2, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 200bb94: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200bb98: 40 00 08 73 call 200dd64 200bb9c: 94 10 00 11 mov %l1, %o2 200bba0: 81 c7 e0 08 ret 200bba4: 81 e8 00 00 restore =============================================================================== 020070e4 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 20070e4: 9d e3 bf 98 save %sp, -104, %sp 20070e8: 11 00 80 86 sethi %hi(0x2021800), %o0 20070ec: 92 10 00 18 mov %i0, %o1 20070f0: 90 12 21 b0 or %o0, 0x1b0, %o0 20070f4: 40 00 07 a6 call 2008f8c <_Objects_Get> 20070f8: 94 07 bf fc add %fp, -4, %o2 /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 20070fc: c2 07 bf fc ld [ %fp + -4 ], %g1 2007100: 80 a0 60 00 cmp %g1, 0 2007104: 12 80 00 26 bne 200719c <_Rate_monotonic_Timeout+0xb8> <== NEVER TAKEN 2007108: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: the_thread = the_period->owner; 200710c: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2007110: 03 00 00 10 sethi %hi(0x4000), %g1 2007114: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2007118: 80 88 80 01 btst %g2, %g1 200711c: 22 80 00 0c be,a 200714c <_Rate_monotonic_Timeout+0x68> 2007120: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 the_thread->Wait.id == the_period->Object.id ) { 2007124: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2007128: c2 04 20 08 ld [ %l0 + 8 ], %g1 200712c: 80 a0 80 01 cmp %g2, %g1 2007130: 32 80 00 07 bne,a 200714c <_Rate_monotonic_Timeout+0x68> 2007134: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007138: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200713c: 40 00 08 eb call 20094e8 <_Thread_Clear_state> 2007140: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 2007144: 10 80 00 08 b 2007164 <_Rate_monotonic_Timeout+0x80> 2007148: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 200714c: 80 a0 60 01 cmp %g1, 1 2007150: 12 80 00 0e bne 2007188 <_Rate_monotonic_Timeout+0xa4> 2007154: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007158: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 200715c: 90 10 00 10 mov %l0, %o0 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007160: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 2007164: 7f ff fe 3e call 2006a5c <_Rate_monotonic_Initiate_statistics> 2007168: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200716c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007170: 92 04 20 10 add %l0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007174: c2 24 20 1c st %g1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007178: 11 00 80 87 sethi %hi(0x2021c00), %o0 200717c: 40 00 0f 3d call 200ae70 <_Watchdog_Insert> 2007180: 90 12 20 00 mov %o0, %o0 ! 2021c00 <_Watchdog_Ticks_chain> 2007184: 30 80 00 02 b,a 200718c <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2007188: c2 24 20 38 st %g1, [ %l0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 200718c: 03 00 80 86 sethi %hi(0x2021800), %g1 2007190: c4 00 63 20 ld [ %g1 + 0x320 ], %g2 ! 2021b20 <_Thread_Dispatch_disable_level> 2007194: 84 00 bf ff add %g2, -1, %g2 2007198: c4 20 63 20 st %g2, [ %g1 + 0x320 ] 200719c: 81 c7 e0 08 ret 20071a0: 81 e8 00 00 restore =============================================================================== 02006af4 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2006af4: 9d e3 bf a0 save %sp, -96, %sp uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 2006af8: 03 00 80 86 sethi %hi(0x2021800), %g1 if ((!the_tod) || 2006afc: 80 a6 20 00 cmp %i0, 0 2006b00: 02 80 00 2d be 2006bb4 <_TOD_Validate+0xc0> <== NEVER TAKEN 2006b04: d2 00 61 14 ld [ %g1 + 0x114 ], %o1 (the_tod->ticks >= ticks_per_second) || 2006b08: 11 00 03 d0 sethi %hi(0xf4000), %o0 2006b0c: 40 00 5b 17 call 201d768 <.udiv> 2006b10: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 2006b14: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2006b18: 80 a0 40 08 cmp %g1, %o0 2006b1c: 1a 80 00 26 bcc 2006bb4 <_TOD_Validate+0xc0> 2006b20: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 2006b24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006b28: 80 a0 60 3b cmp %g1, 0x3b 2006b2c: 18 80 00 22 bgu 2006bb4 <_TOD_Validate+0xc0> 2006b30: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 2006b34: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2006b38: 80 a0 60 3b cmp %g1, 0x3b 2006b3c: 18 80 00 1e bgu 2006bb4 <_TOD_Validate+0xc0> 2006b40: 01 00 00 00 nop (the_tod->hour >= TOD_HOURS_PER_DAY) || 2006b44: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2006b48: 80 a0 60 17 cmp %g1, 0x17 2006b4c: 18 80 00 1a bgu 2006bb4 <_TOD_Validate+0xc0> 2006b50: 01 00 00 00 nop (the_tod->month == 0) || 2006b54: c2 06 20 04 ld [ %i0 + 4 ], %g1 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) || 2006b58: 80 a0 60 00 cmp %g1, 0 2006b5c: 02 80 00 16 be 2006bb4 <_TOD_Validate+0xc0> <== NEVER TAKEN 2006b60: 80 a0 60 0c cmp %g1, 0xc 2006b64: 18 80 00 14 bgu 2006bb4 <_TOD_Validate+0xc0> 2006b68: 01 00 00 00 nop (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) || 2006b6c: c6 06 00 00 ld [ %i0 ], %g3 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) || 2006b70: 80 a0 e7 c3 cmp %g3, 0x7c3 2006b74: 08 80 00 10 bleu 2006bb4 <_TOD_Validate+0xc0> 2006b78: 01 00 00 00 nop (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) ) 2006b7c: c4 06 20 08 ld [ %i0 + 8 ], %g2 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) || 2006b80: 80 a0 a0 00 cmp %g2, 0 2006b84: 02 80 00 0c be 2006bb4 <_TOD_Validate+0xc0> <== NEVER TAKEN 2006b88: 80 88 e0 03 btst 3, %g3 2006b8c: 07 00 80 80 sethi %hi(0x2020000), %g3 (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 ) 2006b90: 12 80 00 03 bne 2006b9c <_TOD_Validate+0xa8> 2006b94: 86 10 e0 4c or %g3, 0x4c, %g3 ! 202004c <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2006b98: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2006b9c: 83 28 60 02 sll %g1, 2, %g1 2006ba0: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 2006ba4: 80 a0 40 02 cmp %g1, %g2 2006ba8: b0 60 3f ff subx %g0, -1, %i0 2006bac: 81 c7 e0 08 ret 2006bb0: 81 e8 00 00 restore if ( the_tod->day > days_in_month ) return false; return true; } 2006bb4: 81 c7 e0 08 ret 2006bb8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02007614 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2007614: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 2007618: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 /* * 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 ); 200761c: 40 00 04 53 call 2008768 <_Thread_Set_transient> 2007620: 90 10 00 18 mov %i0, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 2007624: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2007628: a0 10 00 18 mov %i0, %l0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 200762c: 80 a0 40 19 cmp %g1, %i1 2007630: 02 80 00 04 be 2007640 <_Thread_Change_priority+0x2c> 2007634: 92 10 00 19 mov %i1, %o1 _Thread_Set_priority( the_thread, new_priority ); 2007638: 40 00 03 cf call 2008574 <_Thread_Set_priority> 200763c: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 2007640: 7f ff ea dc call 20021b0 2007644: 01 00 00 00 nop 2007648: b0 10 00 08 mov %o0, %i0 /* * 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; 200764c: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 2007650: 80 a4 a0 04 cmp %l2, 4 2007654: 02 80 00 10 be 2007694 <_Thread_Change_priority+0x80> 2007658: a2 0c 60 04 and %l1, 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 200765c: 80 a4 60 00 cmp %l1, 0 2007660: 12 80 00 03 bne 200766c <_Thread_Change_priority+0x58> <== NEVER TAKEN 2007664: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2007668: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 200766c: 7f ff ea d5 call 20021c0 2007670: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2007674: 03 00 00 ef sethi %hi(0x3bc00), %g1 2007678: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200767c: 80 8c 80 01 btst %l2, %g1 2007680: 02 80 00 5c be 20077f0 <_Thread_Change_priority+0x1dc> 2007684: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2007688: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 200768c: 40 00 03 8d call 20084c0 <_Thread_queue_Requeue> 2007690: 93 e8 00 10 restore %g0, %l0, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 2007694: 80 a4 60 00 cmp %l1, 0 2007698: 12 80 00 1c bne 2007708 <_Thread_Change_priority+0xf4> <== NEVER TAKEN 200769c: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 20076a0: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 20076a4: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 20076a8: c8 10 80 00 lduh [ %g2 ], %g4 _Priority_Major_bit_map |= the_priority_map->ready_major; 20076ac: 03 00 80 6f sethi %hi(0x201bc00), %g1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 20076b0: 86 11 00 03 or %g4, %g3, %g3 20076b4: c6 30 80 00 sth %g3, [ %g2 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 20076b8: c4 10 61 d4 lduh [ %g1 + 0x1d4 ], %g2 20076bc: c6 14 20 94 lduh [ %l0 + 0x94 ], %g3 * 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 ); 20076c0: c0 24 20 10 clr [ %l0 + 0x10 ] 20076c4: 84 10 c0 02 or %g3, %g2, %g2 20076c8: c4 30 61 d4 sth %g2, [ %g1 + 0x1d4 ] _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 20076cc: 80 8e a0 ff btst 0xff, %i2 20076d0: 02 80 00 08 be 20076f0 <_Thread_Change_priority+0xdc> 20076d4: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 20076d8: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 20076dc: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 20076e0: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 20076e4: e0 20 a0 04 st %l0, [ %g2 + 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; 20076e8: 10 80 00 08 b 2007708 <_Thread_Change_priority+0xf4> 20076ec: c4 24 00 00 st %g2, [ %l0 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 20076f0: 84 00 60 04 add %g1, 4, %g2 20076f4: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 20076f8: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 20076fc: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2007700: c4 24 20 04 st %g2, [ %l0 + 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; 2007704: e0 20 80 00 st %l0, [ %g2 ] _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 2007708: 7f ff ea ae call 20021c0 200770c: 90 10 00 18 mov %i0, %o0 2007710: 7f ff ea a8 call 20021b0 2007714: 01 00 00 00 nop 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 ); 2007718: 03 00 80 6f sethi %hi(0x201bc00), %g1 200771c: c4 10 61 d4 lduh [ %g1 + 0x1d4 ], %g2 ! 201bdd4 <_Priority_Major_bit_map> */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 2007720: 03 00 80 6f sethi %hi(0x201bc00), %g1 2007724: 85 28 a0 10 sll %g2, 0x10, %g2 2007728: da 00 60 74 ld [ %g1 + 0x74 ], %o5 200772c: 87 30 a0 10 srl %g2, 0x10, %g3 2007730: 03 00 80 68 sethi %hi(0x201a000), %g1 2007734: 80 a0 e0 ff cmp %g3, 0xff 2007738: 18 80 00 05 bgu 200774c <_Thread_Change_priority+0x138> 200773c: 82 10 61 c0 or %g1, 0x1c0, %g1 2007740: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 2007744: 10 80 00 04 b 2007754 <_Thread_Change_priority+0x140> 2007748: 84 00 a0 08 add %g2, 8, %g2 200774c: 85 30 a0 18 srl %g2, 0x18, %g2 2007750: c4 08 40 02 ldub [ %g1 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 2007754: 83 28 a0 10 sll %g2, 0x10, %g1 2007758: 07 00 80 6f sethi %hi(0x201bc00), %g3 200775c: 83 30 60 0f srl %g1, 0xf, %g1 2007760: 86 10 e2 50 or %g3, 0x250, %g3 2007764: c6 10 c0 01 lduh [ %g3 + %g1 ], %g3 2007768: 03 00 80 68 sethi %hi(0x201a000), %g1 200776c: 87 28 e0 10 sll %g3, 0x10, %g3 2007770: 89 30 e0 10 srl %g3, 0x10, %g4 2007774: 80 a1 20 ff cmp %g4, 0xff 2007778: 18 80 00 05 bgu 200778c <_Thread_Change_priority+0x178> 200777c: 82 10 61 c0 or %g1, 0x1c0, %g1 2007780: c2 08 40 04 ldub [ %g1 + %g4 ], %g1 2007784: 10 80 00 04 b 2007794 <_Thread_Change_priority+0x180> 2007788: 82 00 60 08 add %g1, 8, %g1 200778c: 87 30 e0 18 srl %g3, 0x18, %g3 2007790: c2 08 40 03 ldub [ %g1 + %g3 ], %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 2007794: 83 28 60 10 sll %g1, 0x10, %g1 2007798: 83 30 60 10 srl %g1, 0x10, %g1 200779c: 85 28 a0 10 sll %g2, 0x10, %g2 20077a0: 85 30 a0 0c srl %g2, 0xc, %g2 20077a4: 84 00 40 02 add %g1, %g2, %g2 20077a8: 83 28 a0 04 sll %g2, 4, %g1 20077ac: 85 28 a0 02 sll %g2, 2, %g2 20077b0: 84 20 40 02 sub %g1, %g2, %g2 20077b4: c4 03 40 02 ld [ %o5 + %g2 ], %g2 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 20077b8: 03 00 80 6f sethi %hi(0x201bc00), %g1 20077bc: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 201bde0 <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 20077c0: 07 00 80 6f sethi %hi(0x201bc00), %g3 * 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() && 20077c4: 80 a0 40 02 cmp %g1, %g2 20077c8: 02 80 00 08 be 20077e8 <_Thread_Change_priority+0x1d4> 20077cc: c4 20 e1 b0 st %g2, [ %g3 + 0x1b0 ] _Thread_Executing->is_preemptible ) 20077d0: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 20077d4: 80 a0 60 00 cmp %g1, 0 20077d8: 02 80 00 04 be 20077e8 <_Thread_Change_priority+0x1d4> 20077dc: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 20077e0: 03 00 80 6f sethi %hi(0x201bc00), %g1 20077e4: c4 28 61 f0 stb %g2, [ %g1 + 0x1f0 ] ! 201bdf0 <_Context_Switch_necessary> _ISR_Enable( level ); 20077e8: 7f ff ea 76 call 20021c0 20077ec: 81 e8 00 00 restore 20077f0: 81 c7 e0 08 ret 20077f4: 81 e8 00 00 restore =============================================================================== 020077f8 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 20077f8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 20077fc: 7f ff ea 6d call 20021b0 2007800: a0 10 00 18 mov %i0, %l0 2007804: b0 10 00 08 mov %o0, %i0 current_state = the_thread->current_state; 2007808: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & state ) { 200780c: 80 8e 40 01 btst %i1, %g1 2007810: 02 80 00 2d be 20078c4 <_Thread_Clear_state+0xcc> 2007814: 01 00 00 00 nop RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 2007818: b2 28 40 19 andn %g1, %i1, %i1 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 200781c: 80 a6 60 00 cmp %i1, 0 2007820: 12 80 00 29 bne 20078c4 <_Thread_Clear_state+0xcc> 2007824: f2 24 20 10 st %i1, [ %l0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2007828: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 200782c: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 2007830: c8 10 80 00 lduh [ %g2 ], %g4 2007834: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 2007838: 86 11 00 03 or %g4, %g3, %g3 200783c: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2007840: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 2007844: da 14 20 94 lduh [ %l0 + 0x94 ], %o5 2007848: c4 24 00 00 st %g2, [ %l0 ] 200784c: 07 00 80 6f sethi %hi(0x201bc00), %g3 old_last_node = the_chain->last; 2007850: c4 00 60 08 ld [ %g1 + 8 ], %g2 2007854: c8 10 e1 d4 lduh [ %g3 + 0x1d4 ], %g4 the_chain->last = the_node; 2007858: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200785c: c4 24 20 04 st %g2, [ %l0 + 4 ] 2007860: 82 13 40 04 or %o5, %g4, %g1 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; 2007864: e0 20 80 00 st %l0, [ %g2 ] 2007868: c2 30 e1 d4 sth %g1, [ %g3 + 0x1d4 ] _ISR_Flash( level ); 200786c: 7f ff ea 55 call 20021c0 2007870: 01 00 00 00 nop 2007874: 7f ff ea 4f call 20021b0 2007878: 01 00 00 00 nop * 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 ) { 200787c: 05 00 80 6f sethi %hi(0x201bc00), %g2 2007880: c6 00 a1 b0 ld [ %g2 + 0x1b0 ], %g3 ! 201bdb0 <_Thread_Heir> 2007884: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2007888: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 200788c: 80 a0 40 03 cmp %g1, %g3 2007890: 1a 80 00 0d bcc 20078c4 <_Thread_Clear_state+0xcc> 2007894: 07 00 80 6f sethi %hi(0x201bc00), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2007898: c6 00 e1 e0 ld [ %g3 + 0x1e0 ], %g3 ! 201bde0 <_Thread_Executing> * 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 ) { _Thread_Heir = the_thread; 200789c: e0 20 a1 b0 st %l0, [ %g2 + 0x1b0 ] if ( _Thread_Executing->is_preemptible || 20078a0: c4 08 e0 75 ldub [ %g3 + 0x75 ], %g2 20078a4: 80 a0 a0 00 cmp %g2, 0 20078a8: 12 80 00 05 bne 20078bc <_Thread_Clear_state+0xc4> 20078ac: 84 10 20 01 mov 1, %g2 20078b0: 80 a0 60 00 cmp %g1, 0 20078b4: 12 80 00 04 bne 20078c4 <_Thread_Clear_state+0xcc> <== ALWAYS TAKEN 20078b8: 01 00 00 00 nop the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 20078bc: 03 00 80 6f sethi %hi(0x201bc00), %g1 20078c0: c4 28 61 f0 stb %g2, [ %g1 + 0x1f0 ] ! 201bdf0 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 20078c4: 7f ff ea 3f call 20021c0 20078c8: 81 e8 00 00 restore =============================================================================== 02007a7c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2007a7c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2007a80: 90 10 00 18 mov %i0, %o0 2007a84: 40 00 00 7c call 2007c74 <_Thread_Get> 2007a88: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2007a8c: c2 07 bf fc ld [ %fp + -4 ], %g1 2007a90: 80 a0 60 00 cmp %g1, 0 2007a94: 12 80 00 08 bne 2007ab4 <_Thread_Delay_ended+0x38> <== NEVER TAKEN 2007a98: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2007a9c: 7f ff ff 57 call 20077f8 <_Thread_Clear_state> 2007aa0: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 2007aa4: 03 00 80 6f sethi %hi(0x201bc00), %g1 2007aa8: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201bd20 <_Thread_Dispatch_disable_level> 2007aac: 84 00 bf ff add %g2, -1, %g2 2007ab0: c4 20 61 20 st %g2, [ %g1 + 0x120 ] 2007ab4: 81 c7 e0 08 ret 2007ab8: 81 e8 00 00 restore =============================================================================== 02007abc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2007abc: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 2007ac0: 2f 00 80 6f sethi %hi(0x201bc00), %l7 _ISR_Disable( level ); 2007ac4: 7f ff e9 bb call 20021b0 2007ac8: e0 05 e1 e0 ld [ %l7 + 0x1e0 ], %l0 ! 201bde0 <_Thread_Executing> while ( _Context_Switch_necessary == true ) { 2007acc: 2d 00 80 6f sethi %hi(0x201bc00), %l6 2007ad0: 33 00 80 6f sethi %hi(0x201bc00), %i1 heir = _Thread_Heir; 2007ad4: 35 00 80 6f sethi %hi(0x201bc00), %i2 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007ad8: 37 00 80 6f sethi %hi(0x201bc00), %i3 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2007adc: 25 00 80 6f sethi %hi(0x201bc00), %l2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007ae0: 39 00 80 6f sethi %hi(0x201bc00), %i4 #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 ); 2007ae4: 2b 00 80 6f sethi %hi(0x201bc00), %l5 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; 2007ae8: ae 15 e1 e0 or %l7, 0x1e0, %l7 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 2007aec: ac 15 a1 f0 or %l6, 0x1f0, %l6 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2007af0: b2 16 61 20 or %i1, 0x120, %i1 ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 2007af4: b4 16 a1 b0 or %i2, 0x1b0, %i2 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007af8: b6 16 e0 78 or %i3, 0x78, %i3 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2007afc: a4 14 a1 e8 or %l2, 0x1e8, %l2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007b00: b8 17 21 ac or %i4, 0x1ac, %i4 2007b04: aa 15 61 a8 or %l5, 0x1a8, %l5 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2007b08: ba 10 20 01 mov 1, %i5 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2007b0c: a8 07 bf f8 add %fp, -8, %l4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 2007b10: 10 80 00 37 b 2007bec <_Thread_Dispatch+0x130> 2007b14: a6 07 bf f0 add %fp, -16, %l3 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 2007b18: fa 26 40 00 st %i5, [ %i1 ] _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 ) 2007b1c: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 2007b20: c0 2d 80 00 clrb [ %l6 ] _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 ) 2007b24: 80 a0 60 01 cmp %g1, 1 2007b28: 12 80 00 04 bne 2007b38 <_Thread_Dispatch+0x7c> 2007b2c: e2 25 c0 00 st %l1, [ %l7 ] heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2007b30: c2 06 c0 00 ld [ %i3 ], %g1 2007b34: c2 24 60 78 st %g1, [ %l1 + 0x78 ] _ISR_Enable( level ); 2007b38: 7f ff e9 a2 call 20021c0 2007b3c: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2007b40: 40 00 11 1c call 200bfb0 <_TOD_Get_uptime> 2007b44: 90 10 00 14 mov %l4, %o0 _Timestamp_Subtract( 2007b48: 90 10 00 12 mov %l2, %o0 2007b4c: 92 10 00 14 mov %l4, %o1 2007b50: 40 00 03 e8 call 2008af0 <_Timespec_Subtract> 2007b54: 94 10 00 13 mov %l3, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 2007b58: 90 04 20 84 add %l0, 0x84, %o0 2007b5c: 40 00 03 cb call 2008a88 <_Timespec_Add_to> 2007b60: 92 10 00 13 mov %l3, %o1 _Thread_Time_of_last_context_switch = uptime; 2007b64: c4 07 bf f8 ld [ %fp + -8 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007b68: c2 07 00 00 ld [ %i4 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2007b6c: c4 24 80 00 st %g2, [ %l2 ] 2007b70: c4 07 bf fc ld [ %fp + -4 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2007b74: 80 a0 60 00 cmp %g1, 0 2007b78: 02 80 00 06 be 2007b90 <_Thread_Dispatch+0xd4> <== NEVER TAKEN 2007b7c: c4 24 a0 04 st %g2, [ %l2 + 4 ] executing->libc_reent = *_Thread_libc_reent; 2007b80: c4 00 40 00 ld [ %g1 ], %g2 2007b84: c4 24 21 64 st %g2, [ %l0 + 0x164 ] *_Thread_libc_reent = heir->libc_reent; 2007b88: c4 04 61 64 ld [ %l1 + 0x164 ], %g2 2007b8c: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2007b90: 90 10 00 10 mov %l0, %o0 2007b94: 40 00 04 8c call 2008dc4 <_User_extensions_Thread_switch> 2007b98: 92 10 00 11 mov %l1, %o1 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 2007b9c: 92 04 60 d8 add %l1, 0xd8, %o1 2007ba0: 40 00 05 ba call 2009288 <_CPU_Context_switch> 2007ba4: 90 04 20 d8 add %l0, 0xd8, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 2007ba8: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 2007bac: 80 a0 60 00 cmp %g1, 0 2007bb0: 02 80 00 0d be 2007be4 <_Thread_Dispatch+0x128> 2007bb4: 01 00 00 00 nop 2007bb8: d0 05 40 00 ld [ %l5 ], %o0 2007bbc: 80 a4 00 08 cmp %l0, %o0 2007bc0: 02 80 00 09 be 2007be4 <_Thread_Dispatch+0x128> 2007bc4: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2007bc8: 02 80 00 04 be 2007bd8 <_Thread_Dispatch+0x11c> 2007bcc: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2007bd0: 40 00 05 74 call 20091a0 <_CPU_Context_save_fp> 2007bd4: 90 02 21 60 add %o0, 0x160, %o0 _Context_Restore_fp( &executing->fp_context ); 2007bd8: 40 00 05 8f call 2009214 <_CPU_Context_restore_fp> 2007bdc: 90 04 21 60 add %l0, 0x160, %o0 _Thread_Allocated_fp = executing; 2007be0: e0 25 40 00 st %l0, [ %l5 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 2007be4: 7f ff e9 73 call 20021b0 2007be8: e0 05 c0 00 ld [ %l7 ], %l0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 2007bec: c2 0d 80 00 ldub [ %l6 ], %g1 2007bf0: 80 a0 60 00 cmp %g1, 0 2007bf4: 32 bf ff c9 bne,a 2007b18 <_Thread_Dispatch+0x5c> 2007bf8: e2 06 80 00 ld [ %i2 ], %l1 executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 2007bfc: 03 00 80 6f sethi %hi(0x201bc00), %g1 2007c00: c0 20 61 20 clr [ %g1 + 0x120 ] ! 201bd20 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 2007c04: 7f ff e9 6f call 20021c0 2007c08: 01 00 00 00 nop if ( _Thread_Do_post_task_switch_extension || 2007c0c: 03 00 80 6f sethi %hi(0x201bc00), %g1 2007c10: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 201bdc4 <_Thread_Do_post_task_switch_extension> 2007c14: 80 a0 60 00 cmp %g1, 0 2007c18: 12 80 00 06 bne 2007c30 <_Thread_Dispatch+0x174> 2007c1c: 01 00 00 00 nop executing->do_post_task_switch_extension ) { 2007c20: c2 0c 20 74 ldub [ %l0 + 0x74 ], %g1 2007c24: 80 a0 60 00 cmp %g1, 0 2007c28: 02 80 00 04 be 2007c38 <_Thread_Dispatch+0x17c> 2007c2c: 01 00 00 00 nop executing->do_post_task_switch_extension = false; _API_extensions_Run_postswitch(); 2007c30: 7f ff f9 c3 call 200633c <_API_extensions_Run_postswitch> 2007c34: c0 2c 20 74 clrb [ %l0 + 0x74 ] 2007c38: 81 c7 e0 08 ret 2007c3c: 81 e8 00 00 restore =============================================================================== 0200e184 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 200e184: 03 00 80 6f sethi %hi(0x201bc00), %g1 200e188: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 201bde0 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 200e18c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200e190: 80 a0 a0 00 cmp %g2, 0 200e194: 12 80 00 0b bne 200e1c0 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN 200e198: 84 10 20 01 mov 1, %g2 200e19c: 05 00 80 6f sethi %hi(0x201bc00), %g2 200e1a0: c4 00 a1 b0 ld [ %g2 + 0x1b0 ], %g2 ! 201bdb0 <_Thread_Heir> 200e1a4: 80 a0 40 02 cmp %g1, %g2 200e1a8: 02 80 00 0b be 200e1d4 <_Thread_Evaluate_mode+0x50> 200e1ac: 01 00 00 00 nop ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 200e1b0: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 200e1b4: 80 a0 60 00 cmp %g1, 0 200e1b8: 02 80 00 07 be 200e1d4 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN 200e1bc: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 200e1c0: 03 00 80 6f sethi %hi(0x201bc00), %g1 200e1c4: 90 10 20 01 mov 1, %o0 200e1c8: c4 28 61 f0 stb %g2, [ %g1 + 0x1f0 ] return true; 200e1cc: 81 c3 e0 08 retl 200e1d0: 01 00 00 00 nop } return false; } 200e1d4: 81 c3 e0 08 retl 200e1d8: 90 10 20 00 clr %o0 ! 0 =============================================================================== 0200e1dc <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200e1dc: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 200e1e0: 03 00 80 6f sethi %hi(0x201bc00), %g1 200e1e4: e0 00 61 e0 ld [ %g1 + 0x1e0 ], %l0 ! 201bde0 <_Thread_Executing> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 200e1e8: 3f 00 80 38 sethi %hi(0x200e000), %i7 200e1ec: be 17 e1 dc or %i7, 0x1dc, %i7 ! 200e1dc <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200e1f0: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200e1f4: 7f ff cf f3 call 20021c0 200e1f8: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200e1fc: 03 00 80 6e sethi %hi(0x201b800), %g1 doneConstructors = 1; 200e200: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200e204: e2 08 61 d8 ldub [ %g1 + 0x1d8 ], %l1 doneConstructors = 1; 200e208: c4 28 61 d8 stb %g2, [ %g1 + 0x1d8 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200e20c: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 200e210: 80 a0 60 00 cmp %g1, 0 200e214: 02 80 00 0c be 200e244 <_Thread_Handler+0x68> 200e218: 03 00 80 6f sethi %hi(0x201bc00), %g1 #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 ); 200e21c: d0 00 61 a8 ld [ %g1 + 0x1a8 ], %o0 ! 201bda8 <_Thread_Allocated_fp> 200e220: 80 a4 00 08 cmp %l0, %o0 200e224: 02 80 00 08 be 200e244 <_Thread_Handler+0x68> 200e228: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200e22c: 22 80 00 06 be,a 200e244 <_Thread_Handler+0x68> 200e230: e0 20 61 a8 st %l0, [ %g1 + 0x1a8 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200e234: 7f ff eb db call 20091a0 <_CPU_Context_save_fp> 200e238: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200e23c: 03 00 80 6f sethi %hi(0x201bc00), %g1 200e240: e0 20 61 a8 st %l0, [ %g1 + 0x1a8 ] ! 201bda8 <_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 ); 200e244: 7f ff ea 6d call 2008bf8 <_User_extensions_Thread_begin> 200e248: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200e24c: 7f ff e6 7d call 2007c40 <_Thread_Enable_dispatch> 200e250: a3 2c 60 18 sll %l1, 0x18, %l1 /* * _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) */ { 200e254: 80 a4 60 00 cmp %l1, 0 200e258: 32 80 00 05 bne,a 200e26c <_Thread_Handler+0x90> 200e25c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 INIT_NAME (); 200e260: 40 00 33 ac call 201b110 <_init> 200e264: 01 00 00 00 nop } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200e268: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200e26c: 80 a0 60 00 cmp %g1, 0 200e270: 12 80 00 05 bne 200e284 <_Thread_Handler+0xa8> 200e274: 80 a0 60 01 cmp %g1, 1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200e278: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200e27c: 10 80 00 06 b 200e294 <_Thread_Handler+0xb8> 200e280: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 200e284: 12 80 00 07 bne 200e2a0 <_Thread_Handler+0xc4> <== NEVER TAKEN 200e288: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 200e28c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200e290: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 200e294: 9f c0 40 00 call %g1 200e298: 01 00 00 00 nop executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 200e29c: d0 24 20 28 st %o0, [ %l0 + 0x28 ] * 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 ); 200e2a0: 7f ff ea 67 call 2008c3c <_User_extensions_Thread_exitted> 200e2a4: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200e2a8: 90 10 20 00 clr %o0 200e2ac: 92 10 20 01 mov 1, %o1 200e2b0: 7f ff e2 8e call 2006ce8 <_Internal_error_Occurred> 200e2b4: 94 10 20 06 mov 6, %o2 =============================================================================== 02007d20 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2007d20: 9d e3 bf a0 save %sp, -96, %sp 2007d24: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 2007d28: c0 26 61 68 clr [ %i1 + 0x168 ] 2007d2c: c0 26 61 6c clr [ %i1 + 0x16c ] 2007d30: c0 26 61 70 clr [ %i1 + 0x170 ] extensions_area = NULL; the_thread->libc_reent = NULL; 2007d34: c0 26 61 64 clr [ %i1 + 0x164 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2007d38: e0 00 40 00 ld [ %g1 ], %l0 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 2007d3c: 80 a6 a0 00 cmp %i2, 0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2007d40: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 2007d44: 12 80 00 0f bne 2007d80 <_Thread_Initialize+0x60> 2007d48: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 2007d4c: 90 10 00 19 mov %i1, %o0 2007d50: 40 00 02 ab call 20087fc <_Thread_Stack_Allocate> 2007d54: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2007d58: 80 a2 00 1b cmp %o0, %i3 2007d5c: 0a 80 00 04 bcs 2007d6c <_Thread_Initialize+0x4c> 2007d60: 80 a2 20 00 cmp %o0, 0 2007d64: 12 80 00 04 bne 2007d74 <_Thread_Initialize+0x54> <== ALWAYS TAKEN 2007d68: 82 10 20 01 mov 1, %g1 2007d6c: 81 c7 e0 08 ret 2007d70: 91 e8 20 00 restore %g0, 0, %o0 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 2007d74: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = true; 2007d78: 10 80 00 04 b 2007d88 <_Thread_Initialize+0x68> 2007d7c: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 2007d80: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] 2007d84: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2007d88: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 2007d8c: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2007d90: 80 8f 20 ff btst 0xff, %i4 2007d94: 02 80 00 08 be 2007db4 <_Thread_Initialize+0x94> 2007d98: b4 10 20 00 clr %i2 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2007d9c: 90 10 20 88 mov 0x88, %o0 2007da0: 40 00 04 d7 call 20090fc <_Workspace_Allocate> 2007da4: b6 10 20 00 clr %i3 if ( !fp_area ) 2007da8: b4 92 20 00 orcc %o0, 0, %i2 2007dac: 22 80 00 42 be,a 2007eb4 <_Thread_Initialize+0x194> 2007db0: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007db4: 03 00 80 6f sethi %hi(0x201bc00), %g1 2007db8: d0 00 61 c0 ld [ %g1 + 0x1c0 ], %o0 ! 201bdc0 <_Thread_Maximum_extensions> 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; 2007dbc: f4 26 61 60 st %i2, [ %i1 + 0x160 ] the_thread->Start.fp_context = fp_area; 2007dc0: f4 26 60 cc st %i2, [ %i1 + 0xcc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007dc4: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2007dc8: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007dcc: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007dd0: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007dd4: 80 a2 20 00 cmp %o0, 0 2007dd8: 02 80 00 08 be 2007df8 <_Thread_Initialize+0xd8> 2007ddc: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 2007de0: 90 02 20 01 inc %o0 2007de4: 40 00 04 c6 call 20090fc <_Workspace_Allocate> 2007de8: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 2007dec: b6 92 20 00 orcc %o0, 0, %i3 2007df0: 22 80 00 31 be,a 2007eb4 <_Thread_Initialize+0x194> 2007df4: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 * 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 ) { 2007df8: 80 a6 e0 00 cmp %i3, 0 2007dfc: 02 80 00 0c be 2007e2c <_Thread_Initialize+0x10c> 2007e00: f6 26 61 74 st %i3, [ %i1 + 0x174 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2007e04: 03 00 80 6f sethi %hi(0x201bc00), %g1 2007e08: c4 00 61 c0 ld [ %g1 + 0x1c0 ], %g2 ! 201bdc0 <_Thread_Maximum_extensions> 2007e0c: 10 80 00 05 b 2007e20 <_Thread_Initialize+0x100> 2007e10: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 2007e14: 87 28 60 02 sll %g1, 2, %g3 * 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++ ) 2007e18: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 2007e1c: c0 21 00 03 clr [ %g4 + %g3 ] * 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++ ) 2007e20: 80 a0 40 02 cmp %g1, %g2 2007e24: 28 bf ff fc bleu,a 2007e14 <_Thread_Initialize+0xf4> 2007e28: c8 06 61 74 ld [ %i1 + 0x174 ], %g4 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007e2c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2007e30: e4 2e 60 ac stb %l2, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007e34: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 2007e38: 80 a4 60 02 cmp %l1, 2 2007e3c: 12 80 00 05 bne 2007e50 <_Thread_Initialize+0x130> 2007e40: e2 26 60 b0 st %l1, [ %i1 + 0xb0 ] 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; 2007e44: 03 00 80 6f sethi %hi(0x201bc00), %g1 2007e48: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201bc78 <_Thread_Ticks_per_timeslice> 2007e4c: c2 26 60 78 st %g1, [ %i1 + 0x78 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2007e50: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 #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 ); 2007e54: 92 10 00 1d mov %i5, %o1 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2007e58: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2007e5c: 82 10 20 01 mov 1, %g1 #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 ); 2007e60: 90 10 00 19 mov %i1, %o0 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2007e64: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 2007e68: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 2007e6c: c0 26 60 1c clr [ %i1 + 0x1c ] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 2007e70: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007e74: 40 00 01 c0 call 2008574 <_Thread_Set_priority> 2007e78: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007e7c: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 2007e80: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2007e84: 83 28 60 02 sll %g1, 2, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2007e88: e0 26 60 0c st %l0, [ %i1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007e8c: f2 20 80 01 st %i1, [ %g2 + %g1 ] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 2007e90: c0 26 60 84 clr [ %i1 + 0x84 ] 2007e94: c0 26 60 88 clr [ %i1 + 0x88 ] * 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 ); 2007e98: 90 10 00 19 mov %i1, %o0 2007e9c: 40 00 03 8c call 2008ccc <_User_extensions_Thread_create> 2007ea0: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2007ea4: 80 8a 20 ff btst 0xff, %o0 2007ea8: 12 80 00 27 bne 2007f44 <_Thread_Initialize+0x224> 2007eac: 01 00 00 00 nop return true; failed: if ( the_thread->libc_reent ) 2007eb0: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 2007eb4: 80 a2 20 00 cmp %o0, 0 2007eb8: 22 80 00 05 be,a 2007ecc <_Thread_Initialize+0x1ac> 2007ebc: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 _Workspace_Free( the_thread->libc_reent ); 2007ec0: 40 00 04 98 call 2009120 <_Workspace_Free> 2007ec4: 01 00 00 00 nop for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 2007ec8: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 2007ecc: 80 a2 20 00 cmp %o0, 0 2007ed0: 22 80 00 05 be,a 2007ee4 <_Thread_Initialize+0x1c4> 2007ed4: d0 06 61 6c ld [ %i1 + 0x16c ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2007ed8: 40 00 04 92 call 2009120 <_Workspace_Free> 2007edc: 01 00 00 00 nop 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] ) 2007ee0: d0 06 61 6c ld [ %i1 + 0x16c ], %o0 2007ee4: 80 a2 20 00 cmp %o0, 0 2007ee8: 22 80 00 05 be,a 2007efc <_Thread_Initialize+0x1dc> 2007eec: d0 06 61 70 ld [ %i1 + 0x170 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 2007ef0: 40 00 04 8c call 2009120 <_Workspace_Free> 2007ef4: 01 00 00 00 nop 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] ) 2007ef8: d0 06 61 70 ld [ %i1 + 0x170 ], %o0 2007efc: 80 a2 20 00 cmp %o0, 0 2007f00: 02 80 00 05 be 2007f14 <_Thread_Initialize+0x1f4> <== ALWAYS TAKEN 2007f04: 80 a6 e0 00 cmp %i3, 0 _Workspace_Free( the_thread->API_Extensions[i] ); 2007f08: 40 00 04 86 call 2009120 <_Workspace_Free> <== NOT EXECUTED 2007f0c: 01 00 00 00 nop <== NOT EXECUTED if ( extensions_area ) 2007f10: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 2007f14: 02 80 00 05 be 2007f28 <_Thread_Initialize+0x208> 2007f18: 80 a6 a0 00 cmp %i2, 0 (void) _Workspace_Free( extensions_area ); 2007f1c: 40 00 04 81 call 2009120 <_Workspace_Free> 2007f20: 90 10 00 1b mov %i3, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007f24: 80 a6 a0 00 cmp %i2, 0 2007f28: 02 80 00 05 be 2007f3c <_Thread_Initialize+0x21c> 2007f2c: 90 10 00 19 mov %i1, %o0 (void) _Workspace_Free( fp_area ); 2007f30: 40 00 04 7c call 2009120 <_Workspace_Free> 2007f34: 90 10 00 1a mov %i2, %o0 #endif _Thread_Stack_Free( the_thread ); 2007f38: 90 10 00 19 mov %i1, %o0 2007f3c: 40 00 02 47 call 2008858 <_Thread_Stack_Free> 2007f40: b0 10 20 00 clr %i0 return false; } 2007f44: 81 c7 e0 08 ret 2007f48: 81 e8 00 00 restore =============================================================================== 0200c728 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 200c728: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 200c72c: 7f ff d7 1f call 20023a8 200c730: a0 10 00 18 mov %i0, %l0 200c734: b0 10 00 08 mov %o0, %i0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 200c738: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 200c73c: 80 88 60 02 btst 2, %g1 200c740: 02 80 00 2c be 200c7f0 <_Thread_Resume+0xc8> <== NEVER TAKEN 200c744: 82 08 7f fd and %g1, -3, %g1 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 200c748: 80 a0 60 00 cmp %g1, 0 200c74c: 12 80 00 29 bne 200c7f0 <_Thread_Resume+0xc8> 200c750: c2 24 20 10 st %g1, [ %l0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 200c754: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 200c758: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 200c75c: c8 10 80 00 lduh [ %g2 ], %g4 200c760: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 200c764: 86 11 00 03 or %g4, %g3, %g3 200c768: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c76c: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 200c770: da 14 20 94 lduh [ %l0 + 0x94 ], %o5 200c774: c4 24 00 00 st %g2, [ %l0 ] 200c778: 07 00 80 86 sethi %hi(0x2021800), %g3 old_last_node = the_chain->last; 200c77c: c4 00 60 08 ld [ %g1 + 8 ], %g2 200c780: c8 10 e3 34 lduh [ %g3 + 0x334 ], %g4 the_chain->last = the_node; 200c784: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c788: c4 24 20 04 st %g2, [ %l0 + 4 ] 200c78c: 82 13 40 04 or %o5, %g4, %g1 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; 200c790: e0 20 80 00 st %l0, [ %g2 ] 200c794: c2 30 e3 34 sth %g1, [ %g3 + 0x334 ] _ISR_Flash( level ); 200c798: 7f ff d7 08 call 20023b8 200c79c: 01 00 00 00 nop 200c7a0: 7f ff d7 02 call 20023a8 200c7a4: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 200c7a8: 05 00 80 86 sethi %hi(0x2021800), %g2 200c7ac: c6 00 a3 10 ld [ %g2 + 0x310 ], %g3 ! 2021b10 <_Thread_Heir> 200c7b0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 200c7b4: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 200c7b8: 80 a0 40 03 cmp %g1, %g3 200c7bc: 1a 80 00 0d bcc 200c7f0 <_Thread_Resume+0xc8> 200c7c0: 07 00 80 86 sethi %hi(0x2021800), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200c7c4: c6 00 e3 40 ld [ %g3 + 0x340 ], %g3 ! 2021b40 <_Thread_Executing> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 200c7c8: e0 20 a3 10 st %l0, [ %g2 + 0x310 ] if ( _Thread_Executing->is_preemptible || 200c7cc: c4 08 e0 75 ldub [ %g3 + 0x75 ], %g2 200c7d0: 80 a0 a0 00 cmp %g2, 0 200c7d4: 12 80 00 05 bne 200c7e8 <_Thread_Resume+0xc0> 200c7d8: 84 10 20 01 mov 1, %g2 200c7dc: 80 a0 60 00 cmp %g1, 0 200c7e0: 12 80 00 04 bne 200c7f0 <_Thread_Resume+0xc8> <== ALWAYS TAKEN 200c7e4: 01 00 00 00 nop the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 200c7e8: 03 00 80 86 sethi %hi(0x2021800), %g1 200c7ec: c4 28 63 50 stb %g2, [ %g1 + 0x350 ] ! 2021b50 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 200c7f0: 7f ff d6 f2 call 20023b8 200c7f4: 81 e8 00 00 restore =============================================================================== 0200893c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 200893c: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *executing; executing = _Thread_Executing; 2008940: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008944: e0 00 61 e0 ld [ %g1 + 0x1e0 ], %l0 ! 201bde0 <_Thread_Executing> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 2008948: c2 0c 20 75 ldub [ %l0 + 0x75 ], %g1 200894c: 80 a0 60 00 cmp %g1, 0 2008950: 02 80 00 23 be 20089dc <_Thread_Tickle_timeslice+0xa0> 2008954: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 2008958: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 200895c: 80 a0 60 00 cmp %g1, 0 2008960: 12 80 00 1f bne 20089dc <_Thread_Tickle_timeslice+0xa0> 2008964: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2008968: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 200896c: 80 a0 60 01 cmp %g1, 1 2008970: 0a 80 00 12 bcs 20089b8 <_Thread_Tickle_timeslice+0x7c> 2008974: 80 a0 60 02 cmp %g1, 2 2008978: 28 80 00 07 bleu,a 2008994 <_Thread_Tickle_timeslice+0x58> 200897c: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 2008980: 80 a0 60 03 cmp %g1, 3 2008984: 12 80 00 16 bne 20089dc <_Thread_Tickle_timeslice+0xa0> <== NEVER TAKEN 2008988: 01 00 00 00 nop } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 200898c: 10 80 00 0d b 20089c0 <_Thread_Tickle_timeslice+0x84> 2008990: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 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 ) { 2008994: 82 00 7f ff add %g1, -1, %g1 2008998: 80 a0 60 00 cmp %g1, 0 200899c: 14 80 00 07 bg 20089b8 <_Thread_Tickle_timeslice+0x7c> 20089a0: c2 24 20 78 st %g1, [ %l0 + 0x78 ] _Thread_Reset_timeslice(); 20089a4: 40 00 0f b3 call 200c870 <_Thread_Reset_timeslice> 20089a8: 01 00 00 00 nop executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 20089ac: 03 00 80 6f sethi %hi(0x201bc00), %g1 20089b0: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201bc78 <_Thread_Ticks_per_timeslice> 20089b4: c2 24 20 78 st %g1, [ %l0 + 0x78 ] 20089b8: 81 c7 e0 08 ret 20089bc: 81 e8 00 00 restore } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 20089c0: 82 00 7f ff add %g1, -1, %g1 20089c4: 80 a0 60 00 cmp %g1, 0 20089c8: 12 bf ff fc bne 20089b8 <_Thread_Tickle_timeslice+0x7c> 20089cc: c2 24 20 78 st %g1, [ %l0 + 0x78 ] (*executing->budget_callout)( executing ); 20089d0: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 20089d4: 9f c0 40 00 call %g1 20089d8: 90 10 00 10 mov %l0, %o0 20089dc: 81 c7 e0 08 ret 20089e0: 81 e8 00 00 restore =============================================================================== 020089e4 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 20089e4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 20089e8: 03 00 80 6f sethi %hi(0x201bc00), %g1 20089ec: e0 00 61 e0 ld [ %g1 + 0x1e0 ], %l0 ! 201bde0 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 20089f0: 7f ff e5 f0 call 20021b0 20089f4: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 20089f8: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 20089fc: c4 04 40 00 ld [ %l1 ], %g2 2008a00: c2 04 60 08 ld [ %l1 + 8 ], %g1 2008a04: 80 a0 80 01 cmp %g2, %g1 2008a08: 02 80 00 17 be 2008a64 <_Thread_Yield_processor+0x80> 2008a0c: 25 00 80 6f sethi %hi(0x201bc00), %l2 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2008a10: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2008a14: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2008a18: 86 04 60 04 add %l1, 4, %g3 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 2008a1c: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2008a20: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2008a24: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 2008a28: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 2008a2c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2008a30: c2 24 20 04 st %g1, [ %l0 + 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; 2008a34: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 2008a38: 7f ff e5 e2 call 20021c0 2008a3c: 01 00 00 00 nop 2008a40: 7f ff e5 dc call 20021b0 2008a44: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 2008a48: c2 04 a1 b0 ld [ %l2 + 0x1b0 ], %g1 2008a4c: 80 a4 00 01 cmp %l0, %g1 2008a50: 12 80 00 09 bne 2008a74 <_Thread_Yield_processor+0x90> <== NEVER TAKEN 2008a54: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; 2008a58: c2 04 40 00 ld [ %l1 ], %g1 2008a5c: 10 80 00 06 b 2008a74 <_Thread_Yield_processor+0x90> 2008a60: c2 24 a1 b0 st %g1, [ %l2 + 0x1b0 ] _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 2008a64: c2 04 a1 b0 ld [ %l2 + 0x1b0 ], %g1 2008a68: 80 a4 00 01 cmp %l0, %g1 2008a6c: 02 80 00 04 be 2008a7c <_Thread_Yield_processor+0x98> <== ALWAYS TAKEN 2008a70: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 2008a74: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008a78: c4 28 61 f0 stb %g2, [ %g1 + 0x1f0 ] ! 201bdf0 <_Context_Switch_necessary> _ISR_Enable( level ); 2008a7c: 7f ff e5 d1 call 20021c0 2008a80: 81 e8 00 00 restore =============================================================================== 02008268 <_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 ) { 2008268: 9d e3 bf a0 save %sp, -96, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 200826c: e0 06 60 14 ld [ %i1 + 0x14 ], %l0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2008270: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 2008274: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2008278: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200827c: 82 06 60 38 add %i1, 0x38, %g1 2008280: c2 26 60 40 st %g1, [ %i1 + 0x40 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2008284: 2d 00 80 6c sethi %hi(0x201b000), %l6 _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 ]; 2008288: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 200828c: 80 8c 20 20 btst 0x20, %l0 _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 ]; 2008290: a7 28 60 04 sll %g1, 4, %l3 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 2008294: ac 15 a2 04 or %l6, 0x204, %l6 _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 ]; 2008298: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 200829c: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 _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 ]; 20082a0: a6 24 c0 01 sub %l3, %g1, %l3 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 20082a4: 12 80 00 28 bne 2008344 <_Thread_queue_Enqueue_priority+0xdc> 20082a8: a6 06 00 13 add %i0, %l3, %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 20082ac: ac 04 e0 04 add %l3, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 20082b0: 7f ff e7 c0 call 20021b0 20082b4: 01 00 00 00 nop 20082b8: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 20082bc: a8 10 3f ff mov -1, %l4 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 20082c0: 10 80 00 10 b 2008300 <_Thread_queue_Enqueue_priority+0x98> 20082c4: e2 04 c0 00 ld [ %l3 ], %l1 search_priority = search_thread->current_priority; if ( priority <= search_priority ) 20082c8: 80 a4 00 14 cmp %l0, %l4 20082cc: 28 80 00 11 bleu,a 2008310 <_Thread_queue_Enqueue_priority+0xa8> 20082d0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 20082d4: 7f ff e7 bb call 20021c0 20082d8: 90 10 00 12 mov %l2, %o0 20082dc: 7f ff e7 b5 call 20021b0 20082e0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20082e4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20082e8: 80 8d 40 01 btst %l5, %g1 20082ec: 32 80 00 05 bne,a 2008300 <_Thread_queue_Enqueue_priority+0x98><== ALWAYS TAKEN 20082f0: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 20082f4: 7f ff e7 b3 call 20021c0 <== NOT EXECUTED 20082f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 20082fc: 30 bf ff ed b,a 20082b0 <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED 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 ) ) { 2008300: 80 a4 40 16 cmp %l1, %l6 2008304: 32 bf ff f1 bne,a 20082c8 <_Thread_queue_Enqueue_priority+0x60> 2008308: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 200830c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2008310: 80 a0 60 01 cmp %g1, 1 2008314: 12 80 00 3c bne 2008404 <_Thread_queue_Enqueue_priority+0x19c> 2008318: 90 10 00 12 mov %l2, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 200831c: 80 a4 00 14 cmp %l0, %l4 2008320: 02 80 00 2e be 20083d8 <_Thread_queue_Enqueue_priority+0x170> 2008324: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2008328: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 200832c: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 2008330: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 2008334: f0 26 60 44 st %i0, [ %i1 + 0x44 ] 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; 2008338: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 200833c: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 2008340: 30 80 00 2d b,a 20083f4 <_Thread_queue_Enqueue_priority+0x18c> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 2008344: 7f ff e7 9b call 20021b0 2008348: e8 0d 80 00 ldub [ %l6 ], %l4 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 200834c: a8 05 20 01 inc %l4 _ISR_Disable( level ); 2008350: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 2008354: 10 80 00 10 b 2008394 <_Thread_queue_Enqueue_priority+0x12c> 2008358: e2 04 e0 08 ld [ %l3 + 8 ], %l1 search_priority = search_thread->current_priority; if ( priority >= search_priority ) 200835c: 80 a4 00 14 cmp %l0, %l4 2008360: 3a 80 00 11 bcc,a 20083a4 <_Thread_queue_Enqueue_priority+0x13c> 2008364: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 2008368: 7f ff e7 96 call 20021c0 200836c: 90 10 00 12 mov %l2, %o0 2008370: 7f ff e7 90 call 20021b0 2008374: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008378: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 200837c: 80 8d 40 01 btst %l5, %g1 2008380: 32 80 00 05 bne,a 2008394 <_Thread_queue_Enqueue_priority+0x12c> 2008384: e2 04 60 04 ld [ %l1 + 4 ], %l1 _ISR_Enable( level ); 2008388: 7f ff e7 8e call 20021c0 200838c: 90 10 00 12 mov %l2, %o0 goto restart_reverse_search; 2008390: 30 bf ff ed b,a 2008344 <_Thread_queue_Enqueue_priority+0xdc> 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 ) ) { 2008394: 80 a4 40 13 cmp %l1, %l3 2008398: 32 bf ff f1 bne,a 200835c <_Thread_queue_Enqueue_priority+0xf4> 200839c: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 20083a0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 20083a4: 80 a0 60 01 cmp %g1, 1 20083a8: 12 80 00 17 bne 2008404 <_Thread_queue_Enqueue_priority+0x19c> 20083ac: 90 10 00 12 mov %l2, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 20083b0: 80 a4 00 14 cmp %l0, %l4 20083b4: 02 80 00 09 be 20083d8 <_Thread_queue_Enqueue_priority+0x170> 20083b8: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 20083bc: c2 04 40 00 ld [ %l1 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 20083c0: e2 26 60 04 st %l1, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 20083c4: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 20083c8: f0 26 60 44 st %i0, [ %i1 + 0x44 ] 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; 20083cc: f2 24 40 00 st %i1, [ %l1 ] next_node->previous = the_node; 20083d0: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20083d4: 30 80 00 08 b,a 20083f4 <_Thread_queue_Enqueue_priority+0x18c> 20083d8: a2 04 60 3c add %l1, 0x3c, %l1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 20083dc: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 20083e0: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 20083e4: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 20083e8: f0 26 60 44 st %i0, [ %i1 + 0x44 ] 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; 20083ec: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 20083f0: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20083f4: 7f ff e7 73 call 20021c0 20083f8: b0 10 20 01 mov 1, %i0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 20083fc: 81 c7 e0 08 ret 2008400: 81 e8 00 00 restore * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 2008404: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 * 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; 2008408: d0 26 80 00 st %o0, [ %i2 ] return the_thread_queue->sync_state; } 200840c: 81 c7 e0 08 ret 2008410: 81 e8 00 00 restore =============================================================================== 020084c0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 20084c0: 9d e3 bf 98 save %sp, -104, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 20084c4: 80 a6 20 00 cmp %i0, 0 20084c8: 02 80 00 19 be 200852c <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 20084cc: 01 00 00 00 nop /* * 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 ) { 20084d0: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 20084d4: 80 a4 60 01 cmp %l1, 1 20084d8: 12 80 00 15 bne 200852c <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 20084dc: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 20084e0: 7f ff e7 34 call 20021b0 20084e4: 01 00 00 00 nop 20084e8: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 20084ec: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 20084f0: 03 00 00 ef sethi %hi(0x3bc00), %g1 20084f4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 20084f8: 80 88 80 01 btst %g2, %g1 20084fc: 02 80 00 0a be 2008524 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 2008500: 94 10 20 01 mov 1, %o2 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 2008504: 90 10 00 18 mov %i0, %o0 2008508: 92 10 00 19 mov %i1, %o1 200850c: 40 00 10 37 call 200c5e8 <_Thread_queue_Extract_priority_helper> 2008510: e2 26 20 30 st %l1, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2008514: 90 10 00 18 mov %i0, %o0 2008518: 92 10 00 19 mov %i1, %o1 200851c: 7f ff ff 53 call 2008268 <_Thread_queue_Enqueue_priority> 2008520: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 2008524: 7f ff e7 27 call 20021c0 2008528: 90 10 00 10 mov %l0, %o0 200852c: 81 c7 e0 08 ret 2008530: 81 e8 00 00 restore =============================================================================== 02008534 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008534: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008538: 90 10 00 18 mov %i0, %o0 200853c: 7f ff fd ce call 2007c74 <_Thread_Get> 2008540: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008544: c2 07 bf fc ld [ %fp + -4 ], %g1 2008548: 80 a0 60 00 cmp %g1, 0 200854c: 12 80 00 08 bne 200856c <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 2008550: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2008554: 40 00 10 5d call 200c6c8 <_Thread_queue_Process_timeout> 2008558: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 200855c: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008560: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201bd20 <_Thread_Dispatch_disable_level> 2008564: 84 00 bf ff add %g2, -1, %g2 2008568: c4 20 61 20 st %g2, [ %g1 + 0x120 ] 200856c: 81 c7 e0 08 ret 2008570: 81 e8 00 00 restore =============================================================================== 02015554 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 2015554: 9d e3 bf 88 save %sp, -120, %sp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2015558: 35 00 80 f2 sethi %hi(0x203c800), %i2 201555c: b2 07 bf f4 add %fp, -12, %i1 2015560: ac 07 bf f8 add %fp, -8, %l6 2015564: a2 07 bf e8 add %fp, -24, %l1 2015568: a6 07 bf ec add %fp, -20, %l3 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 201556c: 37 00 80 f2 sethi %hi(0x203c800), %i3 2015570: 2b 00 80 f2 sethi %hi(0x203c800), %l5 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 2015574: c0 27 bf f8 clr [ %fp + -8 ] 2015578: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 201557c: f2 27 bf fc st %i1, [ %fp + -4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2015580: ec 27 bf f4 st %l6, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2015584: e2 27 bf f0 st %l1, [ %fp + -16 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2015588: e6 27 bf e8 st %l3, [ %fp + -24 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 201558c: b4 16 a2 04 or %i2, 0x204, %i2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2015590: b6 16 e1 44 or %i3, 0x144, %i3 2015594: aa 15 60 b0 or %l5, 0xb0, %l5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2015598: a8 06 20 30 add %i0, 0x30, %l4 /* * 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 ); 201559c: a4 06 20 68 add %i0, 0x68, %l2 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 20155a0: b8 06 20 08 add %i0, 8, %i4 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 20155a4: ba 06 20 40 add %i0, 0x40, %i5 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 20155a8: ae 10 20 01 mov 1, %l7 { /* * 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; 20155ac: f2 26 20 78 st %i1, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 20155b0: c2 06 80 00 ld [ %i2 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 20155b4: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20155b8: 94 10 00 11 mov %l1, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 20155bc: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20155c0: 92 20 40 09 sub %g1, %o1, %o1 20155c4: 40 00 11 a5 call 2019c58 <_Watchdog_Adjust_to_chain> 20155c8: 90 10 00 14 mov %l4, %o0 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 20155cc: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 20155d0: e0 06 c0 00 ld [ %i3 ], %l0 /* * 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 ) { 20155d4: 80 a4 00 0a cmp %l0, %o2 20155d8: 08 80 00 06 bleu 20155f0 <_Timer_server_Body+0x9c> 20155dc: 92 24 00 0a sub %l0, %o2, %o1 /* * 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 ); 20155e0: 90 10 00 12 mov %l2, %o0 20155e4: 40 00 11 9d call 2019c58 <_Watchdog_Adjust_to_chain> 20155e8: 94 10 00 11 mov %l1, %o2 20155ec: 30 80 00 06 b,a 2015604 <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 20155f0: 1a 80 00 05 bcc 2015604 <_Timer_server_Body+0xb0> 20155f4: 94 22 80 10 sub %o2, %l0, %o2 /* * 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 ); 20155f8: 90 10 00 12 mov %l2, %o0 20155fc: 40 00 11 70 call 2019bbc <_Watchdog_Adjust> 2015600: 92 10 20 01 mov 1, %o1 } watchdogs->last_snapshot = snapshot; 2015604: e0 26 20 74 st %l0, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2015608: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 201560c: 40 00 02 7e call 2016004 <_Chain_Get> 2015610: 01 00 00 00 nop if ( timer == NULL ) { 2015614: 80 a2 20 00 cmp %o0, 0 2015618: 02 80 00 0f be 2015654 <_Timer_server_Body+0x100> 201561c: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2015620: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2015624: 80 a0 60 01 cmp %g1, 1 2015628: 12 80 00 05 bne 201563c <_Timer_server_Body+0xe8> 201562c: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2015630: 92 02 20 10 add %o0, 0x10, %o1 2015634: 10 80 00 05 b 2015648 <_Timer_server_Body+0xf4> 2015638: 90 10 00 14 mov %l4, %o0 } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 201563c: 12 bf ff f3 bne 2015608 <_Timer_server_Body+0xb4> <== NEVER TAKEN 2015640: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2015644: 90 10 00 12 mov %l2, %o0 2015648: 40 00 11 b9 call 2019d2c <_Watchdog_Insert> 201564c: 01 00 00 00 nop 2015650: 30 bf ff ee b,a 2015608 <_Timer_server_Body+0xb4> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 2015654: 7f ff e5 06 call 200ea6c 2015658: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 201565c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2015660: 80 a0 40 16 cmp %g1, %l6 2015664: 12 80 00 0a bne 201568c <_Timer_server_Body+0x138> <== NEVER TAKEN 2015668: 01 00 00 00 nop ts->insert_chain = NULL; 201566c: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2015670: 7f ff e5 03 call 200ea7c 2015674: 01 00 00 00 nop _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 ) ) { 2015678: c2 07 bf e8 ld [ %fp + -24 ], %g1 201567c: 80 a0 40 13 cmp %g1, %l3 2015680: 12 80 00 06 bne 2015698 <_Timer_server_Body+0x144> 2015684: 01 00 00 00 nop 2015688: 30 80 00 1a b,a 20156f0 <_Timer_server_Body+0x19c> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 201568c: 7f ff e4 fc call 200ea7c <== NOT EXECUTED 2015690: 01 00 00 00 nop <== NOT EXECUTED 2015694: 30 bf ff c7 b,a 20155b0 <_Timer_server_Body+0x5c> <== 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 ); 2015698: 7f ff e4 f5 call 200ea6c 201569c: 01 00 00 00 nop 20156a0: 84 10 00 08 mov %o0, %g2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 20156a4: e0 07 bf e8 ld [ %fp + -24 ], %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 20156a8: 80 a4 00 13 cmp %l0, %l3 20156ac: 02 80 00 0e be 20156e4 <_Timer_server_Body+0x190> 20156b0: 80 a4 20 00 cmp %l0, 0 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 20156b4: c2 04 00 00 ld [ %l0 ], %g1 the_chain->first = new_first; 20156b8: c2 27 bf e8 st %g1, [ %fp + -24 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 20156bc: 02 80 00 0a be 20156e4 <_Timer_server_Body+0x190> <== NEVER TAKEN 20156c0: e2 20 60 04 st %l1, [ %g1 + 4 ] watchdog->state = WATCHDOG_INACTIVE; 20156c4: c0 24 20 08 clr [ %l0 + 8 ] _ISR_Enable( level ); 20156c8: 7f ff e4 ed call 200ea7c 20156cc: 01 00 00 00 nop /* * 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 ); 20156d0: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 20156d4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 20156d8: 9f c0 40 00 call %g1 20156dc: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 } 20156e0: 30 bf ff ee b,a 2015698 <_Timer_server_Body+0x144> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 20156e4: 7f ff e4 e6 call 200ea7c 20156e8: 90 10 00 02 mov %g2, %o0 20156ec: 30 bf ff b0 b,a 20155ac <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 20156f0: c0 2e 20 7c clrb [ %i0 + 0x7c ] 20156f4: c2 05 40 00 ld [ %l5 ], %g1 20156f8: 82 00 60 01 inc %g1 20156fc: c2 25 40 00 st %g1, [ %l5 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2015700: d0 06 00 00 ld [ %i0 ], %o0 2015704: 40 00 0e 8b call 2019130 <_Thread_Set_state> 2015708: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 201570c: 7f ff ff 68 call 20154ac <_Timer_server_Reset_interval_system_watchdog> 2015710: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2015714: 7f ff ff 7b call 2015500 <_Timer_server_Reset_tod_system_watchdog> 2015718: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 201571c: 40 00 0b af call 20185d8 <_Thread_Enable_dispatch> 2015720: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2015724: 90 10 00 1c mov %i4, %o0 _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 2015728: ee 2e 20 7c stb %l7, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 201572c: 40 00 11 dd call 2019ea0 <_Watchdog_Remove> 2015730: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2015734: 40 00 11 db call 2019ea0 <_Watchdog_Remove> 2015738: 90 10 00 1d mov %i5, %o0 201573c: 30 bf ff 9c b,a 20155ac <_Timer_server_Body+0x58> =============================================================================== 0200b004 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b004: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b008: 7f ff e0 54 call 2003158 200b00c: a0 10 00 18 mov %i0, %l0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200b010: c2 06 00 00 ld [ %i0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200b014: a2 06 20 04 add %i0, 4, %l1 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 200b018: 80 a0 40 11 cmp %g1, %l1 200b01c: 02 80 00 1e be 200b094 <_Watchdog_Adjust+0x90> 200b020: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b024: 02 80 00 19 be 200b088 <_Watchdog_Adjust+0x84> 200b028: a4 10 20 01 mov 1, %l2 200b02c: 80 a6 60 01 cmp %i1, 1 200b030: 12 80 00 19 bne 200b094 <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200b034: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b038: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b03c: 10 80 00 07 b 200b058 <_Watchdog_Adjust+0x54> 200b040: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200b044: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 200b048: 80 a6 80 19 cmp %i2, %i1 200b04c: 3a 80 00 05 bcc,a 200b060 <_Watchdog_Adjust+0x5c> 200b050: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200b054: b4 26 40 1a sub %i1, %i2, %i2 break; 200b058: 10 80 00 0f b 200b094 <_Watchdog_Adjust+0x90> 200b05c: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200b060: 7f ff e0 42 call 2003168 200b064: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b068: 40 00 00 95 call 200b2bc <_Watchdog_Tickle> 200b06c: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 200b070: 7f ff e0 3a call 2003158 200b074: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200b078: c2 04 00 00 ld [ %l0 ], %g1 200b07c: 80 a0 40 11 cmp %g1, %l1 200b080: 02 80 00 05 be 200b094 <_Watchdog_Adjust+0x90> 200b084: b4 26 80 19 sub %i2, %i1, %i2 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b088: 80 a6 a0 00 cmp %i2, 0 200b08c: 32 bf ff ee bne,a 200b044 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200b090: c2 04 00 00 ld [ %l0 ], %g1 } break; } } _ISR_Enable( level ); 200b094: 7f ff e0 35 call 2003168 200b098: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02008f78 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2008f78: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2008f7c: 7f ff e4 8d call 20021b0 2008f80: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 2008f84: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2008f88: 80 a6 20 01 cmp %i0, 1 2008f8c: 22 80 00 1e be,a 2009004 <_Watchdog_Remove+0x8c> 2008f90: c0 24 20 08 clr [ %l0 + 8 ] 2008f94: 0a 80 00 1d bcs 2009008 <_Watchdog_Remove+0x90> 2008f98: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008f9c: 80 a6 20 03 cmp %i0, 3 2008fa0: 18 80 00 1a bgu 2009008 <_Watchdog_Remove+0x90> <== NEVER TAKEN 2008fa4: 01 00 00 00 nop 2008fa8: c2 04 00 00 ld [ %l0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2008fac: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2008fb0: c4 00 40 00 ld [ %g1 ], %g2 2008fb4: 80 a0 a0 00 cmp %g2, 0 2008fb8: 22 80 00 07 be,a 2008fd4 <_Watchdog_Remove+0x5c> 2008fbc: 03 00 80 6f sethi %hi(0x201bc00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 2008fc0: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 ! 201bc10 <_Semaphore_Information+0x20> 2008fc4: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 2008fc8: 84 00 c0 02 add %g3, %g2, %g2 2008fcc: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 2008fd0: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008fd4: c2 00 62 70 ld [ %g1 + 0x270 ], %g1 ! 201be70 <_Watchdog_Sync_count> 2008fd8: 80 a0 60 00 cmp %g1, 0 2008fdc: 22 80 00 07 be,a 2008ff8 <_Watchdog_Remove+0x80> 2008fe0: c2 04 00 00 ld [ %l0 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 2008fe4: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008fe8: c4 00 61 bc ld [ %g1 + 0x1bc ], %g2 ! 201bdbc <_ISR_Nest_level> 2008fec: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008ff0: c4 20 61 dc st %g2, [ %g1 + 0x1dc ] ! 201bddc <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2008ff4: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 2008ff8: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 2008ffc: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2009000: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009004: 03 00 80 6f sethi %hi(0x201bc00), %g1 2009008: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 201be74 <_Watchdog_Ticks_since_boot> 200900c: c2 24 20 18 st %g1, [ %l0 + 0x18 ] _ISR_Enable( level ); 2009010: 7f ff e4 6c call 20021c0 2009014: 01 00 00 00 nop return( previous_state ); } 2009018: 81 c7 e0 08 ret 200901c: 81 e8 00 00 restore =============================================================================== 0200a7b0 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200a7b0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200a7b4: 7f ff e1 37 call 2002c90 200a7b8: a0 10 00 18 mov %i0, %l0 200a7bc: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200a7c0: 11 00 80 7e sethi %hi(0x201f800), %o0 200a7c4: 94 10 00 19 mov %i1, %o2 200a7c8: 90 12 21 18 or %o0, 0x118, %o0 200a7cc: 7f ff e5 f2 call 2003f94 200a7d0: 92 10 00 10 mov %l0, %o1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200a7d4: e2 06 40 00 ld [ %i1 ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200a7d8: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200a7dc: 80 a4 40 19 cmp %l1, %i1 200a7e0: 02 80 00 0e be 200a818 <_Watchdog_Report_chain+0x68> 200a7e4: 11 00 80 7e sethi %hi(0x201f800), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200a7e8: 92 10 00 11 mov %l1, %o1 200a7ec: 40 00 00 10 call 200a82c <_Watchdog_Report> 200a7f0: 90 10 20 00 clr %o0 _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 ) 200a7f4: e2 04 40 00 ld [ %l1 ], %l1 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 200a7f8: 80 a4 40 19 cmp %l1, %i1 200a7fc: 12 bf ff fc bne 200a7ec <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 200a800: 92 10 00 11 mov %l1, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200a804: 92 10 00 10 mov %l0, %o1 200a808: 11 00 80 7e sethi %hi(0x201f800), %o0 200a80c: 7f ff e5 e2 call 2003f94 200a810: 90 12 21 30 or %o0, 0x130, %o0 ! 201f930 200a814: 30 80 00 03 b,a 200a820 <_Watchdog_Report_chain+0x70> } else { printk( "Chain is empty\n" ); 200a818: 7f ff e5 df call 2003f94 200a81c: 90 12 21 40 or %o0, 0x140, %o0 } _ISR_Enable( level ); 200a820: 7f ff e1 20 call 2002ca0 200a824: 81 e8 00 00 restore =============================================================================== 02019418 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 2019418: 9d e3 bf a0 save %sp, -96, %sp 201941c: 40 00 07 44 call 201b12c <_fini> 2019420: 01 00 00 00 nop * 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(); 2019424: 7f ff ff e1 call 20193a8 2019428: 01 00 00 00 nop rtems_shutdown_executive(status); 201942c: 40 00 00 4c call 201955c 2019430: 90 10 00 18 mov %i0, %o0 2019434: 30 80 00 00 b,a 2019434 <_exit+0x1c> <== NOT EXECUTED =============================================================================== 02003860 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 2003860: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2003864: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2003868: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 200386c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003870: 7f ff ff 7f call 200366c <== NOT EXECUTED 2003874: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0200d800 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 200d800: 81 c3 e0 08 retl <== NOT EXECUTED 200d804: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED =============================================================================== 0200ab40 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 200ab40: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200ab44: 7f ff ff e6 call 200aadc <== NOT EXECUTED 200ab48: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 020042f0 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 20042f0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 20042f4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 20042f8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20042fc: 7f ff ff 61 call 2004080 <== NOT EXECUTED 2004300: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02019528 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 2019528: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 201952c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2019530: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2019534: 40 00 00 17 call 2019590 <== NOT EXECUTED 2019538: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02006c98 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 2006c98: 9d e3 bf 60 save %sp, -160, %sp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 2006c9c: 7f ff fa 9f call 2005718 2006ca0: 90 10 00 19 mov %i1, %o0 if ( old_parent_pathlen == 0 ) 2006ca4: a0 92 20 00 orcc %o0, 0, %l0 2006ca8: 32 80 00 18 bne,a 2006d08 <_rename_r+0x70> 2006cac: 90 10 00 19 mov %i1, %o0 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 2006cb0: c2 4e 40 00 ldsb [ %i1 ], %g1 2006cb4: 80 a0 60 5c cmp %g1, 0x5c 2006cb8: 22 80 00 08 be,a 2006cd8 <_rename_r+0x40> <== NEVER TAKEN 2006cbc: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED 2006cc0: 80 a0 60 2f cmp %g1, 0x2f 2006cc4: 22 80 00 05 be,a 2006cd8 <_rename_r+0x40> <== NEVER TAKEN 2006cc8: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED 2006ccc: 80 a0 60 00 cmp %g1, 0 2006cd0: 12 80 00 06 bne 2006ce8 <_rename_r+0x50> <== ALWAYS TAKEN 2006cd4: 03 00 80 9a sethi %hi(0x2026800), %g1 2006cd8: d2 00 63 90 ld [ %g1 + 0x390 ], %o1 ! 2026b90 <== NOT EXECUTED 2006cdc: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 2006ce0: 10 80 00 05 b 2006cf4 <_rename_r+0x5c> <== NOT EXECUTED 2006ce4: 92 02 60 18 add %o1, 0x18, %o1 <== NOT EXECUTED 2006ce8: d2 00 63 90 ld [ %g1 + 0x390 ], %o1 2006cec: 90 07 bf d4 add %fp, -44, %o0 2006cf0: 92 02 60 04 add %o1, 4, %o1 2006cf4: 94 10 20 14 mov 0x14, %o2 2006cf8: 40 00 3b cf call 2015c34 2006cfc: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 2006d00: 10 80 00 0b b 2006d2c <_rename_r+0x94> 2006d04: 94 10 20 14 mov 0x14, %o2 old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 2006d08: 92 10 00 10 mov %l0, %o1 2006d0c: 94 10 20 02 mov 2, %o2 2006d10: 96 07 bf d4 add %fp, -44, %o3 2006d14: 7f ff fa cf call 2005850 2006d18: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 2006d1c: 80 a2 20 00 cmp %o0, 0 2006d20: 12 80 00 e3 bne 20070ac <_rename_r+0x414> <== NEVER TAKEN 2006d24: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 2006d28: 94 10 20 14 mov 0x14, %o2 2006d2c: a6 07 bf e8 add %fp, -24, %l3 2006d30: a4 07 bf d4 add %fp, -44, %l2 2006d34: 90 10 00 13 mov %l3, %o0 2006d38: 40 00 3b bf call 2015c34 2006d3c: 92 10 00 12 mov %l2, %o1 name = old + old_parent_pathlen; 2006d40: b2 06 40 10 add %i1, %l0, %i1 2006d44: f2 27 bf fc st %i1, [ %fp + -4 ] name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 2006d48: 40 00 42 04 call 2017558 2006d4c: 90 10 00 19 mov %i1, %o0 2006d50: 92 10 00 08 mov %o0, %o1 2006d54: 7f ff fa 60 call 20056d4 2006d58: 90 10 00 19 mov %i1, %o0 2006d5c: b2 06 40 08 add %i1, %o0, %i1 2006d60: f2 27 bf fc st %i1, [ %fp + -4 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 2006d64: 40 00 41 fd call 2017558 2006d68: 90 10 00 19 mov %i1, %o0 2006d6c: 96 10 00 13 mov %l3, %o3 2006d70: 92 10 00 08 mov %o0, %o1 2006d74: 94 10 20 00 clr %o2 2006d78: 90 10 00 19 mov %i1, %o0 2006d7c: 7f ff fa 79 call 2005760 2006d80: 98 10 20 00 clr %o4 0, &old_loc, false ); if ( result != 0 ) { 2006d84: 80 a2 20 00 cmp %o0, 0 2006d88: 22 80 00 0e be,a 2006dc0 <_rename_r+0x128> 2006d8c: c2 4e 80 00 ldsb [ %i2 ], %g1 if ( free_old_parentloc ) 2006d90: 80 8c 60 ff btst 0xff, %l1 2006d94: 02 80 00 4e be 2006ecc <_rename_r+0x234> <== NEVER TAKEN 2006d98: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &old_parent_loc ); 2006d9c: c2 07 bf e0 ld [ %fp + -32 ], %g1 2006da0: 80 a0 60 00 cmp %g1, 0 2006da4: 02 80 00 c3 be 20070b0 <_rename_r+0x418> <== NEVER TAKEN 2006da8: 01 00 00 00 nop 2006dac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006db0: 80 a0 60 00 cmp %g1, 0 2006db4: 02 80 00 46 be 2006ecc <_rename_r+0x234> <== NEVER TAKEN 2006db8: 90 10 00 12 mov %l2, %o0 2006dbc: 30 80 00 42 b,a 2006ec4 <_rename_r+0x22c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 2006dc0: 80 a0 60 5c cmp %g1, 0x5c 2006dc4: 22 80 00 08 be,a 2006de4 <_rename_r+0x14c> <== NEVER TAKEN 2006dc8: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED 2006dcc: 80 a0 60 2f cmp %g1, 0x2f 2006dd0: 22 80 00 05 be,a 2006de4 <_rename_r+0x14c> 2006dd4: 03 00 80 9a sethi %hi(0x2026800), %g1 2006dd8: 80 a0 60 00 cmp %g1, 0 2006ddc: 12 80 00 09 bne 2006e00 <_rename_r+0x168> <== ALWAYS TAKEN 2006de0: 03 00 80 9a sethi %hi(0x2026800), %g1 2006de4: d2 00 63 90 ld [ %g1 + 0x390 ], %o1 ! 2026b90 2006de8: 90 07 bf c0 add %fp, -64, %o0 2006dec: 92 02 60 18 add %o1, 0x18, %o1 2006df0: 40 00 3b 91 call 2015c34 2006df4: 94 10 20 14 mov 0x14, %o2 2006df8: 10 80 00 08 b 2006e18 <_rename_r+0x180> 2006dfc: 90 10 20 01 mov 1, %o0 2006e00: d2 00 63 90 ld [ %g1 + 0x390 ], %o1 2006e04: 90 07 bf c0 add %fp, -64, %o0 2006e08: 92 02 60 04 add %o1, 4, %o1 2006e0c: 40 00 3b 8a call 2015c34 2006e10: 94 10 20 14 mov 0x14, %o2 2006e14: 90 10 20 00 clr %o0 if ( !new_parent_loc.ops->evalformake_h ) { 2006e18: c2 07 bf cc ld [ %fp + -52 ], %g1 2006e1c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2006e20: 80 a0 60 00 cmp %g1, 0 2006e24: 02 80 00 5e be 2006f9c <_rename_r+0x304> 2006e28: 94 07 bf fc add %fp, -4, %o2 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 ); 2006e2c: 90 06 80 08 add %i2, %o0, %o0 2006e30: a0 07 bf c0 add %fp, -64, %l0 2006e34: 9f c0 40 00 call %g1 2006e38: 92 10 00 10 mov %l0, %o1 if ( result != 0 ) { 2006e3c: 80 a2 20 00 cmp %o0, 0 2006e40: 02 80 00 25 be 2006ed4 <_rename_r+0x23c> 2006e44: c2 07 bf d0 ld [ %fp + -48 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 2006e48: c2 07 bf cc ld [ %fp + -52 ], %g1 2006e4c: 80 a0 60 00 cmp %g1, 0 2006e50: 02 80 00 09 be 2006e74 <_rename_r+0x1dc> <== NEVER TAKEN 2006e54: 80 8c 60 ff btst 0xff, %l1 2006e58: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006e5c: 80 a0 60 00 cmp %g1, 0 2006e60: 02 80 00 05 be 2006e74 <_rename_r+0x1dc> <== NEVER TAKEN 2006e64: 80 8c 60 ff btst 0xff, %l1 2006e68: 9f c0 40 00 call %g1 2006e6c: 90 10 00 10 mov %l0, %o0 if ( free_old_parentloc ) 2006e70: 80 8c 60 ff btst 0xff, %l1 2006e74: 02 80 00 0d be 2006ea8 <_rename_r+0x210> <== NEVER TAKEN 2006e78: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 2006e7c: c2 07 bf e0 ld [ %fp + -32 ], %g1 2006e80: 80 a0 60 00 cmp %g1, 0 2006e84: 22 80 00 09 be,a 2006ea8 <_rename_r+0x210> <== NEVER TAKEN 2006e88: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2006e8c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006e90: 80 a0 60 00 cmp %g1, 0 2006e94: 22 80 00 05 be,a 2006ea8 <_rename_r+0x210> <== NEVER TAKEN 2006e98: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2006e9c: 9f c0 40 00 call %g1 2006ea0: 90 07 bf d4 add %fp, -44, %o0 rtems_filesystem_freenode( &old_loc ); 2006ea4: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006ea8: 80 a0 60 00 cmp %g1, 0 2006eac: 02 80 00 08 be 2006ecc <_rename_r+0x234> <== NEVER TAKEN 2006eb0: b0 10 3f ff mov -1, %i0 2006eb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006eb8: 80 a0 60 00 cmp %g1, 0 2006ebc: 02 80 00 04 be 2006ecc <_rename_r+0x234> <== NEVER TAKEN 2006ec0: 90 07 bf e8 add %fp, -24, %o0 2006ec4: 9f c0 40 00 call %g1 2006ec8: b0 10 3f ff mov -1, %i0 2006ecc: 81 c7 e0 08 ret 2006ed0: 81 e8 00 00 restore /* * 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 ) { 2006ed4: c6 07 bf e4 ld [ %fp + -28 ], %g3 2006ed8: 80 a0 c0 01 cmp %g3, %g1 2006edc: 02 80 00 26 be 2006f74 <_rename_r+0x2dc> 2006ee0: c4 07 bf cc ld [ %fp + -52 ], %g2 rtems_filesystem_freenode( &new_parent_loc ); 2006ee4: 80 a0 a0 00 cmp %g2, 0 2006ee8: 02 80 00 09 be 2006f0c <_rename_r+0x274> <== NEVER TAKEN 2006eec: 80 8c 60 ff btst 0xff, %l1 2006ef0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 2006ef4: 80 a0 60 00 cmp %g1, 0 2006ef8: 02 80 00 05 be 2006f0c <_rename_r+0x274> <== NEVER TAKEN 2006efc: 80 8c 60 ff btst 0xff, %l1 2006f00: 9f c0 40 00 call %g1 2006f04: 90 10 00 10 mov %l0, %o0 if ( free_old_parentloc ) 2006f08: 80 8c 60 ff btst 0xff, %l1 2006f0c: 02 80 00 0d be 2006f40 <_rename_r+0x2a8> 2006f10: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 2006f14: c2 07 bf e0 ld [ %fp + -32 ], %g1 2006f18: 80 a0 60 00 cmp %g1, 0 2006f1c: 22 80 00 09 be,a 2006f40 <_rename_r+0x2a8> <== NEVER TAKEN 2006f20: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2006f24: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006f28: 80 a0 60 00 cmp %g1, 0 2006f2c: 22 80 00 05 be,a 2006f40 <_rename_r+0x2a8> <== NEVER TAKEN 2006f30: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2006f34: 9f c0 40 00 call %g1 2006f38: 90 07 bf d4 add %fp, -44, %o0 rtems_filesystem_freenode( &old_loc ); 2006f3c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006f40: 80 a0 60 00 cmp %g1, 0 2006f44: 02 80 00 08 be 2006f64 <_rename_r+0x2cc> <== NEVER TAKEN 2006f48: 01 00 00 00 nop 2006f4c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006f50: 80 a0 60 00 cmp %g1, 0 2006f54: 02 80 00 04 be 2006f64 <_rename_r+0x2cc> <== NEVER TAKEN 2006f58: 01 00 00 00 nop 2006f5c: 9f c0 40 00 call %g1 2006f60: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 2006f64: 40 00 34 aa call 201420c <__errno> 2006f68: b0 10 3f ff mov -1, %i0 2006f6c: 10 80 00 26 b 2007004 <_rename_r+0x36c> 2006f70: 82 10 20 12 mov 0x12, %g1 } if ( !new_parent_loc.ops->rename_h ) { 2006f74: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 2006f78: 80 a0 60 00 cmp %g1, 0 2006f7c: 12 80 00 25 bne 2007010 <_rename_r+0x378> 2006f80: d6 07 bf fc ld [ %fp + -4 ], %o3 rtems_filesystem_freenode( &new_parent_loc ); 2006f84: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 2006f88: 80 a0 60 00 cmp %g1, 0 2006f8c: 02 80 00 05 be 2006fa0 <_rename_r+0x308> <== NEVER TAKEN 2006f90: 80 8c 60 ff btst 0xff, %l1 2006f94: 9f c0 40 00 call %g1 2006f98: 90 10 00 10 mov %l0, %o0 if ( free_old_parentloc ) 2006f9c: 80 8c 60 ff btst 0xff, %l1 2006fa0: 02 80 00 0d be 2006fd4 <_rename_r+0x33c> <== NEVER TAKEN 2006fa4: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 2006fa8: c2 07 bf e0 ld [ %fp + -32 ], %g1 2006fac: 80 a0 60 00 cmp %g1, 0 2006fb0: 22 80 00 09 be,a 2006fd4 <_rename_r+0x33c> <== NEVER TAKEN 2006fb4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2006fb8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006fbc: 80 a0 60 00 cmp %g1, 0 2006fc0: 22 80 00 05 be,a 2006fd4 <_rename_r+0x33c> <== NEVER TAKEN 2006fc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2006fc8: 9f c0 40 00 call %g1 2006fcc: 90 07 bf d4 add %fp, -44, %o0 rtems_filesystem_freenode( &old_loc ); 2006fd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006fd4: 80 a0 60 00 cmp %g1, 0 2006fd8: 02 80 00 08 be 2006ff8 <_rename_r+0x360> <== NEVER TAKEN 2006fdc: 01 00 00 00 nop 2006fe0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006fe4: 80 a0 60 00 cmp %g1, 0 2006fe8: 02 80 00 04 be 2006ff8 <_rename_r+0x360> <== NEVER TAKEN 2006fec: 01 00 00 00 nop 2006ff0: 9f c0 40 00 call %g1 2006ff4: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 2006ff8: 40 00 34 85 call 201420c <__errno> 2006ffc: b0 10 3f ff mov -1, %i0 2007000: 82 10 20 86 mov 0x86, %g1 2007004: c2 22 00 00 st %g1, [ %o0 ] 2007008: 81 c7 e0 08 ret 200700c: 81 e8 00 00 restore } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 2007010: 90 07 bf d4 add %fp, -44, %o0 2007014: 92 07 bf e8 add %fp, -24, %o1 2007018: 9f c0 40 00 call %g1 200701c: 94 10 00 10 mov %l0, %o2 rtems_filesystem_freenode( &new_parent_loc ); 2007020: c2 07 bf cc ld [ %fp + -52 ], %g1 2007024: 80 a0 60 00 cmp %g1, 0 2007028: 02 80 00 08 be 2007048 <_rename_r+0x3b0> <== NEVER TAKEN 200702c: b0 10 00 08 mov %o0, %i0 2007030: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2007034: 80 a0 60 00 cmp %g1, 0 2007038: 02 80 00 05 be 200704c <_rename_r+0x3b4> <== NEVER TAKEN 200703c: 80 8c 60 ff btst 0xff, %l1 2007040: 9f c0 40 00 call %g1 2007044: 90 10 00 10 mov %l0, %o0 if ( free_old_parentloc ) 2007048: 80 8c 60 ff btst 0xff, %l1 200704c: 02 80 00 0d be 2007080 <_rename_r+0x3e8> 2007050: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 2007054: c2 07 bf e0 ld [ %fp + -32 ], %g1 2007058: 80 a0 60 00 cmp %g1, 0 200705c: 22 80 00 09 be,a 2007080 <_rename_r+0x3e8> <== NEVER TAKEN 2007060: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2007064: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2007068: 80 a0 60 00 cmp %g1, 0 200706c: 22 80 00 05 be,a 2007080 <_rename_r+0x3e8> <== NEVER TAKEN 2007070: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2007074: 9f c0 40 00 call %g1 2007078: 90 07 bf d4 add %fp, -44, %o0 rtems_filesystem_freenode( &old_loc ); 200707c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007080: 80 a0 60 00 cmp %g1, 0 2007084: 02 80 00 0b be 20070b0 <_rename_r+0x418> <== NEVER TAKEN 2007088: 01 00 00 00 nop 200708c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2007090: 80 a0 60 00 cmp %g1, 0 2007094: 02 80 00 07 be 20070b0 <_rename_r+0x418> <== NEVER TAKEN 2007098: 01 00 00 00 nop 200709c: 9f c0 40 00 call %g1 20070a0: 90 07 bf e8 add %fp, -24, %o0 20070a4: 81 c7 e0 08 ret 20070a8: 81 e8 00 00 restore 20070ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 20070b0: 81 c7 e0 08 ret <== NOT EXECUTED 20070b4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200a820 <_rtems_octal2ulong>: unsigned long _rtems_octal2ulong( const char *octascii, size_t len ) { 200a820: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED 200a824: 84 10 20 00 clr %g2 <== NOT EXECUTED 200a828: 82 10 00 18 mov %i0, %g1 <== NOT EXECUTED size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 200a82c: 10 80 00 0c b 200a85c <_rtems_octal2ulong+0x3c> <== NOT EXECUTED 200a830: b0 10 20 00 clr %i0 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200a834: 89 2e 20 03 sll %i0, 3, %g4 <== NOT EXECUTED 200a838: 9b 28 e0 18 sll %g3, 0x18, %o5 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 200a83c: 84 00 a0 01 inc %g2 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200a840: 9b 3b 60 18 sra %o5, 0x18, %o5 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) 200a844: 86 00 ff d0 add %g3, -48, %g3 <== NOT EXECUTED 200a848: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED 200a84c: 80 a0 e0 09 cmp %g3, 9 <== NOT EXECUTED 200a850: 18 80 00 03 bgu 200a85c <_rtems_octal2ulong+0x3c> <== NOT EXECUTED 200a854: 9a 03 7f d0 add %o5, -48, %o5 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); 200a858: b0 03 40 04 add %o5, %g4, %i0 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) 200a85c: 80 a0 80 19 cmp %g2, %i1 <== NOT EXECUTED 200a860: 2a bf ff f5 bcs,a 200a834 <_rtems_octal2ulong+0x14> <== NOT EXECUTED 200a864: c6 08 40 02 ldub [ %g1 + %g2 ], %g3 <== NOT EXECUTED continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); } return(num); } 200a868: 81 c7 e0 08 ret <== NOT EXECUTED 200a86c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200a870 <_rtems_tar_header_checksum>: ************************************************************************/ int _rtems_tar_header_checksum( const char *bufr ) { 200a870: 82 10 20 00 clr %g1 <== NOT EXECUTED 200a874: 84 10 20 00 clr %g2 <== NOT EXECUTED int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) 200a878: 86 00 bf 6c add %g2, -148, %g3 <== NOT EXECUTED 200a87c: 80 a0 e0 07 cmp %g3, 7 <== NOT EXECUTED 200a880: 38 80 00 04 bgu,a 200a890 <_rtems_tar_header_checksum+0x20><== NOT EXECUTED 200a884: c6 0a 00 02 ldub [ %o0 + %g2 ], %g3 <== NOT EXECUTED sum += 0xff & ' '; 200a888: 10 80 00 03 b 200a894 <_rtems_tar_header_checksum+0x24> <== NOT EXECUTED 200a88c: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED else sum += 0xff & bufr[i]; 200a890: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) 200a894: 84 00 a0 01 inc %g2 <== NOT EXECUTED 200a898: 80 a0 a2 00 cmp %g2, 0x200 <== NOT EXECUTED 200a89c: 12 bf ff f8 bne 200a87c <_rtems_tar_header_checksum+0xc> <== NOT EXECUTED 200a8a0: 86 00 bf 6c add %g2, -148, %g3 <== NOT EXECUTED sum += 0xff & ' '; else sum += 0xff & bufr[i]; } return(sum); } 200a8a4: 81 c3 e0 08 retl <== NOT EXECUTED 200a8a8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED =============================================================================== 02004ff8 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2004ff8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2004ffc: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2005000: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2005004: 7f ff ff c0 call 2004f04 <== NOT EXECUTED 2005008: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0200e808 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 200e808: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 200e80c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200e810: 7f ff ff 57 call 200e56c <== NOT EXECUTED 200e814: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02005a74 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 2005a74: 9d e3 bf 98 save %sp, -104, %sp long adjustment; /* * Simple validations */ if ( !delta ) 2005a78: a0 96 20 00 orcc %i0, 0, %l0 2005a7c: 02 80 00 07 be 2005a98 2005a80: 03 00 03 d0 sethi %hi(0xf4000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 2005a84: c4 04 20 04 ld [ %l0 + 4 ], %g2 2005a88: 82 10 62 3f or %g1, 0x23f, %g1 2005a8c: 80 a0 80 01 cmp %g2, %g1 2005a90: 08 80 00 08 bleu 2005ab0 2005a94: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); 2005a98: 40 00 27 de call 200fa10 <__errno> 2005a9c: b0 10 3f ff mov -1, %i0 2005aa0: 82 10 20 16 mov 0x16, %g1 2005aa4: c2 22 00 00 st %g1, [ %o0 ] 2005aa8: 81 c7 e0 08 ret 2005aac: 81 e8 00 00 restore if ( olddelta ) { 2005ab0: 22 80 00 05 be,a 2005ac4 2005ab4: c2 04 00 00 ld [ %l0 ], %g1 olddelta->tv_sec = 0; 2005ab8: c0 26 40 00 clr [ %i1 ] olddelta->tv_usec = 0; 2005abc: c0 26 60 04 clr [ %i1 + 4 ] } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2005ac0: c2 04 00 00 ld [ %l0 ], %g1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2005ac4: 05 00 80 72 sethi %hi(0x201c800), %g2 olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); adjustment += delta->tv_usec; 2005ac8: c8 04 20 04 ld [ %l0 + 4 ], %g4 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2005acc: c6 00 a0 a4 ld [ %g2 + 0xa4 ], %g3 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 2005ad0: 9b 28 60 08 sll %g1, 8, %o5 2005ad4: 85 28 60 03 sll %g1, 3, %g2 2005ad8: 84 23 40 02 sub %o5, %g2, %g2 2005adc: 9b 28 a0 06 sll %g2, 6, %o5 2005ae0: 84 23 40 02 sub %o5, %g2, %g2 2005ae4: 82 00 80 01 add %g2, %g1, %g1 2005ae8: 83 28 60 06 sll %g1, 6, %g1 adjustment += delta->tv_usec; 2005aec: 82 00 40 04 add %g1, %g4, %g1 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 2005af0: 80 a0 40 03 cmp %g1, %g3 2005af4: 0a 80 00 35 bcs 2005bc8 2005af8: 03 00 80 75 sethi %hi(0x201d400), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005afc: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 201d4f0 <_Thread_Dispatch_disable_level> 2005b00: 84 00 a0 01 inc %g2 2005b04: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ] * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 2005b08: 40 00 06 24 call 2007398 <_TOD_Get> 2005b0c: 90 07 bf f8 add %fp, -8, %o0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2005b10: c4 04 20 04 ld [ %l0 + 4 ], %g2 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 2005b14: c2 04 00 00 ld [ %l0 ], %g1 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2005b18: c8 07 bf f8 ld [ %fp + -8 ], %g4 2005b1c: 87 28 a0 07 sll %g2, 7, %g3 2005b20: 88 01 00 01 add %g4, %g1, %g4 2005b24: 83 28 a0 02 sll %g2, 2, %g1 2005b28: 82 20 c0 01 sub %g3, %g1, %g1 2005b2c: c6 07 bf fc ld [ %fp + -4 ], %g3 2005b30: 82 00 40 02 add %g1, %g2, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2005b34: 1b 0e e6 b2 sethi %hi(0x3b9ac800), %o5 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2005b38: 83 28 60 03 sll %g1, 3, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2005b3c: 05 31 19 4d sethi %hi(0xc4653400), %g2 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 2005b40: 82 00 40 03 add %g1, %g3, %g1 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2005b44: 9a 13 61 ff or %o5, 0x1ff, %o5 2005b48: 10 80 00 03 b 2005b54 2005b4c: 84 10 a2 00 or %g2, 0x200, %g2 2005b50: 82 00 40 02 add %g1, %g2, %g1 2005b54: 86 10 00 04 mov %g4, %g3 2005b58: 80 a0 40 0d cmp %g1, %o5 2005b5c: 18 bf ff fd bgu 2005b50 2005b60: 88 01 20 01 inc %g4 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) ) { 2005b64: 1b 31 19 4d sethi %hi(0xc4653400), %o5 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2005b68: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 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) ) { 2005b6c: 9a 13 62 00 or %o5, 0x200, %o5 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 2005b70: 10 80 00 03 b 2005b7c 2005b74: 88 11 22 00 or %g4, 0x200, %g4 2005b78: 82 00 40 04 add %g1, %g4, %g1 2005b7c: 84 10 00 03 mov %g3, %g2 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) ) { 2005b80: 80 a0 40 0d cmp %g1, %o5 2005b84: 08 bf ff fd bleu 2005b78 2005b88: 86 00 ff ff add %g3, -1, %g3 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 2005b8c: 90 07 bf f8 add %fp, -8, %o0 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) ) { 2005b90: c2 27 bf fc st %g1, [ %fp + -4 ] ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 2005b94: 40 00 06 2d call 2007448 <_TOD_Set> 2005b98: c4 27 bf f8 st %g2, [ %fp + -8 ] _Thread_Enable_dispatch(); 2005b9c: 40 00 0a fa call 2008784 <_Thread_Enable_dispatch> 2005ba0: 01 00 00 00 nop /* set the user's output */ if ( olddelta ) 2005ba4: 80 a6 60 00 cmp %i1, 0 2005ba8: 02 80 00 08 be 2005bc8 <== NEVER TAKEN 2005bac: 01 00 00 00 nop *olddelta = *delta; 2005bb0: c2 04 00 00 ld [ %l0 ], %g1 2005bb4: c2 26 40 00 st %g1, [ %i1 ] 2005bb8: c2 04 20 04 ld [ %l0 + 4 ], %g1 2005bbc: c2 26 60 04 st %g1, [ %i1 + 4 ] 2005bc0: 81 c7 e0 08 ret 2005bc4: 91 e8 20 00 restore %g0, 0, %o0 return 0; } 2005bc8: 81 c7 e0 08 ret 2005bcc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200a810 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 200a810: 9d e3 bf a0 save %sp, -96, %sp 200a814: 03 00 80 6e sethi %hi(0x201b800), %g1 200a818: 82 10 63 60 or %g1, 0x360, %g1 ! 201bb60 200a81c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 length = nelem * elsize; 200a820: 92 10 00 18 mov %i0, %o1 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 200a824: 84 00 a0 01 inc %g2 length = nelem * elsize; 200a828: 90 10 00 19 mov %i1, %o0 200a82c: 40 00 36 93 call 2018278 <.umul> 200a830: c4 20 60 14 st %g2, [ %g1 + 0x14 ] cptr = malloc( length ); 200a834: 40 00 01 9f call 200aeb0 200a838: a0 10 00 08 mov %o0, %l0 if ( cptr ) 200a83c: b0 92 20 00 orcc %o0, 0, %i0 200a840: 02 80 00 04 be 200a850 <== NEVER TAKEN 200a844: 94 10 00 10 mov %l0, %o2 memset( cptr, '\0', length ); 200a848: 40 00 14 0d call 200f87c 200a84c: 92 10 20 00 clr %o1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 200a850: 03 00 80 6e sethi %hi(0x201b800), %g1 200a854: 82 10 63 60 or %g1, 0x360, %g1 ! 201bb60 200a858: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a85c: 84 00 bf ff add %g2, -1, %g2 200a860: c4 20 60 04 st %g2, [ %g1 + 4 ] return cptr; } 200a864: 81 c7 e0 08 ret 200a868: 81 e8 00 00 restore =============================================================================== 0200c644 : #include int chdir( const char *pathname ) { 200c644: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 200c648: 80 a6 20 00 cmp %i0, 0 200c64c: 12 80 00 06 bne 200c664 200c650: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 200c654: 40 00 11 77 call 2010c30 <__errno> 200c658: 01 00 00 00 nop 200c65c: 10 80 00 2f b 200c718 200c660: 82 10 20 0e mov 0xe, %g1 ! e /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 200c664: 40 00 15 12 call 2011aac 200c668: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 200c66c: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 200c670: 92 10 00 08 mov %o0, %o1 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 200c674: 94 10 20 01 mov 1, %o2 200c678: 90 10 00 18 mov %i0, %o0 200c67c: 96 10 00 10 mov %l0, %o3 200c680: 98 10 20 01 mov 1, %o4 200c684: 7f ff d9 f2 call 2002e4c 200c688: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 200c68c: 80 a2 20 00 cmp %o0, 0 200c690: 12 80 00 37 bne 200c76c 200c694: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 200c698: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200c69c: 80 a0 60 00 cmp %g1, 0 200c6a0: 12 80 00 0c bne 200c6d0 <== ALWAYS TAKEN 200c6a4: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 200c6a8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 200c6ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200c6b0: 02 80 00 04 be 200c6c0 <== NOT EXECUTED 200c6b4: 01 00 00 00 nop <== NOT EXECUTED 200c6b8: 9f c0 40 00 call %g1 <== NOT EXECUTED 200c6bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 200c6c0: 40 00 11 5c call 2010c30 <__errno> <== NOT EXECUTED 200c6c4: 01 00 00 00 nop <== NOT EXECUTED 200c6c8: 10 80 00 14 b 200c718 <== NOT EXECUTED 200c6cc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 200c6d0: 9f c0 40 00 call %g1 200c6d4: 90 10 00 10 mov %l0, %o0 200c6d8: 80 a2 20 01 cmp %o0, 1 200c6dc: 02 80 00 12 be 200c724 200c6e0: 03 00 80 76 sethi %hi(0x201d800), %g1 rtems_filesystem_freenode( &loc ); 200c6e4: c2 07 bf f8 ld [ %fp + -8 ], %g1 200c6e8: 80 a0 60 00 cmp %g1, 0 200c6ec: 02 80 00 08 be 200c70c <== NEVER TAKEN 200c6f0: 01 00 00 00 nop 200c6f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200c6f8: 80 a0 60 00 cmp %g1, 0 200c6fc: 02 80 00 04 be 200c70c <== NEVER TAKEN 200c700: 01 00 00 00 nop 200c704: 9f c0 40 00 call %g1 200c708: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200c70c: 40 00 11 49 call 2010c30 <__errno> 200c710: 01 00 00 00 nop 200c714: 82 10 20 14 mov 0x14, %g1 ! 14 200c718: c2 22 00 00 st %g1, [ %o0 ] 200c71c: 81 c7 e0 08 ret 200c720: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 200c724: d0 00 61 d8 ld [ %g1 + 0x1d8 ], %o0 200c728: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 200c72c: 80 a0 60 00 cmp %g1, 0 200c730: 22 80 00 09 be,a 200c754 <== NEVER TAKEN 200c734: 03 00 80 76 sethi %hi(0x201d800), %g1 <== NOT EXECUTED 200c738: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 201d81c <_fini+0x18> 200c73c: 80 a0 60 00 cmp %g1, 0 200c740: 22 80 00 05 be,a 200c754 <== NEVER TAKEN 200c744: 03 00 80 76 sethi %hi(0x201d800), %g1 <== NOT EXECUTED 200c748: 9f c0 40 00 call %g1 200c74c: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 200c750: 03 00 80 76 sethi %hi(0x201d800), %g1 200c754: d0 00 61 d8 ld [ %g1 + 0x1d8 ], %o0 ! 201d9d8 200c758: 92 07 bf ec add %fp, -20, %o1 200c75c: 90 02 20 04 add %o0, 4, %o0 200c760: 94 10 20 14 mov 0x14, %o2 200c764: 40 00 13 6f call 2011520 200c768: b0 10 20 00 clr %i0 return 0; } 200c76c: 81 c7 e0 08 ret 200c770: 81 e8 00 00 restore =============================================================================== 020048d0 : int chmod( const char *path, mode_t mode ) { 20048d0: 9d e3 bf 88 save %sp, -120, %sp int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 20048d4: 40 00 42 71 call 2015298 20048d8: 90 10 00 18 mov %i0, %o0 20048dc: a0 07 bf ec add %fp, -20, %l0 20048e0: 92 10 00 08 mov %o0, %o1 20048e4: 94 10 20 00 clr %o2 20048e8: 90 10 00 18 mov %i0, %o0 20048ec: 96 10 00 10 mov %l0, %o3 20048f0: 98 10 20 01 mov 1, %o4 20048f4: 40 00 00 c5 call 2004c08 20048f8: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 20048fc: 80 a2 20 00 cmp %o0, 0 2004900: 12 80 00 24 bne 2004990 2004904: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 2004908: 80 a0 60 00 cmp %g1, 0 200490c: 32 80 00 10 bne,a 200494c <== ALWAYS TAKEN 2004910: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 2004914: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 2004918: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200491c: 02 80 00 08 be 200493c <== NOT EXECUTED 2004920: 01 00 00 00 nop <== NOT EXECUTED 2004924: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2004928: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200492c: 02 80 00 04 be 200493c <== NOT EXECUTED 2004930: 01 00 00 00 nop <== NOT EXECUTED 2004934: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004938: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 200493c: 40 00 3b 2a call 20135e4 <__errno> <== NOT EXECUTED 2004940: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004944: 10 80 00 12 b 200498c <== NOT EXECUTED 2004948: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 200494c: 80 a0 60 00 cmp %g1, 0 2004950: 12 80 00 12 bne 2004998 <== ALWAYS TAKEN 2004954: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 2004958: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200495c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004960: 02 80 00 08 be 2004980 <== NOT EXECUTED 2004964: 01 00 00 00 nop <== NOT EXECUTED 2004968: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200496c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004970: 02 80 00 04 be 2004980 <== NOT EXECUTED 2004974: 01 00 00 00 nop <== NOT EXECUTED 2004978: 9f c0 40 00 call %g1 <== NOT EXECUTED 200497c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004980: 40 00 3b 19 call 20135e4 <__errno> <== NOT EXECUTED 2004984: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004988: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200498c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004990: 81 c7 e0 08 ret 2004994: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 2004998: 9f c0 40 00 call %g1 200499c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 20049a0: c2 07 bf f8 ld [ %fp + -8 ], %g1 20049a4: 80 a0 60 00 cmp %g1, 0 20049a8: 02 bf ff fa be 2004990 <== NEVER TAKEN 20049ac: b0 10 00 08 mov %o0, %i0 20049b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20049b4: 80 a0 60 00 cmp %g1, 0 20049b8: 02 80 00 04 be 20049c8 <== NEVER TAKEN 20049bc: 01 00 00 00 nop 20049c0: 9f c0 40 00 call %g1 20049c4: 90 10 00 10 mov %l0, %o0 return result; } 20049c8: 81 c7 e0 08 ret 20049cc: 81 e8 00 00 restore =============================================================================== 020049d0 : int chown( const char *path, uid_t owner, gid_t group ) { 20049d0: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 20049d4: 40 00 42 31 call 2015298 20049d8: 90 10 00 18 mov %i0, %o0 20049dc: a0 07 bf ec add %fp, -20, %l0 20049e0: 92 10 00 08 mov %o0, %o1 20049e4: 94 10 20 00 clr %o2 20049e8: 90 10 00 18 mov %i0, %o0 20049ec: 96 10 00 10 mov %l0, %o3 20049f0: 98 10 20 01 mov 1, %o4 20049f4: 40 00 00 85 call 2004c08 20049f8: b0 10 3f ff mov -1, %i0 20049fc: 80 a2 20 00 cmp %o0, 0 2004a00: 12 80 00 10 bne 2004a40 2004a04: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 2004a08: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 2004a0c: 80 a0 60 00 cmp %g1, 0 2004a10: 12 80 00 0e bne 2004a48 <== ALWAYS TAKEN 2004a14: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 2004a18: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2004a1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004a20: 02 80 00 04 be 2004a30 <== NOT EXECUTED 2004a24: 01 00 00 00 nop <== NOT EXECUTED 2004a28: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004a2c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004a30: 40 00 3a ed call 20135e4 <__errno> <== NOT EXECUTED 2004a34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004a38: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2004a3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004a40: 81 c7 e0 08 ret 2004a44: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 2004a48: 95 2e a0 10 sll %i2, 0x10, %o2 2004a4c: 93 32 60 10 srl %o1, 0x10, %o1 2004a50: 95 32 a0 10 srl %o2, 0x10, %o2 2004a54: 9f c0 40 00 call %g1 2004a58: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2004a5c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2004a60: 80 a0 60 00 cmp %g1, 0 2004a64: 02 bf ff f7 be 2004a40 <== NEVER TAKEN 2004a68: b0 10 00 08 mov %o0, %i0 2004a6c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2004a70: 80 a0 60 00 cmp %g1, 0 2004a74: 02 80 00 04 be 2004a84 <== NEVER TAKEN 2004a78: 01 00 00 00 nop 2004a7c: 9f c0 40 00 call %g1 2004a80: 90 10 00 10 mov %l0, %o0 return result; } 2004a84: 81 c7 e0 08 ret 2004a88: 81 e8 00 00 restore =============================================================================== 02002b1c : #include int chroot( const char *pathname ) { 2002b1c: 9d e3 bf 88 save %sp, -120, %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) { 2002b20: 23 00 80 76 sethi %hi(0x201d800), %l1 2002b24: e0 04 61 d8 ld [ %l1 + 0x1d8 ], %l0 ! 201d9d8 2002b28: 03 00 80 78 sethi %hi(0x201e000), %g1 2002b2c: 82 10 62 80 or %g1, 0x280, %g1 ! 201e280 2002b30: 80 a4 00 01 cmp %l0, %g1 2002b34: 12 80 00 0e bne 2002b6c <== NEVER TAKEN 2002b38: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 2002b3c: 40 00 05 90 call 200417c 2002b40: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 2002b44: c2 04 61 d8 ld [ %l1 + 0x1d8 ], %g1 2002b48: 80 a0 40 10 cmp %g1, %l0 2002b4c: 12 80 00 08 bne 2002b6c <== ALWAYS TAKEN 2002b50: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 2002b54: 40 00 38 37 call 2010c30 <__errno> <== NOT EXECUTED 2002b58: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2002b5c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2002b60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002b64: 81 c7 e0 08 ret <== NOT EXECUTED 2002b68: 81 e8 00 00 restore <== NOT EXECUTED } result = chdir(pathname); 2002b6c: 40 00 26 b6 call 200c644 2002b70: 90 10 00 18 mov %i0, %o0 if (result) { 2002b74: 80 a2 20 00 cmp %o0, 0 2002b78: 12 80 00 0b bne 2002ba4 <== NEVER TAKEN 2002b7c: 11 00 80 71 sethi %hi(0x201c400), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2002b80: 92 10 20 01 mov 1, %o1 2002b84: 90 12 22 08 or %o0, 0x208, %o0 2002b88: 94 10 20 00 clr %o2 2002b8c: 96 07 bf ec add %fp, -20, %o3 2002b90: 40 00 00 af call 2002e4c 2002b94: 98 10 20 00 clr %o4 2002b98: 80 a2 20 00 cmp %o0, 0 2002b9c: 02 80 00 0a be 2002bc4 <== ALWAYS TAKEN 2002ba0: 03 00 80 76 sethi %hi(0x201d800), %g1 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 2002ba4: 40 00 38 23 call 2010c30 <__errno> <== NOT EXECUTED 2002ba8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002bac: 40 00 38 21 call 2010c30 <__errno> <== NOT EXECUTED 2002bb0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 2002bb4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2002bb8: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 2002bbc: 81 c7 e0 08 ret <== NOT EXECUTED 2002bc0: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 2002bc4: d0 00 61 d8 ld [ %g1 + 0x1d8 ], %o0 2002bc8: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 2002bcc: 80 a0 60 00 cmp %g1, 0 2002bd0: 22 80 00 09 be,a 2002bf4 <== NEVER TAKEN 2002bd4: 03 00 80 76 sethi %hi(0x201d800), %g1 <== NOT EXECUTED 2002bd8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 201d81c <_fini+0x18> 2002bdc: 80 a0 60 00 cmp %g1, 0 2002be0: 22 80 00 05 be,a 2002bf4 <== NEVER TAKEN 2002be4: 03 00 80 76 sethi %hi(0x201d800), %g1 <== NOT EXECUTED 2002be8: 9f c0 40 00 call %g1 2002bec: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_root = loc; 2002bf0: 03 00 80 76 sethi %hi(0x201d800), %g1 2002bf4: d0 00 61 d8 ld [ %g1 + 0x1d8 ], %o0 ! 201d9d8 2002bf8: 92 07 bf ec add %fp, -20, %o1 2002bfc: 94 10 20 14 mov 0x14, %o2 2002c00: 90 02 20 18 add %o0, 0x18, %o0 2002c04: 40 00 3a 47 call 2011520 2002c08: b0 10 20 00 clr %i0 return 0; } 2002c0c: 81 c7 e0 08 ret 2002c10: 81 e8 00 00 restore =============================================================================== 020059b4 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 20059b4: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 20059b8: 90 96 60 00 orcc %i1, 0, %o0 20059bc: 12 80 00 06 bne 20059d4 20059c0: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); 20059c4: 40 00 29 48 call 200fee4 <__errno> 20059c8: 01 00 00 00 nop 20059cc: 10 80 00 14 b 2005a1c 20059d0: 82 10 20 16 mov 0x16, %g1 ! 16 if ( clock_id == CLOCK_REALTIME ) { 20059d4: 12 80 00 05 bne 20059e8 20059d8: 80 a6 20 04 cmp %i0, 4 _TOD_Get(tp); 20059dc: 40 00 07 c7 call 20078f8 <_TOD_Get> 20059e0: b0 10 20 00 clr %i0 20059e4: 30 80 00 15 b,a 2005a38 return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 20059e8: 02 80 00 04 be 20059f8 <== NEVER TAKEN 20059ec: 80 a6 20 02 cmp %i0, 2 return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 20059f0: 12 80 00 06 bne 2005a08 20059f4: 80 a6 20 03 cmp %i0, 3 _TOD_Get_uptime_as_timespec( tp ); 20059f8: 40 00 07 df call 2007974 <_TOD_Get_uptime_as_timespec> 20059fc: b0 10 20 00 clr %i0 return 0; 2005a00: 81 c7 e0 08 ret 2005a04: 81 e8 00 00 restore } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 2005a08: 12 80 00 08 bne 2005a28 2005a0c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 2005a10: 40 00 29 35 call 200fee4 <__errno> 2005a14: 01 00 00 00 nop 2005a18: 82 10 20 58 mov 0x58, %g1 ! 58 2005a1c: c2 22 00 00 st %g1, [ %o0 ] 2005a20: 81 c7 e0 08 ret 2005a24: 91 e8 3f ff restore %g0, -1, %o0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); 2005a28: 40 00 29 2f call 200fee4 <__errno> 2005a2c: b0 10 3f ff mov -1, %i0 2005a30: 82 10 20 16 mov 0x16, %g1 2005a34: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2005a38: 81 c7 e0 08 ret 2005a3c: 81 e8 00 00 restore =============================================================================== 02005a40 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 2005a40: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 2005a44: 90 96 60 00 orcc %i1, 0, %o0 2005a48: 02 80 00 0a be 2005a70 <== NEVER TAKEN 2005a4c: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2005a50: 12 80 00 15 bne 2005aa4 2005a54: 80 a6 20 02 cmp %i0, 2 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 2005a58: c4 02 00 00 ld [ %o0 ], %g2 2005a5c: 03 08 76 b9 sethi %hi(0x21dae400), %g1 2005a60: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 2005a64: 80 a0 80 01 cmp %g2, %g1 2005a68: 38 80 00 06 bgu,a 2005a80 2005a6c: 03 00 80 77 sethi %hi(0x201dc00), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 2005a70: 40 00 29 1d call 200fee4 <__errno> 2005a74: 01 00 00 00 nop 2005a78: 10 80 00 12 b 2005ac0 2005a7c: 82 10 20 16 mov 0x16, %g1 ! 16 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005a80: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 2005a84: 84 00 a0 01 inc %g2 2005a88: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] _Thread_Disable_dispatch(); _TOD_Set( tp ); 2005a8c: 40 00 07 d0 call 20079cc <_TOD_Set> 2005a90: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2005a94: 40 00 0c 9d call 2008d08 <_Thread_Enable_dispatch> 2005a98: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 2005a9c: 81 c7 e0 08 ret 2005aa0: 81 e8 00 00 restore _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 2005aa4: 02 80 00 04 be 2005ab4 2005aa8: 80 a6 20 03 cmp %i0, 3 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 2005aac: 12 80 00 08 bne 2005acc 2005ab0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 2005ab4: 40 00 29 0c call 200fee4 <__errno> 2005ab8: 01 00 00 00 nop 2005abc: 82 10 20 58 mov 0x58, %g1 ! 58 2005ac0: c2 22 00 00 st %g1, [ %o0 ] 2005ac4: 81 c7 e0 08 ret 2005ac8: 91 e8 3f ff restore %g0, -1, %o0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 2005acc: 40 00 29 06 call 200fee4 <__errno> 2005ad0: b0 10 3f ff mov -1, %i0 2005ad4: 82 10 20 16 mov 0x16, %g1 2005ad8: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2005adc: 81 c7 e0 08 ret 2005ae0: 81 e8 00 00 restore =============================================================================== 0200a86c : #include int close( int fd ) { 200a86c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 200a870: 03 00 80 6c sethi %hi(0x201b000), %g1 200a874: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201b154 200a878: 80 a6 00 01 cmp %i0, %g1 200a87c: 1a 80 00 0b bcc 200a8a8 200a880: 03 00 80 6e sethi %hi(0x201b800), %g1 iop = rtems_libio_iop(fd); 200a884: e0 00 63 50 ld [ %g1 + 0x350 ], %l0 ! 201bb50 200a888: 83 2e 20 06 sll %i0, 6, %g1 200a88c: b1 2e 20 03 sll %i0, 3, %i0 200a890: b0 06 00 01 add %i0, %g1, %i0 200a894: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 200a898: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 200a89c: 80 88 61 00 btst 0x100, %g1 200a8a0: 32 80 00 08 bne,a 200a8c0 200a8a4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 200a8a8: 40 00 11 7a call 200ee90 <__errno> 200a8ac: b0 10 3f ff mov -1, %i0 200a8b0: 82 10 20 09 mov 9, %g1 200a8b4: c2 22 00 00 st %g1, [ %o0 ] 200a8b8: 81 c7 e0 08 ret 200a8bc: 81 e8 00 00 restore rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 200a8c0: c2 00 60 04 ld [ %g1 + 4 ], %g1 200a8c4: 80 a0 60 00 cmp %g1, 0 200a8c8: 02 80 00 05 be 200a8dc <== NEVER TAKEN 200a8cc: b0 10 20 00 clr %i0 rc = (*iop->handlers->close_h)( iop ); 200a8d0: 9f c0 40 00 call %g1 200a8d4: 90 10 00 10 mov %l0, %o0 200a8d8: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &iop->pathinfo ); 200a8dc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 200a8e0: 80 a0 60 00 cmp %g1, 0 200a8e4: 02 80 00 08 be 200a904 <== NEVER TAKEN 200a8e8: 01 00 00 00 nop 200a8ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200a8f0: 80 a0 60 00 cmp %g1, 0 200a8f4: 02 80 00 04 be 200a904 200a8f8: 01 00 00 00 nop 200a8fc: 9f c0 40 00 call %g1 200a900: 90 04 20 1c add %l0, 0x1c, %o0 rtems_libio_free( iop ); 200a904: 40 00 00 ec call 200acb4 200a908: 90 10 00 10 mov %l0, %o0 return rc; } 200a90c: 81 c7 e0 08 ret 200a910: 81 e8 00 00 restore =============================================================================== 020097b8 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 20097b8: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 20097bc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 20097c0: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 20097c4: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 20097c8: d2 00 60 0c ld [ %g1 + 0xc ], %o1 20097cc: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 20097d0: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 20097d4: 94 07 bf f4 add %fp, -12, %o2 20097d8: 40 00 05 6c call 200ad88 20097dc: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 20097e0: 80 a2 20 00 cmp %o0, 0 20097e4: 02 80 00 05 be 20097f8 <== ALWAYS TAKEN 20097e8: 01 00 00 00 nop return rtems_deviceio_errno(status); 20097ec: 40 00 00 3c call 20098dc <== NOT EXECUTED 20097f0: 01 00 00 00 nop <== NOT EXECUTED 20097f4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 20097f8: 81 c7 e0 08 ret 20097fc: 81 e8 00 00 restore =============================================================================== 0200980c : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 200980c: 9d e3 bf a0 save %sp, -96, %sp 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; 2009810: e0 06 c0 00 ld [ %i3 ], %l0 if (!device_name_table) 2009814: 80 a4 20 00 cmp %l0, 0 2009818: 02 80 00 05 be 200982c <== NEVER TAKEN 200981c: 27 00 80 3f sethi %hi(0x200fc00), %l3 2009820: a2 10 20 00 clr %l1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 2009824: 10 80 00 24 b 20098b4 2009828: a6 14 e1 28 or %l3, 0x128, %l3 } /* 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 ); 200982c: 40 00 0a 6a call 200c1d4 <__errno> <== NOT EXECUTED 2009830: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2009834: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2009838: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200983c: 81 c7 e0 08 ret <== NOT EXECUTED 2009840: 81 e8 00 00 restore <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 2009844: e4 04 00 00 ld [ %l0 ], %l2 2009848: 80 a4 a0 00 cmp %l2, 0 200984c: 02 80 00 19 be 20098b0 2009850: a2 04 60 01 inc %l1 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 2009854: 92 10 00 12 mov %l2, %o1 2009858: 40 00 0e 00 call 200d058 200985c: 94 10 00 19 mov %i1, %o2 2009860: 80 a2 20 00 cmp %o0, 0 2009864: 32 80 00 14 bne,a 20098b4 <== NEVER TAKEN 2009868: a0 04 20 14 add %l0, 0x14, %l0 <== NOT EXECUTED continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 200986c: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1 2009870: 80 a0 60 00 cmp %g1, 0 2009874: 32 80 00 10 bne,a 20098b4 2009878: a0 04 20 14 add %l0, 0x14, %l0 /* 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; 200987c: 03 00 80 3f sethi %hi(0x200fc00), %g1 2009880: c2 00 63 4c ld [ %g1 + 0x34c ], %g1 ! 200ff4c if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 2009884: e0 26 c0 00 st %l0, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 2009888: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 200988c: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] 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; 2009890: 03 00 80 3f sethi %hi(0x200fc00), %g1 2009894: 82 10 63 00 or %g1, 0x300, %g1 ! 200ff00 2009898: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 200989c: 03 00 80 3f sethi %hi(0x200fc00), %g1 20098a0: 82 10 62 b8 or %g1, 0x2b8, %g1 ! 200feb8 20098a4: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 20098a8: 81 c7 e0 08 ret 20098ac: 91 e8 20 00 restore %g0, 0, %o0 /* 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++) { 20098b0: a0 04 20 14 add %l0, 0x14, %l0 20098b4: c2 04 c0 00 ld [ %l3 ], %g1 20098b8: 80 a4 40 01 cmp %l1, %g1 20098bc: 0a bf ff e2 bcs 2009844 20098c0: 90 10 00 18 mov %i0, %o0 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 20098c4: 40 00 0a 44 call 200c1d4 <__errno> 20098c8: b0 10 3f ff mov -1, %i0 20098cc: 82 10 20 02 mov 2, %g1 20098d0: c2 22 00 00 st %g1, [ %o0 ] } 20098d4: 81 c7 e0 08 ret 20098d8: 81 e8 00 00 restore =============================================================================== 02001ff4 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 2001ff4: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 2001ff8: 23 00 80 3f sethi %hi(0x200fc00), %l1 2001ffc: c2 04 61 28 ld [ %l1 + 0x128 ], %g1 ! 200fd28 2002000: 85 28 60 04 sll %g1, 4, %g2 2002004: 83 28 60 02 sll %g1, 2, %g1 2002008: 40 00 1c 29 call 20090ac <_Workspace_Allocate> 200200c: 90 00 40 02 add %g1, %g2, %o0 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 2002010: a0 92 20 00 orcc %o0, 0, %l0 2002014: 12 80 00 08 bne 2002034 <== ALWAYS TAKEN 2002018: c2 04 61 28 ld [ %l1 + 0x128 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 200201c: 40 00 28 6e call 200c1d4 <__errno> <== NOT EXECUTED 2002020: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002024: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2002028: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200202c: 81 c7 e0 08 ret <== NOT EXECUTED 2002030: 81 e8 00 00 restore <== NOT EXECUTED memset( 2002034: 92 10 20 00 clr %o1 2002038: 85 28 60 04 sll %g1, 4, %g2 200203c: 83 28 60 02 sll %g1, 2, %g1 2002040: 40 00 2a c6 call 200cb58 2002044: 94 00 40 02 add %g1, %g2, %o2 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; 2002048: 03 00 80 3f sethi %hi(0x200fc00), %g1 200204c: 82 10 63 00 or %g1, 0x300, %g1 ! 200ff00 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; 2002050: e0 26 20 1c st %l0, [ %i0 + 0x1c ] 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; 2002054: c2 26 20 24 st %g1, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = &devFS_ops; 2002058: 03 00 80 3f sethi %hi(0x200fc00), %g1 200205c: 82 10 62 b8 or %g1, 0x2b8, %g1 ! 200feb8 2002060: c2 26 20 28 st %g1, [ %i0 + 0x28 ] /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 2002064: 81 c7 e0 08 ret 2002068: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020021e0 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 20021e0: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 20021e4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.command = command; 20021e8: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; status = rtems_io_control( 20021ec: d2 00 60 0c ld [ %g1 + 0xc ], %o1 20021f0: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 20021f4: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; 20021f8: f4 27 bf f8 st %i2, [ %fp + -8 ] status = rtems_io_control( 20021fc: 40 00 10 07 call 2006218 2002200: 94 07 bf f0 add %fp, -16, %o2 np->major, np->minor, (void *) &args ); if ( status ) 2002204: 80 a2 20 00 cmp %o0, 0 2002208: 22 80 00 06 be,a 2002220 <== ALWAYS TAKEN 200220c: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 2002210: 40 00 1d b3 call 20098dc <== NOT EXECUTED 2002214: 01 00 00 00 nop <== NOT EXECUTED 2002218: 81 c7 e0 08 ret <== NOT EXECUTED 200221c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return args.ioctl_return; } 2002220: b0 10 00 08 mov %o0, %i0 2002224: 81 c7 e0 08 ret 2002228: 81 e8 00 00 restore =============================================================================== 0200206c : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 200206c: 9d e3 bf a0 save %sp, -96, %sp * 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') && 2002070: c2 4e 00 00 ldsb [ %i0 ], %g1 2002074: 80 a0 60 64 cmp %g1, 0x64 2002078: 12 80 00 0e bne 20020b0 <== NEVER TAKEN 200207c: a0 10 00 18 mov %i0, %l0 2002080: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 2002084: 80 a0 60 65 cmp %g1, 0x65 2002088: 12 80 00 0b bne 20020b4 <== NEVER TAKEN 200208c: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 2002090: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 2002094: 80 a0 60 76 cmp %g1, 0x76 2002098: 12 80 00 07 bne 20020b4 <== NEVER TAKEN 200209c: 03 00 00 3c sethi %hi(0xf000), %g1 20020a0: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 20020a4: 80 a0 60 00 cmp %g1, 0 20020a8: 02 80 00 4a be 20021d0 20020ac: b0 10 20 00 clr %i0 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 20020b0: 03 00 00 3c sethi %hi(0xf000), %g1 20020b4: 05 00 00 08 sethi %hi(0x2000), %g2 20020b8: 82 0e 40 01 and %i1, %g1, %g1 20020bc: 80 a0 40 02 cmp %g1, %g2 20020c0: 22 80 00 0a be,a 20020e8 <== ALWAYS TAKEN 20020c4: e2 07 00 00 ld [ %i4 ], %l1 20020c8: 05 00 00 18 sethi %hi(0x6000), %g2 <== NOT EXECUTED 20020cc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20020d0: 22 80 00 06 be,a 20020e8 <== NOT EXECUTED 20020d4: e2 07 00 00 ld [ %i4 ], %l1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 20020d8: 40 00 28 3f call 200c1d4 <__errno> <== NOT EXECUTED 20020dc: 01 00 00 00 nop <== NOT EXECUTED 20020e0: 10 80 00 28 b 2002180 <== NOT EXECUTED 20020e4: 82 10 20 16 mov 0x16, %g1 ! 16 <== 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; if (!device_name_table) 20020e8: 80 a4 60 00 cmp %l1, 0 20020ec: 02 80 00 08 be 200210c <== NEVER TAKEN 20020f0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 20020f4: 2b 00 80 3f sethi %hi(0x200fc00), %l5 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; if (!device_name_table) 20020f8: a8 10 00 11 mov %l1, %l4 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 20020fc: aa 15 61 28 or %l5, 0x128, %l5 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; if (!device_name_table) 2002100: a4 10 3f ff mov -1, %l2 2002104: 10 80 00 15 b 2002158 2002108: a6 10 20 00 clr %l3 rtems_set_errno_and_return_minus_one( EFAULT ); 200210c: 40 00 28 32 call 200c1d4 <__errno> <== NOT EXECUTED 2002110: 01 00 00 00 nop <== NOT EXECUTED 2002114: 10 80 00 1b b 2002180 <== NOT EXECUTED 2002118: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 200211c: d2 05 00 00 ld [ %l4 ], %o1 2002120: 80 a2 60 00 cmp %o1, 0 2002124: 02 80 00 0b be 2002150 2002128: a8 05 20 14 add %l4, 0x14, %l4 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 200212c: 40 00 2b 45 call 200ce40 2002130: 01 00 00 00 nop 2002134: 80 a2 20 00 cmp %o0, 0 2002138: 32 80 00 08 bne,a 2002158 <== ALWAYS TAKEN 200213c: a6 04 e0 01 inc %l3 rtems_set_errno_and_return_minus_one( EEXIST ); 2002140: 40 00 28 25 call 200c1d4 <__errno> <== NOT EXECUTED 2002144: 01 00 00 00 nop <== NOT EXECUTED 2002148: 10 80 00 0e b 2002180 <== NOT EXECUTED 200214c: 82 10 20 11 mov 0x11, %g1 ! 11 <== NOT EXECUTED 2002150: a4 10 00 13 mov %l3, %l2 /* 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++){ 2002154: a6 04 e0 01 inc %l3 2002158: c2 05 40 00 ld [ %l5 ], %g1 200215c: 80 a4 c0 01 cmp %l3, %g1 2002160: 0a bf ff ef bcs 200211c 2002164: 90 10 00 10 mov %l0, %o0 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 2002168: 80 a4 bf ff cmp %l2, -1 200216c: 12 80 00 08 bne 200218c <== ALWAYS TAKEN 2002170: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 2002174: 40 00 28 18 call 200c1d4 <__errno> <== NOT EXECUTED 2002178: 01 00 00 00 nop <== NOT EXECUTED 200217c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2002180: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002184: 81 c7 e0 08 ret <== NOT EXECUTED 2002188: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED _ISR_Disable(level); 200218c: 7f ff ff 92 call 2001fd4 2002190: 01 00 00 00 nop 2002194: a6 10 00 08 mov %o0, %l3 device_name_table[slot].device_name = (char *)path; 2002198: 83 2c a0 04 sll %l2, 4, %g1 device_name_table[slot].device_name_length = strlen(path); 200219c: 90 10 00 10 mov %l0, %o0 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 20021a0: a5 2c a0 02 sll %l2, 2, %l2 20021a4: a4 04 80 01 add %l2, %g1, %l2 20021a8: e0 24 40 12 st %l0, [ %l1 + %l2 ] device_name_table[slot].device_name_length = strlen(path); 20021ac: 40 00 2b 76 call 200cf84 20021b0: a2 04 40 12 add %l1, %l2, %l1 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 20021b4: f2 24 60 10 st %i1, [ %l1 + 0x10 ] 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); 20021b8: d0 24 60 04 st %o0, [ %l1 + 4 ] device_name_table[slot].major = major; 20021bc: f4 24 60 08 st %i2, [ %l1 + 8 ] device_name_table[slot].minor = minor; 20021c0: f6 24 60 0c st %i3, [ %l1 + 0xc ] device_name_table[slot].mode = mode; _ISR_Enable(level); 20021c4: b0 10 20 00 clr %i0 20021c8: 7f ff ff 87 call 2001fe4 20021cc: 90 10 00 13 mov %l3, %o0 return 0; } 20021d0: 81 c7 e0 08 ret 20021d4: 81 e8 00 00 restore =============================================================================== 0200222c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200222c: 9d e3 bf 90 save %sp, -112, %sp rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 2002230: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 2002234: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = iop->flags; 2002238: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 200223c: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 2002240: d2 00 60 0c ld [ %g1 + 0xc ], %o1 2002244: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 2002248: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 200224c: 94 07 bf f4 add %fp, -12, %o2 2002250: 40 00 10 3d call 2006344 2002254: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) 2002258: 80 a2 20 00 cmp %o0, 0 200225c: 02 80 00 05 be 2002270 <== ALWAYS TAKEN 2002260: 01 00 00 00 nop return rtems_deviceio_errno(status); 2002264: 40 00 1d 9e call 20098dc <== NOT EXECUTED 2002268: 01 00 00 00 nop <== NOT EXECUTED 200226c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 2002270: 81 c7 e0 08 ret 2002274: 81 e8 00 00 restore =============================================================================== 02002278 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2002278: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 200227c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== 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; 2002280: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 2002284: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 2002288: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 200228c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 2002290: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 2002294: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED 2002298: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 200229c: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; 20022a0: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 20022a4: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 20022a8: 40 00 10 3d call 200639c <== NOT EXECUTED 20022ac: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 20022b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20022b4: 22 80 00 06 be,a 20022cc <== NOT EXECUTED 20022b8: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 20022bc: 40 00 1d 88 call 20098dc <== NOT EXECUTED 20022c0: 01 00 00 00 nop <== NOT EXECUTED 20022c4: 81 c7 e0 08 ret <== NOT EXECUTED 20022c8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 20022cc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 20022d0: 81 c7 e0 08 ret <== NOT EXECUTED 20022d4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020022d8 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 20022d8: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 20022dc: c2 06 00 00 ld [ %i0 ], %g1 if (!the_dev) 20022e0: 80 a0 60 00 cmp %g1, 0 20022e4: 32 80 00 08 bne,a 2002304 <== ALWAYS TAKEN 20022e8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 rtems_set_errno_and_return_minus_one( EFAULT ); 20022ec: 40 00 27 ba call 200c1d4 <__errno> <== NOT EXECUTED 20022f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20022f4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 20022f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20022fc: 81 c7 e0 08 ret <== NOT EXECUTED 2002300: 81 e8 00 00 restore <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 2002304: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 2002308: c2 00 60 08 ld [ %g1 + 8 ], %g1 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 ); 200230c: c4 26 60 1c st %g2, [ %i1 + 0x1c ] buf->st_mode = the_dev->mode; 2002310: c6 26 60 0c st %g3, [ %i1 + 0xc ] 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 ); 2002314: c2 26 60 18 st %g1, [ %i1 + 0x18 ] buf->st_mode = the_dev->mode; return 0; } 2002318: 81 c7 e0 08 ret 200231c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02002320 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 2002320: 9d e3 bf 80 save %sp, -128, %sp args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 2002324: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 2002328: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 200232c: c4 27 bf f8 st %g2, [ %fp + -8 ] np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 2002330: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; args.bytes_moved = 0; 2002334: c0 27 bf fc clr [ %fp + -4 ] rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 2002338: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 200233c: d2 00 60 0c ld [ %g1 + 0xc ], %o1 2002340: d0 00 60 08 ld [ %g1 + 8 ], %o0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 2002344: c4 3f bf e8 std %g2, [ %fp + -24 ] args.buffer = (void *) buffer; 2002348: f2 27 bf f0 st %i1, [ %fp + -16 ] rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 200234c: f0 27 bf e0 st %i0, [ %fp + -32 ] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 2002350: 40 00 10 29 call 20063f4 2002354: 94 07 bf e0 add %fp, -32, %o2 np->major, np->minor, (void *) &args ); if ( status ) 2002358: 80 a2 20 00 cmp %o0, 0 200235c: 22 80 00 06 be,a 2002374 <== ALWAYS TAKEN 2002360: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 2002364: 40 00 1d 5e call 20098dc <== NOT EXECUTED 2002368: 01 00 00 00 nop <== NOT EXECUTED 200236c: 81 c7 e0 08 ret <== NOT EXECUTED 2002370: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 2002374: b0 10 00 08 mov %o0, %i0 2002378: 81 c7 e0 08 ret 200237c: 81 e8 00 00 restore =============================================================================== 0200cac8 : */ int device_close( rtems_libio_t *iop ) { 200cac8: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 200cacc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 200cad0: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 200cad4: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 200cad8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 200cadc: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 200cae0: 94 07 bf f4 add %fp, -12, %o2 200cae4: 40 00 04 f8 call 200dec4 200cae8: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 200caec: 80 a2 20 00 cmp %o0, 0 200caf0: 02 80 00 05 be 200cb04 <== ALWAYS TAKEN 200caf4: 01 00 00 00 nop return rtems_deviceio_errno(status); 200caf8: 40 00 06 7e call 200e4f0 <== NOT EXECUTED 200cafc: 01 00 00 00 nop <== NOT EXECUTED 200cb00: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 200cb04: 81 c7 e0 08 ret 200cb08: 81 e8 00 00 restore =============================================================================== 0200c9c8 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 200c9c8: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 200c9cc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 200c9d0: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 200c9d4: f4 27 bf f8 st %i2, [ %fp + -8 ] { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 200c9d8: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 200c9dc: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 200c9e0: 40 00 05 4f call 200df1c 200c9e4: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200c9e8: 80 a2 20 00 cmp %o0, 0 200c9ec: 22 80 00 06 be,a 200ca04 <== ALWAYS TAKEN 200c9f0: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 200c9f4: 40 00 06 bf call 200e4f0 <== NOT EXECUTED 200c9f8: 01 00 00 00 nop <== NOT EXECUTED 200c9fc: 81 c7 e0 08 ret <== NOT EXECUTED 200ca00: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return args.ioctl_return; } 200ca04: b0 10 00 08 mov %o0, %i0 200ca08: 81 c7 e0 08 ret 200ca0c: 81 e8 00 00 restore =============================================================================== 0200cb0c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200cb0c: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 200cb10: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 200cb14: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 200cb18: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 200cb1c: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 200cb20: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 200cb24: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 200cb28: 94 07 bf f4 add %fp, -12, %o2 200cb2c: 40 00 05 12 call 200df74 200cb30: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200cb34: 80 a2 20 00 cmp %o0, 0 200cb38: 02 80 00 05 be 200cb4c <== ALWAYS TAKEN 200cb3c: 01 00 00 00 nop return rtems_deviceio_errno(status); 200cb40: 40 00 06 6c call 200e4f0 <== NOT EXECUTED 200cb44: 01 00 00 00 nop <== NOT EXECUTED 200cb48: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 200cb4c: 81 c7 e0 08 ret 200cb50: 81 e8 00 00 restore =============================================================================== 0200ca6c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200ca6c: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 200ca70: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 200ca74: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 200ca78: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 200ca7c: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 200ca80: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 200ca84: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 200ca88: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 200ca8c: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 200ca90: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 200ca94: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 200ca98: 40 00 05 4d call 200dfcc <== NOT EXECUTED 200ca9c: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200caa0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200caa4: 22 80 00 06 be,a 200cabc <== NOT EXECUTED 200caa8: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 200caac: 40 00 06 91 call 200e4f0 <== NOT EXECUTED 200cab0: 01 00 00 00 nop <== NOT EXECUTED 200cab4: 81 c7 e0 08 ret <== NOT EXECUTED 200cab8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 200cabc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 200cac0: 81 c7 e0 08 ret <== NOT EXECUTED 200cac4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200ca10 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200ca10: 9d e3 bf 80 save %sp, -128, %sp args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 200ca14: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 200ca18: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 200ca1c: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 200ca20: f2 27 bf f0 st %i1, [ %fp + -16 ] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 200ca24: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 200ca28: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 200ca2c: c4 27 bf f8 st %g2, [ %fp + -8 ] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 200ca30: f0 27 bf e0 st %i0, [ %fp + -32 ] args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 200ca34: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 200ca38: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 200ca3c: 40 00 05 7a call 200e024 200ca40: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200ca44: 80 a2 20 00 cmp %o0, 0 200ca48: 22 80 00 06 be,a 200ca60 <== ALWAYS TAKEN 200ca4c: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 200ca50: 40 00 06 a8 call 200e4f0 <== NOT EXECUTED 200ca54: 01 00 00 00 nop <== NOT EXECUTED 200ca58: 81 c7 e0 08 ret <== NOT EXECUTED 200ca5c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 200ca60: b0 10 00 08 mov %o0, %i0 200ca64: 81 c7 e0 08 ret 200ca68: 81 e8 00 00 restore =============================================================================== 02004090 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2004090: 9d e3 bf a0 save %sp, -96, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2004094: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 2004098: 80 a0 60 00 cmp %g1, 0 200409c: 02 80 00 1a be 2004104 20040a0: a0 10 00 18 mov %i0, %l0 rtems_interrupt_disable (level); 20040a4: 7f ff f8 43 call 20021b0 20040a8: 01 00 00 00 nop while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 20040ac: 10 80 00 0f b 20040e8 20040b0: a2 10 20 02 mov 2, %l1 ! 2 tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 20040b4: 7f ff f8 43 call 20021c0 20040b8: 01 00 00 00 nop sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 20040bc: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 20040c0: 92 10 20 00 clr %o1 20040c4: 40 00 06 6c call 2005a74 20040c8: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 20040cc: 80 a2 20 00 cmp %o0, 0 20040d0: 02 80 00 04 be 20040e0 <== ALWAYS TAKEN 20040d4: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 20040d8: 40 00 08 10 call 2006118 <== NOT EXECUTED 20040dc: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 20040e0: 7f ff f8 34 call 20021b0 20040e4: 01 00 00 00 nop 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) { 20040e8: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 20040ec: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 20040f0: 80 a0 80 01 cmp %g2, %g1 20040f4: 32 bf ff f0 bne,a 20040b4 20040f8: e2 24 20 94 st %l1, [ %l0 + 0x94 ] RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 20040fc: 7f ff f8 31 call 20021c0 2004100: 91 e8 00 08 restore %g0, %o0, %o0 2004104: 81 c7 e0 08 ret 2004108: 81 e8 00 00 restore =============================================================================== 020033ac : int dup2( int fildes, int fildes2 ) { 20033ac: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 20033b0: a0 07 bf b8 add %fp, -72, %l0 20033b4: 90 10 00 18 mov %i0, %o0 20033b8: 40 00 01 dc call 2003b28 20033bc: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 20033c0: 80 a2 3f ff cmp %o0, -1 20033c4: 02 80 00 0e be 20033fc <== NEVER TAKEN 20033c8: 90 10 3f ff mov -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 20033cc: 92 10 00 10 mov %l0, %o1 20033d0: 40 00 01 d6 call 2003b28 20033d4: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 20033d8: 80 a2 3f ff cmp %o0, -1 20033dc: 02 80 00 07 be 20033f8 <== ALWAYS TAKEN 20033e0: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 20033e4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 20033e8: 40 00 00 a1 call 200366c <== NOT EXECUTED 20033ec: 92 10 20 00 clr %o1 <== NOT EXECUTED 20033f0: 81 c7 e0 08 ret <== NOT EXECUTED 20033f4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 20033f8: 90 10 3f ff mov -1, %o0 } 20033fc: b0 10 00 08 mov %o0, %i0 2003400: 81 c7 e0 08 ret 2003404: 81 e8 00 00 restore =============================================================================== 02003adc : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2003adc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2003ae0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2003ae4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2003ae8: 02 80 00 1c be 2003b58 <== NOT EXECUTED 2003aec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2003af0: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 2003af4: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201b3b0 <__ctype_ptr__><== NOT EXECUTED 2003af8: 82 0e 20 ff and %i0, 0xff, %g1 <== NOT EXECUTED 2003afc: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 2003b00: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 2003b04: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 2003b08: 02 80 00 15 be 2003b5c <== NOT EXECUTED 2003b0c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 2003b10: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 2003b14: 02 80 00 12 be 2003b5c <== NOT EXECUTED 2003b18: 01 00 00 00 nop <== NOT EXECUTED 2003b1c: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED 2003b20: 02 80 00 0f be 2003b5c <== NOT EXECUTED 2003b24: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2003b28: b0 1e 20 40 xor %i0, 0x40, %i0 <== 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] = '^'; 2003b2c: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 2003b30: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 2003b34: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 2003b38: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2003b3c: 7f ff ff 39 call 2003820 <== NOT EXECUTED 2003b40: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 2003b44: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 2003b48: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 2003b4c: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== 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')) { 2003b50: 81 c7 e0 08 ret <== NOT EXECUTED 2003b54: 81 e8 00 00 restore <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2003b58: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 2003b5c: 7f ff ff 7d call 2003950 <== NOT EXECUTED 2003b60: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2003b64: 81 c7 e0 08 ret <== NOT EXECUTED 2003b68: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002e1c : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 2002e1c: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 2002e20: d0 00 62 4c ld [ %g1 + 0x24c ], %o0 ! 201f24c <== NOT EXECUTED 2002e24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2002e28: 02 80 00 05 be 2002e3c <== NOT EXECUTED 2002e2c: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 2002e30: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002e34: 40 00 39 03 call 2011240 <== NOT EXECUTED 2002e38: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2002e3c: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02002e44 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 2002e44: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 2002e48: d0 00 61 64 ld [ %g1 + 0x164 ], %o0 ! 201f164 <== NOT EXECUTED 2002e4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2002e50: 02 80 00 05 be 2002e64 <== NOT EXECUTED 2002e54: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 2002e58: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002e5c: 40 00 38 f9 call 2011240 <== NOT EXECUTED 2002e60: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2002e64: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02003b6c : * 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) { 2003b6c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->ccount == 0) 2003b70: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 2003b74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003b78: 02 80 00 0a be 2003ba0 <== NOT EXECUTED 2003b7c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 2003b80: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2003b84: 02 80 00 7a be 2003d6c <== NOT EXECUTED 2003b88: 25 00 80 6c sethi %hi(0x201b000), %l2 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 2003b8c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 2003b90: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 2003b94: 32 80 00 05 bne,a 2003ba8 <== NOT EXECUTED 2003b98: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED tty->ccount = 0; 2003b9c: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 2003ba0: 81 c7 e0 08 ret <== NOT EXECUTED 2003ba4: 81 e8 00 00 restore <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 2003ba8: 12 80 00 71 bne 2003d6c <== NOT EXECUTED 2003bac: 25 00 80 6c sethi %hi(0x201b000), %l2 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 2003bb0: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 2003bb4: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2003bb8: 7f ff ff c9 call 2003adc <== NOT EXECUTED 2003bbc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2003bc0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); 2003bc4: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 2003bc8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003bcc: 02 bf ff f5 be 2003ba0 <== NOT EXECUTED 2003bd0: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 2003bd4: 30 80 00 0f b,a 2003c10 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 2003bd8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2003bdc: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 2003be0: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2003be4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 2003be8: 02 80 00 5c be 2003d58 <== NOT EXECUTED 2003bec: e2 08 80 03 ldub [ %g2 + %g3 ], %l1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2003bf0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2003bf4: 32 80 00 09 bne,a 2003c18 <== NOT EXECUTED 2003bf8: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED 2003bfc: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 2003c00: 32 80 00 06 bne,a 2003c18 <== NOT EXECUTED 2003c04: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 2003c08: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED 2003c0c: b2 10 00 10 mov %l0, %i1 <== NOT EXECUTED 2003c10: 7f ff ff b3 call 2003adc <== NOT EXECUTED 2003c14: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == '\t') { 2003c18: 80 a4 60 09 cmp %l1, 9 <== NOT EXECUTED 2003c1c: 32 80 00 2a bne,a 2003cc4 <== NOT EXECUTED 2003c20: c4 04 80 00 ld [ %l2 ], %g2 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 2003c24: 82 08 62 00 and %g1, 0x200, %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 2003c28: e2 04 20 2c ld [ %l0 + 0x2c ], %l1 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 2003c2c: da 04 80 00 ld [ %l2 ], %o5 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2003c30: 10 80 00 13 b 2003c7c <== NOT EXECUTED 2003c34: 84 10 20 00 clr %g2 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { 2003c38: c8 09 00 02 ldub [ %g4 + %g2 ], %g4 <== NOT EXECUTED 2003c3c: 80 a1 20 09 cmp %g4, 9 <== NOT EXECUTED 2003c40: 12 80 00 04 bne 2003c50 <== NOT EXECUTED 2003c44: 98 03 40 04 add %o5, %g4, %o4 <== NOT EXECUTED col = (col | 7) + 1; 2003c48: 10 80 00 0b b 2003c74 <== NOT EXECUTED 2003c4c: a2 14 60 07 or %l1, 7, %l1 <== NOT EXECUTED } else if (iscntrl (c)) { 2003c50: c8 0b 20 01 ldub [ %o4 + 1 ], %g4 <== NOT EXECUTED 2003c54: 80 89 20 20 btst 0x20, %g4 <== NOT EXECUTED 2003c58: 22 80 00 08 be,a 2003c78 <== NOT EXECUTED 2003c5c: a2 04 60 01 inc %l1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2003c60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003c64: 32 80 00 05 bne,a 2003c78 <== NOT EXECUTED 2003c68: a2 04 60 02 add %l1, 2, %l1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2003c6c: 10 80 00 04 b 2003c7c <== NOT EXECUTED 2003c70: 84 00 a0 01 inc %g2 <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 2003c74: a2 04 60 01 inc %l1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2003c78: 84 00 a0 01 inc %g2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2003c7c: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 2003c80: 32 bf ff ee bne,a 2003c38 <== NOT EXECUTED 2003c84: c8 04 20 1c ld [ %l0 + 0x1c ], %g4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2003c88: 10 80 00 08 b 2003ca8 <== NOT EXECUTED 2003c8c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 2003c90: 7f ff fe e4 call 2003820 <== NOT EXECUTED 2003c94: 01 00 00 00 nop <== NOT EXECUTED tty->column--; 2003c98: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2003c9c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003ca0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2003ca4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 2003ca8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 2003cac: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2003cb0: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 2003cb4: 14 bf ff f7 bg 2003c90 <== NOT EXECUTED 2003cb8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2003cbc: 10 80 00 28 b 2003d5c <== NOT EXECUTED 2003cc0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2003cc4: a2 04 60 01 inc %l1 <== NOT EXECUTED 2003cc8: c4 08 80 11 ldub [ %g2 + %l1 ], %g2 <== NOT EXECUTED 2003ccc: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 2003cd0: 22 80 00 10 be,a 2003d10 <== NOT EXECUTED 2003cd4: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 2003cd8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2003cdc: 22 80 00 0d be,a 2003d10 <== NOT EXECUTED 2003ce0: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2003ce4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2003ce8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2003cec: 7f ff fe cd call 2003820 <== NOT EXECUTED 2003cf0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 2003cf4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2003cf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003cfc: 22 80 00 05 be,a 2003d10 <== NOT EXECUTED 2003d00: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED tty->column--; 2003d04: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003d08: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2003d0c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 2003d10: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 2003d14: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003d18: 02 80 00 07 be 2003d34 <== NOT EXECUTED 2003d1c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2003d20: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 2003d24: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2003d28: 02 80 00 0d be 2003d5c <== NOT EXECUTED 2003d2c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2003d30: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2003d34: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2003d38: 7f ff fe ba call 2003820 <== NOT EXECUTED 2003d3c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 2003d40: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2003d44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003d48: 02 80 00 05 be 2003d5c <== NOT EXECUTED 2003d4c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 2003d50: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003d54: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } } } if (!lineFlag) 2003d58: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2003d5c: 32 80 00 0a bne,a 2003d84 <== NOT EXECUTED 2003d60: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 2003d64: 81 c7 e0 08 ret <== NOT EXECUTED 2003d68: 81 e8 00 00 restore <== 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); 2003d6c: 27 00 80 68 sethi %hi(0x201a000), %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2003d70: 29 00 80 68 sethi %hi(0x201a000), %l4 <== NOT EXECUTED 2003d74: a4 14 a3 b0 or %l2, 0x3b0, %l2 <== 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); 2003d78: a6 14 e1 68 or %l3, 0x168, %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2003d7c: a8 15 21 60 or %l4, 0x160, %l4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2003d80: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 2003d84: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2003d88: 32 bf ff 94 bne,a 2003bd8 <== NOT EXECUTED 2003d8c: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED 2003d90: 81 c7 e0 08 ret <== NOT EXECUTED 2003d94: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200366c : int fcntl( int fd, int cmd, ... ) { 200366c: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2003670: 03 00 80 7c sethi %hi(0x201f000), %g1 2003674: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 201f1c4 ... ) { int ret; va_list ap; va_start( ap, cmd ); 2003678: 84 07 a0 4c add %fp, 0x4c, %g2 200367c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2003680: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2003684: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2003688: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 200368c: 80 a6 00 01 cmp %i0, %g1 2003690: 1a 80 00 0c bcc 20036c0 <== NEVER TAKEN 2003694: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 2003698: 07 00 80 7e sethi %hi(0x201f800), %g3 200369c: c6 00 e3 c8 ld [ %g3 + 0x3c8 ], %g3 ! 201fbc8 20036a0: 89 2e 20 06 sll %i0, 6, %g4 20036a4: a1 2e 20 03 sll %i0, 3, %l0 20036a8: a0 04 00 04 add %l0, %g4, %l0 20036ac: a0 00 c0 10 add %g3, %l0, %l0 rtems_libio_check_is_open(iop); 20036b0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 20036b4: 80 8a 21 00 btst 0x100, %o0 20036b8: 12 80 00 06 bne 20036d0 <== ALWAYS TAKEN 20036bc: 80 a6 60 09 cmp %i1, 9 20036c0: 40 00 38 a4 call 2011950 <__errno> <== NOT EXECUTED 20036c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20036c8: 10 80 00 51 b 200380c <== NOT EXECUTED 20036cc: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 20036d0: 18 80 00 4c bgu 2003800 20036d4: 89 2e 60 02 sll %i1, 2, %g4 20036d8: 1b 00 80 0d sethi %hi(0x2003400), %o5 20036dc: 9a 13 62 44 or %o5, 0x244, %o5 ! 2003644 20036e0: c8 03 40 04 ld [ %o5 + %g4 ], %g4 20036e4: 81 c1 00 00 jmp %g4 20036e8: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 20036ec: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 20036f0: 80 a0 a0 00 cmp %g2, 0 20036f4: 02 80 00 09 be 2003718 <== ALWAYS TAKEN 20036f8: 80 a0 80 01 cmp %g2, %g1 diop = rtems_libio_iop( fd2 ); 20036fc: 1a 80 00 0c bcc 200372c <== NOT EXECUTED 2003700: a2 10 20 00 clr %l1 <== NOT EXECUTED 2003704: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 2003708: a3 28 a0 03 sll %g2, 3, %l1 <== NOT EXECUTED 200370c: a2 04 40 01 add %l1, %g1, %l1 <== NOT EXECUTED 2003710: 10 80 00 07 b 200372c <== NOT EXECUTED 2003714: a2 00 c0 11 add %g3, %l1, %l1 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 2003718: 40 00 02 22 call 2003fa0 200371c: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 2003720: a2 92 20 00 orcc %o0, 0, %l1 2003724: 02 80 00 4d be 2003858 <== NEVER TAKEN 2003728: 01 00 00 00 nop break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 200372c: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 diop->flags = iop->flags; 2003730: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 2003734: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 diop->file_info = iop->file_info; 2003738: c4 24 60 3c st %g2, [ %l1 + 0x3c ] diop->flags = iop->flags; 200373c: c2 24 60 18 st %g1, [ %l1 + 0x18 ] ret = -1; break; } } diop->handlers = iop->handlers; 2003740: c6 24 60 40 st %g3, [ %l1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 2003744: 90 04 60 1c add %l1, 0x1c, %o0 2003748: 92 04 20 1c add %l0, 0x1c, %o1 200374c: 40 00 3d 2a call 2012bf4 2003750: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 2003754: 03 00 80 7e sethi %hi(0x201f800), %g1 2003758: f0 00 63 c8 ld [ %g1 + 0x3c8 ], %i0 ! 201fbc8 200375c: a2 24 40 18 sub %l1, %i0, %l1 2003760: a3 3c 60 03 sra %l1, 3, %l1 2003764: 85 2c 60 06 sll %l1, 6, %g2 2003768: 83 2c 60 03 sll %l1, 3, %g1 200376c: 82 20 80 01 sub %g2, %g1, %g1 2003770: 85 28 60 06 sll %g1, 6, %g2 2003774: 82 00 40 02 add %g1, %g2, %g1 2003778: 82 00 40 11 add %g1, %l1, %g1 200377c: b1 28 60 0f sll %g1, 0xf, %i0 2003780: b0 26 00 01 sub %i0, %g1, %i0 2003784: b1 2e 20 03 sll %i0, 3, %i0 2003788: 10 80 00 24 b 2003818 200378c: b0 06 00 11 add %i0, %l1, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 2003790: b1 32 20 0b srl %o0, 0xb, %i0 2003794: 10 80 00 24 b 2003824 2003798: b0 0e 20 01 and %i0, 1, %i0 * 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 ) ) 200379c: c2 00 80 00 ld [ %g2 ], %g1 20037a0: 80 a0 60 00 cmp %g1, 0 20037a4: 22 80 00 03 be,a 20037b0 <== NEVER TAKEN 20037a8: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED 20037ac: 90 12 28 00 or %o0, 0x800, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 20037b0: d0 24 20 18 st %o0, [ %l0 + 0x18 ] 20037b4: 10 80 00 1c b 2003824 20037b8: b0 10 20 00 clr %i0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 20037bc: 40 00 01 8e call 2003df4 20037c0: 01 00 00 00 nop 20037c4: 10 80 00 15 b 2003818 20037c8: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 20037cc: d0 00 80 00 ld [ %g2 ], %o0 20037d0: 40 00 02 28 call 2004070 20037d4: b0 10 20 00 clr %i0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 20037d8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 20037dc: 90 0a 22 01 and %o0, 0x201, %o0 20037e0: 82 08 7d fe and %g1, -514, %g1 20037e4: 82 12 00 01 or %o0, %g1, %g1 20037e8: 10 80 00 0f b 2003824 20037ec: c2 24 20 18 st %g1, [ %l0 + 0x18 ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 20037f0: 40 00 38 58 call 2011950 <__errno> 20037f4: b0 10 3f ff mov -1, %i0 20037f8: 10 80 00 05 b 200380c 20037fc: 82 10 20 86 mov 0x86, %g1 ret = -1; break; default: errno = EINVAL; 2003800: 40 00 38 54 call 2011950 <__errno> 2003804: b0 10 3f ff mov -1, %i0 2003808: 82 10 20 16 mov 0x16, %g1 200380c: c2 22 00 00 st %g1, [ %o0 ] 2003810: 81 c7 e0 08 ret 2003814: 81 e8 00 00 restore /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2003818: 80 a6 20 00 cmp %i0, 0 200381c: 06 80 00 0f bl 2003858 <== NEVER TAKEN 2003820: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 2003824: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 2003828: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 200382c: 80 a0 60 00 cmp %g1, 0 2003830: 02 bf ff f8 be 2003810 <== NEVER TAKEN 2003834: 92 10 00 10 mov %l0, %o1 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 2003838: 9f c0 40 00 call %g1 200383c: 90 10 00 19 mov %i1, %o0 if (err) { 2003840: a0 92 20 00 orcc %o0, 0, %l0 2003844: 02 80 00 05 be 2003858 <== ALWAYS TAKEN 2003848: 01 00 00 00 nop errno = err; 200384c: 40 00 38 41 call 2011950 <__errno> <== NOT EXECUTED 2003850: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2003854: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2003858: 81 c7 e0 08 ret 200385c: 81 e8 00 00 restore =============================================================================== 0200387c : #include int fdatasync( int fd ) { 200387c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2003880: 03 00 80 7c sethi %hi(0x201f000), %g1 2003884: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 201f1c4 2003888: 80 a6 00 01 cmp %i0, %g1 200388c: 1a 80 00 0c bcc 20038bc 2003890: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 2003894: 03 00 80 7e sethi %hi(0x201f800), %g1 2003898: d0 00 63 c8 ld [ %g1 + 0x3c8 ], %o0 ! 201fbc8 200389c: 83 2e 20 06 sll %i0, 6, %g1 20038a0: b1 2e 20 03 sll %i0, 3, %i0 20038a4: b0 06 00 01 add %i0, %g1, %i0 20038a8: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 20038ac: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 20038b0: 80 88 61 00 btst 0x100, %g1 20038b4: 12 80 00 06 bne 20038cc <== ALWAYS TAKEN 20038b8: 80 88 60 04 btst 4, %g1 20038bc: 40 00 38 25 call 2011950 <__errno> 20038c0: 01 00 00 00 nop 20038c4: 10 80 00 0f b 2003900 20038c8: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 20038cc: 32 80 00 06 bne,a 20038e4 20038d0: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 20038d4: 40 00 38 1f call 2011950 <__errno> 20038d8: 01 00 00 00 nop 20038dc: 10 80 00 09 b 2003900 20038e0: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 20038e4: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 20038e8: 80 a0 60 00 cmp %g1, 0 20038ec: 12 80 00 08 bne 200390c 20038f0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 20038f4: 40 00 38 17 call 2011950 <__errno> 20038f8: 01 00 00 00 nop 20038fc: 82 10 20 86 mov 0x86, %g1 ! 86 2003900: c2 22 00 00 st %g1, [ %o0 ] 2003904: 10 80 00 04 b 2003914 2003908: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fdatasync_h)( iop ); 200390c: 9f c0 40 00 call %g1 2003910: 01 00 00 00 nop } 2003914: 81 c7 e0 08 ret 2003918: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200d0e4 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200d0e4: 9d e3 bf 98 save %sp, -104, %sp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 200d0e8: 03 00 80 6e sethi %hi(0x201b800), %g1 200d0ec: d0 00 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 201b9d4 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200d0f0: a0 10 00 18 mov %i0, %l0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 200d0f4: 92 10 20 00 clr %o1 200d0f8: 94 10 20 00 clr %o2 200d0fc: 7f ff e2 5e call 2005a74 200d100: b0 10 3f fc mov -4, %i0 200d104: 80 a2 20 00 cmp %o0, 0 200d108: 12 80 00 f0 bne 200d4c8 <== ALWAYS TAKEN 200d10c: 01 00 00 00 nop RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 200d110: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (pipe == NULL) { 200d114: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 200d118: 32 80 00 5b bne,a 200d284 <== NOT EXECUTED 200d11c: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 200d120: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED 200d124: 7f ff f7 63 call 200aeb0 <== NOT EXECUTED 200d128: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 200d12c: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 200d130: 02 80 00 66 be 200d2c8 <== NOT EXECUTED 200d134: a2 10 00 12 mov %l2, %l1 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 200d138: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d13c: 40 00 09 d0 call 200f87c <== NOT EXECUTED 200d140: 94 10 20 34 mov 0x34, %o2 <== NOT EXECUTED pipe->Size = PIPE_BUF; 200d144: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 200d148: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED 200d14c: 7f ff f7 59 call 200aeb0 <== NOT EXECUTED 200d150: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED if (! pipe->Buffer) 200d154: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d158: 02 80 00 46 be 200d270 <== NOT EXECUTED 200d15c: d0 24 80 00 st %o0, [ %l2 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 200d160: 27 00 80 6c sethi %hi(0x201b000), %l3 <== NOT EXECUTED 200d164: d0 4c e3 9c ldsb [ %l3 + 0x39c ], %o0 ! 201b39c <== NOT EXECUTED 200d168: 29 14 12 5c sethi %hi(0x50497000), %l4 <== NOT EXECUTED 200d16c: 82 15 22 00 or %l4, 0x200, %g1 ! 50497200 <== NOT EXECUTED 200d170: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d174: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 200d178: 94 10 20 00 clr %o2 <== NOT EXECUTED 200d17c: 40 00 02 81 call 200db80 <== NOT EXECUTED 200d180: 96 04 a0 2c add %l2, 0x2c, %o3 <== NOT EXECUTED 200d184: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d188: 32 80 00 38 bne,a 200d268 <== NOT EXECUTED 200d18c: d0 04 80 00 ld [ %l2 ], %o0 <== 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( 200d190: d0 4c e3 9c ldsb [ %l3 + 0x39c ], %o0 <== NOT EXECUTED 200d194: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 200d198: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 200d19c: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d1a0: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 200d1a4: 94 10 20 00 clr %o2 <== NOT EXECUTED 200d1a8: 40 00 02 76 call 200db80 <== NOT EXECUTED 200d1ac: 96 04 a0 30 add %l2, 0x30, %o3 <== NOT EXECUTED 200d1b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d1b4: 12 80 00 2a bne 200d25c <== NOT EXECUTED 200d1b8: a8 15 23 00 or %l4, 0x300, %l4 <== 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( 200d1bc: d0 4c e3 9c ldsb [ %l3 + 0x39c ], %o0 <== NOT EXECUTED 200d1c0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 200d1c4: 90 12 00 14 or %o0, %l4, %o0 <== NOT EXECUTED 200d1c8: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 200d1cc: 96 10 20 00 clr %o3 <== NOT EXECUTED 200d1d0: 7f ff e1 87 call 20057ec <== NOT EXECUTED 200d1d4: 98 04 a0 28 add %l2, 0x28, %o4 <== NOT EXECUTED 200d1d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d1dc: 12 80 00 1e bne 200d254 <== NOT EXECUTED 200d1e0: 29 00 80 71 sethi %hi(0x201c400), %l4 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 200d1e4: d2 04 a0 2c ld [ %l2 + 0x2c ], %o1 <== NOT EXECUTED 200d1e8: b0 07 bf f8 add %fp, -8, %i0 <== NOT EXECUTED 200d1ec: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 200d1f0: 7f ff e8 2b call 200729c <_Objects_Get> <== NOT EXECUTED 200d1f4: 90 15 22 a0 or %l4, 0x2a0, %o0 <== 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 200d1f8: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 200d1fc: 25 04 00 00 sethi %hi(0x10000000), %l2 <== NOT EXECUTED 200d200: 82 10 40 12 or %g1, %l2, %g1 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 200d204: 7f ff ea 8f call 2007c40 <_Thread_Enable_dispatch> <== NOT EXECUTED 200d208: c2 22 20 4c st %g1, [ %o0 + 0x4c ] <== NOT EXECUTED 200d20c: d2 04 60 30 ld [ %l1 + 0x30 ], %o1 <== NOT EXECUTED 200d210: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 200d214: 7f ff e8 22 call 200729c <_Objects_Get> <== NOT EXECUTED 200d218: 90 15 22 a0 or %l4, 0x2a0, %o0 <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 200d21c: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 <== NOT EXECUTED 200d220: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 200d224: 7f ff ea 87 call 2007c40 <_Thread_Enable_dispatch> <== NOT EXECUTED 200d228: e4 22 20 4c st %l2, [ %o0 + 0x4c ] <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200d22c: c2 0c e3 9c ldub [ %l3 + 0x39c ], %g1 <== NOT EXECUTED 200d230: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 200d234: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 200d238: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 200d23c: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 200d240: 12 80 00 10 bne 200d280 <== NOT EXECUTED 200d244: c4 2c e3 9c stb %g2, [ %l3 + 0x39c ] <== NOT EXECUTED c = 'a'; 200d248: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 200d24c: 10 80 00 0d b 200d280 <== NOT EXECUTED 200d250: c2 2c e3 9c stb %g1, [ %l3 + 0x39c ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200d254: 40 00 02 79 call 200dc38 <== NOT EXECUTED 200d258: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 200d25c: 40 00 02 77 call 200dc38 <== NOT EXECUTED 200d260: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 200d264: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED 200d268: 7f ff f5 b0 call 200a928 <== NOT EXECUTED 200d26c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 200d270: 7f ff f5 ae call 200a928 <== NOT EXECUTED 200d274: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 200d278: 10 80 00 15 b 200d2cc <== NOT EXECUTED 200d27c: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200d280: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 200d284: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d288: 7f ff e1 fb call 2005a74 <== NOT EXECUTED 200d28c: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 200d290: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200d294: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 200d298: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 200d29c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200d2a0: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 200d2a4: 12 80 00 09 bne 200d2c8 <== NOT EXECUTED 200d2a8: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED if (err) 200d2ac: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200d2b0: 22 80 00 06 be,a 200d2c8 <== NOT EXECUTED 200d2b4: e2 24 00 00 st %l1, [ %l0 ] <== NOT EXECUTED pipe_free(pipe); 200d2b8: 7f ff ff 3b call 200cfa4 <== NOT EXECUTED 200d2bc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 200d2c0: 10 80 00 03 b 200d2cc <== NOT EXECUTED 200d2c4: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200d2c8: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200d2cc: 7f ff e2 31 call 2005b90 <== NOT EXECUTED 200d2d0: d0 00 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 201b9d4 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 200d2d4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200d2d8: 12 80 00 7c bne 200d4c8 <== NOT EXECUTED 200d2dc: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200d2e0: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 200d2e4: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 200d2e8: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 200d2ec: 02 80 00 2e be 200d3a4 <== NOT EXECUTED 200d2f0: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED 200d2f4: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 200d2f8: 02 80 00 56 be 200d450 <== NOT EXECUTED 200d2fc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200d300: 12 80 00 6a bne 200d4a8 <== NOT EXECUTED 200d304: 01 00 00 00 nop <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 200d308: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200d30c: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 200d310: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200d314: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 200d318: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 200d31c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d320: 12 80 00 05 bne 200d334 <== NOT EXECUTED 200d324: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 200d328: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 200d32c: 40 00 02 5d call 200dca0 <== NOT EXECUTED 200d330: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 200d334: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 200d338: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d33c: 12 80 00 5b bne 200d4a8 <== NOT EXECUTED 200d340: 01 00 00 00 nop <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 200d344: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 200d348: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 200d34c: 12 80 00 57 bne 200d4a8 <== NOT EXECUTED 200d350: 01 00 00 00 nop <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 200d354: e4 04 60 24 ld [ %l1 + 0x24 ], %l2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200d358: 7f ff e2 0e call 2005b90 <== NOT EXECUTED 200d35c: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 200d360: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 200d364: 40 00 02 66 call 200dcfc <== NOT EXECUTED 200d368: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d36c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d370: 12 80 00 52 bne 200d4b8 <== NOT EXECUTED 200d374: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 200d378: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 200d37c: 7f ff e1 be call 2005a74 <== NOT EXECUTED 200d380: 94 10 20 00 clr %o2 <== NOT EXECUTED 200d384: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d388: 32 80 00 4d bne,a 200d4bc <== NOT EXECUTED 200d38c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200d390: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 <== NOT EXECUTED 200d394: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 200d398: 02 bf ff f0 be 200d358 <== NOT EXECUTED 200d39c: 01 00 00 00 nop <== NOT EXECUTED 200d3a0: 30 80 00 42 b,a 200d4a8 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200d3a4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 200d3a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d3ac: 32 80 00 07 bne,a 200d3c8 <== NOT EXECUTED 200d3b0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 200d3b4: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 200d3b8: 22 80 00 04 be,a 200d3c8 <== NOT EXECUTED 200d3bc: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 200d3c0: 10 80 00 3f b 200d4bc <== NOT EXECUTED 200d3c4: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 200d3c8: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 200d3cc: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 200d3d0: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 200d3d4: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 200d3d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d3dc: 12 80 00 05 bne 200d3f0 <== NOT EXECUTED 200d3e0: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 200d3e4: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 200d3e8: 40 00 02 2e call 200dca0 <== NOT EXECUTED 200d3ec: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Readers == 0) { 200d3f0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 200d3f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d3f8: 12 80 00 2c bne 200d4a8 <== NOT EXECUTED 200d3fc: 01 00 00 00 nop <== NOT EXECUTED prevCounter = pipe->readerCounter; 200d400: e4 04 60 20 ld [ %l1 + 0x20 ], %l2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 200d404: 7f ff e1 e3 call 2005b90 <== NOT EXECUTED 200d408: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 200d40c: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 200d410: 40 00 02 3b call 200dcfc <== NOT EXECUTED 200d414: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d418: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d41c: 12 80 00 27 bne 200d4b8 <== NOT EXECUTED 200d420: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 200d424: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 200d428: 7f ff e1 93 call 2005a74 <== NOT EXECUTED 200d42c: 94 10 20 00 clr %o2 <== NOT EXECUTED 200d430: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d434: 32 80 00 22 bne,a 200d4bc <== NOT EXECUTED 200d438: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200d43c: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 200d440: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 200d444: 02 bf ff f0 be 200d404 <== NOT EXECUTED 200d448: 01 00 00 00 nop <== NOT EXECUTED 200d44c: 30 80 00 17 b,a 200d4a8 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 200d450: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200d454: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 200d458: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200d45c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 200d460: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 200d464: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d468: 12 80 00 05 bne 200d47c <== NOT EXECUTED 200d46c: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 200d470: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 200d474: 40 00 02 0b call 200dca0 <== NOT EXECUTED 200d478: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200d47c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200d480: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 200d484: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200d488: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 200d48c: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 200d490: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d494: 12 80 00 05 bne 200d4a8 <== NOT EXECUTED 200d498: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 200d49c: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 200d4a0: 40 00 02 00 call 200dca0 <== NOT EXECUTED 200d4a4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 200d4a8: 7f ff e1 ba call 2005b90 <== NOT EXECUTED 200d4ac: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED return 0; 200d4b0: 81 c7 e0 08 ret <== NOT EXECUTED 200d4b4: 81 e8 00 00 restore <== NOT EXECUTED 200d4b8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 200d4bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 200d4c0: 7f ff fe c5 call 200cfd4 <== NOT EXECUTED 200d4c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 200d4c8: 81 c7 e0 08 ret 200d4cc: 81 e8 00 00 restore =============================================================================== 02009588 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 2009588: 03 00 80 9f sethi %hi(0x2027c00), %g1 <== NOT EXECUTED 200958c: 05 00 80 9f sethi %hi(0x2027c00), %g2 <== NOT EXECUTED 2009590: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 <== NOT EXECUTED 2009594: 10 80 00 08 b 20095b4 <== NOT EXECUTED 2009598: 84 10 a1 0c or %g2, 0x10c, %g2 <== 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 ) { 200959c: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 <== NOT EXECUTED 20095a0: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 20095a4: 32 80 00 04 bne,a 20095b4 <== NOT EXECUTED 20095a8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 20095ac: 81 c3 e0 08 retl <== NOT EXECUTED 20095b0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 20095b4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20095b8: 32 bf ff f9 bne,a 200959c <== NOT EXECUTED 20095bc: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED return true; } } return false; } 20095c0: 81 c3 e0 08 retl <== NOT EXECUTED 20095c4: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 0200394c : long fpathconf( int fd, int name ) { 200394c: 9d e3 bf a0 save %sp, -96, %sp long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2003950: 03 00 80 7c sethi %hi(0x201f000), %g1 2003954: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 201f1c4 2003958: 80 a6 00 01 cmp %i0, %g1 200395c: 1a 80 00 0b bcc 2003988 2003960: 85 2e 20 06 sll %i0, 6, %g2 iop = rtems_libio_iop(fd); 2003964: 03 00 80 7e sethi %hi(0x201f800), %g1 2003968: c2 00 63 c8 ld [ %g1 + 0x3c8 ], %g1 ! 201fbc8 200396c: b1 2e 20 03 sll %i0, 3, %i0 2003970: b0 06 00 02 add %i0, %g2, %i0 2003974: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 2003978: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200397c: 80 88 61 00 btst 0x100, %g1 2003980: 12 80 00 06 bne 2003998 <== ALWAYS TAKEN 2003984: 80 88 60 02 btst 2, %g1 2003988: 40 00 37 f2 call 2011950 <__errno> 200398c: 01 00 00 00 nop 2003990: 10 80 00 07 b 20039ac 2003994: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2003998: 12 80 00 08 bne 20039b8 <== ALWAYS TAKEN 200399c: 80 a6 60 0b cmp %i1, 0xb 20039a0: 40 00 37 ec call 2011950 <__errno> <== NOT EXECUTED 20039a4: 01 00 00 00 nop <== NOT EXECUTED 20039a8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20039ac: c2 22 00 00 st %g1, [ %o0 ] 20039b0: 81 c7 e0 08 ret 20039b4: 91 e8 3f ff restore %g0, -1, %o0 * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 20039b8: 18 80 00 2c bgu 2003a68 20039bc: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 20039c0: b3 2e 60 02 sll %i1, 2, %i1 20039c4: 05 00 80 0e sethi %hi(0x2003800), %g2 20039c8: 84 10 a1 1c or %g2, 0x11c, %g2 ! 200391c 20039cc: c4 00 80 19 ld [ %g2 + %i1 ], %g2 20039d0: 81 c0 80 00 jmp %g2 20039d4: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 20039d8: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 20039dc: 81 c7 e0 08 ret 20039e0: 81 e8 00 00 restore case _PC_MAX_CANON: return_value = the_limits->max_canon; 20039e4: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 20039e8: 81 c7 e0 08 ret 20039ec: 81 e8 00 00 restore case _PC_MAX_INPUT: return_value = the_limits->max_input; 20039f0: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 20039f4: 81 c7 e0 08 ret 20039f8: 81 e8 00 00 restore case _PC_NAME_MAX: return_value = the_limits->name_max; 20039fc: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 2003a00: 81 c7 e0 08 ret 2003a04: 81 e8 00 00 restore case _PC_PATH_MAX: return_value = the_limits->path_max; 2003a08: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 2003a0c: 81 c7 e0 08 ret 2003a10: 81 e8 00 00 restore case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2003a14: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 2003a18: 81 c7 e0 08 ret 2003a1c: 81 e8 00 00 restore case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2003a20: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 2003a24: 81 c7 e0 08 ret 2003a28: 81 e8 00 00 restore case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2003a2c: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 2003a30: 81 c7 e0 08 ret 2003a34: 81 e8 00 00 restore case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2003a38: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 2003a3c: 81 c7 e0 08 ret 2003a40: 81 e8 00 00 restore case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2003a44: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 2003a48: 81 c7 e0 08 ret 2003a4c: 81 e8 00 00 restore case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2003a50: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 2003a54: 81 c7 e0 08 ret 2003a58: 81 e8 00 00 restore case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2003a5c: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 2003a60: 81 c7 e0 08 ret 2003a64: 81 e8 00 00 restore default: rtems_set_errno_and_return_minus_one( EINVAL ); 2003a68: 40 00 37 ba call 2011950 <__errno> 2003a6c: b0 10 3f ff mov -1, %i0 2003a70: 82 10 20 16 mov 0x16, %g1 2003a74: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 2003a78: 81 c7 e0 08 ret 2003a7c: 81 e8 00 00 restore =============================================================================== 0200a928 : void free( void *ptr ) { MSBUMP(free_calls, 1); 200a928: 9d e3 bf a0 save %sp, -96, %sp 200a92c: 03 00 80 6e sethi %hi(0x201b800), %g1 200a930: 82 10 63 60 or %g1, 0x360, %g1 ! 201bb60 200a934: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200a938: b2 10 00 18 mov %i0, %i1 200a93c: 84 00 a0 01 inc %g2 if ( !ptr ) 200a940: 80 a6 20 00 cmp %i0, 0 200a944: 02 80 00 21 be 200a9c8 200a948: c4 20 60 0c st %g2, [ %g1 + 0xc ] /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 200a94c: 03 00 80 6f sethi %hi(0x201bc00), %g1 200a950: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 201bec0 <_System_state_Current> 200a954: 80 a0 60 03 cmp %g1, 3 200a958: 12 80 00 09 bne 200a97c <== NEVER TAKEN 200a95c: 03 00 80 6e sethi %hi(0x201b800), %g1 200a960: 40 00 01 2e call 200ae18 200a964: 01 00 00 00 nop 200a968: 80 8a 20 ff btst 0xff, %o0 200a96c: 12 80 00 04 bne 200a97c <== ALWAYS TAKEN 200a970: 03 00 80 6e sethi %hi(0x201b800), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 200a974: 40 00 01 3b call 200ae60 <== NOT EXECUTED 200a978: 81 e8 00 00 restore <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 200a97c: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 200a980: 80 a0 60 00 cmp %g1, 0 200a984: 02 80 00 06 be 200a99c <== ALWAYS TAKEN 200a988: 21 00 80 6c sethi %hi(0x201b000), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 200a98c: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 200a990: 9f c0 40 00 call %g1 <== NOT EXECUTED 200a994: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 200a998: 21 00 80 6c sethi %hi(0x201b000), %l0 <== NOT EXECUTED 200a99c: d0 04 21 60 ld [ %l0 + 0x160 ], %o0 ! 201b160 200a9a0: 40 00 06 a8 call 200c440 <_Protected_heap_Free> 200a9a4: 92 10 00 19 mov %i1, %o1 200a9a8: 80 8a 20 ff btst 0xff, %o0 200a9ac: 12 80 00 07 bne 200a9c8 <== ALWAYS TAKEN 200a9b0: c2 04 21 60 ld [ %l0 + 0x160 ], %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 200a9b4: 31 00 80 69 sethi %hi(0x201a400), %i0 <== NOT EXECUTED 200a9b8: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 200a9bc: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 200a9c0: 7f ff e2 0b call 20031ec <== NOT EXECUTED 200a9c4: 91 ee 21 18 restore %i0, 0x118, %o0 <== NOT EXECUTED 200a9c8: 81 c7 e0 08 ret 200a9cc: 81 e8 00 00 restore =============================================================================== 02004048 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 2004048: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 200404c: 03 00 80 78 sethi %hi(0x201e000), %g1 <== NOT EXECUTED 2004050: 82 10 62 80 or %g1, 0x280, %g1 ! 201e280 <== NOT EXECUTED 2004054: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 2004058: 02 80 00 18 be 20040b8 <== NOT EXECUTED 200405c: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 2004060: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 2004064: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004068: 22 80 00 09 be,a 200408c <== NOT EXECUTED 200406c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 2004070: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2004074: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004078: 22 80 00 05 be,a 200408c <== NOT EXECUTED 200407c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 2004080: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004084: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 2004088: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 200408c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004090: 02 80 00 08 be 20040b0 <== NOT EXECUTED 2004094: 01 00 00 00 nop <== NOT EXECUTED 2004098: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200409c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20040a0: 02 80 00 04 be 20040b0 <== NOT EXECUTED 20040a4: 01 00 00 00 nop <== NOT EXECUTED 20040a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20040ac: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 20040b0: 7f ff fb 91 call 2002ef4 <== NOT EXECUTED 20040b4: 81 e8 00 00 restore <== NOT EXECUTED 20040b8: 81 c7 e0 08 ret <== NOT EXECUTED 20040bc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201916c : int fstat( int fd, struct stat *sbuf ) { 201916c: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 2019170: 80 a6 60 00 cmp %i1, 0 2019174: 32 80 00 06 bne,a 201918c 2019178: 03 00 80 6c sethi %hi(0x201b000), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 201917c: 7f ff d7 45 call 200ee90 <__errno> 2019180: 01 00 00 00 nop 2019184: 10 80 00 12 b 20191cc 2019188: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 201918c: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 2019190: 80 a6 00 01 cmp %i0, %g1 2019194: 1a 80 00 0b bcc 20191c0 2019198: 03 00 80 6e sethi %hi(0x201b800), %g1 201919c: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 201bb50 20191a0: 85 2e 20 06 sll %i0, 6, %g2 20191a4: b1 2e 20 03 sll %i0, 3, %i0 20191a8: b0 06 00 02 add %i0, %g2, %i0 20191ac: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 20191b0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20191b4: 80 88 61 00 btst 0x100, %g1 20191b8: 32 80 00 08 bne,a 20191d8 <== ALWAYS TAKEN 20191bc: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 20191c0: 7f ff d7 34 call 200ee90 <__errno> 20191c4: 01 00 00 00 nop 20191c8: 82 10 20 09 mov 9, %g1 ! 9 20191cc: c2 22 00 00 st %g1, [ %o0 ] 20191d0: 10 80 00 15 b 2019224 20191d4: 90 10 3f ff mov -1, %o0 rtems_libio_check_is_open(iop); if ( !iop->handlers ) 20191d8: 80 a0 60 00 cmp %g1, 0 20191dc: 02 bf ff f9 be 20191c0 <== NEVER TAKEN 20191e0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 20191e4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 20191e8: 80 a0 60 00 cmp %g1, 0 20191ec: 12 80 00 06 bne 2019204 <== ALWAYS TAKEN 20191f0: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 20191f4: 7f ff d7 27 call 200ee90 <__errno> <== NOT EXECUTED 20191f8: 01 00 00 00 nop <== NOT EXECUTED 20191fc: 10 bf ff f4 b 20191cc <== NOT EXECUTED 2019200: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 2019204: 94 10 20 48 mov 0x48, %o2 2019208: 7f ff d9 9d call 200f87c 201920c: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 2019210: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 2019214: 90 06 20 1c add %i0, 0x1c, %o0 2019218: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 201921c: 9f c0 40 00 call %g1 2019220: 92 10 00 19 mov %i1, %o1 } 2019224: 81 c7 e0 08 ret 2019228: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02003c00 : #include int fsync( int fd ) { 2003c00: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2003c04: 03 00 80 7c sethi %hi(0x201f000), %g1 2003c08: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 201f1c4 2003c0c: 80 a6 00 01 cmp %i0, %g1 2003c10: 1a 80 00 15 bcc 2003c64 <== NEVER TAKEN 2003c14: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 2003c18: 03 00 80 7e sethi %hi(0x201f800), %g1 2003c1c: d0 00 63 c8 ld [ %g1 + 0x3c8 ], %o0 ! 201fbc8 2003c20: 83 2e 20 06 sll %i0, 6, %g1 2003c24: b1 2e 20 03 sll %i0, 3, %i0 2003c28: b0 06 00 01 add %i0, %g1, %i0 2003c2c: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 2003c30: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 2003c34: 80 88 61 00 btst 0x100, %g1 2003c38: 02 80 00 0b be 2003c64 <== NEVER TAKEN 2003c3c: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2003c40: 32 80 00 06 bne,a 2003c58 2003c44: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 2003c48: 40 00 37 42 call 2011950 <__errno> 2003c4c: 01 00 00 00 nop 2003c50: 10 80 00 0f b 2003c8c 2003c54: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 2003c58: 80 a0 60 00 cmp %g1, 0 2003c5c: 32 80 00 06 bne,a 2003c74 <== ALWAYS TAKEN 2003c60: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 2003c64: 40 00 37 3b call 2011950 <__errno> <== NOT EXECUTED 2003c68: 01 00 00 00 nop <== NOT EXECUTED 2003c6c: 10 80 00 08 b 2003c8c <== NOT EXECUTED 2003c70: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 2003c74: 80 a0 60 00 cmp %g1, 0 2003c78: 12 80 00 08 bne 2003c98 2003c7c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 2003c80: 40 00 37 34 call 2011950 <__errno> 2003c84: 01 00 00 00 nop 2003c88: 82 10 20 86 mov 0x86, %g1 ! 86 2003c8c: c2 22 00 00 st %g1, [ %o0 ] 2003c90: 10 80 00 04 b 2003ca0 2003c94: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 2003c98: 9f c0 40 00 call %g1 2003c9c: 01 00 00 00 nop } 2003ca0: 81 c7 e0 08 ret 2003ca4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200a9d0 : int ftruncate( int fd, off_t length ) { 200a9d0: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 200a9d4: 03 00 80 6c sethi %hi(0x201b000), %g1 200a9d8: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201b154 200a9dc: 80 a6 00 01 cmp %i0, %g1 200a9e0: 1a 80 00 0b bcc 200aa0c <== NEVER TAKEN 200a9e4: 85 2e 20 06 sll %i0, 6, %g2 iop = rtems_libio_iop( fd ); 200a9e8: 03 00 80 6e sethi %hi(0x201b800), %g1 200a9ec: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 201bb50 200a9f0: b1 2e 20 03 sll %i0, 3, %i0 200a9f4: b0 06 00 02 add %i0, %g2, %i0 200a9f8: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 200a9fc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200aa00: 80 88 61 00 btst 0x100, %g1 200aa04: 12 80 00 06 bne 200aa1c <== ALWAYS TAKEN 200aa08: a0 07 bf ec add %fp, -20, %l0 200aa0c: 40 00 11 21 call 200ee90 <__errno> <== NOT EXECUTED 200aa10: 01 00 00 00 nop <== NOT EXECUTED 200aa14: 10 80 00 22 b 200aa9c <== NOT EXECUTED 200aa18: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 200aa1c: 92 06 20 1c add %i0, 0x1c, %o1 200aa20: 90 10 00 10 mov %l0, %o0 200aa24: 40 00 13 57 call 200f780 200aa28: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 200aa2c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200aa30: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200aa34: 80 a0 60 00 cmp %g1, 0 200aa38: 02 80 00 16 be 200aa90 <== NEVER TAKEN 200aa3c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 200aa40: 9f c0 40 00 call %g1 200aa44: 90 10 00 10 mov %l0, %o0 200aa48: 80 a2 20 01 cmp %o0, 1 200aa4c: 32 80 00 06 bne,a 200aa64 200aa50: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_set_errno_and_return_minus_one( EISDIR ); 200aa54: 40 00 11 0f call 200ee90 <__errno> 200aa58: 01 00 00 00 nop 200aa5c: 10 80 00 10 b 200aa9c 200aa60: 82 10 20 15 mov 0x15, %g1 ! 15 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 200aa64: 80 88 60 04 btst 4, %g1 200aa68: 32 80 00 06 bne,a 200aa80 <== ALWAYS TAKEN 200aa6c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200aa70: 40 00 11 08 call 200ee90 <__errno> <== NOT EXECUTED 200aa74: 01 00 00 00 nop <== NOT EXECUTED 200aa78: 10 80 00 09 b 200aa9c <== NOT EXECUTED 200aa7c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 200aa80: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 200aa84: 80 a0 60 00 cmp %g1, 0 200aa88: 32 80 00 08 bne,a 200aaa8 <== ALWAYS TAKEN 200aa8c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 200aa90: 40 00 11 00 call 200ee90 <__errno> <== NOT EXECUTED 200aa94: 01 00 00 00 nop <== NOT EXECUTED 200aa98: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 200aa9c: c2 22 00 00 st %g1, [ %o0 ] 200aaa0: 10 80 00 05 b 200aab4 200aaa4: 90 10 3f ff mov -1, %o0 return (*iop->handlers->ftruncate_h)( iop, length ); 200aaa8: 92 10 00 19 mov %i1, %o1 200aaac: 9f c0 40 00 call %g1 200aab0: 94 10 00 1a mov %i2, %o2 } 200aab4: 81 c7 e0 08 ret 200aab8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0201d118 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 201d118: 9d e3 bf 88 save %sp, -120, %sp /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 201d11c: 03 00 80 81 sethi %hi(0x2020400), %g1 201d120: c2 00 60 b4 ld [ %g1 + 0xb4 ], %g1 ! 20204b4 201d124: 80 a6 00 01 cmp %i0, %g1 201d128: 1a 80 00 08 bcc 201d148 <== NEVER TAKEN 201d12c: a0 10 20 00 clr %l0 201d130: 03 00 80 83 sethi %hi(0x2020c00), %g1 201d134: e0 00 63 d0 ld [ %g1 + 0x3d0 ], %l0 ! 2020fd0 201d138: 83 2e 20 06 sll %i0, 6, %g1 201d13c: b1 2e 20 03 sll %i0, 3, %i0 201d140: b0 06 00 01 add %i0, %g1, %i0 201d144: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 201d148: a2 07 bf ec add %fp, -20, %l1 201d14c: 92 04 20 1c add %l0, 0x1c, %o1 201d150: 90 10 00 11 mov %l1, %o0 201d154: 7f ff d4 1e call 20121cc 201d158: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 201d15c: c2 07 bf f8 ld [ %fp + -8 ], %g1 201d160: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 201d164: 80 a0 60 00 cmp %g1, 0 201d168: 02 80 00 11 be 201d1ac <== NEVER TAKEN 201d16c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 201d170: 9f c0 40 00 call %g1 201d174: 90 10 00 11 mov %l1, %o0 201d178: 80 a2 20 01 cmp %o0, 1 201d17c: 22 80 00 08 be,a 201d19c 201d180: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 201d184: 7f ff d1 d6 call 20118dc <__errno> 201d188: 01 00 00 00 nop 201d18c: 82 10 20 14 mov 0x14, %g1 ! 14 201d190: c2 22 00 00 st %g1, [ %o0 ] 201d194: 10 80 00 0d b 201d1c8 201d198: 90 10 3f ff mov -1, %o0 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 201d19c: c2 00 60 08 ld [ %g1 + 8 ], %g1 201d1a0: 80 a0 60 00 cmp %g1, 0 201d1a4: 32 80 00 06 bne,a 201d1bc <== ALWAYS TAKEN 201d1a8: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 201d1ac: 7f ff d1 cc call 20118dc <__errno> <== NOT EXECUTED 201d1b0: 01 00 00 00 nop <== NOT EXECUTED 201d1b4: 10 bf ff f7 b 201d190 <== NOT EXECUTED 201d1b8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 201d1bc: 92 10 00 19 mov %i1, %o1 201d1c0: 9f c0 40 00 call %g1 201d1c4: 94 10 00 1a mov %i2, %o2 } 201d1c8: 81 c7 e0 08 ret 201d1cc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02003474 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2003474: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 2003478: 7f ff ff b6 call 2003350 200347c: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 2003480: 11 00 80 75 sethi %hi(0x201d400), %o0 2003484: 13 00 80 75 sethi %hi(0x201d400), %o1 2003488: 90 12 23 c8 or %o0, 0x3c8, %o0 200348c: 40 00 39 43 call 2011998 2003490: 92 12 63 50 or %o1, 0x350, %o1 2003494: a0 92 20 00 orcc %o0, 0, %l0 2003498: 12 80 00 08 bne 20034b8 <== ALWAYS TAKEN 200349c: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 20034a0: 40 00 37 10 call 20110e0 <__errno> <== NOT EXECUTED 20034a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20034a8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20034ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20034b0: 81 c7 e0 08 ret <== NOT EXECUTED 20034b4: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 20034b8: 94 10 00 1b mov %i3, %o2 20034bc: 96 10 00 1c mov %i4, %o3 20034c0: 7f ff fe ea call 2003068 20034c4: 90 10 00 10 mov %l0, %o0 20034c8: 80 a2 20 00 cmp %o0, 0 20034cc: 12 80 00 0a bne 20034f4 <== ALWAYS TAKEN 20034d0: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 20034d4: 40 00 37 03 call 20110e0 <__errno> <== NOT EXECUTED 20034d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20034dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20034e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 20034e4: 40 00 37 57 call 2011240 <== NOT EXECUTED 20034e8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 20034ec: 81 c7 e0 08 ret <== NOT EXECUTED 20034f0: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 20034f4: 22 80 00 07 be,a 2003510 <== NEVER TAKEN 20034f8: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 20034fc: d0 06 80 00 ld [ %i2 ], %o0 2003500: 40 00 3e d6 call 2013058 2003504: 92 10 00 18 mov %i0, %o1 2003508: 10 80 00 04 b 2003518 200350c: 80 a0 00 08 cmp %g0, %o0 } else { match = (grp->gr_gid == gid); 2003510: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 2003514: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 2003518: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 200351c: 80 a0 60 00 cmp %g1, 0 2003520: 02 bf ff e6 be 20034b8 2003524: 92 10 00 1a mov %i2, %o1 fclose(fp); 2003528: 90 10 00 10 mov %l0, %o0 200352c: 40 00 37 45 call 2011240 2003530: b0 10 20 00 clr %i0 *result = grp; 2003534: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 2003538: 81 c7 e0 08 ret 200353c: 81 e8 00 00 restore =============================================================================== 020031a4 : return NULL; return p; } struct group *getgrent(void) { 20031a4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 20031a8: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 20031ac: d0 00 62 4c ld [ %g1 + 0x24c ], %o0 ! 201f24c <== NOT EXECUTED 20031b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20031b4: 22 80 00 0c be,a 20031e4 <== NOT EXECUTED 20031b8: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 20031bc: 31 00 80 7c sethi %hi(0x201f000), %i0 <== NOT EXECUTED 20031c0: 15 00 80 7c sethi %hi(0x201f000), %o2 <== NOT EXECUTED 20031c4: 92 16 23 18 or %i0, 0x318, %o1 <== NOT EXECUTED 20031c8: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 20031cc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 20031d0: 7f ff ff a6 call 2003068 <== NOT EXECUTED 20031d4: b0 16 23 18 or %i0, 0x318, %i0 <== NOT EXECUTED 20031d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20031dc: 22 80 00 02 be,a 20031e4 <== NOT EXECUTED 20031e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &grent; } 20031e4: 81 c7 e0 08 ret <== NOT EXECUTED 20031e8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003574 : } struct group *getgrgid( gid_t gid ) { 2003574: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 2003578: 13 00 80 7c sethi %hi(0x201f000), %o1 <== NOT EXECUTED 200357c: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 2003580: 92 12 63 18 or %o1, 0x318, %o1 <== NOT EXECUTED 2003584: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 2003588: 15 00 80 7c sethi %hi(0x201f000), %o2 <== NOT EXECUTED 200358c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 2003590: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 2003594: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 2003598: 7f ff ff ea call 2003540 <== NOT EXECUTED 200359c: b0 10 20 00 clr %i0 <== NOT EXECUTED 20035a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20035a4: 22 80 00 02 be,a 20035ac <== NOT EXECUTED 20035a8: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 20035ac: 81 c7 e0 08 ret <== NOT EXECUTED 20035b0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003540 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2003540: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 2003544: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 2003548: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 200354c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 2003550: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 2003554: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 2003558: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 200355c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 2003560: 90 10 20 00 clr %o0 <== NOT EXECUTED 2003564: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003568: 7f ff ff c3 call 2003474 <== NOT EXECUTED 200356c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 020035e0 : } struct group *getgrnam( const char *name ) { 20035e0: 9d e3 bf 98 save %sp, -104, %sp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 20035e4: 13 00 80 7c sethi %hi(0x201f000), %o1 20035e8: 90 10 00 18 mov %i0, %o0 20035ec: 92 12 63 18 or %o1, 0x318, %o1 20035f0: 15 00 80 7c sethi %hi(0x201f000), %o2 20035f4: 96 10 20 c8 mov 0xc8, %o3 20035f8: 94 12 a2 50 or %o2, 0x250, %o2 20035fc: 98 07 bf fc add %fp, -4, %o4 2003600: 7f ff ff ed call 20035b4 2003604: b0 10 20 00 clr %i0 2003608: 80 a2 20 00 cmp %o0, 0 200360c: 22 80 00 02 be,a 2003614 <== ALWAYS TAKEN 2003610: f0 07 bf fc ld [ %fp + -4 ], %i0 return NULL; return p; } 2003614: 81 c7 e0 08 ret 2003618: 81 e8 00 00 restore =============================================================================== 02003668 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2003668: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 200366c: 7f ff ff 39 call 2003350 2003670: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 2003674: 11 00 80 75 sethi %hi(0x201d400), %o0 2003678: 13 00 80 75 sethi %hi(0x201d400), %o1 200367c: 90 12 23 40 or %o0, 0x340, %o0 2003680: 40 00 38 c6 call 2011998 2003684: 92 12 63 50 or %o1, 0x350, %o1 2003688: a0 92 20 00 orcc %o0, 0, %l0 200368c: 12 80 00 08 bne 20036ac <== ALWAYS TAKEN 2003690: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 2003694: 40 00 36 93 call 20110e0 <__errno> <== NOT EXECUTED 2003698: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200369c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20036a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20036a4: 81 c7 e0 08 ret <== NOT EXECUTED 20036a8: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 20036ac: 94 10 00 1b mov %i3, %o2 20036b0: 96 10 00 1c mov %i4, %o3 20036b4: 7f ff fe ce call 20031ec 20036b8: 90 10 00 10 mov %l0, %o0 20036bc: 80 a2 20 00 cmp %o0, 0 20036c0: 12 80 00 0a bne 20036e8 <== ALWAYS TAKEN 20036c4: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 20036c8: 40 00 36 86 call 20110e0 <__errno> <== NOT EXECUTED 20036cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20036d0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20036d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 20036d8: 40 00 36 da call 2011240 <== NOT EXECUTED 20036dc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 20036e0: 81 c7 e0 08 ret <== NOT EXECUTED 20036e4: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 20036e8: 22 80 00 07 be,a 2003704 <== NEVER TAKEN 20036ec: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 20036f0: d0 06 80 00 ld [ %i2 ], %o0 20036f4: 40 00 3e 59 call 2013058 20036f8: 92 10 00 18 mov %i0, %o1 20036fc: 10 80 00 04 b 200370c 2003700: 80 a0 00 08 cmp %g0, %o0 } else { match = (pwd->pw_uid == uid); 2003704: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 2003708: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 200370c: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 2003710: 80 a0 60 00 cmp %g1, 0 2003714: 02 bf ff e6 be 20036ac 2003718: 92 10 00 1a mov %i2, %o1 fclose(fp); 200371c: 90 10 00 10 mov %l0, %o0 2003720: 40 00 36 c8 call 2011240 2003724: b0 10 20 00 clr %i0 *result = pwd; 2003728: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 200372c: 81 c7 e0 08 ret 2003730: 81 e8 00 00 restore =============================================================================== 02003308 : return NULL; return p; } struct passwd *getpwent(void) { 2003308: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 200330c: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 2003310: d0 00 61 64 ld [ %g1 + 0x164 ], %o0 ! 201f164 <== NOT EXECUTED 2003314: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003318: 22 80 00 0c be,a 2003348 <== NOT EXECUTED 200331c: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 2003320: 31 00 80 7c sethi %hi(0x201f000), %i0 <== NOT EXECUTED 2003324: 15 00 80 7c sethi %hi(0x201f000), %o2 <== NOT EXECUTED 2003328: 92 16 22 30 or %i0, 0x230, %o1 <== NOT EXECUTED 200332c: 94 12 a1 68 or %o2, 0x168, %o2 <== NOT EXECUTED 2003330: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 2003334: 7f ff ff ae call 20031ec <== NOT EXECUTED 2003338: b0 16 22 30 or %i0, 0x230, %i0 <== NOT EXECUTED 200333c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003340: 22 80 00 02 be,a 2003348 <== NOT EXECUTED 2003344: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &pwent; } 2003348: 81 c7 e0 08 ret <== NOT EXECUTED 200334c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020037d4 : } struct passwd *getpwnam( const char *name ) { 20037d4: 9d e3 bf 98 save %sp, -104, %sp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 20037d8: 13 00 80 7c sethi %hi(0x201f000), %o1 20037dc: 90 10 00 18 mov %i0, %o0 20037e0: 92 12 62 30 or %o1, 0x230, %o1 20037e4: 15 00 80 7c sethi %hi(0x201f000), %o2 20037e8: 96 10 20 c8 mov 0xc8, %o3 20037ec: 94 12 a1 68 or %o2, 0x168, %o2 20037f0: 98 07 bf fc add %fp, -4, %o4 20037f4: 7f ff ff ed call 20037a8 20037f8: b0 10 20 00 clr %i0 20037fc: 80 a2 20 00 cmp %o0, 0 2003800: 22 80 00 02 be,a 2003808 <== ALWAYS TAKEN 2003804: f0 07 bf fc ld [ %fp + -4 ], %i0 return NULL; return p; } 2003808: 81 c7 e0 08 ret 200380c: 81 e8 00 00 restore =============================================================================== 02003768 : } struct passwd *getpwuid( uid_t uid ) { 2003768: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 200376c: 13 00 80 7c sethi %hi(0x201f000), %o1 <== NOT EXECUTED 2003770: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 2003774: 92 12 62 30 or %o1, 0x230, %o1 <== NOT EXECUTED 2003778: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 200377c: 15 00 80 7c sethi %hi(0x201f000), %o2 <== NOT EXECUTED 2003780: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 2003784: 94 12 a1 68 or %o2, 0x168, %o2 <== NOT EXECUTED 2003788: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 200378c: 7f ff ff ea call 2003734 <== NOT EXECUTED 2003790: b0 10 20 00 clr %i0 <== NOT EXECUTED 2003794: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003798: 22 80 00 02 be,a 20037a0 <== NOT EXECUTED 200379c: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 20037a0: 81 c7 e0 08 ret <== NOT EXECUTED 20037a4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003734 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2003734: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 2003738: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 200373c: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2003740: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 2003744: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 2003748: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 200374c: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 2003750: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 2003754: 90 10 20 00 clr %o0 <== NOT EXECUTED 2003758: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200375c: 7f ff ff c3 call 2003668 <== NOT EXECUTED 2003760: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0200aadc : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 200aadc: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 200aae0: 80 a6 20 00 cmp %i0, 0 200aae4: 12 80 00 08 bne 200ab04 <== ALWAYS TAKEN 200aae8: 01 00 00 00 nop errno = EFAULT; 200aaec: 40 00 10 e9 call 200ee90 <__errno> <== NOT EXECUTED 200aaf0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 200aaf4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 200aaf8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 200aafc: 81 c7 e0 08 ret <== NOT EXECUTED 200ab00: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 200ab04: 7f ff dd ab call 20021b0 200ab08: 01 00 00 00 nop 200ab0c: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 200ab10: 40 00 05 09 call 200bf34 <_TOD_Get> 200ab14: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 200ab18: 7f ff dd aa call 20021c0 200ab1c: 90 10 00 10 mov %l0, %o0 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 200ab20: d0 07 bf fc ld [ %fp + -4 ], %o0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 200ab24: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 200ab28: 92 10 23 e8 mov 0x3e8, %o1 200ab2c: 40 00 36 0f call 2018368 <.div> 200ab30: c2 26 00 00 st %g1, [ %i0 ] 200ab34: d0 26 20 04 st %o0, [ %i0 + 4 ] * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 200ab38: 81 c7 e0 08 ret 200ab3c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02013494 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 2013494: c4 02 20 3c ld [ %o0 + 0x3c ], %g2 2013498: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 201349c: 80 a0 a0 01 cmp %g2, 1 20134a0: 12 80 00 05 bne 20134b4 <== NEVER TAKEN 20134a4: 82 10 3f ff mov -1, %g1 if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 20134a8: c0 22 20 10 clr [ %o0 + 0x10 ] 20134ac: c0 22 20 14 clr [ %o0 + 0x14 ] 20134b0: 82 10 20 00 clr %g1 return 0; } 20134b4: 81 c3 e0 08 retl 20134b8: 90 10 00 01 mov %g1, %o0 =============================================================================== 020135f0 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 20135f0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 20135f4: e0 06 40 00 ld [ %i1 ], %l0 20135f8: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 20135fc: 82 04 20 54 add %l0, 0x54, %g1 2013600: 80 a0 80 01 cmp %g2, %g1 2013604: 22 80 00 06 be,a 201361c 2013608: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 /* * 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 ); 201360c: 40 00 04 20 call 201468c <__errno> 2013610: 01 00 00 00 nop 2013614: 10 80 00 0d b 2013648 2013618: 82 10 20 5a mov 0x5a, %g1 ! 5a /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 201361c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2013620: 80 a0 40 10 cmp %g1, %l0 2013624: 02 80 00 06 be 201363c 2013628: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 201362c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 2013630: 80 a0 60 00 cmp %g1, 0 2013634: 22 80 00 08 be,a 2013654 <== ALWAYS TAKEN 2013638: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 201363c: 40 00 04 14 call 201468c <__errno> 2013640: 01 00 00 00 nop 2013644: 82 10 20 10 mov 0x10, %g1 ! 10 2013648: c2 22 00 00 st %g1, [ %o0 ] 201364c: 81 c7 e0 08 ret 2013650: 91 e8 3f ff restore %g0, -1, %o0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 2013654: 80 a0 60 00 cmp %g1, 0 2013658: 22 80 00 06 be,a 2013670 201365c: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 2013660: 7f ff d3 28 call 2008300 <_Chain_Extract> 2013664: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 2013668: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 201366c: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 2013670: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 2013674: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 2013678: 90 07 bf f8 add %fp, -8, %o0 201367c: 7f ff c1 ba call 2003d64 2013680: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 2013684: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * 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) ) { 2013688: 90 10 00 10 mov %l0, %o0 201368c: 7f ff f2 29 call 200ff30 2013690: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 2013694: 80 a2 20 00 cmp %o0, 0 2013698: 12 80 00 11 bne 20136dc 201369c: 01 00 00 00 nop 20136a0: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 20136a4: 80 a0 60 00 cmp %g1, 0 20136a8: 12 80 00 0d bne 20136dc 20136ac: 03 00 80 84 sethi %hi(0x2021000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 20136b0: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 2021238 20136b4: c4 06 40 00 ld [ %i1 ], %g2 20136b8: c6 00 60 04 ld [ %g1 + 4 ], %g3 20136bc: 80 a0 c0 02 cmp %g3, %g2 20136c0: 22 80 00 02 be,a 20136c8 <== NEVER TAKEN 20136c4: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 20136c8: 90 10 00 10 mov %l0, %o0 20136cc: 7f ff c1 7c call 2003cbc 20136d0: b0 10 20 00 clr %i0 20136d4: 81 c7 e0 08 ret 20136d8: 81 e8 00 00 restore } return 0; } 20136dc: 81 c7 e0 08 ret 20136e0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02003350 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 2003350: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 2003354: 03 00 80 7c sethi %hi(0x201f000), %g1 2003358: c4 48 61 60 ldsb [ %g1 + 0x160 ], %g2 ! 201f160 200335c: 80 a0 a0 00 cmp %g2, 0 2003360: 12 80 00 30 bne 2003420 2003364: 84 10 20 01 mov 1, %g2 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 2003368: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 200336c: c4 28 61 60 stb %g2, [ %g1 + 0x160 ] mkdir("/etc", 0777); 2003370: 11 00 80 75 sethi %hi(0x201d400), %o0 2003374: 40 00 02 1e call 2003bec 2003378: 90 12 23 38 or %o0, 0x338, %o0 ! 201d738 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 200337c: 21 00 80 75 sethi %hi(0x201d400), %l0 2003380: 13 00 80 75 sethi %hi(0x201d400), %o1 2003384: 90 14 23 40 or %l0, 0x340, %o0 2003388: 40 00 39 84 call 2011998 200338c: 92 12 63 50 or %o1, 0x350, %o1 2003390: 80 a2 20 00 cmp %o0, 0 2003394: 12 80 00 0d bne 20033c8 <== NEVER TAKEN 2003398: 01 00 00 00 nop fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 200339c: 90 14 23 40 or %l0, 0x340, %o0 20033a0: 13 00 80 75 sethi %hi(0x201d400), %o1 20033a4: 40 00 39 7d call 2011998 20033a8: 92 12 63 58 or %o1, 0x358, %o1 ! 201d758 20033ac: b0 92 20 00 orcc %o0, 0, %i0 20033b0: 02 80 00 08 be 20033d0 <== NEVER TAKEN 20033b4: 11 00 80 75 sethi %hi(0x201d400), %o0 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 20033b8: 92 10 00 18 mov %i0, %o1 20033bc: 40 00 39 a3 call 2011a48 20033c0: 90 12 23 60 or %o0, 0x360, %o0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 20033c4: 90 10 00 18 mov %i0, %o0 20033c8: 40 00 37 9e call 2011240 20033cc: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 20033d0: 21 00 80 75 sethi %hi(0x201d400), %l0 20033d4: 13 00 80 75 sethi %hi(0x201d400), %o1 20033d8: 90 14 23 c8 or %l0, 0x3c8, %o0 20033dc: 40 00 39 6f call 2011998 20033e0: 92 12 63 50 or %o1, 0x350, %o1 20033e4: 80 a2 20 00 cmp %o0, 0 20033e8: 12 80 00 0c bne 2003418 <== NEVER TAKEN 20033ec: b0 10 00 08 mov %o0, %i0 fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 20033f0: 90 14 23 c8 or %l0, 0x3c8, %o0 20033f4: 13 00 80 75 sethi %hi(0x201d400), %o1 20033f8: 40 00 39 68 call 2011998 20033fc: 92 12 63 58 or %o1, 0x358, %o1 ! 201d758 2003400: b0 92 20 00 orcc %o0, 0, %i0 2003404: 02 80 00 07 be 2003420 <== NEVER TAKEN 2003408: 11 00 80 75 sethi %hi(0x201d400), %o0 fprintf( fp, "root:x:0:root\n" 200340c: 92 10 00 18 mov %i0, %o1 2003410: 40 00 39 8e call 2011a48 2003414: 90 12 23 d8 or %o0, 0x3d8, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 2003418: 40 00 37 8a call 2011240 200341c: 81 e8 00 00 restore 2003420: 81 c7 e0 08 ret 2003424: 81 e8 00 00 restore =============================================================================== 020064a0 : int ioctl( int fd, ioctl_command_t command, ... ) { 20064a0: 9d e3 bf 98 save %sp, -104, %sp va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 20064a4: 03 00 80 85 sethi %hi(0x2021400), %g1 20064a8: c2 00 60 b4 ld [ %g1 + 0xb4 ], %g1 ! 20214b4 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 20064ac: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20064b0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20064b4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 20064b8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 20064bc: 80 a6 00 01 cmp %i0, %g1 20064c0: 1a 80 00 11 bcc 2006504 20064c4: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 20064c8: 03 00 80 87 sethi %hi(0x2021c00), %g1 20064cc: d0 00 63 8c ld [ %g1 + 0x38c ], %o0 ! 2021f8c 20064d0: 83 2e 20 06 sll %i0, 6, %g1 20064d4: b1 2e 20 03 sll %i0, 3, %i0 20064d8: b0 06 00 01 add %i0, %g1, %i0 20064dc: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 20064e0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 20064e4: 80 88 61 00 btst 0x100, %g1 20064e8: 02 80 00 07 be 2006504 <== NEVER TAKEN 20064ec: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 20064f0: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 20064f4: c4 27 bf fc st %g2, [ %fp + -4 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 20064f8: 80 a0 60 00 cmp %g1, 0 20064fc: 12 80 00 06 bne 2006514 <== ALWAYS TAKEN 2006500: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EBADF ); 2006504: 40 00 39 58 call 2014a64 <__errno> 2006508: 01 00 00 00 nop 200650c: 10 80 00 09 b 2006530 2006510: 82 10 20 09 mov 9, %g1 ! 9 if ( !iop->handlers->ioctl_h ) 2006514: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2006518: 80 a0 60 00 cmp %g1, 0 200651c: 12 80 00 08 bne 200653c <== ALWAYS TAKEN 2006520: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 2006524: 40 00 39 50 call 2014a64 <__errno> <== NOT EXECUTED 2006528: 01 00 00 00 nop <== NOT EXECUTED 200652c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2006530: c2 22 00 00 st %g1, [ %o0 ] 2006534: 10 80 00 04 b 2006544 2006538: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 200653c: 9f c0 40 00 call %g1 2006540: 01 00 00 00 nop return rc; } 2006544: 81 c7 e0 08 ret 2006548: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02003d98 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2003d98: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 2003d9c: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 2003da0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003da4: 02 80 00 03 be 2003db0 <== NOT EXECUTED 2003da8: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 2003dac: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 2003db0: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2003db4: 02 80 00 0c be 2003de4 <== NOT EXECUTED 2003db8: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED c = tolower (c); 2003dbc: 05 00 80 6c sethi %hi(0x201b000), %g2 <== NOT EXECUTED 2003dc0: c4 00 a3 b0 ld [ %g2 + 0x3b0 ], %g2 ! 201b3b0 <__ctype_ptr__><== NOT EXECUTED 2003dc4: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 2003dc8: 84 00 80 10 add %g2, %l0, %g2 <== NOT EXECUTED 2003dcc: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 2003dd0: 84 08 a0 03 and %g2, 3, %g2 <== NOT EXECUTED 2003dd4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 2003dd8: 22 80 00 02 be,a 2003de0 <== NOT EXECUTED 2003ddc: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED if (c == '\r') { 2003de0: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 2003de4: 80 a0 a0 0d cmp %g2, 0xd <== NOT EXECUTED 2003de8: 12 80 00 09 bne 2003e0c <== NOT EXECUTED 2003dec: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 2003df0: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 2003df4: 12 80 00 5d bne 2003f68 <== NOT EXECUTED 2003df8: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 2003dfc: 32 80 00 0d bne,a 2003e30 <== NOT EXECUTED 2003e00: a0 10 20 0a mov 0xa, %l0 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2003e04: 10 80 00 0c b 2003e34 <== NOT EXECUTED 2003e08: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 2003e0c: 12 80 00 07 bne 2003e28 <== NOT EXECUTED 2003e10: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2003e14: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED 2003e18: 32 80 00 06 bne,a 2003e30 <== NOT EXECUTED 2003e1c: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2003e20: 10 80 00 05 b 2003e34 <== NOT EXECUTED 2003e24: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 2003e28: 02 80 00 3c be 2003f18 <== NOT EXECUTED 2003e2c: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 2003e30: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 2003e34: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 2003e38: 02 80 00 38 be 2003f18 <== NOT EXECUTED 2003e3c: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2003e40: c6 0e 60 43 ldub [ %i1 + 0x43 ], %g3 <== NOT EXECUTED 2003e44: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED erase (tty, 0); 2003e48: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { 2003e4c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2003e50: 02 80 00 08 be 2003e70 <== NOT EXECUTED 2003e54: 92 10 20 00 clr %o1 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2003e58: c6 0e 60 44 ldub [ %i1 + 0x44 ], %g3 <== NOT EXECUTED 2003e5c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2003e60: 32 80 00 07 bne,a 2003e7c <== NOT EXECUTED 2003e64: c6 0e 60 45 ldub [ %i1 + 0x45 ], %g3 <== NOT EXECUTED erase (tty, 1); 2003e68: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2003e6c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2003e70: 7f ff ff 3f call 2003b6c <== NOT EXECUTED 2003e74: b0 10 20 00 clr %i0 <== NOT EXECUTED 2003e78: 30 80 00 3d b,a 2003f6c <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2003e7c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2003e80: 02 80 00 3b be 2003f6c <== NOT EXECUTED 2003e84: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 2003e88: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED 2003e8c: 32 80 00 0f bne,a 2003ec8 <== NOT EXECUTED 2003e90: c6 0e 60 4c ldub [ %i1 + 0x4c ], %g3 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 2003e94: 80 88 a0 48 btst 0x48, %g2 <== NOT EXECUTED 2003e98: 22 80 00 06 be,a 2003eb0 <== NOT EXECUTED 2003e9c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2003ea0: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 2003ea4: 7f ff ff 0e call 2003adc <== NOT EXECUTED 2003ea8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2003eac: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2003eb0: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 2003eb4: 86 10 20 0a mov 0xa, %g3 <== NOT EXECUTED 2003eb8: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED 2003ebc: 82 00 60 01 inc %g1 <== NOT EXECUTED 2003ec0: 10 80 00 14 b 2003f10 <== NOT EXECUTED 2003ec4: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 2003ec8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2003ecc: 02 80 00 07 be 2003ee8 <== NOT EXECUTED 2003ed0: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 2003ed4: c6 0e 60 51 ldub [ %i1 + 0x51 ], %g3 <== NOT EXECUTED 2003ed8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2003edc: 12 80 00 0f bne 2003f18 <== NOT EXECUTED 2003ee0: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2003ee4: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 2003ee8: 22 80 00 06 be,a 2003f00 <== NOT EXECUTED 2003eec: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2003ef0: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2003ef4: 7f ff fe fa call 2003adc <== NOT EXECUTED 2003ef8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2003efc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2003f00: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 2003f04: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 2003f08: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 2003f0c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 2003f10: 81 c7 e0 08 ret <== NOT EXECUTED 2003f14: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2003f18: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 2003f1c: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 <== NOT EXECUTED 2003f20: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003f24: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003f28: 16 80 00 11 bge 2003f6c <== NOT EXECUTED 2003f2c: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2003f30: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2003f34: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 2003f38: 22 80 00 06 be,a 2003f50 <== NOT EXECUTED 2003f3c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2003f40: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2003f44: 7f ff fe e6 call 2003adc <== NOT EXECUTED 2003f48: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2003f4c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2003f50: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 2003f54: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 2003f58: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 2003f5c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 2003f60: 81 c7 e0 08 ret <== NOT EXECUTED 2003f64: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 2003f68: b0 10 20 00 clr %i0 <== NOT EXECUTED } return 0; } 2003f6c: 81 c7 e0 08 ret <== NOT EXECUTED 2003f70: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200e81c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 200e81c: 9d e3 bf 90 save %sp, -112, %sp POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 200e820: 7f ff fb f6 call 200d7f8 200e824: 01 00 00 00 nop 200e828: 80 a6 00 08 cmp %i0, %o0 200e82c: 02 80 00 06 be 200e844 200e830: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 200e834: 40 00 01 97 call 200ee90 <__errno> 200e838: 01 00 00 00 nop 200e83c: 10 80 00 07 b 200e858 200e840: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 200e844: 12 80 00 08 bne 200e864 200e848: 82 06 7f ff add %i1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 200e84c: 40 00 01 91 call 200ee90 <__errno> 200e850: 01 00 00 00 nop 200e854: 82 10 20 16 mov 0x16, %g1 ! 16 200e858: c2 22 00 00 st %g1, [ %o0 ] 200e85c: 10 80 00 a5 b 200eaf0 200e860: 90 10 3f ff mov -1, %o0 if ( !is_valid_signo(sig) ) 200e864: 80 a0 60 1f cmp %g1, 0x1f 200e868: 18 bf ff f9 bgu 200e84c 200e86c: 85 2e 60 02 sll %i1, 2, %g2 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 200e870: 87 2e 60 04 sll %i1, 4, %g3 200e874: 86 20 c0 02 sub %g3, %g2, %g3 200e878: 05 00 80 70 sethi %hi(0x201c000), %g2 200e87c: 84 10 a2 b4 or %g2, 0x2b4, %g2 ! 201c2b4 <_POSIX_signals_Vectors> 200e880: 84 00 80 03 add %g2, %g3, %g2 200e884: c4 00 a0 08 ld [ %g2 + 8 ], %g2 200e888: 80 a0 a0 01 cmp %g2, 1 200e88c: 02 80 00 99 be 200eaf0 200e890: 90 10 20 00 clr %o0 /* * 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 ) ) 200e894: 80 a6 60 04 cmp %i1, 4 200e898: 02 80 00 06 be 200e8b0 200e89c: 80 a6 60 08 cmp %i1, 8 200e8a0: 02 80 00 04 be 200e8b0 200e8a4: 80 a6 60 0b cmp %i1, 0xb 200e8a8: 12 80 00 08 bne 200e8c8 200e8ac: a0 10 20 01 mov 1, %l0 return pthread_kill( pthread_self(), sig ); 200e8b0: 40 00 01 4f call 200edec 200e8b4: 01 00 00 00 nop 200e8b8: 40 00 01 11 call 200ecfc 200e8bc: 92 10 00 19 mov %i1, %o1 200e8c0: 81 c7 e0 08 ret 200e8c4: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 200e8c8: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 200e8cc: e0 27 bf f8 st %l0, [ %fp + -8 ] if ( !value ) { 200e8d0: 80 a6 a0 00 cmp %i2, 0 200e8d4: 12 80 00 04 bne 200e8e4 200e8d8: a1 2c 00 01 sll %l0, %g1, %l0 siginfo->si_value.sival_int = 0; 200e8dc: 10 80 00 04 b 200e8ec 200e8e0: c0 27 bf fc clr [ %fp + -4 ] } else { siginfo->si_value = *value; 200e8e4: c2 06 80 00 ld [ %i2 ], %g1 200e8e8: c2 27 bf fc st %g1, [ %fp + -4 ] 200e8ec: 03 00 80 6f sethi %hi(0x201bc00), %g1 200e8f0: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201bd20 <_Thread_Dispatch_disable_level> 200e8f4: 84 00 a0 01 inc %g2 200e8f8: c4 20 61 20 st %g2, [ %g1 + 0x120 ] /* * 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; 200e8fc: 03 00 80 6f sethi %hi(0x201bc00), %g1 200e900: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 201bde0 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200e904: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 200e908: c4 00 a0 cc ld [ %g2 + 0xcc ], %g2 200e90c: 80 ac 00 02 andncc %l0, %g2, %g0 200e910: 12 80 00 4e bne 200ea48 200e914: 07 00 80 71 sethi %hi(0x201c400), %g3 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 200e918: 03 00 80 71 sethi %hi(0x201c400), %g1 200e91c: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 201c440 <_POSIX_signals_Wait_queue> 200e920: 10 80 00 0b b 200e94c 200e924: 86 10 e0 44 or %g3, 0x44, %g3 !_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 ]; 200e928: c8 00 a1 6c ld [ %g2 + 0x16c ], %g4 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 200e92c: 80 8c 00 01 btst %l0, %g1 200e930: 12 80 00 46 bne 200ea48 200e934: 82 10 00 02 mov %g2, %g1 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 200e938: c8 01 20 cc ld [ %g4 + 0xcc ], %g4 200e93c: 80 ac 00 04 andncc %l0, %g4, %g0 200e940: 32 80 00 43 bne,a 200ea4c 200e944: 84 10 20 01 mov 1, %g2 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 ) { 200e948: c4 00 80 00 ld [ %g2 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200e94c: 80 a0 80 03 cmp %g2, %g3 200e950: 32 bf ff f6 bne,a 200e928 200e954: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 200e958: 03 00 80 6c sethi %hi(0x201b000), %g1 200e95c: c8 08 62 04 ldub [ %g1 + 0x204 ], %g4 ! 201b204 200e960: 05 00 80 6f sethi %hi(0x201bc00), %g2 200e964: 88 01 20 01 inc %g4 200e968: 84 10 a0 88 or %g2, 0x88, %g2 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 200e96c: 82 10 20 00 clr %g1 200e970: 90 00 a0 0c add %g2, 0xc, %o0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 200e974: 17 04 00 00 sethi %hi(0x10000000), %o3 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 ] ) 200e978: c6 00 80 00 ld [ %g2 ], %g3 200e97c: 80 a0 e0 00 cmp %g3, 0 200e980: 22 80 00 2c be,a 200ea30 200e984: 84 00 a0 04 add %g2, 4, %g2 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 200e988: c6 00 e0 04 ld [ %g3 + 4 ], %g3 if ( !the_info ) continue; #endif maximum = the_info->maximum; object_table = the_info->local_table; 200e98c: 9a 10 20 01 mov 1, %o5 200e990: f4 00 e0 1c ld [ %g3 + 0x1c ], %i2 for ( index = 1 ; index <= maximum ; index++ ) { 200e994: 10 80 00 23 b 200ea20 200e998: de 10 e0 10 lduh [ %g3 + 0x10 ], %o7 the_thread = (Thread_Control *) object_table[ index ]; 200e99c: c6 06 80 03 ld [ %i2 + %g3 ], %g3 if ( !the_thread ) 200e9a0: 80 a0 e0 00 cmp %g3, 0 200e9a4: 02 80 00 1d be 200ea18 200e9a8: 98 10 00 04 mov %g4, %o4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 200e9ac: d8 00 e0 14 ld [ %g3 + 0x14 ], %o4 200e9b0: 80 a3 00 04 cmp %o4, %g4 200e9b4: 38 80 00 19 bgu,a 200ea18 200e9b8: 98 10 00 04 mov %g4, %o4 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200e9bc: d4 00 e1 6c ld [ %g3 + 0x16c ], %o2 200e9c0: d4 02 a0 cc ld [ %o2 + 0xcc ], %o2 200e9c4: 80 ac 00 0a andncc %l0, %o2, %g0 200e9c8: 22 80 00 14 be,a 200ea18 200e9cc: 98 10 00 04 mov %g4, %o4 * * 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 ) { 200e9d0: 80 a3 00 04 cmp %o4, %g4 200e9d4: 2a 80 00 11 bcs,a 200ea18 200e9d8: 82 10 00 03 mov %g3, %g1 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 200e9dc: d2 00 60 10 ld [ %g1 + 0x10 ], %o1 200e9e0: 80 a2 60 00 cmp %o1, 0 200e9e4: 22 80 00 0d be,a 200ea18 <== NEVER TAKEN 200e9e8: 98 10 00 04 mov %g4, %o4 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 200e9ec: d4 00 e0 10 ld [ %g3 + 0x10 ], %o2 200e9f0: 80 a2 a0 00 cmp %o2, 0 200e9f4: 22 80 00 09 be,a 200ea18 200e9f8: 82 10 00 03 mov %g3, %g1 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 200e9fc: 80 8a 40 0b btst %o1, %o3 200ea00: 32 80 00 06 bne,a 200ea18 200ea04: 98 10 00 04 mov %g4, %o4 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 200ea08: 80 8a 80 0b btst %o2, %o3 200ea0c: 32 80 00 03 bne,a 200ea18 200ea10: 82 10 00 03 mov %g3, %g1 200ea14: 98 10 00 04 mov %g4, %o4 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 200ea18: 9a 03 60 01 inc %o5 200ea1c: 88 10 00 0c mov %o4, %g4 200ea20: 80 a3 40 0f cmp %o5, %o7 200ea24: 28 bf ff de bleu,a 200e99c 200ea28: 87 2b 60 02 sll %o5, 2, %g3 200ea2c: 84 00 a0 04 add %g2, 4, %g2 * + 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++) { 200ea30: 80 a0 80 08 cmp %g2, %o0 200ea34: 32 bf ff d2 bne,a 200e97c 200ea38: c6 00 80 00 ld [ %g2 ], %g3 } } } } if ( interested ) { 200ea3c: 80 a0 60 00 cmp %g1, 0 200ea40: 02 80 00 0b be 200ea6c 200ea44: 01 00 00 00 nop * 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; 200ea48: 84 10 20 01 mov 1, %g2 ! 1 /* * 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 ) ) { 200ea4c: 90 10 00 01 mov %g1, %o0 * 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; 200ea50: c4 28 60 74 stb %g2, [ %g1 + 0x74 ] /* * 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 ) ) { 200ea54: 92 10 00 19 mov %i1, %o1 200ea58: 40 00 00 5d call 200ebcc <_POSIX_signals_Unblock_thread> 200ea5c: 94 07 bf f4 add %fp, -12, %o2 200ea60: 80 8a 20 ff btst 0xff, %o0 200ea64: 12 80 00 20 bne 200eae4 200ea68: 01 00 00 00 nop /* * 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 ); 200ea6c: 40 00 00 47 call 200eb88 <_POSIX_signals_Set_process_signals> 200ea70: 90 10 00 10 mov %l0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 200ea74: 83 2e 60 04 sll %i1, 4, %g1 200ea78: b3 2e 60 02 sll %i1, 2, %i1 200ea7c: b2 20 40 19 sub %g1, %i1, %i1 200ea80: 03 00 80 70 sethi %hi(0x201c000), %g1 200ea84: 82 10 62 b4 or %g1, 0x2b4, %g1 ! 201c2b4 <_POSIX_signals_Vectors> 200ea88: c2 00 40 19 ld [ %g1 + %i1 ], %g1 200ea8c: 80 a0 60 02 cmp %g1, 2 200ea90: 12 80 00 15 bne 200eae4 200ea94: 11 00 80 71 sethi %hi(0x201c400), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 200ea98: 7f ff f4 bc call 200bd88 <_Chain_Get> 200ea9c: 90 12 20 34 or %o0, 0x34, %o0 ! 201c434 <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 200eaa0: a0 92 20 00 orcc %o0, 0, %l0 200eaa4: 12 80 00 08 bne 200eac4 200eaa8: 92 07 bf f4 add %fp, -12, %o1 _Thread_Enable_dispatch(); 200eaac: 7f ff e4 65 call 2007c40 <_Thread_Enable_dispatch> 200eab0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EAGAIN ); 200eab4: 40 00 00 f7 call 200ee90 <__errno> 200eab8: 01 00 00 00 nop 200eabc: 10 bf ff 67 b 200e858 200eac0: 82 10 20 0b mov 0xb, %g1 ! b } psiginfo->Info = *siginfo; 200eac4: 90 04 20 08 add %l0, 8, %o0 200eac8: 40 00 03 2e call 200f780 200eacc: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 200ead0: 11 00 80 71 sethi %hi(0x201c400), %o0 200ead4: 92 10 00 10 mov %l0, %o1 200ead8: 90 12 20 ac or %o0, 0xac, %o0 200eadc: 7f ff de 6a call 2006484 <_Chain_Append> 200eae0: 90 02 00 19 add %o0, %i1, %o0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 200eae4: 7f ff e4 57 call 2007c40 <_Thread_Enable_dispatch> 200eae8: 01 00 00 00 nop 200eaec: 90 10 20 00 clr %o0 ! 0 return 0; } 200eaf0: b0 10 00 08 mov %o0, %i0 200eaf4: 81 c7 e0 08 ret 200eaf8: 81 e8 00 00 restore =============================================================================== 020193a8 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 20193a8: 9d e3 bf a0 save %sp, -96, %sp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 20193ac: 03 00 80 6f sethi %hi(0x201bc00), %g1 20193b0: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 201bec0 <_System_state_Current> 20193b4: 80 a0 60 03 cmp %g1, 3 20193b8: 12 80 00 16 bne 2019410 <== NEVER TAKEN 20193bc: 03 00 80 6b sethi %hi(0x201ac00), %g1 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 20193c0: 23 00 80 6c sethi %hi(0x201b000), %l1 20193c4: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 20193c8: c2 04 63 b8 ld [ %l1 + 0x3b8 ], %g1 20193cc: 80 a0 40 10 cmp %g1, %l0 20193d0: 22 80 00 06 be,a 20193e8 20193d4: 21 00 80 6c sethi %hi(0x201b000), %l0 _wrapup_reent(_global_impure_ptr); 20193d8: 40 00 01 83 call 20199e4 <_wrapup_reent> 20193dc: 90 10 00 10 mov %l0, %o0 /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; 20193e0: e0 24 63 b8 st %l0, [ %l1 + 0x3b8 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 20193e4: 21 00 80 6c sethi %hi(0x201b000), %l0 20193e8: c2 04 23 b8 ld [ %l0 + 0x3b8 ], %g1 ! 201b3b8 <_impure_ptr> 20193ec: 7f ff d7 01 call 200eff0 20193f0: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 20193f4: c2 04 23 b8 ld [ %l0 + 0x3b8 ], %g1 20193f8: 7f ff d6 fe call 200eff0 20193fc: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 2019400: c2 04 23 b8 ld [ %l0 + 0x3b8 ], %g1 2019404: f0 00 60 0c ld [ %g1 + 0xc ], %i0 2019408: 7f ff d6 fa call 200eff0 201940c: 81 e8 00 00 restore 2019410: 81 c7 e0 08 ret <== NOT EXECUTED 2019414: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02004080 : int link( const char *existing, const char *new ) { 2004080: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 2004084: 40 00 3b 75 call 2012e58 2004088: 90 10 00 18 mov %i0, %o0 200408c: 94 10 20 00 clr %o2 2004090: 92 10 00 08 mov %o0, %o1 2004094: 96 07 bf e8 add %fp, -24, %o3 2004098: 90 10 00 18 mov %i0, %o0 200409c: 98 10 20 01 mov 1, %o4 20040a0: 7f ff fe a5 call 2003b34 20040a4: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 20040a8: 80 a2 20 00 cmp %o0, 0 20040ac: 12 80 00 8f bne 20042e8 20040b0: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 20040b4: c2 4e 40 00 ldsb [ %i1 ], %g1 20040b8: 80 a0 60 5c cmp %g1, 0x5c 20040bc: 22 80 00 08 be,a 20040dc <== NEVER TAKEN 20040c0: 03 00 80 81 sethi %hi(0x2020400), %g1 <== NOT EXECUTED 20040c4: 80 a0 60 2f cmp %g1, 0x2f 20040c8: 22 80 00 05 be,a 20040dc 20040cc: 03 00 80 81 sethi %hi(0x2020400), %g1 20040d0: 80 a0 60 00 cmp %g1, 0 20040d4: 12 80 00 09 bne 20040f8 <== ALWAYS TAKEN 20040d8: 03 00 80 81 sethi %hi(0x2020400), %g1 20040dc: d2 00 62 fc ld [ %g1 + 0x2fc ], %o1 ! 20206fc 20040e0: 90 07 bf d4 add %fp, -44, %o0 20040e4: 92 02 60 18 add %o1, 0x18, %o1 20040e8: 40 00 38 39 call 20121cc 20040ec: 94 10 20 14 mov 0x14, %o2 20040f0: 10 80 00 08 b 2004110 20040f4: 90 10 20 01 mov 1, %o0 20040f8: d2 00 62 fc ld [ %g1 + 0x2fc ], %o1 20040fc: 90 07 bf d4 add %fp, -44, %o0 2004100: 92 02 60 04 add %o1, 4, %o1 2004104: 40 00 38 32 call 20121cc 2004108: 94 10 20 14 mov 0x14, %o2 200410c: 90 10 20 00 clr %o0 if ( !parent_loc.ops->evalformake_h ) { 2004110: c2 07 bf e0 ld [ %fp + -32 ], %g1 2004114: c2 00 60 04 ld [ %g1 + 4 ], %g1 2004118: 80 a0 60 00 cmp %g1, 0 200411c: 32 80 00 0b bne,a 2004148 <== ALWAYS TAKEN 2004120: 90 06 40 08 add %i1, %o0, %o0 rtems_filesystem_freenode( &existing_loc ); 2004124: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2004128: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200412c: 02 80 00 51 be 2004270 <== NOT EXECUTED 2004130: 01 00 00 00 nop <== NOT EXECUTED 2004134: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2004138: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200413c: 12 80 00 4b bne 2004268 <== NOT EXECUTED 2004140: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 2004144: 30 80 00 4b b,a 2004270 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 2004148: 94 07 bf fc add %fp, -4, %o2 200414c: b2 07 bf d4 add %fp, -44, %i1 2004150: 9f c0 40 00 call %g1 2004154: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 2004158: a0 92 20 00 orcc %o0, 0, %l0 200415c: 02 80 00 11 be 20041a0 2004160: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &existing_loc ); 2004164: c2 07 bf f4 ld [ %fp + -12 ], %g1 2004168: 80 a0 60 00 cmp %g1, 0 200416c: 02 80 00 08 be 200418c <== NEVER TAKEN 2004170: 01 00 00 00 nop 2004174: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2004178: 80 a0 60 00 cmp %g1, 0 200417c: 02 80 00 04 be 200418c <== NEVER TAKEN 2004180: 01 00 00 00 nop 2004184: 9f c0 40 00 call %g1 2004188: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( result ); 200418c: 40 00 35 d4 call 20118dc <__errno> 2004190: b0 10 3f ff mov -1, %i0 2004194: e0 22 00 00 st %l0, [ %o0 ] 2004198: 81 c7 e0 08 ret 200419c: 81 e8 00 00 restore /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 20041a0: c4 07 bf e4 ld [ %fp + -28 ], %g2 20041a4: 80 a0 80 01 cmp %g2, %g1 20041a8: 02 80 00 1a be 2004210 20041ac: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &existing_loc ); 20041b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20041b4: 80 a0 60 00 cmp %g1, 0 20041b8: 22 80 00 09 be,a 20041dc <== NEVER TAKEN 20041bc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 20041c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20041c4: 80 a0 60 00 cmp %g1, 0 20041c8: 22 80 00 05 be,a 20041dc <== NEVER TAKEN 20041cc: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 20041d0: 9f c0 40 00 call %g1 20041d4: 90 07 bf e8 add %fp, -24, %o0 rtems_filesystem_freenode( &parent_loc ); 20041d8: c2 07 bf e0 ld [ %fp + -32 ], %g1 20041dc: 80 a0 60 00 cmp %g1, 0 20041e0: 02 80 00 08 be 2004200 <== NEVER TAKEN 20041e4: 01 00 00 00 nop 20041e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20041ec: 80 a0 60 00 cmp %g1, 0 20041f0: 02 80 00 04 be 2004200 <== NEVER TAKEN 20041f4: 01 00 00 00 nop 20041f8: 9f c0 40 00 call %g1 20041fc: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 2004200: 40 00 35 b7 call 20118dc <__errno> 2004204: b0 10 3f ff mov -1, %i0 2004208: 10 80 00 1d b 200427c 200420c: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 2004210: c2 00 60 08 ld [ %g1 + 8 ], %g1 2004214: 80 a0 60 00 cmp %g1, 0 2004218: 12 80 00 1c bne 2004288 <== ALWAYS TAKEN 200421c: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &existing_loc ); 2004220: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2004224: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004228: 22 80 00 09 be,a 200424c <== NOT EXECUTED 200422c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 2004230: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2004234: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004238: 22 80 00 05 be,a 200424c <== NOT EXECUTED 200423c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 2004240: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004244: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 2004248: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 200424c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004250: 02 80 00 08 be 2004270 <== NOT EXECUTED 2004254: 01 00 00 00 nop <== NOT EXECUTED 2004258: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200425c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004260: 02 80 00 04 be 2004270 <== NOT EXECUTED 2004264: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 2004268: 9f c0 40 00 call %g1 <== NOT EXECUTED 200426c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004270: 40 00 35 9b call 20118dc <__errno> <== NOT EXECUTED 2004274: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2004278: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200427c: c2 22 00 00 st %g1, [ %o0 ] 2004280: 81 c7 e0 08 ret 2004284: 81 e8 00 00 restore } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 2004288: 92 10 00 19 mov %i1, %o1 200428c: b2 07 bf e8 add %fp, -24, %i1 2004290: 9f c0 40 00 call %g1 2004294: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 2004298: c2 07 bf f4 ld [ %fp + -12 ], %g1 200429c: 80 a0 60 00 cmp %g1, 0 20042a0: 02 80 00 08 be 20042c0 <== NEVER TAKEN 20042a4: b0 10 00 08 mov %o0, %i0 20042a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20042ac: 80 a0 60 00 cmp %g1, 0 20042b0: 22 80 00 05 be,a 20042c4 <== NEVER TAKEN 20042b4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 20042b8: 9f c0 40 00 call %g1 20042bc: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 20042c0: c2 07 bf e0 ld [ %fp + -32 ], %g1 20042c4: 80 a0 60 00 cmp %g1, 0 20042c8: 02 80 00 08 be 20042e8 <== NEVER TAKEN 20042cc: 01 00 00 00 nop 20042d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20042d4: 80 a0 60 00 cmp %g1, 0 20042d8: 02 80 00 04 be 20042e8 <== NEVER TAKEN 20042dc: 01 00 00 00 nop 20042e0: 9f c0 40 00 call %g1 20042e4: 90 07 bf d4 add %fp, -44, %o0 return result; } 20042e8: 81 c7 e0 08 ret 20042ec: 81 e8 00 00 restore =============================================================================== 02019258 : off_t lseek( int fd, off_t offset, int whence ) { 2019258: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 201925c: 03 00 80 6c sethi %hi(0x201b000), %g1 2019260: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201b154 off_t lseek( int fd, off_t offset, int whence ) { 2019264: 96 10 00 1b mov %i3, %o3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 2019268: 80 a6 00 01 cmp %i0, %g1 off_t lseek( int fd, off_t offset, int whence ) { 201926c: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 2019270: 1a 80 00 0c bcc 20192a0 <== NEVER TAKEN 2019274: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 2019278: 03 00 80 6e sethi %hi(0x201b800), %g1 201927c: e0 00 63 50 ld [ %g1 + 0x350 ], %l0 ! 201bb50 2019280: 83 2e 20 06 sll %i0, 6, %g1 2019284: b1 2e 20 03 sll %i0, 3, %i0 2019288: b0 06 00 01 add %i0, %g1, %i0 201928c: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 2019290: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2019294: 80 88 61 00 btst 0x100, %g1 2019298: 32 80 00 06 bne,a 20192b0 <== ALWAYS TAKEN 201929c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 20192a0: 7f ff d6 fc call 200ee90 <__errno> <== NOT EXECUTED 20192a4: 01 00 00 00 nop <== NOT EXECUTED 20192a8: 10 80 00 1e b 2019320 <== NOT EXECUTED 20192ac: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 20192b0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 20192b4: 80 a0 60 00 cmp %g1, 0 20192b8: 12 80 00 06 bne 20192d0 <== ALWAYS TAKEN 20192bc: 80 a6 e0 01 cmp %i3, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 20192c0: 7f ff d6 f4 call 200ee90 <__errno> <== NOT EXECUTED 20192c4: 01 00 00 00 nop <== NOT EXECUTED 20192c8: 10 80 00 16 b 2019320 <== NOT EXECUTED 20192cc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 20192d0: 02 80 00 09 be 20192f4 20192d4: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 20192d8: 80 a6 e0 02 cmp %i3, 2 20192dc: 02 80 00 09 be 2019300 20192e0: 80 a6 e0 00 cmp %i3, 0 20192e4: 12 80 00 0c bne 2019314 20192e8: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; break; 20192ec: 10 80 00 12 b 2019334 20192f0: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] case SEEK_CUR: iop->offset += offset; 20192f4: 9a 86 80 13 addcc %i2, %l3, %o5 20192f8: 10 80 00 05 b 201930c 20192fc: 98 46 40 12 addx %i1, %l2, %o4 break; case SEEK_END: iop->offset = iop->size + offset; 2019300: d8 1c 20 08 ldd [ %l0 + 8 ], %o4 2019304: 9a 86 80 0d addcc %i2, %o5, %o5 2019308: 98 46 40 0c addx %i1, %o4, %o4 break; 201930c: 10 80 00 0a b 2019334 2019310: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] default: rtems_set_errno_and_return_minus_one( EINVAL ); 2019314: 7f ff d6 df call 200ee90 <__errno> 2019318: 01 00 00 00 nop 201931c: 82 10 20 16 mov 0x16, %g1 ! 16 2019320: c2 22 00 00 st %g1, [ %o0 ] 2019324: 11 3f ff ff sethi %hi(0xfffffc00), %o0 2019328: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 201932c: 10 80 00 0e b 2019364 2019330: 92 10 00 08 mov %o0, %o1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 2019334: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 2019338: 92 10 00 02 mov %g2, %o1 201933c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2019340: 94 10 00 03 mov %g3, %o2 2019344: 9f c0 40 00 call %g1 2019348: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 201934c: 80 a2 3f ff cmp %o0, -1 2019350: 12 80 00 06 bne 2019368 2019354: b2 10 00 09 mov %o1, %i1 2019358: 80 a2 7f ff cmp %o1, -1 201935c: 22 80 00 03 be,a 2019368 <== ALWAYS TAKEN 2019360: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 2019364: b2 10 00 09 mov %o1, %i1 2019368: 81 c7 e0 08 ret 201936c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200aeb0 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 200aeb0: 9d e3 bf a0 save %sp, -96, %sp 200aeb4: 03 00 80 6e sethi %hi(0x201b800), %g1 200aeb8: 82 10 63 60 or %g1, 0x360, %g1 ! 201bb60 200aebc: c4 00 60 04 ld [ %g1 + 4 ], %g2 200aec0: a0 10 00 18 mov %i0, %l0 200aec4: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 200aec8: 7f ff ff ed call 200ae7c 200aecc: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 200aed0: 80 a6 20 00 cmp %i0, 0 200aed4: 02 80 00 36 be 200afac <== NEVER TAKEN 200aed8: 03 00 80 6f sethi %hi(0x201bc00), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 200aedc: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 201bec0 <_System_state_Current> 200aee0: 80 a0 60 03 cmp %g1, 3 200aee4: 12 80 00 07 bne 200af00 200aee8: 03 00 80 6c sethi %hi(0x201b000), %g1 200aeec: 7f ff ff cb call 200ae18 200aef0: 01 00 00 00 nop 200aef4: 80 8a 20 ff btst 0xff, %o0 200aef8: 02 80 00 2d be 200afac <== NEVER TAKEN 200aefc: 03 00 80 6c sethi %hi(0x201b000), %g1 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 200af00: d0 00 61 60 ld [ %g1 + 0x160 ], %o0 ! 201b160 200af04: 92 10 00 10 mov %l0, %o1 200af08: 94 10 20 00 clr %o2 200af0c: 40 00 05 3f call 200c408 <_Protected_heap_Allocate_aligned_with_boundary> 200af10: 96 10 20 00 clr %o3 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 200af14: b0 92 20 00 orcc %o0, 0, %i0 200af18: 12 80 00 13 bne 200af64 200af1c: a2 10 00 18 mov %i0, %l1 if (rtems_malloc_sbrk_helpers) 200af20: 03 00 80 6e sethi %hi(0x201b800), %g1 200af24: c2 00 60 7c ld [ %g1 + 0x7c ], %g1 ! 201b87c 200af28: 80 a0 60 00 cmp %g1, 0 200af2c: 02 80 00 08 be 200af4c <== ALWAYS TAKEN 200af30: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 200af34: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 200af38: 9f c0 40 00 call %g1 <== NOT EXECUTED 200af3c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 200af40: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 200af44: 12 80 00 09 bne 200af68 <== NOT EXECUTED 200af48: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED errno = ENOMEM; 200af4c: 40 00 0f d1 call 200ee90 <__errno> 200af50: 01 00 00 00 nop 200af54: 82 10 20 0c mov 0xc, %g1 ! c 200af58: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 200af5c: 81 c7 e0 08 ret 200af60: 81 e8 00 00 restore } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 200af64: 03 00 80 6e sethi %hi(0x201b800), %g1 200af68: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 201b880 200af6c: 80 a0 60 00 cmp %g1, 0 200af70: 02 80 00 05 be 200af84 <== ALWAYS TAKEN 200af74: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 200af78: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 200af7c: 9f c0 40 00 call %g1 <== NOT EXECUTED 200af80: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 200af84: 03 00 80 6e sethi %hi(0x201b800), %g1 200af88: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201b878 200af8c: 80 a0 60 00 cmp %g1, 0 200af90: 02 bf ff f3 be 200af5c <== ALWAYS TAKEN 200af94: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 200af98: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 200af9c: 9f c0 40 00 call %g1 <== NOT EXECUTED 200afa0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200afa4: 81 c7 e0 08 ret <== NOT EXECUTED 200afa8: 81 e8 00 00 restore <== NOT EXECUTED 200afac: b0 10 20 00 clr %i0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 200afb0: 81 c7 e0 08 ret <== NOT EXECUTED 200afb4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200ae60 : 200ae60: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 200ae64: 11 00 80 70 sethi %hi(0x201c000), %o0 <== NOT EXECUTED 200ae68: 90 12 22 a8 or %o0, 0x2a8, %o0 ! 201c2a8 <== NOT EXECUTED 200ae6c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200ae70: 7f ff ed 85 call 2006484 <_Chain_Append> <== NOT EXECUTED 200ae74: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0200ae7c : void malloc_deferred_frees_process(void) { 200ae7c: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 200ae80: 21 00 80 70 sethi %hi(0x201c000), %l0 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) 200ae84: 10 80 00 04 b 200ae94 200ae88: a0 14 22 a8 or %l0, 0x2a8, %l0 ! 201c2a8 free(to_be_freed); 200ae8c: 7f ff fe a7 call 200a928 <== NOT EXECUTED 200ae90: 01 00 00 00 nop <== NOT EXECUTED 200ae94: 40 00 03 bd call 200bd88 <_Chain_Get> 200ae98: 90 10 00 10 mov %l0, %o0 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) 200ae9c: 80 a2 20 00 cmp %o0, 0 200aea0: 12 bf ff fb bne 200ae8c <== NEVER TAKEN 200aea4: 01 00 00 00 nop free(to_be_freed); } 200aea8: 81 c7 e0 08 ret 200aeac: 81 e8 00 00 restore =============================================================================== 0200ae18 : rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 200ae18: 03 00 80 6f sethi %hi(0x201bc00), %g1 200ae1c: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 201bd20 <_Thread_Dispatch_disable_level> 200ae20: 80 a0 60 00 cmp %g1, 0 200ae24: 12 80 00 06 bne 200ae3c <== NEVER TAKEN 200ae28: 90 10 20 00 clr %o0 return false; if ( _ISR_Nest_level > 0 ) 200ae2c: 03 00 80 6f sethi %hi(0x201bc00), %g1 200ae30: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 201bdbc <_ISR_Nest_level> #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 200ae34: 80 a0 00 01 cmp %g0, %g1 200ae38: 90 60 3f ff subx %g0, -1, %o0 if ( _ISR_Nest_level > 0 ) return false; return true; } 200ae3c: 81 c3 e0 08 retl =============================================================================== 02012158 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 2012158: 9d e3 bf a0 save %sp, -96, %sp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 201215c: 03 00 80 86 sethi %hi(0x2021800), %g1 2012160: d2 00 60 34 ld [ %g1 + 0x34 ], %o1 ! 2021834 2012164: 7f ff c6 36 call 2003a3c 2012168: 90 10 20 01 mov 1, %o0 if ( memory ) 201216c: 80 a2 20 00 cmp %o0, 0 2012170: 02 80 00 05 be 2012184 <== NEVER TAKEN 2012174: 03 00 80 86 sethi %hi(0x2021800), %g1 memfile_blocks_allocated++; 2012178: c4 00 61 dc ld [ %g1 + 0x1dc ], %g2 ! 20219dc 201217c: 84 00 a0 01 inc %g2 2012180: c4 20 61 dc st %g2, [ %g1 + 0x1dc ] return memory; } 2012184: 81 c7 e0 08 ret 2012188: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02012694 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 2012694: 9d e3 bf a0 save %sp, -96, %sp /* * 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) ) { 2012698: 7f ff f6 26 call 200ff30 201269c: 90 10 00 18 mov %i0, %o0 20126a0: 80 a2 20 00 cmp %o0, 0 20126a4: 12 80 00 13 bne 20126f0 20126a8: 01 00 00 00 nop 20126ac: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1 20126b0: 80 a0 60 00 cmp %g1, 0 20126b4: 12 80 00 0f bne 20126f0 <== NEVER TAKEN 20126b8: 03 00 80 84 sethi %hi(0x2021000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 20126bc: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 2021238 20126c0: c4 00 60 04 ld [ %g1 + 4 ], %g2 20126c4: 80 a0 80 18 cmp %g2, %i0 20126c8: 22 80 00 02 be,a 20126d0 <== NEVER TAKEN 20126cc: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 20126d0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 20126d4: 80 a0 60 06 cmp %g1, 6 20126d8: 02 80 00 04 be 20126e8 <== NEVER TAKEN 20126dc: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 20126e0: 7f ff ff 8c call 2012510 20126e4: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 20126e8: 7f ff c5 75 call 2003cbc 20126ec: 90 10 00 18 mov %i0, %o0 } return 0; } 20126f0: 81 c7 e0 08 ret 20126f4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02012448 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 2012448: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 201244c: 80 a6 20 00 cmp %i0, 0 2012450: 32 80 00 0a bne,a 2012478 <== ALWAYS TAKEN 2012454: e0 06 00 00 ld [ %i0 ], %l0 2012458: 11 00 80 81 sethi %hi(0x2020400), %o0 <== NOT EXECUTED 201245c: 15 00 80 81 sethi %hi(0x2020400), %o2 <== NOT EXECUTED 2012460: 17 00 80 81 sethi %hi(0x2020400), %o3 <== NOT EXECUTED 2012464: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2012468: 94 12 a3 70 or %o2, 0x370, %o2 <== NOT EXECUTED 201246c: 96 12 e2 58 or %o3, 0x258, %o3 <== NOT EXECUTED 2012470: 7f ff f6 13 call 200fcbc <__assert_func> <== NOT EXECUTED 2012474: 92 10 21 b3 mov 0x1b3, %o1 <== NOT EXECUTED * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 201247c: a2 10 20 00 clr %l1 if ( b[i] ) { 2012480: 80 a2 20 00 cmp %o0, 0 2012484: 02 80 00 05 be 2012498 2012488: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 201248c: 7f ff ff 2a call 2012134 2012490: 01 00 00 00 nop b[i] = 0; 2012494: c0 24 00 00 clr [ %l0 ] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 20124a4: d0 04 00 00 ld [ %l0 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 20124a8: 7f ff ff 23 call 2012134 20124ac: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 20124b0: c0 26 00 00 clr [ %i0 ] } 20124b4: 81 c7 e0 08 ret 20124b8: 81 e8 00 00 restore =============================================================================== 020129a8 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 20129a8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 20129ac: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 20129b0: 92 10 00 19 mov %i1, %o1 * 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 ) 20129b4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 20129b8: 80 a0 40 19 cmp %g1, %i1 20129bc: 06 80 00 09 bl 20129e0 <== NEVER TAKEN 20129c0: 94 10 00 1a mov %i2, %o2 20129c4: 80 a0 40 19 cmp %g1, %i1 20129c8: 32 80 00 0a bne,a 20129f0 <== NEVER TAKEN 20129cc: d2 24 20 50 st %o1, [ %l0 + 0x50 ] <== NOT EXECUTED 20129d0: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 20129d4: 80 a0 40 1a cmp %g1, %i2 20129d8: 3a 80 00 06 bcc,a 20129f0 <== ALWAYS TAKEN 20129dc: d2 24 20 50 st %o1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 20129e0: 7f ff ff 8f call 201281c <== NOT EXECUTED 20129e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20129e8: 81 c7 e0 08 ret <== NOT EXECUTED 20129ec: 91 e8 00 08 restore %g0, %o0, %o0 <== 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; 20129f0: d4 24 20 54 st %o2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 20129f4: d2 26 20 08 st %o1, [ %i0 + 8 ] 20129f8: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 20129fc: 90 07 bf f8 add %fp, -8, %o0 2012a00: 7f ff c4 d9 call 2003d64 2012a04: 92 10 20 00 clr %o1 2012a08: c2 07 bf f8 ld [ %fp + -8 ], %g1 2012a0c: 90 10 20 00 clr %o0 2012a10: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return 0; } 2012a14: b0 10 00 08 mov %o0, %i0 2012a18: 81 c7 e0 08 ret 2012a1c: 81 e8 00 00 restore =============================================================================== 02012a20 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 2012a20: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 2012a24: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 2012a28: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2012a2c: 80 a0 60 06 cmp %g1, 6 2012a30: 32 80 00 11 bne,a 2012a74 <== ALWAYS TAKEN 2012a34: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 2012a38: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 2012a3c: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 <== NOT EXECUTED 2012a40: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 2012a44: 14 80 00 09 bg 2012a68 <== NOT EXECUTED 2012a48: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 <== NOT EXECUTED 2012a4c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 2012a50: 32 80 00 1a bne,a 2012ab8 <== NOT EXECUTED 2012a54: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 2012a58: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 <== NOT EXECUTED 2012a5c: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 2012a60: 28 80 00 16 bleu,a 2012ab8 <== NOT EXECUTED 2012a64: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 2012a68: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 2012a6c: 10 80 00 12 b 2012ab4 <== NOT EXECUTED 2012a70: c4 26 20 14 st %g2, [ %i0 + 0x14 ] <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 2012a74: 90 10 00 10 mov %l0, %o0 2012a78: 92 10 00 02 mov %g2, %o1 2012a7c: 7f ff ff 68 call 201281c 2012a80: 94 10 00 03 mov %g3, %o2 2012a84: 80 a2 20 00 cmp %o0, 0 2012a88: 22 80 00 0a be,a 2012ab0 <== ALWAYS TAKEN 2012a8c: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 2012a90: 40 00 06 ff call 201468c <__errno> <== NOT EXECUTED 2012a94: 01 00 00 00 nop <== NOT EXECUTED 2012a98: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 2012a9c: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 2012aa0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012aa4: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 2012aa8: 10 80 00 04 b 2012ab8 <== NOT EXECUTED 2012aac: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 2012ab0: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 2012ab4: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 } 2012ab8: b2 10 00 03 mov %g3, %i1 2012abc: 81 c7 e0 08 ret 2012ac0: 91 e8 00 02 restore %g0, %g2, %o0 =============================================================================== 02012d8c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 2012d8c: 9d e3 bf a0 save %sp, -96, %sp the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 2012d90: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 2012d94: a2 10 00 18 mov %i0, %l1 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 2012d98: 80 88 62 04 btst 0x204, %g1 2012d9c: 02 80 00 19 be 2012e00 2012da0: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 && (the_jnode->type == IMFS_LINEAR_FILE)) { 2012da4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2012da8: 80 a0 60 06 cmp %g1, 6 2012dac: 32 80 00 16 bne,a 2012e04 <== ALWAYS TAKEN 2012db0: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 2012db4: d8 04 20 54 ld [ %l0 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 2012db8: d6 04 20 58 ld [ %l0 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 2012dbc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 2012dc0: c0 24 20 5c clr [ %l0 + 0x5c ] <== NOT EXECUTED && (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; the_jnode->info.file.size = 0; 2012dc4: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 2012dc8: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; 2012dcc: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 2012dd0: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 2012dd4: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 2012dd8: 02 80 00 0a be 2012e00 <== NOT EXECUTED 2012ddc: c2 24 20 4c st %g1, [ %l0 + 0x4c ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 2012de0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2012de4: 92 10 20 00 clr %o1 <== NOT EXECUTED 2012de8: 94 10 20 00 clr %o2 <== NOT EXECUTED 2012dec: 7f ff ff 36 call 2012ac4 <== NOT EXECUTED 2012df0: b0 10 3f ff mov -1, %i0 <== 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) 2012df4: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2012df8: 02 80 00 0a be 2012e20 <== NOT EXECUTED 2012dfc: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 2012e00: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 2012e04: 80 88 62 00 btst 0x200, %g1 2012e08: 02 80 00 04 be 2012e18 2012e0c: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 2012e10: c4 3c 60 10 std %g2, [ %l1 + 0x10 ] iop->size = the_jnode->info.file.size; 2012e14: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 2012e18: b0 10 20 00 clr %i0 2012e1c: c4 3c 60 08 std %g2, [ %l1 + 8 ] return 0; } 2012e20: 81 c7 e0 08 ret 2012e24: 81 e8 00 00 restore =============================================================================== 020126f8 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 20126f8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 20126fc: e0 06 40 00 ld [ %i1 ], %l0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 2012700: c2 04 20 08 ld [ %l0 + 8 ], %g1 2012704: 80 a0 60 00 cmp %g1, 0 2012708: 22 80 00 06 be,a 2012720 <== NEVER TAKEN 201270c: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED 2012710: 7f ff d6 fc call 2008300 <_Chain_Extract> 2012714: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 2012718: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 201271c: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 2012720: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 2012724: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 2012728: 90 07 bf f8 add %fp, -8, %o0 201272c: 7f ff c5 8e call 2003d64 2012730: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 2012734: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 2012738: 90 10 00 10 mov %l0, %o0 201273c: 7f ff ff d6 call 2012694 2012740: c2 24 20 48 st %g1, [ %l0 + 0x48 ] } 2012744: 81 c7 e0 08 ret 2012748: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200281c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 200281c: 9d e3 bf 88 save %sp, -120, %sp 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) ) ) 2002820: 03 00 00 3c sethi %hi(0xf000), %g1 2002824: 80 8e 40 01 btst %i1, %g1 2002828: 32 80 00 06 bne,a 2002840 <== ALWAYS TAKEN 200282c: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 2002830: 40 00 31 98 call 200ee90 <__errno> <== NOT EXECUTED 2002834: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002838: 10 80 00 32 b 2002900 <== NOT EXECUTED 200283c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 2002840: 80 a0 60 5c cmp %g1, 0x5c 2002844: 22 80 00 08 be,a 2002864 <== NEVER TAKEN 2002848: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 200284c: 80 a0 60 2f cmp %g1, 0x2f 2002850: 22 80 00 05 be,a 2002864 2002854: 03 00 80 6c sethi %hi(0x201b000), %g1 2002858: 80 a0 60 00 cmp %g1, 0 200285c: 12 80 00 09 bne 2002880 <== ALWAYS TAKEN 2002860: 03 00 80 6c sethi %hi(0x201b000), %g1 2002864: d2 00 63 10 ld [ %g1 + 0x310 ], %o1 ! 201b310 2002868: 90 07 bf e8 add %fp, -24, %o0 200286c: 92 02 60 18 add %o1, 0x18, %o1 2002870: 40 00 33 c4 call 200f780 2002874: 94 10 20 14 mov 0x14, %o2 2002878: 10 80 00 08 b 2002898 200287c: 90 10 20 01 mov 1, %o0 2002880: d2 00 63 10 ld [ %g1 + 0x310 ], %o1 2002884: 90 07 bf e8 add %fp, -24, %o0 2002888: 92 02 60 04 add %o1, 4, %o1 200288c: 40 00 33 bd call 200f780 2002890: 94 10 20 14 mov 0x14, %o2 2002894: 90 10 20 00 clr %o0 if ( !temp_loc.ops->evalformake_h ) { 2002898: c2 07 bf f4 ld [ %fp + -12 ], %g1 200289c: c2 00 60 04 ld [ %g1 + 4 ], %g1 20028a0: 80 a0 60 00 cmp %g1, 0 20028a4: 02 80 00 14 be 20028f4 <== NEVER TAKEN 20028a8: 90 06 00 08 add %i0, %o0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 20028ac: a0 07 bf e8 add %fp, -24, %l0 20028b0: 94 07 bf fc add %fp, -4, %o2 20028b4: 92 10 00 10 mov %l0, %o1 20028b8: 9f c0 40 00 call %g1 20028bc: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 20028c0: 80 a2 20 00 cmp %o0, 0 20028c4: 12 80 00 10 bne 2002904 20028c8: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !temp_loc.ops->mknod_h ) { 20028cc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 20028d0: 80 a0 60 00 cmp %g1, 0 20028d4: 12 80 00 0e bne 200290c <== ALWAYS TAKEN 20028d8: d0 07 bf fc ld [ %fp + -4 ], %o0 rtems_filesystem_freenode( &temp_loc ); 20028dc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 20028e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20028e4: 02 80 00 04 be 20028f4 <== NOT EXECUTED 20028e8: 01 00 00 00 nop <== NOT EXECUTED 20028ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 20028f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20028f4: 40 00 31 67 call 200ee90 <__errno> <== NOT EXECUTED 20028f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20028fc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2002900: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002904: 81 c7 e0 08 ret 2002908: 81 e8 00 00 restore } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 200290c: 92 10 00 19 mov %i1, %o1 2002910: 94 10 00 1a mov %i2, %o2 2002914: 96 10 00 1b mov %i3, %o3 2002918: 9f c0 40 00 call %g1 200291c: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 2002920: c2 07 bf f4 ld [ %fp + -12 ], %g1 2002924: 80 a0 60 00 cmp %g1, 0 2002928: 02 bf ff f7 be 2002904 <== NEVER TAKEN 200292c: b0 10 00 08 mov %o0, %i0 2002930: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2002934: 80 a0 60 00 cmp %g1, 0 2002938: 02 80 00 04 be 2002948 200293c: 01 00 00 00 nop 2002940: 9f c0 40 00 call %g1 2002944: 90 10 00 10 mov %l0, %o0 return result; } 2002948: 81 c7 e0 08 ret 200294c: 81 e8 00 00 restore =============================================================================== 02002970 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 2002970: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 2002974: 80 a6 60 00 cmp %i1, 0 2002978: 02 80 00 05 be 200298c 200297c: a0 10 00 18 mov %i0, %l0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 2002980: 80 a6 a0 01 cmp %i2, 1 2002984: 28 80 00 06 bleu,a 200299c 2002988: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 200298c: 40 00 31 41 call 200ee90 <__errno> 2002990: 01 00 00 00 nop 2002994: 10 80 00 14 b 20029e4 2002998: 82 10 20 16 mov 0x16, %g1 ! 16 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 200299c: a4 10 20 00 clr %l2 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 20029a0: 80 a0 60 00 cmp %g1, 0 20029a4: 02 80 00 4c be 2002ad4 <== NEVER TAKEN 20029a8: a6 10 20 00 clr %l3 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 20029ac: 80 a6 e0 00 cmp %i3, 0 20029b0: 02 80 00 05 be 20029c4 <== ALWAYS TAKEN 20029b4: 90 10 20 6c mov 0x6c, %o0 size += strlen( device ) + 1; 20029b8: 40 00 34 ee call 200fd70 <== NOT EXECUTED 20029bc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 20029c0: 90 02 20 6d add %o0, 0x6d, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 20029c4: 40 00 21 3b call 200aeb0 20029c8: 01 00 00 00 nop if ( !temp_mt_entry ) { 20029cc: a2 92 20 00 orcc %o0, 0, %l1 20029d0: 12 80 00 07 bne 20029ec <== ALWAYS TAKEN 20029d4: a6 10 00 11 mov %l1, %l3 errno = ENOMEM; 20029d8: 40 00 31 2e call 200ee90 <__errno> <== NOT EXECUTED 20029dc: 01 00 00 00 nop <== NOT EXECUTED 20029e0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20029e4: 10 80 00 75 b 2002bb8 20029e8: c2 22 00 00 st %g1, [ %o0 ] return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 20029ec: f4 24 60 30 st %i2, [ %l1 + 0x30 ] if ( device ) { 20029f0: 80 a6 e0 00 cmp %i3, 0 20029f4: 02 80 00 08 be 2002a14 <== ALWAYS TAKEN 20029f8: e2 24 60 2c st %l1, [ %l1 + 0x2c ] temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 20029fc: 90 04 60 6c add %l1, 0x6c, %o0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 2002a00: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 2002a04: 40 00 34 b8 call 200fce4 <== NOT EXECUTED 2002a08: d0 24 60 68 st %o0, [ %l1 + 0x68 ] <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 2002a0c: 10 80 00 04 b 2002a1c <== NOT EXECUTED 2002a10: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 2002a14: c0 24 60 68 clr [ %l1 + 0x68 ] /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 2002a18: 80 a7 20 00 cmp %i4, 0 2002a1c: 22 80 00 39 be,a 2002b00 2002a20: c0 24 60 1c clr [ %l1 + 0x1c ] if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 2002a24: 40 00 34 d3 call 200fd70 2002a28: 90 10 00 1c mov %i4, %o0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 2002a2c: a4 07 bf ec add %fp, -20, %l2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 2002a30: 92 10 00 08 mov %o0, %o1 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 2002a34: 94 10 20 07 mov 7, %o2 2002a38: 90 10 00 1c mov %i4, %o0 2002a3c: 96 10 00 12 mov %l2, %o3 2002a40: 7f ff fe d9 call 20025a4 2002a44: 98 10 20 01 mov 1, %o4 2002a48: 80 a2 3f ff cmp %o0, -1 2002a4c: 02 80 00 4b be 2002b78 <== NEVER TAKEN 2002a50: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 2002a54: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2002a58: 80 a0 60 00 cmp %g1, 0 2002a5c: 02 80 00 1e be 2002ad4 <== NEVER TAKEN 2002a60: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2002a64: 9f c0 40 00 call %g1 2002a68: 90 10 00 12 mov %l2, %o0 2002a6c: 80 a2 20 01 cmp %o0, 1 2002a70: 02 80 00 07 be 2002a8c 2002a74: 03 00 80 6e sethi %hi(0x201b800), %g1 errno = ENOTDIR; 2002a78: 40 00 31 06 call 200ee90 <__errno> 2002a7c: 01 00 00 00 nop 2002a80: 82 10 20 14 mov 0x14, %g1 ! 14 goto cleanup_and_bail; 2002a84: 10 80 00 3e b 2002b7c 2002a88: c2 22 00 00 st %g1, [ %o0 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2002a8c: 05 00 80 6e sethi %hi(0x201b800), %g2 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 2002a90: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 2002a94: 84 10 a3 94 or %g2, 0x394, %g2 !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 ) 2002a98: 10 80 00 06 b 2002ab0 2002a9c: c6 07 bf ec ld [ %fp + -20 ], %g3 2002aa0: 80 a1 00 03 cmp %g4, %g3 2002aa4: 02 80 00 08 be 2002ac4 2002aa8: 01 00 00 00 nop * 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 ) { 2002aac: c2 00 40 00 ld [ %g1 ], %g1 2002ab0: 80 a0 40 02 cmp %g1, %g2 2002ab4: 32 bf ff fb bne,a 2002aa0 2002ab8: c8 00 60 1c ld [ %g1 + 0x1c ], %g4 * 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; 2002abc: 10 80 00 42 b 2002bc4 2002ac0: c6 24 60 08 st %g3, [ %l1 + 8 ] /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 2002ac4: 40 00 30 f3 call 200ee90 <__errno> 2002ac8: a4 07 bf ec add %fp, -20, %l2 2002acc: 10 bf ff ee b 2002a84 2002ad0: 82 10 20 10 mov 0x10, %g1 * 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; 2002ad4: 40 00 30 ef call 200ee90 <__errno> <== NOT EXECUTED 2002ad8: 01 00 00 00 nop <== NOT EXECUTED 2002adc: 10 bf ff ea b 2002a84 <== NOT EXECUTED 2002ae0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 2002ae4: 90 10 00 11 mov %l1, %o0 2002ae8: 9f c0 40 00 call %g1 2002aec: a4 07 bf ec add %fp, -20, %l2 2002af0: 80 a2 20 00 cmp %o0, 0 2002af4: 22 80 00 0b be,a 2002b20 <== ALWAYS TAKEN 2002af8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2002afc: 30 80 00 20 b,a 2002b7c <== NOT EXECUTED * 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; 2002b00: c0 24 60 24 clr [ %l1 + 0x24 ] temp_mt_entry->mt_fs_root.ops = NULL; 2002b04: c0 24 60 28 clr [ %l1 + 0x28 ] temp_mt_entry->mt_point_node.node_access = NULL; 2002b08: c0 24 60 08 clr [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 2002b0c: c0 24 60 10 clr [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = NULL; 2002b10: c0 24 60 14 clr [ %l1 + 0x14 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 2002b14: c0 24 60 18 clr [ %l1 + 0x18 ] 2002b18: a4 10 20 00 clr %l2 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 2002b1c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2002b20: 9f c0 40 00 call %g1 2002b24: 90 10 00 11 mov %l1, %o0 2002b28: 80 a2 20 00 cmp %o0, 0 2002b2c: 02 80 00 0a be 2002b54 <== ALWAYS TAKEN 2002b30: 11 00 80 6e sethi %hi(0x201b800), %o0 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 2002b34: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 2002b38: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 2002b3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002b40: 02 80 00 0f be 2002b7c <== NOT EXECUTED 2002b44: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 2002b48: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002b4c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2002b50: 30 80 00 0b b,a 2002b7c <== 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 ); 2002b54: 92 10 00 11 mov %l1, %o1 2002b58: 40 00 0e 4b call 2006484 <_Chain_Append> 2002b5c: 90 12 23 90 or %o0, 0x390, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 2002b60: 80 a4 20 00 cmp %l0, 0 2002b64: 02 80 00 03 be 2002b70 <== NEVER TAKEN 2002b68: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 2002b6c: e2 24 00 00 st %l1, [ %l0 ] 2002b70: 81 c7 e0 08 ret 2002b74: 81 e8 00 00 restore 2002b78: a4 10 20 00 clr %l2 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 2002b7c: 40 00 1f 6b call 200a928 2002b80: 90 10 00 13 mov %l3, %o0 if ( loc_to_free ) 2002b84: 80 a4 a0 00 cmp %l2, 0 2002b88: 02 bf ff fa be 2002b70 <== NEVER TAKEN 2002b8c: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( loc_to_free ); 2002b90: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 2002b94: 80 a0 60 00 cmp %g1, 0 2002b98: 02 80 00 09 be 2002bbc <== NEVER TAKEN 2002b9c: 01 00 00 00 nop 2002ba0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2002ba4: 80 a0 60 00 cmp %g1, 0 2002ba8: 02 80 00 05 be 2002bbc <== NEVER TAKEN 2002bac: 01 00 00 00 nop 2002bb0: 9f c0 40 00 call %g1 2002bb4: 90 10 00 12 mov %l2, %o0 2002bb8: b0 10 3f ff mov -1, %i0 return -1; } 2002bbc: 81 c7 e0 08 ret 2002bc0: 81 e8 00 00 restore * 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; 2002bc4: c6 07 bf f4 ld [ %fp + -12 ], %g3 temp_mt_entry->mt_point_node.ops = loc.ops; 2002bc8: c4 07 bf f8 ld [ %fp + -8 ], %g2 * 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; 2002bcc: c6 24 60 10 st %g3, [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2002bd0: c6 07 bf fc ld [ %fp + -4 ], %g3 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 2002bd4: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 */ 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; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2002bd8: c6 24 60 18 st %g3, [ %l1 + 0x18 ] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 2002bdc: 80 a0 60 00 cmp %g1, 0 2002be0: 12 bf ff c1 bne 2002ae4 <== ALWAYS TAKEN 2002be4: c4 24 60 14 st %g2, [ %l1 + 0x14 ] errno = ENOTSUP; 2002be8: 10 bf ff bb b 2002ad4 <== NOT EXECUTED 2002bec: a4 07 bf ec add %fp, -20, %l2 <== NOT EXECUTED =============================================================================== 0201a1a4 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 201a1a4: 9d e3 bf a0 save %sp, -96, %sp Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 201a1a8: 40 00 00 72 call 201a370 <_Timespec_Is_valid> 201a1ac: 90 10 00 18 mov %i0, %o0 201a1b0: 80 8a 20 ff btst 0xff, %o0 201a1b4: 02 80 00 0a be 201a1dc 201a1b8: 01 00 00 00 nop * 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 ) 201a1bc: c2 06 00 00 ld [ %i0 ], %g1 201a1c0: 80 a0 60 00 cmp %g1, 0 201a1c4: 06 80 00 06 bl 201a1dc <== NEVER TAKEN 201a1c8: 01 00 00 00 nop 201a1cc: c2 06 20 04 ld [ %i0 + 4 ], %g1 201a1d0: 80 a0 60 00 cmp %g1, 0 201a1d4: 16 80 00 06 bge 201a1ec <== ALWAYS TAKEN 201a1d8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 201a1dc: 7f ff d4 56 call 200f334 <__errno> 201a1e0: 01 00 00 00 nop 201a1e4: 10 80 00 3c b 201a2d4 201a1e8: 82 10 20 16 mov 0x16, %g1 ! 16 ticks = _Timespec_To_ticks( rqtp ); 201a1ec: 7f ff ca e8 call 200cd8c <_Timespec_To_ticks> 201a1f0: 90 10 00 18 mov %i0, %o0 * 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 ) { 201a1f4: b0 92 20 00 orcc %o0, 0, %i0 201a1f8: 12 80 00 10 bne 201a238 201a1fc: 03 00 80 73 sethi %hi(0x201cc00), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 201a200: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 ! 201cda0 <_Thread_Dispatch_disable_level> 201a204: 84 00 a0 01 inc %g2 201a208: c4 20 61 a0 st %g2, [ %g1 + 0x1a0 ] _Thread_Disable_dispatch(); _Thread_Yield_processor(); 201a20c: 7f ff bb 0f call 2008e48 <_Thread_Yield_processor> 201a210: 01 00 00 00 nop _Thread_Enable_dispatch(); 201a214: 7f ff b7 a4 call 20080a4 <_Thread_Enable_dispatch> 201a218: 01 00 00 00 nop if ( rmtp ) { 201a21c: 80 a6 60 00 cmp %i1, 0 201a220: 02 80 00 30 be 201a2e0 201a224: 01 00 00 00 nop rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 201a228: c0 26 60 04 clr [ %i1 + 4 ] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 201a22c: c0 26 40 00 clr [ %i1 ] 201a230: 81 c7 e0 08 ret 201a234: 81 e8 00 00 restore 201a238: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 201a23c: 84 00 a0 01 inc %g2 201a240: c4 20 61 a0 st %g2, [ %g1 + 0x1a0 ] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 201a244: 21 00 80 73 sethi %hi(0x201cc00), %l0 201a248: d0 04 22 60 ld [ %l0 + 0x260 ], %o0 ! 201ce60 <_Thread_Executing> 201a24c: 13 04 00 00 sethi %hi(0x10000000), %o1 201a250: 7f ff b9 fc call 2008a40 <_Thread_Set_state> 201a254: 92 12 60 08 or %o1, 8, %o1 ! 10000008 _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, 201a258: c2 04 22 60 ld [ %l0 + 0x260 ], %g1 201a25c: 11 00 80 73 sethi %hi(0x201cc00), %o0 _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 201a260: c4 00 60 08 ld [ %g1 + 8 ], %g2 201a264: 90 12 22 80 or %o0, 0x280, %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 201a268: c4 20 60 68 st %g2, [ %g1 + 0x68 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 201a26c: 92 00 60 48 add %g1, 0x48, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 201a270: 05 00 80 1f sethi %hi(0x2007c00), %g2 201a274: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 2007ee0 <_Thread_Delay_ended> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 201a278: c0 20 60 50 clr [ %g1 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 201a27c: c0 20 60 6c clr [ %g1 + 0x6c ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 201a280: f0 20 60 54 st %i0, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 201a284: 7f ff bc 20 call 2009304 <_Watchdog_Insert> 201a288: c4 20 60 64 st %g2, [ %g1 + 0x64 ] _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 201a28c: 7f ff b7 86 call 20080a4 <_Thread_Enable_dispatch> 201a290: 01 00 00 00 nop /* calculate time remaining */ if ( rmtp ) { 201a294: 80 a6 60 00 cmp %i1, 0 201a298: 02 80 00 12 be 201a2e0 201a29c: c2 04 22 60 ld [ %l0 + 0x260 ], %g1 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 201a2a0: 92 10 00 19 mov %i1, %o1 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 201a2a4: c4 00 60 60 ld [ %g1 + 0x60 ], %g2 201a2a8: c2 00 60 5c ld [ %g1 + 0x5c ], %g1 201a2ac: 82 20 40 02 sub %g1, %g2, %g1 201a2b0: b0 00 40 18 add %g1, %i0, %i0 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 201a2b4: 40 00 00 1a call 201a31c <_Timespec_From_ticks> 201a2b8: 90 10 00 18 mov %i0, %o0 */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 201a2bc: 80 a6 20 00 cmp %i0, 0 201a2c0: 02 80 00 08 be 201a2e0 201a2c4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); 201a2c8: 7f ff d4 1b call 200f334 <__errno> 201a2cc: 01 00 00 00 nop 201a2d0: 82 10 20 04 mov 4, %g1 ! 4 201a2d4: c2 22 00 00 st %g1, [ %o0 ] 201a2d8: 81 c7 e0 08 ret 201a2dc: 91 e8 3f ff restore %g0, -1, %o0 #endif } return 0; } 201a2e0: 81 c7 e0 08 ret 201a2e4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02002bf8 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 2002bf8: 9d e3 bf a0 save %sp, -96, %sp /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 2002bfc: 80 a6 00 19 cmp %i0, %i1 2002c00: 32 80 00 04 bne,a 2002c10 2002c04: e0 06 61 64 ld [ %i1 + 0x164 ], %l0 ptr = _REENT; 2002c08: 03 00 80 6c sethi %hi(0x201b000), %g1 2002c0c: e0 00 63 b8 ld [ %g1 + 0x3b8 ], %l0 ! 201b3b8 <_impure_ptr> } else { ptr = deleted_task->libc_reent; } if (ptr && ptr != _global_impure_ptr) { 2002c10: 80 a4 20 00 cmp %l0, 0 2002c14: 02 80 00 0b be 2002c40 <== NEVER TAKEN 2002c18: 03 00 80 6b sethi %hi(0x201ac00), %g1 2002c1c: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 201ac70 <_global_impure_ptr> 2002c20: 80 a4 00 01 cmp %l0, %g1 2002c24: 02 80 00 07 be 2002c40 2002c28: 13 00 80 0b sethi %hi(0x2002c00), %o1 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 2002c2c: 90 10 00 10 mov %l0, %o0 2002c30: 40 00 32 b2 call 200f6f8 <_fwalk> 2002c34: 92 12 60 5c or %o1, 0x5c, %o1 #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 2002c38: 40 00 19 3a call 2009120 <_Workspace_Free> 2002c3c: 90 10 00 10 mov %l0, %o0 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 2002c40: 80 a6 00 19 cmp %i0, %i1 2002c44: 12 80 00 04 bne 2002c54 2002c48: c0 26 61 64 clr [ %i1 + 0x164 ] _REENT = 0; 2002c4c: 03 00 80 6c sethi %hi(0x201b000), %g1 2002c50: c0 20 63 b8 clr [ %g1 + 0x3b8 ] ! 201b3b8 <_impure_ptr> 2002c54: 81 c7 e0 08 ret 2002c58: 81 e8 00 00 restore =============================================================================== 02002c5c : */ int newlib_free_buffers( FILE *fp ) { 2002c5c: 9d e3 bf a0 save %sp, -96, %sp switch ( fileno(fp) ) { 2002c60: 40 00 31 a6 call 200f2f8 2002c64: 90 10 00 18 mov %i0, %o0 2002c68: 80 a2 20 02 cmp %o0, 2 2002c6c: 18 80 00 0e bgu 2002ca4 <== NEVER TAKEN 2002c70: 01 00 00 00 nop case 0: case 1: case 2: if (fp->_flags & __SMBF) { 2002c74: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 2002c78: 80 88 60 80 btst 0x80, %g1 2002c7c: 02 80 00 0c be 2002cac <== ALWAYS TAKEN 2002c80: 01 00 00 00 nop free( fp->_bf._base ); 2002c84: 40 00 1f 29 call 200a928 <== NOT EXECUTED 2002c88: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 2002c8c: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 2002c90: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 2002c94: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 2002c98: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 2002c9c: 10 80 00 04 b 2002cac <== NOT EXECUTED 2002ca0: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 2002ca4: 40 00 30 d3 call 200eff0 <== NOT EXECUTED 2002ca8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 2002cac: 81 c7 e0 08 ret 2002cb0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02002dd8 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 2002dd8: 9d e3 bf a0 save %sp, -96, %sp rtems_device_driver status; if ( !initialized ) { 2002ddc: 03 00 80 82 sethi %hi(0x2020800), %g1 2002de0: c4 48 60 7c ldsb [ %g1 + 0x7c ], %g2 ! 202087c 2002de4: 80 a0 a0 00 cmp %g2, 0 2002de8: 12 80 00 0e bne 2002e20 2002dec: 84 10 20 01 mov 1, %g2 initialized = 1; status = rtems_io_register_name( 2002df0: 11 00 80 78 sethi %hi(0x201e000), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 2002df4: c4 28 60 7c stb %g2, [ %g1 + 0x7c ] status = rtems_io_register_name( 2002df8: 90 12 23 e0 or %o0, 0x3e0, %o0 2002dfc: 92 10 00 18 mov %i0, %o1 2002e00: 40 00 00 50 call 2002f40 2002e04: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 2002e08: 80 a2 20 00 cmp %o0, 0 2002e0c: 02 80 00 04 be 2002e1c <== ALWAYS TAKEN 2002e10: 03 00 80 82 sethi %hi(0x2020800), %g1 rtems_fatal_error_occurred(status); 2002e14: 40 00 10 7e call 200700c <== NOT EXECUTED 2002e18: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 2002e1c: f0 20 63 2c st %i0, [ %g1 + 0x32c ] } return RTEMS_SUCCESSFUL; } 2002e20: 81 c7 e0 08 ret 2002e24: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02002db4 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 2002db4: 80 a2 a0 00 cmp %o2, 0 2002db8: 02 80 00 04 be 2002dc8 <== ALWAYS TAKEN 2002dbc: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 2002dc0: c2 02 a0 14 ld [ %o2 + 0x14 ], %g1 <== NOT EXECUTED 2002dc4: c2 22 a0 1c st %g1, [ %o2 + 0x1c ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 2002dc8: 81 c3 e0 08 retl 2002dcc: 90 10 20 00 clr %o0 =============================================================================== 02002ed4 : int open( const char *pathname, int flags, ... ) { 2002ed4: 9d e3 bf 88 save %sp, -120, %sp eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); 2002ed8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2002edc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2002ee0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2002ee4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 2002ee8: a2 06 60 01 add %i1, 1, %l1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 2002eec: 80 8c 60 02 btst 2, %l1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 2002ef0: a2 0c 60 01 and %l1, 1, %l1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 2002ef4: 02 80 00 03 be 2002f00 2002ef8: a3 2c 60 02 sll %l1, 2, %l1 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 2002efc: a2 14 60 02 or %l1, 2, %l1 va_start(ap, flags); mode = va_arg( ap, int ); 2002f00: 82 07 a0 50 add %fp, 0x50, %g1 2002f04: e4 07 a0 4c ld [ %fp + 0x4c ], %l2 2002f08: c2 27 bf fc st %g1, [ %fp + -4 ] * 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(); 2002f0c: 40 00 1f 82 call 200ad14 2002f10: a6 10 20 17 mov 0x17, %l3 if ( iop == 0 ) { 2002f14: a0 92 20 00 orcc %o0, 0, %l0 2002f18: 02 80 00 98 be 2003178 2002f1c: 01 00 00 00 nop /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 2002f20: 40 00 33 94 call 200fd70 2002f24: 90 10 00 18 mov %i0, %o0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 2002f28: 94 10 00 11 mov %l1, %o2 pathname, strlen( pathname ), eval_flags, &loc, true ); 2002f2c: 92 10 00 08 mov %o0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 2002f30: a2 07 bf e8 add %fp, -24, %l1 2002f34: 90 10 00 18 mov %i0, %o0 2002f38: 96 10 00 11 mov %l1, %o3 2002f3c: 7f ff fd 9a call 20025a4 2002f40: 98 10 20 01 mov 1, %o4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 2002f44: 80 a2 3f ff cmp %o0, -1 2002f48: 12 80 00 22 bne 2002fd0 2002f4c: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( errno != ENOENT ) { 2002f50: 40 00 2f d0 call 200ee90 <__errno> 2002f54: a8 10 20 00 clr %l4 2002f58: c2 02 00 00 ld [ %o0 ], %g1 2002f5c: 80 a0 60 02 cmp %g1, 2 2002f60: 12 80 00 3e bne 2003058 2002f64: 80 8e 62 00 btst 0x200, %i1 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 2002f68: a8 10 20 00 clr %l4 2002f6c: 02 80 00 71 be 2003130 2002f70: a6 10 20 02 mov 2, %l3 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 2002f74: 13 00 00 20 sethi %hi(0x8000), %o1 2002f78: 90 10 00 18 mov %i0, %o0 2002f7c: 92 14 80 09 or %l2, %o1, %o1 2002f80: 94 10 20 00 clr %o2 2002f84: 7f ff fe 26 call 200281c 2002f88: 96 10 20 00 clr %o3 if ( rc ) { 2002f8c: 80 a2 20 00 cmp %o0, 0 2002f90: 12 80 00 32 bne 2003058 <== NEVER TAKEN 2002f94: 01 00 00 00 nop rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 2002f98: 40 00 33 76 call 200fd70 2002f9c: 90 10 00 18 mov %i0, %o0 2002fa0: 96 10 00 11 mov %l1, %o3 2002fa4: 92 10 00 08 mov %o0, %o1 2002fa8: 94 10 20 00 clr %o2 2002fac: 90 10 00 18 mov %i0, %o0 2002fb0: 98 10 20 01 mov 1, %o4 2002fb4: 7f ff fd 7c call 20025a4 2002fb8: a8 10 20 00 clr %l4 if ( status != 0 ) { /* The file did not exist */ 2002fbc: 80 a2 20 00 cmp %o0, 0 2002fc0: 12 80 00 5c bne 2003130 <== NEVER TAKEN 2002fc4: a6 10 20 0d mov 0xd, %l3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 2002fc8: 10 80 00 07 b 2002fe4 2002fcc: c2 07 bf f0 ld [ %fp + -16 ], %g1 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 2002fd0: a8 10 00 11 mov %l1, %l4 2002fd4: 80 a0 6a 00 cmp %g1, 0xa00 2002fd8: 02 80 00 56 be 2003130 2002fdc: a6 10 20 11 mov 0x11, %l3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 2002fe0: c2 07 bf f0 ld [ %fp + -16 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 2002fe4: e2 04 20 18 ld [ %l0 + 0x18 ], %l1 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 2002fe8: c2 24 20 40 st %g1, [ %l0 + 0x40 ] iop->file_info = loc.node_access; 2002fec: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 2002ff0: 90 10 00 19 mov %i1, %o0 2002ff4: 40 00 1f 7c call 200ade4 2002ff8: c2 24 20 3c st %g1, [ %l0 + 0x3c ] 2002ffc: 90 12 00 11 or %o0, %l1, %o0 iop->pathinfo = loc; 2003000: 94 10 20 14 mov 0x14, %o2 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 2003004: d0 24 20 18 st %o0, [ %l0 + 0x18 ] iop->pathinfo = loc; 2003008: a2 07 bf e8 add %fp, -24, %l1 200300c: 90 04 20 1c add %l0, 0x1c, %o0 2003010: 40 00 31 dc call 200f780 2003014: 92 10 00 11 mov %l1, %o1 if ( !iop->handlers || !iop->handlers->open_h ) { 2003018: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 200301c: 80 a0 60 00 cmp %g1, 0 2003020: 22 80 00 6a be,a 20031c8 <== NEVER TAKEN 2003024: a8 07 bf e8 add %fp, -24, %l4 <== NOT EXECUTED 2003028: c2 00 40 00 ld [ %g1 ], %g1 200302c: 80 a0 60 00 cmp %g1, 0 2003030: 02 80 00 65 be 20031c4 <== NEVER TAKEN 2003034: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 2003038: 96 10 00 12 mov %l2, %o3 200303c: 90 10 00 10 mov %l0, %o0 2003040: 9f c0 40 00 call %g1 2003044: 94 10 00 19 mov %i1, %o2 if ( rc ) { 2003048: 80 a2 20 00 cmp %o0, 0 200304c: 02 80 00 07 be 2003068 2003050: 80 8e 64 00 btst 0x400, %i1 rc = errno; 2003054: a8 10 00 11 mov %l1, %l4 2003058: 40 00 2f 8e call 200ee90 <__errno> 200305c: 01 00 00 00 nop goto done; 2003060: 10 80 00 31 b 2003124 2003064: e6 02 00 00 ld [ %o0 ], %l3 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 2003068: 02 80 00 49 be 200318c 200306c: 03 00 80 6e sethi %hi(0x201b800), %g1 rc = ftruncate( iop - rtems_libio_iops, 0 ); 2003070: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 201bb50 2003074: 92 10 20 00 clr %o1 2003078: 82 24 00 01 sub %l0, %g1, %g1 200307c: 83 38 60 03 sra %g1, 3, %g1 2003080: 87 28 60 06 sll %g1, 6, %g3 2003084: 85 28 60 03 sll %g1, 3, %g2 2003088: 84 20 c0 02 sub %g3, %g2, %g2 200308c: 87 28 a0 06 sll %g2, 6, %g3 2003090: 84 00 80 03 add %g2, %g3, %g2 2003094: 84 00 80 01 add %g2, %g1, %g2 2003098: 91 28 a0 0f sll %g2, 0xf, %o0 200309c: 84 22 00 02 sub %o0, %g2, %g2 20030a0: 94 10 20 00 clr %o2 20030a4: 91 28 a0 03 sll %g2, 3, %o0 20030a8: 40 00 1e 4a call 200a9d0 20030ac: 90 02 00 01 add %o0, %g1, %o0 if ( rc ) { 20030b0: a6 92 20 00 orcc %o0, 0, %l3 20030b4: 02 80 00 36 be 200318c <== ALWAYS TAKEN 20030b8: 03 00 80 6e sethi %hi(0x201b800), %g1 if(errno) rc = errno; 20030bc: 40 00 2f 75 call 200ee90 <__errno> <== NOT EXECUTED 20030c0: 01 00 00 00 nop <== NOT EXECUTED 20030c4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 20030c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20030cc: 02 80 00 06 be 20030e4 <== NOT EXECUTED 20030d0: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 20030d4: 40 00 2f 6f call 200ee90 <__errno> <== NOT EXECUTED 20030d8: 01 00 00 00 nop <== NOT EXECUTED 20030dc: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED close( iop - rtems_libio_iops ); 20030e0: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 20030e4: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 201bb50 <== NOT EXECUTED 20030e8: a8 10 20 00 clr %l4 <== NOT EXECUTED 20030ec: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 20030f0: 83 3c 20 03 sra %l0, 3, %g1 <== NOT EXECUTED 20030f4: 87 28 60 06 sll %g1, 6, %g3 <== NOT EXECUTED 20030f8: 85 28 60 03 sll %g1, 3, %g2 <== NOT EXECUTED 20030fc: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 2003100: 87 28 a0 06 sll %g2, 6, %g3 <== NOT EXECUTED 2003104: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED 2003108: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 200310c: 91 28 a0 0f sll %g2, 0xf, %o0 <== NOT EXECUTED 2003110: 84 22 00 02 sub %o0, %g2, %g2 <== NOT EXECUTED 2003114: a0 10 20 00 clr %l0 <== NOT EXECUTED 2003118: 91 28 a0 03 sll %g2, 3, %o0 <== NOT EXECUTED 200311c: 40 00 1d d4 call 200a86c <== NOT EXECUTED 2003120: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 2003124: 80 a4 e0 00 cmp %l3, 0 2003128: 02 80 00 19 be 200318c <== NEVER TAKEN 200312c: 03 00 80 6e sethi %hi(0x201b800), %g1 if ( iop ) 2003130: 80 a4 20 00 cmp %l0, 0 2003134: 02 80 00 05 be 2003148 <== NEVER TAKEN 2003138: 80 a5 20 00 cmp %l4, 0 rtems_libio_free( iop ); 200313c: 40 00 1e de call 200acb4 2003140: 90 10 00 10 mov %l0, %o0 if ( loc_to_free ) 2003144: 80 a5 20 00 cmp %l4, 0 2003148: 02 80 00 0c be 2003178 200314c: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 2003150: c2 05 20 0c ld [ %l4 + 0xc ], %g1 2003154: 80 a0 60 00 cmp %g1, 0 2003158: 02 80 00 08 be 2003178 <== NEVER TAKEN 200315c: 01 00 00 00 nop 2003160: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2003164: 80 a0 60 00 cmp %g1, 0 2003168: 02 80 00 04 be 2003178 <== NEVER TAKEN 200316c: 01 00 00 00 nop 2003170: 9f c0 40 00 call %g1 2003174: 90 10 00 14 mov %l4, %o0 rtems_set_errno_and_return_minus_one( rc ); 2003178: 40 00 2f 46 call 200ee90 <__errno> 200317c: b0 10 3f ff mov -1, %i0 2003180: e6 22 00 00 st %l3, [ %o0 ] 2003184: 81 c7 e0 08 ret 2003188: 81 e8 00 00 restore } return iop - rtems_libio_iops; 200318c: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 2003190: a0 24 00 01 sub %l0, %g1, %l0 2003194: a1 3c 20 03 sra %l0, 3, %l0 2003198: 85 2c 20 06 sll %l0, 6, %g2 200319c: 83 2c 20 03 sll %l0, 3, %g1 20031a0: 82 20 80 01 sub %g2, %g1, %g1 20031a4: 85 28 60 06 sll %g1, 6, %g2 20031a8: 82 00 40 02 add %g1, %g2, %g1 20031ac: 82 00 40 10 add %g1, %l0, %g1 20031b0: b1 28 60 0f sll %g1, 0xf, %i0 20031b4: b0 26 00 01 sub %i0, %g1, %i0 20031b8: b1 2e 20 03 sll %i0, 3, %i0 } 20031bc: 81 c7 e0 08 ret 20031c0: 91 ee 00 10 restore %i0, %l0, %o0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 20031c4: a8 07 bf e8 add %fp, -24, %l4 <== NOT EXECUTED 20031c8: 10 bf ff da b 2003130 <== NOT EXECUTED 20031cc: a6 10 20 86 mov 0x86, %l3 <== NOT EXECUTED =============================================================================== 02002e60 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 2002e60: 9d e3 bf a0 save %sp, -96, %sp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 2002e64: 21 00 80 68 sethi %hi(0x201a000), %l0 2002e68: 92 10 20 00 clr %o1 2002e6c: 90 14 21 38 or %l0, 0x138, %o0 2002e70: 40 00 00 19 call 2002ed4 2002e74: 94 10 20 00 clr %o2 2002e78: 80 a2 3f ff cmp %o0, -1 2002e7c: 02 80 00 14 be 2002ecc 2002e80: 90 14 21 38 or %l0, 0x138, %o0 /* * 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) 2002e84: 92 10 20 01 mov 1, %o1 2002e88: 40 00 00 13 call 2002ed4 2002e8c: 94 10 20 00 clr %o2 2002e90: 80 a2 3f ff cmp %o0, -1 2002e94: 32 80 00 05 bne,a 2002ea8 <== ALWAYS TAKEN 2002e98: 90 14 21 38 or %l0, 0x138, %o0 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 2002e9c: 11 15 55 11 sethi %hi(0x55544400), %o0 <== NOT EXECUTED 2002ea0: 10 80 00 09 b 2002ec4 <== NOT EXECUTED 2002ea4: 90 12 20 31 or %o0, 0x31, %o0 ! 55544431 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 2002ea8: 92 10 20 01 mov 1, %o1 2002eac: 40 00 00 0a call 2002ed4 2002eb0: 94 10 20 00 clr %o2 2002eb4: 80 a2 3f ff cmp %o0, -1 2002eb8: 12 80 00 05 bne 2002ecc <== ALWAYS TAKEN 2002ebc: 11 15 55 11 sethi %hi(0x55544400), %o0 rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 2002ec0: 90 12 20 32 or %o0, 0x32, %o0 ! 55544432 <== NOT EXECUTED 2002ec4: 40 00 0c 95 call 2006118 <== NOT EXECUTED 2002ec8: 01 00 00 00 nop <== NOT EXECUTED 2002ecc: 81 c7 e0 08 ret 2002ed0: 81 e8 00 00 restore =============================================================================== 02003950 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2003950: 9d e3 bf a0 save %sp, -96, %sp int i; if (tty->termios.c_oflag & OPOST) { 2003954: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 2003958: 80 88 60 01 btst 1, %g1 200395c: 02 80 00 5a be 2003ac4 <== NEVER TAKEN 2003960: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 2003964: 84 0e 20 ff and %i0, 0xff, %g2 2003968: 80 a0 a0 09 cmp %g2, 9 200396c: 22 80 00 2b be,a 2003a18 2003970: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 2003974: 18 80 00 07 bgu 2003990 <== ALWAYS TAKEN 2003978: 80 a0 a0 0a cmp %g2, 0xa 200397c: 80 a0 a0 08 cmp %g2, 8 <== NOT EXECUTED 2003980: 12 80 00 3a bne 2003a68 <== NOT EXECUTED 2003984: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 2003988: 10 80 00 33 b 2003a54 <== NOT EXECUTED 200398c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 2003990: 02 80 00 06 be 20039a8 2003994: 80 a0 a0 0d cmp %g2, 0xd 2003998: 32 80 00 34 bne,a 2003a68 <== ALWAYS TAKEN 200399c: 80 88 60 02 btst 2, %g1 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 20039a0: 10 80 00 10 b 20039e0 <== NOT EXECUTED 20039a4: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 20039a8: 80 88 60 20 btst 0x20, %g1 20039ac: 32 80 00 02 bne,a 20039b4 <== NEVER TAKEN 20039b0: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 20039b4: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 20039b8: 80 88 60 04 btst 4, %g1 20039bc: 02 80 00 43 be 2003ac8 <== NEVER TAKEN 20039c0: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 20039c4: 11 00 80 68 sethi %hi(0x201a000), %o0 20039c8: 92 10 20 01 mov 1, %o1 20039cc: 90 12 21 48 or %o0, 0x148, %o0 20039d0: 7f ff ff 94 call 2003820 20039d4: 94 10 00 19 mov %i1, %o2 c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 20039d8: 10 80 00 3b b 2003ac4 20039dc: c0 26 60 28 clr [ %i1 + 0x28 ] tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 20039e0: 02 80 00 06 be 20039f8 <== NOT EXECUTED 20039e4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 20039e8: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED 20039ec: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20039f0: 02 80 00 17 be 2003a4c <== NOT EXECUTED 20039f4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 20039f8: 22 80 00 33 be,a 2003ac4 <== NOT EXECUTED 20039fc: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 2003a00: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 2003a04: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003a08: 02 80 00 2f be 2003ac4 <== NOT EXECUTED 2003a0c: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; break; 2003a10: 10 80 00 2d b 2003ac4 <== NOT EXECUTED 2003a14: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2003a18: 07 00 00 06 sethi %hi(0x1800), %g3 2003a1c: 82 08 40 03 and %g1, %g3, %g1 2003a20: 80 a0 40 03 cmp %g1, %g3 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 2003a24: 82 08 a0 07 and %g2, 7, %g1 2003a28: 92 10 20 08 mov 8, %o1 2003a2c: 92 22 40 01 sub %o1, %g1, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2003a30: 12 80 00 24 bne 2003ac0 <== NEVER TAKEN 2003a34: 82 02 40 02 add %o1, %g2, %g1 tty->column += i; 2003a38: c2 26 60 28 st %g1, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 2003a3c: 94 10 00 19 mov %i1, %o2 2003a40: 11 00 80 68 sethi %hi(0x201a000), %o0 2003a44: 7f ff ff 77 call 2003820 2003a48: 90 12 21 50 or %o0, 0x150, %o0 ! 201a150 return; 2003a4c: 81 c7 e0 08 ret 2003a50: 81 e8 00 00 restore } tty->column += i; break; case '\b': if (tty->column > 0) 2003a54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003a58: 04 80 00 1b ble 2003ac4 <== NOT EXECUTED 2003a5c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); if (!iscntrl(c)) tty->column++; 2003a60: 10 80 00 19 b 2003ac4 <== NOT EXECUTED 2003a64: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 2003a68: 02 80 00 0d be 2003a9c <== ALWAYS TAKEN 2003a6c: c2 0f a0 44 ldub [ %fp + 0x44 ], %g1 c = toupper(c); 2003a70: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 2003a74: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201b3b0 <__ctype_ptr__><== NOT EXECUTED 2003a78: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 2003a7c: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 2003a80: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 2003a84: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 2003a88: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2003a8c: 22 80 00 02 be,a 2003a94 <== NOT EXECUTED 2003a90: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 2003a94: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 2003a98: c2 0f a0 44 ldub [ %fp + 0x44 ], %g1 <== NOT EXECUTED 2003a9c: 05 00 80 6c sethi %hi(0x201b000), %g2 2003aa0: c4 00 a3 b0 ld [ %g2 + 0x3b0 ], %g2 ! 201b3b0 <__ctype_ptr__> 2003aa4: 82 00 80 01 add %g2, %g1, %g1 2003aa8: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2003aac: 80 88 60 20 btst 0x20, %g1 2003ab0: 12 80 00 06 bne 2003ac8 <== NEVER TAKEN 2003ab4: 94 10 00 19 mov %i1, %o2 tty->column++; 2003ab8: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 2003abc: 82 00 60 01 inc %g1 2003ac0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 2003ac4: 94 10 00 19 mov %i1, %o2 2003ac8: 90 07 a0 44 add %fp, 0x44, %o0 2003acc: 7f ff ff 55 call 2003820 2003ad0: 92 10 20 01 mov 1, %o1 2003ad4: 81 c7 e0 08 ret 2003ad8: 81 e8 00 00 restore =============================================================================== 0200e344 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 200e344: 9d e3 bf 78 save %sp, -136, %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) 200e348: 23 00 80 6a sethi %hi(0x201a800), %l1 200e34c: a0 07 bf dc add %fp, -36, %l0 200e350: 92 10 20 03 mov 3, %o1 200e354: 90 14 60 b0 or %l1, 0xb0, %o0 200e358: 94 10 20 07 mov 7, %o2 200e35c: 96 10 00 10 mov %l0, %o3 200e360: 7f ff d0 91 call 20025a4 200e364: 98 10 20 01 mov 1, %o4 200e368: 80 a2 20 00 cmp %o0, 0 200e36c: 02 80 00 10 be 200e3ac <== NEVER TAKEN 200e370: c2 07 bf e8 ld [ %fp + -24 ], %g1 != 0) { if (errno != ENOENT) 200e374: 40 00 02 c7 call 200ee90 <__errno> 200e378: 01 00 00 00 nop 200e37c: c2 02 00 00 ld [ %o0 ], %g1 200e380: 80 a0 60 02 cmp %g1, 2 200e384: 32 80 00 59 bne,a 200e4e8 <== NEVER TAKEN 200e388: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 200e38c: 90 14 60 b0 or %l1, 0xb0, %o0 200e390: 7f ff d1 1b call 20027fc 200e394: 92 10 23 ff mov 0x3ff, %o1 200e398: 80 a2 20 00 cmp %o0, 0 200e39c: 02 80 00 0e be 200e3d4 <== ALWAYS TAKEN 200e3a0: 03 00 80 6e sethi %hi(0x201b800), %g1 } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 200e3a4: 81 c7 e0 08 ret <== NOT EXECUTED 200e3a8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 200e3ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200e3b0: 22 80 00 09 be,a 200e3d4 <== NOT EXECUTED 200e3b4: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200e3b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 201b81c <== NOT EXECUTED 200e3bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200e3c0: 22 80 00 05 be,a 200e3d4 <== NOT EXECUTED 200e3c4: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200e3c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 200e3cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 200e3d0: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200e3d4: c4 10 61 da lduh [ %g1 + 0x1da ], %g2 ! 201b9da else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 200e3d8: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 200e3dc: 95 28 a0 10 sll %g2, 0x10, %o2 200e3e0: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 200e3e4: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 200e3e8: c4 30 61 da sth %g2, [ %g1 + 0x1da ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 200e3ec: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 200e3f0: 03 00 00 19 sethi %hi(0x6400), %g1 200e3f4: 84 10 a1 70 or %g2, 0x170, %g2 200e3f8: 82 10 62 6f or %g1, 0x26f, %g1 200e3fc: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 200e400: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 200e404: c4 3f bf f0 std %g2, [ %fp + -16 ] 200e408: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 200e40c: 90 07 bf fa add %fp, -6, %o0 200e410: 13 00 80 6a sethi %hi(0x201a800), %o1 200e414: 40 00 05 8b call 200fa40 200e418: 92 12 60 b8 or %o1, 0xb8, %o1 ! 201a8b8 <__FUNCTION__.5942+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 200e41c: 90 10 00 10 mov %l0, %o0 200e420: 40 00 00 4b call 200e54c 200e424: 92 10 21 80 mov 0x180, %o1 200e428: 80 a2 20 00 cmp %o0, 0 200e42c: 02 80 00 05 be 200e440 <== ALWAYS TAKEN 200e430: 90 10 00 10 mov %l0, %o0 if (errno != EEXIST){ 200e434: 40 00 02 97 call 200ee90 <__errno> <== NOT EXECUTED 200e438: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200e43c: 30 80 00 2b b,a 200e4e8 <== 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); 200e440: 7f ff d2 a5 call 2002ed4 200e444: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 200e448: 80 a2 20 00 cmp %o0, 0 200e44c: 16 80 00 07 bge 200e468 <== NEVER TAKEN 200e450: d0 26 00 00 st %o0, [ %i0 ] err = errno; 200e454: 40 00 02 8f call 200ee90 <__errno> 200e458: 01 00 00 00 nop 200e45c: e2 02 00 00 ld [ %o0 ], %l1 /* 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); 200e460: 10 80 00 1d b 200e4d4 200e464: 90 10 00 10 mov %l0, %o0 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 200e468: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 200e46c: c4 00 61 54 ld [ %g1 + 0x154 ], %g2 ! 201b154 <== NOT EXECUTED 200e470: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 200e474: 1a 80 00 08 bcc 200e494 <== NOT EXECUTED 200e478: 82 10 20 00 clr %g1 <== NOT EXECUTED 200e47c: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200e480: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 201bb50 <== NOT EXECUTED 200e484: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 200e488: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 200e48c: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 200e490: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 200e494: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 200e498: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 200e49c: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 200e4a0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 200e4a4: 7f ff d2 8c call 2002ed4 <== NOT EXECUTED 200e4a8: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 200e4ac: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 200e4b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200e4b4: 16 80 00 07 bge 200e4d0 <== NOT EXECUTED 200e4b8: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; 200e4bc: 40 00 02 75 call 200ee90 <__errno> <== NOT EXECUTED 200e4c0: 01 00 00 00 nop <== NOT EXECUTED 200e4c4: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 200e4c8: 7f ff f0 e9 call 200a86c <== NOT EXECUTED 200e4cc: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED } unlink(fifopath); 200e4d0: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 200e4d4: 40 00 00 26 call 200e56c 200e4d8: b0 10 3f ff mov -1, %i0 } rtems_set_errno_and_return_minus_one(err); 200e4dc: 40 00 02 6d call 200ee90 <__errno> 200e4e0: 01 00 00 00 nop 200e4e4: e2 22 00 00 st %l1, [ %o0 ] } 200e4e8: 81 c7 e0 08 ret 200e4ec: 81 e8 00 00 restore =============================================================================== 0200cfa4 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 200cfa4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 200cfa8: 40 00 03 24 call 200dc38 <== NOT EXECUTED 200cfac: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 200cfb0: 40 00 03 22 call 200dc38 <== NOT EXECUTED 200cfb4: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 200cfb8: 7f ff e2 81 call 20059bc <== NOT EXECUTED 200cfbc: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 200cfc0: 7f ff f6 5a call 200a928 <== NOT EXECUTED 200cfc4: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED free(pipe); 200cfc8: 7f ff f6 58 call 200a928 <== NOT EXECUTED 200cfcc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200cbc8 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 200cbc8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 200cbcc: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 200cbd0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 200cbd4: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 200cbd8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200cbdc: 12 80 00 12 bne 200cc24 <== NOT EXECUTED 200cbe0: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 200cbe4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 200cbe8: 02 80 00 0f be 200cc24 <== NOT EXECUTED 200cbec: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 200cbf0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 200cbf4: 92 10 20 00 clr %o1 <== NOT EXECUTED 200cbf8: 94 10 20 00 clr %o2 <== NOT EXECUTED 200cbfc: 7f ff e3 9e call 2005a74 <== NOT EXECUTED 200cc00: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 200cc04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200cc08: 12 80 00 07 bne 200cc24 <== NOT EXECUTED 200cc0c: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 200cc10: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 200cc14: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 200cc18: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 200cc1c: 7f ff e3 dd call 2005b90 <== NOT EXECUTED 200cc20: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 200cc24: 81 c7 e0 08 ret <== NOT EXECUTED 200cc28: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200cb54 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 200cb54: 81 c3 e0 08 retl <== NOT EXECUTED 200cb58: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED =============================================================================== 0200cc2c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 200cc2c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 200cc30: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 200cc34: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 200cc38: 92 10 20 00 clr %o1 <== NOT EXECUTED 200cc3c: 94 10 20 00 clr %o2 <== NOT EXECUTED 200cc40: 7f ff e3 8d call 2005a74 <== NOT EXECUTED 200cc44: b0 10 20 00 clr %i0 <== NOT EXECUTED 200cc48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200cc4c: 02 80 00 54 be 200cd9c <== NOT EXECUTED 200cc50: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED 200cc54: 81 c7 e0 08 ret <== NOT EXECUTED 200cc58: 91 e8 3f fc restore %g0, -4, %o0 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 200cc5c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200cc60: 02 80 00 53 be 200cdac <== NOT EXECUTED 200cc64: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 200cc68: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 200cc6c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 200cc70: 22 80 00 04 be,a 200cc80 <== NOT EXECUTED 200cc74: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 200cc78: 10 80 00 4d b 200cdac <== NOT EXECUTED 200cc7c: a2 10 3f f5 mov -11, %l1 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 200cc80: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 200cc84: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 200cc88: 7f ff e3 c2 call 2005b90 <== NOT EXECUTED 200cc8c: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 200cc90: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 200cc94: 40 00 04 1a call 200dcfc <== NOT EXECUTED 200cc98: 92 10 20 00 clr %o1 <== NOT EXECUTED 200cc9c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 200cca0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 200cca4: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 200cca8: 92 10 20 00 clr %o1 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 200ccac: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 200ccb0: 94 10 20 00 clr %o2 <== NOT EXECUTED 200ccb4: 7f ff e3 70 call 2005a74 <== NOT EXECUTED 200ccb8: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 200ccbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200ccc0: 22 80 00 04 be,a 200ccd0 <== NOT EXECUTED 200ccc4: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 200ccc8: 10 80 00 3b b 200cdb4 <== NOT EXECUTED 200cccc: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 200ccd0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 200ccd4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 200ccd8: 12 80 00 35 bne 200cdac <== NOT EXECUTED 200ccdc: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 200cce0: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 200cce4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 200cce8: 22 bf ff dd be,a 200cc5c <== NOT EXECUTED 200ccec: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 200ccf0: 82 26 80 18 sub %i2, %i0, %g1 <== NOT EXECUTED 200ccf4: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 200ccf8: 38 80 00 02 bgu,a 200cd00 <== NOT EXECUTED 200ccfc: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 200cd00: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 200cd04: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 200cd08: 90 06 40 18 add %i1, %i0, %o0 <== NOT EXECUTED 200cd0c: a4 24 80 01 sub %l2, %g1, %l2 <== NOT EXECUTED if (chunk > chunk1) { 200cd10: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 200cd14: 04 80 00 0a ble 200cd3c <== NOT EXECUTED 200cd18: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 200cd1c: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 200cd20: 40 00 0a 98 call 200f780 <== NOT EXECUTED 200cd24: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 200cd28: 90 06 00 12 add %i0, %l2, %o0 <== NOT EXECUTED 200cd2c: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 200cd30: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 200cd34: 10 80 00 04 b 200cd44 <== NOT EXECUTED 200cd38: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 200cd3c: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 200cd40: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200cd44: 40 00 0a 8f call 200f780 <== NOT EXECUTED 200cd48: 01 00 00 00 nop <== NOT EXECUTED pipe->Start += chunk; 200cd4c: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 200cd50: d2 04 20 04 ld [ %l0 + 4 ], %o1 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; 200cd54: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 200cd58: 40 00 2e 2e call 2018610 <.urem> <== NOT EXECUTED 200cd5c: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 200cd60: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 200cd64: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 200cd68: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 200cd6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200cd70: 12 80 00 03 bne 200cd7c <== NOT EXECUTED 200cd74: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 200cd78: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 200cd7c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 200cd80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200cd84: 22 80 00 06 be,a 200cd9c <== NOT EXECUTED 200cd88: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 200cd8c: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 200cd90: 40 00 03 c4 call 200dca0 <== NOT EXECUTED 200cd94: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 200cd98: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 200cd9c: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 200cda0: 2a bf ff d1 bcs,a 200cce4 <== NOT EXECUTED 200cda4: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 200cda8: a2 10 20 00 clr %l1 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 200cdac: 7f ff e3 79 call 2005b90 <== NOT EXECUTED 200cdb0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 200cdb4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200cdb8: 24 80 00 02 ble,a 200cdc0 <== NOT EXECUTED 200cdbc: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return read; return ret; } 200cdc0: 81 c7 e0 08 ret <== NOT EXECUTED 200cdc4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200cfd4 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cfd4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 200cfd8: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 200cfdc: 92 10 20 00 clr %o1 <== NOT EXECUTED 200cfe0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 200cfe4: 7f ff e2 a4 call 2005a74 <== NOT EXECUTED 200cfe8: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 200cfec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200cff0: 12 80 00 17 bne 200d04c <== NOT EXECUTED 200cff4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 200cff8: e2 06 60 18 ld [ %i1 + 0x18 ], %l1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 200cffc: 80 8c 60 02 btst 2, %l1 <== NOT EXECUTED 200d000: 02 80 00 05 be 200d014 <== NOT EXECUTED 200d004: a2 0c 60 06 and %l1, 6, %l1 <== NOT EXECUTED pipe->Readers --; 200d008: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 200d00c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200d010: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 200d014: 80 8c 60 04 btst 4, %l1 <== NOT EXECUTED 200d018: 02 80 00 06 be 200d030 <== NOT EXECUTED 200d01c: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED pipe->Writers --; 200d020: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 200d024: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200d028: c2 24 20 14 st %g1, [ %l0 + 0x14 ] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 200d02c: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200d030: d0 00 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 201b9d4 <== NOT EXECUTED 200d034: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d038: 7f ff e2 8f call 2005a74 <== NOT EXECUTED 200d03c: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 200d040: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200d044: 02 80 00 04 be 200d054 <== NOT EXECUTED 200d048: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); 200d04c: 7f ff e4 33 call 2006118 <== NOT EXECUTED 200d050: 01 00 00 00 nop <== NOT EXECUTED PIPE_UNLOCK(pipe); 200d054: 7f ff e2 cf call 2005b90 <== NOT EXECUTED 200d058: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 200d05c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 200d060: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d064: 12 80 00 0a bne 200d08c <== NOT EXECUTED 200d068: 80 a4 60 04 cmp %l1, 4 <== NOT EXECUTED 200d06c: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 200d070: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200d074: 12 80 00 06 bne 200d08c <== NOT EXECUTED 200d078: 80 a4 60 04 cmp %l1, 4 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 200d07c: 7f ff ff ca call 200cfa4 <== NOT EXECUTED 200d080: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 200d084: 10 80 00 12 b 200d0cc <== NOT EXECUTED 200d088: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 200d08c: 02 80 00 07 be 200d0a8 <== NOT EXECUTED 200d090: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED 200d094: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d098: 12 80 00 04 bne 200d0a8 <== NOT EXECUTED 200d09c: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 200d0a0: 10 80 00 09 b 200d0c4 <== NOT EXECUTED 200d0a4: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 200d0a8: 02 80 00 0a be 200d0d0 <== NOT EXECUTED 200d0ac: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200d0b0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 200d0b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d0b8: 12 80 00 06 bne 200d0d0 <== NOT EXECUTED 200d0bc: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 200d0c0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 200d0c4: 40 00 02 f7 call 200dca0 <== NOT EXECUTED 200d0c8: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 200d0cc: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200d0d0: d0 00 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 201b9d4 <== NOT EXECUTED 200d0d4: 7f ff e2 af call 2005b90 <== NOT EXECUTED 200d0d8: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 200d0dc: 81 c7 e0 08 ret <== NOT EXECUTED 200d0e0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200cdc8 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 200cdc8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 200cdcc: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 200cdd0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 200cdd4: 02 80 00 72 be 200cf9c <== NOT EXECUTED 200cdd8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 200cddc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 200cde0: 92 10 20 00 clr %o1 <== NOT EXECUTED 200cde4: 94 10 20 00 clr %o2 <== NOT EXECUTED 200cde8: 7f ff e3 23 call 2005a74 <== NOT EXECUTED 200cdec: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 200cdf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200cdf4: 12 80 00 6a bne 200cf9c <== NOT EXECUTED 200cdf8: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 200cdfc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 200ce00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200ce04: 02 80 00 5a be 200cf6c <== NOT EXECUTED 200ce08: b0 10 20 00 clr %i0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 200ce0c: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 200ce10: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 200ce14: 08 80 00 04 bleu 200ce24 <== NOT EXECUTED 200ce18: a6 10 00 1a mov %i2, %l3 <== NOT EXECUTED 200ce1c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED 200ce20: b0 10 20 00 clr %i0 <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 200ce24: 10 80 00 4e b 200cf5c <== NOT EXECUTED 200ce28: a8 07 bf fc add %fp, -4, %l4 <== 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)) { 200ce2c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 200ce30: 22 80 00 04 be,a 200ce40 <== NOT EXECUTED 200ce34: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 200ce38: 10 80 00 4d b 200cf6c <== NOT EXECUTED 200ce3c: a2 10 3f f5 mov -11, %l1 <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 200ce40: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 200ce44: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 200ce48: 7f ff e3 52 call 2005b90 <== NOT EXECUTED 200ce4c: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 200ce50: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 200ce54: 40 00 03 aa call 200dcfc <== NOT EXECUTED 200ce58: 92 10 20 00 clr %o1 <== NOT EXECUTED 200ce5c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 200ce60: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 200ce64: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 200ce68: 92 10 20 00 clr %o1 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 200ce6c: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 200ce70: 94 10 20 00 clr %o2 <== NOT EXECUTED 200ce74: 7f ff e3 00 call 2005a74 <== NOT EXECUTED 200ce78: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 200ce7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200ce80: 22 80 00 04 be,a 200ce90 <== NOT EXECUTED 200ce84: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 200ce88: 10 80 00 42 b 200cf90 <== NOT EXECUTED 200ce8c: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) 200ce90: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 200ce94: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 200ce98: 12 80 00 35 bne 200cf6c <== NOT EXECUTED 200ce9c: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 200cea0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 200cea4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200cea8: 32 80 00 04 bne,a 200ceb8 <== NOT EXECUTED 200ceac: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 200ceb0: 10 80 00 2f b 200cf6c <== NOT EXECUTED 200ceb4: a2 10 3f e0 mov -32, %l1 <== 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) { 200ceb8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 200cebc: a2 24 80 01 sub %l2, %g1, %l1 <== NOT EXECUTED 200cec0: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 200cec4: 2a bf ff da bcs,a 200ce2c <== NOT EXECUTED 200cec8: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 200cecc: 84 26 80 18 sub %i2, %i0, %g2 <== NOT EXECUTED 200ced0: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 200ced4: 38 80 00 02 bgu,a 200cedc <== NOT EXECUTED 200ced8: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 200cedc: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 200cee0: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 200cee4: 40 00 2d cb call 2018610 <.urem> <== NOT EXECUTED 200cee8: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 200ceec: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 200cef0: a4 24 80 08 sub %l2, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 200cef4: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 200cef8: 04 80 00 0a ble 200cf20 <== NOT EXECUTED 200cefc: 92 06 40 18 add %i1, %i0, %o1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 200cf00: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 200cf04: 40 00 0a 1f call 200f780 <== NOT EXECUTED 200cf08: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 200cf0c: 92 04 80 18 add %l2, %i0, %o1 <== NOT EXECUTED 200cf10: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 200cf14: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 200cf18: 10 80 00 04 b 200cf28 <== NOT EXECUTED 200cf1c: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 200cf20: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 200cf24: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200cf28: 40 00 0a 16 call 200f780 <== NOT EXECUTED 200cf2c: 01 00 00 00 nop <== NOT EXECUTED pipe->Length += chunk; 200cf30: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 200cf34: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 200cf38: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 200cf3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200cf40: 02 80 00 05 be 200cf54 <== NOT EXECUTED 200cf44: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 200cf48: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 200cf4c: 40 00 03 55 call 200dca0 <== NOT EXECUTED 200cf50: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 200cf54: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 200cf58: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 200cf5c: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 200cf60: 2a bf ff d6 bcs,a 200ceb8 <== NOT EXECUTED 200cf64: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 200cf68: a2 10 20 00 clr %l1 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 200cf6c: 7f ff e3 09 call 2005b90 <== NOT EXECUTED 200cf70: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 200cf74: 80 a4 7f e0 cmp %l1, -32 <== NOT EXECUTED 200cf78: 12 80 00 07 bne 200cf94 <== NOT EXECUTED 200cf7c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED kill(getpid(), SIGPIPE); 200cf80: 40 00 02 1e call 200d7f8 <== NOT EXECUTED 200cf84: 01 00 00 00 nop <== NOT EXECUTED 200cf88: 40 00 02 6a call 200d930 <== NOT EXECUTED 200cf8c: 92 10 20 0d mov 0xd, %o1 ! d <== NOT EXECUTED #endif if (written > 0) 200cf90: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 200cf94: 24 80 00 02 ble,a 200cf9c <== NOT EXECUTED 200cf98: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return written; return ret; } 200cf9c: 81 c7 e0 08 ret <== NOT EXECUTED 200cfa0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02006a0c : ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 2006a0c: 05 00 80 96 sethi %hi(0x2025800), %g2 2006a10: 84 10 a2 00 or %g2, 0x200, %g2 ! 2025a00 2006a14: c6 00 a0 08 ld [ %g2 + 8 ], %g3 2006a18: 86 00 e0 01 inc %g3 2006a1c: c6 20 a0 08 st %g3, [ %g2 + 8 ] if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 2006a20: 84 02 7f ff add %o1, -1, %g2 2006a24: 80 88 80 09 btst %g2, %o1 2006a28: 12 80 00 04 bne 2006a38 <== NEVER TAKEN 2006a2c: 80 a2 60 03 cmp %o1, 3 2006a30: 18 80 00 04 bgu 2006a40 2006a34: 01 00 00 00 nop /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 2006a38: 81 c3 e0 08 retl 2006a3c: 90 10 20 16 mov 0x16, %o0 ! 16 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 2006a40: 82 13 c0 00 mov %o7, %g1 2006a44: 40 00 00 6a call 2006bec 2006a48: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200a500 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 200a500: 80 a2 20 00 cmp %o0, 0 200a504: 02 80 00 10 be 200a544 200a508: 01 00 00 00 nop 200a50c: c2 02 00 00 ld [ %o0 ], %g1 200a510: 80 a0 60 00 cmp %g1, 0 200a514: 02 80 00 0c be 200a544 200a518: 80 a2 60 04 cmp %o1, 4 return EINVAL; switch ( policy ) { 200a51c: 18 80 00 06 bgu 200a534 200a520: 82 10 20 01 mov 1, %g1 200a524: 83 28 40 09 sll %g1, %o1, %g1 200a528: 80 88 60 17 btst 0x17, %g1 200a52c: 32 80 00 04 bne,a 200a53c <== ALWAYS TAKEN 200a530: d2 22 20 14 st %o1, [ %o0 + 0x14 ] 200a534: 81 c3 e0 08 retl 200a538: 90 10 20 86 mov 0x86, %o0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; 200a53c: 81 c3 e0 08 retl 200a540: 90 10 20 00 clr %o0 default: return ENOTSUP; } } 200a544: 81 c3 e0 08 retl 200a548: 90 10 20 16 mov 0x16, %o0 =============================================================================== 02005fcc : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 2005fcc: 9d e3 bf 90 save %sp, -112, %sp const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 2005fd0: 80 a6 20 00 cmp %i0, 0 2005fd4: 02 80 00 2e be 200608c 2005fd8: 80 a6 a0 00 cmp %i2, 0 return EINVAL; if ( count == 0 ) 2005fdc: 02 80 00 2c be 200608c 2005fe0: 80 a6 60 00 cmp %i1, 0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 2005fe4: 32 80 00 06 bne,a 2005ffc 2005fe8: c2 06 40 00 ld [ %i1 ], %g1 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 2005fec: b2 07 bf f0 add %fp, -16, %i1 2005ff0: 7f ff ff c0 call 2005ef0 2005ff4: 90 10 00 19 mov %i1, %o0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 2005ff8: c2 06 40 00 ld [ %i1 ], %g1 2005ffc: 80 a0 60 00 cmp %g1, 0 2006000: 02 80 00 23 be 200608c 2006004: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 2006008: c2 06 60 04 ld [ %i1 + 4 ], %g1 200600c: 80 a0 60 00 cmp %g1, 0 2006010: 12 80 00 1f bne 200608c <== NEVER TAKEN 2006014: 03 00 80 75 sethi %hi(0x201d400), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2006018: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 201d5f0 <_Thread_Dispatch_disable_level> /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 200601c: f4 27 bf fc st %i2, [ %fp + -4 ] 2006020: 84 00 a0 01 inc %g2 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 2006024: c0 27 bf f8 clr [ %fp + -8 ] 2006028: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] * 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 *) 200602c: 23 00 80 76 sethi %hi(0x201d800), %l1 2006030: 40 00 08 28 call 20080d0 <_Objects_Allocate> 2006034: 90 14 62 00 or %l1, 0x200, %o0 ! 201da00 <_POSIX_Barrier_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 2006038: a0 92 20 00 orcc %o0, 0, %l0 200603c: 12 80 00 06 bne 2006054 2006040: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 2006044: 40 00 0b 9d call 2008eb8 <_Thread_Enable_dispatch> 2006048: b0 10 20 0b mov 0xb, %i0 return EAGAIN; 200604c: 81 c7 e0 08 ret 2006050: 81 e8 00 00 restore } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 2006054: 40 00 05 b4 call 2007724 <_CORE_barrier_Initialize> 2006058: 92 07 bf f8 add %fp, -8, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200605c: c4 14 20 0a lduh [ %l0 + 0xa ], %g2 2006060: a2 14 62 00 or %l1, 0x200, %l1 2006064: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 2006068: c2 04 20 08 ld [ %l0 + 8 ], %g1 200606c: 85 28 a0 02 sll %g2, 2, %g2 2006070: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 2006074: c0 24 20 0c clr [ %l0 + 0xc ] ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 2006078: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 200607c: 40 00 0b 8f call 2008eb8 <_Thread_Enable_dispatch> 2006080: b0 10 20 00 clr %i0 return 0; 2006084: 81 c7 e0 08 ret 2006088: 81 e8 00 00 restore } 200608c: 81 c7 e0 08 ret 2006090: 91 e8 20 16 restore %g0, 0x16, %o0 =============================================================================== 02005788 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 2005788: 9d e3 bf a0 save %sp, -96, %sp /* * 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 ) 200578c: 80 a6 20 00 cmp %i0, 0 2005790: 02 80 00 12 be 20057d8 2005794: 03 00 80 76 sethi %hi(0x201d800), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005798: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 201da90 <_Thread_Dispatch_disable_level> 200579c: 84 00 a0 01 inc %g2 20057a0: c4 20 62 90 st %g2, [ %g1 + 0x290 ] return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 20057a4: 40 00 11 2a call 2009c4c <_Workspace_Allocate> 20057a8: 90 10 20 10 mov 0x10, %o0 if ( handler ) { 20057ac: 92 92 20 00 orcc %o0, 0, %o1 20057b0: 02 80 00 08 be 20057d0 <== NEVER TAKEN 20057b4: 03 00 80 76 sethi %hi(0x201d800), %g1 thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 20057b8: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 201db50 <_Thread_Executing> handler->routine = routine; 20057bc: f0 22 60 08 st %i0, [ %o1 + 8 ] 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; 20057c0: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 handler->routine = routine; handler->arg = arg; 20057c4: f2 22 60 0c st %i1, [ %o1 + 0xc ] _Chain_Append( handler_stack, &handler->Node ); 20057c8: 40 00 06 06 call 2006fe0 <_Chain_Append> 20057cc: 90 02 20 e0 add %o0, 0xe0, %o0 } _Thread_Enable_dispatch(); 20057d0: 40 00 0b c5 call 20086e4 <_Thread_Enable_dispatch> 20057d4: 81 e8 00 00 restore 20057d8: 81 c7 e0 08 ret 20057dc: 81 e8 00 00 restore =============================================================================== 02006888 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 2006888: 9d e3 bf a0 save %sp, -96, %sp POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 200688c: 25 00 80 73 sethi %hi(0x201cc00), %l2 2006890: 80 a6 60 00 cmp %i1, 0 2006894: 02 80 00 03 be 20068a0 2006898: a4 14 a1 80 or %l2, 0x180, %l2 200689c: a4 10 00 19 mov %i1, %l2 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 20068a0: c2 04 a0 04 ld [ %l2 + 4 ], %g1 20068a4: 80 a0 60 01 cmp %g1, 1 20068a8: 02 80 00 26 be 2006940 <== NEVER TAKEN 20068ac: 01 00 00 00 nop return EINVAL; if ( !the_attr->is_initialized ) 20068b0: c2 04 80 00 ld [ %l2 ], %g1 20068b4: 80 a0 60 00 cmp %g1, 0 20068b8: 02 80 00 22 be 2006940 20068bc: 03 00 80 7a sethi %hi(0x201e800), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20068c0: c4 00 61 30 ld [ %g1 + 0x130 ], %g2 ! 201e930 <_Thread_Dispatch_disable_level> 20068c4: 84 00 a0 01 inc %g2 20068c8: c4 20 61 30 st %g2, [ %g1 + 0x130 ] */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 20068cc: 23 00 80 7b sethi %hi(0x201ec00), %l1 20068d0: 40 00 09 b2 call 2008f98 <_Objects_Allocate> 20068d4: 90 14 61 d8 or %l1, 0x1d8, %o0 ! 201edd8 <_POSIX_Condition_variables_Information> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 20068d8: a0 92 20 00 orcc %o0, 0, %l0 20068dc: 32 80 00 06 bne,a 20068f4 20068e0: c2 04 a0 04 ld [ %l2 + 4 ], %g1 _Thread_Enable_dispatch(); 20068e4: 40 00 0d 27 call 2009d80 <_Thread_Enable_dispatch> 20068e8: b0 10 20 0c mov 0xc, %i0 return ENOMEM; 20068ec: 81 c7 e0 08 ret 20068f0: 81 e8 00 00 restore the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 20068f4: 90 04 20 18 add %l0, 0x18, %o0 if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 20068f8: c2 24 20 10 st %g1, [ %l0 + 0x10 ] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 20068fc: 92 10 20 00 clr %o1 2006900: 94 10 28 00 mov 0x800, %o2 2006904: 96 10 20 74 mov 0x74, %o3 2006908: 40 00 0f 46 call 200a620 <_Thread_queue_Initialize> 200690c: c0 24 20 14 clr [ %l0 + 0x14 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2006910: c4 14 20 0a lduh [ %l0 + 0xa ], %g2 2006914: a2 14 61 d8 or %l1, 0x1d8, %l1 2006918: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 200691c: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006920: 85 28 a0 02 sll %g2, 2, %g2 2006924: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 2006928: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 200692c: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 2006930: 40 00 0d 14 call 2009d80 <_Thread_Enable_dispatch> 2006934: b0 10 20 00 clr %i0 return 0; 2006938: 81 c7 e0 08 ret 200693c: 81 e8 00 00 restore } 2006940: 81 c7 e0 08 ret 2006944: 91 e8 20 16 restore %g0, 0x16, %o0 =============================================================================== 02006700 : int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) 2006700: 80 a2 20 00 cmp %o0, 0 2006704: 02 80 00 09 be 2006728 2006708: 01 00 00 00 nop 200670c: c2 02 00 00 ld [ %o0 ], %g1 2006710: 80 a0 60 00 cmp %g1, 0 2006714: 02 80 00 05 be 2006728 <== NEVER TAKEN 2006718: 01 00 00 00 nop return EINVAL; attr->is_initialized = false; 200671c: c0 22 00 00 clr [ %o0 ] return 0; 2006720: 81 c3 e0 08 retl 2006724: 90 10 20 00 clr %o0 } 2006728: 81 c3 e0 08 retl 200672c: 90 10 20 16 mov 0x16, %o0 =============================================================================== 02005c68 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 2005c68: 9d e3 bf 58 save %sp, -168, %sp 2005c6c: a0 10 00 18 mov %i0, %l0 int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 2005c70: 80 a6 a0 00 cmp %i2, 0 2005c74: 02 80 00 8b be 2005ea0 2005c78: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 2005c7c: 23 00 80 6d sethi %hi(0x201b400), %l1 2005c80: 80 a6 60 00 cmp %i1, 0 2005c84: 02 80 00 03 be 2005c90 2005c88: a2 14 60 f0 or %l1, 0xf0, %l1 2005c8c: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 2005c90: c2 04 40 00 ld [ %l1 ], %g1 2005c94: 80 a0 60 00 cmp %g1, 0 2005c98: 22 80 00 82 be,a 2005ea0 2005c9c: b0 10 20 16 mov 0x16, %i0 * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 2005ca0: c2 04 60 04 ld [ %l1 + 4 ], %g1 2005ca4: 80 a0 60 00 cmp %g1, 0 2005ca8: 02 80 00 07 be 2005cc4 2005cac: 03 00 80 71 sethi %hi(0x201c400), %g1 2005cb0: c4 04 60 08 ld [ %l1 + 8 ], %g2 2005cb4: c2 00 61 84 ld [ %g1 + 0x184 ], %g1 2005cb8: 80 a0 80 01 cmp %g2, %g1 2005cbc: 2a 80 00 79 bcs,a 2005ea0 2005cc0: b0 10 20 16 mov 0x16, %i0 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 2005cc4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 2005cc8: 80 a0 60 01 cmp %g1, 1 2005ccc: 02 80 00 06 be 2005ce4 2005cd0: 80 a0 60 02 cmp %g1, 2 2005cd4: 12 80 00 73 bne 2005ea0 2005cd8: b0 10 20 16 mov 0x16, %i0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 2005cdc: 10 80 00 0a b 2005d04 2005ce0: e6 04 60 14 ld [ %l1 + 0x14 ], %l3 * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005ce4: 03 00 80 74 sethi %hi(0x201d000), %g1 2005ce8: c2 00 61 30 ld [ %g1 + 0x130 ], %g1 ! 201d130 <_Thread_Executing> schedpolicy = api->schedpolicy; schedparam = api->schedparam; 2005cec: 90 07 bf dc add %fp, -36, %o0 * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005cf0: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 2005cf4: 94 10 20 1c mov 0x1c, %o2 2005cf8: 92 00 60 84 add %g1, 0x84, %o1 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 2005cfc: 10 80 00 05 b 2005d10 2005d00: e6 00 60 80 ld [ %g1 + 0x80 ], %l3 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 2005d04: 90 07 bf dc add %fp, -36, %o0 2005d08: 92 04 60 18 add %l1, 0x18, %o1 2005d0c: 94 10 20 1c mov 0x1c, %o2 2005d10: 40 00 2a 1e call 2010588 2005d14: b0 10 20 86 mov 0x86, %i0 /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 2005d18: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2005d1c: 80 a0 60 00 cmp %g1, 0 2005d20: 12 80 00 62 bne 2005ea8 2005d24: 01 00 00 00 nop return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 2005d28: 40 00 1a c0 call 200c828 <_POSIX_Priority_Is_valid> 2005d2c: d0 07 bf dc ld [ %fp + -36 ], %o0 2005d30: 80 8a 20 ff btst 0xff, %o0 2005d34: 02 80 00 5b be 2005ea0 <== NEVER TAKEN 2005d38: b0 10 20 16 mov 0x16, %i0 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 2005d3c: 03 00 80 71 sethi %hi(0x201c400), %g1 return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 2005d40: e8 07 bf dc ld [ %fp + -36 ], %l4 2005d44: ea 08 61 88 ldub [ %g1 + 0x188 ], %l5 /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 2005d48: 90 10 00 13 mov %l3, %o0 2005d4c: 92 07 bf dc add %fp, -36, %o1 2005d50: 94 07 bf fc add %fp, -4, %o2 2005d54: 40 00 1a c0 call 200c854 <_POSIX_Thread_Translate_sched_param> 2005d58: 96 07 bf f8 add %fp, -8, %o3 schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 2005d5c: b0 92 20 00 orcc %o0, 0, %i0 2005d60: 12 80 00 50 bne 2005ea0 2005d64: 2d 00 80 74 sethi %hi(0x201d000), %l6 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 2005d68: 40 00 05 fd call 200755c <_API_Mutex_Lock> 2005d6c: d0 05 a1 28 ld [ %l6 + 0x128 ], %o0 ! 201d128 <_RTEMS_Allocator_Mutex> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 2005d70: 11 00 80 74 sethi %hi(0x201d000), %o0 2005d74: 40 00 08 63 call 2007f00 <_Objects_Allocate> 2005d78: 90 12 23 00 or %o0, 0x300, %o0 ! 201d300 <_POSIX_Threads_Information> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 2005d7c: a4 92 20 00 orcc %o0, 0, %l2 2005d80: 32 80 00 04 bne,a 2005d90 2005d84: c2 04 60 08 ld [ %l1 + 8 ], %g1 _RTEMS_Unlock_allocator(); 2005d88: 10 80 00 21 b 2005e0c 2005d8c: d0 05 a1 28 ld [ %l6 + 0x128 ], %o0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 2005d90: 05 00 80 71 sethi %hi(0x201c400), %g2 2005d94: d6 00 a1 84 ld [ %g2 + 0x184 ], %o3 ! 201c584 2005d98: c0 27 bf d4 clr [ %fp + -44 ] 2005d9c: 97 2a e0 01 sll %o3, 1, %o3 2005da0: 80 a2 c0 01 cmp %o3, %g1 2005da4: 1a 80 00 03 bcc 2005db0 2005da8: d4 04 60 04 ld [ %l1 + 4 ], %o2 2005dac: 96 10 00 01 mov %g1, %o3 2005db0: c2 07 bf fc ld [ %fp + -4 ], %g1 2005db4: 9a 0d 60 ff and %l5, 0xff, %o5 2005db8: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 2005dbc: c2 07 bf f8 ld [ %fp + -8 ], %g1 2005dc0: 9a 23 40 14 sub %o5, %l4, %o5 2005dc4: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 2005dc8: 82 07 bf d4 add %fp, -44, %g1 2005dcc: c0 23 a0 68 clr [ %sp + 0x68 ] 2005dd0: a8 10 20 01 mov 1, %l4 2005dd4: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2005dd8: e8 23 a0 5c st %l4, [ %sp + 0x5c ] 2005ddc: 2b 00 80 74 sethi %hi(0x201d000), %l5 2005de0: 92 10 00 12 mov %l2, %o1 2005de4: 90 15 63 00 or %l5, 0x300, %o0 2005de8: 40 00 0c 0e call 2008e20 <_Thread_Initialize> 2005dec: 98 10 20 01 mov 1, %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 2005df0: 80 8a 20 ff btst 0xff, %o0 2005df4: 12 80 00 08 bne 2005e14 2005df8: 90 15 63 00 or %l5, 0x300, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 2005dfc: 40 00 09 1b call 2008268 <_Objects_Free> 2005e00: 92 10 00 12 mov %l2, %o1 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 2005e04: 03 00 80 74 sethi %hi(0x201d000), %g1 2005e08: d0 00 61 28 ld [ %g1 + 0x128 ], %o0 ! 201d128 <_RTEMS_Allocator_Mutex> 2005e0c: 10 80 00 23 b 2005e98 2005e10: b0 10 20 0b mov 0xb, %i0 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2005e14: ea 04 a1 6c ld [ %l2 + 0x16c ], %l5 api->Attributes = *the_attr; 2005e18: 92 10 00 11 mov %l1, %o1 2005e1c: 94 10 20 3c mov 0x3c, %o2 2005e20: 40 00 29 da call 2010588 2005e24: 90 10 00 15 mov %l5, %o0 api->detachstate = the_attr->detachstate; 2005e28: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2005e2c: 92 07 bf dc add %fp, -36, %o1 * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 2005e30: c2 25 60 3c st %g1, [ %l5 + 0x3c ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 2005e34: 94 10 20 1c mov 0x1c, %o2 */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 2005e38: e6 25 60 80 st %l3, [ %l5 + 0x80 ] api->schedparam = schedparam; 2005e3c: 40 00 29 d3 call 2010588 2005e40: 90 05 60 84 add %l5, 0x84, %o0 the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 2005e44: 94 10 00 1a mov %i2, %o2 * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 2005e48: e8 2c a0 74 stb %l4, [ %l2 + 0x74 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 2005e4c: 96 10 00 1b mov %i3, %o3 2005e50: 90 10 00 12 mov %l2, %o0 2005e54: 92 10 20 01 mov 1, %o1 2005e58: 40 00 0e e6 call 20099f0 <_Thread_Start> 2005e5c: 98 10 20 00 clr %o4 _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 2005e60: 80 a4 e0 04 cmp %l3, 4 2005e64: 32 80 00 0a bne,a 2005e8c 2005e68: c2 04 a0 08 ld [ %l2 + 8 ], %g1 _Watchdog_Insert_ticks( 2005e6c: 40 00 0f 8a call 2009c94 <_Timespec_To_ticks> 2005e70: 90 05 60 8c add %l5, 0x8c, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005e74: 92 05 60 a4 add %l5, 0xa4, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2005e78: d0 25 60 b0 st %o0, [ %l5 + 0xb0 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005e7c: 11 00 80 74 sethi %hi(0x201d000), %o0 2005e80: 40 00 10 61 call 200a004 <_Watchdog_Insert> 2005e84: 90 12 21 50 or %o0, 0x150, %o0 ! 201d150 <_Watchdog_Ticks_chain> } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 2005e88: c2 04 a0 08 ld [ %l2 + 8 ], %g1 _RTEMS_Unlock_allocator(); 2005e8c: 05 00 80 74 sethi %hi(0x201d000), %g2 2005e90: d0 00 a1 28 ld [ %g2 + 0x128 ], %o0 ! 201d128 <_RTEMS_Allocator_Mutex> } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 2005e94: c2 24 00 00 st %g1, [ %l0 ] _RTEMS_Unlock_allocator(); 2005e98: 40 00 05 c7 call 20075b4 <_API_Mutex_Unlock> 2005e9c: 01 00 00 00 nop return 0; 2005ea0: 81 c7 e0 08 ret 2005ea4: 81 e8 00 00 restore } 2005ea8: 81 c7 e0 08 ret 2005eac: 81 e8 00 00 restore =============================================================================== 02005528 : int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { if ( !attr ) 2005528: 80 a2 20 00 cmp %o0, 0 200552c: 02 80 00 0c be 200555c 2005530: 01 00 00 00 nop return EINVAL; if ( !attr->is_initialized ) 2005534: c2 02 00 00 ld [ %o0 ], %g1 2005538: 80 a0 60 00 cmp %g1, 0 200553c: 02 80 00 08 be 200555c 2005540: 80 a2 60 00 cmp %o1, 0 return EINVAL; if ( !type ) 2005544: 02 80 00 06 be 200555c <== NEVER TAKEN 2005548: 01 00 00 00 nop return EINVAL; *type = attr->type; 200554c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2005550: 90 10 20 00 clr %o0 return 0; 2005554: 81 c3 e0 08 retl 2005558: c2 22 40 00 st %g1, [ %o1 ] } 200555c: 81 c3 e0 08 retl 2005560: 90 10 20 16 mov 0x16, %o0 =============================================================================== 02007aec : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 2007aec: 80 a2 20 00 cmp %o0, 0 2007af0: 02 80 00 0b be 2007b1c 2007af4: 01 00 00 00 nop 2007af8: c2 02 00 00 ld [ %o0 ], %g1 2007afc: 80 a0 60 00 cmp %g1, 0 2007b00: 02 80 00 07 be 2007b1c 2007b04: 80 a2 60 01 cmp %o1, 1 return EINVAL; switch ( pshared ) { 2007b08: 18 80 00 05 bgu 2007b1c <== NEVER TAKEN 2007b0c: 01 00 00 00 nop case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 2007b10: d2 22 20 04 st %o1, [ %o0 + 4 ] return 0; 2007b14: 81 c3 e0 08 retl 2007b18: 90 10 20 00 clr %o0 default: return EINVAL; } } 2007b1c: 81 c3 e0 08 retl 2007b20: 90 10 20 16 mov 0x16, %o0 =============================================================================== 02005590 : int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) 2005590: 80 a2 20 00 cmp %o0, 0 2005594: 02 80 00 0b be 20055c0 2005598: 01 00 00 00 nop 200559c: c2 02 00 00 ld [ %o0 ], %g1 20055a0: 80 a0 60 00 cmp %g1, 0 20055a4: 02 80 00 07 be 20055c0 <== NEVER TAKEN 20055a8: 80 a2 60 03 cmp %o1, 3 return EINVAL; switch ( type ) { 20055ac: 18 80 00 05 bgu 20055c0 20055b0: 01 00 00 00 nop case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 20055b4: d2 22 20 10 st %o1, [ %o0 + 0x10 ] return 0; 20055b8: 81 c3 e0 08 retl 20055bc: 90 10 20 00 clr %o0 default: return EINVAL; } } 20055c0: 81 c3 e0 08 retl 20055c4: 90 10 20 16 mov 0x16, %o0 =============================================================================== 02006294 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 2006294: 9d e3 bf 98 save %sp, -104, %sp if ( !once_control || !init_routine ) 2006298: 80 a6 60 00 cmp %i1, 0 200629c: 02 80 00 05 be 20062b0 20062a0: a0 10 00 18 mov %i0, %l0 20062a4: 80 a6 20 00 cmp %i0, 0 20062a8: 32 80 00 04 bne,a 20062b8 20062ac: c2 06 20 04 ld [ %i0 + 4 ], %g1 20062b0: 81 c7 e0 08 ret 20062b4: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; if ( !once_control->init_executed ) { 20062b8: 80 a0 60 00 cmp %g1, 0 20062bc: 12 80 00 13 bne 2006308 20062c0: b0 10 20 00 clr %i0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 20062c4: 90 10 21 00 mov 0x100, %o0 20062c8: 92 10 21 00 mov 0x100, %o1 20062cc: 40 00 03 03 call 2006ed8 20062d0: 94 07 bf fc add %fp, -4, %o2 if ( !once_control->init_executed ) { 20062d4: c2 04 20 04 ld [ %l0 + 4 ], %g1 20062d8: 80 a0 60 00 cmp %g1, 0 20062dc: 12 80 00 07 bne 20062f8 <== NEVER TAKEN 20062e0: d0 07 bf fc ld [ %fp + -4 ], %o0 once_control->is_initialized = true; 20062e4: 82 10 20 01 mov 1, %g1 once_control->init_executed = true; 20062e8: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 20062ec: 9f c6 40 00 call %i1 20062f0: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 20062f4: d0 07 bf fc ld [ %fp + -4 ], %o0 20062f8: 92 10 21 00 mov 0x100, %o1 20062fc: 94 07 bf fc add %fp, -4, %o2 2006300: 40 00 02 f6 call 2006ed8 2006304: b0 10 20 00 clr %i0 } return 0; } 2006308: 81 c7 e0 08 ret 200630c: 81 e8 00 00 restore =============================================================================== 02006abc : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 2006abc: 9d e3 bf 90 save %sp, -112, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 2006ac0: 80 a6 20 00 cmp %i0, 0 2006ac4: 02 80 00 2a be 2006b6c 2006ac8: 80 a6 60 00 cmp %i1, 0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 2006acc: 32 80 00 06 bne,a 2006ae4 2006ad0: c2 06 40 00 ld [ %i1 ], %g1 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 2006ad4: b2 07 bf f4 add %fp, -12, %i1 2006ad8: 40 00 02 7f call 20074d4 2006adc: 90 10 00 19 mov %i1, %o0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 2006ae0: c2 06 40 00 ld [ %i1 ], %g1 2006ae4: 80 a0 60 00 cmp %g1, 0 2006ae8: 02 80 00 21 be 2006b6c <== NEVER TAKEN 2006aec: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 2006af0: c2 06 60 04 ld [ %i1 + 4 ], %g1 2006af4: 80 a0 60 00 cmp %g1, 0 2006af8: 12 80 00 1d bne 2006b6c <== NEVER TAKEN 2006afc: 03 00 80 7b sethi %hi(0x201ec00), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2006b00: c4 00 62 50 ld [ %g1 + 0x250 ], %g2 ! 201ee50 <_Thread_Dispatch_disable_level> 2006b04: 84 00 a0 01 inc %g2 2006b08: c4 20 62 50 st %g2, [ %g1 + 0x250 ] * 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 *) 2006b0c: 23 00 80 7c sethi %hi(0x201f000), %l1 2006b10: 40 00 09 dc call 2009280 <_Objects_Allocate> 2006b14: 90 14 60 a0 or %l1, 0xa0, %o0 ! 201f0a0 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 2006b18: a0 92 20 00 orcc %o0, 0, %l0 2006b1c: 12 80 00 06 bne 2006b34 2006b20: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 2006b24: 40 00 0d 51 call 200a068 <_Thread_Enable_dispatch> 2006b28: b0 10 20 0b mov 0xb, %i0 return EAGAIN; 2006b2c: 81 c7 e0 08 ret 2006b30: 81 e8 00 00 restore } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 2006b34: 40 00 07 91 call 2008978 <_CORE_RWLock_Initialize> 2006b38: 92 07 bf fc add %fp, -4, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2006b3c: c4 14 20 0a lduh [ %l0 + 0xa ], %g2 2006b40: a2 14 60 a0 or %l1, 0xa0, %l1 2006b44: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 2006b48: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006b4c: 85 28 a0 02 sll %g2, 2, %g2 2006b50: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 2006b54: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 2006b58: c2 26 00 00 st %g1, [ %i0 ] _Thread_Enable_dispatch(); 2006b5c: 40 00 0d 43 call 200a068 <_Thread_Enable_dispatch> 2006b60: b0 10 20 00 clr %i0 return 0; 2006b64: 81 c7 e0 08 ret 2006b68: 81 e8 00 00 restore } 2006b6c: 81 c7 e0 08 ret 2006b70: 91 e8 20 16 restore %g0, 0x16, %o0 =============================================================================== 02006bec : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 2006bec: 9d e3 bf 98 save %sp, -104, %sp Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 2006bf0: 80 a6 20 00 cmp %i0, 0 2006bf4: 02 80 00 2d be 2006ca8 2006bf8: 90 10 00 19 mov %i1, %o0 * * 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 ); 2006bfc: 40 00 1b b1 call 200dac0 <_POSIX_Absolute_timeout_to_ticks> 2006c00: 92 07 bf f8 add %fp, -8, %o1 2006c04: d2 06 00 00 ld [ %i0 ], %o1 2006c08: a0 10 00 08 mov %o0, %l0 2006c0c: 94 07 bf fc add %fp, -4, %o2 2006c10: 11 00 80 7c sethi %hi(0x201f000), %o0 2006c14: 40 00 0a da call 200977c <_Objects_Get> 2006c18: 90 12 20 a0 or %o0, 0xa0, %o0 ! 201f0a0 <_POSIX_RWLock_Information> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006c1c: c2 07 bf fc ld [ %fp + -4 ], %g1 2006c20: 80 a0 60 00 cmp %g1, 0 2006c24: 32 80 00 22 bne,a 2006cac 2006c28: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 2006c2c: d2 06 00 00 ld [ %i0 ], %o1 2006c30: d6 07 bf f8 ld [ %fp + -8 ], %o3 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, 2006c34: 82 1c 20 03 xor %l0, 3, %g1 2006c38: 90 02 20 10 add %o0, 0x10, %o0 2006c3c: 80 a0 00 01 cmp %g0, %g1 2006c40: 98 10 20 00 clr %o4 2006c44: a2 60 3f ff subx %g0, -1, %l1 2006c48: 40 00 07 57 call 20089a4 <_CORE_RWLock_Obtain_for_reading> 2006c4c: 94 10 00 11 mov %l1, %o2 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 2006c50: 40 00 0d 06 call 200a068 <_Thread_Enable_dispatch> 2006c54: 01 00 00 00 nop if ( !do_wait ) { 2006c58: 80 a4 60 00 cmp %l1, 0 2006c5c: 12 80 00 0d bne 2006c90 2006c60: 03 00 80 7b sethi %hi(0x201ec00), %g1 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 2006c64: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 201ef10 <_Thread_Executing> 2006c68: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2006c6c: 80 a0 60 02 cmp %g1, 2 2006c70: 32 80 00 09 bne,a 2006c94 2006c74: 03 00 80 7b sethi %hi(0x201ec00), %g1 switch (status) { 2006c78: 80 a4 20 00 cmp %l0, 0 2006c7c: 02 80 00 0c be 2006cac <== NEVER TAKEN 2006c80: 90 10 20 16 mov 0x16, %o0 2006c84: 80 a4 20 02 cmp %l0, 2 2006c88: 08 80 00 09 bleu 2006cac <== ALWAYS TAKEN 2006c8c: 90 10 20 74 mov 0x74, %o0 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2006c90: 03 00 80 7b sethi %hi(0x201ec00), %g1 2006c94: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 201ef10 <_Thread_Executing> 2006c98: 40 00 00 3b call 2006d84 <_POSIX_RWLock_Translate_core_RWLock_return_code> 2006c9c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 2006ca0: 81 c7 e0 08 ret 2006ca4: 91 e8 00 08 restore %g0, %o0, %o0 2006ca8: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2006cac: b0 10 00 08 mov %o0, %i0 2006cb0: 81 c7 e0 08 ret 2006cb4: 81 e8 00 00 restore =============================================================================== 02006cb8 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 2006cb8: 9d e3 bf 98 save %sp, -104, %sp Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 2006cbc: 80 a6 20 00 cmp %i0, 0 2006cc0: 02 80 00 2d be 2006d74 2006cc4: 90 10 00 19 mov %i1, %o0 * * 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 ); 2006cc8: 40 00 1b 7e call 200dac0 <_POSIX_Absolute_timeout_to_ticks> 2006ccc: 92 07 bf f8 add %fp, -8, %o1 2006cd0: d2 06 00 00 ld [ %i0 ], %o1 2006cd4: a0 10 00 08 mov %o0, %l0 2006cd8: 94 07 bf fc add %fp, -4, %o2 2006cdc: 11 00 80 7c sethi %hi(0x201f000), %o0 2006ce0: 40 00 0a a7 call 200977c <_Objects_Get> 2006ce4: 90 12 20 a0 or %o0, 0xa0, %o0 ! 201f0a0 <_POSIX_RWLock_Information> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006ce8: c2 07 bf fc ld [ %fp + -4 ], %g1 2006cec: 80 a0 60 00 cmp %g1, 0 2006cf0: 32 80 00 22 bne,a 2006d78 2006cf4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 2006cf8: d2 06 00 00 ld [ %i0 ], %o1 2006cfc: d6 07 bf f8 ld [ %fp + -8 ], %o3 (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, 2006d00: 82 1c 20 03 xor %l0, 3, %g1 2006d04: 90 02 20 10 add %o0, 0x10, %o0 2006d08: 80 a0 00 01 cmp %g0, %g1 2006d0c: 98 10 20 00 clr %o4 2006d10: a2 60 3f ff subx %g0, -1, %l1 2006d14: 40 00 07 58 call 2008a74 <_CORE_RWLock_Obtain_for_writing> 2006d18: 94 10 00 11 mov %l1, %o2 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 2006d1c: 40 00 0c d3 call 200a068 <_Thread_Enable_dispatch> 2006d20: 01 00 00 00 nop if ( !do_wait && 2006d24: 80 a4 60 00 cmp %l1, 0 2006d28: 12 80 00 0d bne 2006d5c 2006d2c: 03 00 80 7b sethi %hi(0x201ec00), %g1 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 2006d30: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 201ef10 <_Thread_Executing> 2006d34: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2006d38: 80 a0 60 02 cmp %g1, 2 2006d3c: 32 80 00 09 bne,a 2006d60 2006d40: 03 00 80 7b sethi %hi(0x201ec00), %g1 switch (status) { 2006d44: 80 a4 20 00 cmp %l0, 0 2006d48: 02 80 00 0c be 2006d78 <== NEVER TAKEN 2006d4c: 90 10 20 16 mov 0x16, %o0 2006d50: 80 a4 20 02 cmp %l0, 2 2006d54: 08 80 00 09 bleu 2006d78 <== ALWAYS TAKEN 2006d58: 90 10 20 74 mov 0x74, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 2006d5c: 03 00 80 7b sethi %hi(0x201ec00), %g1 2006d60: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 201ef10 <_Thread_Executing> 2006d64: 40 00 00 08 call 2006d84 <_POSIX_RWLock_Translate_core_RWLock_return_code> 2006d68: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 2006d6c: 81 c7 e0 08 ret 2006d70: 91 e8 00 08 restore %g0, %o0, %o0 2006d74: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2006d78: b0 10 00 08 mov %o0, %i0 2006d7c: 81 c7 e0 08 ret 2006d80: 81 e8 00 00 restore =============================================================================== 020074f8 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 20074f8: 80 a2 20 00 cmp %o0, 0 20074fc: 02 80 00 0b be 2007528 2007500: 01 00 00 00 nop return EINVAL; if ( !attr->is_initialized ) 2007504: c2 02 00 00 ld [ %o0 ], %g1 2007508: 80 a0 60 00 cmp %g1, 0 200750c: 02 80 00 07 be 2007528 2007510: 80 a2 60 01 cmp %o1, 1 return EINVAL; switch ( pshared ) { 2007514: 18 80 00 05 bgu 2007528 <== NEVER TAKEN 2007518: 01 00 00 00 nop case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 200751c: d2 22 20 04 st %o1, [ %o0 + 4 ] return 0; 2007520: 81 c3 e0 08 retl 2007524: 90 10 20 00 clr %o0 default: return EINVAL; } } 2007528: 81 c3 e0 08 retl 200752c: 90 10 20 16 mov 0x16, %o0 =============================================================================== 0200870c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 200870c: 9d e3 bf 90 save %sp, -112, %sp 2008710: a0 10 00 18 mov %i0, %l0 int rc; /* * Check all the parameters */ if ( !param ) 2008714: 80 a6 a0 00 cmp %i2, 0 2008718: 02 80 00 42 be 2008820 200871c: b0 10 20 16 mov 0x16, %i0 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 2008720: 90 10 00 19 mov %i1, %o0 2008724: 92 10 00 1a mov %i2, %o1 2008728: 94 07 bf fc add %fp, -4, %o2 200872c: 40 00 19 2f call 200ebe8 <_POSIX_Thread_Translate_sched_param> 2008730: 96 07 bf f8 add %fp, -8, %o3 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 2008734: b0 92 20 00 orcc %o0, 0, %i0 2008738: 12 80 00 3a bne 2008820 200873c: 92 10 00 10 mov %l0, %o1 2008740: 11 00 80 85 sethi %hi(0x2021400), %o0 2008744: 94 07 bf f4 add %fp, -12, %o2 2008748: 40 00 08 22 call 200a7d0 <_Objects_Get> 200874c: 90 12 23 f0 or %o0, 0x3f0, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2008750: c2 07 bf f4 ld [ %fp + -12 ], %g1 2008754: 80 a0 60 00 cmp %g1, 0 2008758: 02 80 00 04 be 2008768 200875c: a2 10 00 08 mov %o0, %l1 2008760: 81 c7 e0 08 ret 2008764: 91 e8 20 03 restore %g0, 3, %o0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2008768: e0 02 21 6c ld [ %o0 + 0x16c ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 200876c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 2008770: 80 a0 60 04 cmp %g1, 4 2008774: 32 80 00 05 bne,a 2008788 2008778: f2 24 20 80 st %i1, [ %l0 + 0x80 ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 200877c: 40 00 0f 92 call 200c5c4 <_Watchdog_Remove> 2008780: 90 04 20 a4 add %l0, 0xa4, %o0 api->schedpolicy = policy; 2008784: f2 24 20 80 st %i1, [ %l0 + 0x80 ] api->schedparam = *param; 2008788: 92 10 00 1a mov %i2, %o1 200878c: 90 04 20 84 add %l0, 0x84, %o0 2008790: 40 00 28 b6 call 2012a68 2008794: 94 10 20 1c mov 0x1c, %o2 the_thread->budget_algorithm = budget_algorithm; 2008798: c4 07 bf fc ld [ %fp + -4 ], %g2 the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 200879c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 20087a0: c4 24 60 7c st %g2, [ %l1 + 0x7c ] the_thread->budget_callout = budget_callout; 20087a4: c4 07 bf f8 ld [ %fp + -8 ], %g2 switch ( api->schedpolicy ) { 20087a8: 80 a0 60 00 cmp %g1, 0 20087ac: 06 80 00 1b bl 2008818 <== NEVER TAKEN 20087b0: c4 24 60 80 st %g2, [ %l1 + 0x80 ] 20087b4: 80 a0 60 02 cmp %g1, 2 20087b8: 24 80 00 07 ble,a 20087d4 20087bc: c2 04 20 84 ld [ %l0 + 0x84 ], %g1 20087c0: 80 a0 60 04 cmp %g1, 4 20087c4: 12 80 00 15 bne 2008818 <== NEVER TAKEN 20087c8: 01 00 00 00 nop true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 20087cc: 10 80 00 0d b 2008800 20087d0: c2 04 20 84 ld [ %l0 + 0x84 ], %g1 20087d4: 07 00 80 82 sethi %hi(0x2020800), %g3 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 20087d8: 05 00 80 85 sethi %hi(0x2021400), %g2 20087dc: d2 08 e2 08 ldub [ %g3 + 0x208 ], %o1 20087e0: c4 00 a0 b8 ld [ %g2 + 0xb8 ], %g2 20087e4: 92 22 40 01 sub %o1, %g1, %o1 20087e8: c4 24 60 78 st %g2, [ %l1 + 0x78 ] the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 20087ec: 90 10 00 11 mov %l1, %o0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; the_thread->real_priority = 20087f0: d2 24 60 18 st %o1, [ %l1 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 20087f4: 40 00 08 a7 call 200aa90 <_Thread_Change_priority> 20087f8: 94 10 20 01 mov 1, %o2 the_thread, the_thread->real_priority, true ); break; 20087fc: 30 80 00 07 b,a 2008818 case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; _Watchdog_Remove( &api->Sporadic_timer ); 2008800: 90 04 20 a4 add %l0, 0xa4, %o0 2008804: 40 00 0f 70 call 200c5c4 <_Watchdog_Remove> 2008808: c2 24 20 a0 st %g1, [ %l0 + 0xa0 ] _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 200880c: 92 10 00 11 mov %l1, %o1 2008810: 7f ff ff a0 call 2008690 <_POSIX_Threads_Sporadic_budget_TSR> 2008814: 90 10 20 00 clr %o0 break; } _Thread_Enable_dispatch(); 2008818: 40 00 0a 29 call 200b0bc <_Thread_Enable_dispatch> 200881c: 01 00 00 00 nop case OBJECTS_ERROR: break; } return ESRCH; } 2008820: 81 c7 e0 08 ret 2008824: 81 e8 00 00 restore =============================================================================== 02005f1c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 2005f1c: 9d e3 bf a0 save %sp, -96, %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() ) 2005f20: 03 00 80 76 sethi %hi(0x201d800), %g1 2005f24: c2 00 63 2c ld [ %g1 + 0x32c ], %g1 ! 201db2c <_ISR_Nest_level> 2005f28: 80 a0 60 00 cmp %g1, 0 2005f2c: 12 80 00 17 bne 2005f88 <== NEVER TAKEN 2005f30: 05 00 80 76 sethi %hi(0x201d800), %g2 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2005f34: 03 00 80 76 sethi %hi(0x201d800), %g1 2005f38: c6 00 a2 90 ld [ %g2 + 0x290 ], %g3 2005f3c: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 2005f40: 86 00 e0 01 inc %g3 2005f44: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 2005f48: c6 20 a2 90 st %g3, [ %g2 + 0x290 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005f4c: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 2005f50: 80 a0 a0 00 cmp %g2, 0 2005f54: 12 80 00 05 bne 2005f68 <== NEVER TAKEN 2005f58: a0 10 20 00 clr %l0 /* 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)); 2005f5c: c2 00 60 dc ld [ %g1 + 0xdc ], %g1 2005f60: 80 a0 00 01 cmp %g0, %g1 2005f64: a0 40 20 00 addx %g0, 0, %l0 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 2005f68: 40 00 09 df call 20086e4 <_Thread_Enable_dispatch> 2005f6c: 01 00 00 00 nop if ( cancel ) 2005f70: 80 8c 20 ff btst 0xff, %l0 2005f74: 02 80 00 05 be 2005f88 2005f78: 03 00 80 76 sethi %hi(0x201d800), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 2005f7c: f0 00 63 50 ld [ %g1 + 0x350 ], %i0 ! 201db50 <_Thread_Executing> 2005f80: 40 00 19 0b call 200c3ac <_POSIX_Thread_Exit> 2005f84: 93 e8 3f ff restore %g0, -1, %o1 2005f88: 81 c7 e0 08 ret 2005f8c: 81 e8 00 00 restore =============================================================================== 02019438 : ssize_t read( int fd, void *buffer, size_t count ) { 2019438: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 201943c: 03 00 80 6c sethi %hi(0x201b000), %g1 2019440: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201b154 ssize_t read( int fd, void *buffer, size_t count ) { 2019444: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2019448: 80 a6 00 01 cmp %i0, %g1 201944c: 1a 80 00 0c bcc 201947c <== NEVER TAKEN 2019450: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 2019454: 03 00 80 6e sethi %hi(0x201b800), %g1 2019458: e0 00 63 50 ld [ %g1 + 0x350 ], %l0 ! 201bb50 201945c: 83 2e 20 06 sll %i0, 6, %g1 2019460: b1 2e 20 03 sll %i0, 3, %i0 2019464: b0 06 00 01 add %i0, %g1, %i0 2019468: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 201946c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2019470: 80 88 61 00 btst 0x100, %g1 2019474: 12 80 00 06 bne 201948c 2019478: 80 a6 60 00 cmp %i1, 0 201947c: 7f ff d6 85 call 200ee90 <__errno> 2019480: 01 00 00 00 nop 2019484: 10 80 00 14 b 20194d4 2019488: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_buffer( buffer ); 201948c: 02 80 00 07 be 20194a8 <== NEVER TAKEN 2019490: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 2019494: 02 80 00 1c be 2019504 <== NEVER TAKEN 2019498: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 201949c: 80 88 60 02 btst 2, %g1 20194a0: 32 80 00 06 bne,a 20194b8 <== ALWAYS TAKEN 20194a4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 20194a8: 7f ff d6 7a call 200ee90 <__errno> <== NOT EXECUTED 20194ac: 01 00 00 00 nop <== NOT EXECUTED 20194b0: 10 80 00 09 b 20194d4 <== NOT EXECUTED 20194b4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 20194b8: c2 00 60 08 ld [ %g1 + 8 ], %g1 20194bc: 80 a0 60 00 cmp %g1, 0 20194c0: 12 80 00 08 bne 20194e0 <== ALWAYS TAKEN 20194c4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 20194c8: 7f ff d6 72 call 200ee90 <__errno> <== NOT EXECUTED 20194cc: 01 00 00 00 nop <== NOT EXECUTED 20194d0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 20194d4: c2 22 00 00 st %g1, [ %o0 ] 20194d8: 10 80 00 0b b 2019504 20194dc: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->read_h)( iop, buffer, count ); 20194e0: 9f c0 40 00 call %g1 20194e4: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 20194e8: 80 a2 20 00 cmp %o0, 0 20194ec: 04 80 00 06 ble 2019504 20194f0: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 20194f4: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 20194f8: 86 83 40 08 addcc %o5, %o0, %g3 20194fc: 84 43 00 02 addx %o4, %g2, %g2 2019500: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 2019504: 81 c7 e0 08 ret 2019508: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02005ed4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 2005ed4: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 2005ed8: 80 a6 60 00 cmp %i1, 0 2005edc: 12 80 00 06 bne 2005ef4 <== ALWAYS TAKEN 2005ee0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 2005ee4: 40 00 35 c0 call 20135e4 <__errno> <== NOT EXECUTED 2005ee8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2005eec: 10 80 00 32 b 2005fb4 <== NOT EXECUTED 2005ef0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 2005ef4: 40 00 3c e9 call 2015298 2005ef8: 90 10 00 18 mov %i0, %o0 2005efc: a0 07 bf ec add %fp, -20, %l0 2005f00: 92 10 00 08 mov %o0, %o1 2005f04: 94 10 20 00 clr %o2 2005f08: 90 10 00 18 mov %i0, %o0 2005f0c: 96 10 00 10 mov %l0, %o3 2005f10: 98 10 20 00 clr %o4 2005f14: 7f ff fb 3d call 2004c08 2005f18: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 2005f1c: 80 a2 20 00 cmp %o0, 0 2005f20: 12 80 00 26 bne 2005fb8 <== NEVER TAKEN 2005f24: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 2005f28: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 2005f2c: 80 a0 60 00 cmp %g1, 0 2005f30: 22 80 00 19 be,a 2005f94 <== NEVER TAKEN 2005f34: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 2005f38: 9f c0 40 00 call %g1 2005f3c: 90 10 00 10 mov %l0, %o0 2005f40: 80 a2 20 04 cmp %o0, 4 2005f44: 02 80 00 0f be 2005f80 2005f48: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_freenode( &loc ); 2005f4c: 80 a0 a0 00 cmp %g2, 0 2005f50: 02 80 00 08 be 2005f70 <== NEVER TAKEN 2005f54: 01 00 00 00 nop 2005f58: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 2005f5c: 80 a0 60 00 cmp %g1, 0 2005f60: 02 80 00 04 be 2005f70 <== NEVER TAKEN 2005f64: 01 00 00 00 nop 2005f68: 9f c0 40 00 call %g1 2005f6c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 2005f70: 40 00 35 9d call 20135e4 <__errno> 2005f74: b0 10 3f ff mov -1, %i0 2005f78: 10 80 00 0f b 2005fb4 2005f7c: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 2005f80: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 2005f84: 80 a0 60 00 cmp %g1, 0 2005f88: 12 80 00 0e bne 2005fc0 <== ALWAYS TAKEN 2005f8c: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 2005f90: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2005f94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2005f98: 02 80 00 04 be 2005fa8 <== NOT EXECUTED 2005f9c: 01 00 00 00 nop <== NOT EXECUTED 2005fa0: 9f c0 40 00 call %g1 <== NOT EXECUTED 2005fa4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2005fa8: 40 00 35 8f call 20135e4 <__errno> <== NOT EXECUTED 2005fac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2005fb0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2005fb4: c2 22 00 00 st %g1, [ %o0 ] 2005fb8: 81 c7 e0 08 ret 2005fbc: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 2005fc0: 94 10 00 1a mov %i2, %o2 2005fc4: 9f c0 40 00 call %g1 2005fc8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2005fcc: c2 07 bf f8 ld [ %fp + -8 ], %g1 2005fd0: 80 a0 60 00 cmp %g1, 0 2005fd4: 02 bf ff f9 be 2005fb8 <== NEVER TAKEN 2005fd8: b0 10 00 08 mov %o0, %i0 2005fdc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2005fe0: 80 a0 60 00 cmp %g1, 0 2005fe4: 02 80 00 04 be 2005ff4 <== NEVER TAKEN 2005fe8: 01 00 00 00 nop 2005fec: 9f c0 40 00 call %g1 2005ff0: 90 10 00 10 mov %l0, %o0 return result; } 2005ff4: 81 c7 e0 08 ret 2005ff8: 81 e8 00 00 restore =============================================================================== 02004810 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 2004810: 9d e3 bf a0 save %sp, -96, %sp int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 2004814: 03 00 80 7f sethi %hi(0x201fc00), %g1 2004818: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 ! 201fd14 200481c: 80 a6 00 01 cmp %i0, %g1 2004820: 1a 80 00 0c bcc 2004850 <== NEVER TAKEN 2004824: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 2004828: 03 00 80 83 sethi %hi(0x2020c00), %g1 200482c: e4 00 62 e4 ld [ %g1 + 0x2e4 ], %l2 ! 2020ee4 2004830: 83 2e 20 06 sll %i0, 6, %g1 2004834: b1 2e 20 03 sll %i0, 3, %i0 2004838: b0 06 00 01 add %i0, %g1, %i0 200483c: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 2004840: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 2004844: 80 88 61 00 btst 0x100, %g1 2004848: 12 80 00 06 bne 2004860 <== ALWAYS TAKEN 200484c: 80 88 60 02 btst 2, %g1 2004850: 40 00 33 65 call 20115e4 <__errno> <== NOT EXECUTED 2004854: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004858: 10 80 00 1d b 20048cc <== NOT EXECUTED 200485c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 2004860: 02 80 00 18 be 20048c0 <== NEVER TAKEN 2004864: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 2004868: 02 80 00 16 be 20048c0 200486c: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 2004870: 04 80 00 14 ble 20048c0 2004874: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 2004878: 14 80 00 12 bg 20048c0 <== NEVER TAKEN 200487c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 2004880: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 2004884: c2 00 60 08 ld [ %g1 + 8 ], %g1 2004888: 80 a0 60 00 cmp %g1, 0 200488c: 12 80 00 06 bne 20048a4 <== ALWAYS TAKEN 2004890: 84 10 20 01 mov 1, %g2 rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004894: 40 00 33 54 call 20115e4 <__errno> <== NOT EXECUTED 2004898: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200489c: 10 80 00 0c b 20048cc <== NOT EXECUTED 20048a0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20048a4: 82 10 00 19 mov %i1, %g1 20048a8: 88 10 20 00 clr %g4 20048ac: 86 10 20 00 clr %g3 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 20048b0: da 00 40 00 ld [ %g1 ], %o5 20048b4: 80 a3 60 00 cmp %o5, 0 20048b8: 12 80 00 08 bne 20048d8 20048bc: 88 01 20 01 inc %g4 rtems_set_errno_and_return_minus_one( EINVAL ); 20048c0: 40 00 33 49 call 20115e4 <__errno> 20048c4: b0 10 3f ff mov -1, %i0 20048c8: 82 10 20 16 mov 0x16, %g1 20048cc: c2 22 00 00 st %g1, [ %o0 ] 20048d0: 81 c7 e0 08 ret 20048d4: 81 e8 00 00 restore if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 20048d8: d8 00 60 04 ld [ %g1 + 4 ], %o4 20048dc: 9a 00 c0 0c add %g3, %o4, %o5 if ( total < old ) 20048e0: 80 a3 40 03 cmp %o5, %g3 20048e4: 06 bf ff f7 bl 20048c0 20048e8: 82 00 60 08 add %g1, 8, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 20048ec: 80 a0 00 0c cmp %g0, %o4 20048f0: 86 40 3f ff addx %g0, -1, %g3 * 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++ ) { 20048f4: 80 a1 00 1a cmp %g4, %i2 20048f8: 16 80 00 04 bge 2004908 20048fc: 84 08 80 03 and %g2, %g3, %g2 2004900: 10 bf ff ec b 20048b0 2004904: 86 10 00 0d mov %o5, %g3 /* * 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 ) { 2004908: 80 88 a0 ff btst 0xff, %g2 200490c: a6 10 20 00 clr %l3 2004910: 12 bf ff f0 bne 20048d0 2004914: b0 10 20 00 clr %i0 /* * 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 ); 2004918: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 200491c: d2 06 40 00 ld [ %i1 ], %o1 2004920: c2 00 60 08 ld [ %g1 + 8 ], %g1 2004924: d4 06 60 04 ld [ %i1 + 4 ], %o2 2004928: 9f c0 40 00 call %g1 200492c: 90 10 00 12 mov %l2, %o0 if ( bytes < 0 ) 2004930: 80 a2 20 00 cmp %o0, 0 2004934: 16 80 00 04 bge 2004944 <== ALWAYS TAKEN 2004938: 01 00 00 00 nop 200493c: 81 c7 e0 08 ret <== NOT EXECUTED 2004940: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 2004944: 02 80 00 07 be 2004960 <== NEVER TAKEN 2004948: a1 3a 20 1f sra %o0, 0x1f, %l0 iop->offset += bytes; 200494c: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 2004950: 86 80 c0 08 addcc %g3, %o0, %g3 total += bytes; 2004954: b0 06 00 08 add %i0, %o0, %i0 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 2004958: 84 40 80 10 addx %g2, %l0, %g2 200495c: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] total += bytes; } if (bytes != iov[ v ].iov_len) 2004960: c2 06 60 04 ld [ %i1 + 4 ], %g1 2004964: 80 a2 00 01 cmp %o0, %g1 2004968: 12 bf ff da bne 20048d0 <== NEVER TAKEN 200496c: a6 04 e0 01 inc %l3 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 2004970: 80 a4 c0 1a cmp %l3, %i2 2004974: 06 bf ff e9 bl 2004918 2004978: b2 06 60 08 add %i1, 8, %i1 if (bytes != iov[ v ].iov_len) break; } return total; } 200497c: 81 c7 e0 08 ret 2004980: 81 e8 00 00 restore =============================================================================== 02019590 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 2019590: 9d e3 bf 98 save %sp, -104, %sp 2019594: 03 00 80 6e sethi %hi(0x201b800), %g1 2019598: 82 10 63 60 or %g1, 0x360, %g1 ! 201bb60 201959c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 20195a0: 05 00 80 6f sethi %hi(0x201bc00), %g2 20195a4: c4 00 a2 c0 ld [ %g2 + 0x2c0 ], %g2 ! 201bec0 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 20195a8: 86 00 e0 01 inc %g3 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 20195ac: 80 a0 a0 03 cmp %g2, 3 20195b0: 12 80 00 0c bne 20195e0 <== NEVER TAKEN 20195b4: c6 20 60 10 st %g3, [ %g1 + 0x10 ] if (_Thread_Dispatch_disable_level > 0) 20195b8: 03 00 80 6f sethi %hi(0x201bc00), %g1 20195bc: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 201bd20 <_Thread_Dispatch_disable_level> 20195c0: 80 a0 60 00 cmp %g1, 0 20195c4: 32 80 00 13 bne,a 2019610 <== NEVER TAKEN 20195c8: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 20195cc: 03 00 80 6f sethi %hi(0x201bc00), %g1 20195d0: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 201bdbc <_ISR_Nest_level> 20195d4: 80 a0 60 00 cmp %g1, 0 20195d8: 32 80 00 0e bne,a 2019610 <== NEVER TAKEN 20195dc: b0 10 20 00 clr %i0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 20195e0: 80 a6 20 00 cmp %i0, 0 20195e4: 12 80 00 06 bne 20195fc 20195e8: 80 a6 60 00 cmp %i1, 0 return malloc( size ); 20195ec: 7f ff c6 31 call 200aeb0 20195f0: 90 10 00 19 mov %i1, %o0 20195f4: 81 c7 e0 08 ret 20195f8: 91 e8 00 08 restore %g0, %o0, %o0 if ( !size ) { 20195fc: 12 80 00 07 bne 2019618 <== ALWAYS TAKEN 2019600: 21 00 80 6c sethi %hi(0x201b000), %l0 free( ptr ); 2019604: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2019608: 7f ff c4 c8 call 200a928 <== NOT EXECUTED 201960c: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 2019610: 81 c7 e0 08 ret <== NOT EXECUTED 2019614: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 2019618: d0 04 21 60 ld [ %l0 + 0x160 ], %o0 201961c: 92 10 00 18 mov %i0, %o1 2019620: 40 00 00 60 call 20197a0 <_Protected_heap_Get_block_size> 2019624: 94 07 bf fc add %fp, -4, %o2 2019628: 80 8a 20 ff btst 0xff, %o0 201962c: 12 80 00 08 bne 201964c 2019630: d0 04 21 60 ld [ %l0 + 0x160 ], %o0 errno = EINVAL; 2019634: 7f ff d6 17 call 200ee90 <__errno> 2019638: b0 10 20 00 clr %i0 201963c: 82 10 20 16 mov 0x16, %g1 2019640: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 2019644: 81 c7 e0 08 ret 2019648: 81 e8 00 00 restore #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 ) ) { 201964c: 92 10 00 18 mov %i0, %o1 2019650: 40 00 00 61 call 20197d4 <_Protected_heap_Resize_block> 2019654: 94 10 00 19 mov %i1, %o2 2019658: 80 8a 20 ff btst 0xff, %o0 201965c: 12 80 00 1a bne 20196c4 2019660: 01 00 00 00 nop * 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 ); 2019664: 7f ff c6 13 call 200aeb0 2019668: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 201966c: 03 00 80 6e sethi %hi(0x201b800), %g1 2019670: 82 10 63 60 or %g1, 0x360, %g1 ! 201bb60 2019674: c4 00 60 04 ld [ %g1 + 4 ], %g2 * 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 ); 2019678: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 201967c: 84 00 bf ff add %g2, -1, %g2 if ( !new_area ) { 2019680: 80 a2 20 00 cmp %o0, 0 2019684: 02 80 00 0f be 20196c0 2019688: c4 20 60 04 st %g2, [ %g1 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 201968c: c2 07 bf fc ld [ %fp + -4 ], %g1 2019690: 80 a6 40 01 cmp %i1, %g1 2019694: 08 80 00 03 bleu 20196a0 <== NEVER TAKEN 2019698: 94 10 00 19 mov %i1, %o2 201969c: 94 10 00 01 mov %g1, %o2 20196a0: 92 10 00 18 mov %i0, %o1 20196a4: 7f ff d8 37 call 200f780 20196a8: 90 10 00 10 mov %l0, %o0 free( ptr ); 20196ac: 90 10 00 18 mov %i0, %o0 20196b0: 7f ff c4 9e call 200a928 20196b4: b0 10 00 10 mov %l0, %i0 return new_area; 20196b8: 81 c7 e0 08 ret 20196bc: 81 e8 00 00 restore 20196c0: b0 10 20 00 clr %i0 } 20196c4: 81 c7 e0 08 ret 20196c8: 81 e8 00 00 restore =============================================================================== 020070b8 : #include int rmdir( const char *pathname ) { 20070b8: 9d e3 bf 78 save %sp, -136, %sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 20070bc: 7f ff f9 97 call 2005718 20070c0: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 20070c4: a6 92 20 00 orcc %o0, 0, %l3 20070c8: 32 80 00 18 bne,a 2007128 20070cc: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 20070d0: c2 4e 00 00 ldsb [ %i0 ], %g1 20070d4: 80 a0 60 5c cmp %g1, 0x5c 20070d8: 22 80 00 08 be,a 20070f8 <== NEVER TAKEN 20070dc: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED 20070e0: 80 a0 60 2f cmp %g1, 0x2f 20070e4: 22 80 00 05 be,a 20070f8 <== ALWAYS TAKEN 20070e8: 03 00 80 9a sethi %hi(0x2026800), %g1 20070ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20070f0: 12 80 00 06 bne 2007108 <== NOT EXECUTED 20070f4: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED 20070f8: d2 00 63 90 ld [ %g1 + 0x390 ], %o1 ! 2026b90 20070fc: 90 07 bf ec add %fp, -20, %o0 2007100: 10 80 00 05 b 2007114 2007104: 92 02 60 18 add %o1, 0x18, %o1 2007108: d2 00 63 90 ld [ %g1 + 0x390 ], %o1 <== NOT EXECUTED 200710c: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 2007110: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 2007114: 94 10 20 14 mov 0x14, %o2 2007118: 40 00 3a c7 call 2015c34 200711c: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 2007120: 10 80 00 0b b 200714c 2007124: 94 10 20 14 mov 0x14, %o2 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 2007128: 92 10 00 13 mov %l3, %o1 200712c: 94 10 20 02 mov 2, %o2 2007130: 96 07 bf ec add %fp, -20, %o3 2007134: 7f ff f9 c7 call 2005850 2007138: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 200713c: 80 a2 20 00 cmp %o0, 0 2007140: 12 80 00 89 bne 2007364 <== NEVER TAKEN 2007144: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 2007148: 94 10 20 14 mov 0x14, %o2 200714c: a0 07 bf d8 add %fp, -40, %l0 2007150: a4 07 bf ec add %fp, -20, %l2 2007154: 90 10 00 10 mov %l0, %o0 2007158: 40 00 3a b7 call 2015c34 200715c: 92 10 00 12 mov %l2, %o1 name = pathname + parentpathlen; 2007160: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 2007164: 40 00 40 fd call 2017558 2007168: 90 10 00 18 mov %i0, %o0 200716c: 92 10 00 08 mov %o0, %o1 2007170: 7f ff f9 59 call 20056d4 2007174: 90 10 00 18 mov %i0, %o0 2007178: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 200717c: 40 00 40 f7 call 2017558 2007180: 90 10 00 18 mov %i0, %o0 2007184: 94 10 20 00 clr %o2 2007188: 92 10 00 08 mov %o0, %o1 200718c: 96 10 00 10 mov %l0, %o3 2007190: 90 10 00 18 mov %i0, %o0 2007194: 7f ff f9 73 call 2005760 2007198: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 200719c: 80 a2 20 00 cmp %o0, 0 20071a0: 02 80 00 11 be 20071e4 20071a4: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 20071a8: 80 8c 60 ff btst 0xff, %l1 20071ac: 02 80 00 0c be 20071dc <== ALWAYS TAKEN 20071b0: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 20071b4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 20071b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20071bc: 02 80 00 6b be 2007368 <== NOT EXECUTED 20071c0: 01 00 00 00 nop <== NOT EXECUTED 20071c4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20071c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20071cc: 02 80 00 04 be 20071dc <== NOT EXECUTED 20071d0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 20071d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20071d8: 01 00 00 00 nop <== NOT EXECUTED 20071dc: 81 c7 e0 08 ret 20071e0: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 20071e4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 20071e8: 80 a0 60 00 cmp %g1, 0 20071ec: 12 80 00 04 bne 20071fc <== ALWAYS TAKEN 20071f0: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 20071f4: 10 80 00 2b b 20072a0 <== NOT EXECUTED 20071f8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== 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 ){ 20071fc: 9f c0 40 00 call %g1 2007200: 90 10 00 10 mov %l0, %o0 2007204: 80 a2 20 01 cmp %o0, 1 2007208: 02 80 00 1d be 200727c 200720c: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &loc ); 2007210: c2 07 bf e4 ld [ %fp + -28 ], %g1 2007214: 80 a0 60 00 cmp %g1, 0 2007218: 02 80 00 09 be 200723c <== NEVER TAKEN 200721c: 80 8c 60 ff btst 0xff, %l1 2007220: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2007224: 80 a0 60 00 cmp %g1, 0 2007228: 02 80 00 05 be 200723c <== NEVER TAKEN 200722c: 80 8c 60 ff btst 0xff, %l1 2007230: 9f c0 40 00 call %g1 2007234: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 2007238: 80 8c 60 ff btst 0xff, %l1 200723c: 02 80 00 0c be 200726c <== NEVER TAKEN 2007240: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 2007244: c2 07 bf f8 ld [ %fp + -8 ], %g1 2007248: 80 a0 60 00 cmp %g1, 0 200724c: 02 80 00 08 be 200726c <== NEVER TAKEN 2007250: 01 00 00 00 nop 2007254: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2007258: 80 a0 60 00 cmp %g1, 0 200725c: 02 80 00 04 be 200726c <== NEVER TAKEN 2007260: 01 00 00 00 nop 2007264: 9f c0 40 00 call %g1 2007268: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200726c: 40 00 33 e8 call 201420c <__errno> 2007270: b0 10 3f ff mov -1, %i0 2007274: 10 80 00 1f b 20072f0 2007278: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 200727c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2007280: 80 a0 60 00 cmp %g1, 0 2007284: 12 80 00 1e bne 20072fc <== ALWAYS TAKEN 2007288: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 200728c: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 2007290: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2007294: 02 80 00 09 be 20072b8 <== NOT EXECUTED 2007298: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 200729c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20072a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20072a4: 02 80 00 05 be 20072b8 <== NOT EXECUTED 20072a8: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 20072ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 20072b0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 20072b4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 20072b8: 02 80 00 0b be 20072e4 <== NOT EXECUTED 20072bc: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 20072c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20072c4: 02 80 00 08 be 20072e4 <== NOT EXECUTED 20072c8: 01 00 00 00 nop <== NOT EXECUTED 20072cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20072d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20072d4: 02 80 00 04 be 20072e4 <== NOT EXECUTED 20072d8: 01 00 00 00 nop <== NOT EXECUTED 20072dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 20072e0: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20072e4: 40 00 33 ca call 201420c <__errno> <== NOT EXECUTED 20072e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20072ec: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20072f0: c2 22 00 00 st %g1, [ %o0 ] 20072f4: 81 c7 e0 08 ret 20072f8: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 20072fc: 9f c0 40 00 call %g1 2007300: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 2007304: c2 07 bf e4 ld [ %fp + -28 ], %g1 2007308: 80 a0 60 00 cmp %g1, 0 200730c: 02 80 00 08 be 200732c <== NEVER TAKEN 2007310: b0 10 00 08 mov %o0, %i0 2007314: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2007318: 80 a0 60 00 cmp %g1, 0 200731c: 02 80 00 05 be 2007330 <== NEVER TAKEN 2007320: 80 8c 60 ff btst 0xff, %l1 2007324: 9f c0 40 00 call %g1 2007328: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 200732c: 80 8c 60 ff btst 0xff, %l1 2007330: 02 bf ff ab be 20071dc 2007334: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 2007338: 80 a0 60 00 cmp %g1, 0 200733c: 02 80 00 0b be 2007368 <== NEVER TAKEN 2007340: 01 00 00 00 nop 2007344: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2007348: 80 a0 60 00 cmp %g1, 0 200734c: 02 80 00 07 be 2007368 <== NEVER TAKEN 2007350: 01 00 00 00 nop 2007354: 9f c0 40 00 call %g1 2007358: 90 07 bf ec add %fp, -20, %o0 200735c: 81 c7 e0 08 ret 2007360: 81 e8 00 00 restore 2007364: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 2007368: 81 c7 e0 08 ret <== NOT EXECUTED 200736c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02015008 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 2015008: 11 00 80 9a sethi %hi(0x2026800), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 201500c: 81 c3 e0 08 retl <== NOT EXECUTED 2015010: 90 12 23 68 or %o0, 0x368, %o0 ! 2026b68 <== NOT EXECUTED =============================================================================== 02011614 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 2011614: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 2011618: 90 10 00 18 mov %i0, %o0 201161c: 40 00 00 0b call 2011648 2011620: 92 10 00 19 mov %i1, %o1 if (nap) 2011624: 80 a2 20 00 cmp %o0, 0 2011628: 02 80 00 05 be 201163c <== NEVER TAKEN 201162c: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 2011630: f0 02 00 00 ld [ %o0 ], %i0 2011634: 81 c7 e0 08 ret 2011638: 81 e8 00 00 restore nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 201163c: 40 00 0e 73 call 2015008 <== NOT EXECUTED 2011640: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED =============================================================================== 0200ee10 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 200ee10: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 200ee14: d0 06 00 00 ld [ %i0 ], %o0 200ee18: 80 a2 20 00 cmp %o0, 0 200ee1c: 02 80 00 0e be 200ee54 <== NEVER TAKEN 200ee20: 82 10 20 00 clr %g1 200ee24: 13 00 80 6a sethi %hi(0x201a800), %o1 200ee28: 40 00 03 81 call 200fc2c 200ee2c: 92 12 61 d8 or %o1, 0x1d8, %o1 ! 201a9d8 200ee30: 80 a2 20 00 cmp %o0, 0 200ee34: 02 80 00 07 be 200ee50 <== NEVER TAKEN 200ee38: 82 10 00 18 mov %i0, %g1 default_ap = ap++; 200ee3c: 10 80 00 06 b 200ee54 200ee40: 82 10 20 00 clr %g1 for ( ; ap->name; ap++) if (ap->local_value == local_value) 200ee44: 80 a0 80 19 cmp %g2, %i1 200ee48: 02 80 00 08 be 200ee68 200ee4c: 01 00 00 00 nop const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 200ee50: b0 06 20 0c add %i0, 0xc, %i0 200ee54: c4 06 00 00 ld [ %i0 ], %g2 200ee58: 80 a0 a0 00 cmp %g2, 0 200ee5c: 32 bf ff fa bne,a 200ee44 200ee60: c4 06 20 04 ld [ %i0 + 4 ], %g2 200ee64: b0 10 00 01 mov %g1, %i0 if (ap->local_value == local_value) return ap; return default_ap; } 200ee68: 81 c7 e0 08 ret 200ee6c: 81 e8 00 00 restore =============================================================================== 0200d798 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 200d798: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 200d79c: d0 06 00 00 ld [ %i0 ], %o0 200d7a0: 80 a2 20 00 cmp %o0, 0 200d7a4: 02 80 00 0e be 200d7dc <== NEVER TAKEN 200d7a8: 82 10 20 00 clr %g1 200d7ac: 13 00 80 6a sethi %hi(0x201a800), %o1 200d7b0: 40 00 09 1f call 200fc2c 200d7b4: 92 12 60 a0 or %o1, 0xa0, %o1 ! 201a8a0 <__FUNCTION__.5942+0x18> 200d7b8: 80 a2 20 00 cmp %o0, 0 200d7bc: 02 80 00 07 be 200d7d8 <== NEVER TAKEN 200d7c0: 82 10 00 18 mov %i0, %g1 default_ap = ap++; 200d7c4: 10 80 00 06 b 200d7dc 200d7c8: 82 10 20 00 clr %g1 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 200d7cc: 80 a0 80 19 cmp %g2, %i1 200d7d0: 02 80 00 08 be 200d7f0 200d7d4: 01 00 00 00 nop const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 200d7d8: b0 06 20 0c add %i0, 0xc, %i0 200d7dc: c4 06 00 00 ld [ %i0 ], %g2 200d7e0: 80 a0 a0 00 cmp %g2, 0 200d7e4: 32 bf ff fa bne,a 200d7cc 200d7e8: c4 06 20 08 ld [ %i0 + 8 ], %g2 200d7ec: b0 10 00 01 mov %g1, %i0 if (ap->remote_value == remote_value) return ap; return default_ap; } 200d7f0: 81 c7 e0 08 ret 200d7f4: 81 e8 00 00 restore =============================================================================== 0200e524 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 200e524: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 200e528: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200e52c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e530: 40 00 02 38 call 200ee10 <== NOT EXECUTED 200e534: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 200e538: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200e53c: 32 80 00 02 bne,a 200e544 <== NOT EXECUTED 200e540: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 200e544: 81 c7 e0 08 ret <== NOT EXECUTED 200e548: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020025a4 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 20025a4: 9d e3 bf a0 save %sp, -96, %sp const char *p; if ( !name ) 20025a8: 90 96 20 00 orcc %i0, 0, %o0 20025ac: 22 80 00 26 be,a 2002644 20025b0: b2 10 20 00 clr %i1 return NULL; if ( !value ) 20025b4: 80 a6 60 00 cmp %i1, 0 20025b8: 22 80 00 24 be,a 2002648 20025bc: b0 10 00 19 mov %i1, %i0 return NULL; if ( !length ) 20025c0: 80 a6 a0 00 cmp %i2, 0 20025c4: 22 80 00 20 be,a 2002644 20025c8: b2 10 20 00 clr %i1 return NULL; value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); 20025cc: 40 00 00 21 call 2002650 20025d0: c0 2e 40 00 clrb [ %i1 ] if ( !p ) 20025d4: 80 a2 20 00 cmp %o0, 0 20025d8: 02 80 00 1a be 2002640 20025dc: b4 06 bf ff add %i2, -1, %i2 20025e0: 84 10 20 00 clr %g2 20025e4: 10 80 00 0e b 200261c 20025e8: 82 10 20 00 clr %g1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 20025f0: 80 88 a0 01 btst 1, %g2 quotes++; 20025f4: 10 80 00 07 b 2002610 20025f8: 84 00 a0 01 inc %g2 } else if ( ((quotes % 2) == 0) && *p == ' ' ) 20025fc: 32 80 00 06 bne,a 2002614 2002600: c8 2e 40 01 stb %g4, [ %i1 + %g1 ] 2002604: 80 a0 e0 20 cmp %g3, 0x20 2002608: 02 80 00 10 be 2002648 200260c: b0 10 00 19 mov %i1, %i0 break; value[i++] = *p++; 2002610: c8 2e 40 01 stb %g4, [ %i1 + %g1 ] 2002614: 82 00 60 01 inc %g1 value[i] = '\0'; 2002618: c0 2e 40 01 clrb [ %i1 + %g1 ] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 2002628: c8 0a 00 01 ldub [ %o0 + %g1 ], %g4 200262c: 80 a0 40 1a cmp %g1, %i2 2002630: 0a bf ff ef bcs 20025ec <== ALWAYS TAKEN 2002634: 80 a0 e0 22 cmp %g3, 0x22 return NULL; copy_string( p, value, length ); return value; } 2002638: 81 c7 e0 08 ret <== NOT EXECUTED 200263c: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i: const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 2002680: 9d e3 bf a0 save %sp, -96, %sp const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 2002684: 94 10 00 1a mov %i2, %o2 2002688: 90 10 00 18 mov %i0, %o0 200268c: 7f ff ff c6 call 20025a4 2002690: 92 10 00 19 mov %i1, %o1 if ( !p ) 2002694: a2 92 20 00 orcc %o0, 0, %l1 2002698: 22 80 00 1e be,a 2002710 200269c: b2 10 20 00 clr %i1 return NULL; rhs = &p[strlen(name)]; 20026a0: 40 00 35 d2 call 200fde8 20026a4: 90 10 00 18 mov %i0, %o0 if ( *rhs != '=' ) 20026a8: c2 4c 40 08 ldsb [ %l1 + %o0 ], %g1 20026ac: 80 a0 60 3d cmp %g1, 0x3d 20026b0: 12 80 00 17 bne 200270c <== NEVER TAKEN 20026b4: a2 04 40 08 add %l1, %o0, %l1 return NULL; rhs++; if ( *rhs == '\"' ) 20026b8: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 20026bc: 80 a0 60 22 cmp %g1, 0x22 20026c0: 12 80 00 03 bne 20026cc 20026c4: 84 04 60 01 add %l1, 1, %g2 rhs++; 20026c8: 84 04 60 02 add %l1, 2, %g2 20026cc: 10 80 00 05 b 20026e0 20026d0: 82 10 00 19 mov %i1, %g1 for ( d=value ; *rhs ; ) *d++ = *rhs++; 20026d4: c8 28 40 00 stb %g4, [ %g1 ] 20026d8: 84 00 a0 01 inc %g2 20026dc: 82 00 60 01 inc %g1 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 20026e0: c6 48 80 00 ldsb [ %g2 ], %g3 20026e4: 80 a0 e0 00 cmp %g3, 0 20026e8: 12 bf ff fb bne 20026d4 20026ec: c8 08 80 00 ldub [ %g2 ], %g4 *d++ = *rhs++; if ( *(d-1) == '\"' ) 20026f0: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 20026f4: 80 a0 e0 22 cmp %g3, 0x22 20026f8: 12 80 00 03 bne 2002704 20026fc: 84 00 7f ff add %g1, -1, %g2 2002700: 82 10 00 02 mov %g2, %g1 d--; *d = '\0'; return value; 2002704: 10 80 00 03 b 2002710 2002708: c0 28 40 00 clrb [ %g1 ] 200270c: b2 10 20 00 clr %i1 <== NOT EXECUTED } 2002710: 81 c7 e0 08 ret 2002714: 91 e8 00 19 restore %g0, %i1, %o0 =============================================================================== 02003178 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 2003178: 9d e3 bf 60 save %sp, -160, %sp Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 200317c: 80 a6 60 00 cmp %i1, 0 2003180: 02 80 00 69 be 2003324 <== NEVER TAKEN 2003184: ae 07 bf f0 add %fp, -16, %l7 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 2003188: 40 00 14 7a call 2008370 <_TOD_Get_uptime> 200318c: 90 10 00 17 mov %l7, %o0 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 2003190: 92 10 00 17 mov %l7, %o1 2003194: ba 07 bf e8 add %fp, -24, %i5 2003198: 11 00 80 a9 sethi %hi(0x202a400), %o0 200319c: 94 10 00 1d mov %i5, %o2 20031a0: 40 00 1e c5 call 200acb4 <_Timespec_Subtract> 20031a4: 90 12 23 d8 or %o0, 0x3d8, %o0 } } } #endif (*print)( 20031a8: 90 10 00 18 mov %i0, %o0 20031ac: 13 00 80 7e sethi %hi(0x201f800), %o1 20031b0: 21 00 80 a8 sethi %hi(0x202a000), %l0 20031b4: 92 12 60 18 or %o1, 0x18, %o1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 20031b8: 39 00 80 7e sethi %hi(0x201f800), %i4 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 20031bc: 2d 00 80 a8 sethi %hi(0x202a000), %l6 /* * Print the information */ (*print)( context, 20031c0: 37 00 80 7e sethi %hi(0x201f800), %i3 } } } #endif (*print)( 20031c4: 9f c6 40 00 call %i1 20031c8: 35 00 80 a8 sethi %hi(0x202a000), %i2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 20031cc: a8 07 bf c8 add %fp, -56, %l4 } } } #endif (*print)( 20031d0: a0 14 21 74 or %l0, 0x174, %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 20031d4: b8 17 21 90 or %i4, 0x190, %i4 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 20031d8: ac 15 a2 d0 or %l6, 0x2d0, %l6 /* * Print the information */ (*print)( context, 20031dc: b6 16 e1 a8 or %i3, 0x1a8, %i3 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 20031e0: b4 16 a2 d8 or %i2, 0x2d8, %i2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 20031e4: a6 07 bf e0 add %fp, -32, %l3 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 20031e8: c2 04 00 00 ld [ %l0 ], %g1 20031ec: 80 a0 60 00 cmp %g1, 0 20031f0: 22 80 00 3f be,a 20032ec 20031f4: a0 04 20 04 add %l0, 4, %l0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 20031f8: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( information ) { 20031fc: a2 10 20 01 mov 1, %l1 2003200: 80 a4 a0 00 cmp %l2, 0 2003204: 12 80 00 33 bne 20032d0 <== ALWAYS TAKEN 2003208: aa 07 bf d8 add %fp, -40, %l5 for ( i=1 ; i <= information->maximum ; i++ ) { 200320c: 10 80 00 38 b 20032ec <== NOT EXECUTED 2003210: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 2003214: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 2003218: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !the_thread ) 200321c: 80 a0 60 00 cmp %g1, 0 2003220: 02 80 00 2c be 20032d0 <== NEVER TAKEN 2003224: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2003228: d0 00 60 08 ld [ %g1 + 8 ], %o0 200322c: 40 00 0f 63 call 2006fb8 2003230: c2 27 bf c4 st %g1, [ %fp + -60 ] (*print)( 2003234: c2 07 bf c4 ld [ %fp + -60 ], %g1 2003238: 90 10 00 18 mov %i0, %o0 200323c: d4 00 60 08 ld [ %g1 + 8 ], %o2 2003240: 92 10 00 1c mov %i4, %o1 2003244: 9f c6 40 00 call %i1 2003248: 96 10 00 14 mov %l4, %o3 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 200324c: c2 07 bf c4 ld [ %fp + -60 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2003250: c4 05 80 00 ld [ %l6 ], %g2 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 2003254: c6 00 60 84 ld [ %g1 + 0x84 ], %g3 2003258: c6 27 bf e0 st %g3, [ %fp + -32 ] 200325c: c6 00 60 88 ld [ %g1 + 0x88 ], %g3 2003260: c6 27 bf e4 st %g3, [ %fp + -28 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2003264: c4 00 a0 08 ld [ %g2 + 8 ], %g2 2003268: c2 00 60 08 ld [ %g1 + 8 ], %g1 200326c: 80 a0 80 01 cmp %g2, %g1 2003270: 12 80 00 0a bne 2003298 2003274: 94 07 bf fc add %fp, -4, %o2 Timestamp_Control used; _Timestamp_Subtract( 2003278: 90 10 00 1a mov %i2, %o0 200327c: 92 10 00 17 mov %l7, %o1 2003280: 40 00 1e 8d call 200acb4 <_Timespec_Subtract> 2003284: 94 10 00 15 mov %l5, %o2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 2003288: 90 10 00 13 mov %l3, %o0 200328c: 40 00 1d de call 200aa04 <_Timespec_Add_to> 2003290: 92 10 00 15 mov %l5, %o1 }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 2003294: 94 07 bf fc add %fp, -4, %o2 2003298: 96 07 bf f8 add %fp, -8, %o3 200329c: 90 10 00 13 mov %l3, %o0 20032a0: 40 00 1d f3 call 200aa6c <_Timespec_Divide> 20032a4: 92 10 00 1d mov %i5, %o1 /* * Print the information */ (*print)( context, 20032a8: d0 07 bf e4 ld [ %fp + -28 ], %o0 20032ac: 40 00 69 2f call 201d768 <.udiv> 20032b0: 92 10 23 e8 mov 0x3e8, %o1 20032b4: d4 07 bf e0 ld [ %fp + -32 ], %o2 20032b8: d8 07 bf fc ld [ %fp + -4 ], %o4 20032bc: da 07 bf f8 ld [ %fp + -8 ], %o5 20032c0: 96 10 00 08 mov %o0, %o3 20032c4: 92 10 00 1b mov %i3, %o1 20032c8: 9f c6 40 00 call %i1 20032cc: 90 10 00 18 mov %i0, %o0 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 20032d0: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 20032d4: 94 10 00 14 mov %l4, %o2 20032d8: 92 10 20 0d mov 0xd, %o1 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 20032dc: 80 a4 40 01 cmp %l1, %g1 20032e0: 08 bf ff cd bleu 2003214 20032e4: 85 2c 60 02 sll %l1, 2, %g2 20032e8: a0 04 20 04 add %l0, 4, %l0 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 20032ec: 03 00 80 a8 sethi %hi(0x202a000), %g1 20032f0: 82 10 61 84 or %g1, 0x184, %g1 ! 202a184 <_Objects_Information_table+0x14> 20032f4: 80 a4 00 01 cmp %l0, %g1 20032f8: 32 bf ff bd bne,a 20031ec 20032fc: c2 04 00 00 ld [ %l0 ], %g1 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 2003300: d0 07 bf ec ld [ %fp + -20 ], %o0 2003304: 40 00 69 19 call 201d768 <.udiv> 2003308: 92 10 23 e8 mov 0x3e8, %o1 200330c: d4 07 bf e8 ld [ %fp + -24 ], %o2 2003310: 96 10 00 08 mov %o0, %o3 2003314: 13 00 80 7e sethi %hi(0x201f800), %o1 2003318: 90 10 00 18 mov %i0, %o0 200331c: 9f c6 40 00 call %i1 2003320: 92 12 61 c0 or %o1, 0x1c0, %o1 2003324: 81 c7 e0 08 ret 2003328: 81 e8 00 00 restore =============================================================================== 0200e4f0 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 200e4f0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 200e4f4: 11 00 80 6a sethi %hi(0x201a800), %o0 <== NOT EXECUTED 200e4f8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 200e4fc: 40 00 00 0a call 200e524 <== NOT EXECUTED 200e500: 90 12 21 50 or %o0, 0x150, %o0 <== NOT EXECUTED 200e504: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 200e508: 02 80 00 05 be 200e51c <== NOT EXECUTED 200e50c: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 200e510: 40 00 02 60 call 200ee90 <__errno> <== NOT EXECUTED 200e514: 01 00 00 00 nop <== NOT EXECUTED 200e518: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 200e51c: 81 c7 e0 08 ret <== NOT EXECUTED 200e520: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02007a08 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 2007a08: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 2007a0c: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 2007a10: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 2007a14: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 2007a18: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 2007a1c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 2007a20: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2007a24: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2007a28: 7f ff ff 7d call 200781c <== NOT EXECUTED 2007a2c: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 2007a30: 81 c7 e0 08 ret <== NOT EXECUTED 2007a34: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 0200246c : } int rtems_filesystem_dirname( const char *pathname ) { 200246c: 9d e3 bf a0 save %sp, -96, %sp int len = strlen( pathname ); 2002470: 40 00 36 40 call 200fd70 2002474: 90 10 00 18 mov %i0, %o0 while ( len ) { 2002478: 10 80 00 0a b 20024a0 200247c: b0 06 00 08 add %i0, %o0, %i0 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 2002480: 80 a0 60 5c cmp %g1, 0x5c 2002484: 02 80 00 0a be 20024ac <== NEVER TAKEN 2002488: 90 02 3f ff add %o0, -1, %o0 200248c: 80 a0 60 2f cmp %g1, 0x2f 2002490: 02 80 00 07 be 20024ac 2002494: 80 a0 60 00 cmp %g1, 0 2002498: 02 80 00 05 be 20024ac <== NEVER TAKEN 200249c: b0 06 3f ff add %i0, -1, %i0 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 20024a0: 80 a2 20 00 cmp %o0, 0 20024a4: 32 bf ff f7 bne,a 2002480 20024a8: c2 4e 3f ff ldsb [ %i0 + -1 ], %g1 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 20024ac: 81 c7 e0 08 ret 20024b0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020025a4 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 20025a4: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 20025a8: 80 a6 20 00 cmp %i0, 0 20025ac: 12 80 00 06 bne 20025c4 <== ALWAYS TAKEN 20025b0: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); 20025b4: 40 00 32 37 call 200ee90 <__errno> <== NOT EXECUTED 20025b8: 01 00 00 00 nop <== NOT EXECUTED 20025bc: 10 80 00 07 b 20025d8 <== NOT EXECUTED 20025c0: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED if ( !pathloc ) 20025c4: 32 80 00 08 bne,a 20025e4 <== ALWAYS TAKEN 20025c8: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 20025cc: 40 00 32 31 call 200ee90 <__errno> <== NOT EXECUTED 20025d0: 01 00 00 00 nop <== NOT EXECUTED 20025d4: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 20025d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 20025dc: 81 c7 e0 08 ret <== NOT EXECUTED 20025e0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 20025e4: 80 a0 60 5c cmp %g1, 0x5c 20025e8: 22 80 00 08 be,a 2002608 <== NEVER TAKEN 20025ec: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 20025f0: 80 a0 60 2f cmp %g1, 0x2f 20025f4: 22 80 00 05 be,a 2002608 20025f8: 03 00 80 6c sethi %hi(0x201b000), %g1 20025fc: 80 a0 60 00 cmp %g1, 0 2002600: 12 80 00 09 bne 2002624 <== ALWAYS TAKEN 2002604: 03 00 80 6c sethi %hi(0x201b000), %g1 2002608: d2 00 63 10 ld [ %g1 + 0x310 ], %o1 ! 201b310 200260c: 90 10 00 1b mov %i3, %o0 2002610: 92 02 60 18 add %o1, 0x18, %o1 2002614: 40 00 34 5b call 200f780 2002618: 94 10 20 14 mov 0x14, %o2 200261c: 10 80 00 08 b 200263c 2002620: 82 10 20 01 mov 1, %g1 2002624: d2 00 63 10 ld [ %g1 + 0x310 ], %o1 2002628: 90 10 00 1b mov %i3, %o0 200262c: 92 02 60 04 add %o1, 4, %o1 2002630: 40 00 34 54 call 200f780 2002634: 94 10 20 14 mov 0x14, %o2 2002638: 82 10 20 00 clr %g1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 200263c: b2 26 40 01 sub %i1, %g1, %i1 2002640: 7f ff ff 9d call 20024b4 2002644: 91 ee 00 01 restore %i0, %g1, %o0 =============================================================================== 020024b4 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 20024b4: 9d e3 bf a0 save %sp, -96, %sp 20024b8: 90 10 00 18 mov %i0, %o0 /* * Verify Input parameters. */ if ( !pathname ) 20024bc: 80 a6 20 00 cmp %i0, 0 20024c0: 12 80 00 06 bne 20024d8 <== ALWAYS TAKEN 20024c4: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EFAULT ); 20024c8: 40 00 32 72 call 200ee90 <__errno> <== NOT EXECUTED 20024cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20024d0: 10 80 00 2d b 2002584 <== NOT EXECUTED 20024d4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED if ( !pathloc ) 20024d8: 80 a6 e0 00 cmp %i3, 0 20024dc: 32 80 00 06 bne,a 20024f4 <== ALWAYS TAKEN 20024e0: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 20024e4: 40 00 32 6b call 200ee90 <__errno> <== NOT EXECUTED 20024e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20024ec: 10 80 00 26 b 2002584 <== NOT EXECUTED 20024f0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 20024f4: c2 00 40 00 ld [ %g1 ], %g1 20024f8: 80 a0 60 00 cmp %g1, 0 20024fc: 02 80 00 1f be 2002578 <== NEVER TAKEN 2002500: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 2002504: 9f c0 40 00 call %g1 2002508: 96 10 00 1b mov %i3, %o3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 200250c: b0 92 20 00 orcc %o0, 0, %i0 2002510: 12 80 00 1e bne 2002588 2002514: 80 a7 20 00 cmp %i4, 0 2002518: 02 80 00 21 be 200259c 200251c: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 2002520: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 2002524: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 2002528: 80 a0 60 00 cmp %g1, 0 200252c: 22 80 00 0e be,a 2002564 <== NEVER TAKEN 2002530: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 2002534: 9f c0 40 00 call %g1 2002538: 90 10 00 1b mov %i3, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 200253c: 90 02 3f fd add %o0, -3, %o0 2002540: 80 a2 20 01 cmp %o0, 1 2002544: 18 80 00 16 bgu 200259c 2002548: 01 00 00 00 nop ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 200254c: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 2002550: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 2002554: 80 a0 60 00 cmp %g1, 0 2002558: 12 80 00 0e bne 2002590 <== ALWAYS TAKEN 200255c: 90 10 00 1b mov %i3, %o0 rtems_filesystem_freenode( pathloc ); 2002560: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2002564: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002568: 02 80 00 04 be 2002578 <== NOT EXECUTED 200256c: 01 00 00 00 nop <== NOT EXECUTED 2002570: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002574: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2002578: 40 00 32 46 call 200ee90 <__errno> <== NOT EXECUTED 200257c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002580: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2002584: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002588: 81 c7 e0 08 ret 200258c: 81 e8 00 00 restore * 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 ); 2002590: 9f c0 40 00 call %g1 2002594: 92 10 00 1a mov %i2, %o1 2002598: b0 10 00 08 mov %o0, %i0 } } return result; } 200259c: 81 c7 e0 08 ret 20025a0: 81 e8 00 00 restore =============================================================================== 02002318 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 2002318: 9d e3 bf 88 save %sp, -120, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 200231c: 23 00 80 6c sethi %hi(0x201b000), %l1 2002320: c2 04 63 10 ld [ %l1 + 0x310 ], %g1 ! 201b310 2002324: 84 10 20 12 mov 0x12, %g2 init_fs_mount_table(); 2002328: 40 00 01 8a call 2002950 200232c: c4 20 60 2c st %g2, [ %g1 + 0x2c ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 2002330: 03 00 80 67 sethi %hi(0x2019c00), %g1 2002334: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 ! 2019d40 rtems_fatal_error_occurred( 0xABCD0001 ); 2002338: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 200233c: 80 a0 60 00 cmp %g1, 0 2002340: 02 80 00 0f be 200237c <== NEVER TAKEN 2002344: 90 12 20 01 or %o0, 1, %o0 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 2002348: 03 00 80 6c sethi %hi(0x201b000), %g1 200234c: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 201b15c status = mount( 2002350: 90 07 bf fc add %fp, -4, %o0 2002354: d8 00 60 0c ld [ %g1 + 0xc ], %o4 2002358: d2 00 40 00 ld [ %g1 ], %o1 200235c: d4 00 60 04 ld [ %g1 + 4 ], %o2 2002360: 40 00 01 84 call 2002970 2002364: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 2002368: 80 a2 3f ff cmp %o0, -1 200236c: 32 80 00 06 bne,a 2002384 <== ALWAYS TAKEN 2002370: d0 04 63 10 ld [ %l1 + 0x310 ], %o0 rtems_fatal_error_occurred( 0xABCD0002 ); 2002374: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 2002378: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 200237c: 40 00 0f 67 call 2006118 <== NOT EXECUTED 2002380: 01 00 00 00 nop <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 2002384: d2 07 bf fc ld [ %fp + -4 ], %o1 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 2002388: c0 32 20 30 clrh [ %o0 + 0x30 ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 200238c: 92 02 60 1c add %o1, 0x1c, %o1 2002390: 94 10 20 14 mov 0x14, %o2 2002394: 40 00 34 fb call 200f780 2002398: 90 02 20 18 add %o0, 0x18, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 200239c: a0 07 bf e8 add %fp, -24, %l0 20023a0: 98 10 20 00 clr %o4 20023a4: 96 10 00 10 mov %l0, %o3 20023a8: 25 00 80 68 sethi %hi(0x201a000), %l2 20023ac: 92 10 20 01 mov 1, %o1 20023b0: 94 10 20 00 clr %o2 20023b4: 40 00 00 7c call 20025a4 20023b8: 90 14 a1 20 or %l2, 0x120, %o0 rtems_filesystem_root = loc; 20023bc: d0 04 63 10 ld [ %l1 + 0x310 ], %o0 20023c0: 92 10 00 10 mov %l0, %o1 20023c4: 94 10 20 14 mov 0x14, %o2 20023c8: 40 00 34 ee call 200f780 20023cc: 90 02 20 18 add %o0, 0x18, %o0 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 20023d0: 96 10 00 10 mov %l0, %o3 20023d4: 98 10 20 00 clr %o4 20023d8: 92 10 20 01 mov 1, %o1 20023dc: 94 10 20 00 clr %o2 20023e0: 40 00 00 71 call 20025a4 20023e4: 90 14 a1 20 or %l2, 0x120, %o0 rtems_filesystem_current = loc; 20023e8: d0 04 63 10 ld [ %l1 + 0x310 ], %o0 20023ec: 92 10 00 10 mov %l0, %o1 20023f0: 94 10 20 14 mov 0x14, %o2 20023f4: 40 00 34 e3 call 200f780 20023f8: 90 02 20 04 add %o0, 4, %o0 * * 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); 20023fc: 92 10 21 ff mov 0x1ff, %o1 2002400: 11 00 80 68 sethi %hi(0x201a000), %o0 2002404: 40 00 00 fe call 20027fc 2002408: 90 12 21 28 or %o0, 0x128, %o0 ! 201a128 if ( status != 0 ) 200240c: 80 a2 20 00 cmp %o0, 0 2002410: 02 80 00 04 be 2002420 <== ALWAYS TAKEN 2002414: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 2002418: 10 bf ff d9 b 200237c <== NOT EXECUTED 200241c: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 2002420: 81 c7 e0 08 ret 2002424: 81 e8 00 00 restore =============================================================================== 02009570 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 2009570: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2009574: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 2009578: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 200957c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 2009580: 81 c3 e0 08 retl <== NOT EXECUTED 2009584: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02002428 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 2002428: 82 10 00 08 mov %o0, %g1 200242c: 90 10 20 00 clr %o0 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 2002430: 80 a2 40 08 cmp %o1, %o0 2002434: 02 80 00 0c be 2002464 <== NEVER TAKEN 2002438: c4 08 40 08 ldub [ %g1 + %o0 ], %g2 200243c: 85 28 a0 18 sll %g2, 0x18, %g2 2002440: 85 38 a0 18 sra %g2, 0x18, %g2 2002444: 80 a0 a0 00 cmp %g2, 0 2002448: 02 80 00 07 be 2002464 <== NEVER TAKEN 200244c: 80 a0 a0 5c cmp %g2, 0x5c 2002450: 22 bf ff f8 be,a 2002430 <== NEVER TAKEN 2002454: 90 02 20 01 inc %o0 <== NOT EXECUTED 2002458: 80 a0 a0 2f cmp %g2, 0x2f 200245c: 22 bf ff f5 be,a 2002430 2002460: 90 02 20 01 inc %o0 pathname++; pathnamelen--; stripped++; } return stripped; } 2002464: 81 c3 e0 08 retl =============================================================================== 020021d0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 20021d0: 9d e3 bf 88 save %sp, -120, %sp <== 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 ); 20021d4: 40 00 36 e7 call 200fd70 <== NOT EXECUTED 20021d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20021dc: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 20021e0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 20021e4: 94 10 20 00 clr %o2 <== NOT EXECUTED 20021e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20021ec: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 20021f0: 40 00 00 ed call 20025a4 <== NOT EXECUTED 20021f4: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 20021f8: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== 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 ); 20021fc: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 2002200: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 2002204: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002208: 12 80 00 0e bne 2002240 <== NOT EXECUTED 200220c: e4 07 bf ec ld [ %fp + -20 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2002210: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2002214: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002218: 02 80 00 04 be 2002228 <== NOT EXECUTED 200221c: 01 00 00 00 nop <== NOT EXECUTED 2002220: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002224: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2002228: 40 00 33 1a call 200ee90 <__errno> <== NOT EXECUTED 200222c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002230: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2002234: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002238: 81 c7 e0 08 ret <== NOT EXECUTED 200223c: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 2002240: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002244: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 2002248: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 200224c: 12 80 00 05 bne 2002260 <== NOT EXECUTED 2002250: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 2002254: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2002258: 22 80 00 0d be,a 200228c <== NOT EXECUTED 200225c: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2002260: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002264: 02 80 00 1c be 20022d4 <== NOT EXECUTED 2002268: 01 00 00 00 nop <== NOT EXECUTED 200226c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2002270: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002274: 02 80 00 18 be 20022d4 <== NOT EXECUTED 2002278: 01 00 00 00 nop <== NOT EXECUTED 200227c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002280: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 2002284: 81 c7 e0 08 ret <== NOT EXECUTED 2002288: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 200228c: 40 00 36 b9 call 200fd70 <== NOT EXECUTED 2002290: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2002294: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 2002298: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 200229c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; 20022a0: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 20022a4: c4 04 a0 54 ld [ %l2 + 0x54 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 20022a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20022ac: 02 80 00 0c be 20022dc <== NOT EXECUTED 20022b0: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 20022b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20022b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20022bc: 02 80 00 08 be 20022dc <== NOT EXECUTED 20022c0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20022c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20022c8: b0 10 20 00 clr %i0 <== NOT EXECUTED 20022cc: 81 c7 e0 08 ret <== NOT EXECUTED 20022d0: 81 e8 00 00 restore <== NOT EXECUTED 20022d4: 81 c7 e0 08 ret <== NOT EXECUTED 20022d8: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED 20022dc: b0 10 20 00 clr %i0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 20022e0: 81 c7 e0 08 ret <== NOT EXECUTED 20022e4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02008974 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 2008974: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 2008978: 80 a6 20 00 cmp %i0, 0 200897c: 02 80 00 1d be 20089f0 <== NEVER TAKEN 2008980: 21 00 80 a8 sethi %hi(0x202a000), %l0 2008984: a0 14 21 74 or %l0, 0x174, %l0 ! 202a174 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 2008988: a6 04 20 10 add %l0, 0x10, %l3 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 200898c: c2 04 00 00 ld [ %l0 ], %g1 2008990: 80 a0 60 00 cmp %g1, 0 2008994: 22 80 00 14 be,a 20089e4 2008998: a0 04 20 04 add %l0, 4, %l0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 200899c: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( !information ) 20089a0: 80 a4 a0 00 cmp %l2, 0 20089a4: 12 80 00 0b bne 20089d0 20089a8: a2 10 20 01 mov 1, %l1 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 20089ac: 10 80 00 0e b 20089e4 20089b0: a0 04 20 04 add %l0, 4, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 20089b4: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 20089b8: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !the_thread ) 20089bc: 80 a2 20 00 cmp %o0, 0 20089c0: 02 80 00 04 be 20089d0 <== NEVER TAKEN 20089c4: a2 04 60 01 inc %l1 continue; (*routine)(the_thread); 20089c8: 9f c6 00 00 call %i0 20089cc: 01 00 00 00 nop information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 20089d0: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 20089d4: 80 a4 40 01 cmp %l1, %g1 20089d8: 08 bf ff f7 bleu 20089b4 20089dc: 85 2c 60 02 sll %l1, 2, %g2 20089e0: a0 04 20 04 add %l0, 4, %l0 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 20089e4: 80 a4 00 13 cmp %l0, %l3 20089e8: 32 bf ff ea bne,a 2008990 20089ec: c2 04 00 00 ld [ %l0 ], %g1 20089f0: 81 c7 e0 08 ret 20089f4: 81 e8 00 00 restore =============================================================================== 0200ad14 : * 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 ) { 200ad14: 9d e3 bf 98 save %sp, -104, %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 ); 200ad18: 03 00 80 6e sethi %hi(0x201b800), %g1 200ad1c: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 201bb58 200ad20: 92 10 20 00 clr %o1 200ad24: 7f ff eb 54 call 2005a74 200ad28: 94 10 20 00 clr %o2 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 200ad2c: 21 00 80 6e sethi %hi(0x201b800), %l0 200ad30: c2 04 23 54 ld [ %l0 + 0x354 ], %g1 ! 201bb54 200ad34: 80 a0 60 00 cmp %g1, 0 200ad38: 02 80 00 26 be 200add0 200ad3c: b0 10 20 00 clr %i0 rc = rtems_semaphore_create( 200ad40: 05 00 80 6e sethi %hi(0x201b800), %g2 200ad44: c4 00 a3 50 ld [ %g2 + 0x350 ], %g2 ! 201bb50 200ad48: 92 10 20 01 mov 1, %o1 200ad4c: 82 20 40 02 sub %g1, %g2, %g1 200ad50: 83 38 60 03 sra %g1, 3, %g1 200ad54: 87 28 60 06 sll %g1, 6, %g3 200ad58: 85 28 60 03 sll %g1, 3, %g2 200ad5c: 84 20 c0 02 sub %g3, %g2, %g2 200ad60: 87 28 a0 06 sll %g2, 6, %g3 200ad64: 84 00 80 03 add %g2, %g3, %g2 200ad68: 84 00 80 01 add %g2, %g1, %g2 200ad6c: 87 28 a0 0f sll %g2, 0xf, %g3 200ad70: 84 20 c0 02 sub %g3, %g2, %g2 200ad74: 07 13 10 92 sethi %hi(0x4c424800), %g3 200ad78: 85 28 a0 03 sll %g2, 3, %g2 200ad7c: 86 10 e1 00 or %g3, 0x100, %g3 200ad80: 82 00 80 01 add %g2, %g1, %g1 200ad84: 94 10 20 54 mov 0x54, %o2 200ad88: 96 10 20 00 clr %o3 200ad8c: 90 10 40 03 or %g1, %g3, %o0 200ad90: 7f ff ea 97 call 20057ec 200ad94: 98 07 bf fc add %fp, -4, %o4 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 200ad98: 80 a2 20 00 cmp %o0, 0 200ad9c: 32 80 00 0d bne,a 200add0 <== NEVER TAKEN 200ada0: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 200ada4: f0 04 23 54 ld [ %l0 + 0x354 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); 200ada8: 92 10 20 00 clr %o1 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 200adac: e2 06 20 38 ld [ %i0 + 0x38 ], %l1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 200adb0: 90 10 00 18 mov %i0, %o0 200adb4: 40 00 12 b2 call 200f87c 200adb8: 94 10 20 48 mov 0x48, %o2 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 200adbc: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_libio_iop_freelist = next; 200adc0: e2 24 23 54 st %l1, [ %l0 + 0x354 ] goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 200adc4: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 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; 200adc8: 82 10 21 00 mov 0x100, %g1 200adcc: c2 26 20 18 st %g1, [ %i0 + 0x18 ] } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200add0: 03 00 80 6e sethi %hi(0x201b800), %g1 200add4: 7f ff eb 6f call 2005b90 200add8: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 201bb58 iop = 0; done: rtems_libio_unlock(); return iop; } 200addc: 81 c7 e0 08 ret 200ade0: 81 e8 00 00 restore =============================================================================== 0200acb4 : */ void rtems_libio_free( rtems_libio_t *iop ) { 200acb4: 9d e3 bf a0 save %sp, -96, %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 ); 200acb8: 03 00 80 6e sethi %hi(0x201b800), %g1 200acbc: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 201bb58 200acc0: 92 10 20 00 clr %o1 200acc4: 7f ff eb 6c call 2005a74 200acc8: 94 10 20 00 clr %o2 rtems_libio_lock(); if (iop->sem) 200accc: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 200acd0: 80 a2 20 00 cmp %o0, 0 200acd4: 02 80 00 04 be 200ace4 <== NEVER TAKEN 200acd8: a0 10 00 18 mov %i0, %l0 rtems_semaphore_delete(iop->sem); 200acdc: 7f ff eb 38 call 20059bc 200ace0: 01 00 00 00 nop iop->flags &= ~LIBIO_FLAGS_OPEN; 200ace4: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200ace8: 07 00 80 6e sethi %hi(0x201b800), %g3 iop->data1 = rtems_libio_iop_freelist; 200acec: 03 00 80 6e sethi %hi(0x201b800), %g1 200acf0: f0 00 e3 58 ld [ %g3 + 0x358 ], %i0 200acf4: c6 00 63 54 ld [ %g1 + 0x354 ], %g3 rtems_libio_iop_freelist = iop; 200acf8: e0 20 63 54 st %l0, [ %g1 + 0x354 ] rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 200acfc: 82 08 be ff and %g2, -257, %g1 iop->data1 = rtems_libio_iop_freelist; 200ad00: c6 24 20 38 st %g3, [ %l0 + 0x38 ] rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 200ad04: c2 24 20 18 st %g1, [ %l0 + 0x18 ] 200ad08: 7f ff eb a2 call 2005b90 200ad0c: 81 e8 00 00 restore =============================================================================== 0200264c : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 200264c: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 2002650: 21 00 80 6c sethi %hi(0x201b000), %l0 2002654: d0 04 21 54 ld [ %l0 + 0x154 ], %o0 ! 201b154 2002658: 80 a2 20 00 cmp %o0, 0 200265c: 22 80 00 18 be,a 20026bc <== NEVER TAKEN 2002660: 11 13 10 92 sethi %hi(0x4c424800), %o0 <== NOT EXECUTED { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 2002664: 40 00 20 6b call 200a810 2002668: 92 10 20 48 mov 0x48, %o1 200266c: 03 00 80 6e sethi %hi(0x201b800), %g1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 2002670: 80 a2 20 00 cmp %o0, 0 2002674: 12 80 00 04 bne 2002684 <== ALWAYS TAKEN 2002678: d0 20 63 50 st %o0, [ %g1 + 0x350 ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 200267c: 10 80 00 1a b 20026e4 <== NOT EXECUTED 2002680: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 2002684: 05 00 80 6e sethi %hi(0x201b800), %g2 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 2002688: c8 04 21 54 ld [ %l0 + 0x154 ], %g4 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 200268c: d0 20 a3 54 st %o0, [ %g2 + 0x354 ] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 2002690: 82 10 00 08 mov %o0, %g1 2002694: 10 80 00 03 b 20026a0 2002698: 84 10 20 00 clr %g2 iop->data1 = iop + 1; 200269c: c2 20 7f f0 st %g1, [ %g1 + -16 ] 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++) 20026a0: 84 00 a0 01 inc %g2 iop->data1 = iop + 1; 20026a4: 86 10 00 01 mov %g1, %g3 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++) 20026a8: 80 a0 80 04 cmp %g2, %g4 20026ac: 0a bf ff fc bcs 200269c 20026b0: 82 00 60 48 add %g1, 0x48, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 20026b4: c0 20 e0 38 clr [ %g3 + 0x38 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 20026b8: 11 13 10 92 sethi %hi(0x4c424800), %o0 20026bc: 92 10 20 01 mov 1, %o1 20026c0: 90 12 21 4f or %o0, 0x14f, %o0 20026c4: 94 10 20 54 mov 0x54, %o2 20026c8: 96 10 20 00 clr %o3 20026cc: 19 00 80 6e sethi %hi(0x201b800), %o4 20026d0: 40 00 0c 47 call 20057ec 20026d4: 98 13 23 58 or %o4, 0x358, %o4 ! 201bb58 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 20026d8: 80 a2 20 00 cmp %o0, 0 20026dc: 02 80 00 04 be 20026ec <== ALWAYS TAKEN 20026e0: 03 00 80 6c sethi %hi(0x201b000), %g1 rtems_fatal_error_occurred( rc ); 20026e4: 40 00 0e 8d call 2006118 <== NOT EXECUTED 20026e8: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 20026ec: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 20026f0: 80 a0 60 00 cmp %g1, 0 20026f4: 02 80 00 04 be 2002704 <== NEVER TAKEN 20026f8: 01 00 00 00 nop (* rtems_fs_init_helper)(); 20026fc: 9f c0 40 00 call %g1 2002700: 01 00 00 00 nop 2002704: 81 c7 e0 08 ret 2002708: 81 e8 00 00 restore =============================================================================== 0200417c : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 200417c: 9d e3 bf 88 save %sp, -120, %sp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 2004180: 90 10 20 00 clr %o0 2004184: 92 10 20 00 clr %o1 2004188: 40 00 0b 62 call 2006f10 200418c: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 2004190: b0 92 20 00 orcc %o0, 0, %i0 2004194: 12 80 00 19 bne 20041f8 <== NEVER TAKEN 2004198: 21 00 80 76 sethi %hi(0x201d800), %l0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 200419c: c4 04 21 d8 ld [ %l0 + 0x1d8 ], %g2 ! 201d9d8 20041a0: 03 00 80 78 sethi %hi(0x201e000), %g1 20041a4: 82 10 62 80 or %g1, 0x280, %g1 ! 201e280 20041a8: 80 a0 80 01 cmp %g2, %g1 20041ac: 12 80 00 15 bne 2004200 20041b0: a4 14 21 d8 or %l0, 0x1d8, %l2 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 20041b4: 7f ff fc db call 2003520 20041b8: 90 10 20 48 mov 0x48, %o0 if (!tmp) 20041bc: a2 92 20 00 orcc %o0, 0, %l1 20041c0: 12 80 00 04 bne 20041d0 <== ALWAYS TAKEN 20041c4: 92 10 00 12 mov %l2, %o1 20041c8: 81 c7 e0 08 ret <== NOT EXECUTED 20041cc: 91 e8 20 1a restore %g0, 0x1a, %o0 <== 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); 20041d0: 90 10 20 00 clr %o0 20041d4: 15 00 80 10 sethi %hi(0x2004000), %o2 20041d8: 40 00 0b a4 call 2007068 20041dc: 94 12 a0 48 or %o2, 0x48, %o2 ! 2004048 if (sc != RTEMS_SUCCESSFUL) { 20041e0: 82 92 20 00 orcc %o0, 0, %g1 20041e4: 22 80 00 07 be,a 2004200 <== ALWAYS TAKEN 20041e8: e2 24 21 d8 st %l1, [ %l0 + 0x1d8 ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 20041ec: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 20041f0: 7f ff fb 41 call 2002ef4 <== NOT EXECUTED 20041f4: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return sc; 20041f8: 81 c7 e0 08 ret <== NOT EXECUTED 20041fc: 81 e8 00 00 restore <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 2004200: 23 00 80 76 sethi %hi(0x201d800), %l1 2004204: e0 04 61 d8 ld [ %l1 + 0x1d8 ], %l0 ! 201d9d8 2004208: 94 10 20 48 mov 0x48, %o2 200420c: 90 10 00 10 mov %l0, %o0 2004210: 13 00 80 78 sethi %hi(0x201e000), %o1 2004214: 40 00 34 c3 call 2011520 2004218: 92 12 62 80 or %o1, 0x280, %o1 ! 201e280 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 200421c: 03 00 80 78 sethi %hi(0x201e000), %g1 2004220: d2 00 62 68 ld [ %g1 + 0x268 ], %o1 ! 201e268 } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 2004224: c2 07 bf fc ld [ %fp + -4 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 2004228: 92 02 60 1c add %o1, 0x1c, %o1 } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 200422c: c2 24 00 00 st %g1, [ %l0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 2004230: 90 04 20 18 add %l0, 0x18, %o0 2004234: 40 00 34 bb call 2011520 2004238: 94 10 20 14 mov 0x14, %o2 * 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); 200423c: a0 07 bf e8 add %fp, -24, %l0 2004240: 98 10 20 00 clr %o4 2004244: 96 10 00 10 mov %l0, %o3 2004248: 25 00 80 71 sethi %hi(0x201c400), %l2 200424c: 92 10 20 01 mov 1, %o1 2004250: 94 10 20 00 clr %o2 2004254: 7f ff fa fe call 2002e4c 2004258: 90 14 a3 00 or %l2, 0x300, %o0 rtems_filesystem_root = loc; 200425c: d0 04 61 d8 ld [ %l1 + 0x1d8 ], %o0 2004260: 92 10 00 10 mov %l0, %o1 2004264: 94 10 20 14 mov 0x14, %o2 2004268: 40 00 34 ae call 2011520 200426c: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 2004270: 92 10 20 01 mov 1, %o1 2004274: 94 10 20 00 clr %o2 2004278: 90 14 a3 00 or %l2, 0x300, %o0 200427c: 96 10 00 10 mov %l0, %o3 2004280: 7f ff fa f3 call 2002e4c 2004284: 98 10 20 00 clr %o4 rtems_filesystem_current = loc; 2004288: d0 04 61 d8 ld [ %l1 + 0x1d8 ], %o0 200428c: 92 10 00 10 mov %l0, %o1 2004290: 90 02 20 04 add %o0, 4, %o0 2004294: 40 00 34 a3 call 2011520 2004298: 94 10 20 14 mov 0x14, %o2 return RTEMS_SUCCESSFUL; } 200429c: 81 c7 e0 08 ret 20042a0: 81 e8 00 00 restore =============================================================================== 020040c0 : * 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) { 20040c0: 9d e3 bf 98 save %sp, -104, %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); 20040c4: 90 10 20 00 clr %o0 <== NOT EXECUTED 20040c8: 92 10 20 00 clr %o1 <== NOT EXECUTED 20040cc: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 20040d0: 40 00 0b 90 call 2006f10 <== NOT EXECUTED 20040d4: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 20040d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20040dc: 12 80 00 26 bne 2004174 <== NOT EXECUTED 20040e0: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 20040e4: 13 00 80 76 sethi %hi(0x201d800), %o1 <== NOT EXECUTED 20040e8: e0 02 61 d8 ld [ %o1 + 0x1d8 ], %l0 ! 201d9d8 <== NOT EXECUTED 20040ec: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 20040f0: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 20040f4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20040f8: 12 80 00 09 bne 200411c <== NOT EXECUTED 20040fc: 92 12 61 d8 or %o1, 0x1d8, %o1 <== 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); 2004100: 40 00 0c 06 call 2007118 <== NOT EXECUTED 2004104: 01 00 00 00 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 2004108: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 200410c: 12 80 00 1a bne 2004174 <== NOT EXECUTED 2004110: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 2004114: 7f ff ff cd call 2004048 <== NOT EXECUTED 2004118: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 200411c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2004120: 21 00 80 76 sethi %hi(0x201d800), %l0 <== NOT EXECUTED 2004124: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 2004128: a2 14 21 d8 or %l0, 0x1d8, %l1 <== NOT EXECUTED 200412c: 40 00 0c 21 call 20071b0 <== NOT EXECUTED 2004130: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 2004134: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 2004138: 12 80 00 0c bne 2004168 <== NOT EXECUTED 200413c: 07 00 80 78 sethi %hi(0x201e000), %g3 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 2004140: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2004144: 15 00 80 10 sethi %hi(0x2004000), %o2 <== NOT EXECUTED 2004148: 40 00 0b c8 call 2007068 <== NOT EXECUTED 200414c: 94 12 a0 48 or %o2, 0x48, %o2 ! 2004048 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2004150: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 2004154: 12 80 00 05 bne 2004168 <== NOT EXECUTED 2004158: 07 00 80 78 sethi %hi(0x201e000), %g3 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 200415c: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 2004160: 10 80 00 05 b 2004174 <== NOT EXECUTED 2004164: c4 24 21 d8 st %g2, [ %l0 + 0x1d8 ] <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 2004168: 05 00 80 76 sethi %hi(0x201d800), %g2 <== NOT EXECUTED 200416c: 86 10 e2 80 or %g3, 0x280, %g3 <== NOT EXECUTED 2004170: c6 20 a1 d8 st %g3, [ %g2 + 0x1d8 ] <== NOT EXECUTED return sc; } 2004174: 81 c7 e0 08 ret <== NOT EXECUTED 2004178: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED =============================================================================== 0200ab68 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 200ab68: 84 0a 20 06 and %o0, 6, %g2 200ab6c: 80 a0 a0 06 cmp %g2, 6 200ab70: 02 80 00 07 be 200ab8c <== NEVER TAKEN 200ab74: 82 10 20 02 mov 2, %g1 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 200ab78: 82 0a 20 02 and %o0, 2, %g1 200ab7c: 80 a0 00 01 cmp %g0, %g1 200ab80: 83 32 20 02 srl %o0, 2, %g1 200ab84: 84 60 3f ff subx %g0, -1, %g2 200ab88: 82 08 80 01 and %g2, %g1, %g1 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 ) { 200ab8c: 80 8a 20 01 btst 1, %o0 200ab90: 02 80 00 04 be 200aba0 200ab94: 80 8a 22 00 btst 0x200, %o0 fcntl_flags |= O_NONBLOCK; 200ab98: 05 00 00 10 sethi %hi(0x4000), %g2 200ab9c: 82 10 40 02 or %g1, %g2, %g1 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 200aba0: 32 80 00 02 bne,a 200aba8 200aba4: 82 10 60 08 or %g1, 8, %g1 fcntl_flags |= O_APPEND; } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 200aba8: 80 8a 24 00 btst 0x400, %o0 200abac: 32 80 00 02 bne,a 200abb4 200abb0: 82 10 62 00 or %g1, 0x200, %g1 fcntl_flags |= O_CREAT; } return fcntl_flags; } 200abb4: 81 c3 e0 08 retl 200abb8: 90 10 00 01 mov %g1, %o0 =============================================================================== 0201018c : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 201018c: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 2010190: a0 96 20 00 orcc %i0, 0, %l0 2010194: 02 80 00 20 be 2010214 2010198: 03 00 80 87 sethi %hi(0x2021c00), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 201019c: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 2021ed0 <_System_state_Current> 20101a0: 80 a0 60 03 cmp %g1, 3 20101a4: 12 80 00 07 bne 20101c0 <== NEVER TAKEN 20101a8: c0 24 00 00 clr [ %l0 ] 20101ac: 7f ff cf 41 call 2003eb0 20101b0: 01 00 00 00 nop 20101b4: 80 8a 20 ff btst 0xff, %o0 20101b8: 02 80 00 18 be 2010218 <== NEVER TAKEN 20101bc: b0 10 20 16 mov 0x16, %i0 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 20101c0: 7f ff cf 55 call 2003f14 20101c4: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 20101c8: 03 00 80 84 sethi %hi(0x2021000), %g1 20101cc: d0 00 60 a0 ld [ %g1 + 0xa0 ], %o0 ! 20210a0 20101d0: 94 10 00 19 mov %i1, %o2 20101d4: 92 10 00 1a mov %i2, %o1 20101d8: 7f ff e4 74 call 20093a8 <_Protected_heap_Allocate_aligned_with_boundary> 20101dc: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 20101e0: b2 92 20 00 orcc %o0, 0, %i1 20101e4: 02 80 00 0d be 2010218 20101e8: 03 00 80 85 sethi %hi(0x2021400), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 20101ec: c2 00 63 d8 ld [ %g1 + 0x3d8 ], %g1 ! 20217d8 20101f0: 80 a0 60 00 cmp %g1, 0 20101f4: 22 80 00 06 be,a 201020c <== ALWAYS TAKEN 20101f8: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 20101fc: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 2010200: 9f c0 40 00 call %g1 <== NOT EXECUTED 2010204: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 2010208: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 201020c: 81 c7 e0 08 ret 2010210: 91 e8 20 00 restore %g0, 0, %o0 2010214: b0 10 20 16 mov 0x16, %i0 } 2010218: 81 c7 e0 08 ret 201021c: 81 e8 00 00 restore =============================================================================== 020079d4 : void rtems_panic( const char *printf_format, ... ) { 20079d4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 20079d8: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 20079dc: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 20079e0: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 20079e4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 20079e8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 20079ec: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 20079f0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 20079f4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 20079f8: 7f ff ff 89 call 200781c <== NOT EXECUTED 20079fc: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 2007a00: 81 c7 e0 08 ret <== NOT EXECUTED 2007a04: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012dcc : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 2012dcc: 9d e3 bf a0 save %sp, -96, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 2012dd0: a0 96 20 00 orcc %i0, 0, %l0 2012dd4: 02 80 00 1c be 2012e44 2012dd8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 2012ddc: 80 a6 60 00 cmp %i1, 0 2012de0: 02 80 00 34 be 2012eb0 2012de4: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 2012de8: 02 80 00 32 be 2012eb0 <== NEVER TAKEN 2012dec: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 2012df0: 02 80 00 32 be 2012eb8 2012df4: 80 a6 a0 00 cmp %i2, 0 2012df8: 02 80 00 30 be 2012eb8 2012dfc: 80 a6 80 1b cmp %i2, %i3 2012e00: 0a 80 00 2e bcs 2012eb8 2012e04: 80 8e e0 07 btst 7, %i3 2012e08: 12 80 00 2c bne 2012eb8 2012e0c: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 2012e10: 12 80 00 28 bne 2012eb0 2012e14: 03 00 80 f2 sethi %hi(0x203c800), %g1 2012e18: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 203c8b0 <_Thread_Dispatch_disable_level> 2012e1c: 84 00 a0 01 inc %g2 2012e20: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 2012e24: 25 00 80 f1 sethi %hi(0x203c400), %l2 2012e28: 40 00 12 07 call 2017644 <_Objects_Allocate> 2012e2c: 90 14 a2 b8 or %l2, 0x2b8, %o0 ! 203c6b8 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 2012e30: a2 92 20 00 orcc %o0, 0, %l1 2012e34: 32 80 00 06 bne,a 2012e4c 2012e38: f4 24 60 14 st %i2, [ %l1 + 0x14 ] _Thread_Enable_dispatch(); 2012e3c: 40 00 15 e7 call 20185d8 <_Thread_Enable_dispatch> 2012e40: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 2012e44: 81 c7 e0 08 ret 2012e48: 81 e8 00 00 restore the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 2012e4c: 90 10 00 1a mov %i2, %o0 2012e50: 92 10 00 1b mov %i3, %o1 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 2012e54: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 2012e58: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; the_partition->buffer_size = buffer_size; 2012e5c: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 2012e60: 40 00 64 b7 call 202c13c <.udiv> 2012e64: c0 24 60 20 clr [ %l1 + 0x20 ] 2012e68: 92 10 00 19 mov %i1, %o1 2012e6c: 94 10 00 08 mov %o0, %o2 2012e70: 96 10 00 1b mov %i3, %o3 2012e74: b4 04 60 24 add %l1, 0x24, %i2 2012e78: 40 00 0c 73 call 2016044 <_Chain_Initialize> 2012e7c: 90 10 00 1a mov %i2, %o0 2012e80: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 2012e84: c6 04 60 08 ld [ %l1 + 8 ], %g3 2012e88: a4 14 a2 b8 or %l2, 0x2b8, %l2 2012e8c: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2012e90: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2012e94: 83 28 60 02 sll %g1, 2, %g1 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 2012e98: c6 27 40 00 st %g3, [ %i5 ] 2012e9c: e2 20 80 01 st %l1, [ %g2 + %g1 ] name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 2012ea0: 40 00 15 ce call 20185d8 <_Thread_Enable_dispatch> 2012ea4: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 2012ea8: 81 c7 e0 08 ret 2012eac: 81 e8 00 00 restore 2012eb0: 81 c7 e0 08 ret 2012eb4: 91 e8 20 09 restore %g0, 9, %o0 2012eb8: b0 10 20 08 mov 8, %i0 } 2012ebc: 81 c7 e0 08 ret 2012ec0: 81 e8 00 00 restore =============================================================================== 0200cb5c : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 200cb5c: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 200cb60: 03 00 80 6e sethi %hi(0x201b800), %g1 200cb64: c2 08 60 74 ldub [ %g1 + 0x74 ], %g1 ! 201b874 200cb68: 80 a0 60 00 cmp %g1, 0 200cb6c: 02 80 00 15 be 200cbc0 <== ALWAYS TAKEN 200cb70: 19 00 80 6e sethi %hi(0x201b800), %o4 return; if (rtems_pipe_semaphore) 200cb74: c2 03 21 d4 ld [ %o4 + 0x1d4 ], %g1 ! 201b9d4 <== NOT EXECUTED 200cb78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200cb7c: 12 80 00 11 bne 200cbc0 <== NOT EXECUTED 200cb80: 98 13 21 d4 or %o4, 0x1d4, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 200cb84: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 200cb88: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 200cb8c: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 200cb90: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 200cb94: 7f ff e3 16 call 20057ec <== NOT EXECUTED 200cb98: 96 10 20 00 clr %o3 <== 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) 200cb9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200cba0: 02 80 00 04 be 200cbb0 <== NOT EXECUTED 200cba4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 200cba8: 7f ff e5 5c call 2006118 <== NOT EXECUTED 200cbac: 01 00 00 00 nop <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 200cbb0: 7f ff e1 ef call 200536c <== NOT EXECUTED 200cbb4: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 200cbb8: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200cbbc: d0 30 61 da sth %o0, [ %g1 + 0x1da ] ! 201b9da <== NOT EXECUTED 200cbc0: 81 c7 e0 08 ret 200cbc4: 81 e8 00 00 restore =============================================================================== 02006c6c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 2006c6c: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 2006c70: 11 00 80 86 sethi %hi(0x2021800), %o0 2006c74: 92 10 00 18 mov %i0, %o1 2006c78: 90 12 21 b0 or %o0, 0x1b0, %o0 2006c7c: 40 00 08 c4 call 2008f8c <_Objects_Get> 2006c80: 94 07 bf fc add %fp, -4, %o2 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2006c84: c2 07 bf fc ld [ %fp + -4 ], %g1 2006c88: 80 a0 60 00 cmp %g1, 0 2006c8c: 12 80 00 63 bne 2006e18 2006c90: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 2006c94: 25 00 80 86 sethi %hi(0x2021800), %l2 2006c98: c4 02 20 40 ld [ %o0 + 0x40 ], %g2 2006c9c: c2 04 a3 e0 ld [ %l2 + 0x3e0 ], %g1 2006ca0: 80 a0 80 01 cmp %g2, %g1 2006ca4: 02 80 00 06 be 2006cbc 2006ca8: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 2006cac: 40 00 0b 21 call 2009930 <_Thread_Enable_dispatch> 2006cb0: b0 10 20 17 mov 0x17, %i0 return RTEMS_NOT_OWNER_OF_RESOURCE; 2006cb4: 81 c7 e0 08 ret 2006cb8: 81 e8 00 00 restore } if ( length == RTEMS_PERIOD_STATUS ) { 2006cbc: 12 80 00 0b bne 2006ce8 2006cc0: 01 00 00 00 nop switch ( the_period->state ) { 2006cc4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2006cc8: 80 a0 60 04 cmp %g1, 4 2006ccc: 18 80 00 4f bgu 2006e08 <== NEVER TAKEN 2006cd0: b0 10 20 00 clr %i0 2006cd4: 83 28 60 02 sll %g1, 2, %g1 2006cd8: 05 00 80 7d sethi %hi(0x201f400), %g2 2006cdc: 84 10 a1 88 or %g2, 0x188, %g2 ! 201f588 2006ce0: 10 80 00 4a b 2006e08 2006ce4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 2006ce8: 7f ff f0 dc call 2003058 2006cec: 01 00 00 00 nop 2006cf0: a6 10 00 08 mov %o0, %l3 switch ( the_period->state ) { 2006cf4: e2 04 20 38 ld [ %l0 + 0x38 ], %l1 2006cf8: 80 a4 60 02 cmp %l1, 2 2006cfc: 02 80 00 1a be 2006d64 2006d00: 80 a4 60 04 cmp %l1, 4 2006d04: 02 80 00 34 be 2006dd4 2006d08: 80 a4 60 00 cmp %l1, 0 2006d0c: 12 80 00 43 bne 2006e18 <== NEVER TAKEN 2006d10: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 2006d14: 7f ff f0 d5 call 2003068 2006d18: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 2006d1c: 7f ff ff 50 call 2006a5c <_Rate_monotonic_Initiate_statistics> 2006d20: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006d24: 82 10 20 02 mov 2, %g1 2006d28: c2 24 20 38 st %g1, [ %l0 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006d2c: 03 00 80 1c sethi %hi(0x2007000), %g1 2006d30: 82 10 60 e4 or %g1, 0xe4, %g1 ! 20070e4 <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006d34: f0 24 20 30 st %i0, [ %l0 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006d38: 92 04 20 10 add %l0, 0x10, %o1 2006d3c: 11 00 80 87 sethi %hi(0x2021c00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006d40: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006d44: 90 12 20 00 mov %o0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006d48: c0 24 20 18 clr [ %l0 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006d4c: c0 24 20 34 clr [ %l0 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 2006d50: f2 24 20 3c st %i1, [ %l0 + 0x3c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006d54: c2 24 20 2c st %g1, [ %l0 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006d58: 40 00 10 46 call 200ae70 <_Watchdog_Insert> 2006d5c: b0 10 20 00 clr %i0 2006d60: 30 80 00 2a b,a 2006e08 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006d64: 7f ff ff 84 call 2006b74 <_Rate_monotonic_Update_statistics> 2006d68: 90 10 00 10 mov %l0, %o0 /* * 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; 2006d6c: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 2006d70: f2 24 20 3c st %i1, [ %l0 + 0x3c ] /* * 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; 2006d74: c2 24 20 38 st %g1, [ %l0 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006d78: 7f ff f0 bc call 2003068 2006d7c: 90 10 00 13 mov %l3, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 2006d80: c2 04 a3 e0 ld [ %l2 + 0x3e0 ], %g1 2006d84: c4 04 20 08 ld [ %l0 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006d88: 90 10 00 01 mov %g1, %o0 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 2006d8c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006d90: 40 00 0d 65 call 200a324 <_Thread_Set_state> 2006d94: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006d98: 7f ff f0 b0 call 2003058 2006d9c: 01 00 00 00 nop local_state = the_period->state; 2006da0: e6 04 20 38 ld [ %l0 + 0x38 ], %l3 the_period->state = RATE_MONOTONIC_ACTIVE; 2006da4: e2 24 20 38 st %l1, [ %l0 + 0x38 ] _ISR_Enable( level ); 2006da8: 7f ff f0 b0 call 2003068 2006dac: 01 00 00 00 nop /* * 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 ) 2006db0: 80 a4 e0 03 cmp %l3, 3 2006db4: 12 80 00 04 bne 2006dc4 2006db8: d0 04 a3 e0 ld [ %l2 + 0x3e0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006dbc: 40 00 09 cb call 20094e8 <_Thread_Clear_state> 2006dc0: 13 00 00 10 sethi %hi(0x4000), %o1 _Thread_Enable_dispatch(); 2006dc4: 40 00 0a db call 2009930 <_Thread_Enable_dispatch> 2006dc8: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 2006dcc: 81 c7 e0 08 ret 2006dd0: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 2006dd4: 7f ff ff 68 call 2006b74 <_Rate_monotonic_Update_statistics> 2006dd8: 90 10 00 10 mov %l0, %o0 _ISR_Enable( level ); 2006ddc: 7f ff f0 a3 call 2003068 2006de0: 90 10 00 13 mov %l3, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006de4: 82 10 20 02 mov 2, %g1 2006de8: 92 04 20 10 add %l0, 0x10, %o1 2006dec: 11 00 80 87 sethi %hi(0x2021c00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006df0: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006df4: 90 12 20 00 mov %o0, %o0 the_period->next_length = length; 2006df8: f2 24 20 3c st %i1, [ %l0 + 0x3c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 2006dfc: c2 24 20 38 st %g1, [ %l0 + 0x38 ] 2006e00: 40 00 10 1c call 200ae70 <_Watchdog_Insert> 2006e04: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 2006e08: 40 00 0a ca call 2009930 <_Thread_Enable_dispatch> 2006e0c: 01 00 00 00 nop return RTEMS_TIMEOUT; 2006e10: 81 c7 e0 08 ret 2006e14: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006e18: 81 c7 e0 08 ret 2006e1c: 91 e8 20 04 restore %g0, 4, %o0 =============================================================================== 02006e20 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 2006e20: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 2006e24: 80 a6 60 00 cmp %i1, 0 2006e28: 02 80 00 7a be 2007010 <== NEVER TAKEN 2006e2c: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 2006e30: 13 00 80 7d sethi %hi(0x201f400), %o1 2006e34: 9f c6 40 00 call %i1 2006e38: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 201f5a0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 2006e3c: 90 10 00 18 mov %i0, %o0 2006e40: 13 00 80 7d sethi %hi(0x201f400), %o1 2006e44: 9f c6 40 00 call %i1 2006e48: 92 12 61 c0 or %o1, 0x1c0, %o1 ! 201f5c0 (*print)( context, "--- Wall times are in seconds ---\n" ); 2006e4c: 90 10 00 18 mov %i0, %o0 2006e50: 13 00 80 7d sethi %hi(0x201f400), %o1 2006e54: 9f c6 40 00 call %i1 2006e58: 92 12 61 e8 or %o1, 0x1e8, %o1 ! 201f5e8 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 2006e5c: 90 10 00 18 mov %i0, %o0 2006e60: 13 00 80 7d sethi %hi(0x201f400), %o1 2006e64: 9f c6 40 00 call %i1 2006e68: 92 12 62 10 or %o1, 0x210, %o1 ! 201f610 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 2006e6c: 90 10 00 18 mov %i0, %o0 2006e70: 13 00 80 7d sethi %hi(0x201f400), %o1 2006e74: 9f c6 40 00 call %i1 2006e78: 92 12 62 60 or %o1, 0x260, %o1 ! 201f660 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2006e7c: 03 00 80 86 sethi %hi(0x2021800), %g1 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006e80: 2d 00 80 7d sethi %hi(0x201f400), %l6 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2006e84: 82 10 61 b0 or %g1, 0x1b0, %g1 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 2006e88: 2b 00 80 7d sethi %hi(0x201f400), %l5 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 2006e8c: 29 00 80 7d sethi %hi(0x201f400), %l4 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2006e90: 27 00 80 7d sethi %hi(0x201f400), %l3 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 2006e94: ba 07 bf a0 add %fp, -96, %i5 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2006e98: ae 10 00 01 mov %g1, %l7 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006e9c: ac 15 a2 b0 or %l6, 0x2b0, %l6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 2006ea0: aa 15 62 d0 or %l5, 0x2d0, %l5 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 2006ea4: a8 15 22 f0 or %l4, 0x2f0, %l4 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2006ea8: a6 14 e2 c8 or %l3, 0x2c8, %l3 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2006eac: e0 00 60 08 ld [ %g1 + 8 ], %l0 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 2006eb0: b8 07 bf d8 add %fp, -40, %i4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 2006eb4: a4 07 bf f8 add %fp, -8, %l2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 2006eb8: b4 07 bf b8 add %fp, -72, %i2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2006ebc: 10 80 00 51 b 2007000 2006ec0: a2 07 bf f0 add %fp, -16, %l1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 2006ec4: 40 00 1a f1 call 200da88 2006ec8: 92 10 00 1d mov %i5, %o1 if ( status != RTEMS_SUCCESSFUL ) 2006ecc: 80 a2 20 00 cmp %o0, 0 2006ed0: 32 80 00 4c bne,a 2007000 2006ed4: a0 04 20 01 inc %l0 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 2006ed8: 92 10 00 1c mov %i4, %o1 2006edc: 40 00 1b 18 call 200db3c 2006ee0: 90 10 00 10 mov %l0, %o0 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 2006ee4: d0 07 bf d8 ld [ %fp + -40 ], %o0 2006ee8: 94 10 00 12 mov %l2, %o2 2006eec: 40 00 00 ae call 20071a4 2006ef0: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2006ef4: d8 1f bf a0 ldd [ %fp + -96 ], %o4 2006ef8: 92 10 00 16 mov %l6, %o1 2006efc: 94 10 00 10 mov %l0, %o2 2006f00: 90 10 00 18 mov %i0, %o0 2006f04: 9f c6 40 00 call %i1 2006f08: 96 10 00 12 mov %l2, %o3 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2006f0c: c2 07 bf a0 ld [ %fp + -96 ], %g1 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 2006f10: 94 10 00 11 mov %l1, %o2 2006f14: 90 10 00 1a mov %i2, %o0 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2006f18: 80 a0 60 00 cmp %g1, 0 2006f1c: 12 80 00 06 bne 2006f34 2006f20: 92 10 00 13 mov %l3, %o1 (*print)( context, "\n" ); 2006f24: 9f c6 40 00 call %i1 2006f28: 90 10 00 18 mov %i0, %o0 continue; 2006f2c: 10 80 00 35 b 2007000 2006f30: a0 04 20 01 inc %l0 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 2006f34: 40 00 0e a5 call 200a9c8 <_Timespec_Divide_by_integer> 2006f38: 92 10 00 01 mov %g1, %o1 (*print)( context, 2006f3c: d0 07 bf ac ld [ %fp + -84 ], %o0 2006f40: 40 00 58 30 call 201d000 <.div> 2006f44: 92 10 23 e8 mov 0x3e8, %o1 2006f48: 96 10 00 08 mov %o0, %o3 2006f4c: d0 07 bf b4 ld [ %fp + -76 ], %o0 2006f50: d6 27 bf 9c st %o3, [ %fp + -100 ] 2006f54: 40 00 58 2b call 201d000 <.div> 2006f58: 92 10 23 e8 mov 0x3e8, %o1 2006f5c: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006f60: b6 10 00 08 mov %o0, %i3 2006f64: d0 07 bf f4 ld [ %fp + -12 ], %o0 2006f68: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2006f6c: 40 00 58 25 call 201d000 <.div> 2006f70: 92 10 23 e8 mov 0x3e8, %o1 2006f74: d8 07 bf b0 ld [ %fp + -80 ], %o4 2006f78: d6 07 bf 9c ld [ %fp + -100 ], %o3 2006f7c: d4 07 bf a8 ld [ %fp + -88 ], %o2 2006f80: 9a 10 00 1b mov %i3, %o5 2006f84: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2006f88: 92 10 00 15 mov %l5, %o1 2006f8c: 9f c6 40 00 call %i1 2006f90: 90 10 00 18 mov %i0, %o0 struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 2006f94: d2 07 bf a0 ld [ %fp + -96 ], %o1 2006f98: 94 10 00 11 mov %l1, %o2 2006f9c: 40 00 0e 8b call 200a9c8 <_Timespec_Divide_by_integer> 2006fa0: 90 07 bf d0 add %fp, -48, %o0 (*print)( context, 2006fa4: d0 07 bf c4 ld [ %fp + -60 ], %o0 2006fa8: 40 00 58 16 call 201d000 <.div> 2006fac: 92 10 23 e8 mov 0x3e8, %o1 2006fb0: 96 10 00 08 mov %o0, %o3 2006fb4: d0 07 bf cc ld [ %fp + -52 ], %o0 2006fb8: d6 27 bf 9c st %o3, [ %fp + -100 ] 2006fbc: 40 00 58 11 call 201d000 <.div> 2006fc0: 92 10 23 e8 mov 0x3e8, %o1 2006fc4: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006fc8: b6 10 00 08 mov %o0, %i3 2006fcc: d0 07 bf f4 ld [ %fp + -12 ], %o0 2006fd0: 92 10 23 e8 mov 0x3e8, %o1 2006fd4: 40 00 58 0b call 201d000 <.div> 2006fd8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2006fdc: d4 07 bf c0 ld [ %fp + -64 ], %o2 2006fe0: d6 07 bf 9c ld [ %fp + -100 ], %o3 2006fe4: d8 07 bf c8 ld [ %fp + -56 ], %o4 2006fe8: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2006fec: 9a 10 00 1b mov %i3, %o5 2006ff0: 90 10 00 18 mov %i0, %o0 2006ff4: 9f c6 40 00 call %i1 2006ff8: 92 10 00 14 mov %l4, %o1 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 2006ffc: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 2007000: c2 05 e0 0c ld [ %l7 + 0xc ], %g1 2007004: 80 a4 00 01 cmp %l0, %g1 2007008: 08 bf ff af bleu 2006ec4 200700c: 90 10 00 10 mov %l0, %o0 2007010: 81 c7 e0 08 ret 2007014: 81 e8 00 00 restore =============================================================================== 020143b4 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 20143b4: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 20143b8: 82 10 20 0a mov 0xa, %g1 20143bc: 80 a6 60 00 cmp %i1, 0 20143c0: 02 80 00 2a be 2014468 20143c4: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 20143c8: 40 00 10 a7 call 2018664 <_Thread_Get> 20143cc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20143d0: c4 07 bf fc ld [ %fp + -4 ], %g2 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 20143d4: a0 10 00 08 mov %o0, %l0 switch ( location ) { 20143d8: 80 a0 a0 00 cmp %g2, 0 20143dc: 12 80 00 23 bne 2014468 20143e0: 82 10 20 04 mov 4, %g1 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 20143e4: d2 02 21 68 ld [ %o0 + 0x168 ], %o1 asr = &api->Signal; 20143e8: c2 02 60 0c ld [ %o1 + 0xc ], %g1 20143ec: 80 a0 60 00 cmp %g1, 0 20143f0: 02 80 00 1b be 201445c 20143f4: 01 00 00 00 nop if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 20143f8: c2 0a 60 08 ldub [ %o1 + 8 ], %g1 20143fc: 80 a0 60 00 cmp %g1, 0 2014400: 02 80 00 11 be 2014444 2014404: 90 10 00 19 mov %i1, %o0 _ASR_Post_signals( signal_set, &asr->signals_posted ); 2014408: 7f ff ff e2 call 2014390 <_ASR_Post_signals> 201440c: 92 02 60 14 add %o1, 0x14, %o1 the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2014410: 03 00 80 f2 sethi %hi(0x203c800), %g1 2014414: c4 00 61 4c ld [ %g1 + 0x14c ], %g2 ! 203c94c <_ISR_Nest_level> 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; 2014418: 82 10 20 01 mov 1, %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 201441c: 80 a0 a0 00 cmp %g2, 0 2014420: 02 80 00 0b be 201444c 2014424: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 2014428: 05 00 80 f2 sethi %hi(0x203c800), %g2 201442c: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 ! 203c970 <_Thread_Executing> 2014430: 80 a4 00 02 cmp %l0, %g2 2014434: 12 80 00 06 bne 201444c <== NEVER TAKEN 2014438: 05 00 80 f2 sethi %hi(0x203c800), %g2 _ISR_Signals_to_thread_executing = true; 201443c: 10 80 00 04 b 201444c 2014440: c2 28 a2 08 stb %g1, [ %g2 + 0x208 ] ! 203ca08 <_ISR_Signals_to_thread_executing> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); 2014444: 7f ff ff d3 call 2014390 <_ASR_Post_signals> 2014448: 92 02 60 18 add %o1, 0x18, %o1 } _Thread_Enable_dispatch(); 201444c: 40 00 10 63 call 20185d8 <_Thread_Enable_dispatch> 2014450: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 2014454: 10 80 00 05 b 2014468 2014458: 82 10 20 00 clr %g1 ! 0 } _Thread_Enable_dispatch(); 201445c: 40 00 10 5f call 20185d8 <_Thread_Enable_dispatch> 2014460: 01 00 00 00 nop 2014464: 82 10 20 0b mov 0xb, %g1 ! b case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2014468: 81 c7 e0 08 ret 201446c: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 02002058 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 2002058: 9d e3 bf a0 save %sp, -96, %sp Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 200205c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2002060: 80 a0 60 00 cmp %g1, 0 2002064: 02 80 00 07 be 2002080 <== NEVER TAKEN 2002068: 13 00 80 6f sethi %hi(0x201bc00), %o1 return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 200206c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 2002070: 90 02 20 08 add %o0, 8, %o0 2002074: 92 12 61 08 or %o1, 0x108, %o1 2002078: 40 00 36 2f call 200f934 200207c: 94 10 20 10 mov 0x10, %o2 2002080: 81 c7 e0 08 ret 2002084: 81 e8 00 00 restore =============================================================================== 020024c4 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 20024c4: 9d e3 bf a0 save %sp, -96, %sp Stack_check_Initialize(); 20024c8: 7f ff ff d8 call 2002428 20024cc: 01 00 00 00 nop if (the_thread) 20024d0: 80 a6 60 00 cmp %i1, 0 20024d4: 02 80 00 06 be 20024ec <== NEVER TAKEN 20024d8: 01 00 00 00 nop Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 20024dc: d4 06 60 c4 ld [ %i1 + 0xc4 ], %o2 20024e0: d0 06 60 c8 ld [ %i1 + 0xc8 ], %o0 20024e4: 40 00 35 53 call 200fa30 20024e8: 92 10 20 a5 mov 0xa5, %o1 return true; } 20024ec: 81 c7 e0 08 ret 20024f0: 91 e8 20 01 restore %g0, 1, %o0 =============================================================================== 02002334 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 2002334: 9d e3 bf a0 save %sp, -96, %sp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 2002338: 03 00 80 6f sethi %hi(0x201bc00), %g1 200233c: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201bfb0 <_Thread_Executing> ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 2002340: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 2002344: 80 a7 80 08 cmp %fp, %o0 2002348: 0a 80 00 06 bcs 2002360 <== NEVER TAKEN 200234c: a0 10 20 00 clr %l0 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 2002350: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 2002354: 82 02 00 01 add %o0, %g1, %g1 2002358: 80 a0 40 1e cmp %g1, %fp 200235c: a0 60 3f ff subx %g0, -1, %l0 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 2002360: 03 00 80 6e sethi %hi(0x201b800), %g1 2002364: c2 00 62 74 ld [ %g1 + 0x274 ], %g1 ! 201ba74 2002368: 80 a0 60 00 cmp %g1, 0 200236c: 02 80 00 09 be 2002390 <== NEVER TAKEN 2002370: 92 10 20 01 mov 1, %o1 pattern_ok = (!memcmp( 2002374: 90 02 20 08 add %o0, 8, %o0 2002378: 13 00 80 6f sethi %hi(0x201bc00), %o1 200237c: 94 10 20 10 mov 0x10, %o2 2002380: 40 00 35 3c call 200f870 2002384: 92 12 61 08 or %o1, 0x108, %o1 2002388: 80 a0 00 08 cmp %g0, %o0 200238c: 92 60 3f ff subx %g0, -1, %o1 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 2002390: 80 8c 20 ff btst 0xff, %l0 2002394: 02 80 00 04 be 20023a4 <== NEVER TAKEN 2002398: 80 8a 60 ff btst 0xff, %o1 200239c: 12 80 00 07 bne 20023b8 <== ALWAYS TAKEN 20023a0: b0 10 20 00 clr %i0 return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 20023a4: 03 00 80 6f sethi %hi(0x201bc00), %g1 <== NOT EXECUTED 20023a8: d0 00 63 b0 ld [ %g1 + 0x3b0 ], %o0 ! 201bfb0 <_Thread_Executing><== NOT EXECUTED 20023ac: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED 20023b0: 7f ff ff b7 call 200228c <== NOT EXECUTED 20023b4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 20023b8: 81 c7 e0 08 ret 20023bc: 81 e8 00 00 restore =============================================================================== 02002270 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 2002270: 13 00 80 0d sethi %hi(0x2003400), %o1 <== NOT EXECUTED 2002274: 90 10 20 00 clr %o0 <== NOT EXECUTED 2002278: 92 12 61 40 or %o1, 0x140, %o1 <== NOT EXECUTED 200227c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002280: 7f ff ff e6 call 2002218 <== NOT EXECUTED 2002284: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02002218 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 2002218: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED print_context = context; 200221c: 23 00 80 6e sethi %hi(0x201b800), %l1 <== NOT EXECUTED print_handler = print; 2002220: 21 00 80 6e sethi %hi(0x201b800), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 2002224: f0 24 62 78 st %i0, [ %l1 + 0x278 ] <== NOT EXECUTED print_handler = print; 2002228: f2 24 22 7c st %i1, [ %l0 + 0x27c ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 200222c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2002230: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED 2002234: 9f c6 40 00 call %i1 <== NOT EXECUTED 2002238: 92 12 61 68 or %o1, 0x168, %o1 ! 201a168 <== NOT EXECUTED (*print)( context, 200223c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2002240: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED 2002244: 9f c6 40 00 call %i1 <== NOT EXECUTED 2002248: 92 12 61 80 or %o1, 0x180, %o1 ! 201a180 <== 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 ); 200224c: 11 00 80 08 sethi %hi(0x2002000), %o0 <== NOT EXECUTED 2002250: 40 00 13 56 call 2006fa8 <== NOT EXECUTED 2002254: 90 12 20 c8 or %o0, 0xc8, %o0 ! 20020c8 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 2002258: 7f ff ff 9c call 20020c8 <== NOT EXECUTED 200225c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 2002260: c0 24 62 78 clr [ %l1 + 0x278 ] <== NOT EXECUTED print_handler = NULL; 2002264: c0 24 22 7c clr [ %l0 + 0x27c ] <== NOT EXECUTED } 2002268: 81 c7 e0 08 ret <== NOT EXECUTED 200226c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020023c0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 20023c0: 9d e3 bf a0 save %sp, -96, %sp 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; 20023c4: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 20023c8: 80 a7 80 08 cmp %fp, %o0 20023cc: 0a 80 00 06 bcs 20023e4 <== NEVER TAKEN 20023d0: a0 10 20 00 clr %l0 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 20023d4: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 20023d8: 82 02 00 01 add %o0, %g1, %g1 20023dc: 80 a0 40 1e cmp %g1, %fp 20023e0: a0 60 3f ff subx %g0, -1, %l0 /* * 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, 20023e4: 90 02 20 08 add %o0, 8, %o0 20023e8: 13 00 80 6f sethi %hi(0x201bc00), %o1 20023ec: 94 10 20 10 mov 0x10, %o2 20023f0: 40 00 35 20 call 200f870 20023f4: 92 12 61 08 or %o1, 0x108, %o1 20023f8: 80 a0 00 08 cmp %g0, %o0 20023fc: b2 60 3f ff subx %g0, -1, %i1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 2002400: 80 8c 20 ff btst 0xff, %l0 2002404: 02 80 00 04 be 2002414 <== NEVER TAKEN 2002408: 80 a6 60 00 cmp %i1, 0 200240c: 12 80 00 05 bne 2002420 <== ALWAYS TAKEN 2002410: 01 00 00 00 nop Stack_check_report_blown_task( running, pattern_ok ); 2002414: b2 0e 60 01 and %i1, 1, %i1 <== NOT EXECUTED 2002418: 7f ff ff 9d call 200228c <== NOT EXECUTED 200241c: 81 e8 00 00 restore <== NOT EXECUTED 2002420: 81 c7 e0 08 ret 2002424: 81 e8 00 00 restore =============================================================================== 0200c25c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c25c: 9d e3 bf 90 save %sp, -112, %sp 200c260: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c264: 80 a6 60 00 cmp %i1, 0 200c268: 02 80 00 23 be 200c2f4 200c26c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c270: 40 00 0c 0e call 200f2a8 <__errno> 200c274: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 200c278: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 200c27c: c0 22 00 00 clr [ %o0 ] *n = 0; 200c280: c0 26 40 00 clr [ %i1 ] 200c284: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 200c288: 40 00 17 8c call 20120b8 200c28c: 90 10 00 10 mov %l0, %o0 #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 ) 200c290: 80 a6 a0 00 cmp %i2, 0 200c294: 02 80 00 03 be 200c2a0 200c298: c2 07 bf fc ld [ %fp + -4 ], %g1 *endptr = end; 200c29c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c2a0: c2 07 bf fc ld [ %fp + -4 ], %g1 200c2a4: 80 a0 40 10 cmp %g1, %l0 200c2a8: 02 80 00 13 be 200c2f4 200c2ac: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c2b0: 03 00 80 79 sethi %hi(0x201e400), %g1 200c2b4: d1 18 61 50 ldd [ %g1 + 0x150 ], %f8 ! 201e550 <_CPU_Trap_slot_template+0x14> 200c2b8: 81 a8 0a c8 fcmped %f0, %f8 200c2bc: 01 00 00 00 nop 200c2c0: 1d 80 00 0b fbule 200c2ec 200c2c4: 01 00 00 00 nop 200c2c8: c1 27 bf f4 st %f0, [ %fp + -12 ] 200c2cc: 40 00 0b f7 call 200f2a8 <__errno> 200c2d0: c3 27 bf f0 st %f1, [ %fp + -16 ] 200c2d4: c2 02 00 00 ld [ %o0 ], %g1 200c2d8: b0 10 20 0a mov 0xa, %i0 200c2dc: 80 a0 60 22 cmp %g1, 0x22 200c2e0: c1 07 bf f4 ld [ %fp + -12 ], %f0 200c2e4: 02 80 00 04 be 200c2f4 <== ALWAYS TAKEN 200c2e8: c3 07 bf f0 ld [ %fp + -16 ], %f1 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 200c2ec: c1 3e 40 00 std %f0, [ %i1 ] 200c2f0: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 200c2f4: 81 c7 e0 08 ret 200c2f8: 81 e8 00 00 restore =============================================================================== 0200c2fc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c2fc: 9d e3 bf 90 save %sp, -112, %sp 200c300: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c304: 80 a6 60 00 cmp %i1, 0 200c308: 02 80 00 20 be 200c388 200c30c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c310: 40 00 0b e6 call 200f2a8 <__errno> 200c314: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 200c318: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 200c31c: c0 22 00 00 clr [ %o0 ] *n = 0; 200c320: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 200c324: 40 00 17 50 call 2012064 200c328: 90 10 00 10 mov %l0, %o0 #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 ) 200c32c: 80 a6 a0 00 cmp %i2, 0 200c330: 02 80 00 03 be 200c33c 200c334: c2 07 bf fc ld [ %fp + -4 ], %g1 *endptr = end; 200c338: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c33c: c2 07 bf fc ld [ %fp + -4 ], %g1 200c340: 80 a0 40 10 cmp %g1, %l0 200c344: 02 80 00 11 be 200c388 200c348: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c34c: 03 00 80 79 sethi %hi(0x201e400), %g1 200c350: d1 00 61 58 ld [ %g1 + 0x158 ], %f8 ! 201e558 <_CPU_Trap_slot_template+0x1c> 200c354: 81 a8 0a a8 fcmpes %f0, %f8 200c358: 01 00 00 00 nop 200c35c: 1d 80 00 09 fbule 200c380 200c360: 01 00 00 00 nop 200c364: 40 00 0b d1 call 200f2a8 <__errno> 200c368: c1 27 bf f4 st %f0, [ %fp + -12 ] 200c36c: c2 02 00 00 ld [ %o0 ], %g1 200c370: b0 10 20 0a mov 0xa, %i0 200c374: 80 a0 60 22 cmp %g1, 0x22 200c378: 02 80 00 04 be 200c388 <== ALWAYS TAKEN 200c37c: c1 07 bf f4 ld [ %fp + -12 ], %f0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 200c380: c1 26 40 00 st %f0, [ %i1 ] 200c384: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 200c388: 81 c7 e0 08 ret 200c38c: 81 e8 00 00 restore =============================================================================== 0200c390 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c390: 9d e3 bf 98 save %sp, -104, %sp 200c394: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c398: 80 a6 60 00 cmp %i1, 0 200c39c: 02 80 00 20 be 200c41c 200c3a0: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c3a4: 40 00 0b c1 call 200f2a8 <__errno> 200c3a8: 01 00 00 00 nop 200c3ac: c0 22 00 00 clr [ %o0 ] *n = 0; 200c3b0: c0 26 40 00 clr [ %i1 ] #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 ); 200c3b4: 94 10 00 1b mov %i3, %o2 200c3b8: 90 10 00 10 mov %l0, %o0 200c3bc: 40 00 17 ca call 20122e4 200c3c0: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 200c3c4: 80 a6 a0 00 cmp %i2, 0 200c3c8: 02 80 00 04 be 200c3d8 200c3cc: a2 10 00 08 mov %o0, %l1 *endptr = end; 200c3d0: c2 07 bf fc ld [ %fp + -4 ], %g1 200c3d4: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c3d8: c2 07 bf fc ld [ %fp + -4 ], %g1 200c3dc: 80 a0 40 10 cmp %g1, %l0 200c3e0: 02 80 00 0f be 200c41c 200c3e4: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c3e8: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 200c3ec: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 200c3f0: 80 a4 40 01 cmp %l1, %g1 200c3f4: 32 80 00 09 bne,a 200c418 200c3f8: e2 26 40 00 st %l1, [ %i1 ] 200c3fc: 40 00 0b ab call 200f2a8 <__errno> 200c400: b0 10 20 0a mov 0xa, %i0 200c404: c2 02 00 00 ld [ %o0 ], %g1 200c408: 80 a0 60 22 cmp %g1, 0x22 200c40c: 02 80 00 04 be 200c41c <== ALWAYS TAKEN 200c410: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 200c414: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 200c418: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 200c41c: 81 c7 e0 08 ret 200c420: 81 e8 00 00 restore =============================================================================== 0200c4e8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c4e8: 9d e3 bf 98 save %sp, -104, %sp 200c4ec: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c4f0: 80 a6 60 00 cmp %i1, 0 200c4f4: 02 80 00 23 be 200c580 200c4f8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c4fc: 40 00 0b 6b call 200f2a8 <__errno> 200c500: 01 00 00 00 nop #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 ); 200c504: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 200c508: c0 22 00 00 clr [ %o0 ] *n = 0; 200c50c: c0 26 40 00 clr [ %i1 ] #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 ); 200c510: 90 10 00 10 mov %l0, %o0 200c514: 40 00 17 74 call 20122e4 200c518: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 200c51c: 80 a6 a0 00 cmp %i2, 0 200c520: 02 80 00 04 be 200c530 200c524: a2 10 00 08 mov %o0, %l1 *endptr = end; 200c528: c2 07 bf fc ld [ %fp + -4 ], %g1 200c52c: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c530: c2 07 bf fc ld [ %fp + -4 ], %g1 200c534: 80 a0 40 10 cmp %g1, %l0 200c538: 02 80 00 12 be 200c580 200c53c: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c540: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 200c544: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 200c548: 80 a4 40 01 cmp %l1, %g1 200c54c: 02 80 00 05 be 200c560 200c550: 03 20 00 00 sethi %hi(0x80000000), %g1 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 200c554: 80 a4 40 01 cmp %l1, %g1 200c558: 32 80 00 09 bne,a 200c57c 200c55c: e2 26 40 00 st %l1, [ %i1 ] 200c560: 40 00 0b 52 call 200f2a8 <__errno> 200c564: 01 00 00 00 nop 200c568: c2 02 00 00 ld [ %o0 ], %g1 200c56c: 80 a0 60 22 cmp %g1, 0x22 200c570: 22 80 00 04 be,a 200c580 <== ALWAYS TAKEN 200c574: b0 10 20 0a mov 0xa, %i0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 200c578: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 200c57c: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 200c580: 81 c7 e0 08 ret 200c584: 81 e8 00 00 restore =============================================================================== 0200c424 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c424: 9d e3 bf 98 save %sp, -104, %sp 200c428: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c42c: 80 a6 60 00 cmp %i1, 0 200c430: 02 80 00 2c be 200c4e0 200c434: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c438: 40 00 0b 9c call 200f2a8 <__errno> 200c43c: 01 00 00 00 nop #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 ); 200c440: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 200c444: c0 22 00 00 clr [ %o0 ] *n = 0; 200c448: c0 26 40 00 clr [ %i1 ] 200c44c: c0 26 60 04 clr [ %i1 + 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 ); 200c450: 90 10 00 10 mov %l0, %o0 200c454: 40 00 17 ae call 201230c 200c458: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 200c45c: 80 a6 a0 00 cmp %i2, 0 #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 ); 200c460: a2 10 00 08 mov %o0, %l1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 200c464: 02 80 00 04 be 200c474 200c468: a4 10 00 09 mov %o1, %l2 *endptr = end; 200c46c: c2 07 bf fc ld [ %fp + -4 ], %g1 200c470: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c474: c2 07 bf fc ld [ %fp + -4 ], %g1 200c478: 80 a0 40 10 cmp %g1, %l0 200c47c: 02 80 00 19 be 200c4e0 200c480: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c484: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 200c488: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 200c48c: 80 a4 40 01 cmp %l1, %g1 200c490: 12 80 00 05 bne 200c4a4 200c494: 03 20 00 00 sethi %hi(0x80000000), %g1 200c498: 80 a4 bf ff cmp %l2, -1 200c49c: 02 80 00 08 be 200c4bc <== ALWAYS TAKEN 200c4a0: 01 00 00 00 nop return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 200c4a4: 80 a4 40 01 cmp %l1, %g1 200c4a8: 32 80 00 0c bne,a 200c4d8 200c4ac: e4 26 60 04 st %l2, [ %i1 + 4 ] 200c4b0: 80 a4 a0 00 cmp %l2, 0 200c4b4: 32 80 00 09 bne,a 200c4d8 <== NEVER TAKEN 200c4b8: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 200c4bc: 40 00 0b 7b call 200f2a8 <__errno> 200c4c0: 01 00 00 00 nop 200c4c4: c2 02 00 00 ld [ %o0 ], %g1 200c4c8: 80 a0 60 22 cmp %g1, 0x22 200c4cc: 22 80 00 05 be,a 200c4e0 <== ALWAYS TAKEN 200c4d0: b0 10 20 0a mov 0xa, %i0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 200c4d4: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 200c4d8: e2 26 40 00 st %l1, [ %i1 ] 200c4dc: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 200c4e0: 81 c7 e0 08 ret 200c4e4: 81 e8 00 00 restore =============================================================================== 0200c588 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c588: 9d e3 bf 98 save %sp, -104, %sp 200c58c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c590: 80 a6 60 00 cmp %i1, 0 200c594: 02 80 00 1e be 200c60c 200c598: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c59c: 40 00 0b 43 call 200f2a8 <__errno> 200c5a0: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 200c5a4: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 200c5a8: c0 22 00 00 clr [ %o0 ] *n = 0; 200c5ac: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 200c5b0: 90 10 00 10 mov %l0, %o0 200c5b4: 40 00 18 84 call 20127c4 200c5b8: 94 10 20 10 mov 0x10, %o2 #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 ) 200c5bc: 80 a6 a0 00 cmp %i2, 0 200c5c0: 02 80 00 04 be 200c5d0 200c5c4: a2 10 00 08 mov %o0, %l1 *endptr = end; 200c5c8: c2 07 bf fc ld [ %fp + -4 ], %g1 200c5cc: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c5d0: c2 07 bf fc ld [ %fp + -4 ], %g1 200c5d4: 80 a0 40 10 cmp %g1, %l0 200c5d8: 02 80 00 0d be 200c60c 200c5dc: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c5e0: 80 a4 7f ff cmp %l1, -1 200c5e4: 32 80 00 09 bne,a 200c608 <== ALWAYS TAKEN 200c5e8: e2 26 40 00 st %l1, [ %i1 ] 200c5ec: 40 00 0b 2f call 200f2a8 <__errno> <== NOT EXECUTED 200c5f0: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 200c5f4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 200c5f8: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 200c5fc: 02 80 00 04 be 200c60c <== NOT EXECUTED 200c600: 01 00 00 00 nop <== 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; 200c604: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 200c608: b0 10 20 00 clr %i0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 200c60c: 81 c7 e0 08 ret 200c610: 81 e8 00 00 restore =============================================================================== 0200c678 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c678: 9d e3 bf 98 save %sp, -104, %sp 200c67c: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c680: 80 a6 60 00 cmp %i1, 0 200c684: 02 80 00 1e be 200c6fc 200c688: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c68c: 40 00 0b 07 call 200f2a8 <__errno> 200c690: 01 00 00 00 nop 200c694: c0 22 00 00 clr [ %o0 ] *n = 0; 200c698: c0 26 40 00 clr [ %i1 ] #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 ); 200c69c: 94 10 00 1b mov %i3, %o2 200c6a0: 90 10 00 10 mov %l0, %o0 200c6a4: 40 00 18 48 call 20127c4 200c6a8: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 200c6ac: 80 a6 a0 00 cmp %i2, 0 200c6b0: 02 80 00 04 be 200c6c0 200c6b4: a2 10 00 08 mov %o0, %l1 *endptr = end; 200c6b8: c2 07 bf fc ld [ %fp + -4 ], %g1 200c6bc: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c6c0: c2 07 bf fc ld [ %fp + -4 ], %g1 200c6c4: 80 a0 40 10 cmp %g1, %l0 200c6c8: 02 80 00 0d be 200c6fc 200c6cc: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c6d0: 80 a4 7f ff cmp %l1, -1 200c6d4: 32 80 00 09 bne,a 200c6f8 200c6d8: e2 26 40 00 st %l1, [ %i1 ] 200c6dc: 40 00 0a f3 call 200f2a8 <__errno> 200c6e0: b0 10 20 0a mov 0xa, %i0 200c6e4: c2 02 00 00 ld [ %o0 ], %g1 200c6e8: 80 a0 60 22 cmp %g1, 0x22 200c6ec: 02 80 00 04 be 200c6fc <== ALWAYS TAKEN 200c6f0: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 200c6f4: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 200c6f8: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 200c6fc: 81 c7 e0 08 ret 200c700: 81 e8 00 00 restore =============================================================================== 0200c7a8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c7a8: 9d e3 bf 98 save %sp, -104, %sp 200c7ac: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c7b0: 80 a6 60 00 cmp %i1, 0 200c7b4: 02 80 00 1e be 200c82c 200c7b8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c7bc: 40 00 0a bb call 200f2a8 <__errno> 200c7c0: 01 00 00 00 nop #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 ); 200c7c4: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 200c7c8: c0 22 00 00 clr [ %o0 ] *n = 0; 200c7cc: c0 26 40 00 clr [ %i1 ] #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 ); 200c7d0: 90 10 00 10 mov %l0, %o0 200c7d4: 40 00 17 fc call 20127c4 200c7d8: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 200c7dc: 80 a6 a0 00 cmp %i2, 0 200c7e0: 02 80 00 04 be 200c7f0 200c7e4: a2 10 00 08 mov %o0, %l1 *endptr = end; 200c7e8: c2 07 bf fc ld [ %fp + -4 ], %g1 200c7ec: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c7f0: c2 07 bf fc ld [ %fp + -4 ], %g1 200c7f4: 80 a0 40 10 cmp %g1, %l0 200c7f8: 02 80 00 0d be 200c82c 200c7fc: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c800: 80 a4 7f ff cmp %l1, -1 200c804: 32 80 00 09 bne,a 200c828 200c808: e2 26 40 00 st %l1, [ %i1 ] 200c80c: 40 00 0a a7 call 200f2a8 <__errno> 200c810: b0 10 20 0a mov 0xa, %i0 200c814: c2 02 00 00 ld [ %o0 ], %g1 200c818: 80 a0 60 22 cmp %g1, 0x22 200c81c: 02 80 00 04 be 200c82c <== ALWAYS TAKEN 200c820: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 200c824: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 200c828: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 200c82c: 81 c7 e0 08 ret 200c830: 81 e8 00 00 restore =============================================================================== 0200c704 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 200c704: 9d e3 bf 98 save %sp, -104, %sp 200c708: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 200c70c: 80 a6 60 00 cmp %i1, 0 200c710: 02 80 00 24 be 200c7a0 200c714: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 200c718: 40 00 0a e4 call 200f2a8 <__errno> 200c71c: 01 00 00 00 nop #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 ); 200c720: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 200c724: c0 22 00 00 clr [ %o0 ] *n = 0; 200c728: c0 26 40 00 clr [ %i1 ] 200c72c: c0 26 60 04 clr [ %i1 + 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 ); 200c730: 90 10 00 10 mov %l0, %o0 200c734: 40 00 18 2e call 20127ec 200c738: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 200c73c: 80 a6 a0 00 cmp %i2, 0 #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 ); 200c740: a2 10 00 08 mov %o0, %l1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 200c744: 02 80 00 04 be 200c754 200c748: a4 10 00 09 mov %o1, %l2 *endptr = end; 200c74c: c2 07 bf fc ld [ %fp + -4 ], %g1 200c750: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 200c754: c2 07 bf fc ld [ %fp + -4 ], %g1 200c758: 80 a0 40 10 cmp %g1, %l0 200c75c: 02 80 00 11 be 200c7a0 200c760: b0 10 20 0b mov 0xb, %i0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 200c764: 80 a4 7f ff cmp %l1, -1 200c768: 32 80 00 0c bne,a 200c798 200c76c: e4 26 60 04 st %l2, [ %i1 + 4 ] 200c770: 80 a4 bf ff cmp %l2, -1 200c774: 32 80 00 09 bne,a 200c798 <== NEVER TAKEN 200c778: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 200c77c: 40 00 0a cb call 200f2a8 <__errno> 200c780: b0 10 20 0a mov 0xa, %i0 200c784: c2 02 00 00 ld [ %o0 ], %g1 200c788: 80 a0 60 22 cmp %g1, 0x22 200c78c: 02 80 00 05 be 200c7a0 <== ALWAYS TAKEN 200c790: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 200c794: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 200c798: e2 26 40 00 st %l1, [ %i1 ] 200c79c: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 200c7a0: 81 c7 e0 08 ret 200c7a4: 81 e8 00 00 restore =============================================================================== 0200dd64 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 200dd64: 9d e3 bf a0 save %sp, -96, %sp ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 200dd68: 80 a6 a0 00 cmp %i2, 0 200dd6c: 02 80 00 54 be 200debc 200dd70: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 200dd74: 03 00 80 6f sethi %hi(0x201bc00), %g1 200dd78: e0 00 61 e0 ld [ %g1 + 0x1e0 ], %l0 ! 201bde0 <_Thread_Executing> api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200dd7c: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200dd80: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200dd84: 80 a0 00 02 cmp %g0, %g2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 200dd88: e2 04 21 68 ld [ %l0 + 0x168 ], %l1 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 200dd8c: a4 60 3f ff subx %g0, -1, %l2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 200dd90: 80 a0 60 00 cmp %g1, 0 200dd94: 02 80 00 03 be 200dda0 200dd98: a5 2c a0 08 sll %l2, 8, %l2 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 200dd9c: a4 14 a2 00 or %l2, 0x200, %l2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200dda0: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 200dda4: 80 a0 00 01 cmp %g0, %g1 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(); 200dda8: 7f ff ee 3d call 200969c <_CPU_ISR_Get_level> 200ddac: a6 60 3f ff subx %g0, -1, %l3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200ddb0: a7 2c e0 0a sll %l3, 0xa, %l3 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; 200ddb4: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 200ddb8: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 200ddbc: 80 8e 61 00 btst 0x100, %i1 200ddc0: 02 80 00 06 be 200ddd8 200ddc4: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 200ddc8: 83 36 20 08 srl %i0, 8, %g1 200ddcc: 82 18 60 01 xor %g1, 1, %g1 200ddd0: 82 08 60 01 and %g1, 1, %g1 200ddd4: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ] if ( mask & RTEMS_TIMESLICE_MASK ) { 200ddd8: 80 8e 62 00 btst 0x200, %i1 200dddc: 02 80 00 0b be 200de08 200dde0: 80 8e 60 0f btst 0xf, %i1 if ( _Modes_Is_timeslice(mode_set) ) { 200dde4: 80 8e 22 00 btst 0x200, %i0 200dde8: 22 80 00 07 be,a 200de04 200ddec: c0 24 20 7c clr [ %l0 + 0x7c ] executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 200ddf0: 03 00 80 6f sethi %hi(0x201bc00), %g1 200ddf4: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 201bc78 <_Thread_Ticks_per_timeslice> 200ddf8: c2 24 20 78 st %g1, [ %l0 + 0x78 ] 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; 200ddfc: 82 10 20 01 mov 1, %g1 200de00: c2 24 20 7c st %g1, [ %l0 + 0x7c ] /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 200de04: 80 8e 60 0f btst 0xf, %i1 200de08: 02 80 00 06 be 200de20 200de0c: 80 8e 64 00 btst 0x400, %i1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 200de10: 90 0e 20 0f and %i0, 0xf, %o0 200de14: 7f ff d0 eb call 20021c0 200de18: 91 2a 20 08 sll %o0, 8, %o0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 200de1c: 80 8e 64 00 btst 0x400, %i1 200de20: 22 80 00 18 be,a 200de80 200de24: a0 10 20 00 clr %l0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200de28: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 200de2c: b1 36 20 0a srl %i0, 0xa, %i0 200de30: b0 1e 20 01 xor %i0, 1, %i0 200de34: b0 0e 20 01 and %i0, 1, %i0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 200de38: 80 a6 00 01 cmp %i0, %g1 200de3c: 22 80 00 11 be,a 200de80 200de40: a0 10 20 00 clr %l0 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 200de44: 7f ff d0 db call 20021b0 200de48: f0 2c 60 08 stb %i0, [ %l1 + 8 ] _signals = information->signals_pending; 200de4c: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 information->signals_pending = information->signals_posted; 200de50: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 information->signals_posted = _signals; 200de54: c4 24 60 14 st %g2, [ %l1 + 0x14 ] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; 200de58: c2 24 60 18 st %g1, [ %l1 + 0x18 ] information->signals_posted = _signals; _ISR_Enable( _level ); 200de5c: 7f ff d0 d9 call 20021c0 200de60: 01 00 00 00 nop 200de64: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 200de68: 80 a0 60 00 cmp %g1, 0 200de6c: 22 80 00 05 be,a 200de80 200de70: a0 10 20 00 clr %l0 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; 200de74: 82 10 20 01 mov 1, %g1 200de78: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 200de7c: a0 10 20 01 mov 1, %l0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 200de80: 03 00 80 6f sethi %hi(0x201bc00), %g1 200de84: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 201bec0 <_System_state_Current> 200de88: 80 a0 60 03 cmp %g1, 3 200de8c: 12 80 00 0c bne 200debc <== NEVER TAKEN 200de90: 82 10 20 00 clr %g1 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 200de94: 40 00 00 bc call 200e184 <_Thread_Evaluate_mode> 200de98: 01 00 00 00 nop 200de9c: 80 8a 20 ff btst 0xff, %o0 200dea0: 12 80 00 04 bne 200deb0 200dea4: 80 8c 20 ff btst 0xff, %l0 200dea8: 02 80 00 05 be 200debc 200deac: 82 10 20 00 clr %g1 _Thread_Dispatch(); 200deb0: 7f ff e7 03 call 2007abc <_Thread_Dispatch> 200deb4: 01 00 00 00 nop 200deb8: 82 10 20 00 clr %g1 ! 0 return RTEMS_SUCCESSFUL; } 200debc: 81 c7 e0 08 ret 200dec0: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200afcc : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 200afcc: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 200afd0: 80 a6 60 00 cmp %i1, 0 200afd4: 02 80 00 07 be 200aff0 200afd8: 90 10 00 18 mov %i0, %o0 200afdc: 03 00 80 87 sethi %hi(0x2021c00), %g1 200afe0: c2 08 61 44 ldub [ %g1 + 0x144 ], %g1 ! 2021d44 200afe4: 80 a6 40 01 cmp %i1, %g1 200afe8: 18 80 00 1c bgu 200b058 200afec: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 200aff0: 80 a6 a0 00 cmp %i2, 0 200aff4: 02 80 00 19 be 200b058 200aff8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 200affc: 40 00 08 59 call 200d160 <_Thread_Get> 200b000: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200b004: c2 07 bf fc ld [ %fp + -4 ], %g1 200b008: 80 a0 60 00 cmp %g1, 0 200b00c: 12 80 00 13 bne 200b058 200b010: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 200b014: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 200b018: 80 a6 60 00 cmp %i1, 0 200b01c: 02 80 00 0d be 200b050 200b020: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 200b024: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200b028: 80 a0 60 00 cmp %g1, 0 200b02c: 02 80 00 06 be 200b044 200b030: f2 22 20 18 st %i1, [ %o0 + 0x18 ] the_thread->current_priority > new_priority ) 200b034: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200b038: 80 a0 40 19 cmp %g1, %i1 200b03c: 08 80 00 05 bleu 200b050 <== ALWAYS TAKEN 200b040: 01 00 00 00 nop _Thread_Change_priority( the_thread, new_priority, false ); 200b044: 92 10 00 19 mov %i1, %o1 200b048: 40 00 06 98 call 200caa8 <_Thread_Change_priority> 200b04c: 94 10 20 00 clr %o2 } _Thread_Enable_dispatch(); 200b050: 40 00 08 21 call 200d0d4 <_Thread_Enable_dispatch> 200b054: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 200b058: 81 c7 e0 08 ret 200b05c: 81 e8 00 00 restore =============================================================================== 02004740 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 2004740: 82 10 00 08 mov %o0, %g1 int baud_index; switch (termios_baud) { 2004744: 80 a2 20 09 cmp %o0, 9 2004748: 02 80 00 19 be 20047ac <== NEVER TAKEN 200474c: 90 10 20 09 mov 9, %o0 2004750: 80 a0 60 09 cmp %g1, 9 2004754: 14 80 00 25 bg 20047e8 <== NEVER TAKEN 2004758: 80 a0 60 0e cmp %g1, 0xe 200475c: 80 a0 60 04 cmp %g1, 4 2004760: 02 80 00 13 be 20047ac <== NEVER TAKEN 2004764: 90 10 20 04 mov 4, %o0 2004768: 80 a0 60 04 cmp %g1, 4 200476c: 14 80 00 12 bg 20047b4 <== NEVER TAKEN 2004770: 80 a0 60 06 cmp %g1, 6 2004774: 80 a0 60 01 cmp %g1, 1 2004778: 02 80 00 0d be 20047ac <== NEVER TAKEN 200477c: 90 10 20 01 mov 1, %o0 2004780: 80 a0 60 01 cmp %g1, 1 2004784: 34 80 00 05 bg,a 2004798 <== NEVER TAKEN 2004788: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200478c: 80 a0 60 00 cmp %g1, 0 2004790: 10 80 00 3f b 200488c 2004794: 90 10 20 00 clr %o0 2004798: 02 80 00 05 be 20047ac <== NOT EXECUTED 200479c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 20047a0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 20047a4: 12 80 00 3c bne 2004894 <== NOT EXECUTED 20047a8: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED 20047ac: 81 c3 e0 08 retl <== NOT EXECUTED 20047b0: 01 00 00 00 nop <== NOT EXECUTED 20047b4: 02 bf ff fe be 20047ac <== NOT EXECUTED 20047b8: 90 10 20 06 mov 6, %o0 ! 6 <== NOT EXECUTED 20047bc: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 20047c0: 06 bf ff fb bl 20047ac <== NOT EXECUTED 20047c4: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED 20047c8: 80 a0 60 07 cmp %g1, 7 <== NOT EXECUTED 20047cc: 02 bf ff f8 be 20047ac <== NOT EXECUTED 20047d0: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED 20047d4: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 20047d8: 12 80 00 2f bne 2004894 <== NOT EXECUTED 20047dc: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED 20047e0: 81 c3 e0 08 retl <== NOT EXECUTED 20047e4: 01 00 00 00 nop <== NOT EXECUTED 20047e8: 02 bf ff f1 be 20047ac <== NOT EXECUTED 20047ec: 90 10 20 0e mov 0xe, %o0 ! e <== NOT EXECUTED 20047f0: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 20047f4: 14 80 00 10 bg 2004834 <== NOT EXECUTED 20047f8: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 20047fc: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 2004800: 02 bf ff eb be 20047ac <== NOT EXECUTED 2004804: 90 10 20 0b mov 0xb, %o0 <== NOT EXECUTED 2004808: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 200480c: 06 bf ff e8 bl 20047ac <== NOT EXECUTED 2004810: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 2004814: 80 a0 60 0c cmp %g1, 0xc <== NOT EXECUTED 2004818: 02 bf ff e5 be 20047ac <== NOT EXECUTED 200481c: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED 2004820: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 2004824: 12 80 00 1c bne 2004894 <== NOT EXECUTED 2004828: 90 10 20 0d mov 0xd, %o0 <== NOT EXECUTED 200482c: 81 c3 e0 08 retl <== NOT EXECUTED 2004830: 01 00 00 00 nop <== NOT EXECUTED 2004834: 86 10 a0 02 or %g2, 2, %g3 <== NOT EXECUTED 2004838: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 200483c: 02 bf ff dc be 20047ac <== NOT EXECUTED 2004840: 90 10 20 11 mov 0x11, %o0 <== NOT EXECUTED 2004844: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2004848: 34 80 00 0b bg,a 2004874 <== NOT EXECUTED 200484c: 86 10 a0 03 or %g2, 3, %g3 <== NOT EXECUTED 2004850: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED 2004854: 02 bf ff d6 be 20047ac <== NOT EXECUTED 2004858: 90 10 20 0f mov 0xf, %o0 <== NOT EXECUTED 200485c: 84 10 a0 01 or %g2, 1, %g2 <== NOT EXECUTED 2004860: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2004864: 12 80 00 0c bne 2004894 <== NOT EXECUTED 2004868: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED 200486c: 81 c3 e0 08 retl <== NOT EXECUTED 2004870: 01 00 00 00 nop <== NOT EXECUTED 2004874: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2004878: 02 bf ff cd be 20047ac <== NOT EXECUTED 200487c: 90 10 20 12 mov 0x12, %o0 <== NOT EXECUTED 2004880: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 2004884: 90 10 20 13 mov 0x13, %o0 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 2004888: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 200488c: 02 80 00 03 be 2004898 <== NEVER TAKEN 2004890: 01 00 00 00 nop case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 2004894: 90 10 3f ff mov -1, %o0 ! ffffffff default: baud_index = -1; break; } return baud_index; } 2004898: 81 c3 e0 08 retl =============================================================================== 020048a0 : #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 20048a0: 82 10 00 08 mov %o0, %g1 int32_t baud; switch (termios_baud) { 20048a4: 80 a2 20 09 cmp %o0, 9 20048a8: 02 80 00 19 be 200490c 20048ac: 90 10 24 b0 mov 0x4b0, %o0 20048b0: 80 a0 60 09 cmp %g1, 9 20048b4: 14 80 00 25 bg 2004948 20048b8: 11 00 00 12 sethi %hi(0x4800), %o0 20048bc: 80 a0 60 04 cmp %g1, 4 20048c0: 02 80 00 13 be 200490c 20048c4: 90 10 20 86 mov 0x86, %o0 20048c8: 80 a0 60 04 cmp %g1, 4 20048cc: 14 80 00 12 bg 2004914 20048d0: 80 a0 60 06 cmp %g1, 6 20048d4: 80 a0 60 01 cmp %g1, 1 20048d8: 02 80 00 0d be 200490c 20048dc: 90 10 20 32 mov 0x32, %o0 20048e0: 80 a0 60 01 cmp %g1, 1 20048e4: 34 80 00 05 bg,a 20048f8 20048e8: 80 a0 60 02 cmp %g1, 2 20048ec: 80 a0 60 00 cmp %g1, 0 20048f0: 10 80 00 45 b 2004a04 20048f4: 90 10 20 00 clr %o0 20048f8: 02 80 00 05 be 200490c 20048fc: 90 10 20 4b mov 0x4b, %o0 2004900: 80 a0 60 03 cmp %g1, 3 2004904: 12 80 00 42 bne 2004a0c <== NEVER TAKEN 2004908: 90 10 20 6e mov 0x6e, %o0 200490c: 81 c3 e0 08 retl 2004910: 01 00 00 00 nop 2004914: 02 bf ff fe be 200490c 2004918: 90 10 20 c8 mov 0xc8, %o0 ! c8 200491c: 80 a0 60 06 cmp %g1, 6 2004920: 06 bf ff fb bl 200490c 2004924: 90 10 20 96 mov 0x96, %o0 2004928: 80 a0 60 07 cmp %g1, 7 200492c: 02 bf ff f8 be 200490c 2004930: 90 10 21 2c mov 0x12c, %o0 2004934: 80 a0 60 08 cmp %g1, 8 2004938: 12 80 00 35 bne 2004a0c <== NEVER TAKEN 200493c: 90 10 22 58 mov 0x258, %o0 2004940: 81 c3 e0 08 retl 2004944: 01 00 00 00 nop 2004948: 80 a0 60 0e cmp %g1, 0xe 200494c: 02 bf ff f0 be 200490c 2004950: 90 12 23 00 or %o0, 0x300, %o0 2004954: 80 a0 60 0e cmp %g1, 0xe 2004958: 14 80 00 12 bg 20049a0 200495c: 05 00 00 04 sethi %hi(0x1000), %g2 2004960: 80 a0 60 0b cmp %g1, 0xb 2004964: 02 bf ff ea be 200490c 2004968: 90 10 29 60 mov 0x960, %o0 200496c: 80 a0 60 0b cmp %g1, 0xb 2004970: 06 bf ff e7 bl 200490c 2004974: 90 10 27 08 mov 0x708, %o0 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; 2004978: 90 02 28 f8 add %o0, 0x8f8, %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 200497c: 80 a0 60 0c cmp %g1, 0xc 2004980: 02 bf ff e3 be 200490c 2004984: 90 12 22 c0 or %o0, 0x2c0, %o0 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; 2004988: 11 00 00 09 sethi %hi(0x2400), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 200498c: 80 a0 60 0d cmp %g1, 0xd 2004990: 12 80 00 1f bne 2004a0c <== NEVER TAKEN 2004994: 90 12 21 80 or %o0, 0x180, %o0 2004998: 81 c3 e0 08 retl 200499c: 01 00 00 00 nop 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; 20049a0: 11 00 00 70 sethi %hi(0x1c000), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 20049a4: 86 10 a0 02 or %g2, 2, %g3 20049a8: 80 a0 40 03 cmp %g1, %g3 20049ac: 02 bf ff d8 be 200490c 20049b0: 90 12 22 00 or %o0, 0x200, %o0 20049b4: 80 a0 40 03 cmp %g1, %g3 20049b8: 34 80 00 0d bg,a 20049ec 20049bc: 86 10 a0 03 or %g2, 3, %g3 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; 20049c0: 11 00 00 25 sethi %hi(0x9400), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 20049c4: 80 a0 60 0f cmp %g1, 0xf 20049c8: 02 bf ff d1 be 200490c 20049cc: 90 12 22 00 or %o0, 0x200, %o0 20049d0: 84 10 a0 01 or %g2, 1, %g2 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; 20049d4: 11 00 00 38 sethi %hi(0xe000), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 20049d8: 80 a0 40 02 cmp %g1, %g2 20049dc: 12 80 00 0c bne 2004a0c <== NEVER TAKEN 20049e0: 90 12 21 00 or %o0, 0x100, %o0 20049e4: 81 c3 e0 08 retl 20049e8: 01 00 00 00 nop 20049ec: 80 a0 40 03 cmp %g1, %g3 20049f0: 02 bf ff c7 be 200490c 20049f4: 11 00 00 e1 sethi %hi(0x38400), %o0 20049f8: 84 10 a0 04 or %g2, 4, %g2 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; 20049fc: 11 00 01 c2 sethi %hi(0x70800), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 2004a00: 80 a0 40 02 cmp %g1, %g2 2004a04: 02 80 00 03 be 2004a10 2004a08: 01 00 00 00 nop 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; 2004a0c: 90 10 3f ff mov -1, %o0 ! ffffffff default: baud = -1; break; } return baud; } 2004a10: 81 c3 e0 08 retl =============================================================================== 02003268 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 2003268: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 200326c: d0 20 63 00 st %o0, [ %g1 + 0x300 ] ! 201b300 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 2003270: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 2003274: 90 10 20 00 clr %o0 <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; 2003278: d2 20 63 04 st %o1, [ %g1 + 0x304 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 200327c: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 2003280: 81 c3 e0 08 retl <== NOT EXECUTED 2003284: d4 20 63 08 st %o2, [ %g1 + 0x308 ] ! 201b308 <== NOT EXECUTED =============================================================================== 020048c4 : } } rtems_status_code rtems_termios_close (void *arg) { 20048c4: 9d e3 bf a0 save %sp, -96, %sp 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); 20048c8: 03 00 80 6e sethi %hi(0x201b800), %g1 20048cc: d0 00 63 9c ld [ %g1 + 0x39c ], %o0 ! 201bb9c rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 20048d0: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 20048d4: 92 10 20 00 clr %o1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 20048d8: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 20048dc: 40 00 04 66 call 2005a74 20048e0: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 20048e4: 80 a2 20 00 cmp %o0, 0 20048e8: 12 80 00 2c bne 2004998 <== NEVER TAKEN 20048ec: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 20048f0: c2 04 20 08 ld [ %l0 + 8 ], %g1 20048f4: 82 00 7f ff add %g1, -1, %g1 20048f8: 80 a0 60 00 cmp %g1, 0 20048fc: 12 80 00 5e bne 2004a74 2004900: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 2004904: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 2004908: 03 00 80 6e sethi %hi(0x201b800), %g1 200490c: 85 28 a0 05 sll %g2, 5, %g2 2004910: 82 10 60 c4 or %g1, 0xc4, %g1 2004914: 82 00 40 02 add %g1, %g2, %g1 2004918: c2 00 60 04 ld [ %g1 + 4 ], %g1 200491c: 80 a0 60 00 cmp %g1, 0 2004920: 22 80 00 06 be,a 2004938 <== ALWAYS TAKEN 2004924: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 2004928: 9f c0 40 00 call %g1 <== NOT EXECUTED 200492c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 2004930: 10 80 00 0b b 200495c <== NOT EXECUTED 2004934: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2004938: 92 10 20 00 clr %o1 200493c: 40 00 04 4e call 2005a74 2004940: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 2004944: 80 a2 20 00 cmp %o0, 0 2004948: 12 80 00 14 bne 2004998 <== NEVER TAKEN 200494c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); } drainOutput (tty); 2004950: 7f ff fd d0 call 2004090 2004954: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 2004958: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 200495c: 80 a0 60 02 cmp %g1, 2 2004960: 32 80 00 10 bne,a 20049a0 <== ALWAYS TAKEN 2004964: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 2004968: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 200496c: 40 00 03 03 call 2005578 <== NOT EXECUTED 2004970: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 2004974: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004978: 12 80 00 08 bne 2004998 <== NOT EXECUTED 200497c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 2004980: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 2004984: 40 00 02 fd call 2005578 <== NOT EXECUTED 2004988: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 200498c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004990: 22 80 00 04 be,a 20049a0 <== NOT EXECUTED 2004994: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2004998: 40 00 05 e0 call 2006118 <== NOT EXECUTED 200499c: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 20049a0: 80 a0 60 00 cmp %g1, 0 20049a4: 22 80 00 07 be,a 20049c0 <== ALWAYS TAKEN 20049a8: c4 04 00 00 ld [ %l0 ], %g2 (*tty->device.lastClose)(tty->major, tty->minor, arg); 20049ac: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 20049b0: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 20049b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20049b8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 20049bc: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 20049c0: 80 a0 a0 00 cmp %g2, 0 20049c4: 12 80 00 08 bne 20049e4 20049c8: c2 04 20 04 ld [ %l0 + 4 ], %g1 rtems_termios_ttyTail = tty->back; 20049cc: 05 00 80 6e sethi %hi(0x201b800), %g2 if ( rtems_termios_ttyTail != NULL ) { 20049d0: 80 a0 60 00 cmp %g1, 0 20049d4: 02 80 00 05 be 20049e8 <== ALWAYS TAKEN 20049d8: c2 20 a3 a0 st %g1, [ %g2 + 0x3a0 ] rtems_termios_ttyTail->forw = NULL; 20049dc: 10 80 00 03 b 20049e8 <== NOT EXECUTED 20049e0: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; 20049e4: c2 20 a0 04 st %g1, [ %g2 + 4 ] } if (tty->back == NULL) { 20049e8: c4 04 20 04 ld [ %l0 + 4 ], %g2 20049ec: 80 a0 a0 00 cmp %g2, 0 20049f0: 12 80 00 08 bne 2004a10 <== NEVER TAKEN 20049f4: c2 04 00 00 ld [ %l0 ], %g1 rtems_termios_ttyHead = tty->forw; 20049f8: 05 00 80 6e sethi %hi(0x201b800), %g2 if ( rtems_termios_ttyHead != NULL ) { 20049fc: 80 a0 60 00 cmp %g1, 0 2004a00: 02 80 00 05 be 2004a14 2004a04: c2 20 a3 a4 st %g1, [ %g2 + 0x3a4 ] rtems_termios_ttyHead->back = NULL; 2004a08: 10 80 00 03 b 2004a14 2004a0c: c0 20 60 04 clr [ %g1 + 4 ] } } else { tty->back->forw = tty->forw; 2004a10: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 2004a14: 40 00 03 ea call 20059bc 2004a18: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 2004a1c: 40 00 03 e8 call 20059bc 2004a20: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 2004a24: 40 00 03 e6 call 20059bc 2004a28: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 2004a2c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 2004a30: 80 a0 60 00 cmp %g1, 0 2004a34: 02 80 00 06 be 2004a4c 2004a38: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 2004a3c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 2004a40: 80 a0 60 02 cmp %g1, 2 2004a44: 12 80 00 04 bne 2004a54 <== ALWAYS TAKEN 2004a48: 01 00 00 00 nop rtems_semaphore_delete (tty->rawInBuf.Semaphore); 2004a4c: 40 00 03 dc call 20059bc 2004a50: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 free (tty->rawInBuf.theBuf); 2004a54: 40 00 17 b5 call 200a928 2004a58: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 2004a5c: 40 00 17 b3 call 200a928 2004a60: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 2004a64: 40 00 17 b1 call 200a928 2004a68: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 2004a6c: 40 00 17 af call 200a928 2004a70: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 2004a74: 03 00 80 6e sethi %hi(0x201b800), %g1 2004a78: d0 00 63 9c ld [ %g1 + 0x39c ], %o0 ! 201bb9c 2004a7c: 40 00 04 45 call 2005b90 2004a80: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 2004a84: 81 c7 e0 08 ret 2004a88: 81 e8 00 00 restore =============================================================================== 02003488 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 2003488: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 200348c: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2003490: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2003494: 84 00 80 19 add %g2, %i1, %g2 2003498: c4 26 20 90 st %g2, [ %i0 + 0x90 ] if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 200349c: 80 a0 60 02 cmp %g1, 2 20034a0: 12 80 00 0a bne 20034c8 <== ALWAYS TAKEN 20034a4: 90 10 00 18 mov %i0, %o0 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 20034a8: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 20034ac: 40 00 08 33 call 2005578 <== NOT EXECUTED 20034b0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 20034b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20034b8: 02 80 00 11 be 20034fc <== NOT EXECUTED 20034bc: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20034c0: 40 00 0b 16 call 2006118 <== NOT EXECUTED 20034c4: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 20034c8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 20034cc: 80 a0 60 05 cmp %g1, 5 20034d0: 12 80 00 09 bne 20034f4 <== ALWAYS TAKEN 20034d4: 03 00 80 6e sethi %hi(0x201b800), %g1 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 20034d8: c2 00 61 78 ld [ %g1 + 0x178 ], %g1 ! 201b978 <== NOT EXECUTED 20034dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20034e0: 02 80 00 07 be 20034fc <== NOT EXECUTED 20034e4: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 20034e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20034ec: 01 00 00 00 nop <== NOT EXECUTED 20034f0: 30 80 00 03 b,a 20034fc <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 20034f4: 7f ff ff 6b call 20032a0 20034f8: 81 e8 00 00 restore } } 20034fc: 81 c7 e0 08 ret <== NOT EXECUTED 2003500: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003504 : * 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) { 2003504: 9d e3 bf a0 save %sp, -96, %sp 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) { 2003508: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 200350c: 25 00 80 6e sethi %hi(0x201b800), %l2 2003510: 83 28 60 05 sll %g1, 5, %g1 2003514: a4 14 a0 c4 or %l2, 0xc4, %l2 2003518: 82 00 60 10 add %g1, 0x10, %g1 200351c: c2 04 80 01 ld [ %l2 + %g1 ], %g1 * 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) { 2003520: a0 10 00 18 mov %i0, %l0 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) { 2003524: 80 a0 60 00 cmp %g1, 0 2003528: 12 80 00 11 bne 200356c <== NEVER TAKEN 200352c: a2 10 00 1a mov %i2, %l1 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, 2003530: aa 06 20 4a add %i0, 0x4a, %l5 /* * 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); 2003534: a8 06 20 30 add %i0, 0x30, %l4 2003538: a4 10 20 00 clr %l2 200353c: 10 80 00 ad b 20037f0 2003540: b0 10 20 00 clr %i0 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--) { c = *buf++; 2003544: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2003548: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 200354c: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 2003550: c2 04 80 01 ld [ %l2 + %g1 ], %g1 <== NOT EXECUTED 2003554: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 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--) { c = *buf++; 2003558: b2 06 60 01 inc %i1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 200355c: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED 2003560: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED 2003564: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003568: 92 10 00 10 mov %l0, %o1 <== 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--) { 200356c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2003570: 32 bf ff f5 bne,a 2003544 <== NOT EXECUTED 2003574: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2003578: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 200357c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003580: 12 80 00 a6 bne 2003818 <== NOT EXECUTED 2003584: 01 00 00 00 nop <== NOT EXECUTED 2003588: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 200358c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003590: 02 80 00 a2 be 2003818 <== NOT EXECUTED 2003594: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2003598: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 200359c: 9f c0 40 00 call %g1 <== NOT EXECUTED 20035a0: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 20035a4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20035a8: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED 20035ac: 81 c7 e0 08 ret <== NOT EXECUTED 20035b0: 91 e8 20 00 restore %g0, 0, %o0 <== 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) { 20035b4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20035b8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 20035bc: 02 80 00 1b be 2003628 <== NOT EXECUTED 20035c0: e6 0e 40 00 ldub [ %i1 ], %l3 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 20035c4: c4 0c 20 4a ldub [ %l0 + 0x4a ], %g2 <== NOT EXECUTED 20035c8: 83 2c e0 18 sll %l3, 0x18, %g1 <== NOT EXECUTED 20035cc: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 20035d0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20035d4: 12 80 00 0e bne 200360c <== NOT EXECUTED 20035d8: c4 0c 20 49 ldub [ %l0 + 0x49 ], %g2 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 20035dc: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 20035e0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 20035e4: 12 80 00 05 bne 20035f8 <== NOT EXECUTED 20035e8: 01 00 00 00 nop <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 20035ec: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20035f0: 10 80 00 04 b 2003600 <== NOT EXECUTED 20035f4: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 20035f8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20035fc: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 2003600: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2003604: 10 80 00 0c b 2003634 <== NOT EXECUTED 2003608: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 200360c: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 2003610: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2003614: 12 80 00 06 bne 200362c <== NOT EXECUTED 2003618: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 200361c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003620: 10 bf ff f8 b 2003600 <== NOT EXECUTED 2003624: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 2003628: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED 200362c: 02 80 00 1c be 200369c <== NOT EXECUTED 2003630: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2003634: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003638: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 200363c: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 2003640: 32 80 00 6b bne,a 20037ec <== NOT EXECUTED 2003644: b2 06 60 01 inc %i1 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 2003648: 7f ff fa da call 20021b0 <== NOT EXECUTED 200364c: 01 00 00 00 nop <== NOT EXECUTED 2003650: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 2003654: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2003658: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== 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); tty->flow_ctrl &= ~FL_OSTOP; 200365c: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 2003660: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2003664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003668: 02 80 00 09 be 200368c <== NOT EXECUTED 200366c: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 2003670: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 <== 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, 2003674: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 2003678: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 200367c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 2003680: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 2003684: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003688: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 200368c: 7f ff fa cd call 20021c0 <== NOT EXECUTED 2003690: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 2003694: 10 80 00 56 b 20037ec <== NOT EXECUTED 2003698: b2 06 60 01 inc %i1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 200369c: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 20036a0: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 20036a4: 40 00 53 db call 2018610 <.urem> <== NOT EXECUTED 20036a8: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 20036ac: 7f ff fa c1 call 20021b0 <== NOT EXECUTED 20036b0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 20036b4: ac 10 00 08 mov %o0, %l6 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 20036b8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 20036bc: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 20036c0: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 20036c4: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 20036c8: 40 00 53 d2 call 2018610 <.urem> <== NOT EXECUTED 20036cc: 90 02 00 11 add %o0, %l1, %o0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 20036d0: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 <== NOT EXECUTED 20036d4: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 20036d8: 08 80 00 2d bleu 200378c <== NOT EXECUTED 20036dc: 01 00 00 00 nop <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 20036e0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== 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) 20036e4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 20036e8: 12 80 00 29 bne 200378c <== NOT EXECUTED 20036ec: 01 00 00 00 nop <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 20036f0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20036f4: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 20036f8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 20036fc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003700: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 2003704: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 2003708: 12 80 00 13 bne 2003754 <== NOT EXECUTED 200370c: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 2003710: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003714: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003718: 12 80 00 06 bne 2003730 <== NOT EXECUTED 200371c: 01 00 00 00 nop <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 2003720: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 2003724: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003728: 12 80 00 19 bne 200378c <== NOT EXECUTED 200372c: 01 00 00 00 nop <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 2003730: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2003734: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 2003738: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== 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; 200373c: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2003740: 92 10 00 15 mov %l5, %o1 <== 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; 2003744: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 2003748: 9f c0 40 00 call %g1 <== NOT EXECUTED 200374c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2003750: 30 80 00 0f b,a 200378c <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 2003754: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2003758: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 200375c: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 2003760: 12 80 00 0b bne 200378c <== NOT EXECUTED 2003764: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2003768: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 200376c: c2 04 20 ac ld [ %l0 + 0xac ], %g1 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2003770: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 2003774: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2003778: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200377c: 02 80 00 04 be 200378c <== NOT EXECUTED 2003780: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 2003784: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003788: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 200378c: 7f ff fa 8d call 20021c0 <== NOT EXECUTED 2003790: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 2003794: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 2003798: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 200379c: 32 80 00 04 bne,a 20037ac <== NOT EXECUTED 20037a0: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED dropped++; 20037a4: 10 80 00 11 b 20037e8 <== NOT EXECUTED 20037a8: b0 06 20 01 inc %i0 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 20037ac: e6 28 40 11 stb %l3, [ %g1 + %l1 ] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 20037b0: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 20037b4: e2 24 20 60 st %l1, [ %l0 + 0x60 ] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 20037b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20037bc: 32 80 00 0c bne,a 20037ec <== NOT EXECUTED 20037c0: b2 06 60 01 inc %i1 <== NOT EXECUTED 20037c4: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 20037c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20037cc: 22 80 00 08 be,a 20037ec <== NOT EXECUTED 20037d0: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 20037d4: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 20037d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20037dc: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 20037e0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20037e4: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 20037e8: b2 06 60 01 inc %i1 <== NOT EXECUTED 20037ec: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 20037f0: 80 a6 a0 00 cmp %i2, 0 20037f4: 12 bf ff 70 bne 20035b4 <== NEVER TAKEN 20037f8: 01 00 00 00 nop tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 20037fc: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 rtems_semaphore_release (tty->rawInBuf.Semaphore); 2003800: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 2003804: 82 00 40 18 add %g1, %i0, %g1 rtems_semaphore_release (tty->rawInBuf.Semaphore); 2003808: 40 00 08 e2 call 2005b90 200380c: c2 24 20 78 st %g1, [ %l0 + 0x78 ] return dropped; 2003810: 81 c7 e0 08 ret 2003814: 81 e8 00 00 restore } 2003818: 81 c7 e0 08 ret <== NOT EXECUTED 200381c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 0200321c : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 200321c: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 2003220: 19 00 80 6e sethi %hi(0x201b800), %o4 2003224: c2 03 23 9c ld [ %o4 + 0x39c ], %g1 ! 201bb9c 2003228: 80 a0 60 00 cmp %g1, 0 200322c: 12 80 00 0d bne 2003260 2003230: 98 13 23 9c or %o4, 0x39c, %o4 sc = rtems_semaphore_create ( 2003234: 11 15 14 9b sethi %hi(0x54526c00), %o0 2003238: 92 10 20 01 mov 1, %o1 200323c: 90 12 21 69 or %o0, 0x169, %o0 2003240: 94 10 20 54 mov 0x54, %o2 2003244: 40 00 09 6a call 20057ec 2003248: 96 10 20 00 clr %o3 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) 200324c: 80 a2 20 00 cmp %o0, 0 2003250: 02 80 00 04 be 2003260 <== ALWAYS TAKEN 2003254: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 2003258: 40 00 0b b0 call 2006118 <== NOT EXECUTED 200325c: 01 00 00 00 nop <== NOT EXECUTED 2003260: 81 c7 e0 08 ret 2003264: 81 e8 00 00 restore =============================================================================== 020044c0 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 20044c0: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 20044c4: c2 06 00 00 ld [ %i0 ], %g1 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 20044c8: c0 26 20 0c clr [ %i0 + 0xc ] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 20044cc: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 20044d0: e4 06 20 08 ld [ %i0 + 8 ], %l2 rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 20044d4: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 20044d8: a2 10 00 18 mov %i0, %l1 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); 20044dc: 92 10 20 00 clr %o1 20044e0: 40 00 05 65 call 2005a74 20044e4: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 20044e8: b0 92 20 00 orcc %o0, 0, %i0 20044ec: 22 80 00 05 be,a 2004500 <== ALWAYS TAKEN 20044f0: c2 04 60 04 ld [ %l1 + 4 ], %g1 args->ioctl_return = sc; 20044f4: f0 24 60 0c st %i0, [ %l1 + 0xc ] <== NOT EXECUTED return sc; 20044f8: 81 c7 e0 08 ret <== NOT EXECUTED 20044fc: 81 e8 00 00 restore <== NOT EXECUTED } switch (args->command) { 2004500: 80 a0 60 04 cmp %g1, 4 2004504: 22 80 00 bd be,a 20047f8 <== NEVER TAKEN 2004508: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 200450c: 18 80 00 0b bgu 2004538 <== NEVER TAKEN 2004510: 05 10 01 19 sethi %hi(0x40046400), %g2 2004514: 80 a0 60 02 cmp %g1, 2 2004518: 22 80 00 2c be,a 20045c8 200451c: d2 04 60 08 ld [ %l1 + 8 ], %o1 2004520: 18 80 00 af bgu 20047dc 2004524: 80 a0 60 01 cmp %g1, 1 2004528: 32 80 00 17 bne,a 2004584 <== NEVER TAKEN 200452c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 2004530: 10 80 00 22 b 20045b8 2004534: d0 04 60 08 ld [ %l1 + 8 ], %o0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 2004538: 84 10 a2 7f or %g2, 0x27f, %g2 <== NOT EXECUTED 200453c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2004540: 02 80 00 cf be 200487c <== NOT EXECUTED 2004544: 01 00 00 00 nop <== NOT EXECUTED 2004548: 18 80 00 07 bgu 2004564 <== NOT EXECUTED 200454c: 05 10 01 1d sethi %hi(0x40047400), %g2 <== NOT EXECUTED 2004550: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 2004554: 32 80 00 0c bne,a 2004584 <== NOT EXECUTED 2004558: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 200455c: 10 80 00 a3 b 20047e8 <== NOT EXECUTED 2004560: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 2004564: 84 10 a0 1a or %g2, 0x1a, %g2 <== NOT EXECUTED 2004568: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 200456c: 02 80 00 c0 be 200486c <== NOT EXECUTED 2004570: 05 20 01 1d sethi %hi(0x80047400), %g2 <== NOT EXECUTED 2004574: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <== NOT EXECUTED 2004578: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 200457c: 02 80 00 a3 be 2004808 <== NOT EXECUTED 2004580: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 2004584: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 2004588: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 200458c: 82 10 60 c4 or %g1, 0xc4, %g1 <== NOT EXECUTED 2004590: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 2004594: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 2004598: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200459c: 02 80 00 c5 be 20048b0 <== NOT EXECUTED 20045a0: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 20045a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20045a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20045ac: 92 10 00 11 mov %l1, %o1 <== 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) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); 20045b0: 10 80 00 c0 b 20048b0 <== NOT EXECUTED 20045b4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 20045b8: 92 04 20 30 add %l0, 0x30, %o1 20045bc: 40 00 2c 71 call 200f780 20045c0: 94 10 20 24 mov 0x24, %o2 break; 20045c4: 30 80 00 bb b,a 20048b0 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 20045c8: 90 04 20 30 add %l0, 0x30, %o0 20045cc: 40 00 2c 6d call 200f780 20045d0: 94 10 20 24 mov 0x24, %o2 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 20045d4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 20045d8: 80 88 62 00 btst 0x200, %g1 20045dc: 02 80 00 20 be 200465c 20045e0: 01 00 00 00 nop 20045e4: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 20045e8: 80 88 64 00 btst 0x400, %g1 20045ec: 12 80 00 1c bne 200465c <== ALWAYS TAKEN 20045f0: 01 00 00 00 nop !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 20045f4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20045f8: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 20045fc: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 2004600: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2004604: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2004608: 02 80 00 15 be 200465c <== NOT EXECUTED 200460c: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 2004610: 7f ff f6 e8 call 20021b0 <== NOT EXECUTED 2004614: 01 00 00 00 nop <== NOT EXECUTED 2004618: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 200461c: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2004620: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2004624: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 2004628: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 200462c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004630: 02 80 00 09 be 2004654 <== NOT EXECUTED 2004634: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 2004638: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 <== 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, 200463c: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 2004640: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 2004644: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 2004648: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 200464c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004650: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 2004654: 7f ff f6 db call 20021c0 <== NOT EXECUTED 2004658: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 200465c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 2004660: 80 88 64 00 btst 0x400, %g1 2004664: 02 80 00 0c be 2004694 <== ALWAYS TAKEN 2004668: 03 00 00 04 sethi %hi(0x1000), %g1 200466c: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 2004670: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 2004674: 12 80 00 08 bne 2004694 <== NOT EXECUTED 2004678: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 200467c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2004680: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 2004684: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 2004688: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 200468c: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 2004690: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 2004694: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 2004698: 80 88 61 00 btst 0x100, %g1 200469c: 02 80 00 16 be 20046f4 <== ALWAYS TAKEN 20046a0: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 20046a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20046a8: 06 80 00 14 bl 20046f8 <== NOT EXECUTED 20046ac: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 20046b0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20046b4: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 20046b8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 20046bc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20046c0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 20046c4: 02 80 00 08 be 20046e4 <== NOT EXECUTED 20046c8: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 20046cc: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 <== 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) && 20046d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20046d4: 02 80 00 04 be 20046e4 <== NOT EXECUTED 20046d8: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 20046dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 20046e0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 20046e4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20046e8: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 20046ec: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== 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) { 20046f0: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 20046f4: 80 a0 60 00 cmp %g1, 0 20046f8: 36 80 00 06 bge,a 2004710 <== ALWAYS TAKEN 20046fc: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 tty->flow_ctrl |= FL_MDRTS; 2004700: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2004704: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 2004708: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 200470c: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 2004710: 03 00 00 04 sethi %hi(0x1000), %g1 2004714: 80 88 80 01 btst %g2, %g1 2004718: 22 80 00 06 be,a 2004730 <== ALWAYS TAKEN 200471c: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 tty->flow_ctrl |= FL_MDXOF; 2004720: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2004724: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 2004728: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 200472c: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 2004730: 80 88 64 00 btst 0x400, %g1 2004734: 22 80 00 06 be,a 200474c <== NEVER TAKEN 2004738: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 200473c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 2004740: 82 10 62 00 or %g1, 0x200, %g1 2004744: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] 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) { 2004748: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 200474c: 80 88 60 02 btst 2, %g1 2004750: 32 80 00 17 bne,a 20047ac <== ALWAYS TAKEN 2004754: c0 24 20 6c clr [ %l0 + 0x6c ] 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; 2004758: 40 00 02 fd call 200534c <== NOT EXECUTED 200475c: e4 0c 20 46 ldub [ %l0 + 0x46 ], %l2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 2004760: 40 00 4e c6 call 2018278 <.umul> <== NOT EXECUTED 2004764: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 2004768: 40 00 4e fe call 2018360 <.udiv> <== NOT EXECUTED 200476c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 2004770: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 2004774: d0 24 20 54 st %o0, [ %l0 + 0x54 ] <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 2004778: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200477c: 02 80 00 08 be 200479c <== NOT EXECUTED 2004780: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 2004784: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 2004788: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200478c: 12 80 00 09 bne 20047b0 <== NOT EXECUTED 2004790: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 2004794: 10 80 00 0a b 20047bc <== NOT EXECUTED 2004798: d0 24 20 74 st %o0, [ %l0 + 0x74 ] <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 200479c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20047a0: 02 80 00 06 be 20047b8 <== NOT EXECUTED 20047a4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 20047a8: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 20047ac: c0 24 20 70 clr [ %l0 + 0x70 ] tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 20047b0: 10 80 00 03 b 20047bc 20047b4: c0 24 20 74 clr [ %l0 + 0x74 ] } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 20047b8: c2 24 20 6c st %g1, [ %l0 + 0x6c ] <== NOT EXECUTED } } } if (tty->device.setAttributes) 20047bc: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 20047c0: 80 a0 60 00 cmp %g1, 0 20047c4: 02 80 00 3b be 20048b0 <== NEVER TAKEN 20047c8: 01 00 00 00 nop (*tty->device.setAttributes)(tty->minor, &tty->termios); 20047cc: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 20047d0: 9f c0 40 00 call %g1 20047d4: 92 04 20 30 add %l0, 0x30, %o1 20047d8: 30 80 00 36 b,a 20048b0 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 20047dc: 7f ff fe 2d call 2004090 20047e0: 90 10 00 10 mov %l0, %o0 break; 20047e4: 30 80 00 33 b,a 20048b0 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 20047e8: c2 24 20 d4 st %g1, [ %l0 + 0xd4 ] <== NOT EXECUTED 20047ec: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 20047f0: 10 80 00 30 b 20048b0 <== NOT EXECUTED 20047f4: c2 24 20 d8 st %g1, [ %l0 + 0xd8 ] <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 20047f8: c2 24 20 dc st %g1, [ %l0 + 0xdc ] <== NOT EXECUTED 20047fc: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 2004800: 10 80 00 2c b 20048b0 <== NOT EXECUTED 2004804: c2 24 20 e0 st %g1, [ %l0 + 0xe0 ] <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 2004808: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 200480c: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 2004810: 82 10 60 c4 or %g1, 0xc4, %g1 <== NOT EXECUTED 2004814: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 2004818: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 200481c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004820: 22 80 00 06 be,a 2004838 <== NOT EXECUTED 2004824: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 2004828: 9f c0 40 00 call %g1 <== NOT EXECUTED 200482c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2004830: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 2004834: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== 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) { 2004838: 07 00 80 6e sethi %hi(0x201b800), %g3 <== 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); 200483c: c4 00 40 00 ld [ %g1 ], %g2 <== 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) { 2004840: 86 10 e0 c4 or %g3, 0xc4, %g3 <== NOT EXECUTED 2004844: 83 28 a0 05 sll %g2, 5, %g1 <== NOT EXECUTED 2004848: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 <== 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); 200484c: c4 24 20 cc st %g2, [ %l0 + 0xcc ] <== 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) { 2004850: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004854: 02 80 00 17 be 20048b0 <== NOT EXECUTED 2004858: c0 24 20 d0 clr [ %l0 + 0xd0 ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 200485c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004860: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2004864: 10 80 00 13 b 20048b0 <== NOT EXECUTED 2004868: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 200486c: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED 2004870: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED break; 2004874: 10 80 00 0f b 20048b0 <== NOT EXECUTED 2004878: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 200487c: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 2004880: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 2004884: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED 2004888: 3c 80 00 05 bpos,a 200489c <== NOT EXECUTED 200488c: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 2004890: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 2004894: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 2004898: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED 200489c: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED 20048a0: c4 04 60 08 ld [ %l1 + 8 ], %g2 <== NOT EXECUTED 20048a4: 86 21 00 03 sub %g4, %g3, %g3 <== NOT EXECUTED 20048a8: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 20048ac: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 20048b0: 40 00 04 b8 call 2005b90 20048b4: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 args->ioctl_return = sc; 20048b8: f0 24 60 0c st %i0, [ %l1 + 0xc ] return sc; } 20048bc: 81 c7 e0 08 ret 20048c0: 81 e8 00 00 restore =============================================================================== 0200afb8 : #include int rtems_termios_number_to_baud( int32_t baud ) { 200afb8: 82 10 00 08 mov %o0, %g1 int termios_baud; switch (baud) { 200afbc: 80 a2 24 b0 cmp %o0, 0x4b0 200afc0: 02 80 00 19 be 200b024 200afc4: 90 10 20 09 mov 9, %o0 200afc8: 80 a0 64 b0 cmp %g1, 0x4b0 200afcc: 14 80 00 29 bg 200b070 200afd0: 05 00 00 12 sethi %hi(0x4800), %g2 200afd4: 80 a0 60 86 cmp %g1, 0x86 200afd8: 02 80 00 13 be 200b024 200afdc: 90 10 20 04 mov 4, %o0 200afe0: 80 a0 60 86 cmp %g1, 0x86 200afe4: 14 80 00 12 bg 200b02c 200afe8: 80 a0 60 c8 cmp %g1, 0xc8 200afec: 80 a0 60 32 cmp %g1, 0x32 200aff0: 02 80 00 0d be 200b024 200aff4: 90 10 20 01 mov 1, %o0 200aff8: 80 a0 60 32 cmp %g1, 0x32 200affc: 34 80 00 05 bg,a 200b010 200b000: 80 a0 60 4b cmp %g1, 0x4b 200b004: 80 a0 60 00 cmp %g1, 0 200b008: 10 80 00 52 b 200b150 200b00c: 90 10 20 00 clr %o0 200b010: 02 80 00 05 be 200b024 200b014: 90 10 20 02 mov 2, %o0 200b018: 80 a0 60 6e cmp %g1, 0x6e 200b01c: 12 80 00 4f bne 200b158 <== NEVER TAKEN 200b020: 90 10 20 03 mov 3, %o0 200b024: 81 c3 e0 08 retl 200b028: 01 00 00 00 nop 200b02c: 02 bf ff fe be 200b024 200b030: 90 10 20 06 mov 6, %o0 ! 6 200b034: 80 a0 60 c8 cmp %g1, 0xc8 200b038: 14 80 00 07 bg 200b054 200b03c: 80 a0 61 2c cmp %g1, 0x12c 200b040: 80 a0 60 96 cmp %g1, 0x96 200b044: 12 80 00 45 bne 200b158 <== NEVER TAKEN 200b048: 90 10 20 05 mov 5, %o0 200b04c: 81 c3 e0 08 retl 200b050: 01 00 00 00 nop 200b054: 02 bf ff f4 be 200b024 200b058: 90 10 20 07 mov 7, %o0 ! 7 200b05c: 80 a0 62 58 cmp %g1, 0x258 200b060: 12 80 00 3e bne 200b158 <== NEVER TAKEN 200b064: 90 10 20 08 mov 8, %o0 200b068: 81 c3 e0 08 retl 200b06c: 01 00 00 00 nop 200b070: 84 10 a3 00 or %g2, 0x300, %g2 200b074: 80 a0 40 02 cmp %g1, %g2 200b078: 02 bf ff eb be 200b024 200b07c: 90 10 20 0e mov 0xe, %o0 200b080: 80 a0 40 02 cmp %g1, %g2 200b084: 14 80 00 18 bg 200b0e4 200b088: 07 00 00 70 sethi %hi(0x1c000), %g3 200b08c: 80 a0 69 60 cmp %g1, 0x960 200b090: 02 bf ff e5 be 200b024 200b094: 90 10 20 0b mov 0xb, %o0 200b098: 80 a0 69 60 cmp %g1, 0x960 200b09c: 34 80 00 07 bg,a 200b0b8 200b0a0: 05 00 00 04 sethi %hi(0x1000), %g2 200b0a4: 80 a0 67 08 cmp %g1, 0x708 200b0a8: 12 80 00 2c bne 200b158 <== NEVER TAKEN 200b0ac: 90 10 20 0a mov 0xa, %o0 200b0b0: 81 c3 e0 08 retl 200b0b4: 01 00 00 00 nop 200b0b8: 84 10 a2 c0 or %g2, 0x2c0, %g2 200b0bc: 80 a0 40 02 cmp %g1, %g2 200b0c0: 02 bf ff d9 be 200b024 200b0c4: 90 10 20 0c mov 0xc, %o0 200b0c8: 05 00 00 09 sethi %hi(0x2400), %g2 200b0cc: 84 10 a1 80 or %g2, 0x180, %g2 ! 2580 200b0d0: 80 a0 40 02 cmp %g1, %g2 200b0d4: 12 80 00 21 bne 200b158 200b0d8: 90 10 20 0d mov 0xd, %o0 200b0dc: 81 c3 e0 08 retl 200b0e0: 01 00 00 00 nop 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; 200b0e4: 05 00 00 04 sethi %hi(0x1000), %g2 int32_t baud ) { int termios_baud; switch (baud) { 200b0e8: 86 10 e2 00 or %g3, 0x200, %g3 200b0ec: 80 a0 40 03 cmp %g1, %g3 200b0f0: 02 bf ff cd be 200b024 200b0f4: 90 10 a0 02 or %g2, 2, %o0 200b0f8: 80 a0 40 03 cmp %g1, %g3 200b0fc: 14 80 00 0f bg 200b138 200b100: 07 00 00 e1 sethi %hi(0x38400), %g3 200b104: 07 00 00 25 sethi %hi(0x9400), %g3 200b108: 86 10 e2 00 or %g3, 0x200, %g3 ! 9600 200b10c: 80 a0 40 03 cmp %g1, %g3 200b110: 02 bf ff c5 be 200b024 200b114: 90 10 20 0f mov 0xf, %o0 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; 200b118: 90 10 a0 01 or %g2, 1, %o0 int32_t baud ) { int termios_baud; switch (baud) { 200b11c: 05 00 00 38 sethi %hi(0xe000), %g2 200b120: 84 10 a1 00 or %g2, 0x100, %g2 ! e100 200b124: 80 a0 40 02 cmp %g1, %g2 200b128: 32 bf ff bf bne,a 200b024 <== NEVER TAKEN 200b12c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 200b130: 81 c3 e0 08 retl 200b134: 01 00 00 00 nop 200b138: 80 a0 40 03 cmp %g1, %g3 200b13c: 02 bf ff ba be 200b024 200b140: 90 10 a0 03 or %g2, 3, %o0 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; 200b144: 90 10 a0 04 or %g2, 4, %o0 int32_t baud ) { int termios_baud; switch (baud) { 200b148: 05 00 01 c2 sethi %hi(0x70800), %g2 200b14c: 80 a0 40 02 cmp %g1, %g2 200b150: 02 80 00 03 be 200b15c 200b154: 01 00 00 00 nop case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 200b158: 90 10 3f ff mov -1, %o0 ! ffffffff default: termios_baud = -1; break; } return termios_baud; } 200b15c: 81 c3 e0 08 retl =============================================================================== 02004a8c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2004a8c: 9d e3 bf a0 save %sp, -96, %sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 2004a90: 03 00 80 6e sethi %hi(0x201b800), %g1 2004a94: d0 00 63 9c ld [ %g1 + 0x39c ], %o0 ! 201bb9c 2004a98: 92 10 20 00 clr %o1 2004a9c: 40 00 03 f6 call 2005a74 2004aa0: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2004aa4: a0 92 20 00 orcc %o0, 0, %l0 2004aa8: 12 80 01 05 bne 2004ebc <== NEVER TAKEN 2004aac: 03 00 80 6e sethi %hi(0x201b800), %g1 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 2004ab0: 10 80 00 0a b 2004ad8 2004ab4: e4 00 63 a4 ld [ %g1 + 0x3a4 ], %l2 ! 201bba4 if ((tty->major == major) && (tty->minor == minor)) 2004ab8: 80 a0 40 18 cmp %g1, %i0 2004abc: 32 80 00 07 bne,a 2004ad8 2004ac0: e4 04 80 00 ld [ %l2 ], %l2 2004ac4: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 2004ac8: 80 a0 40 19 cmp %g1, %i1 2004acc: 22 80 00 d6 be,a 2004e24 <== ALWAYS TAKEN 2004ad0: c2 04 a0 08 ld [ %l2 + 8 ], %g1 */ 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) { 2004ad4: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED 2004ad8: 80 a4 a0 00 cmp %l2, 0 2004adc: 32 bf ff f7 bne,a 2004ab8 2004ae0: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 2004ae4: 10 80 00 f8 b 2004ec4 2004ae8: 90 10 20 01 mov 1, %o0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 2004aec: 03 00 80 6c sethi %hi(0x201b000), %g1 2004af0: c2 00 63 04 ld [ %g1 + 0x304 ], %g1 ! 201b304 2004af4: c2 24 a0 64 st %g1, [ %l2 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 2004af8: d0 04 a0 64 ld [ %l2 + 0x64 ], %o0 2004afc: 40 00 18 ed call 200aeb0 2004b00: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 2004b04: 80 a2 20 00 cmp %o0, 0 2004b08: 12 80 00 08 bne 2004b28 <== ALWAYS TAKEN 2004b0c: d0 24 a0 58 st %o0, [ %l2 + 0x58 ] free(tty); 2004b10: 40 00 17 86 call 200a928 <== NOT EXECUTED 2004b14: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 2004b18: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED 2004b1c: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED 2004b20: 10 80 00 e5 b 2004eb4 <== NOT EXECUTED 2004b24: d0 00 63 9c ld [ %g1 + 0x39c ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 2004b28: 03 00 80 6c sethi %hi(0x201b000), %g1 2004b2c: c2 00 63 08 ld [ %g1 + 0x308 ], %g1 ! 201b308 2004b30: c2 24 a0 88 st %g1, [ %l2 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 2004b34: d0 04 a0 88 ld [ %l2 + 0x88 ], %o0 2004b38: 40 00 18 de call 200aeb0 2004b3c: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 2004b40: 80 a2 20 00 cmp %o0, 0 2004b44: 12 80 00 05 bne 2004b58 <== ALWAYS TAKEN 2004b48: d0 24 a0 7c st %o0, [ %l2 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 2004b4c: d0 04 a0 58 ld [ %l2 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 2004b50: 10 80 00 0c b 2004b80 <== NOT EXECUTED 2004b54: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 2004b58: 03 00 80 6c sethi %hi(0x201b000), %g1 2004b5c: 40 00 18 d5 call 200aeb0 2004b60: d0 00 63 00 ld [ %g1 + 0x300 ], %o0 ! 201b300 if (tty->cbuf == NULL) { 2004b64: 80 a2 20 00 cmp %o0, 0 2004b68: 12 80 00 0c bne 2004b98 <== ALWAYS TAKEN 2004b6c: d0 24 a0 1c st %o0, [ %l2 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 2004b70: d0 04 a0 7c ld [ %l2 + 0x7c ], %o0 <== NOT EXECUTED 2004b74: 40 00 17 6d call 200a928 <== NOT EXECUTED 2004b78: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 2004b7c: d0 04 a0 58 ld [ %l2 + 0x58 ], %o0 <== NOT EXECUTED 2004b80: 40 00 17 6a call 200a928 <== NOT EXECUTED 2004b84: 01 00 00 00 nop <== NOT EXECUTED free(tty); 2004b88: 40 00 17 68 call 200a928 <== NOT EXECUTED 2004b8c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 2004b90: 10 80 00 c8 b 2004eb0 <== NOT EXECUTED 2004b94: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 2004b98: 03 00 80 6e sethi %hi(0x201b800), %g1 2004b9c: c2 00 63 a4 ld [ %g1 + 0x3a4 ], %g1 ! 201bba4 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 2004ba0: c0 24 a0 d4 clr [ %l2 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 2004ba4: c0 24 a0 d8 clr [ %l2 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 2004ba8: c0 24 a0 dc clr [ %l2 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 2004bac: c0 24 a0 e0 clr [ %l2 + 0xe0 ] tty->tty_rcvwakeup = 0; 2004bb0: c0 24 a0 e4 clr [ %l2 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 2004bb4: c2 24 80 00 st %g1, [ %l2 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 2004bb8: 80 a0 60 00 cmp %g1, 0 2004bbc: 02 80 00 03 be 2004bc8 2004bc0: c0 24 a0 04 clr [ %l2 + 4 ] rtems_termios_ttyHead->back = tty; 2004bc4: e4 20 60 04 st %l2, [ %g1 + 4 ] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 2004bc8: 03 00 80 6e sethi %hi(0x201b800), %g1 2004bcc: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 201bba0 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 2004bd0: 07 00 80 6e sethi %hi(0x201b800), %g3 if (rtems_termios_ttyTail == NULL) 2004bd4: 80 a0 a0 00 cmp %g2, 0 2004bd8: 12 80 00 03 bne 2004be4 2004bdc: e2 20 e3 a4 st %l1, [ %g3 + 0x3a4 ] rtems_termios_ttyTail = tty; 2004be0: e2 20 63 a0 st %l1, [ %g1 + 0x3a0 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2004be4: 27 00 80 6c sethi %hi(0x201b000), %l3 2004be8: d0 4c e3 0c ldsb [ %l3 + 0x30c ], %o0 ! 201b30c 2004bec: 03 15 14 9a sethi %hi(0x54526800), %g1 2004bf0: 82 10 61 00 or %g1, 0x100, %g1 ! 54526900 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 2004bf4: f2 24 60 10 st %i1, [ %l1 + 0x10 ] tty->major = major; 2004bf8: f0 24 60 0c st %i0, [ %l1 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2004bfc: 90 12 00 01 or %o0, %g1, %o0 2004c00: 92 10 20 01 mov 1, %o1 2004c04: 94 10 20 54 mov 0x54, %o2 2004c08: 96 10 20 00 clr %o3 2004c0c: 40 00 02 f8 call 20057ec 2004c10: 98 04 60 14 add %l1, 0x14, %o4 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) 2004c14: 80 a2 20 00 cmp %o0, 0 2004c18: 12 80 00 a3 bne 2004ea4 <== NEVER TAKEN 2004c1c: 03 15 14 9b sethi %hi(0x54526c00), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 2004c20: d0 4c e3 0c ldsb [ %l3 + 0x30c ], %o0 2004c24: 82 10 63 00 or %g1, 0x300, %g1 2004c28: 92 10 20 01 mov 1, %o1 2004c2c: 90 12 00 01 or %o0, %g1, %o0 2004c30: 94 10 20 54 mov 0x54, %o2 2004c34: 96 10 20 00 clr %o3 2004c38: 40 00 02 ed call 20057ec 2004c3c: 98 04 60 18 add %l1, 0x18, %o4 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) 2004c40: 80 a2 20 00 cmp %o0, 0 2004c44: 12 80 00 98 bne 2004ea4 <== NEVER TAKEN 2004c48: 03 15 14 9e sethi %hi(0x54527800), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 2004c4c: d0 4c e3 0c ldsb [ %l3 + 0x30c ], %o0 2004c50: 92 10 20 00 clr %o1 2004c54: 90 12 00 01 or %o0, %g1, %o0 2004c58: 94 10 20 20 mov 0x20, %o2 2004c5c: 96 10 20 00 clr %o3 2004c60: 40 00 02 e3 call 20057ec 2004c64: 98 04 60 8c add %l1, 0x8c, %o4 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 2004c68: 80 a2 20 00 cmp %o0, 0 2004c6c: 12 80 00 8e bne 2004ea4 <== NEVER TAKEN 2004c70: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 2004c74: c0 24 60 94 clr [ %l1 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 2004c78: 90 04 60 98 add %l1, 0x98, %o0 2004c7c: 40 00 2a c1 call 200f780 2004c80: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2004c84: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 2004c88: 80 a0 60 02 cmp %g1, 2 2004c8c: 32 80 00 1a bne,a 2004cf4 <== ALWAYS TAKEN 2004c90: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 sc = rtems_task_create ( 2004c94: d0 4c e3 0c ldsb [ %l3 + 0x30c ], %o0 <== NOT EXECUTED 2004c98: 03 15 1e 15 sethi %hi(0x54785400), %g1 <== NOT EXECUTED 2004c9c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 2004ca0: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 2004ca4: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 2004ca8: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 2004cac: 98 10 20 00 clr %o4 <== NOT EXECUTED 2004cb0: 40 00 03 e4 call 2005c40 <== NOT EXECUTED 2004cb4: 9a 04 60 c8 add %l1, 0xc8, %o5 <== 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) 2004cb8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004cbc: 12 80 00 7a bne 2004ea4 <== NOT EXECUTED 2004cc0: 03 14 9e 15 sethi %hi(0x52785400), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 2004cc4: d0 4c e3 0c ldsb [ %l3 + 0x30c ], %o0 <== NOT EXECUTED 2004cc8: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 2004ccc: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 2004cd0: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 2004cd4: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 2004cd8: 98 10 20 00 clr %o4 <== NOT EXECUTED 2004cdc: 40 00 03 d9 call 2005c40 <== NOT EXECUTED 2004ce0: 9a 04 60 c4 add %l1, 0xc4, %o5 <== 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) 2004ce4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004ce8: 12 80 00 6f bne 2004ea4 <== NOT EXECUTED 2004cec: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 2004cf0: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED 2004cf4: 80 a0 60 00 cmp %g1, 0 2004cf8: 02 80 00 07 be 2004d14 2004cfc: 03 00 80 6c sethi %hi(0x201b000), %g1 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 2004d00: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 2004d04: 80 a0 60 02 cmp %g1, 2 2004d08: 12 80 00 0f bne 2004d44 <== ALWAYS TAKEN 2004d0c: 84 10 20 03 mov 3, %g2 sc = rtems_semaphore_create ( 2004d10: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 2004d14: d0 48 63 0c ldsb [ %g1 + 0x30c ], %o0 ! 201b30c 2004d18: 03 15 14 9c sethi %hi(0x54527000), %g1 2004d1c: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 2004d20: 92 10 20 00 clr %o1 2004d24: 90 12 00 01 or %o0, %g1, %o0 2004d28: 94 10 20 24 mov 0x24, %o2 2004d2c: 96 10 20 00 clr %o3 2004d30: 40 00 02 af call 20057ec 2004d34: 98 04 60 68 add %l1, 0x68, %o4 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 2004d38: 80 a2 20 00 cmp %o0, 0 2004d3c: 12 80 00 5a bne 2004ea4 <== NEVER TAKEN 2004d40: 84 10 20 03 mov 3, %g2 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'; 2004d44: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 2004d48: 84 10 20 1c mov 0x1c, %g2 2004d4c: c4 2c 60 42 stb %g2, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 2004d50: 84 10 20 7f mov 0x7f, %g2 2004d54: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 2004d58: 84 10 20 15 mov 0x15, %g2 2004d5c: c4 2c 60 44 stb %g2, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 2004d60: 84 10 20 04 mov 4, %g2 2004d64: c4 2c 60 45 stb %g2, [ %l1 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 2004d68: 84 10 20 11 mov 0x11, %g2 2004d6c: c4 2c 60 49 stb %g2, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 2004d70: 84 10 20 13 mov 0x13, %g2 2004d74: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 2004d78: 84 10 20 1a mov 0x1a, %g2 2004d7c: c4 2c 60 4b stb %g2, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 2004d80: 84 10 20 12 mov 0x12, %g2 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; 2004d84: c0 24 60 b8 clr [ %l1 + 0xb8 ] 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'; 2004d88: c4 2c 60 4d stb %g2, [ %l1 + 0x4d ] /* 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; 2004d8c: c8 04 60 64 ld [ %l1 + 0x64 ], %g4 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 2004d90: 84 10 20 0f mov 0xf, %g2 2004d94: c4 2c 60 4e stb %g2, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 2004d98: 84 10 20 17 mov 0x17, %g2 /* 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; 2004d9c: 89 31 20 01 srl %g4, 1, %g4 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'; 2004da0: c4 2c 60 4f stb %g2, [ %l1 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 2004da4: 84 10 20 16 mov 0x16, %g2 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'; 2004da8: c0 2c 60 4c clrb [ %l1 + 0x4c ] tty->termios.c_cc[VEOL2] = '\000'; 2004dac: c0 2c 60 51 clrb [ %l1 + 0x51 ] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 2004db0: 03 00 80 6c sethi %hi(0x201b000), %g1 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'; 2004db4: c4 2c 60 50 stb %g2, [ %l1 + 0x50 ] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 2004db8: c4 08 63 0c ldub [ %g1 + 0x30c ], %g2 /* 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; 2004dbc: c8 24 60 bc st %g4, [ %l1 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 2004dc0: 09 00 00 09 sethi %hi(0x2400), %g4 2004dc4: 88 11 21 02 or %g4, 0x102, %g4 ! 2502 2004dc8: c8 24 60 30 st %g4, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 2004dcc: 09 00 00 06 sethi %hi(0x1800), %g4 2004dd0: 88 11 20 05 or %g4, 5, %g4 ! 1805 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; 2004dd4: c6 04 60 64 ld [ %l1 + 0x64 ], %g3 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 2004dd8: c8 24 60 34 st %g4, [ %l1 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 2004ddc: 88 10 28 bd mov 0x8bd, %g4 2004de0: c8 24 60 38 st %g4, [ %l1 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 2004de4: 09 00 00 20 sethi %hi(0x8000), %g4 2004de8: 88 11 22 3b or %g4, 0x23b, %g4 ! 823b 2004dec: c8 24 60 3c st %g4, [ %l1 + 0x3c ] 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; 2004df0: 89 28 e0 01 sll %g3, 1, %g4 2004df4: 86 01 00 03 add %g4, %g3, %g3 2004df8: 87 30 e0 02 srl %g3, 2, %g3 2004dfc: c6 24 60 c0 st %g3, [ %l1 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 2004e00: 86 00 a0 01 add %g2, 1, %g3 2004e04: 85 28 a0 18 sll %g2, 0x18, %g2 2004e08: 85 38 a0 18 sra %g2, 0x18, %g2 2004e0c: 80 a0 a0 7a cmp %g2, 0x7a 2004e10: 12 80 00 04 bne 2004e20 <== ALWAYS TAKEN 2004e14: c6 28 63 0c stb %g3, [ %g1 + 0x30c ] c = 'a'; 2004e18: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 2004e1c: c4 28 63 0c stb %g2, [ %g1 + 0x30c ] <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 2004e20: c2 04 a0 08 ld [ %l2 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 2004e24: c6 06 80 00 ld [ %i2 ], %g3 if (!tty->refcount++) { 2004e28: 84 00 60 01 add %g1, 1, %g2 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 2004e2c: e4 20 e0 38 st %l2, [ %g3 + 0x38 ] if (!tty->refcount++) { 2004e30: 80 a0 60 00 cmp %g1, 0 2004e34: 12 80 00 1e bne 2004eac 2004e38: c4 24 a0 08 st %g2, [ %l2 + 8 ] if (tty->device.firstOpen) 2004e3c: c2 04 a0 98 ld [ %l2 + 0x98 ], %g1 2004e40: 80 a0 60 00 cmp %g1, 0 2004e44: 02 80 00 05 be 2004e58 2004e48: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 2004e4c: 92 10 00 19 mov %i1, %o1 2004e50: 9f c0 40 00 call %g1 2004e54: 94 10 00 1a mov %i2, %o2 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2004e58: c2 04 a0 b4 ld [ %l2 + 0xb4 ], %g1 2004e5c: 80 a0 60 02 cmp %g1, 2 2004e60: 12 80 00 14 bne 2004eb0 <== ALWAYS TAKEN 2004e64: 03 00 80 6e sethi %hi(0x201b800), %g1 sc = rtems_task_start(tty->rxTaskId, 2004e68: d0 04 a0 c4 ld [ %l2 + 0xc4 ], %o0 <== NOT EXECUTED 2004e6c: 13 00 80 13 sethi %hi(0x2004c00), %o1 <== NOT EXECUTED 2004e70: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 2004e74: 40 00 04 19 call 2005ed8 <== NOT EXECUTED 2004e78: 92 12 63 5c or %o1, 0x35c, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 2004e7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004e80: 12 80 00 09 bne 2004ea4 <== NOT EXECUTED 2004e84: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 2004e88: d0 04 a0 c8 ld [ %l2 + 0xc8 ], %o0 <== NOT EXECUTED 2004e8c: 13 00 80 13 sethi %hi(0x2004c00), %o1 <== NOT EXECUTED 2004e90: 40 00 04 12 call 2005ed8 <== NOT EXECUTED 2004e94: 92 12 62 e0 or %o1, 0x2e0, %o1 ! 2004ee0 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 2004e98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004e9c: 02 80 00 05 be 2004eb0 <== NOT EXECUTED 2004ea0: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2004ea4: 40 00 04 9d call 2006118 <== NOT EXECUTED 2004ea8: 01 00 00 00 nop <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 2004eac: 03 00 80 6e sethi %hi(0x201b800), %g1 2004eb0: d0 00 63 9c ld [ %g1 + 0x39c ], %o0 ! 201bb9c 2004eb4: 40 00 03 37 call 2005b90 2004eb8: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } 2004ebc: 81 c7 e0 08 ret 2004ec0: 91 e8 00 10 restore %g0, %l0, %o0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 2004ec4: 40 00 16 53 call 200a810 2004ec8: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 2004ecc: a4 92 20 00 orcc %o0, 0, %l2 2004ed0: 12 bf ff 07 bne 2004aec <== ALWAYS TAKEN 2004ed4: a2 10 00 12 mov %l2, %l1 */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 2004ed8: 10 bf ff 11 b 2004b1c <== NOT EXECUTED 2004edc: 03 00 80 6e sethi %hi(0x201b800), %g1 <== NOT EXECUTED =============================================================================== 02003820 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 2003820: 9d e3 bf a0 save %sp, -96, %sp const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 2003824: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 2003828: 92 10 00 18 mov %i0, %o1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 200382c: 80 a0 60 00 cmp %g1, 0 2003830: 12 80 00 08 bne 2003850 <== ALWAYS TAKEN 2003834: a2 10 00 18 mov %i0, %l1 (*tty->device.write)(tty->minor, (void *)buf, len); 2003838: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 200383c: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 <== NOT EXECUTED 2003840: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003844: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED return; 2003848: 81 c7 e0 08 ret <== NOT EXECUTED 200384c: 81 e8 00 00 restore <== NOT EXECUTED } newHead = tty->rawOutBuf.Head; 2003850: e0 06 a0 80 ld [ %i2 + 0x80 ], %l0 * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 2003854: a8 10 20 02 mov 2, %l4 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 2003858: 10 80 00 39 b 200393c 200385c: a6 10 20 01 mov 1, %l3 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 2003860: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 2003864: 40 00 53 6b call 2018610 <.urem> 2003868: 90 04 20 01 add %l0, 1, %o0 rtems_interrupt_disable (level); 200386c: 7f ff fa 51 call 20021b0 2003870: a0 10 00 08 mov %o0, %l0 2003874: a4 10 00 08 mov %o0, %l2 while (newHead == tty->rawOutBuf.Tail) { 2003878: 30 80 00 0f b,a 20038b4 tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 200387c: 7f ff fa 51 call 20021c0 2003880: 90 10 00 12 mov %l2, %o0 sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2003884: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 2003888: 92 10 20 00 clr %o1 200388c: 40 00 08 7a call 2005a74 2003890: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2003894: 80 a2 20 00 cmp %o0, 0 2003898: 02 80 00 04 be 20038a8 <== ALWAYS TAKEN 200389c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 20038a0: 40 00 0a 1e call 2006118 <== NOT EXECUTED 20038a4: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 20038a8: 7f ff fa 42 call 20021b0 20038ac: 01 00 00 00 nop 20038b0: a4 10 00 08 mov %o0, %l2 * 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) { 20038b4: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 20038b8: 80 a4 00 01 cmp %l0, %g1 20038bc: 22 bf ff f0 be,a 200387c 20038c0: e8 26 a0 94 st %l4, [ %i2 + 0x94 ] RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 20038c4: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1 20038c8: c6 0c 40 00 ldub [ %l1 ], %g3 20038cc: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2 20038d0: c6 28 80 01 stb %g3, [ %g2 + %g1 ] tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 20038d4: c2 06 a0 94 ld [ %i2 + 0x94 ], %g1 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 20038d8: e0 26 a0 80 st %l0, [ %i2 + 0x80 ] if (tty->rawOutBufState == rob_idle) { 20038dc: 80 a0 60 00 cmp %g1, 0 20038e0: 32 80 00 14 bne,a 2003930 20038e4: a2 04 60 01 inc %l1 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 20038e8: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 20038ec: 80 88 60 10 btst 0x10, %g1 20038f0: 12 80 00 0b bne 200391c <== NEVER TAKEN 20038f4: 01 00 00 00 nop (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 20038f8: c4 06 a0 84 ld [ %i2 + 0x84 ], %g2 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, 20038fc: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1 2003900: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 2003904: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 2003908: 92 02 40 02 add %o1, %g2, %o1 200390c: 9f c0 40 00 call %g1 2003910: 94 10 20 01 mov 1, %o2 } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 2003914: 10 80 00 06 b 200392c 2003918: e6 26 a0 94 st %l3, [ %i2 + 0x94 ] (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 200391c: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 2003920: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 2003924: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 2003928: e6 26 a0 94 st %l3, [ %i2 + 0x94 ] <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 200392c: a2 04 60 01 inc %l1 /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 2003930: 90 10 00 12 mov %l2, %o0 2003934: 7f ff fa 23 call 20021c0 2003938: b2 06 7f ff add %i1, -1, %i1 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 200393c: 80 a6 60 00 cmp %i1, 0 2003940: 12 bf ff c8 bne 2003860 2003944: 01 00 00 00 nop 2003948: 81 c7 e0 08 ret 200394c: 81 e8 00 00 restore =============================================================================== 0200410c : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 200410c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2004110: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 2004114: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 <== 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; 2004118: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 200411c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2004120: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2004124: a2 10 00 18 mov %i0, %l1 <== 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); 2004128: 92 10 20 00 clr %o1 <== NOT EXECUTED 200412c: 40 00 06 52 call 2005a74 <== NOT EXECUTED 2004130: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2004134: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2004138: 12 80 00 10 bne 2004178 <== NOT EXECUTED 200413c: 05 00 80 6e sethi %hi(0x201b800), %g2 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2004140: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 2004144: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 2004148: 84 10 a0 c4 or %g2, 0xc4, %g2 <== NOT EXECUTED 200414c: 82 00 60 08 add %g1, 8, %g1 <== NOT EXECUTED 2004150: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 2004154: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004158: 02 80 00 0a be 2004180 <== NOT EXECUTED 200415c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2004160: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004164: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2004168: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 200416c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 2004170: 40 00 06 88 call 2005b90 <== NOT EXECUTED 2004174: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED return sc; 2004178: 81 c7 e0 08 ret <== NOT EXECUTED 200417c: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 2004180: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 2004184: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2004188: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 200418c: 12 80 00 be bne 2004484 <== NOT EXECUTED 2004190: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 2004194: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 <== NOT EXECUTED if (tty->device.pollRead != NULL 2004198: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 200419c: c4 24 20 2c st %g2, [ %l0 + 0x2c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 20041a0: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 20041a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20041a8: 02 80 00 4c be 20042d8 <== NOT EXECUTED 20041ac: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 20041b0: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 20041b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20041b8: 12 80 00 49 bne 20042dc <== NOT EXECUTED 20041bc: 2f 00 80 6c sethi %hi(0x201b000), %l7 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 20041c0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 20041c4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20041c8: 02 80 00 13 be 2004214 <== NOT EXECUTED 20041cc: 01 00 00 00 nop <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 20041d0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 20041d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20041d8: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 20041dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20041e0: 16 80 00 06 bge 20041f8 <== NOT EXECUTED 20041e4: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 20041e8: 40 00 07 58 call 2005f48 <== NOT EXECUTED 20041ec: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 20041f0: 10 bf ff f9 b 20041d4 <== NOT EXECUTED 20041f4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 20041f8: 7f ff ff 5f call 2003f74 <== NOT EXECUTED 20041fc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2004200: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004204: 22 bf ff f4 be,a 20041d4 <== NOT EXECUTED 2004208: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 200420c: 10 80 00 9e b 2004484 <== NOT EXECUTED 2004210: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 2004214: 40 00 04 56 call 200536c <== NOT EXECUTED 2004218: 01 00 00 00 nop <== NOT EXECUTED 200421c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2004220: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 2004224: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004228: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 200422c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004230: 36 80 00 1c bge,a 20042a0 <== NOT EXECUTED 2004234: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 2004238: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 200423c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2004240: 02 80 00 0a be 2004268 <== NOT EXECUTED 2004244: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 2004248: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200424c: 02 80 00 11 be 2004290 <== NOT EXECUTED 2004250: 01 00 00 00 nop <== NOT EXECUTED 2004254: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2004258: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200425c: 02 80 00 0d be 2004290 <== NOT EXECUTED 2004260: 01 00 00 00 nop <== NOT EXECUTED 2004264: 30 80 00 04 b,a 2004274 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 2004268: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200426c: 02 80 00 86 be 2004484 <== NOT EXECUTED 2004270: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 2004274: 40 00 04 3e call 200536c <== NOT EXECUTED 2004278: 01 00 00 00 nop <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 200427c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 2004280: 90 22 00 13 sub %o0, %l3, %o0 <== NOT EXECUTED 2004284: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2004288: 18 80 00 7f bgu 2004484 <== NOT EXECUTED 200428c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 2004290: 40 00 07 2e call 2005f48 <== NOT EXECUTED 2004294: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 2004298: 10 bf ff e3 b 2004224 <== NOT EXECUTED 200429c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 20042a0: 7f ff ff 35 call 2003f74 <== NOT EXECUTED 20042a4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 20042a8: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 20042ac: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 20042b0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20042b4: 16 80 00 73 bge 2004480 <== NOT EXECUTED 20042b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 20042bc: 22 bf ff da be,a 2004224 <== NOT EXECUTED 20042c0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 20042c4: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 20042c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20042cc: 22 bf ff d6 be,a 2004224 <== NOT EXECUTED 20042d0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 20042d4: 30 bf ff d0 b,a 2004214 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 20042d8: 2f 00 80 6c sethi %hi(0x201b000), %l7 <== 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; 20042dc: e8 04 20 74 ld [ %l0 + 0x74 ], %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 20042e0: ae 15 e3 00 or %l7, 0x300, %l7 <== 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, 20042e4: ac 04 20 49 add %l0, 0x49, %l6 <== NOT EXECUTED 20042e8: 10 80 00 4b b 2004414 <== NOT EXECUTED 20042ec: a6 10 20 01 mov 1, %l3 <== 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; 20042f0: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 20042f4: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 20042f8: 40 00 50 c6 call 2018610 <.urem> <== NOT EXECUTED 20042fc: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2004300: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 2004304: e8 08 40 08 ldub [ %g1 + %o0 ], %l4 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2004308: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 200430c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 2004310: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 2004314: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 2004318: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 200431c: 40 00 50 bd call 2018610 <.urem> <== NOT EXECUTED 2004320: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 2004324: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 2004328: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 200432c: 3a 80 00 27 bcc,a 20043c8 <== NOT EXECUTED 2004330: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 2004334: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2004338: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 200433c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2004340: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2004344: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 2004348: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 200434c: 12 80 00 11 bne 2004390 <== NOT EXECUTED 2004350: 01 00 00 00 nop <== NOT EXECUTED 2004354: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 2004358: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200435c: 22 80 00 07 be,a 2004378 <== NOT EXECUTED 2004360: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 2004364: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== 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)) 2004368: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 200436c: 02 80 00 09 be 2004390 <== NOT EXECUTED 2004370: 01 00 00 00 nop <== 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, 2004374: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 2004378: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 200437c: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 2004380: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004384: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 2004388: 10 80 00 10 b 20043c8 <== NOT EXECUTED 200438c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 2004390: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2004394: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 2004398: 22 80 00 0c be,a 20043c8 <== NOT EXECUTED 200439c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 20043a0: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 20043a4: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 <== 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; 20043a8: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED 20043ac: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 20043b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20043b4: 22 80 00 05 be,a 20043c8 <== NOT EXECUTED 20043b8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 20043bc: 9f c0 40 00 call %g1 <== NOT EXECUTED 20043c0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 20043c4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 20043c8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20043cc: 02 80 00 09 be 20043f0 <== NOT EXECUTED 20043d0: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 20043d4: 7f ff fe e8 call 2003f74 <== NOT EXECUTED 20043d8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20043dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20043e0: 32 80 00 0c bne,a 2004410 <== NOT EXECUTED 20043e4: a6 10 20 00 clr %l3 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 20043e8: 10 80 00 0b b 2004414 <== NOT EXECUTED 20043ec: e8 04 20 70 ld [ %l0 + 0x70 ], %l4 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 20043f0: 7f ff fe e1 call 2003f74 <== NOT EXECUTED 20043f4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 20043f8: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 20043fc: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 2004400: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004404: 26 80 00 04 bl,a 2004414 <== NOT EXECUTED 2004408: e8 04 20 70 ld [ %l0 + 0x70 ], %l4 <== NOT EXECUTED 200440c: a6 10 20 00 clr %l3 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 2004410: e8 04 20 70 ld [ %l0 + 0x70 ], %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2004414: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 2004418: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 200441c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004420: 02 80 00 08 be 2004440 <== NOT EXECUTED 2004424: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 2004428: c2 05 c0 00 ld [ %l7 ], %g1 <== NOT EXECUTED 200442c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 2004430: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2004434: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004438: 06 bf ff ae bl 20042f0 <== NOT EXECUTED 200443c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 2004440: 02 80 00 11 be 2004484 <== NOT EXECUTED 2004444: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 2004448: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 200444c: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 2004450: 40 00 05 89 call 2005a74 <== NOT EXECUTED 2004454: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 2004458: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200445c: 02 bf ff ee be 2004414 <== NOT EXECUTED 2004460: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2004464: 30 80 00 08 b,a 2004484 <== 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++]; 2004468: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED count--; 200446c: a4 04 bf ff add %l2, -1, %l2 <== 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++]; 2004470: c2 08 80 01 ldub [ %g2 + %g1 ], %g1 <== NOT EXECUTED 2004474: c2 2d 40 00 stb %g1, [ %l5 ] <== NOT EXECUTED 2004478: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED 200447c: aa 05 60 01 inc %l5 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 2004480: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2004484: 22 80 00 08 be,a 20044a4 <== NOT EXECUTED 2004488: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 200448c: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 2004490: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 2004494: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2004498: 06 bf ff f4 bl 2004468 <== NOT EXECUTED 200449c: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 20044a0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 20044a4: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 20044a8: a4 20 40 12 sub %g1, %l2, %l2 <== NOT EXECUTED 20044ac: e4 24 60 1c st %l2, [ %l1 + 0x1c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 20044b0: 40 00 05 b8 call 2005b90 <== NOT EXECUTED 20044b4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 20044b8: 81 c7 e0 08 ret <== NOT EXECUTED 20044bc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020032a0 : * 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) { 20032a0: 9d e3 bf a0 save %sp, -96, %sp int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 20032a4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 20032a8: 82 08 64 03 and %g1, 0x403, %g1 20032ac: 80 a0 64 01 cmp %g1, 0x401 20032b0: 12 80 00 10 bne 20032f0 <== ALWAYS TAKEN 20032b4: a0 10 00 18 mov %i0, %l0 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 20032b8: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 20032bc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 20032c0: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 20032c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20032c8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 20032cc: 7f ff fb b9 call 20021b0 <== NOT EXECUTED 20032d0: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 20032d4: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 20032d8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== 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--; 20032dc: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 20032e0: 82 10 60 02 or %g1, 2, %g1 <== 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--; 20032e4: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 20032e8: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 20032ec: 30 80 00 12 b,a 2003334 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 20032f0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 20032f4: 82 08 60 03 and %g1, 3, %g1 20032f8: 80 a0 60 02 cmp %g1, 2 20032fc: 12 80 00 12 bne 2003344 <== ALWAYS TAKEN 2003300: 92 06 20 49 add %i0, 0x49, %o1 * 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, 2003304: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 2003308: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 200330c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003310: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 2003314: 7f ff fb a7 call 20021b0 <== NOT EXECUTED 2003318: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 200331c: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2003320: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2003324: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2003328: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 200332c: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2003330: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 2003334: 7f ff fb a3 call 20021c0 <== NOT EXECUTED 2003338: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200333c: 81 c7 e0 08 ret 2003340: 81 e8 00 00 restore nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 2003344: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 2003348: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 200334c: 80 a0 80 01 cmp %g2, %g1 2003350: 12 80 00 0a bne 2003378 2003354: 01 00 00 00 nop /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 2003358: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 200335c: 80 a0 60 02 cmp %g1, 2 2003360: 12 bf ff f7 bne 200333c <== ALWAYS TAKEN 2003364: b0 10 20 00 clr %i0 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2003368: 40 00 0a 0a call 2005b90 <== NOT EXECUTED 200336c: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 2003370: 81 c7 e0 08 ret <== NOT EXECUTED 2003374: 81 e8 00 00 restore <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 2003378: 7f ff fb 8e call 20021b0 200337c: 01 00 00 00 nop len = tty->t_dqlen; 2003380: e2 06 20 90 ld [ %i0 + 0x90 ], %l1 tty->t_dqlen = 0; 2003384: c0 26 20 90 clr [ %i0 + 0x90 ] rtems_interrupt_enable(level); 2003388: 7f ff fb 8e call 20021c0 200338c: 01 00 00 00 nop newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 2003390: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 2003394: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 2003398: 40 00 54 9e call 2018610 <.urem> 200339c: 90 04 40 08 add %l1, %o0, %o0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 20033a0: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 20033a4: d0 24 20 84 st %o0, [ %l0 + 0x84 ] if (tty->rawOutBufState == rob_wait) { 20033a8: 80 a0 60 02 cmp %g1, 2 20033ac: 12 80 00 04 bne 20033bc 20033b0: a2 10 00 08 mov %o0, %l1 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 20033b4: 40 00 09 f7 call 2005b90 20033b8: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 } if (newTail == tty->rawOutBuf.Head) { 20033bc: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 20033c0: 80 a4 40 01 cmp %l1, %g1 20033c4: 12 80 00 0b bne 20033f0 20033c8: 01 00 00 00 nop nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 20033cc: c2 04 20 d4 ld [ %l0 + 0xd4 ], %g1 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 20033d0: c0 24 20 94 clr [ %l0 + 0x94 ] nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 20033d4: 80 a0 60 00 cmp %g1, 0 20033d8: 02 80 00 29 be 200347c <== ALWAYS TAKEN 20033dc: b0 10 20 00 clr %i0 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 20033e0: d2 04 20 d8 ld [ %l0 + 0xd8 ], %o1 <== NOT EXECUTED 20033e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20033e8: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED 20033ec: 30 80 00 24 b,a 200347c <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 20033f0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 20033f4: 82 08 62 10 and %g1, 0x210, %g1 20033f8: 80 a0 62 10 cmp %g1, 0x210 20033fc: 12 80 00 0c bne 200342c <== ALWAYS TAKEN 2003400: 01 00 00 00 nop == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 2003404: 7f ff fb 6b call 20021b0 <== NOT EXECUTED 2003408: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 200340c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 2003410: 84 10 20 01 mov 1, %g2 <== 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; 2003414: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 2003418: c4 24 20 94 st %g2, [ %l0 + 0x94 ] <== 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; 200341c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 2003420: 7f ff fb 68 call 20021c0 <== NOT EXECUTED 2003424: b0 10 20 00 clr %i0 <== NOT EXECUTED 2003428: 30 80 00 15 b,a 200347c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 200342c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 2003430: 80 a4 40 01 cmp %l1, %g1 2003434: 08 80 00 04 bleu 2003444 2003438: 01 00 00 00 nop nToSend = tty->rawOutBuf.Size - newTail; 200343c: f0 04 20 88 ld [ %l0 + 0x88 ], %i0 2003440: 30 80 00 02 b,a 2003448 else nToSend = tty->rawOutBuf.Head - newTail; 2003444: f0 04 20 80 ld [ %l0 + 0x80 ], %i0 /* 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)) { 2003448: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 200344c: 80 88 66 00 btst 0x600, %g1 2003450: 02 80 00 03 be 200345c <== ALWAYS TAKEN 2003454: b0 26 00 11 sub %i0, %l1, %i0 2003458: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 200345c: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 2003460: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 2003464: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 /* 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*/ 2003468: 84 10 20 01 mov 1, %g2 (*tty->device.write)(tty->minor, 200346c: 92 02 40 11 add %o1, %l1, %o1 /* 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*/ 2003470: c4 24 20 94 st %g2, [ %l0 + 0x94 ] (*tty->device.write)(tty->minor, 2003474: 9f c0 40 00 call %g1 2003478: 94 10 00 18 mov %i0, %o2 &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 200347c: e2 24 20 84 st %l1, [ %l0 + 0x84 ] } return nToSend; } 2003480: 81 c7 e0 08 ret 2003484: 81 e8 00 00 restore =============================================================================== 02004f5c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 2004f5c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 2004f60: a2 07 bf f8 add %fp, -8, %l1 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 2004f64: a0 07 bf ff add %fp, -1, %l0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 2004f68: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 2004f6c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2004f70: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004f74: 40 00 01 1f call 20053f0 <== NOT EXECUTED 2004f78: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 2004f7c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 2004f80: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2004f84: 22 80 00 07 be,a 2004fa0 <== NOT EXECUTED 2004f88: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 2004f8c: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 2004f90: 40 00 03 79 call 2005d74 <== NOT EXECUTED 2004f94: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 2004f98: 10 bf ff f5 b 2004f6c <== NOT EXECUTED 2004f9c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 2004fa0: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004fa4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 2004fa8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2004fac: 02 bf ff ef be 2004f68 <== NOT EXECUTED 2004fb0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 2004fb4: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 2004fb8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2004fbc: 7f ff f9 52 call 2003504 <== NOT EXECUTED 2004fc0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 2004fc4: 10 bf ff ea b 2004f6c <== NOT EXECUTED 2004fc8: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED =============================================================================== 02003288 : void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 2003288: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 200328c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2003290: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003294: 40 00 08 b9 call 2005578 <== NOT EXECUTED 2003298: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02004ee0 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 2004ee0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2004ee4: 23 00 80 6e sethi %hi(0x201b800), %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004ee8: a0 07 bf fc add %fp, -4, %l0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2004eec: a2 14 60 c4 or %l1, 0xc4, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004ef0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2004ef4: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004ef8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 2004efc: 40 00 01 3d call 20053f0 <== NOT EXECUTED 2004f00: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 2004f04: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2004f08: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2004f0c: 02 80 00 07 be 2004f28 <== NOT EXECUTED 2004f10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 2004f14: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 2004f18: 40 00 03 97 call 2005d74 <== NOT EXECUTED 2004f1c: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004f20: 10 bf ff f5 b 2004ef4 <== NOT EXECUTED 2004f24: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2004f28: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 2004f2c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 2004f30: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 2004f34: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 2004f38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004f3c: 02 80 00 04 be 2004f4c <== NOT EXECUTED 2004f40: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2004f44: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004f48: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 2004f4c: 7f ff f8 d5 call 20032a0 <== NOT EXECUTED 2004f50: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004f54: 10 bf ff e8 b 2004ef4 <== NOT EXECUTED 2004f58: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED =============================================================================== 02003fc4 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2003fc4: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2003fc8: c2 06 00 00 ld [ %i0 ], %g1 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2003fcc: a2 10 00 18 mov %i0, %l1 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2003fd0: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2003fd4: 92 10 20 00 clr %o1 2003fd8: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 2003fdc: 40 00 06 a6 call 2005a74 2003fe0: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 2003fe4: b0 92 20 00 orcc %o0, 0, %i0 2003fe8: 12 80 00 0f bne 2004024 <== NEVER TAKEN 2003fec: 03 00 80 6e sethi %hi(0x201b800), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2003ff0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 2003ff4: 85 28 a0 05 sll %g2, 5, %g2 2003ff8: 82 10 60 c4 or %g1, 0xc4, %g1 2003ffc: 82 00 40 02 add %g1, %g2, %g1 2004000: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2004004: 80 a0 60 00 cmp %g1, 0 2004008: 02 80 00 09 be 200402c <== ALWAYS TAKEN 200400c: 92 10 00 11 mov %l1, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2004010: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004014: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2004018: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 200401c: 40 00 06 dd call 2005b90 <== NOT EXECUTED 2004020: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 <== NOT EXECUTED return sc; 2004024: 81 c7 e0 08 ret <== NOT EXECUTED 2004028: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->termios.c_oflag & OPOST) { 200402c: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 2004030: d2 04 60 14 ld [ %l1 + 0x14 ], %o1 2004034: 80 88 60 01 btst 1, %g1 2004038: 02 80 00 0e be 2004070 <== NEVER TAKEN 200403c: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 uint32_t count = args->count; 2004040: a6 10 00 09 mov %o1, %l3 char *buffer = args->buffer; while (count--) 2004044: 10 80 00 06 b 200405c 2004048: a4 10 00 08 mov %o0, %l2 oproc (*buffer++, tty); 200404c: a6 04 ff ff add %l3, -1, %l3 2004050: a4 04 a0 01 inc %l2 2004054: 7f ff fe 3f call 2003950 2004058: 92 10 00 10 mov %l0, %o1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 200405c: 80 a4 e0 00 cmp %l3, 0 2004060: 32 bf ff fb bne,a 200404c 2004064: d0 0c 80 00 ldub [ %l2 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 2004068: 10 80 00 05 b 200407c 200406c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 2004070: 7f ff fd ec call 2003820 <== NOT EXECUTED 2004074: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 2004078: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 200407c: c2 24 60 1c st %g1, [ %l1 + 0x1c ] } rtems_semaphore_release (tty->osem); 2004080: 40 00 06 c4 call 2005b90 2004084: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 return sc; } 2004088: 81 c7 e0 08 ret 200408c: 81 e8 00 00 restore =============================================================================== 02014d6c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 2014d6c: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 2014d70: 11 00 80 f4 sethi %hi(0x203d000), %o0 2014d74: 92 10 00 18 mov %i0, %o1 2014d78: 90 12 22 30 or %o0, 0x230, %o0 2014d7c: 40 00 0b 83 call 2017b88 <_Objects_Get> 2014d80: 94 07 bf fc add %fp, -4, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2014d84: c2 07 bf fc ld [ %fp + -4 ], %g1 2014d88: 80 a0 60 00 cmp %g1, 0 2014d8c: 12 80 00 0a bne 2014db4 2014d90: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 2014d94: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2014d98: 80 a0 60 04 cmp %g1, 4 2014d9c: 02 80 00 04 be 2014dac <== NEVER TAKEN 2014da0: 01 00 00 00 nop (void) _Watchdog_Remove( &the_timer->Ticker ); 2014da4: 40 00 14 3f call 2019ea0 <_Watchdog_Remove> 2014da8: 90 02 20 10 add %o0, 0x10, %o0 _Thread_Enable_dispatch(); 2014dac: 40 00 0e 0b call 20185d8 <_Thread_Enable_dispatch> 2014db0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2014db4: 81 c7 e0 08 ret 2014db8: 81 e8 00 00 restore =============================================================================== 0201525c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 201525c: 9d e3 bf 98 save %sp, -104, %sp Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 2015260: 03 00 80 f4 sethi %hi(0x203d000), %g1 2015264: e0 00 62 70 ld [ %g1 + 0x270 ], %l0 ! 203d270 <_Timer_server> rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 2015268: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 201526c: 80 a4 20 00 cmp %l0, 0 2015270: 02 80 00 32 be 2015338 2015274: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 2015278: 03 00 80 f2 sethi %hi(0x203c800), %g1 201527c: c2 08 60 c4 ldub [ %g1 + 0xc4 ], %g1 ! 203c8c4 <_TOD_Is_set> 2015280: 80 a0 60 00 cmp %g1, 0 2015284: 02 80 00 2d be 2015338 <== NEVER TAKEN 2015288: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !routine ) 201528c: 80 a6 a0 00 cmp %i2, 0 2015290: 02 80 00 2a be 2015338 2015294: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 2015298: 7f ff f4 0d call 20122cc <_TOD_Validate> 201529c: 90 10 00 19 mov %i1, %o0 20152a0: 80 8a 20 ff btst 0xff, %o0 20152a4: 22 80 00 25 be,a 2015338 20152a8: b0 10 20 14 mov 0x14, %i0 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 20152ac: 7f ff f3 d4 call 20121fc <_TOD_To_seconds> 20152b0: 90 10 00 19 mov %i1, %o0 if ( seconds <= _TOD_Seconds_since_epoch() ) 20152b4: 27 00 80 f2 sethi %hi(0x203c800), %l3 20152b8: c2 04 e1 44 ld [ %l3 + 0x144 ], %g1 ! 203c944 <_TOD_Now> 20152bc: 80 a2 00 01 cmp %o0, %g1 20152c0: 08 80 00 20 bleu 2015340 20152c4: a4 10 00 08 mov %o0, %l2 20152c8: 11 00 80 f4 sethi %hi(0x203d000), %o0 20152cc: 92 10 00 11 mov %l1, %o1 20152d0: 90 12 22 30 or %o0, 0x230, %o0 20152d4: 40 00 0a 2d call 2017b88 <_Objects_Get> 20152d8: 94 07 bf fc add %fp, -4, %o2 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20152dc: c2 07 bf fc ld [ %fp + -4 ], %g1 20152e0: b2 10 00 08 mov %o0, %i1 20152e4: 80 a0 60 00 cmp %g1, 0 20152e8: 12 80 00 14 bne 2015338 20152ec: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 20152f0: 40 00 12 ec call 2019ea0 <_Watchdog_Remove> 20152f4: 90 02 20 10 add %o0, 0x10, %o0 the_watchdog->routine = routine; the_watchdog->id = id; 20152f8: e2 26 60 30 st %l1, [ %i1 + 0x30 ] the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 20152fc: c4 04 e1 44 ld [ %l3 + 0x144 ], %g2 (*timer_server->schedule_operation)( timer_server, the_timer ); 2015300: c2 04 20 04 ld [ %l0 + 4 ], %g1 2015304: 90 10 00 10 mov %l0, %o0 2015308: 92 10 00 19 mov %i1, %o1 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 201530c: a4 24 80 02 sub %l2, %g2, %l2 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; 2015310: 84 10 20 03 mov 3, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2015314: f4 26 60 2c st %i2, [ %i1 + 0x2c ] 2015318: c4 26 60 38 st %g2, [ %i1 + 0x38 ] the_watchdog->id = id; the_watchdog->user_data = user_data; 201531c: f6 26 60 34 st %i3, [ %i1 + 0x34 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 2015320: e4 26 60 1c st %l2, [ %i1 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2015324: c0 26 60 18 clr [ %i1 + 0x18 ] (*timer_server->schedule_operation)( timer_server, the_timer ); 2015328: 9f c0 40 00 call %g1 201532c: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2015330: 40 00 0c aa call 20185d8 <_Thread_Enable_dispatch> 2015334: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 2015338: 81 c7 e0 08 ret 201533c: 81 e8 00 00 restore 2015340: b0 10 20 14 mov 0x14, %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2015344: 81 c7 e0 08 ret 2015348: 81 e8 00 00 restore =============================================================================== 0200781c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 200781c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 2007820: 2b 08 00 00 sethi %hi(0x20000000), %l5 <== NOT EXECUTED 2007824: aa 8e 00 15 andcc %i0, %l5, %l5 <== NOT EXECUTED 2007828: 02 80 00 11 be 200786c <== NOT EXECUTED 200782c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED { if (rtems_panic_in_progress++) 2007830: 05 00 80 9d sethi %hi(0x2027400), %g2 <== NOT EXECUTED 2007834: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 ! 2027440 <== NOT EXECUTED 2007838: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 200783c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2007840: 02 80 00 06 be 2007858 <== NOT EXECUTED 2007844: c6 20 a0 40 st %g3, [ %g2 + 0x40 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007848: 03 00 80 9d sethi %hi(0x2027400), %g1 <== NOT EXECUTED 200784c: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 2027620 <_Thread_Dispatch_disable_level><== NOT EXECUTED 2007850: 84 00 a0 01 inc %g2 <== NOT EXECUTED 2007854: c4 20 62 20 st %g2, [ %g1 + 0x220 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 2007858: 03 00 80 9d sethi %hi(0x2027400), %g1 <== NOT EXECUTED 200785c: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 ! 2027440 <== NOT EXECUTED 2007860: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2007864: 34 80 00 5a bg,a 20079cc <== NOT EXECUTED 2007868: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 200786c: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED 2007870: c2 00 63 a8 ld [ %g1 + 0x3a8 ], %g1 ! 2026ba8 <_impure_ptr><== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 2007874: 27 1c 00 00 sethi %hi(0x70000000), %l3 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 2007878: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 200787c: 40 00 3a 5b call 20161e8 <== NOT EXECUTED 2007880: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 2007884: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 2007888: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 200788c: 02 80 00 05 be 20078a0 <== NOT EXECUTED 2007890: a6 2c 00 13 andn %l0, %l3, %l3 <== NOT EXECUTED local_errno = errno; 2007894: 40 00 39 4b call 2015dc0 <__errno> <== NOT EXECUTED 2007898: 01 00 00 00 nop <== NOT EXECUTED 200789c: e2 02 00 00 ld [ %o0 ], %l1 <== 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); 20078a0: 29 00 80 9a sethi %hi(0x2026800), %l4 <== NOT EXECUTED 20078a4: c2 05 23 a8 ld [ %l4 + 0x3a8 ], %g1 ! 2026ba8 <_impure_ptr><== NOT EXECUTED 20078a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20078ac: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 20078b0: 40 00 51 d1 call 201bff4 <== NOT EXECUTED 20078b4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 20078b8: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 20078bc: 02 80 00 0c be 20078ec <== NOT EXECUTED 20078c0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 20078c4: c2 05 23 a8 ld [ %l4 + 0x3a8 ], %g1 <== NOT EXECUTED 20078c8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 20078cc: 7f ff ff cd call 2007800 <== NOT EXECUTED 20078d0: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 20078d4: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED 20078d8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 20078dc: 92 12 62 48 or %o1, 0x248, %o1 <== NOT EXECUTED 20078e0: 40 00 3b 16 call 2016538 <== NOT EXECUTED 20078e4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 20078e8: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED if (local_errno) 20078ec: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 20078f0: 22 80 00 1c be,a 2007960 <== NOT EXECUTED 20078f4: 27 00 80 9a sethi %hi(0x2026800), %l3 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 20078f8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 20078fc: 04 80 00 11 ble 2007940 <== NOT EXECUTED 2007900: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED 2007904: 40 00 3e 60 call 2017284 <== NOT EXECUTED 2007908: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200790c: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 2007910: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2007914: 02 80 00 0b be 2007940 <== NOT EXECUTED 2007918: 03 00 80 9a sethi %hi(0x2026800), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 200791c: c2 00 63 a8 ld [ %g1 + 0x3a8 ], %g1 ! 2026ba8 <_impure_ptr><== NOT EXECUTED 2007920: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2007924: 40 00 3e 58 call 2017284 <== NOT EXECUTED 2007928: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 200792c: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED 2007930: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 2007934: 92 12 62 58 or %o1, 0x258, %o1 <== NOT EXECUTED 2007938: 10 80 00 07 b 2007954 <== NOT EXECUTED 200793c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 2007940: c2 00 63 a8 ld [ %g1 + 0x3a8 ], %g1 <== NOT EXECUTED 2007944: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED 2007948: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 200794c: 92 12 62 68 or %o1, 0x268, %o1 <== NOT EXECUTED 2007950: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 2007954: 40 00 3a f9 call 2016538 <== NOT EXECUTED 2007958: 27 00 80 9a sethi %hi(0x2026800), %l3 <== NOT EXECUTED 200795c: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 2007960: c2 04 e3 a8 ld [ %l3 + 0x3a8 ], %g1 <== NOT EXECUTED 2007964: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED 2007968: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 200796c: 40 00 3a f3 call 2016538 <== NOT EXECUTED 2007970: 92 12 62 80 or %o1, 0x280, %o1 <== NOT EXECUTED (void) fflush(stderr); 2007974: c2 04 e3 a8 ld [ %l3 + 0x3a8 ], %g1 <== 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"); 2007978: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED (void) fflush(stderr); 200797c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 2007980: 40 00 3a 1a call 20161e8 <== NOT EXECUTED 2007984: b0 06 00 12 add %i0, %l2, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 2007988: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 200798c: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 2007990: 02 80 00 0f be 20079cc <== NOT EXECUTED 2007994: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 2007998: 22 80 00 08 be,a 20079b8 <== NOT EXECUTED 200799c: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 20079a0: 13 00 80 92 sethi %hi(0x2024800), %o1 <== NOT EXECUTED 20079a4: 90 10 20 00 clr %o0 <== NOT EXECUTED 20079a8: 40 00 00 18 call 2007a08 <== NOT EXECUTED 20079ac: 92 12 62 88 or %o1, 0x288, %o1 <== NOT EXECUTED _exit(local_errno); 20079b0: 40 00 02 e5 call 2008544 <_exit> <== NOT EXECUTED 20079b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 20079b8: 90 10 20 00 clr %o0 <== NOT EXECUTED 20079bc: 40 00 00 13 call 2007a08 <== NOT EXECUTED 20079c0: 92 12 62 a0 or %o1, 0x2a0, %o1 <== NOT EXECUTED abort(); 20079c4: 40 00 38 f1 call 2015d88 <== NOT EXECUTED 20079c8: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 20079cc: 81 c7 e0 08 ret <== NOT EXECUTED 20079d0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002e6c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2002e6c: 9d e3 bf a0 save %sp, -96, %sp 2002e70: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2002e74: 2b 00 80 7b sethi %hi(0x201ec00), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 2002e78: 29 00 80 7b sethi %hi(0x201ec00), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2002e7c: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2002e80: aa 15 60 48 or %l5, 0x48, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 2002e84: a8 15 20 40 or %l4, 0x40, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2002e88: a2 10 20 00 clr %l1 2002e8c: a0 10 20 00 clr %l0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2002e90: c2 06 20 04 ld [ %i0 + 4 ], %g1 2002e94: 82 00 7f ff add %g1, -1, %g1 2002e98: 80 a0 60 00 cmp %g1, 0 2002e9c: 16 80 00 07 bge 2002eb8 <== ALWAYS TAKEN 2002ea0: c2 26 20 04 st %g1, [ %i0 + 4 ] 2002ea4: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 2002ea8: 40 00 3f cf call 2012de4 <__srget_r> <== NOT EXECUTED 2002eac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2002eb0: 10 80 00 06 b 2002ec8 <== NOT EXECUTED 2002eb4: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 2002eb8: c2 06 00 00 ld [ %i0 ], %g1 2002ebc: 84 00 60 01 add %g1, 1, %g2 2002ec0: e4 08 40 00 ldub [ %g1 ], %l2 2002ec4: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') 2002ec8: 80 a4 a0 3a cmp %l2, 0x3a 2002ecc: 02 80 00 22 be 2002f54 2002ed0: 80 a4 60 00 cmp %l1, 0 break; if (sign == 0) { 2002ed4: 32 80 00 09 bne,a 2002ef8 <== NEVER TAKEN 2002ed8: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 2002edc: 80 a4 a0 2d cmp %l2, 0x2d 2002ee0: 12 80 00 05 bne 2002ef4 <== ALWAYS TAKEN 2002ee4: a2 10 20 01 mov 1, %l1 sign = -1; limit++; 2002ee8: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 2002eec: 10 bf ff e9 b 2002e90 <== NOT EXECUTED 2002ef0: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 2002ef4: c2 05 00 00 ld [ %l4 ], %g1 2002ef8: 82 00 40 12 add %g1, %l2, %g1 2002efc: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2002f00: 80 88 60 04 btst 4, %g1 2002f04: 02 80 00 1c be 2002f74 <== NEVER TAKEN 2002f08: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 2002f0c: 40 00 60 3e call 201b004 <.udiv> 2002f10: 92 10 20 0a mov 0xa, %o1 2002f14: 80 a4 00 08 cmp %l0, %o0 2002f18: 18 80 00 17 bgu 2002f74 <== NEVER TAKEN 2002f1c: 01 00 00 00 nop 2002f20: 12 80 00 08 bne 2002f40 <== ALWAYS TAKEN 2002f24: a4 04 bf d0 add %l2, -48, %l2 2002f28: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2002f2c: 40 00 60 e2 call 201b2b4 <.urem> <== NOT EXECUTED 2002f30: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 2002f34: 80 a4 80 08 cmp %l2, %o0 <== NOT EXECUTED 2002f38: 18 80 00 0f bgu 2002f74 <== NOT EXECUTED 2002f3c: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 2002f40: 83 2c 20 03 sll %l0, 3, %g1 2002f44: a1 2c 20 01 sll %l0, 1, %l0 2002f48: a0 04 00 01 add %l0, %g1, %l0 2002f4c: 10 bf ff d1 b 2002e90 2002f50: a0 04 80 10 add %l2, %l0, %l0 } if (sign == 0) 2002f54: 02 80 00 08 be 2002f74 <== NEVER TAKEN 2002f58: 90 10 00 11 mov %l1, %o0 return 0; *val = i * sign; 2002f5c: 92 10 00 10 mov %l0, %o1 2002f60: 40 00 5f ef call 201af1c <.umul> 2002f64: b0 10 20 01 mov 1, %i0 2002f68: d0 26 40 00 st %o0, [ %i1 ] return 1; 2002f6c: 81 c7 e0 08 ret 2002f70: 81 e8 00 00 restore } 2002f74: 81 c7 e0 08 ret <== NOT EXECUTED 2002f78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02002f7c : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2002f7c: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 2002f80: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 2002f84: 21 00 80 7b sethi %hi(0x201ec00), %l0 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 2002f88: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 2002f8c: a0 14 20 48 or %l0, 0x48, %l0 2002f90: c2 06 20 04 ld [ %i0 + 4 ], %g1 2002f94: 82 00 7f ff add %g1, -1, %g1 2002f98: 80 a0 60 00 cmp %g1, 0 2002f9c: 16 80 00 07 bge 2002fb8 2002fa0: c2 26 20 04 st %g1, [ %i0 + 4 ] 2002fa4: d0 04 00 00 ld [ %l0 ], %o0 2002fa8: 40 00 3f 8f call 2012de4 <__srget_r> 2002fac: 92 10 00 18 mov %i0, %o1 if (c == ':') { 2002fb0: 10 80 00 07 b 2002fcc 2002fb4: 80 a2 20 3a cmp %o0, 0x3a { int c; *name = *bufp; for (;;) { c = getc(fp); 2002fb8: c2 06 00 00 ld [ %i0 ], %g1 2002fbc: 84 00 60 01 add %g1, 1, %g2 2002fc0: d0 08 40 00 ldub [ %g1 ], %o0 2002fc4: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') { 2002fc8: 80 a2 20 3a cmp %o0, 0x3a 2002fcc: 12 80 00 07 bne 2002fe8 2002fd0: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 2002fd4: 80 a7 20 00 cmp %i4, 0 2002fd8: 22 80 00 1a be,a 2003040 <== ALWAYS TAKEN 2002fdc: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 2002fe0: 81 c7 e0 08 ret <== NOT EXECUTED 2002fe4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 2002fe8: 12 80 00 07 bne 2003004 2002fec: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) 2002ff0: 80 a7 20 00 cmp %i4, 0 2002ff4: 32 80 00 13 bne,a 2003040 <== ALWAYS TAKEN 2002ff8: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 2002ffc: 81 c7 e0 08 ret <== NOT EXECUTED 2003000: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 2003004: 22 80 00 17 be,a 2003060 <== NEVER TAKEN 2003008: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 200300c: c2 06 c0 00 ld [ %i3 ], %g1 2003010: 80 a0 60 01 cmp %g1, 1 2003014: 28 80 00 13 bleu,a 2003060 <== NEVER TAKEN 2003018: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 200301c: c2 06 80 00 ld [ %i2 ], %g1 2003020: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 2003024: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 2003028: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 200302c: 84 00 a0 01 inc %g2 --(*nleft); 2003030: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 2003034: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); } 2003038: 10 bf ff d6 b 2002f90 200303c: c2 26 c0 00 st %g1, [ %i3 ] **bufp = '\0'; 2003040: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 2003044: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 2003048: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 200304c: 84 00 a0 01 inc %g2 --(*nleft); 2003050: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 2003054: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 2003058: c2 26 c0 00 st %g1, [ %i3 ] 200305c: b0 10 20 01 mov 1, %i0 return 1; } 2003060: 81 c7 e0 08 ret 2003064: 81 e8 00 00 restore =============================================================================== 02003068 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2003068: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 200306c: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2003070: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2003074: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2003078: a2 07 a0 4c add %fp, 0x4c, %l1 200307c: a0 07 a0 50 add %fp, 0x50, %l0 2003080: 90 10 00 18 mov %i0, %o0 2003084: 92 10 00 19 mov %i1, %o1 2003088: 94 10 00 11 mov %l1, %o2 200308c: 7f ff ff bc call 2002f7c 2003090: 96 10 00 10 mov %l0, %o3 2003094: 80 a2 20 00 cmp %o0, 0 2003098: 02 80 00 41 be 200319c <== NEVER TAKEN 200309c: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 20030a0: 92 06 60 04 add %i1, 4, %o1 20030a4: 94 10 00 11 mov %l1, %o2 20030a8: 96 10 00 10 mov %l0, %o3 20030ac: 7f ff ff b4 call 2002f7c 20030b0: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 20030b4: 80 a2 20 00 cmp %o0, 0 20030b8: 02 80 00 39 be 200319c <== NEVER TAKEN 20030bc: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 20030c0: 7f ff ff 6b call 2002e6c 20030c4: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 20030c8: 80 a2 20 00 cmp %o0, 0 20030cc: 02 80 00 34 be 200319c <== NEVER TAKEN 20030d0: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 20030d4: 94 10 00 11 mov %l1, %o2 20030d8: 96 10 00 10 mov %l0, %o3 20030dc: 92 07 bf f8 add %fp, -8, %o1 20030e0: 7f ff ff a7 call 2002f7c 20030e4: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 20030e8: 80 a2 20 00 cmp %o0, 0 20030ec: 02 80 00 2c be 200319c <== NEVER TAKEN 20030f0: c2 07 bf fc ld [ %fp + -4 ], %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 20030f4: c6 07 bf f8 ld [ %fp + -8 ], %g3 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; 20030f8: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 20030fc: 84 10 00 03 mov %g3, %g2 2003100: 10 80 00 05 b 2003114 2003104: 82 10 20 01 mov 1, %g1 if(*cp == ',') memcount++; 2003108: 88 19 20 2c xor %g4, 0x2c, %g4 200310c: 80 a0 00 04 cmp %g0, %g4 2003110: 82 60 7f ff subx %g1, -1, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2003114: c8 48 80 00 ldsb [ %g2 ], %g4 2003118: 80 a1 20 00 cmp %g4, 0 200311c: 12 bf ff fb bne 2003108 2003120: 84 00 a0 01 inc %g2 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 2003124: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 2003128: 83 28 60 02 sll %g1, 2, %g1 200312c: 82 00 60 13 add %g1, 0x13, %g1 2003130: 80 a0 80 01 cmp %g2, %g1 2003134: 0a 80 00 1a bcs 200319c <== NEVER TAKEN 2003138: c2 07 a0 4c ld [ %fp + 0x4c ], %g1 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 200313c: 84 10 20 01 mov 1, %g2 /* * 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); 2003140: 82 00 60 0f add %g1, 0xf, %g1 2003144: 82 08 7f f0 and %g1, -16, %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 2003148: c6 20 40 00 st %g3, [ %g1 ] /* * 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); 200314c: c2 26 60 0c st %g1, [ %i1 + 0xc ] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 2003150: 10 80 00 09 b 2003174 2003154: c2 07 bf f8 ld [ %fp + -8 ], %g1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 2003158: 32 80 00 08 bne,a 2003178 <== ALWAYS TAKEN 200315c: 82 00 60 01 inc %g1 *cp = '\0'; 2003160: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 2003164: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 2003168: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 200316c: 84 00 a0 01 inc %g2 <== NOT EXECUTED 2003170: c2 21 00 03 st %g1, [ %g4 + %g3 ] <== NOT EXECUTED 2003174: 82 00 60 01 inc %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2003178: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 200317c: 80 a0 e0 00 cmp %g3, 0 2003180: 32 bf ff f6 bne,a 2003158 2003184: 80 a0 e0 2c cmp %g3, 0x2c if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 2003188: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200318c: 85 28 a0 02 sll %g2, 2, %g2 2003190: c0 20 40 02 clr [ %g1 + %g2 ] return 1; 2003194: 81 c7 e0 08 ret 2003198: 91 e8 20 01 restore %g0, 1, %o0 } 200319c: 81 c7 e0 08 ret <== NOT EXECUTED 20031a0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 020031ec : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 20031ec: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 20031f0: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 20031f4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 20031f8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 20031fc: a2 07 a0 4c add %fp, 0x4c, %l1 2003200: a0 07 a0 50 add %fp, 0x50, %l0 2003204: 90 10 00 18 mov %i0, %o0 2003208: 92 10 00 19 mov %i1, %o1 200320c: 94 10 00 11 mov %l1, %o2 2003210: 7f ff ff 5b call 2002f7c 2003214: 96 10 00 10 mov %l0, %o3 2003218: 80 a2 20 00 cmp %o0, 0 200321c: 02 80 00 39 be 2003300 <== NEVER TAKEN 2003220: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 2003224: 92 06 60 04 add %i1, 4, %o1 2003228: 94 10 00 11 mov %l1, %o2 200322c: 96 10 00 10 mov %l0, %o3 2003230: 7f ff ff 53 call 2002f7c 2003234: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2003238: 80 a2 20 00 cmp %o0, 0 200323c: 02 80 00 31 be 2003300 <== NEVER TAKEN 2003240: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 2003244: 7f ff ff 0a call 2002e6c 2003248: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 200324c: 80 a2 20 00 cmp %o0, 0 2003250: 02 80 00 2c be 2003300 <== NEVER TAKEN 2003254: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 2003258: 7f ff ff 05 call 2002e6c 200325c: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2003260: 80 a2 20 00 cmp %o0, 0 2003264: 02 80 00 27 be 2003300 <== NEVER TAKEN 2003268: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 200326c: 92 06 60 0c add %i1, 0xc, %o1 2003270: 94 10 00 11 mov %l1, %o2 2003274: 96 10 00 10 mov %l0, %o3 2003278: 7f ff ff 41 call 2002f7c 200327c: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2003280: 80 a2 20 00 cmp %o0, 0 2003284: 02 80 00 1f be 2003300 <== NEVER TAKEN 2003288: 90 10 00 18 mov %i0, %o0 || !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) 200328c: 92 06 60 10 add %i1, 0x10, %o1 2003290: 94 10 00 11 mov %l1, %o2 2003294: 96 10 00 10 mov %l0, %o3 2003298: 7f ff ff 39 call 2002f7c 200329c: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 20032a0: 80 a2 20 00 cmp %o0, 0 20032a4: 02 80 00 17 be 2003300 <== NEVER TAKEN 20032a8: 90 10 00 18 mov %i0, %o0 || !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) 20032ac: 92 06 60 14 add %i1, 0x14, %o1 20032b0: 94 10 00 11 mov %l1, %o2 20032b4: 96 10 00 10 mov %l0, %o3 20032b8: 7f ff ff 31 call 2002f7c 20032bc: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 20032c0: 80 a2 20 00 cmp %o0, 0 20032c4: 02 80 00 0f be 2003300 <== NEVER TAKEN 20032c8: 90 10 00 18 mov %i0, %o0 || !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)) 20032cc: 94 10 00 11 mov %l1, %o2 20032d0: 96 10 00 10 mov %l0, %o3 20032d4: 92 06 60 18 add %i1, 0x18, %o1 20032d8: 7f ff ff 29 call 2002f7c 20032dc: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 20032e0: 80 a2 20 00 cmp %o0, 0 20032e4: 02 80 00 07 be 2003300 <== NEVER TAKEN 20032e8: c2 07 bf fc ld [ %fp + -4 ], %g1 || !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; 20032ec: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 20032f0: c2 07 bf f8 ld [ %fp + -8 ], %g1 20032f4: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 20032f8: 81 c7 e0 08 ret 20032fc: 91 e8 20 01 restore %g0, 1, %o0 } 2003300: 81 c7 e0 08 ret <== NOT EXECUTED 2003304: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02006320 : #include int sched_get_priority_max( int policy ) { 2006320: 9d e3 bf a0 save %sp, -96, %sp switch ( policy ) { 2006324: 80 a6 20 04 cmp %i0, 4 2006328: 18 80 00 06 bgu 2006340 200632c: 82 10 20 01 mov 1, %g1 2006330: b1 28 40 18 sll %g1, %i0, %i0 2006334: 80 8e 20 17 btst 0x17, %i0 2006338: 12 80 00 08 bne 2006358 <== ALWAYS TAKEN 200633c: 03 00 80 71 sethi %hi(0x201c400), %g1 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2006340: 40 00 26 56 call 200fc98 <__errno> 2006344: b0 10 3f ff mov -1, %i0 2006348: 82 10 20 16 mov 0x16, %g1 200634c: c2 22 00 00 st %g1, [ %o0 ] 2006350: 81 c7 e0 08 ret 2006354: 81 e8 00 00 restore } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 2006358: f0 08 61 88 ldub [ %g1 + 0x188 ], %i0 } 200635c: 81 c7 e0 08 ret 2006360: 91 ee 3f ff restore %i0, -1, %o0 =============================================================================== 02006364 : #include int sched_get_priority_min( int policy ) { 2006364: 9d e3 bf a0 save %sp, -96, %sp switch ( policy ) { 2006368: 80 a6 20 04 cmp %i0, 4 200636c: 18 80 00 06 bgu 2006384 2006370: 82 10 20 01 mov 1, %g1 2006374: b1 28 40 18 sll %g1, %i0, %i0 2006378: 80 8e 20 17 btst 0x17, %i0 200637c: 12 80 00 06 bne 2006394 <== ALWAYS TAKEN 2006380: b0 10 20 01 mov 1, %i0 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2006384: 40 00 26 45 call 200fc98 <__errno> 2006388: b0 10 3f ff mov -1, %i0 200638c: 82 10 20 16 mov 0x16, %g1 2006390: c2 22 00 00 st %g1, [ %o0 ] } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 2006394: 81 c7 e0 08 ret 2006398: 81 e8 00 00 restore =============================================================================== 0200639c : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 200639c: 9d e3 bf a0 save %sp, -96, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 20063a0: 80 a6 20 00 cmp %i0, 0 20063a4: 02 80 00 0b be 20063d0 <== NEVER TAKEN 20063a8: 80 a6 60 00 cmp %i1, 0 20063ac: 7f ff f2 c6 call 2002ec4 20063b0: 01 00 00 00 nop 20063b4: 80 a6 00 08 cmp %i0, %o0 20063b8: 02 80 00 06 be 20063d0 20063bc: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 20063c0: 40 00 26 36 call 200fc98 <__errno> 20063c4: 01 00 00 00 nop 20063c8: 10 80 00 07 b 20063e4 20063cc: 82 10 20 03 mov 3, %g1 ! 3 if ( !interval ) 20063d0: 12 80 00 08 bne 20063f0 20063d4: 03 00 80 73 sethi %hi(0x201cc00), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 20063d8: 40 00 26 30 call 200fc98 <__errno> 20063dc: 01 00 00 00 nop 20063e0: 82 10 20 16 mov 0x16, %g1 ! 16 20063e4: c2 22 00 00 st %g1, [ %o0 ] 20063e8: 81 c7 e0 08 ret 20063ec: 91 e8 3f ff restore %g0, -1, %o0 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 20063f0: d0 00 63 c8 ld [ %g1 + 0x3c8 ], %o0 20063f4: 92 10 00 19 mov %i1, %o1 20063f8: 40 00 0d fe call 2009bf0 <_Timespec_From_ticks> 20063fc: b0 10 20 00 clr %i0 return 0; } 2006400: 81 c7 e0 08 ret 2006404: 81 e8 00 00 restore =============================================================================== 02008cb8 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 2008cb8: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2008cbc: 03 00 80 88 sethi %hi(0x2022000), %g1 2008cc0: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 2022050 <_Thread_Dispatch_disable_level> Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); 2008cc4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2008cc8: 84 00 a0 01 inc %g2 2008ccc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2008cd0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2008cd4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 2008cd8: c4 20 60 50 st %g2, [ %g1 + 0x50 ] POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 2008cdc: a2 8e 62 00 andcc %i1, 0x200, %l1 2008ce0: 02 80 00 05 be 2008cf4 2008ce4: a0 10 20 00 clr %l0 va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 2008ce8: e0 07 a0 50 ld [ %fp + 0x50 ], %l0 2008cec: 82 07 a0 54 add %fp, 0x54, %g1 2008cf0: c2 27 bf fc st %g1, [ %fp + -4 ] va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 2008cf4: 90 10 00 18 mov %i0, %o0 2008cf8: 40 00 1a ce call 200f830 <_POSIX_Semaphore_Name_to_id> 2008cfc: 92 07 bf f8 add %fp, -8, %o1 * 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 ) { 2008d00: a4 92 20 00 orcc %o0, 0, %l2 2008d04: 22 80 00 0e be,a 2008d3c 2008d08: b2 0e 6a 00 and %i1, 0xa00, %i1 /* * 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) ) ) { 2008d0c: 80 a4 a0 02 cmp %l2, 2 2008d10: 12 80 00 04 bne 2008d20 <== NEVER TAKEN 2008d14: 80 a4 60 00 cmp %l1, 0 2008d18: 12 80 00 21 bne 2008d9c 2008d1c: 94 10 00 10 mov %l0, %o2 _Thread_Enable_dispatch(); 2008d20: 40 00 0a a2 call 200b7a8 <_Thread_Enable_dispatch> 2008d24: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 2008d28: 40 00 29 5b call 2013294 <__errno> 2008d2c: 01 00 00 00 nop 2008d30: e4 22 00 00 st %l2, [ %o0 ] 2008d34: 81 c7 e0 08 ret 2008d38: 81 e8 00 00 restore /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 2008d3c: 80 a6 6a 00 cmp %i1, 0xa00 2008d40: 12 80 00 0a bne 2008d68 2008d44: d2 07 bf f8 ld [ %fp + -8 ], %o1 _Thread_Enable_dispatch(); 2008d48: 40 00 0a 98 call 200b7a8 <_Thread_Enable_dispatch> 2008d4c: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 2008d50: 40 00 29 51 call 2013294 <__errno> 2008d54: 01 00 00 00 nop 2008d58: 82 10 20 11 mov 0x11, %g1 ! 11 2008d5c: c2 22 00 00 st %g1, [ %o0 ] 2008d60: 81 c7 e0 08 ret 2008d64: 81 e8 00 00 restore 2008d68: 94 07 bf f0 add %fp, -16, %o2 2008d6c: 11 00 80 88 sethi %hi(0x2022000), %o0 2008d70: 40 00 08 27 call 200ae0c <_Objects_Get> 2008d74: 90 12 23 60 or %o0, 0x360, %o0 ! 2022360 <_POSIX_Semaphore_Information> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 2008d78: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 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 ); 2008d7c: d0 27 bf f4 st %o0, [ %fp + -12 ] the_semaphore->open_count += 1; 2008d80: 82 00 60 01 inc %g1 _Thread_Enable_dispatch(); 2008d84: 40 00 0a 89 call 200b7a8 <_Thread_Enable_dispatch> 2008d88: c2 22 20 18 st %g1, [ %o0 + 0x18 ] _Thread_Enable_dispatch(); 2008d8c: 40 00 0a 87 call 200b7a8 <_Thread_Enable_dispatch> 2008d90: 01 00 00 00 nop goto return_id; 2008d94: 10 80 00 0c b 2008dc4 2008d98: f0 07 bf f4 ld [ %fp + -12 ], %i0 /* * 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( 2008d9c: 90 10 00 18 mov %i0, %o0 2008da0: 92 10 20 00 clr %o1 2008da4: 40 00 1a 4d call 200f6d8 <_POSIX_Semaphore_Create_support> 2008da8: 96 07 bf f4 add %fp, -12, %o3 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 2008dac: 40 00 0a 7f call 200b7a8 <_Thread_Enable_dispatch> 2008db0: a0 10 00 08 mov %o0, %l0 if ( status == -1 ) 2008db4: 80 a4 3f ff cmp %l0, -1 2008db8: 02 bf ff ea be 2008d60 2008dbc: b0 10 3f ff mov -1, %i0 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; 2008dc0: f0 07 bf f4 ld [ %fp + -12 ], %i0 2008dc4: b0 06 20 08 add %i0, 8, %i0 #endif return id; } 2008dc8: 81 c7 e0 08 ret 2008dcc: 81 e8 00 00 restore =============================================================================== 02003428 : return NULL; return &grent; } void setgrent(void) { 2003428: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 200342c: 7f ff ff c9 call 2003350 <== NOT EXECUTED 2003430: 01 00 00 00 nop <== NOT EXECUTED if (group_fp != NULL) 2003434: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 2003438: d0 00 62 4c ld [ %g1 + 0x24c ], %o0 ! 201f24c <== NOT EXECUTED 200343c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003440: 22 80 00 05 be,a 2003454 <== NOT EXECUTED 2003444: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED fclose(group_fp); 2003448: 40 00 37 7e call 2011240 <== NOT EXECUTED 200344c: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 2003450: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 2003454: 13 00 80 75 sethi %hi(0x201d400), %o1 <== NOT EXECUTED 2003458: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED 200345c: 40 00 39 4f call 2011998 <== NOT EXECUTED 2003460: 92 12 63 50 or %o1, 0x350, %o1 <== NOT EXECUTED 2003464: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 2003468: d0 20 62 4c st %o0, [ %g1 + 0x24c ] ! 201f24c <== NOT EXECUTED } 200346c: 81 c7 e0 08 ret <== NOT EXECUTED 2003470: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200361c : return NULL; return &pwent; } void setpwent(void) { 200361c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 2003620: 7f ff ff 4c call 2003350 <== NOT EXECUTED 2003624: 01 00 00 00 nop <== NOT EXECUTED if (passwd_fp != NULL) 2003628: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 200362c: d0 00 61 64 ld [ %g1 + 0x164 ], %o0 ! 201f164 <== NOT EXECUTED 2003630: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003634: 22 80 00 05 be,a 2003648 <== NOT EXECUTED 2003638: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED fclose(passwd_fp); 200363c: 40 00 37 01 call 2011240 <== NOT EXECUTED 2003640: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 2003644: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 2003648: 13 00 80 75 sethi %hi(0x201d400), %o1 <== NOT EXECUTED 200364c: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 2003650: 40 00 38 d2 call 2011998 <== NOT EXECUTED 2003654: 92 12 63 50 or %o1, 0x350, %o1 <== NOT EXECUTED 2003658: 03 00 80 7c sethi %hi(0x201f000), %g1 <== NOT EXECUTED 200365c: d0 20 61 64 st %o0, [ %g1 + 0x164 ] ! 201f164 <== NOT EXECUTED } 2003660: 81 c7 e0 08 ret <== NOT EXECUTED 2003664: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020062c8 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 20062c8: 9d e3 bf a0 save %sp, -96, %sp 20062cc: 90 10 00 1a mov %i2, %o0 ISR_Level level; if ( oact ) 20062d0: 80 a6 a0 00 cmp %i2, 0 20062d4: 02 80 00 0a be 20062fc 20062d8: a0 10 00 18 mov %i0, %l0 *oact = _POSIX_signals_Vectors[ sig ]; 20062dc: 83 2e 20 02 sll %i0, 2, %g1 20062e0: 85 2e 20 04 sll %i0, 4, %g2 20062e4: 82 20 80 01 sub %g2, %g1, %g1 20062e8: 13 00 80 79 sethi %hi(0x201e400), %o1 20062ec: 94 10 20 0c mov 0xc, %o2 20062f0: 92 12 61 44 or %o1, 0x144, %o1 20062f4: 40 00 29 3d call 20107e8 20062f8: 92 02 40 01 add %o1, %g1, %o1 if ( !sig ) 20062fc: 80 a4 20 00 cmp %l0, 0 2006300: 02 80 00 07 be 200631c 2006304: 82 04 3f ff add %l0, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 2006308: 80 a0 60 1f cmp %g1, 0x1f 200630c: 18 80 00 04 bgu 200631c 2006310: 80 a4 20 09 cmp %l0, 9 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 2006314: 12 80 00 08 bne 2006334 2006318: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); 200631c: 40 00 26 f2 call 200fee4 <__errno> 2006320: b0 10 3f ff mov -1, %i0 2006324: 82 10 20 16 mov 0x16, %g1 2006328: c2 22 00 00 st %g1, [ %o0 ] 200632c: 81 c7 e0 08 ret 2006330: 81 e8 00 00 restore /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 2006334: 02 bf ff fe be 200632c <== NEVER TAKEN 2006338: b0 10 20 00 clr %i0 /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 200633c: 7f ff f1 37 call 2002818 2006340: 01 00 00 00 nop 2006344: a2 10 00 08 mov %o0, %l1 if ( act->sa_handler == SIG_DFL ) { 2006348: c2 06 60 08 ld [ %i1 + 8 ], %g1 200634c: 25 00 80 79 sethi %hi(0x201e400), %l2 2006350: 80 a0 60 00 cmp %g1, 0 2006354: a4 14 a1 44 or %l2, 0x144, %l2 2006358: a7 2c 20 02 sll %l0, 2, %l3 200635c: 12 80 00 08 bne 200637c 2006360: a9 2c 20 04 sll %l0, 4, %l4 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 2006364: a6 25 00 13 sub %l4, %l3, %l3 2006368: 13 00 80 71 sethi %hi(0x201c400), %o1 200636c: 90 04 80 13 add %l2, %l3, %o0 2006370: 92 12 63 80 or %o1, 0x380, %o1 2006374: 10 80 00 07 b 2006390 2006378: 92 02 40 13 add %o1, %l3, %o1 } else { _POSIX_signals_Clear_process_signals( sig ); 200637c: 40 00 18 d9 call 200c6e0 <_POSIX_signals_Clear_process_signals> 2006380: 90 10 00 10 mov %l0, %o0 _POSIX_signals_Vectors[ sig ] = *act; 2006384: a6 25 00 13 sub %l4, %l3, %l3 2006388: 92 10 00 19 mov %i1, %o1 200638c: 90 04 80 13 add %l2, %l3, %o0 2006390: 40 00 29 16 call 20107e8 2006394: 94 10 20 0c mov 0xc, %o2 } _ISR_Enable( level ); 2006398: b0 10 20 00 clr %i0 200639c: 7f ff f1 23 call 2002828 20063a0: 90 10 00 11 mov %l1, %o0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 20063a4: 81 c7 e0 08 ret 20063a8: 81 e8 00 00 restore =============================================================================== 020084f4 : #include int sigsuspend( const sigset_t *sigmask ) { 20084f4: 9d e3 bf 98 save %sp, -104, %sp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 20084f8: 90 10 20 01 mov 1, %o0 20084fc: 92 10 00 18 mov %i0, %o1 2008500: a0 07 bf fc add %fp, -4, %l0 2008504: 7f ff ff f1 call 20084c8 2008508: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 200850c: a2 07 bf f8 add %fp, -8, %l1 2008510: 7f ff ff b6 call 20083e8 2008514: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 2008518: 90 10 00 11 mov %l1, %o0 200851c: 92 10 20 00 clr %o1 2008520: 40 00 00 28 call 20085c0 2008524: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 2008528: 92 10 00 10 mov %l0, %o1 status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); (void) sigfillset( &all_signals ); status = sigtimedwait( &all_signals, NULL, NULL ); 200852c: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 2008530: 94 10 20 00 clr %o2 2008534: 7f ff ff e5 call 20084c8 2008538: 90 10 20 00 clr %o0 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 200853c: 80 a4 7f ff cmp %l1, -1 2008540: 02 80 00 06 be 2008558 <== NEVER TAKEN 2008544: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); 2008548: 40 00 26 43 call 2011e54 <__errno> 200854c: 01 00 00 00 nop 2008550: 82 10 20 04 mov 4, %g1 ! 4 2008554: c2 22 00 00 st %g1, [ %o0 ] return status; } 2008558: 81 c7 e0 08 ret 200855c: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02006744 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 2006744: 9d e3 bf 90 save %sp, -112, %sp ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 2006748: 80 a6 20 00 cmp %i0, 0 200674c: 02 80 00 0e be 2006784 2006750: 80 a6 a0 00 cmp %i2, 0 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 2006754: 02 80 00 12 be 200679c 2006758: a8 10 20 00 clr %l4 if ( !_Timespec_Is_valid( timeout ) ) 200675c: 40 00 0e 30 call 200a01c <_Timespec_Is_valid> 2006760: 90 10 00 1a mov %i2, %o0 2006764: 80 8a 20 ff btst 0xff, %o0 2006768: 02 80 00 07 be 2006784 200676c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 2006770: 40 00 0e 50 call 200a0b0 <_Timespec_To_ticks> 2006774: 90 10 00 1a mov %i2, %o0 if ( !interval ) 2006778: a8 92 20 00 orcc %o0, 0, %l4 200677c: 12 80 00 09 bne 20067a0 <== ALWAYS TAKEN 2006780: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( EINVAL ); 2006784: 40 00 26 b4 call 2010254 <__errno> 2006788: b0 10 3f ff mov -1, %i0 200678c: 82 10 20 16 mov 0x16, %g1 2006790: c2 22 00 00 st %g1, [ %o0 ] 2006794: 81 c7 e0 08 ret 2006798: 81 e8 00 00 restore /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 200679c: 80 a6 60 00 cmp %i1, 0 20067a0: 02 80 00 03 be 20067ac 20067a4: a0 07 bf f4 add %fp, -12, %l0 20067a8: a0 10 00 19 mov %i1, %l0 the_thread = _Thread_Executing; 20067ac: 23 00 80 79 sethi %hi(0x201e400), %l1 20067b0: f2 04 60 a0 ld [ %l1 + 0xa0 ], %i1 ! 201e4a0 <_Thread_Executing> * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 20067b4: 7f ff f0 ea call 2002b5c 20067b8: e6 06 61 6c ld [ %i1 + 0x16c ], %l3 20067bc: a4 10 00 08 mov %o0, %l2 if ( *set & api->signals_pending ) { 20067c0: c4 06 00 00 ld [ %i0 ], %g2 20067c4: c2 04 e0 d0 ld [ %l3 + 0xd0 ], %g1 20067c8: 80 88 80 01 btst %g2, %g1 20067cc: 22 80 00 10 be,a 200680c 20067d0: 03 00 80 7a sethi %hi(0x201e800), %g1 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 20067d4: 7f ff ff c4 call 20066e4 <_POSIX_signals_Get_highest> 20067d8: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( 20067dc: 94 10 00 10 mov %l0, %o2 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 20067e0: 92 10 00 08 mov %o0, %o1 _POSIX_signals_Clear_signals( 20067e4: 96 10 20 00 clr %o3 20067e8: 90 10 00 13 mov %l3, %o0 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 20067ec: d2 24 00 00 st %o1, [ %l0 ] _POSIX_signals_Clear_signals( 20067f0: 40 00 19 9b call 200ce5c <_POSIX_signals_Clear_signals> 20067f4: 98 10 20 00 clr %o4 the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 20067f8: 7f ff f0 dd call 2002b6c 20067fc: 90 10 00 12 mov %l2, %o0 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 2006800: c0 24 20 08 clr [ %l0 + 8 ] return the_info->si_signo; 2006804: 10 80 00 13 b 2006850 2006808: f0 04 00 00 ld [ %l0 ], %i0 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 200680c: c2 00 63 68 ld [ %g1 + 0x368 ], %g1 2006810: 80 88 80 01 btst %g2, %g1 2006814: 22 80 00 13 be,a 2006860 2006818: 03 00 80 78 sethi %hi(0x201e000), %g1 signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 200681c: 7f ff ff b2 call 20066e4 <_POSIX_signals_Get_highest> 2006820: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 2006824: 94 10 00 10 mov %l0, %o2 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 2006828: b0 10 00 08 mov %o0, %i0 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 200682c: 96 10 20 01 mov 1, %o3 2006830: 90 10 00 13 mov %l3, %o0 2006834: 92 10 00 18 mov %i0, %o1 2006838: 40 00 19 89 call 200ce5c <_POSIX_signals_Clear_signals> 200683c: 98 10 20 00 clr %o4 _ISR_Enable( level ); 2006840: 7f ff f0 cb call 2002b6c 2006844: 90 10 00 12 mov %l2, %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 2006848: c0 24 20 08 clr [ %l0 + 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; 200684c: f0 24 00 00 st %i0, [ %l0 ] the_info->si_code = SI_USER; 2006850: 82 10 20 01 mov 1, %g1 2006854: c2 24 20 04 st %g1, [ %l0 + 4 ] the_info->si_value.sival_int = 0; return signo; 2006858: 81 c7 e0 08 ret 200685c: 81 e8 00 00 restore 2006860: c4 00 63 e0 ld [ %g1 + 0x3e0 ], %g2 2006864: 84 00 a0 01 inc %g2 2006868: c4 20 63 e0 st %g2, [ %g1 + 0x3e0 ] } the_info->si_signo = -1; 200686c: 82 10 3f ff mov -1, %g1 2006870: c2 24 00 00 st %g1, [ %l0 ] _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 2006874: 82 10 20 04 mov 4, %g1 2006878: c2 26 60 34 st %g1, [ %i1 + 0x34 ] the_thread->Wait.option = *set; 200687c: c2 06 00 00 ld [ %i0 ], %g1 the_thread->Wait.return_argument = the_info; 2006880: e0 26 60 28 st %l0, [ %i1 + 0x28 ] the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; 2006884: c2 26 60 30 st %g1, [ %i1 + 0x30 ] } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 2006888: 25 00 80 7a sethi %hi(0x201e800), %l2 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; 200688c: 82 10 20 01 mov 1, %g1 2006890: a4 14 a3 00 or %l2, 0x300, %l2 2006894: e4 26 60 44 st %l2, [ %i1 + 0x44 ] 2006898: c2 24 a0 30 st %g1, [ %l2 + 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 ); 200689c: 7f ff f0 b4 call 2002b6c 20068a0: 01 00 00 00 nop _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 20068a4: 90 10 00 12 mov %l2, %o0 20068a8: 92 10 00 14 mov %l4, %o1 20068ac: 15 00 80 26 sethi %hi(0x2009800), %o2 20068b0: 40 00 0b 94 call 2009700 <_Thread_queue_Enqueue_with_handler> 20068b4: 94 12 a2 60 or %o2, 0x260, %o2 ! 2009a60 <_Thread_queue_Timeout> _Thread_Enable_dispatch(); 20068b8: 40 00 0a 2d call 200916c <_Thread_Enable_dispatch> 20068bc: 01 00 00 00 nop /* * 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 ); 20068c0: d2 04 00 00 ld [ %l0 ], %o1 20068c4: 94 10 00 10 mov %l0, %o2 20068c8: 96 10 20 00 clr %o3 20068cc: 98 10 20 00 clr %o4 20068d0: 40 00 19 63 call 200ce5c <_POSIX_signals_Clear_signals> 20068d4: 90 10 00 13 mov %l3, %o0 errno = _Thread_Executing->Wait.return_code; 20068d8: 40 00 26 5f call 2010254 <__errno> 20068dc: 01 00 00 00 nop 20068e0: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 20068e4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 20068e8: c2 22 00 00 st %g1, [ %o0 ] return the_info->si_signo; 20068ec: f0 04 00 00 ld [ %l0 ], %i0 } 20068f0: 81 c7 e0 08 ret 20068f4: 81 e8 00 00 restore =============================================================================== 02008788 : int sigwait( const sigset_t *set, int *sig ) { 2008788: 9d e3 bf a0 save %sp, -96, %sp int status; status = sigtimedwait( set, NULL, NULL ); 200878c: 92 10 20 00 clr %o1 2008790: 90 10 00 18 mov %i0, %o0 2008794: 7f ff ff 8b call 20085c0 2008798: 94 10 20 00 clr %o2 if ( status != -1 ) { 200879c: 80 a2 3f ff cmp %o0, -1 20087a0: 02 80 00 07 be 20087bc 20087a4: 80 a6 60 00 cmp %i1, 0 if ( sig ) 20087a8: 02 80 00 03 be 20087b4 <== NEVER TAKEN 20087ac: b0 10 20 00 clr %i0 *sig = status; 20087b0: d0 26 40 00 st %o0, [ %i1 ] 20087b4: 81 c7 e0 08 ret 20087b8: 81 e8 00 00 restore return 0; } return errno; 20087bc: 40 00 25 a6 call 2011e54 <__errno> 20087c0: 01 00 00 00 nop 20087c4: f0 02 00 00 ld [ %o0 ], %i0 } 20087c8: 81 c7 e0 08 ret 20087cc: 81 e8 00 00 restore =============================================================================== 02003f74 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2003f74: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2003f78: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2003f7c: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 2003f80: 02 80 00 0e be 2003fb8 <== NOT EXECUTED 2003f84: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2003f88: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED 2003f8c: 94 10 20 00 clr %o2 <== NOT EXECUTED 2003f90: 40 00 06 b9 call 2005a74 <== NOT EXECUTED 2003f94: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 2003f98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2003f9c: 7f ff ff 7f call 2003d98 <== NOT EXECUTED 2003fa0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2003fa4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2003fa8: 40 00 06 fa call 2005b90 <== NOT EXECUTED 2003fac: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2003fb0: 81 c7 e0 08 ret <== NOT EXECUTED 2003fb4: 81 e8 00 00 restore <== 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); 2003fb8: 7f ff ff 78 call 2003d98 <== NOT EXECUTED 2003fbc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02004f04 : int _STAT_NAME( const char *path, struct stat *buf ) { 2004f04: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2004f08: 80 a6 60 00 cmp %i1, 0 2004f0c: 12 80 00 06 bne 2004f24 2004f10: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 2004f14: 40 00 32 8f call 2011950 <__errno> 2004f18: b0 10 3f ff mov -1, %i0 ! ffffffff 2004f1c: 10 80 00 20 b 2004f9c 2004f20: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, strlen( path ), 2004f24: 40 00 39 73 call 20134f0 2004f28: 90 10 00 18 mov %i0, %o0 2004f2c: a0 07 bf ec add %fp, -20, %l0 2004f30: 92 10 00 08 mov %o0, %o1 2004f34: 94 10 20 00 clr %o2 2004f38: 90 10 00 18 mov %i0, %o0 2004f3c: 96 10 00 10 mov %l0, %o3 2004f40: 98 10 20 01 mov 1, %o4 2004f44: 7f ff f9 96 call 200359c 2004f48: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 2004f4c: 80 a2 20 00 cmp %o0, 0 2004f50: 12 80 00 14 bne 2004fa0 2004f54: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 2004f58: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2004f5c: 80 a0 60 00 cmp %g1, 0 2004f60: 12 80 00 12 bne 2004fa8 <== ALWAYS TAKEN 2004f64: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 2004f68: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 2004f6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004f70: 02 80 00 08 be 2004f90 <== NOT EXECUTED 2004f74: 01 00 00 00 nop <== NOT EXECUTED 2004f78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2004f7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004f80: 02 80 00 04 be 2004f90 <== NOT EXECUTED 2004f84: 01 00 00 00 nop <== NOT EXECUTED 2004f88: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004f8c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004f90: 40 00 32 70 call 2011950 <__errno> <== NOT EXECUTED 2004f94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004f98: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2004f9c: c2 22 00 00 st %g1, [ %o0 ] 2004fa0: 81 c7 e0 08 ret 2004fa4: 81 e8 00 00 restore /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 2004fa8: 94 10 20 48 mov 0x48, %o2 2004fac: 40 00 37 51 call 2012cf0 2004fb0: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 2004fb4: c2 07 bf f4 ld [ %fp + -12 ], %g1 2004fb8: 92 10 00 19 mov %i1, %o1 2004fbc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2004fc0: 9f c0 40 00 call %g1 2004fc4: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2004fc8: c2 07 bf f8 ld [ %fp + -8 ], %g1 2004fcc: 80 a0 60 00 cmp %g1, 0 2004fd0: 02 bf ff f4 be 2004fa0 <== NEVER TAKEN 2004fd4: b0 10 00 08 mov %o0, %i0 2004fd8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2004fdc: 80 a0 60 00 cmp %g1, 0 2004fe0: 02 80 00 04 be 2004ff0 <== NEVER TAKEN 2004fe4: 01 00 00 00 nop 2004fe8: 9f c0 40 00 call %g1 2004fec: 90 10 00 10 mov %l0, %o0 return status; } 2004ff0: 81 c7 e0 08 ret 2004ff4: 81 e8 00 00 restore =============================================================================== 0200caa4 : int symlink( const char *actualpath, const char *sympath ) { 200caa4: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 200caa8: c2 4e 40 00 ldsb [ %i1 ], %g1 200caac: 80 a0 60 5c cmp %g1, 0x5c 200cab0: 02 80 00 08 be 200cad0 <== NEVER TAKEN 200cab4: a0 10 00 18 mov %i0, %l0 200cab8: 80 a0 60 2f cmp %g1, 0x2f 200cabc: 22 80 00 06 be,a 200cad4 200cac0: 03 00 80 91 sethi %hi(0x2024400), %g1 200cac4: 80 a0 60 00 cmp %g1, 0 200cac8: 12 80 00 0a bne 200caf0 <== ALWAYS TAKEN 200cacc: 03 00 80 91 sethi %hi(0x2024400), %g1 200cad0: 03 00 80 91 sethi %hi(0x2024400), %g1 <== NOT EXECUTED 200cad4: d2 00 63 a8 ld [ %g1 + 0x3a8 ], %o1 ! 20247a8 200cad8: 90 07 bf e8 add %fp, -24, %o0 200cadc: 92 02 60 18 add %o1, 0x18, %o1 200cae0: 40 00 16 01 call 20122e4 200cae4: 94 10 20 14 mov 0x14, %o2 200cae8: 10 80 00 08 b 200cb08 200caec: 90 10 20 01 mov 1, %o0 200caf0: d2 00 63 a8 ld [ %g1 + 0x3a8 ], %o1 200caf4: 90 07 bf e8 add %fp, -24, %o0 200caf8: 92 02 60 04 add %o1, 4, %o1 200cafc: 40 00 15 fa call 20122e4 200cb00: 94 10 20 14 mov 0x14, %o2 200cb04: 90 10 20 00 clr %o0 if ( !loc.ops->evalformake_h ) { 200cb08: c2 07 bf f4 ld [ %fp + -12 ], %g1 200cb0c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200cb10: 80 a0 60 00 cmp %g1, 0 200cb14: 02 80 00 14 be 200cb64 <== NEVER TAKEN 200cb18: 90 06 40 08 add %i1, %o0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 200cb1c: 94 07 bf fc add %fp, -4, %o2 200cb20: b2 07 bf e8 add %fp, -24, %i1 if ( result != 0 ) 200cb24: b0 10 3f ff mov -1, %i0 if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 200cb28: 9f c0 40 00 call %g1 200cb2c: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) 200cb30: 80 a2 20 00 cmp %o0, 0 200cb34: 12 80 00 10 bne 200cb74 200cb38: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 200cb3c: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 200cb40: 80 a0 60 00 cmp %g1, 0 200cb44: 12 80 00 0e bne 200cb7c <== ALWAYS TAKEN 200cb48: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &loc ); 200cb4c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 200cb50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200cb54: 02 80 00 04 be 200cb64 <== NOT EXECUTED 200cb58: 01 00 00 00 nop <== NOT EXECUTED 200cb5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 200cb60: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 200cb64: 40 00 11 3d call 2011058 <__errno> <== NOT EXECUTED 200cb68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200cb6c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200cb70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200cb74: 81 c7 e0 08 ret 200cb78: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 200cb7c: 92 10 00 10 mov %l0, %o1 200cb80: 9f c0 40 00 call %g1 200cb84: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 200cb88: c2 07 bf f4 ld [ %fp + -12 ], %g1 200cb8c: 80 a0 60 00 cmp %g1, 0 200cb90: 02 bf ff f9 be 200cb74 <== NEVER TAKEN 200cb94: b0 10 00 08 mov %o0, %i0 200cb98: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200cb9c: 80 a0 60 00 cmp %g1, 0 200cba0: 02 80 00 04 be 200cbb0 <== NEVER TAKEN 200cba4: 01 00 00 00 nop 200cba8: 9f c0 40 00 call %g1 200cbac: 90 10 00 19 mov %i1, %o0 return result; } 200cbb0: 81 c7 e0 08 ret 200cbb4: 81 e8 00 00 restore =============================================================================== 02005010 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 2005010: 9d e3 bf a0 save %sp, -96, %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; 2005014: c4 06 21 64 ld [ %i0 + 0x164 ], %g2 if ( this_reent ) { 2005018: 80 a0 a0 00 cmp %g2, 0 200501c: 02 80 00 0b be 2005048 <== NEVER TAKEN 2005020: 21 00 80 7f sethi %hi(0x201fc00), %l0 current_reent = _Thread_Executing->libc_reent; 2005024: c2 04 22 60 ld [ %l0 + 0x260 ], %g1 ! 201fe60 <_Thread_Executing> _Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper); 2005028: 13 00 80 14 sethi %hi(0x2005000), %o1 * 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 ) { current_reent = _Thread_Executing->libc_reent; 200502c: e2 00 61 64 ld [ %g1 + 0x164 ], %l1 _Thread_Executing->libc_reent = this_reent; 2005030: c4 20 61 64 st %g2, [ %g1 + 0x164 ] _fwalk (t->libc_reent, sync_wrapper); 2005034: d0 06 21 64 ld [ %i0 + 0x164 ], %o0 2005038: 40 00 36 37 call 2012914 <_fwalk> 200503c: 92 12 60 78 or %o1, 0x78, %o1 _Thread_Executing->libc_reent = current_reent; 2005040: c2 04 22 60 ld [ %l0 + 0x260 ], %g1 2005044: e2 20 61 64 st %l1, [ %g1 + 0x164 ] 2005048: 81 c7 e0 08 ret 200504c: 81 e8 00 00 restore =============================================================================== 020055ec : */ long sysconf( int name ) { 20055ec: 9d e3 bf a0 save %sp, -96, %sp if ( name == _SC_CLK_TCK ) 20055f0: 80 a6 20 02 cmp %i0, 2 20055f4: 12 80 00 09 bne 2005618 20055f8: 80 a6 20 04 cmp %i0, 4 return (TOD_MICROSECONDS_PER_SECOND / 20055fc: 03 00 80 71 sethi %hi(0x201c400), %g1 2005600: d2 00 61 58 ld [ %g1 + 0x158 ], %o1 ! 201c558 2005604: 11 00 03 d0 sethi %hi(0xf4000), %o0 2005608: 40 00 4e 0c call 2018e38 <.udiv> 200560c: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 2005610: 81 c7 e0 08 ret 2005614: 91 e8 00 08 restore %g0, %o0, %o0 rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 2005618: 12 80 00 05 bne 200562c 200561c: 80 a6 20 33 cmp %i0, 0x33 return rtems_libio_number_iops; 2005620: 03 00 80 71 sethi %hi(0x201c400), %g1 2005624: 10 80 00 0f b 2005660 2005628: d0 00 60 74 ld [ %g1 + 0x74 ], %o0 ! 201c474 if ( name == _SC_GETPW_R_SIZE_MAX ) 200562c: 02 80 00 0d be 2005660 2005630: 90 10 24 00 mov 0x400, %o0 return 1024; if ( name == _SC_PAGESIZE ) 2005634: 80 a6 20 08 cmp %i0, 8 2005638: 02 80 00 0a be 2005660 200563c: 90 02 2c 00 add %o0, 0xc00, %o0 return PAGE_SIZE; #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ 2005640: 80 a6 22 03 cmp %i0, 0x203 2005644: 02 80 00 07 be 2005660 <== NEVER TAKEN 2005648: 90 10 20 00 clr %o0 return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 200564c: 40 00 27 77 call 200f428 <__errno> 2005650: 01 00 00 00 nop 2005654: 82 10 20 16 mov 0x16, %g1 ! 16 2005658: c2 22 00 00 st %g1, [ %o0 ] 200565c: 90 10 3f ff mov -1, %o0 } 2005660: b0 10 00 08 mov %o0, %i0 2005664: 81 c7 e0 08 ret 2005668: 81 e8 00 00 restore =============================================================================== 020046e8 : int tcsetattr( int fd, int opt, struct termios *tp ) { 20046e8: 9d e3 bf a0 save %sp, -96, %sp switch (opt) { 20046ec: 80 a6 60 00 cmp %i1, 0 20046f0: 02 80 00 10 be 2004730 <== ALWAYS TAKEN 20046f4: 80 a6 60 01 cmp %i1, 1 20046f8: 02 80 00 08 be 2004718 <== NOT EXECUTED 20046fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004700: 40 00 2f 6f call 20104bc <__errno> <== NOT EXECUTED 2004704: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004708: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200470c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004710: 81 c7 e0 08 ret <== NOT EXECUTED 2004714: 81 e8 00 00 restore <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 2004718: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 200471c: 40 00 1f cd call 200c650 <== NOT EXECUTED 2004720: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004724: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004728: 26 80 00 04 bl,a 2004738 <== NOT EXECUTED 200472c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 2004730: 40 00 1f c8 call 200c650 2004734: 93 e8 20 02 restore %g0, 2, %o1 } } 2004738: 81 c7 e0 08 ret <== NOT EXECUTED 200473c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02005958 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 2005958: 9d e3 bf a0 save %sp, -96, %sp POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 200595c: 80 a6 20 01 cmp %i0, 1 2005960: 12 80 00 13 bne 20059ac 2005964: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 2005968: 02 80 00 11 be 20059ac 200596c: 80 a6 60 00 cmp %i1, 0 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 2005970: 02 80 00 13 be 20059bc 2005974: 03 00 80 80 sethi %hi(0x2020000), %g1 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 2005978: c2 06 40 00 ld [ %i1 ], %g1 200597c: 82 00 7f ff add %g1, -1, %g1 2005980: 80 a0 60 01 cmp %g1, 1 2005984: 18 80 00 0a bgu 20059ac <== NEVER TAKEN 2005988: 01 00 00 00 nop ( 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 ) 200598c: c2 06 60 04 ld [ %i1 + 4 ], %g1 2005990: 80 a0 60 00 cmp %g1, 0 2005994: 02 80 00 06 be 20059ac <== NEVER TAKEN 2005998: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 200599c: 82 00 7f ff add %g1, -1, %g1 20059a0: 80 a0 60 1f cmp %g1, 0x1f 20059a4: 28 80 00 06 bleu,a 20059bc <== ALWAYS TAKEN 20059a8: 03 00 80 80 sethi %hi(0x2020000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 20059ac: 40 00 27 fa call 200f994 <__errno> 20059b0: 01 00 00 00 nop 20059b4: 10 80 00 10 b 20059f4 20059b8: 82 10 20 16 mov 0x16, %g1 ! 16 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20059bc: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 20059c0: 84 00 a0 01 inc %g2 20059c4: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] * 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 ); 20059c8: 11 00 80 81 sethi %hi(0x2020400), %o0 20059cc: 40 00 07 c1 call 20078d0 <_Objects_Allocate> 20059d0: 90 12 23 00 or %o0, 0x300, %o0 ! 2020700 <_POSIX_Timer_Information> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 20059d4: 80 a2 20 00 cmp %o0, 0 20059d8: 12 80 00 0a bne 2005a00 20059dc: 82 10 20 02 mov 2, %g1 _Thread_Enable_dispatch(); 20059e0: 40 00 0b 36 call 20086b8 <_Thread_Enable_dispatch> 20059e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EAGAIN ); 20059e8: 40 00 27 eb call 200f994 <__errno> 20059ec: 01 00 00 00 nop 20059f0: 82 10 20 0b mov 0xb, %g1 ! b 20059f4: c2 22 00 00 st %g1, [ %o0 ] 20059f8: 81 c7 e0 08 ret 20059fc: 91 e8 3f ff restore %g0, -1, %o0 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 2005a00: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ] ptimer->thread_id = _Thread_Executing->Object.id; 2005a04: 03 00 80 81 sethi %hi(0x2020400), %g1 2005a08: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 2020470 <_Thread_Executing> if ( evp != NULL ) { 2005a0c: 80 a6 60 00 cmp %i1, 0 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; 2005a10: c2 00 60 08 ld [ %g1 + 8 ], %g1 if ( evp != NULL ) { 2005a14: 02 80 00 08 be 2005a34 2005a18: c2 22 20 38 st %g1, [ %o0 + 0x38 ] ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 2005a1c: c2 06 60 08 ld [ %i1 + 8 ], %g1 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 2005a20: c6 06 40 00 ld [ %i1 ], %g3 ptimer->inf.sigev_signo = evp->sigev_signo; 2005a24: c4 06 60 04 ld [ %i1 + 4 ], %g2 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 2005a28: c6 22 20 40 st %g3, [ %o0 + 0x40 ] ptimer->inf.sigev_signo = evp->sigev_signo; 2005a2c: c4 22 20 44 st %g2, [ %o0 + 0x44 ] ptimer->inf.sigev_value = evp->sigev_value; 2005a30: c2 22 20 48 st %g1, [ %o0 + 0x48 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005a34: c2 12 20 0a lduh [ %o0 + 0xa ], %g1 2005a38: 05 00 80 81 sethi %hi(0x2020400), %g2 2005a3c: c4 00 a3 1c ld [ %g2 + 0x31c ], %g2 ! 202071c <_POSIX_Timer_Information+0x1c> 2005a40: 83 28 60 02 sll %g1, 2, %g1 2005a44: d0 20 80 01 st %o0, [ %g2 + %g1 ] 2005a48: c2 02 20 08 ld [ %o0 + 8 ], %g1 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 2005a4c: c0 22 20 0c clr [ %o0 + 0xc ] } ptimer->overrun = 0; 2005a50: c0 22 20 68 clr [ %o0 + 0x68 ] ptimer->timer_data.it_value.tv_sec = 0; 2005a54: c0 22 20 5c clr [ %o0 + 0x5c ] ptimer->timer_data.it_value.tv_nsec = 0; 2005a58: c0 22 20 60 clr [ %o0 + 0x60 ] ptimer->timer_data.it_interval.tv_sec = 0; 2005a5c: c0 22 20 54 clr [ %o0 + 0x54 ] ptimer->timer_data.it_interval.tv_nsec = 0; 2005a60: c0 22 20 58 clr [ %o0 + 0x58 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 2005a64: c0 22 20 30 clr [ %o0 + 0x30 ] _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 2005a68: c2 26 80 00 st %g1, [ %i2 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2005a6c: c0 22 20 18 clr [ %o0 + 0x18 ] the_watchdog->routine = routine; 2005a70: c0 22 20 2c clr [ %o0 + 0x2c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2005a74: c0 22 20 34 clr [ %o0 + 0x34 ] _Thread_Enable_dispatch(); 2005a78: 40 00 0b 10 call 20086b8 <_Thread_Enable_dispatch> 2005a7c: b0 10 20 00 clr %i0 return 0; } 2005a80: 81 c7 e0 08 ret 2005a84: 81 e8 00 00 restore =============================================================================== 02005a88 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 2005a88: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 2005a8c: 80 a6 a0 00 cmp %i2, 0 2005a90: 02 80 00 20 be 2005b10 <== NEVER TAKEN 2005a94: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 2005a98: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 2005a9c: 82 10 61 ff or %g1, 0x1ff, %g1 2005aa0: 80 a0 80 01 cmp %g2, %g1 2005aa4: 18 80 00 1b bgu 2005b10 2005aa8: 01 00 00 00 nop ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 2005aac: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2005ab0: 80 a0 80 01 cmp %g2, %g1 2005ab4: 18 80 00 17 bgu 2005b10 <== NEVER TAKEN 2005ab8: 80 a6 60 00 cmp %i1, 0 ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 2005abc: 02 80 00 05 be 2005ad0 2005ac0: 90 07 bf e4 add %fp, -28, %o0 2005ac4: 80 a6 60 04 cmp %i1, 4 2005ac8: 12 80 00 12 bne 2005b10 2005acc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 2005ad0: 92 10 00 1a mov %i2, %o1 2005ad4: 40 00 2a 06 call 20102ec 2005ad8: 94 10 20 10 mov 0x10, %o2 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 2005adc: 80 a6 60 04 cmp %i1, 4 2005ae0: 12 80 00 16 bne 2005b38 2005ae4: 92 10 00 18 mov %i0, %o1 struct timespec now; _TOD_Get( &now ); 2005ae8: a0 07 bf f4 add %fp, -12, %l0 2005aec: 40 00 06 18 call 200734c <_TOD_Get> 2005af0: 90 10 00 10 mov %l0, %o0 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 2005af4: b2 07 bf ec add %fp, -20, %i1 2005af8: 90 10 00 10 mov %l0, %o0 2005afc: 40 00 0e 9b call 2009568 <_Timespec_Greater_than> 2005b00: 92 10 00 19 mov %i1, %o1 2005b04: 80 8a 20 ff btst 0xff, %o0 2005b08: 02 80 00 08 be 2005b28 2005b0c: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 2005b10: 40 00 27 a1 call 200f994 <__errno> 2005b14: b0 10 3f ff mov -1, %i0 2005b18: 82 10 20 16 mov 0x16, %g1 2005b1c: c2 22 00 00 st %g1, [ %o0 ] 2005b20: 81 c7 e0 08 ret 2005b24: 81 e8 00 00 restore _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 2005b28: 90 10 00 10 mov %l0, %o0 2005b2c: 40 00 0e a0 call 20095ac <_Timespec_Subtract> 2005b30: 94 10 00 19 mov %i1, %o2 RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 2005b34: 92 10 00 18 mov %i0, %o1 2005b38: 11 00 80 81 sethi %hi(0x2020400), %o0 2005b3c: 94 07 bf fc add %fp, -4, %o2 2005b40: 40 00 08 a3 call 2007dcc <_Objects_Get> 2005b44: 90 12 23 00 or %o0, 0x300, %o0 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 2005b48: c2 07 bf fc ld [ %fp + -4 ], %g1 2005b4c: 80 a0 60 00 cmp %g1, 0 2005b50: 12 80 00 38 bne 2005c30 2005b54: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 2005b58: c2 07 bf ec ld [ %fp + -20 ], %g1 2005b5c: 80 a0 60 00 cmp %g1, 0 2005b60: 12 80 00 14 bne 2005bb0 2005b64: c2 07 bf f0 ld [ %fp + -16 ], %g1 2005b68: 80 a0 60 00 cmp %g1, 0 2005b6c: 12 80 00 11 bne 2005bb0 2005b70: 01 00 00 00 nop /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 2005b74: 40 00 0f cc call 2009aa4 <_Watchdog_Remove> 2005b78: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 2005b7c: 80 a6 e0 00 cmp %i3, 0 2005b80: 02 80 00 05 be 2005b94 2005b84: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 2005b88: 92 04 20 54 add %l0, 0x54, %o1 2005b8c: 40 00 29 d8 call 20102ec 2005b90: 94 10 20 10 mov 0x10, %o2 /* The new data are set */ ptimer->timer_data = normalize; 2005b94: 92 07 bf e4 add %fp, -28, %o1 2005b98: 94 10 20 10 mov 0x10, %o2 2005b9c: 40 00 29 d4 call 20102ec 2005ba0: 90 04 20 54 add %l0, 0x54, %o0 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 2005ba4: 82 10 20 04 mov 4, %g1 2005ba8: 10 80 00 1e b 2005c20 2005bac: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 2005bb0: 40 00 0e 93 call 20095fc <_Timespec_To_ticks> 2005bb4: 90 10 00 1a mov %i2, %o0 2005bb8: d0 24 20 64 st %o0, [ %l0 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 2005bbc: 40 00 0e 90 call 20095fc <_Timespec_To_ticks> 2005bc0: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 2005bc4: d4 04 20 08 ld [ %l0 + 8 ], %o2 return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); initial_period = _Timespec_To_ticks( &normalize.it_value ); 2005bc8: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 2005bcc: 17 00 80 17 sethi %hi(0x2005c00), %o3 2005bd0: 90 04 20 10 add %l0, 0x10, %o0 2005bd4: 96 12 e0 48 or %o3, 0x48, %o3 2005bd8: 40 00 1a 50 call 200c518 <_POSIX_Timer_Insert_helper> 2005bdc: 98 10 00 10 mov %l0, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 2005be0: 80 8a 20 ff btst 0xff, %o0 2005be4: 02 80 00 0f be 2005c20 2005be8: 80 a6 e0 00 cmp %i3, 0 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 2005bec: 02 80 00 05 be 2005c00 2005bf0: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 2005bf4: 92 04 20 54 add %l0, 0x54, %o1 2005bf8: 40 00 29 bd call 20102ec 2005bfc: 94 10 20 10 mov 0x10, %o2 ptimer->timer_data = normalize; 2005c00: 92 07 bf e4 add %fp, -28, %o1 2005c04: 94 10 20 10 mov 0x10, %o2 2005c08: 40 00 29 b9 call 20102ec 2005c0c: 90 04 20 54 add %l0, 0x54, %o0 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2005c10: 82 10 20 03 mov 3, %g1 _TOD_Get( &ptimer->time ); 2005c14: 90 04 20 6c add %l0, 0x6c, %o0 2005c18: 40 00 05 cd call 200734c <_TOD_Get> 2005c1c: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] _Thread_Enable_dispatch(); 2005c20: 40 00 0a a6 call 20086b8 <_Thread_Enable_dispatch> 2005c24: b0 10 20 00 clr %i0 return 0; 2005c28: 81 c7 e0 08 ret 2005c2c: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2005c30: 40 00 27 59 call 200f994 <__errno> 2005c34: b0 10 3f ff mov -1, %i0 2005c38: 82 10 20 16 mov 0x16, %g1 2005c3c: c2 22 00 00 st %g1, [ %o0 ] } 2005c40: 81 c7 e0 08 ret 2005c44: 81 e8 00 00 restore =============================================================================== 0200585c : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 200585c: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 2005860: 21 00 80 78 sethi %hi(0x201e000), %l0 2005864: a0 14 22 7c or %l0, 0x27c, %l0 ! 201e27c <_POSIX_signals_Ualarm_timer> 2005868: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 200586c: 80 a0 60 00 cmp %g1, 0 2005870: 12 80 00 0a bne 2005898 2005874: a2 10 00 18 mov %i0, %l1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005878: 03 00 80 16 sethi %hi(0x2005800), %g1 the_watchdog->id = id; the_watchdog->user_data = user_data; 200587c: c0 24 20 24 clr [ %l0 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2005880: 82 10 61 70 or %g1, 0x170, %g1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2005884: c0 24 20 08 clr [ %l0 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 2005888: c0 24 20 20 clr [ %l0 + 0x20 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 200588c: c2 24 20 1c st %g1, [ %l0 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2005890: 10 80 00 1b b 20058fc 2005894: b0 10 20 00 clr %i0 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 2005898: 40 00 0f 5d call 200960c <_Watchdog_Remove> 200589c: 90 10 00 10 mov %l0, %o0 if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 20058a0: 90 02 3f fe add %o0, -2, %o0 20058a4: 80 a2 20 01 cmp %o0, 1 20058a8: 18 80 00 15 bgu 20058fc <== NEVER TAKEN 20058ac: b0 10 20 00 clr %i0 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 20058b0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 * 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); 20058b4: c4 04 20 0c ld [ %l0 + 0xc ], %g2 20058b8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 20058bc: 92 07 bf f8 add %fp, -8, %o1 * 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); 20058c0: 90 02 00 02 add %o0, %g2, %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 20058c4: 40 00 0d d8 call 2009024 <_Timespec_From_ticks> 20058c8: 90 22 00 01 sub %o0, %g1, %o0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 20058cc: c2 07 bf f8 ld [ %fp + -8 ], %g1 remaining += tp.tv_nsec / 1000; 20058d0: d0 07 bf fc ld [ %fp + -4 ], %o0 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 20058d4: b1 28 60 08 sll %g1, 8, %i0 20058d8: 85 28 60 03 sll %g1, 3, %g2 20058dc: 84 26 00 02 sub %i0, %g2, %g2 remaining += tp.tv_nsec / 1000; 20058e0: 92 10 23 e8 mov 0x3e8, %o1 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 20058e4: b1 28 a0 06 sll %g2, 6, %i0 20058e8: b0 26 00 02 sub %i0, %g2, %i0 remaining += tp.tv_nsec / 1000; 20058ec: 40 00 50 ec call 2019c9c <.div> 20058f0: b0 06 00 01 add %i0, %g1, %i0 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 20058f4: b1 2e 20 06 sll %i0, 6, %i0 remaining += tp.tv_nsec / 1000; 20058f8: b0 02 00 18 add %o0, %i0, %i0 /* * 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 ) { 20058fc: 80 a4 60 00 cmp %l1, 0 2005900: 02 80 00 1a be 2005968 2005904: 21 00 03 d0 sethi %hi(0xf4000), %l0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 2005908: 90 10 00 11 mov %l1, %o0 200590c: 40 00 50 e2 call 2019c94 <.udiv> 2005910: 92 14 22 40 or %l0, 0x240, %o1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 2005914: 92 14 22 40 or %l0, 0x240, %o1 * 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; 2005918: d0 27 bf f8 st %o0, [ %fp + -8 ] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 200591c: 40 00 51 8a call 2019f44 <.urem> 2005920: 90 10 00 11 mov %l1, %o0 2005924: 85 2a 20 07 sll %o0, 7, %g2 2005928: 83 2a 20 02 sll %o0, 2, %g1 200592c: 82 20 80 01 sub %g2, %g1, %g1 2005930: 90 00 40 08 add %g1, %o0, %o0 2005934: 91 2a 20 03 sll %o0, 3, %o0 ticks = _Timespec_To_ticks( &tp ); 2005938: a0 07 bf f8 add %fp, -8, %l0 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 200593c: d0 27 bf fc st %o0, [ %fp + -4 ] ticks = _Timespec_To_ticks( &tp ); 2005940: 40 00 0d e2 call 20090c8 <_Timespec_To_ticks> 2005944: 90 10 00 10 mov %l0, %o0 if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 2005948: 40 00 0d e0 call 20090c8 <_Timespec_To_ticks> 200594c: 90 10 00 10 mov %l0, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2005950: 13 00 80 78 sethi %hi(0x201e000), %o1 2005954: 92 12 62 7c or %o1, 0x27c, %o1 ! 201e27c <_POSIX_signals_Ualarm_timer> 2005958: d0 22 60 0c st %o0, [ %o1 + 0xc ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200595c: 11 00 80 76 sethi %hi(0x201d800), %o0 2005960: 40 00 0e ce call 2009498 <_Watchdog_Insert> 2005964: 90 12 22 50 or %o0, 0x250, %o0 ! 201da50 <_Watchdog_Ticks_chain> } return remaining; } 2005968: 81 c7 e0 08 ret 200596c: 81 e8 00 00 restore =============================================================================== 0200e56c : #include int unlink( const char *path ) { 200e56c: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 200e570: 7f ff cf bf call 200246c 200e574: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 200e578: a6 92 20 00 orcc %o0, 0, %l3 200e57c: 32 80 00 18 bne,a 200e5dc 200e580: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 200e584: c2 4e 00 00 ldsb [ %i0 ], %g1 200e588: 80 a0 60 5c cmp %g1, 0x5c 200e58c: 22 80 00 08 be,a 200e5ac <== NEVER TAKEN 200e590: 03 00 80 6c sethi %hi(0x201b000), %g1 <== NOT EXECUTED 200e594: 80 a0 60 2f cmp %g1, 0x2f 200e598: 22 80 00 05 be,a 200e5ac 200e59c: 03 00 80 6c sethi %hi(0x201b000), %g1 200e5a0: 80 a0 60 00 cmp %g1, 0 200e5a4: 12 80 00 06 bne 200e5bc <== ALWAYS TAKEN 200e5a8: 03 00 80 6c sethi %hi(0x201b000), %g1 200e5ac: d2 00 63 10 ld [ %g1 + 0x310 ], %o1 ! 201b310 200e5b0: 90 07 bf ec add %fp, -20, %o0 200e5b4: 10 80 00 05 b 200e5c8 200e5b8: 92 02 60 18 add %o1, 0x18, %o1 200e5bc: d2 00 63 10 ld [ %g1 + 0x310 ], %o1 200e5c0: 90 07 bf ec add %fp, -20, %o0 200e5c4: 92 02 60 04 add %o1, 4, %o1 200e5c8: 94 10 20 14 mov 0x14, %o2 200e5cc: 40 00 04 6d call 200f780 200e5d0: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 200e5d4: 10 80 00 0b b 200e600 200e5d8: 94 10 20 14 mov 0x14, %o2 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 200e5dc: 92 10 00 13 mov %l3, %o1 200e5e0: 94 10 20 02 mov 2, %o2 200e5e4: 96 07 bf ec add %fp, -20, %o3 200e5e8: 7f ff cf ef call 20025a4 200e5ec: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 200e5f0: 80 a2 20 00 cmp %o0, 0 200e5f4: 12 80 00 82 bne 200e7fc <== NEVER TAKEN 200e5f8: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 200e5fc: 94 10 20 14 mov 0x14, %o2 200e600: a0 07 bf d8 add %fp, -40, %l0 200e604: a4 07 bf ec add %fp, -20, %l2 200e608: 90 10 00 10 mov %l0, %o0 200e60c: 40 00 04 5d call 200f780 200e610: 92 10 00 12 mov %l2, %o1 name = path + parentpathlen; 200e614: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 200e618: 40 00 05 d6 call 200fd70 200e61c: 90 10 00 18 mov %i0, %o0 200e620: 92 10 00 08 mov %o0, %o1 200e624: 7f ff cf 81 call 2002428 200e628: 90 10 00 18 mov %i0, %o0 200e62c: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 200e630: 40 00 05 d0 call 200fd70 200e634: 90 10 00 18 mov %i0, %o0 200e638: 94 10 20 00 clr %o2 200e63c: 92 10 00 08 mov %o0, %o1 200e640: 96 10 00 10 mov %l0, %o3 200e644: 90 10 00 18 mov %i0, %o0 200e648: 7f ff cf 9b call 20024b4 200e64c: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 200e650: 80 a2 20 00 cmp %o0, 0 200e654: 02 80 00 11 be 200e698 200e658: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 200e65c: 80 8c 60 ff btst 0xff, %l1 200e660: 02 80 00 0c be 200e690 <== NEVER TAKEN 200e664: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 200e668: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e66c: 80 a0 60 00 cmp %g1, 0 200e670: 02 80 00 64 be 200e800 <== NEVER TAKEN 200e674: 01 00 00 00 nop 200e678: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200e67c: 80 a0 60 00 cmp %g1, 0 200e680: 02 80 00 04 be 200e690 <== NEVER TAKEN 200e684: 90 10 00 12 mov %l2, %o0 200e688: 9f c0 40 00 call %g1 200e68c: 01 00 00 00 nop 200e690: 81 c7 e0 08 ret 200e694: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 200e698: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200e69c: 80 a0 60 00 cmp %g1, 0 200e6a0: 22 80 00 26 be,a 200e738 <== NEVER TAKEN 200e6a4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== 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 ) { 200e6a8: 9f c0 40 00 call %g1 200e6ac: 90 10 00 10 mov %l0, %o0 200e6b0: 80 a2 20 01 cmp %o0, 1 200e6b4: 12 80 00 1c bne 200e724 200e6b8: c4 07 bf e4 ld [ %fp + -28 ], %g2 rtems_filesystem_freenode( &loc ); 200e6bc: 80 a0 a0 00 cmp %g2, 0 200e6c0: 02 80 00 09 be 200e6e4 <== NEVER TAKEN 200e6c4: 80 8c 60 ff btst 0xff, %l1 200e6c8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 200e6cc: 80 a0 60 00 cmp %g1, 0 200e6d0: 02 80 00 05 be 200e6e4 <== NEVER TAKEN 200e6d4: 80 8c 60 ff btst 0xff, %l1 200e6d8: 9f c0 40 00 call %g1 200e6dc: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 200e6e0: 80 8c 60 ff btst 0xff, %l1 200e6e4: 02 80 00 0c be 200e714 <== ALWAYS TAKEN 200e6e8: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 200e6ec: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200e6f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200e6f4: 02 80 00 08 be 200e714 <== NOT EXECUTED 200e6f8: 01 00 00 00 nop <== NOT EXECUTED 200e6fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200e700: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200e704: 02 80 00 04 be 200e714 <== NOT EXECUTED 200e708: 01 00 00 00 nop <== NOT EXECUTED 200e70c: 9f c0 40 00 call %g1 <== NOT EXECUTED 200e710: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 200e714: 40 00 01 df call 200ee90 <__errno> 200e718: b0 10 3f ff mov -1, %i0 200e71c: 10 80 00 1b b 200e788 200e720: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 200e724: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200e728: 80 a0 60 00 cmp %g1, 0 200e72c: 12 80 00 1a bne 200e794 <== ALWAYS TAKEN 200e730: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 200e734: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 200e738: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200e73c: 02 80 00 05 be 200e750 <== NOT EXECUTED 200e740: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 200e744: 9f c0 40 00 call %g1 <== NOT EXECUTED 200e748: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 200e74c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 200e750: 02 80 00 0b be 200e77c <== NOT EXECUTED 200e754: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 200e758: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200e75c: 02 80 00 08 be 200e77c <== NOT EXECUTED 200e760: 01 00 00 00 nop <== NOT EXECUTED 200e764: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200e768: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200e76c: 02 80 00 04 be 200e77c <== NOT EXECUTED 200e770: 01 00 00 00 nop <== NOT EXECUTED 200e774: 9f c0 40 00 call %g1 <== NOT EXECUTED 200e778: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 200e77c: 40 00 01 c5 call 200ee90 <__errno> <== NOT EXECUTED 200e780: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200e784: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200e788: c2 22 00 00 st %g1, [ %o0 ] 200e78c: 81 c7 e0 08 ret 200e790: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 200e794: 9f c0 40 00 call %g1 200e798: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 200e79c: c2 07 bf e4 ld [ %fp + -28 ], %g1 200e7a0: 80 a0 60 00 cmp %g1, 0 200e7a4: 02 80 00 08 be 200e7c4 <== NEVER TAKEN 200e7a8: b0 10 00 08 mov %o0, %i0 200e7ac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200e7b0: 80 a0 60 00 cmp %g1, 0 200e7b4: 02 80 00 05 be 200e7c8 <== NEVER TAKEN 200e7b8: 80 8c 60 ff btst 0xff, %l1 200e7bc: 9f c0 40 00 call %g1 200e7c0: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 200e7c4: 80 8c 60 ff btst 0xff, %l1 200e7c8: 02 bf ff b2 be 200e690 200e7cc: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 200e7d0: 80 a0 60 00 cmp %g1, 0 200e7d4: 02 80 00 0b be 200e800 <== NEVER TAKEN 200e7d8: 01 00 00 00 nop 200e7dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200e7e0: 80 a0 60 00 cmp %g1, 0 200e7e4: 02 80 00 07 be 200e800 <== NEVER TAKEN 200e7e8: 01 00 00 00 nop 200e7ec: 9f c0 40 00 call %g1 200e7f0: 90 07 bf ec add %fp, -20, %o0 200e7f4: 81 c7 e0 08 ret 200e7f8: 81 e8 00 00 restore 200e7fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 200e800: 81 c7 e0 08 ret <== NOT EXECUTED 200e804: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020095c8 : */ int unmount( const char *path ) { 20095c8: 9d e3 bf 88 save %sp, -120, %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 ) ) 20095cc: 40 00 37 e3 call 2017558 20095d0: 90 10 00 18 mov %i0, %o0 20095d4: a0 07 bf ec add %fp, -20, %l0 20095d8: 92 10 00 08 mov %o0, %o1 20095dc: 94 10 20 00 clr %o2 20095e0: 90 10 00 18 mov %i0, %o0 20095e4: 96 10 00 10 mov %l0, %o3 20095e8: 7f ff f0 9a call 2005850 20095ec: 98 10 20 01 mov 1, %o4 20095f0: 80 a2 20 00 cmp %o0, 0 20095f4: 12 80 00 6a bne 200979c 20095f8: e2 07 bf fc ld [ %fp + -4 ], %l1 return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 20095fc: c4 07 bf ec ld [ %fp + -20 ], %g2 2009600: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 2009604: 80 a0 c0 02 cmp %g3, %g2 2009608: 02 80 00 0f be 2009644 200960c: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * 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 ); 2009610: 80 a0 60 00 cmp %g1, 0 2009614: 02 80 00 08 be 2009634 <== NEVER TAKEN 2009618: 01 00 00 00 nop 200961c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2009620: 80 a0 60 00 cmp %g1, 0 2009624: 02 80 00 04 be 2009634 <== NEVER TAKEN 2009628: 01 00 00 00 nop 200962c: 9f c0 40 00 call %g1 2009630: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 2009634: 40 00 2a f6 call 201420c <__errno> 2009638: 01 00 00 00 nop 200963c: 10 80 00 21 b 20096c0 2009640: 82 10 20 0d mov 0xd, %g1 ! d /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 2009644: 80 a0 60 00 cmp %g1, 0 2009648: 22 80 00 09 be,a 200966c <== NEVER TAKEN 200964c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 2009650: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2009654: 80 a0 60 00 cmp %g1, 0 2009658: 22 80 00 05 be,a 200966c <== NEVER TAKEN 200965c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 2009660: 9f c0 40 00 call %g1 2009664: 90 10 00 10 mov %l0, %o0 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; 2009668: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 200966c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 2009670: 80 a0 60 00 cmp %g1, 0 2009674: 02 80 00 07 be 2009690 <== NEVER TAKEN 2009678: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 200967c: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 2009680: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 2009684: 80 a0 60 00 cmp %g1, 0 2009688: 32 80 00 06 bne,a 20096a0 <== ALWAYS TAKEN 200968c: 03 00 80 9a sethi %hi(0x2026800), %g1 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 ); 2009690: 40 00 2a df call 201420c <__errno> <== NOT EXECUTED 2009694: 01 00 00 00 nop <== NOT EXECUTED 2009698: 10 80 00 0a b 20096c0 <== NOT EXECUTED 200969c: 82 10 20 86 mov 0x86, %g1 ! 86 <== 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 ) 20096a0: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 20096a4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 20096a8: 80 a0 40 11 cmp %g1, %l1 20096ac: 12 80 00 08 bne 20096cc 20096b0: 03 00 80 9f sethi %hi(0x2027c00), %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 20096b4: 40 00 2a d6 call 201420c <__errno> 20096b8: 01 00 00 00 nop 20096bc: 82 10 20 10 mov 0x10, %g1 ! 10 20096c0: c2 22 00 00 st %g1, [ %o0 ] 20096c4: 81 c7 e0 08 ret 20096c8: 91 e8 3f ff restore %g0, -1, %o0 20096cc: 05 00 80 9f sethi %hi(0x2027c00), %g2 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 20096d0: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 20096d4: 10 80 00 07 b 20096f0 20096d8: 84 10 a1 0c or %g2, 0x10c, %g2 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; 20096dc: c6 04 60 2c ld [ %l1 + 0x2c ], %g3 20096e0: 80 a1 00 03 cmp %g4, %g3 20096e4: 02 bf ff f4 be 20096b4 20096e8: 01 00 00 00 nop * 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 ) { 20096ec: c2 00 40 00 ld [ %g1 ], %g1 20096f0: 80 a0 40 02 cmp %g1, %g2 20096f4: 32 bf ff fa bne,a 20096dc 20096f8: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 20096fc: 30 80 00 2a b,a 20097a4 * 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 ) 2009700: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 2009704: 9f c0 40 00 call %g1 2009708: 90 10 00 11 mov %l1, %o0 200970c: 80 a2 20 00 cmp %o0, 0 2009710: 12 80 00 23 bne 200979c <== NEVER TAKEN 2009714: 01 00 00 00 nop * 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){ 2009718: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 200971c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 2009720: 9f c0 40 00 call %g1 2009724: 90 10 00 11 mov %l1, %o0 2009728: 80 a2 20 00 cmp %o0, 0 200972c: 02 80 00 0b be 2009758 <== ALWAYS TAKEN 2009730: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 2009734: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 2009738: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 200973c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2009740: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2009744: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2009748: 02 80 00 15 be 200979c <== NOT EXECUTED 200974c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 2009750: 40 00 05 04 call 200ab60 <== NOT EXECUTED 2009754: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2009758: 40 00 05 e9 call 200aefc <_Chain_Extract> 200975c: 90 10 00 11 mov %l1, %o0 /* * 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 ); 2009760: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 2009764: 80 a0 60 00 cmp %g1, 0 2009768: 02 80 00 09 be 200978c <== NEVER TAKEN 200976c: 90 10 00 11 mov %l1, %o0 2009770: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2009774: 80 a0 60 00 cmp %g1, 0 2009778: 02 80 00 05 be 200978c <== NEVER TAKEN 200977c: 01 00 00 00 nop 2009780: 9f c0 40 00 call %g1 2009784: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 2009788: 90 10 00 11 mov %l1, %o0 200978c: 7f ff f0 5b call 20058f8 2009790: b0 10 20 00 clr %i0 return 0; 2009794: 81 c7 e0 08 ret 2009798: 81 e8 00 00 restore } 200979c: 81 c7 e0 08 ret 20097a0: 91 e8 3f ff restore %g0, -1, %o0 * 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 ) 20097a4: 7f ff f1 06 call 2005bbc 20097a8: 90 10 00 11 mov %l1, %o0 20097ac: 80 a2 20 01 cmp %o0, 1 20097b0: 32 bf ff d4 bne,a 2009700 20097b4: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 20097b8: 30 bf ff bf b,a 20096b4 =============================================================================== 02006e9c : int utime( const char *path, const struct utimbuf *times ) { 2006e9c: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 2006ea0: 40 00 31 94 call 20134f0 2006ea4: 90 10 00 18 mov %i0, %o0 2006ea8: a0 07 bf ec add %fp, -20, %l0 2006eac: 92 10 00 08 mov %o0, %o1 2006eb0: 94 10 20 00 clr %o2 2006eb4: 90 10 00 18 mov %i0, %o0 2006eb8: 96 10 00 10 mov %l0, %o3 2006ebc: 98 10 20 01 mov 1, %o4 2006ec0: 7f ff f1 b7 call 200359c 2006ec4: b0 10 3f ff mov -1, %i0 2006ec8: 80 a2 20 00 cmp %o0, 0 2006ecc: 12 80 00 10 bne 2006f0c 2006ed0: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 2006ed4: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 2006ed8: 80 a0 60 00 cmp %g1, 0 2006edc: 32 80 00 0e bne,a 2006f14 <== ALWAYS TAKEN 2006ee0: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 2006ee4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2006ee8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006eec: 02 80 00 04 be 2006efc <== NOT EXECUTED 2006ef0: 01 00 00 00 nop <== NOT EXECUTED 2006ef4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006ef8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2006efc: 40 00 2a 95 call 2011950 <__errno> <== NOT EXECUTED 2006f00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2006f04: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2006f08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2006f0c: 81 c7 e0 08 ret 2006f10: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 2006f14: d2 06 40 00 ld [ %i1 ], %o1 2006f18: 9f c0 40 00 call %g1 2006f1c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 2006f20: c2 07 bf f8 ld [ %fp + -8 ], %g1 2006f24: 80 a0 60 00 cmp %g1, 0 2006f28: 02 bf ff f9 be 2006f0c <== NEVER TAKEN 2006f2c: b0 10 00 08 mov %o0, %i0 2006f30: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006f34: 80 a0 60 00 cmp %g1, 0 2006f38: 02 80 00 04 be 2006f48 <== NEVER TAKEN 2006f3c: 01 00 00 00 nop 2006f40: 9f c0 40 00 call %g1 2006f44: 90 10 00 10 mov %l0, %o0 return result; } 2006f48: 81 c7 e0 08 ret 2006f4c: 81 e8 00 00 restore =============================================================================== 02005008 : */ void vprintk( const char *fmt, va_list ap ) { 2005008: 9d e3 bf 88 save %sp, -120, %sp unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 200500c: 23 00 80 6e sethi %hi(0x201b800), %l1 for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 2005010: 39 00 80 68 sethi %hi(0x201a000), %i4 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 2005014: 3b 00 80 68 sethi %hi(0x201a000), %i5 unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 2005018: a2 14 60 34 or %l1, 0x34, %l1 for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 200501c: b8 17 21 78 or %i4, 0x178, %i4 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 2005020: ba 17 61 70 or %i5, 0x170, %i5 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 2005024: 10 80 00 c4 b 2005334 2005028: ac 07 bf e8 add %fp, -24, %l6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 200502c: 32 80 00 88 bne,a 200524c 2005030: c2 04 40 00 ld [ %l1 ], %g1 BSP_output_char(*fmt); continue; } fmt++; 2005034: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 2005038: c2 4e 00 00 ldsb [ %i0 ], %g1 200503c: 80 a0 60 30 cmp %g1, 0x30 2005040: 12 80 00 05 bne 2005054 2005044: b6 10 20 20 mov 0x20, %i3 lead = '0'; fmt++; 2005048: b0 06 20 01 inc %i0 200504c: b6 10 20 30 mov 0x30, %i3 } if (*fmt == '-' ) { 2005050: c2 4e 00 00 ldsb [ %i0 ], %g1 2005054: 80 a0 60 2d cmp %g1, 0x2d 2005058: 12 80 00 04 bne 2005068 200505c: a8 10 20 00 clr %l4 minus = true; fmt++; 2005060: b0 06 20 01 inc %i0 2005064: a8 10 20 01 mov 1, %l4 2005068: 10 80 00 08 b 2005088 200506c: a0 10 20 00 clr %l0 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); 2005070: 83 38 60 18 sra %g1, 0x18, %g1 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 2005074: a1 2c 20 01 sll %l0, 1, %l0 width += ((unsigned) *fmt - '0'); 2005078: 82 00 7f d0 add %g1, -48, %g1 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 200507c: a0 04 00 02 add %l0, %g2, %l0 width += ((unsigned) *fmt - '0'); fmt++; 2005080: b0 06 20 01 inc %i0 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); 2005084: a0 00 40 10 add %g1, %l0, %l0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 2005088: d0 0e 00 00 ldub [ %i0 ], %o0 width *= 10; 200508c: 85 2c 20 03 sll %l0, 3, %g2 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 2005090: 82 02 3f d0 add %o0, -48, %g1 2005094: 82 08 60 ff and %g1, 0xff, %g1 2005098: 80 a0 60 09 cmp %g1, 9 200509c: 08 bf ff f5 bleu 2005070 20050a0: 83 2a 20 18 sll %o0, 0x18, %g1 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 20050a4: 83 38 60 18 sra %g1, 0x18, %g1 20050a8: 80 a0 60 6c cmp %g1, 0x6c 20050ac: 12 80 00 05 bne 20050c0 20050b0: 83 2a 20 18 sll %o0, 0x18, %g1 lflag = true; c = *++fmt; 20050b4: b0 06 20 01 inc %i0 20050b8: d0 0e 00 00 ldub [ %i0 ], %o0 } if ( c == 'c' ) { 20050bc: 83 2a 20 18 sll %o0, 0x18, %g1 20050c0: 83 38 60 18 sra %g1, 0x18, %g1 20050c4: 80 a0 60 63 cmp %g1, 0x63 20050c8: 12 80 00 08 bne 20050e8 20050cc: 80 a0 60 73 cmp %g1, 0x73 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 20050d0: d0 06 40 00 ld [ %i1 ], %o0 BSP_output_char(chr); 20050d4: c2 04 40 00 ld [ %l1 ], %g1 20050d8: 91 2a 20 18 sll %o0, 0x18, %o0 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); 20050dc: b2 06 60 04 add %i1, 4, %i1 BSP_output_char(chr); 20050e0: 10 80 00 5b b 200524c 20050e4: 91 3a 20 18 sra %o0, 0x18, %o0 continue; } if ( c == 's' ) { 20050e8: 12 80 00 33 bne 20051b4 20050ec: 80 a0 60 4f cmp %g1, 0x4f unsigned i, len; char *s, *str; str = va_arg(ap, char *); 20050f0: e6 06 40 00 ld [ %i1 ], %l3 if ( str == NULL ) { 20050f4: 80 a4 e0 00 cmp %l3, 0 20050f8: 12 80 00 03 bne 2005104 20050fc: b2 06 60 04 add %i1, 4, %i1 2005100: a6 10 00 1d mov %i5, %l3 2005104: a4 10 20 00 clr %l2 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2005108: c2 4c c0 12 ldsb [ %l3 + %l2 ], %g1 200510c: 80 a0 60 00 cmp %g1, 0 2005110: 32 bf ff fe bne,a 2005108 2005114: a4 04 a0 01 inc %l2 ; /* leading spaces */ if ( !minus ) 2005118: 80 8d 20 ff btst 0xff, %l4 200511c: 02 80 00 07 be 2005138 2005120: aa 10 00 12 mov %l2, %l5 for ( i=len ; i 2005128: 80 a4 20 00 cmp %l0, 0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 2005140: c2 04 40 00 ld [ %l1 ], %g1 BSP_output_char(' '); /* no width option */ if (width == 0) { 2005144: 80 a4 20 00 cmp %l0, 0 2005148: 22 80 00 02 be,a 2005150 200514c: a0 10 00 12 mov %l2, %l0 width = len; } /* output the string */ for ( i=0 ; i 2005158: 80 8d 20 ff btst 0xff, %l4 200515c: 10 80 00 06 b 2005174 2005160: d0 4c c0 00 ldsb [ %l3 ], %o0 BSP_output_char(*str); 2005164: c2 04 40 00 ld [ %l1 ], %g1 2005168: 9f c0 40 00 call %g1 200516c: 01 00 00 00 nop if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 200517c: a6 04 e0 01 inc %l3 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 2005180: 80 8d 20 ff btst 0xff, %l4 2005184: 12 80 00 08 bne 20051a4 2005188: 80 a4 80 10 cmp %l2, %l0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 200518c: 10 80 00 6a b 2005334 2005190: b0 06 20 01 inc %i0 for ( i=0 ; i 20051a8: c2 04 40 00 ld [ %l1 ], %g1 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 20051ac: 10 80 00 62 b 2005334 20051b0: b0 06 20 01 inc %i0 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 20051b4: 22 80 00 2a be,a 200525c 20051b8: 82 10 20 00 clr %g1 20051bc: 80 a0 60 6f cmp %g1, 0x6f 20051c0: 22 80 00 27 be,a 200525c <== NEVER TAKEN 20051c4: 82 10 20 00 clr %g1 <== NOT EXECUTED base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 20051c8: 80 a0 60 49 cmp %g1, 0x49 20051cc: 22 80 00 26 be,a 2005264 20051d0: 82 10 20 01 mov 1, %g1 20051d4: 80 a0 60 69 cmp %g1, 0x69 20051d8: 22 80 00 23 be,a 2005264 20051dc: 82 10 20 01 mov 1, %g1 20051e0: 80 a0 60 44 cmp %g1, 0x44 20051e4: 22 80 00 20 be,a 2005264 20051e8: 82 10 20 01 mov 1, %g1 20051ec: 80 a0 60 64 cmp %g1, 0x64 20051f0: 22 80 00 1d be,a 2005264 20051f4: 82 10 20 01 mov 1, %g1 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 20051f8: 80 a0 60 55 cmp %g1, 0x55 20051fc: 22 80 00 1a be,a 2005264 2005200: 82 10 20 00 clr %g1 2005204: 80 a0 60 75 cmp %g1, 0x75 2005208: 32 80 00 04 bne,a 2005218 200520c: 91 2a 20 18 sll %o0, 0x18, %o0 2005210: 10 80 00 15 b 2005264 2005214: 82 10 20 00 clr %g1 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 2005218: 91 3a 20 18 sra %o0, 0x18, %o0 200521c: 80 a2 20 58 cmp %o0, 0x58 2005220: 02 80 00 06 be 2005238 2005224: 82 10 20 00 clr %g1 2005228: 80 a2 20 78 cmp %o0, 0x78 200522c: 12 80 00 05 bne 2005240 2005230: 80 a2 20 70 cmp %o0, 0x70 2005234: 82 10 20 00 clr %g1 2005238: 10 80 00 0c b 2005268 200523c: a4 10 20 10 mov 0x10, %l2 base = 16; sign = false; } else if ( c == 'p' ) { 2005240: 02 80 00 0a be 2005268 2005244: a4 10 20 10 mov 0x10, %l2 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 2005248: c2 04 40 00 ld [ %l1 ], %g1 200524c: 9f c0 40 00 call %g1 2005250: b0 06 20 01 inc %i0 continue; 2005254: 10 80 00 39 b 2005338 2005258: d0 4e 00 00 ldsb [ %i0 ], %o0 200525c: 10 80 00 03 b 2005268 2005260: a4 10 20 08 mov 8, %l2 2005264: a4 10 20 0a mov 0xa, %l2 } printNum( 2005268: e8 06 40 00 ld [ %i1 ], %l4 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 200526c: 80 88 60 ff btst 0xff, %g1 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 2005270: b2 06 60 04 add %i1, 4, %i1 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 2005274: 02 80 00 0d be 20052a8 2005278: b6 0e e0 30 and %i3, 0x30, %i3 200527c: 80 a5 20 00 cmp %l4, 0 2005280: 36 80 00 12 bge,a 20052c8 2005284: a6 10 20 00 clr %l3 BSP_output_char('-'); 2005288: c2 04 40 00 ld [ %l1 ], %g1 200528c: 9f c0 40 00 call %g1 2005290: 90 10 20 2d mov 0x2d, %o0 unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 2005294: 82 1c 20 00 xor %l0, 0, %g1 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 2005298: a8 20 00 14 neg %l4 if (maxwidth) maxwidth--; 200529c: 80 a0 00 01 cmp %g0, %g1 20052a0: 82 40 20 00 addx %g0, 0, %g1 20052a4: a0 24 00 01 sub %l0, %g1, %l0 } else { unsigned_num = (unsigned long) num; 20052a8: 10 80 00 08 b 20052c8 20052ac: a6 10 20 00 clr %l3 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 20052b0: 40 00 4b f2 call 2018278 <.umul> 20052b4: 92 10 00 12 mov %l2, %o1 20052b8: 90 25 00 08 sub %l4, %o0, %o0 20052bc: a8 10 00 17 mov %l7, %l4 20052c0: d0 2d 80 13 stb %o0, [ %l6 + %l3 ] 20052c4: a6 10 00 15 mov %l5, %l3 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 20052c8: 90 10 00 14 mov %l4, %o0 20052cc: 92 10 00 12 mov %l2, %o1 20052d0: 40 00 4c 24 call 2018360 <.udiv> 20052d4: aa 04 e0 01 add %l3, 1, %l5 20052d8: ae 92 20 00 orcc %o0, 0, %l7 20052dc: 12 bf ff f5 bne 20052b0 20052e0: 82 07 80 13 add %fp, %l3, %g1 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 20052e4: 10 80 00 05 b 20052f8 20052e8: e8 28 7f e8 stb %l4, [ %g1 + -24 ] for (n=maxwidth ; n > count; n-- ) 20052ec: a0 04 3f ff add %l0, -1, %l0 BSP_output_char(lead); 20052f0: 9f c0 40 00 call %g1 20052f4: 90 10 00 1b mov %i3, %o0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 20052f8: 80 a4 00 15 cmp %l0, %l5 20052fc: 38 bf ff fc bgu,a 20052ec 2005300: c2 04 40 00 ld [ %l1 ], %g1 2005304: a6 05 80 13 add %l6, %l3, %l3 2005308: 10 80 00 07 b 2005324 200530c: a0 10 20 00 clr %l0 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 2005310: c2 04 40 00 ld [ %l1 ], %g1 2005314: d0 4f 00 02 ldsb [ %i4 + %g2 ], %o0 2005318: 9f c0 40 00 call %g1 200531c: a0 04 20 01 inc %l0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 2005320: a6 04 ff ff add %l3, -1, %l3 2005324: 80 a4 00 15 cmp %l0, %l5 2005328: 2a bf ff fa bcs,a 2005310 200532c: c4 4c c0 00 ldsb [ %l3 ], %g2 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 2005330: b0 06 20 01 inc %i0 2005334: d0 4e 00 00 ldsb [ %i0 ], %o0 2005338: 80 a2 20 00 cmp %o0, 0 200533c: 12 bf ff 3c bne 200502c 2005340: 80 a2 20 25 cmp %o0, 0x25 sign, width, lead ); } } 2005344: 81 c7 e0 08 ret 2005348: 81 e8 00 00 restore =============================================================================== 020196cc : ssize_t write( int fd, const void *buffer, size_t count ) { 20196cc: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 20196d0: 03 00 80 6c sethi %hi(0x201b000), %g1 20196d4: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 201b154 ssize_t write( int fd, const void *buffer, size_t count ) { 20196d8: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 20196dc: 80 a6 00 01 cmp %i0, %g1 20196e0: 1a 80 00 0c bcc 2019710 <== NEVER TAKEN 20196e4: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 20196e8: 03 00 80 6e sethi %hi(0x201b800), %g1 20196ec: e0 00 63 50 ld [ %g1 + 0x350 ], %l0 ! 201bb50 20196f0: 83 2e 20 06 sll %i0, 6, %g1 20196f4: b1 2e 20 03 sll %i0, 3, %i0 20196f8: b0 06 00 01 add %i0, %g1, %i0 20196fc: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 2019700: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2019704: 80 88 61 00 btst 0x100, %g1 2019708: 12 80 00 06 bne 2019720 <== ALWAYS TAKEN 201970c: 80 a6 60 00 cmp %i1, 0 2019710: 7f ff d5 e0 call 200ee90 <__errno> <== NOT EXECUTED 2019714: 01 00 00 00 nop <== NOT EXECUTED 2019718: 10 80 00 14 b 2019768 <== NOT EXECUTED 201971c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 2019720: 02 80 00 07 be 201973c <== NEVER TAKEN 2019724: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 2019728: 02 80 00 1c be 2019798 201972c: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2019730: 80 88 60 04 btst 4, %g1 2019734: 32 80 00 06 bne,a 201974c <== ALWAYS TAKEN 2019738: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 201973c: 7f ff d5 d5 call 200ee90 <__errno> <== NOT EXECUTED 2019740: 01 00 00 00 nop <== NOT EXECUTED 2019744: 10 80 00 09 b 2019768 <== NOT EXECUTED 2019748: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 201974c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2019750: 80 a0 60 00 cmp %g1, 0 2019754: 12 80 00 08 bne 2019774 <== ALWAYS TAKEN 2019758: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 201975c: 7f ff d5 cd call 200ee90 <__errno> <== NOT EXECUTED 2019760: 01 00 00 00 nop <== NOT EXECUTED 2019764: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2019768: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201976c: 10 80 00 0b b 2019798 <== NOT EXECUTED 2019770: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 2019774: 9f c0 40 00 call %g1 2019778: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 201977c: 80 a2 20 00 cmp %o0, 0 2019780: 04 80 00 06 ble 2019798 <== NEVER TAKEN 2019784: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 2019788: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 201978c: 86 83 40 08 addcc %o5, %o0, %g3 2019790: 84 43 00 02 addx %o4, %g2, %g2 2019794: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 2019798: 81 c7 e0 08 ret 201979c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02006d64 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 2006d64: 9d e3 bf a0 save %sp, -96, %sp int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 2006d68: 03 00 80 7f sethi %hi(0x201fc00), %g1 2006d6c: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 ! 201fd14 2006d70: 80 a6 00 01 cmp %i0, %g1 2006d74: 1a 80 00 0c bcc 2006da4 <== NEVER TAKEN 2006d78: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 2006d7c: 03 00 80 83 sethi %hi(0x2020c00), %g1 2006d80: e4 00 62 e4 ld [ %g1 + 0x2e4 ], %l2 ! 2020ee4 2006d84: 83 2e 20 06 sll %i0, 6, %g1 2006d88: b1 2e 20 03 sll %i0, 3, %i0 2006d8c: b0 06 00 01 add %i0, %g1, %i0 2006d90: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 2006d94: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 2006d98: 80 88 61 00 btst 0x100, %g1 2006d9c: 12 80 00 06 bne 2006db4 2006da0: 80 88 60 04 btst 4, %g1 2006da4: 40 00 2a 10 call 20115e4 <__errno> 2006da8: b0 10 3f ff mov -1, %i0 2006dac: 10 80 00 1f b 2006e28 2006db0: 82 10 20 09 mov 9, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2006db4: 02 80 00 1a be 2006e1c <== NEVER TAKEN 2006db8: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 2006dbc: 02 80 00 18 be 2006e1c 2006dc0: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 2006dc4: 04 80 00 16 ble 2006e1c 2006dc8: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 2006dcc: 14 80 00 14 bg 2006e1c <== NEVER TAKEN 2006dd0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 2006dd4: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 2006dd8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2006ddc: 80 a0 60 00 cmp %g1, 0 2006de0: 12 80 00 06 bne 2006df8 <== ALWAYS TAKEN 2006de4: 19 00 00 1f sethi %hi(0x7c00), %o4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 2006de8: 40 00 29 ff call 20115e4 <__errno> <== NOT EXECUTED 2006dec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2006df0: 10 80 00 0e b 2006e28 <== NOT EXECUTED 2006df4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2006df8: 82 10 00 19 mov %i1, %g1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 2006dfc: 98 13 23 ff or %o4, 0x3ff, %o4 if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2006e00: 84 10 20 01 mov 1, %g2 2006e04: 88 10 20 00 clr %g4 2006e08: 86 10 20 00 clr %g3 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 2006e0c: da 00 40 00 ld [ %g1 ], %o5 2006e10: 80 a3 60 00 cmp %o5, 0 2006e14: 12 80 00 08 bne 2006e34 2006e18: 88 01 20 01 inc %g4 rtems_set_errno_and_return_minus_one( EINVAL ); 2006e1c: 40 00 29 f2 call 20115e4 <__errno> 2006e20: b0 10 3f ff mov -1, %i0 2006e24: 82 10 20 16 mov 0x16, %g1 2006e28: c2 22 00 00 st %g1, [ %o0 ] 2006e2c: 81 c7 e0 08 ret 2006e30: 81 e8 00 00 restore if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 2006e34: da 00 60 04 ld [ %g1 + 4 ], %o5 * 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++ ) { 2006e38: 82 00 60 08 add %g1, 8, %g1 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 ) 2006e3c: 80 a0 00 0d cmp %g0, %o5 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 2006e40: 9a 00 c0 0d add %g3, %o5, %o5 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 ) 2006e44: 96 40 3f ff addx %g0, -1, %o3 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 2006e48: 80 a3 40 0c cmp %o5, %o4 2006e4c: 14 bf ff f4 bg 2006e1c <== NEVER TAKEN 2006e50: 84 08 80 0b and %g2, %o3, %g2 2006e54: 80 a3 40 03 cmp %o5, %g3 2006e58: 06 bf ff f1 bl 2006e1c 2006e5c: 80 a1 00 1a cmp %g4, %i2 * 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++ ) { 2006e60: 06 bf ff eb bl 2006e0c 2006e64: 86 10 00 0d mov %o5, %g3 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 2006e68: 80 88 a0 ff btst 0xff, %g2 2006e6c: a6 10 20 00 clr %l3 2006e70: 12 bf ff ef bne 2006e2c 2006e74: b0 10 20 00 clr %i0 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 2006e78: d4 06 60 04 ld [ %i1 + 4 ], %o2 2006e7c: 80 a2 a0 00 cmp %o2, 0 2006e80: 02 80 00 17 be 2006edc <== NEVER TAKEN 2006e84: a6 04 e0 01 inc %l3 continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 2006e88: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 2006e8c: d2 06 40 00 ld [ %i1 ], %o1 2006e90: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2006e94: 9f c0 40 00 call %g1 2006e98: 90 10 00 12 mov %l2, %o0 if ( bytes < 0 ) 2006e9c: 80 a2 20 00 cmp %o0, 0 2006ea0: 16 80 00 04 bge 2006eb0 <== ALWAYS TAKEN 2006ea4: 01 00 00 00 nop 2006ea8: 81 c7 e0 08 ret <== NOT EXECUTED 2006eac: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 2006eb0: 02 80 00 07 be 2006ecc <== NEVER TAKEN 2006eb4: a1 3a 20 1f sra %o0, 0x1f, %l0 iop->offset += bytes; 2006eb8: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 2006ebc: 86 80 c0 08 addcc %g3, %o0, %g3 total += bytes; 2006ec0: b0 06 00 08 add %i0, %o0, %i0 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 2006ec4: 84 40 80 10 addx %g2, %l0, %g2 2006ec8: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] total += bytes; } if (bytes != iov[ v ].iov_len) 2006ecc: c2 06 60 04 ld [ %i1 + 4 ], %g1 2006ed0: 80 a2 00 01 cmp %o0, %g1 2006ed4: 12 80 00 05 bne 2006ee8 <== NEVER TAKEN 2006ed8: 01 00 00 00 nop } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 2006edc: 80 a4 c0 1a cmp %l3, %i2 2006ee0: 06 bf ff e6 bl 2006e78 2006ee4: b2 06 60 08 add %i1, 8, %i1 if (bytes != iov[ v ].iov_len) break; } return total; } 2006ee8: 81 c7 e0 08 ret 2006eec: 81 e8 00 00 restore